diff --git a/WAProto/GenerateStatics.sh b/WAProto/GenerateStatics.sh deleted file mode 100644 index 7d77a28..0000000 --- a/WAProto/GenerateStatics.sh +++ /dev/null @@ -1,4 +0,0 @@ -yarn pbjs -t static-module -w commonjs -o ./WAProto/index.js ./WAProto/WAProto.proto; -yarn pbts -o ./WAProto/index.d.ts ./WAProto/index.js; - -#protoc --plugin=./node_modules/.bin/protoc-gen-ts_proto --ts_proto_opt=env=node,useOptionals=true,forceLong=long --ts_proto_out=. ./src/Binary/WAMessage.proto; \ No newline at end of file diff --git a/WAProto/WAProto.proto b/WAProto/WAProto.proto index dd5ced1..51ac4c9 100644 --- a/WAProto/WAProto.proto +++ b/WAProto/WAProto.proto @@ -1,6 +1,8 @@ -syntax = "proto2"; +syntax = "proto3"; package proto; +/// WhatsApp Version: 2.3000.1020608496 + message ADVDeviceIdentity { optional uint32 rawId = 1; optional uint64 timestamp = 2; @@ -40,6 +42,159 @@ message ADVSignedKeyIndexList { optional bytes accountSignatureKey = 3; } +message AIRichResponseMessage { + optional AIRichResponseMessageType messageType = 1; + repeated AIRichResponseSubMessage submessages = 2; + optional AIRichResponseAbstractData abstractData = 3; + message AIRichResponseAbstractData { + optional bytes data = 1; + } + + message AIRichResponseCodeMetadata { + optional string codeLanguage = 1; + repeated AIRichResponseCodeBlock codeBlocks = 2; + message AIRichResponseCodeBlock { + optional AIRichResponseMessage.AIRichResponseCodeMetadata.AIRichResponseCodeHighlightType highlightType = 1; + optional string codeContent = 2; + } + + enum AIRichResponseCodeHighlightType { + AI_RICH_RESPONSE_CODE_HIGHLIGHT_DEFAULT = 0; + AI_RICH_RESPONSE_CODE_HIGHLIGHT_KEYWORD = 1; + AI_RICH_RESPONSE_CODE_HIGHLIGHT_METHOD = 2; + AI_RICH_RESPONSE_CODE_HIGHLIGHT_STRING = 3; + AI_RICH_RESPONSE_CODE_HIGHLIGHT_NUMBER = 4; + AI_RICH_RESPONSE_CODE_HIGHLIGHT_COMMENT = 5; + } + } + + message AIRichResponseContentItemsMetadata { + repeated AIRichResponseContentItemMetadata itemsMetadata = 1; + optional ContentType contentType = 2; + message AIRichResponseContentItemMetadata { + oneof aIRichResponseContentItem { + AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseReelItem reelItem = 1; + } + } + + message AIRichResponseReelItem { + optional string title = 1; + optional string profileIconUrl = 2; + optional string thumbnailUrl = 3; + optional string videoUrl = 4; + } + + enum ContentType { + DEFAULT = 0; + CAROUSEL = 1; + } + } + + message AIRichResponseDynamicMetadata { + optional AIRichResponseDynamicMetadataType type = 1; + optional uint64 version = 2; + optional string url = 3; + optional uint32 loopCount = 4; + enum AIRichResponseDynamicMetadataType { + AI_RICH_RESPONSE_DYNAMIC_METADATA_TYPE_UNKNOWN = 0; + AI_RICH_RESPONSE_DYNAMIC_METADATA_TYPE_IMAGE = 1; + AI_RICH_RESPONSE_DYNAMIC_METADATA_TYPE_GIF = 2; + } + } + + message AIRichResponseGridImageMetadata { + optional AIRichResponseMessage.AIRichResponseImageURL gridImageUrl = 1; + repeated AIRichResponseMessage.AIRichResponseImageURL imageUrls = 2; + } + + message AIRichResponseImageURL { + optional string imagePreviewUrl = 1; + optional string imageHighResUrl = 2; + optional string sourceUrl = 3; + } + + message AIRichResponseInlineImageMetadata { + optional AIRichResponseMessage.AIRichResponseImageURL imageUrl = 1; + optional string imageText = 2; + optional AIRichResponseImageAlignment alignment = 3; + optional string tapLinkUrl = 4; + enum AIRichResponseImageAlignment { + AI_RICH_RESPONSE_IMAGE_LAYOUT_LEADING_ALIGNED = 0; + AI_RICH_RESPONSE_IMAGE_LAYOUT_TRAILING_ALIGNED = 1; + AI_RICH_RESPONSE_IMAGE_LAYOUT_CENTER_ALIGNED = 2; + } + } + + message AIRichResponseLatexMetadata { + optional string text = 1; + repeated AIRichResponseLatexExpression expressions = 2; + message AIRichResponseLatexExpression { + optional string latexExpression = 1; + optional string url = 2; + optional double width = 3; + optional double height = 4; + optional double fontHeight = 5; + } + + } + + message AIRichResponseMapMetadata { + optional double centerLatitude = 1; + optional double centerLongitude = 2; + optional double latitudeDelta = 3; + optional double longitudeDelta = 4; + repeated AIRichResponseMapAnnotation annotations = 5; + optional bool showInfoList = 6; + message AIRichResponseMapAnnotation { + optional uint32 annotationNumber = 1; + optional double latitude = 2; + optional double longitude = 3; + optional string title = 4; + optional string body = 5; + } + + } + + enum AIRichResponseMessageType { + AI_RICH_RESPONSE_TYPE_UNKNOWN = 0; + AI_RICH_RESPONSE_TYPE_STANDARD = 1; + } + message AIRichResponseSubMessage { + optional AIRichResponseMessage.AIRichResponseSubMessageType messageType = 1; + optional AIRichResponseMessage.AIRichResponseGridImageMetadata gridImageMetadata = 2; + optional string messageText = 3; + optional AIRichResponseMessage.AIRichResponseInlineImageMetadata imageMetadata = 4; + optional AIRichResponseMessage.AIRichResponseCodeMetadata codeMetadata = 5; + optional AIRichResponseMessage.AIRichResponseTableMetadata tableMetadata = 6; + optional AIRichResponseMessage.AIRichResponseDynamicMetadata dynamicMetadata = 7; + optional AIRichResponseMessage.AIRichResponseLatexMetadata latexMetadata = 8; + optional AIRichResponseMessage.AIRichResponseMapMetadata mapMetadata = 9; + optional AIRichResponseMessage.AIRichResponseContentItemsMetadata contentItemsMetadata = 10; + } + + enum AIRichResponseSubMessageType { + AI_RICH_RESPONSE_UNKNOWN = 0; + AI_RICH_RESPONSE_GRID_IMAGE = 1; + AI_RICH_RESPONSE_TEXT = 2; + AI_RICH_RESPONSE_INLINE_IMAGE = 3; + AI_RICH_RESPONSE_TABLE = 4; + AI_RICH_RESPONSE_CODE = 5; + AI_RICH_RESPONSE_DYNAMIC = 6; + AI_RICH_RESPONSE_MAP = 7; + AI_RICH_RESPONSE_LATEX = 8; + AI_RICH_RESPONSE_CONTENT_ITEMS = 9; + } + message AIRichResponseTableMetadata { + repeated AIRichResponseTableRow rows = 1; + message AIRichResponseTableRow { + repeated string items = 1; + optional bool isHeading = 2; + } + + } + +} + message ActionLink { optional string url = 1; optional string buttonTitle = 2; @@ -109,12 +264,153 @@ message BotAvatarMetadata { optional uint32 wordCount = 5; } +message BotCapabilityMetadata { + repeated BotCapabilityType capabilities = 1; + enum BotCapabilityType { + UNKNOWN = 0; + PROGRESS_INDICATOR = 1; + RICH_RESPONSE_HEADING = 2; + RICH_RESPONSE_NESTED_LIST = 3; + AI_MEMORY = 4; + RICH_RESPONSE_THREAD_SURFING = 5; + RICH_RESPONSE_TABLE = 6; + RICH_RESPONSE_CODE = 7; + RICH_RESPONSE_STRUCTURED_RESPONSE = 8; + RICH_RESPONSE_INLINE_IMAGE = 9; + WA_IG_1P_PLUGIN_RANKING_CONTROL = 10; + WA_IG_1P_PLUGIN_RANKING_UPDATE_1 = 11; + WA_IG_1P_PLUGIN_RANKING_UPDATE_2 = 12; + WA_IG_1P_PLUGIN_RANKING_UPDATE_3 = 13; + WA_IG_1P_PLUGIN_RANKING_UPDATE_4 = 14; + WA_IG_1P_PLUGIN_RANKING_UPDATE_5 = 15; + WA_IG_1P_PLUGIN_RANKING_UPDATE_6 = 16; + WA_IG_1P_PLUGIN_RANKING_UPDATE_7 = 17; + WA_IG_1P_PLUGIN_RANKING_UPDATE_8 = 18; + WA_IG_1P_PLUGIN_RANKING_UPDATE_9 = 19; + WA_IG_1P_PLUGIN_RANKING_UPDATE_10 = 20; + RICH_RESPONSE_SUB_HEADING = 21; + RICH_RESPONSE_GRID_IMAGE = 22; + AI_STUDIO_UGC_MEMORY = 23; + RICH_RESPONSE_LATEX = 24; + RICH_RESPONSE_MAPS = 25; + RICH_RESPONSE_INLINE_REELS = 26; + AGENTIC_PLANNING = 27; + ACCOUNT_LINKING = 28; + STREAMING_DISAGGREGATION = 29; + } +} + +message BotImagineMetadata { + optional ImagineType imagineType = 1; + enum ImagineType { + UNKNOWN = 0; + IMAGINE = 1; + MEMU = 2; + FLASH = 3; + EDIT = 4; + } +} + +message BotLinkedAccount { + optional BotLinkedAccountType type = 1; + enum BotLinkedAccountType { + BOT_LINKED_ACCOUNT_TYPE_1P = 0; + } +} + +message BotLinkedAccountsMetadata { + repeated BotLinkedAccount accounts = 1; + optional bytes acAuthTokens = 2; +} + +message BotMediaMetadata { + optional string fileSha256 = 1; + optional string mediaKey = 2; + optional string fileEncSha256 = 3; + optional string directPath = 4; + optional int64 mediaKeyTimestamp = 5; + optional string mimetype = 6; + optional OrientationType orientationType = 7; + enum OrientationType { + CENTER = 1; + LEFT = 2; + RIGHT = 3; + } +} + +message BotMemoryFact { + optional string fact = 1; + optional string factId = 2; +} + +message BotMemoryMetadata { + repeated BotMemoryFact addedFacts = 1; + repeated BotMemoryFact removedFacts = 2; + optional string disclaimer = 3; +} + +message BotMemuMetadata { + repeated BotMediaMetadata faceImages = 1; +} + message BotMetadata { optional BotAvatarMetadata avatarMetadata = 1; optional string personaId = 2; optional BotPluginMetadata pluginMetadata = 3; optional BotSuggestedPromptMetadata suggestedPromptMetadata = 4; optional string invokerJid = 5; + optional BotSessionMetadata sessionMetadata = 6; + optional BotMemuMetadata memuMetadata = 7; + optional string timezone = 8; + optional BotReminderMetadata reminderMetadata = 9; + optional BotModelMetadata modelMetadata = 10; + optional string messageDisclaimerText = 11; + optional BotProgressIndicatorMetadata progressIndicatorMetadata = 12; + optional BotCapabilityMetadata capabilityMetadata = 13; + optional BotImagineMetadata imagineMetadata = 14; + optional BotMemoryMetadata memoryMetadata = 15; + optional BotRenderingMetadata renderingMetadata = 16; + optional BotMetricsMetadata botMetricsMetadata = 17; + optional BotLinkedAccountsMetadata botLinkedAccountsMetadata = 18; +} + +enum BotMetricsEntryPoint { + FAVICON = 1; + CHATLIST = 2; + AISEARCH_NULL_STATE_PAPER_PLANE = 3; + AISEARCH_NULL_STATE_SUGGESTION = 4; + AISEARCH_TYPE_AHEAD_SUGGESTION = 5; + AISEARCH_TYPE_AHEAD_PAPER_PLANE = 6; + AISEARCH_TYPE_AHEAD_RESULT_CHATLIST = 7; + AISEARCH_TYPE_AHEAD_RESULT_MESSAGES = 8; + AIVOICE_SEARCH_BAR = 9; + AIVOICE_FAVICON = 10; + AISTUDIO = 11; + DEEPLINK = 12; + NOTIFICATION = 13; + PROFILE_MESSAGE_BUTTON = 14; + FORWARD = 15; + APP_SHORTCUT = 16; + FF_FAMILY = 17; +} +message BotMetricsMetadata { + optional string destinationId = 1; + optional BotMetricsEntryPoint destinationEntryPoint = 2; +} + +message BotModelMetadata { + optional ModelType modelType = 1; + optional PremiumModelStatus premiumModelStatus = 2; + enum ModelType { + UNKNOWN_TYPE = 0; + LLAMA_PROD = 1; + LLAMA_PROD_PREMIUM = 2; + } + enum PremiumModelStatus { + UNKNOWN_STATUS = 0; + AVAILABLE = 1; + QUOTA_EXCEED_LIMIT = 2; + } } message BotPluginMetadata { @@ -125,20 +421,114 @@ message BotPluginMetadata { optional string searchProviderUrl = 5; optional uint32 referenceIndex = 6; optional uint32 expectedLinksCount = 7; - optional uint32 pluginVersion = 8; + optional string searchQuery = 9; + optional MessageKey parentPluginMessageKey = 10; + optional PluginType deprecatedField = 11; + optional PluginType parentPluginType = 12; + optional string faviconCdnUrl = 13; enum PluginType { + UNKNOWN_PLUGIN = 0; REELS = 1; SEARCH = 2; } enum SearchProvider { + UNKNOWN = 0; BING = 1; GOOGLE = 2; + SUPPORT = 3; } } +message BotProgressIndicatorMetadata { + optional string progressDescription = 1; + repeated BotPlanningStepMetadata stepsMetadata = 2; + message BotPlanningStepMetadata { + optional string statusTitle = 1; + optional string statusBody = 2; + repeated BotPlanningSearchSourcesMetadata sourcesMetadata = 3; + optional PlanningStepStatus status = 4; + optional bool isReasoning = 5; + optional bool isEnhancedSearch = 6; + message BotPlanningSearchSourcesMetadata { + optional string sourceTitle = 1; + optional BotPlanningSearchSourceProvider provider = 2; + optional string sourceUrl = 3; + enum BotPlanningSearchSourceProvider { + UNKNOWN = 0; + OTHER = 1; + GOOGLE = 2; + BING = 3; + } + } + + enum PlanningStepStatus { + UNKNOWN = 0; + PLANNED = 1; + EXECUTING = 2; + FINISHED = 3; + } + } + +} + +message BotPromptSuggestion { + optional string prompt = 1; + optional string promptId = 2; +} + +message BotPromptSuggestions { + repeated BotPromptSuggestion suggestions = 1; +} + +message BotReminderMetadata { + optional MessageKey requestMessageKey = 1; + optional ReminderAction action = 2; + optional string name = 3; + optional uint64 nextTriggerTimestamp = 4; + optional ReminderFrequency frequency = 5; + enum ReminderAction { + NOTIFY = 1; + CREATE = 2; + DELETE = 3; + UPDATE = 4; + } + enum ReminderFrequency { + ONCE = 1; + DAILY = 2; + WEEKLY = 3; + BIWEEKLY = 4; + MONTHLY = 5; + } +} + +message BotRenderingMetadata { + repeated Keyword keywords = 1; + message Keyword { + optional string value = 1; + repeated string associatedPrompts = 2; + } + +} + +message BotSessionMetadata { + optional string sessionId = 1; + optional BotSessionSource sessionSource = 2; +} + +enum BotSessionSource { + NONE = 0; + NULL_STATE = 1; + TYPEAHEAD = 2; + USER_INPUT = 3; + EMU_FLASH = 4; + EMU_FLASH_FOLLOWUP = 5; + VOICE = 6; +} message BotSuggestedPromptMetadata { repeated string suggestedPrompts = 1; optional uint32 selectedPromptIndex = 2; + optional BotPromptSuggestions promptSuggestions = 3; + optional string selectedPromptId = 4; } message CallLogRecord { @@ -179,7 +569,7 @@ message CallLogRecord { optional string userJid = 1; optional CallLogRecord.CallResult callResult = 2; } - + enum SilenceReason { NONE = 0; SCHEDULED = 1; @@ -201,9 +591,14 @@ message CertChain { optional uint64 notBefore = 4; optional uint64 notAfter = 5; } - + } - + +} + +message ChatLockSettings { + optional bool hideLockedChats = 1; + optional UserPassword secretCode = 2; } message ChatRowOpaqueData { @@ -233,16 +628,28 @@ message ChatRowOpaqueData { VIDEO = 2; } } - + message CtwaContextLinkData { optional string context = 1; optional string sourceUrl = 2; optional string icebreaker = 3; optional string phone = 4; } - + } - + +} + +message Citation { + required string title = 1; + required string subtitle = 2; + required string cmsId = 3; + required string imageUrl = 4; +} + +message ClientPairingProps { + optional bool isChatDbLidMigrated = 1; + optional bool isSyncdPureLidSession = 2; } message ClientPayload { @@ -273,6 +680,7 @@ message ClientPayload { optional int32 yearClass = 36; optional int32 memClass = 37; optional InteropData interopData = 38; + optional TrafficAnonymization trafficAnonymization = 40; enum ConnectReason { PUSH = 0; USER_ACTIVATED = 1; @@ -308,9 +716,10 @@ message ClientPayload { HARDCODED = 2; OVERRIDE = 3; FALLBACK = 4; + MNS = 5; } } - + message DevicePairingRegistrationData { optional bytes eRegid = 1; optional bytes eKeytype = 2; @@ -321,7 +730,7 @@ message ClientPayload { optional bytes buildHash = 7; optional bytes deviceProps = 8; } - + enum IOSAppExtension { SHARE_EXTENSION = 0; SERVICE_EXTENSION = 1; @@ -330,14 +739,19 @@ message ClientPayload { message InteropData { optional uint64 accountId = 1; optional bytes token = 2; + optional bool enableReadReceipts = 3; } - + enum Product { WHATSAPP = 0; MESSENGER = 1; INTEROP = 2; INTEROP_MSGR = 3; } + enum TrafficAnonymization { + OFF = 0; + STANDARD = 1; + } message UserAgent { optional Platform platform = 1; optional AppVersion appVersion = 2; @@ -354,6 +768,7 @@ message ClientPayload { optional string deviceBoard = 13; optional string deviceExpId = 14; optional DeviceType deviceType = 15; + optional string deviceModelType = 16; message AppVersion { optional uint32 primary = 1; optional uint32 secondary = 2; @@ -361,7 +776,7 @@ message ClientPayload { optional uint32 quaternary = 4; optional uint32 quinary = 5; } - + enum DeviceType { PHONE = 0; TABLET = 1; @@ -414,7 +829,7 @@ message ClientPayload { DEBUG = 3; } } - + message WebInfo { optional string refToken = 1; optional string version = 2; @@ -426,6 +841,7 @@ message ClientPayload { WIN_STORE = 2; DARWIN = 3; WIN32 = 4; + WIN_HYBRID = 5; } message WebdPayload { optional bool usesParticipantInKey = 1; @@ -440,9 +856,9 @@ message ClientPayload { optional string documentTypes = 10; optional bytes features = 11; } - + } - + } message CommentMetadata { @@ -450,6 +866,21 @@ message CommentMetadata { optional uint32 replyCount = 2; } +message CompanionCommitment { + optional bytes hash = 1; +} + +message CompanionEphemeralIdentity { + optional bytes publicKey = 1; + optional DeviceProps.PlatformType deviceType = 2; + optional string ref = 3; +} + +message Config { + map field = 1; + optional uint32 version = 2; +} + message ContextInfo { optional string stanzaId = 1; optional string participant = 2; @@ -484,6 +915,17 @@ message ContextInfo { optional string smbClientCampaignId = 45; optional string smbServerCampaignId = 46; optional DataSharingContext dataSharingContext = 47; + optional bool alwaysShowAdAttribution = 48; + optional FeatureEligibilities featureEligibilities = 49; + optional string entryPointConversionExternalSource = 50; + optional string entryPointConversionExternalMedium = 51; + optional string ctwaSignals = 54; + optional bytes ctwaPayload = 55; + optional ForwardedAIBotMessageInfo forwardedAiBotMessageInfo = 56; + optional StatusAttributionType statusAttributionType = 57; + optional UrlTrackingMap urlTrackingMap = 58; + optional PairedMediaType pairedMediaType = 59; + optional uint32 rankingVersion = 60; message AdReplyInfo { optional string advertiserName = 1; optional MediaType mediaType = 2; @@ -495,15 +937,25 @@ message ContextInfo { VIDEO = 2; } } - + message BusinessMessageForwardInfo { optional string businessOwnerJid = 1; } - + message DataSharingContext { optional bool showMmDisclosure = 1; + optional string encryptedSignalTokenConsented = 2; + repeated Parameters parameters = 3; + message Parameters { + optional string key = 1; + optional string stringData = 2; + optional int64 intData = 3; + optional float floatData = 4; + optional ContextInfo.DataSharingContext.Parameters contents = 5; + } + } - + message ExternalAdReplyInfo { optional string title = 1; optional string body = 2; @@ -519,13 +971,34 @@ message ContextInfo { optional bool showAdAttribution = 12; optional string ctwaClid = 13; optional string ref = 14; + optional bool clickToWhatsappCall = 15; + optional bool adContextPreviewDismissed = 16; + optional string sourceApp = 17; + optional bool automatedGreetingMessageShown = 18; + optional string greetingMessageBody = 19; + optional string ctaPayload = 20; + optional bool disableNudge = 21; + optional string originalImageUrl = 22; enum MediaType { NONE = 0; IMAGE = 1; VIDEO = 2; } } - + + message FeatureEligibilities { + optional bool cannotBeReactedTo = 1; + optional bool cannotBeRanked = 2; + optional bool canRequestFeedback = 3; + optional bool canBeReshared = 4; + } + + message ForwardedAIBotMessageInfo { + optional string botName = 1; + optional string botJid = 2; + optional string creatorName = 3; + } + message ForwardedNewsletterMessageInfo { optional string newsletterJid = 1; optional int32 serverMessageId = 2; @@ -538,12 +1011,24 @@ message ContextInfo { LINK_CARD = 3; } } - + + enum PairedMediaType { + NOT_PAIRED_MEDIA = 0; + SD_VIDEO_PARENT = 1; + HD_VIDEO_CHILD = 2; + SD_IMAGE_PARENT = 3; + HD_IMAGE_CHILD = 4; + } + enum StatusAttributionType { + NONE = 0; + RESHARED_FROM_MENTION = 1; + RESHARED_FROM_POST = 2; + } message UTMInfo { optional string utmSource = 1; optional string utmCampaign = 2; } - + } message Conversation { @@ -592,6 +1077,11 @@ message Conversation { optional string username = 43; optional string lidOriginType = 44; optional uint32 commentsCount = 45; + optional bool locked = 46; + optional PrivacySystemMessage systemMessageToInsert = 47; + optional bool capiCreatedGroup = 48; + optional string accountLid = 49; + optional bool limitSharing = 50; enum EndOfHistoryTransferType { COMPLETE_BUT_MORE_MESSAGES_REMAIN_ON_PRIMARY = 0; COMPLETE_AND_NO_MORE_MESSAGE_REMAIN_ON_PRIMARY = 1; @@ -599,6 +1089,20 @@ message Conversation { } } +message DeviceCapabilities { + optional ChatLockSupportLevel chatLockSupportLevel = 1; + optional LIDMigration lidMigration = 2; + enum ChatLockSupportLevel { + NONE = 0; + MINIMAL = 1; + FULL = 2; + } + message LIDMigration { + optional uint64 chatDbMigrationTimestamp = 1; + } + +} + message DeviceConsistencyCodeMessage { optional uint32 generation = 1; optional bytes signature = 2; @@ -628,7 +1132,7 @@ message DeviceProps { optional uint32 quaternary = 4; optional uint32 quinary = 5; } - + message HistorySyncConfig { optional uint32 fullSyncDaysLimit = 1; optional uint32 fullSyncSizeMbLimit = 2; @@ -638,8 +1142,14 @@ message DeviceProps { optional bool supportCallLogHistory = 6; optional bool supportBotUserAgentChatHistory = 7; optional bool supportCagReactionsAndPolls = 8; + optional bool supportBizHostedMsg = 9; + optional bool supportRecentSyncChunkMessageCountTuning = 10; + optional bool supportHostedGroupMsg = 11; + optional bool supportFbidBotChatHistory = 12; + optional bool supportAddOnHistorySyncMigration = 13; + optional bool supportMessageAssociation = 14; } - + enum PlatformType { UNKNOWN = 0; CHROME = 1; @@ -664,6 +1174,8 @@ message DeviceProps { AR_DEVICE = 20; UWP = 21; VR = 22; + CLOUD_API = 23; + SMARTGLASSES = 24; } } @@ -684,14 +1196,50 @@ message DisappearingMode { ACCOUNT_SETTING = 2; BULK_CHANGE = 3; BIZ_SUPPORTS_FB_HOSTING = 4; + UNKNOWN_GROUPS = 5; } } +message EmbeddedContent { + oneof content { + EmbeddedMessage embeddedMessage = 1; + EmbeddedMusic embeddedMusic = 2; + } +} + +message EmbeddedMessage { + optional string stanzaId = 1; + optional Message message = 2; +} + +message EmbeddedMusic { + optional string musicContentMediaId = 1; + optional string songId = 2; + optional string author = 3; + optional string title = 4; + optional string artworkDirectPath = 5; + optional bytes artworkSha256 = 6; + optional bytes artworkEncSha256 = 7; + optional bytes artworkMediaKey = 11; + optional string artistAttribution = 8; + optional bytes countryBlocklist = 9; + optional bool isExplicit = 10; +} + +message EncryptedPairingRequest { + optional bytes encryptedPayload = 1; + optional bytes iv = 2; +} + message EphemeralSetting { optional sfixed32 duration = 1; optional sfixed64 timestamp = 2; } +message EventAdditionalMetadata { + optional bool isStale = 1; +} + message EventResponse { optional MessageKey eventResponseMessageKey = 1; optional int64 timestampMs = 2; @@ -713,6 +1261,14 @@ message ExternalBlobReference { optional bytes fileEncSha256 = 6; } +message Field { + optional uint32 minVersion = 1; + optional uint32 maxVersion = 2; + optional uint32 notReportableMinVersion = 3; + optional bool isMessage = 4; + map subfield = 5; +} + message GlobalSettings { optional WallpaperSettings lightThemeWallpaper = 1; optional MediaVisibility mediaVisibility = 2; @@ -732,6 +1288,7 @@ message GlobalSettings { optional int32 photoQualityMode = 16; optional NotificationSettings individualNotificationSettings = 17; optional NotificationSettings groupNotificationSettings = 18; + optional ChatLockSettings chatLockSettings = 19; } message GroupMention { @@ -757,19 +1314,19 @@ message HandshakeMessage { optional bytes static = 1; optional bytes payload = 2; } - + 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 { @@ -787,6 +1344,8 @@ message HistorySync { repeated CallLogRecord callLogRecords = 13; optional BotAIWaitListState aiWaitListState = 14; repeated PhoneNumberToLIDMapping phoneNumberToLidMappings = 15; + optional string companionMetaNonce = 16; + optional bytes shareableChatIdentifierEncryptionKey = 17; enum BotAIWaitListState { IN_WAITLIST = 0; AI_AVAILABLE = 1; @@ -818,12 +1377,12 @@ message HydratedTemplateButton { 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; @@ -835,7 +1394,7 @@ message HydratedTemplateButton { COMPACT = 3; } } - + } message IdentityKeyPairStructure { @@ -846,9 +1405,12 @@ message IdentityKeyPairStructure { message InteractiveAnnotation { repeated Point polygonVertices = 1; optional bool shouldSkipConfirmation = 4; + optional EmbeddedContent embeddedContent = 5; oneof action { Location location = 2; ContextInfo.ForwardedNewsletterMessageInfo newsletter = 3; + bool embeddedAction = 6; + TapLinkAction tapAction = 7; } } @@ -878,6 +1440,34 @@ message KeyId { optional bytes id = 1; } +message LIDMigrationMapping { + required uint64 pn = 1; + required uint64 assignedLid = 2; + optional uint64 latestLid = 3; +} + +message LIDMigrationMappingSyncMessage { + optional bytes encodedMappingPayload = 1; +} + +message LIDMigrationMappingSyncPayload { + repeated LIDMigrationMapping pnToLidMappings = 1; +} + +message LegacyMessage { + optional Message.EventResponseMessage eventResponseMessage = 1; + optional Message.PollVoteMessage pollVote = 2; +} + +message LimitSharing { + optional bool sharingLimited = 1; + optional Trigger trigger = 2; + enum Trigger { + CHAT_SETTING = 0; + BIZ_SUPPORTS_FB_HOSTING = 1; + } +} + message LocalizedName { optional string lg = 1; optional string lc = 2; @@ -894,38 +1484,6 @@ message MediaData { optional string localPath = 1; } -message MediaEntry { - optional bytes fileSha256 = 1; - optional bytes mediaKey = 2; - optional bytes fileEncSha256 = 3; - optional string directPath = 4; - optional int64 mediaKeyTimestamp = 5; - optional string serverMediaType = 6; - optional bytes uploadToken = 7; - optional bytes validatedTimestamp = 8; - optional bytes sidecar = 9; - optional string objectId = 10; - optional string fbid = 11; - optional DownloadableThumbnail downloadableThumbnail = 12; - optional string handle = 13; - optional string filename = 14; - optional ProgressiveJpegDetails progressiveJpegDetails = 15; - message DownloadableThumbnail { - optional bytes fileSha256 = 1; - optional bytes fileEncSha256 = 2; - optional string directPath = 3; - optional bytes mediaKey = 4; - optional int64 mediaKeyTimestamp = 5; - optional string objectId = 6; - } - - message ProgressiveJpegDetails { - repeated int64 scanLengths = 1; - optional bytes sidecar = 2; - } - -} - message MediaNotifyMessage { optional string expressPathUrl = 1; optional bytes fileEncSha256 = 2; @@ -936,6 +1494,7 @@ message MediaRetryNotification { optional string stanzaId = 1; optional string directPath = 2; optional ResultType result = 3; + optional bytes messageSecret = 4; enum ResultType { GENERAL_ERROR = 0; SUCCESS = 1; @@ -1013,45 +1572,65 @@ message Message { optional BCallMessage bcallMessage = 72; optional FutureProofMessage lottieStickerMessage = 74; optional EventMessage eventMessage = 75; + optional EncEventResponseMessage encEventResponseMessage = 76; optional CommentMessage commentMessage = 77; optional NewsletterAdminInviteMessage newsletterAdminInviteMessage = 78; - optional ExtendedTextMessageWithParentKey extendedTextMessageWithParentKey = 79; optional PlaceholderMessage placeholderMessage = 80; - optional EncEventUpdateMessage encEventUpdateMessage = 81; + optional SecretEncryptedMessage secretEncryptedMessage = 82; + optional AlbumMessage albumMessage = 83; + optional FutureProofMessage eventCoverImage = 85; + optional StickerPackMessage stickerPackMessage = 86; + optional FutureProofMessage statusMentionMessage = 87; + optional PollResultSnapshotMessage pollResultSnapshotMessage = 88; + optional FutureProofMessage pollCreationOptionImageMessage = 90; + optional FutureProofMessage associatedChildMessage = 91; + optional FutureProofMessage groupStatusMentionMessage = 92; + optional FutureProofMessage pollCreationMessageV4 = 93; + optional FutureProofMessage pollCreationMessageV5 = 94; + optional FutureProofMessage statusAddYours = 95; + optional FutureProofMessage groupStatusMessage = 96; + optional AIRichResponseMessage richResponseMessage = 97; + optional StatusNotificationMessage statusNotificationMessage = 98; + message AlbumMessage { + optional uint32 expectedImageCount = 2; + optional uint32 expectedVideoCount = 3; + optional ContextInfo contextInfo = 17; + } + message AppStateFatalExceptionNotification { repeated string collectionNames = 1; optional int64 timestamp = 2; } - + message AppStateSyncKey { optional Message.AppStateSyncKeyId keyId = 1; optional Message.AppStateSyncKeyData keyData = 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 AudioMessage { optional string url = 1; optional string mimetype = 2; @@ -1068,8 +1647,9 @@ message Message { optional bytes waveform = 19; optional fixed32 backgroundArgb = 20; optional bool viewOnce = 21; + optional string accessibilityLabel = 22; } - + message BCallMessage { optional string sessionId = 1; optional MediaType mediaType = 2; @@ -1081,13 +1661,14 @@ message Message { VIDEO = 2; } } - + message BotFeedbackMessage { optional MessageKey messageKey = 1; optional BotFeedbackKind kind = 2; optional string text = 3; optional uint64 kindNegative = 4; optional uint64 kindPositive = 5; + optional ReportKind kindReport = 6; enum BotFeedbackKind { BOT_FEEDBACK_POSITIVE = 0; BOT_FEEDBACK_NEGATIVE_GENERIC = 1; @@ -1099,6 +1680,9 @@ message Message { BOT_FEEDBACK_NEGATIVE_REFUSED = 7; BOT_FEEDBACK_NEGATIVE_NOT_VISUALLY_APPEALING = 8; BOT_FEEDBACK_NEGATIVE_NOT_RELEVANT_TO_TEXT = 9; + BOT_FEEDBACK_NEGATIVE_PERSONALIZED = 10; + BOT_FEEDBACK_NEGATIVE_CLARITY = 11; + BOT_FEEDBACK_NEGATIVE_DOESNT_LOOK_LIKE_THE_PERSON = 12; } enum BotFeedbackKindMultipleNegative { BOT_FEEDBACK_MULTIPLE_NEGATIVE_GENERIC = 1; @@ -1114,8 +1698,11 @@ message Message { enum BotFeedbackKindMultiplePositive { BOT_FEEDBACK_MULTIPLE_POSITIVE_GENERIC = 1; } + enum ReportKind { + GENERIC = 0; + } } - + message ButtonsMessage { optional string contentText = 6; optional string footerText = 7; @@ -1137,19 +1724,19 @@ message Message { 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; @@ -1160,7 +1747,7 @@ message Message { LOCATION = 6; } } - + message ButtonsResponseMessage { optional string selectedButtonId = 1; optional ContextInfo contextInfo = 3; @@ -1173,14 +1760,16 @@ message Message { DISPLAY_TEXT = 1; } } - + message Call { optional bytes callKey = 1; optional string conversionSource = 2; optional bytes conversionData = 3; optional uint32 conversionDelaySeconds = 4; + optional string ctwaSignals = 5; + optional bytes ctwaPayload = 6; } - + message CallLogMessage { optional bool isVideo = 1; optional CallOutcome callOutcome = 2; @@ -1201,50 +1790,62 @@ message Message { optional string jid = 1; optional Message.CallLogMessage.CallOutcome callOutcome = 2; } - + enum CallType { REGULAR = 0; SCHEDULED_CALL = 1; VOICE_CHAT = 2; } } - + message CancelPaymentRequestMessage { optional MessageKey key = 1; } - + message Chat { optional string displayName = 1; optional string id = 2; } - + + message CloudAPIThreadControlNotification { + optional CloudAPIThreadControl status = 1; + optional int64 senderNotificationTimestampMs = 2; + optional string consumerLid = 3; + optional string consumerPhoneNumber = 4; + enum CloudAPIThreadControl { + UNKNOWN = 0; + CONTROL_PASSED = 1; + CONTROL_TAKEN = 2; + } + } + message CommentMessage { optional Message message = 1; optional MessageKey targetMessageKey = 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; @@ -1266,31 +1867,27 @@ message Message { optional uint32 thumbnailHeight = 18; optional uint32 thumbnailWidth = 19; optional string caption = 20; + optional string accessibilityLabel = 21; } - + message EncCommentMessage { optional MessageKey targetMessageKey = 1; optional bytes encPayload = 2; optional bytes encIv = 3; } - - message EncEventUpdateMessage { + + message EncEventResponseMessage { optional MessageKey eventCreationMessageKey = 1; optional bytes encPayload = 2; optional bytes encIv = 3; } - + message EncReactionMessage { optional MessageKey targetMessageKey = 1; optional bytes encPayload = 2; optional bytes encIv = 3; } - - message EventEditMessage { - optional Message.EventMessage eventEditMessage = 1; - optional int64 editTimestampMs = 2; - } - + message EventMessage { optional ContextInfo contextInfo = 1; optional bool isCanceled = 2; @@ -1299,27 +1896,25 @@ message Message { optional Message.LocationMessage location = 5; optional string joinLink = 6; optional int64 startTime = 7; + optional int64 endTime = 8; + optional bool extraGuestsAllowed = 9; } - + message EventResponseMessage { optional EventResponseType response = 1; optional int64 timestampMs = 2; + optional int32 extraGuestCount = 3; enum EventResponseType { UNKNOWN = 0; GOING = 1; NOT_GOING = 2; + MAYBE = 3; } } - - message EventUpdateMessage { - optional Message.EventResponseMessage response = 1; - optional Message.EventEditMessage edit = 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; @@ -1341,6 +1936,9 @@ message Message { optional bytes inviteLinkParentGroupThumbnailV2 = 28; optional InviteLinkGroupType inviteLinkGroupTypeV2 = 29; optional bool viewOnce = 30; + optional uint32 videoHeight = 31; + optional uint32 videoWidth = 32; + optional Message.MMSThumbnailMetadata faviconMMSMetadata = 33; enum FontType { SYSTEM = 0; SYSTEM_TEXT = 1; @@ -1362,18 +1960,19 @@ message Message { VIDEO = 1; PLACEHOLDER = 4; IMAGE = 5; + PAYMENT_LINKS = 6; + PROFILE = 7; } } - - message ExtendedTextMessageWithParentKey { - optional MessageKey key = 1; - optional Message.ExtendedTextMessage extendedTextMessage = 2; + + message FullHistorySyncOnDemandRequestMetadata { + optional string requestId = 1; } - + message FutureProofMessage { optional Message message = 1; } - + message GroupInviteMessage { optional string groupJid = 1; optional string inviteCode = 2; @@ -1388,7 +1987,7 @@ message Message { PARENT = 1; } } - + message HighlyStructuredMessage { optional string namespace = 1; optional string elementName = 2; @@ -1409,7 +2008,7 @@ message Message { optional string currencyCode = 1; optional int64 amount1000 = 2; } - + message HSMDateTime { oneof datetimeOneof { Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent component = 1; @@ -1437,17 +2036,17 @@ message Message { SUNDAY = 7; } } - + message HSMDateTimeUnixEpoch { optional int64 timestamp = 1; } - + } - + } - + } - + message HistorySyncNotification { optional bytes fileSha256 = 1; optional uint64 fileLength = 2; @@ -1461,6 +2060,8 @@ message Message { optional int64 oldestMsgInChunkTimestampSec = 10; optional bytes initialHistBootstrapInlinePayload = 11; optional string peerDataRequestSessionId = 12; + optional Message.FullHistorySyncOnDemandRequestMetadata fullHistorySyncOnDemandRequestMetadata = 13; + optional string encHandle = 14; enum HistorySyncType { INITIAL_BOOTSTRAP = 0; INITIAL_STATUS_V3 = 1; @@ -1469,9 +2070,10 @@ message Message { PUSH_NAME = 4; NON_BLOCKING_DATA = 5; ON_DEMAND = 6; + NO_HISTORY = 7; } } - + message ImageMessage { optional string url = 1; optional string mimetype = 2; @@ -1500,17 +2102,26 @@ message Message { optional bytes thumbnailEncSha256 = 28; optional string staticUrl = 29; repeated InteractiveAnnotation annotations = 30; + optional ImageSourceType imageSourceType = 31; + optional string accessibilityLabel = 32; + enum ImageSourceType { + USER_IMAGE = 0; + AI_GENERATED = 1; + AI_MODIFIED = 2; + RASTERIZED_TEXT_STATUS = 3; + } } - + message InitialSecurityNotificationSettingSync { optional bool securityNotificationEnabled = 1; } - + message InteractiveMessage { optional Header header = 1; optional Body body = 2; optional Footer footer = 3; optional ContextInfo contextInfo = 15; + optional UrlTrackingMap urlTrackingMap = 16; oneof interactiveMessage { Message.InteractiveMessage.ShopMessage shopStorefrontMessage = 4; Message.InteractiveMessage.CollectionMessage collectionMessage = 5; @@ -1520,22 +2131,22 @@ message Message { message Body { optional string text = 1; } - + message CarouselMessage { repeated Message.InteractiveMessage cards = 1; optional int32 messageVersion = 2; } - + 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; @@ -1546,9 +2157,10 @@ message Message { bytes jpegThumbnail = 6; Message.VideoMessage videoMessage = 7; Message.LocationMessage locationMessage = 8; + Message.ProductMessage productMessage = 9; } } - + message NativeFlowMessage { repeated NativeFlowButton buttons = 1; optional string messageParamsJson = 2; @@ -1557,9 +2169,9 @@ message Message { optional string name = 1; optional string buttonParamsJson = 2; } - + } - + message ShopMessage { optional string id = 1; optional Surface surface = 2; @@ -1571,9 +2183,9 @@ message Message { WA = 3; } } - + } - + message InteractiveResponseMessage { optional Body body = 1; optional ContextInfo contextInfo = 15; @@ -1588,15 +2200,15 @@ message Message { EXTENSIONS_1 = 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; @@ -1613,13 +2225,13 @@ message Message { 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; @@ -1637,36 +2249,36 @@ message Message { message Product { optional string productId = 1; } - + 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 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; @@ -1680,9 +2292,9 @@ message Message { message SingleSelectReply { optional string selectedRowId = 1; } - + } - + message LiveLocationMessage { optional double degreesLatitude = 1; optional double degreesLongitude = 2; @@ -1695,7 +2307,7 @@ message Message { optional bytes jpegThumbnail = 16; optional ContextInfo contextInfo = 17; } - + message LocationMessage { optional double degreesLatitude = 1; optional double degreesLongitude = 2; @@ -1710,7 +2322,17 @@ message Message { optional bytes jpegThumbnail = 16; optional ContextInfo contextInfo = 17; } - + + message MMSThumbnailMetadata { + optional string thumbnailDirectPath = 1; + optional bytes thumbnailSha256 = 2; + optional bytes thumbnailEncSha256 = 3; + optional bytes mediaKey = 4; + optional int64 mediaKeyTimestamp = 5; + optional uint32 thumbnailHeight = 6; + optional uint32 thumbnailWidth = 7; + } + message MessageHistoryBundle { optional string mimetype = 2; optional bytes fileSha256 = 3; @@ -1721,15 +2343,16 @@ message Message { optional ContextInfo contextInfo = 9; repeated string participants = 10; } - + message NewsletterAdminInviteMessage { optional string newsletterJid = 1; optional string newsletterName = 2; optional bytes jpegThumbnail = 3; optional string caption = 4; optional int64 inviteExpiration = 5; + optional ContextInfo contextInfo = 6; } - + message OrderMessage { optional string orderId = 1; optional bytes thumbnail = 2; @@ -1754,7 +2377,7 @@ message Message { CATALOG = 1; } } - + message PaymentInviteMessage { optional ServiceType serviceType = 1; optional int64 expiryTimestamp = 2; @@ -1765,36 +2388,43 @@ message Message { UPI = 3; } } - + message PeerDataOperationRequestMessage { optional Message.PeerDataOperationRequestType peerDataOperationRequestType = 1; repeated RequestStickerReupload requestStickerReupload = 2; repeated RequestUrlPreview requestUrlPreview = 3; optional HistorySyncOnDemandRequest historySyncOnDemandRequest = 4; repeated PlaceholderMessageResendRequest placeholderMessageResendRequest = 5; + optional FullHistorySyncOnDemandRequest fullHistorySyncOnDemandRequest = 6; + message FullHistorySyncOnDemandRequest { + optional Message.FullHistorySyncOnDemandRequestMetadata requestMetadata = 1; + optional DeviceProps.HistorySyncConfig historySyncConfig = 2; + } + message HistorySyncOnDemandRequest { optional string chatJid = 1; optional string oldestMsgId = 2; optional bool oldestMsgFromMe = 3; optional int32 onDemandMsgCount = 4; optional int64 oldestMsgTimestampMs = 5; + optional string accountLid = 6; } - + message PlaceholderMessageResendRequest { optional MessageKey messageKey = 1; } - + message RequestStickerReupload { optional string fileSha256 = 1; } - + message RequestUrlPreview { optional string url = 1; optional bool includeHqThumbnail = 2; } - + } - + message PeerDataOperationRequestResponseMessage { optional Message.PeerDataOperationRequestType peerDataOperationRequestType = 1; optional string stanzaId = 2; @@ -1804,12 +2434,32 @@ message Message { optional Message.StickerMessage stickerMessage = 2; optional LinkPreviewResponse linkPreviewResponse = 3; optional PlaceholderMessageResendResponse placeholderMessageResendResponse = 4; + optional WaffleNonceFetchResponse waffleNonceFetchRequestResponse = 5; + optional FullHistorySyncOnDemandRequestResponse fullHistorySyncOnDemandRequestResponse = 6; + optional CompanionMetaNonceFetchResponse companionMetaNonceFetchRequestResponse = 7; + message CompanionMetaNonceFetchResponse { + optional string nonce = 1; + } + + message FullHistorySyncOnDemandRequestResponse { + optional Message.FullHistorySyncOnDemandRequestMetadata requestMetadata = 1; + optional Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.FullHistorySyncOnDemandResponseCode responseCode = 2; + } + + enum FullHistorySyncOnDemandResponseCode { + REQUEST_SUCCESS = 0; + REQUEST_TIME_EXPIRED = 1; + DECLINED_SHARING_HISTORY = 2; + GENERIC_ERROR = 3; + ERROR_REQUEST_ON_NON_SMB_PRIMARY = 4; + ERROR_HOSTED_DEVICE_NOT_CONNECTED = 5; + ERROR_HOSTED_DEVICE_LOGIN_TIME_NOT_SET = 6; + } message LinkPreviewResponse { optional string url = 1; optional string title = 2; optional string description = 3; optional bytes thumbData = 4; - optional string canonicalUrl = 5; optional string matchText = 6; optional string previewType = 7; optional LinkPreviewHighQualityThumbnail hqThumbnail = 8; @@ -1822,23 +2472,31 @@ message Message { optional int32 thumbWidth = 6; optional int32 thumbHeight = 7; } - + } - + message PlaceholderMessageResendResponse { optional bytes webMessageInfoBytes = 1; } - + + message WaffleNonceFetchResponse { + optional string nonce = 1; + optional string waEntFbid = 2; + } + } - + } - + enum PeerDataOperationRequestType { UPLOAD_STICKER = 0; SEND_RECENT_STICKER_BOOTSTRAP = 1; GENERATE_LINK_PREVIEW = 2; HISTORY_SYNC_ON_DEMAND = 3; PLACEHOLDER_MESSAGE_RESEND = 4; + WAFFLE_LINKING_NONCE_FETCH = 5; + FULL_HISTORY_SYNC_ON_DEMAND = 6; + COMPANION_META_NONCE_FETCH = 7; } message PinInChatMessage { optional MessageKey key = 1; @@ -1850,45 +2508,69 @@ message Message { UNPIN_FOR_ALL = 2; } } - + message PlaceholderMessage { optional PlaceholderType type = 1; enum PlaceholderType { MASK_LINKED_DEVICES = 0; } } - + + enum PollContentType { + UNKNOWN = 0; + TEXT = 1; + IMAGE = 2; + } message PollCreationMessage { optional bytes encKey = 1; optional string name = 2; repeated Option options = 3; optional uint32 selectableOptionsCount = 4; optional ContextInfo contextInfo = 5; + optional Message.PollContentType pollContentType = 6; + optional PollType pollType = 7; + optional Option correctAnswer = 8; message Option { optional string optionName = 1; + optional string optionHash = 2; + } + + enum PollType { + POLL = 0; + QUIZ = 1; } - } - + message PollEncValue { optional bytes encPayload = 1; optional bytes encIv = 2; } - + + message PollResultSnapshotMessage { + optional string name = 1; + repeated PollVote pollVotes = 2; + optional ContextInfo contextInfo = 3; + message PollVote { + optional string optionName = 1; + optional int64 optionVoteCount = 2; + } + + } + message PollUpdateMessage { optional MessageKey pollCreationMessageKey = 1; optional Message.PollEncValue vote = 2; optional Message.PollUpdateMessageMetadata metadata = 3; optional int64 senderTimestampMs = 4; } - + message PollUpdateMessageMetadata { } - + message PollVoteMessage { repeated bytes selectedOptions = 1; } - + message ProductMessage { optional ProductSnapshot product = 1; optional string businessOwnerJid = 2; @@ -1901,7 +2583,7 @@ message Message { optional string title = 2; optional string description = 3; } - + message ProductSnapshot { optional Message.ImageMessage productImage = 1; optional string productId = 2; @@ -1914,10 +2596,11 @@ message Message { optional uint32 productImageCount = 9; optional string firstImageId = 11; optional int64 salePriceAmount1000 = 12; + optional string signedUrl = 13; } - + } - + message ProtocolMessage { optional MessageKey key = 1; optional Type type = 2; @@ -1937,6 +2620,9 @@ message Message { optional string invokerJid = 19; optional Message.RequestWelcomeMessageMetadata requestWelcomeMessageMetadata = 20; optional MediaNotifyMessage mediaNotifyMessage = 21; + optional Message.CloudAPIThreadControlNotification cloudApiThreadControlNotification = 22; + optional LIDMigrationMappingSyncMessage lidMigrationMappingSyncMessage = 23; + optional LimitSharing limitSharing = 24; enum Type { REVOKE = 0; EPHEMERAL_SETTING = 3; @@ -1954,16 +2640,23 @@ message Message { REQUEST_WELCOME_MESSAGE = 18; BOT_FEEDBACK_MESSAGE = 19; MEDIA_NOTIFY_MESSAGE = 20; + CLOUD_API_THREAD_CONTROL_NOTIFICATION = 21; + LID_MIGRATION_MAPPING_SYNC = 22; + REMINDER_MESSAGE = 23; + BOT_MEMU_ONBOARDING_MESSAGE = 24; + STATUS_MENTION_MESSAGE = 25; + STOP_GENERATION_MESSAGE = 26; + LIMIT_SHARING = 27; } } - + message ReactionMessage { optional MessageKey key = 1; optional string text = 2; optional string groupingKey = 3; optional int64 senderTimestampMs = 4; } - + message RequestPaymentMessage { optional Message noteMessage = 4; optional string currencyCodeIso4217 = 1; @@ -1973,11 +2666,11 @@ message Message { optional Money amount = 6; optional PaymentBackground background = 7; } - + message RequestPhoneNumberMessage { optional ContextInfo contextInfo = 1; } - + message RequestWelcomeMessageMetadata { optional LocalChatState localChatState = 1; enum LocalChatState { @@ -1985,7 +2678,7 @@ message Message { NON_EMPTY = 1; } } - + message ScheduledCallCreationMessage { optional int64 scheduledTimestampMs = 1; optional CallType callType = 2; @@ -1996,7 +2689,7 @@ message Message { VIDEO = 2; } } - + message ScheduledCallEditMessage { optional MessageKey key = 1; optional EditType editType = 2; @@ -2005,18 +2698,40 @@ message Message { CANCEL = 1; } } - + + message SecretEncryptedMessage { + optional MessageKey targetMessageKey = 1; + optional bytes encPayload = 2; + optional bytes encIv = 3; + optional SecretEncType secretEncType = 4; + enum SecretEncType { + UNKNOWN = 0; + EVENT_EDIT = 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 StatusNotificationMessage { + optional MessageKey responseMessageKey = 1; + optional MessageKey originalMessageKey = 2; + optional StatusNotificationType type = 3; + enum StatusNotificationType { + UNKNOWN = 0; + STATUS_ADD_YOURS = 1; + STATUS_RESHARE = 2; + } + } + message StickerMessage { optional string url = 1; optional bytes fileSha256 = 2; @@ -2037,14 +2752,54 @@ message Message { optional bool isAvatar = 19; optional bool isAiSticker = 20; optional bool isLottie = 21; + optional string accessibilityLabel = 22; } - + + message StickerPackMessage { + optional string stickerPackId = 1; + optional string name = 2; + optional string publisher = 3; + repeated Sticker stickers = 4; + optional uint64 fileLength = 5; + optional bytes fileSha256 = 6; + optional bytes fileEncSha256 = 7; + optional bytes mediaKey = 8; + optional string directPath = 9; + optional string caption = 10; + optional ContextInfo contextInfo = 11; + optional string packDescription = 12; + optional int64 mediaKeyTimestamp = 13; + optional string trayIconFileName = 14; + optional string thumbnailDirectPath = 15; + optional bytes thumbnailSha256 = 16; + optional bytes thumbnailEncSha256 = 17; + optional uint32 thumbnailHeight = 18; + optional uint32 thumbnailWidth = 19; + optional string imageDataHash = 20; + optional uint64 stickerPackSize = 21; + optional StickerPackOrigin stickerPackOrigin = 22; + message Sticker { + optional string fileName = 1; + optional bool isAnimated = 2; + repeated string emojis = 3; + optional string accessibilityLabel = 4; + optional bool isLottie = 5; + optional string mimetype = 6; + } + + enum StickerPackOrigin { + FIRST_PARTY = 0; + THIRD_PARTY = 1; + USER_CREATED = 2; + } + } + message StickerSyncRMRMessage { repeated string filehash = 1; optional string rmrSource = 2; optional int64 requestTimestamp = 3; } - + message TemplateButtonReplyMessage { optional string selectedId = 1; optional string selectedDisplayText = 2; @@ -2052,7 +2807,7 @@ message Message { optional uint32 selectedIndex = 4; optional uint32 selectedCarouselCardIndex = 5; } - + message TemplateMessage { optional ContextInfo contextInfo = 3; optional HydratedFourRowTemplate hydratedTemplate = 4; @@ -2074,7 +2829,7 @@ message Message { Message.LocationMessage locationMessage = 5; } } - + message HydratedFourRowTemplate { optional string hydratedContentText = 6; optional string hydratedFooterText = 7; @@ -2089,9 +2844,9 @@ message Message { Message.LocationMessage locationMessage = 5; } } - + } - + message VideoMessage { optional string url = 1; optional string mimetype = 2; @@ -2117,17 +2872,59 @@ message Message { optional bytes thumbnailEncSha256 = 23; optional string staticUrl = 24; repeated InteractiveAnnotation annotations = 25; + optional string accessibilityLabel = 26; + repeated ProcessedVideo processedVideos = 27; + optional uint32 externalShareFullVideoDurationInSeconds = 28; enum Attribution { NONE = 0; GIPHY = 1; TENOR = 2; } } - + +} + +message MessageAddOn { + optional MessageAddOnType messageAddOnType = 1; + optional Message messageAddOn = 2; + optional int64 senderTimestampMs = 3; + optional int64 serverTimestampMs = 4; + optional WebMessageInfo.Status status = 5; + optional MessageAddOnContextInfo addOnContextInfo = 6; + optional MessageKey messageAddOnKey = 7; + optional LegacyMessage legacyMessage = 8; + enum MessageAddOnType { + UNDEFINED = 0; + REACTION = 1; + EVENT_RESPONSE = 2; + POLL_UPDATE = 3; + PIN_IN_CHAT = 4; + } } message MessageAddOnContextInfo { optional uint32 messageAddOnDurationInSecs = 1; + optional MessageContextInfo.MessageAddonExpiryType messageAddOnExpiryType = 2; +} + +message MessageAssociation { + optional AssociationType associationType = 1; + optional MessageKey parentMessageKey = 2; + optional int32 messageIndex = 3; + enum AssociationType { + UNKNOWN = 0; + MEDIA_ALBUM = 1; + BOT_PLUGIN = 2; + EVENT_COVER_IMAGE = 3; + STATUS_POLL = 4; + HD_VIDEO_DUAL_UPLOAD = 5; + STATUS_TAPPABLE_MESSAGE = 6; + MEDIA_POLL = 7; + STATUS_ADD_YOURS = 8; + STATUS_NOTIFICATION = 9; + HD_IMAGE_DUAL_UPLOAD = 10; + STICKER_ANNOTATION = 11; + } } message MessageContextInfo { @@ -2139,6 +2936,14 @@ message MessageContextInfo { optional bytes botMessageSecret = 6; optional BotMetadata botMetadata = 7; optional int32 reportingTokenVersion = 8; + optional MessageAddonExpiryType messageAddOnExpiryType = 9; + optional MessageAssociation messageAssociation = 10; + optional bool capiCreatedGroup = 11; + optional string supportPayload = 12; + enum MessageAddonExpiryType { + STATIC = 1; + DEPENDENT_ON_PARENT = 2; + } } message MessageKey { @@ -2168,7 +2973,6 @@ message MsgOpaqueData { optional double lat = 7; optional int32 paymentAmount1000 = 8; optional string paymentNoteMsgBody = 9; - optional string canonicalUrl = 10; optional string matchedText = 11; optional string title = 12; optional string description = 13; @@ -2184,6 +2988,8 @@ message MsgOpaqueData { optional string pollUpdateParentKey = 23; optional PollEncValue encPollVote = 24; optional bool isSentCagPollCreation = 28; + optional PollContentType pollContentType = 42; + optional PollVotesSnapshot pollVotesSnapshot = 41; optional string encReactionTargetMessageKey = 25; optional bytes encReactionEncPayload = 26; optional bytes encReactionEncIv = 27; @@ -2191,10 +2997,41 @@ message MsgOpaqueData { optional string targetMessageKey = 30; optional bytes encPayload = 31; optional bytes encIv = 32; + optional string eventName = 33; + optional bool isEventCanceled = 34; + optional string eventDescription = 35; + optional string eventJoinLink = 36; + optional int64 eventStartTime = 37; + optional EventLocation eventLocation = 38; + optional int64 eventEndTime = 40; + message EventLocation { + optional double degreesLatitude = 1; + optional double degreesLongitude = 2; + optional string name = 3; + optional string address = 4; + optional string url = 5; + optional bytes jpegThumbnail = 6; + } + + enum PollContentType { + UNKNOWN = 0; + TEXT = 1; + IMAGE = 2; + } message PollOption { optional string name = 1; + optional string hash = 2; } - + + message PollVoteSnapshot { + optional MsgOpaqueData.PollOption option = 1; + optional int32 optionVoteCount = 2; + } + + message PollVotesSnapshot { + repeated MsgOpaqueData.PollVoteSnapshot pollVotes = 1; + } + } message MsgRowOpaqueData { @@ -2212,7 +3049,7 @@ message NoiseCertificate { optional string subject = 4; optional bytes key = 5; } - + } message NotificationMessageInfo { @@ -2231,6 +3068,12 @@ message NotificationSettings { optional string callVibrate = 6; } +message PairingRequest { + optional bytes companionPublicKey = 1; + optional bytes companionIdentityKey = 2; + optional bytes advSecret = 3; +} + message PastParticipant { optional string userJid = 1; optional LeaveReason leaveReason = 2; @@ -2266,6 +3109,8 @@ message PatchDebugData { WEB = 4; UWP = 5; DARWIN = 6; + IPAD = 7; + WEAROS = 8; } } @@ -2287,7 +3132,7 @@ message PaymentBackground { optional bytes fileEncSha256 = 4; optional string directPath = 5; } - + enum Type { UNKNOWN = 0; DEFAULT = 1; @@ -2429,46 +3274,43 @@ message PremiumMessageInfo { optional string serverCampaignId = 1; } +message PrimaryEphemeralIdentity { + optional bytes publicKey = 1; + optional bytes nonce = 2; +} + +enum PrivacySystemMessage { + E2EE_MSG = 1; + NE2EE_SELF = 2; + NE2EE_OTHER = 3; +} +message ProcessedVideo { + optional string directPath = 1; + optional bytes fileSha256 = 2; + optional uint32 height = 3; + optional uint32 width = 4; + optional uint64 fileLength = 5; + optional uint32 bitrate = 6; + optional VideoQuality quality = 7; + repeated string capabilities = 8; + enum VideoQuality { + UNDEFINED = 0; + LOW = 1; + MID = 2; + HIGH = 3; + } +} + +message ProloguePayload { + optional bytes companionEphemeralIdentity = 1; + optional CompanionCommitment commitment = 2; +} + message Pushname { optional string id = 1; optional string pushname = 2; } -message QP { - enum ClauseType { - AND = 1; - OR = 2; - NOR = 3; - } - message Filter { - required string filterName = 1; - repeated QP.FilterParameters parameters = 2; - optional QP.FilterResult filterResult = 3; - required QP.FilterClientNotSupportedConfig clientNotSupportedConfig = 4; - } - - message FilterClause { - required QP.ClauseType clauseType = 1; - repeated QP.FilterClause clauses = 2; - repeated QP.Filter filters = 3; - } - - enum FilterClientNotSupportedConfig { - PASS_BY_DEFAULT = 1; - FAIL_BY_DEFAULT = 2; - } - message FilterParameters { - optional string key = 1; - optional string value = 2; - } - - enum FilterResult { - TRUE = 1; - FALSE = 2; - UNKNOWN = 3; - } -} - message Reaction { optional MessageKey key = 1; optional string text = 2; @@ -2487,6 +3329,13 @@ message RecordStructure { repeated SessionStructure previousSessions = 2; } +message Reportable { + optional uint32 minVersion = 1; + optional uint32 maxVersion = 2; + optional uint32 notReportableMinVersion = 3; + optional bool never = 4; +} + message ReportingTokenInfo { optional bytes reportingTag = 1; } @@ -2517,17 +3366,17 @@ message SenderKeyStateStructure { optional uint32 iteration = 1; optional bytes seed = 2; } - + message SenderMessageKey { optional uint32 iteration = 1; optional bytes seed = 2; } - + message SenderSigningKey { optional bytes public = 1; optional bytes private = 2; } - + } message ServerErrorReceipt { @@ -2557,16 +3406,16 @@ message SessionStructure { optional uint32 index = 1; optional bytes key = 2; } - + message MessageKey { optional uint32 index = 1; optional bytes cipherKey = 2; optional bytes macKey = 3; optional bytes iv = 4; } - + } - + message PendingKeyExchange { optional uint32 sequence = 1; optional bytes localBaseKey = 2; @@ -2576,13 +3425,13 @@ message SessionStructure { optional bytes localIdentityKey = 7; optional bytes localIdentityKeyPrivate = 8; } - + message PendingPreKey { optional uint32 preKeyId = 1; optional int32 signedPreKeyId = 3; optional bytes baseKey = 2; } - + } message SignalMessage { @@ -2600,6 +3449,10 @@ message SignedPreKeyRecordStructure { optional fixed64 timestamp = 5; } +message StatusMentionMessage { + optional Message quotedStatus = 1; +} + message StatusPSA { required uint64 campaignId = 44; optional uint64 campaignExpirationTimestamp = 45; @@ -2617,6 +3470,7 @@ message StickerMetadata { optional uint64 fileLength = 9; optional float weight = 10; optional int64 lastStickerSentTs = 11; + optional bool isLottie = 12; } message SyncActionData { @@ -2670,111 +3524,144 @@ message SyncActionValue { optional LabelReorderingAction labelReorderingAction = 47; optional PaymentInfoAction paymentInfoAction = 48; optional CustomPaymentMethodsAction customPaymentMethodsAction = 49; + optional LockChatAction lockChatAction = 50; + optional ChatLockSettings chatLockSettings = 51; + optional WamoUserIdentifierAction wamoUserIdentifierAction = 52; + optional PrivacySettingDisableLinkPreviewsAction privacySettingDisableLinkPreviewsAction = 53; + optional DeviceCapabilities deviceCapabilities = 54; + optional NoteEditAction noteEditAction = 55; + optional FavoritesAction favoritesAction = 56; + optional MerchantPaymentPartnerAction merchantPaymentPartnerAction = 57; + optional WaffleAccountLinkStateAction waffleAccountLinkStateAction = 58; + optional UsernameChatStartModeAction usernameChatStartMode = 59; + optional NotificationActivitySettingAction notificationActivitySettingAction = 60; 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 BotWelcomeRequestAction { optional bool isSent = 1; } - + message CallLogAction { optional CallLogRecord callLogRecord = 1; } - + message ChatAssignmentAction { optional string deviceAgentID = 1; } - + message ChatAssignmentOpenedStatusAction { optional bool chatOpened = 1; } - + message ClearChatAction { optional SyncActionValue.SyncActionMessageRange messageRange = 1; } - + message ContactAction { optional string fullName = 1; optional string firstName = 2; optional string lidJid = 3; optional bool saveOnPrimaryAddressbook = 4; } - + message CustomPaymentMethod { required string credentialId = 1; required string country = 2; required string type = 3; repeated SyncActionValue.CustomPaymentMethodMetadata metadata = 4; } - + message CustomPaymentMethodMetadata { required string key = 1; required string value = 2; } - + message CustomPaymentMethodsAction { repeated SyncActionValue.CustomPaymentMethod customPaymentMethods = 1; } - + message DeleteChatAction { optional SyncActionValue.SyncActionMessageRange messageRange = 1; } - + message DeleteIndividualCallLogAction { optional string peerJid = 1; optional bool isIncoming = 2; } - + message DeleteMessageForMeAction { optional bool deleteMedia = 1; optional int64 messageTimestamp = 2; } - + message ExternalWebBetaAction { optional bool isOptIn = 1; } - + + message FavoritesAction { + repeated Favorite favorites = 1; + message Favorite { + optional string id = 1; + } + + } + 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; optional int32 orderIndex = 5; + optional bool isActive = 6; + optional ListType type = 7; + enum ListType { + NONE = 0; + UNREAD = 1; + GROUPS = 2; + FAVORITES = 3; + PREDEFINED = 4; + CUSTOM = 5; + } } - + message LabelReorderingAction { repeated int32 sortedLabelIds = 1; } - + message LocaleSetting { optional string locale = 1; } - + + message LockChatAction { + optional bool locked = 1; + } + message MarkChatAsReadAction { optional bool read = 1; optional SyncActionValue.SyncActionMessageRange messageRange = 2; } - + message MarketingMessageAction { optional string name = 1; optional string message = 2; @@ -2787,49 +3674,86 @@ message SyncActionValue { PERSONALIZED = 0; } } - + message MarketingMessageBroadcastAction { optional int32 repliedCount = 1; } - + + message MerchantPaymentPartnerAction { + required Status status = 1; + required string country = 2; + optional string gatewayName = 3; + optional string credentialId = 4; + enum Status { + ACTIVE = 0; + INACTIVE = 1; + } + } + message MuteAction { optional bool muted = 1; optional int64 muteEndTimestamp = 2; optional bool autoMuted = 3; } - + + message NoteEditAction { + optional NoteType type = 1; + optional string chatJid = 2; + optional int64 createdAt = 3; + optional bool deleted = 4; + optional string unstructuredContent = 5; + enum NoteType { + UNSTRUCTURED = 1; + STRUCTURED = 2; + } + } + + message NotificationActivitySettingAction { + optional NotificationActivitySetting notificationActivitySetting = 1; + enum NotificationActivitySetting { + DEFAULT_ALL_MESSAGES = 0; + ALL_MESSAGES = 1; + HIGHLIGHTS = 2; + DEFAULT_HIGHLIGHTS = 3; + } + } + message NuxAction { optional bool acknowledged = 1; } - + message PaymentInfoAction { optional string cpi = 1; } - + message PinAction { optional bool pinned = 1; } - + message PnForLidChatAction { optional string pnJid = 1; } - + message PrimaryFeature { repeated string flags = 1; } - + message PrimaryVersionAction { optional string version = 1; } - + + message PrivacySettingDisableLinkPreviewsAction { + optional bool isPreviewsDisabled = 1; + } + message PrivacySettingRelayAllCalls { optional bool isEnabled = 1; } - + message PushNameSetting { optional string name = 1; } - + message QuickReplyAction { optional string shortcut = 1; optional string message = 2; @@ -2837,23 +3761,23 @@ message SyncActionValue { optional int32 count = 4; optional bool deleted = 5; } - + message RecentEmojiWeightsAction { repeated RecentEmojiWeight weights = 1; } - + message RemoveRecentStickerAction { optional int64 lastStickerSentTs = 1; } - + message SecurityNotificationSetting { optional bool showNotification = 1; } - + message StarAction { optional bool starred = 1; } - + message StatusPrivacyAction { optional StatusDistributionMode mode = 1; repeated string userJid = 2; @@ -2863,7 +3787,7 @@ message SyncActionValue { CONTACTS = 2; } } - + message StickerAction { optional string url = 1; optional bytes fileEncSha256 = 2; @@ -2875,37 +3799,57 @@ message SyncActionValue { optional uint64 fileLength = 8; optional bool isFavorite = 9; optional uint32 deviceIdHint = 10; + optional bool isLottie = 11; } - + message SubscriptionAction { optional bool isDeactivated = 1; optional bool isAutoRenewing = 2; optional int64 expirationDate = 3; } - + message SyncActionMessage { optional MessageKey key = 1; optional int64 timestamp = 2; } - + message SyncActionMessageRange { optional int64 lastMessageTimestamp = 1; optional int64 lastSystemMessageTimestamp = 2; repeated SyncActionValue.SyncActionMessage messages = 3; } - + message TimeFormatAction { optional bool isTwentyFourHourFormatEnabled = 1; } - + message UnarchiveChatsSetting { optional bool unarchiveChats = 1; } - + message UserStatusMuteAction { optional bool muted = 1; } - + + message UsernameChatStartModeAction { + optional ChatStartMode chatStartMode = 1; + enum ChatStartMode { + LID = 1; + PN = 2; + } + } + + message WaffleAccountLinkStateAction { + optional AccountLinkState linkState = 2; + enum AccountLinkState { + ACTIVE = 0; + } + } + + message WamoUserIdentifierAction { + optional string identifier = 1; + } + } message SyncdIndex { @@ -2958,6 +3902,11 @@ message SyncdVersion { optional uint64 version = 1; } +message TapLinkAction { + optional string title = 1; + optional string tapUrl = 2; +} + message TemplateButton { optional uint32 index = 4; oneof button { @@ -2969,17 +3918,56 @@ message TemplateButton { optional Message.HighlyStructuredMessage displayText = 1; optional Message.HighlyStructuredMessage phoneNumber = 2; } - + message QuickReplyButton { optional Message.HighlyStructuredMessage displayText = 1; optional string id = 2; } - + message URLButton { optional Message.HighlyStructuredMessage displayText = 1; optional Message.HighlyStructuredMessage url = 2; } - + +} + +message UrlTrackingMap { + repeated UrlTrackingMapElement urlTrackingMapElements = 1; + message UrlTrackingMapElement { + optional string originalUrl = 1; + optional string unconsentedUsersUrl = 2; + optional string consentedUsersUrl = 3; + optional uint32 cardIndex = 4; + } + +} + +message UserPassword { + optional Encoding encoding = 1; + optional Transformer transformer = 2; + repeated TransformerArg transformerArg = 3; + optional bytes transformedData = 4; + enum Encoding { + UTF8 = 0; + UTF8_BROKEN = 1; + } + enum Transformer { + NONE = 0; + PBKDF2_HMAC_SHA512 = 1; + PBKDF2_HMAC_SHA384 = 2; + } + message TransformerArg { + optional string key = 1; + optional Value value = 2; + message Value { + oneof value { + bytes asBlob = 1; + uint32 asUnsignedInteger = 2; + } + } + + } + } message UserReceipt { @@ -3002,7 +3990,7 @@ message VerifiedNameCertificate { repeated LocalizedName localizedNames = 8; optional uint64 issueTime = 10; } - + } message WallpaperSettings { @@ -3117,6 +4105,16 @@ message WebMessageInfo { repeated EventResponse eventResponses = 61; optional ReportingTokenInfo reportingTokenInfo = 62; optional uint64 newsletterServerId = 63; + optional EventAdditionalMetadata eventAdditionalMetadata = 64; + optional bool isMentionedInStatus = 65; + repeated string statusMentions = 66; + optional MessageKey targetMessageId = 67; + repeated MessageAddOn messageAddOns = 68; + optional StatusMentionMessage statusMentionMessageInfo = 69; + optional bool isSupportAiMessage = 70; + repeated string statusMentionSources = 71; + repeated Citation supportAiCitations = 72; + optional string botTargetId = 73; enum BizPrivacyStatus { E2EE = 0; FB = 2; @@ -3333,6 +4331,21 @@ message WebMessageInfo { REMINDER_SETUP_MESSAGE = 198; REMINDER_SENT_MESSAGE = 199; REMINDER_CANCEL_MESSAGE = 200; + BIZ_COEX_PRIVACY_INIT = 201; + BIZ_COEX_PRIVACY_TRANSITION = 202; + GROUP_DEACTIVATED = 203; + COMMUNITY_DEACTIVATE_SIBLING_GROUP = 204; + EVENT_UPDATED = 205; + EVENT_CANCELED = 206; + COMMUNITY_OWNER_UPDATED = 207; + COMMUNITY_SUB_GROUP_VISIBILITY_HIDDEN = 208; + CAPI_GROUP_NE2EE_SYSTEM_MESSAGE = 209; + STATUS_MENTION = 210; + USER_CONTROLS_SYSTEM_MESSAGE = 211; + SUPPORT_SYSTEM_MESSAGE = 212; + CHANGE_LID = 213; + BIZ_CUSTOMER_3PD_DATA_SHARING_OPT_IN_MESSAGE = 214; + BIZ_CUSTOMER_3PD_DATA_SHARING_OPT_OUT_MESSAGE = 215; } } diff --git a/WAProto/index.d.ts b/WAProto/index.d.ts index 89bdac6..150b518 100644 --- a/WAProto/index.d.ts +++ b/WAProto/index.d.ts @@ -1,4 +1,5 @@ import * as $protobuf from "protobufjs"; +import Long = require("long"); /** Namespace proto. */ export namespace proto { @@ -31,19 +32,19 @@ export namespace proto { constructor(properties?: proto.IADVDeviceIdentity); /** ADVDeviceIdentity rawId. */ - public rawId: number; + public rawId?: (number|null); /** ADVDeviceIdentity timestamp. */ - public timestamp: (number|Long); + public timestamp?: (number|Long|null); /** ADVDeviceIdentity keyIndex. */ - public keyIndex: number; + public keyIndex?: (number|null); /** ADVDeviceIdentity accountType. */ - public accountType: proto.ADVEncryptionType; + public accountType?: (proto.ADVEncryptionType|null); /** ADVDeviceIdentity deviceType. */ - public deviceType: proto.ADVEncryptionType; + public deviceType?: (proto.ADVEncryptionType|null); /** * Creates a new ADVDeviceIdentity instance using the specified properties. @@ -114,6 +115,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ADVDeviceIdentity + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** ADVEncryptionType enum. */ @@ -151,19 +159,19 @@ export namespace proto { constructor(properties?: proto.IADVKeyIndexList); /** ADVKeyIndexList rawId. */ - public rawId: number; + public rawId?: (number|null); /** ADVKeyIndexList timestamp. */ - public timestamp: (number|Long); + public timestamp?: (number|Long|null); /** ADVKeyIndexList currentIndex. */ - public currentIndex: number; + public currentIndex?: (number|null); /** ADVKeyIndexList validIndexes. */ public validIndexes: number[]; /** ADVKeyIndexList accountType. */ - public accountType: proto.ADVEncryptionType; + public accountType?: (proto.ADVEncryptionType|null); /** * Creates a new ADVKeyIndexList instance using the specified properties. @@ -234,6 +242,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ADVKeyIndexList + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ADVSignedDeviceIdentity. */ @@ -262,16 +277,16 @@ export namespace proto { constructor(properties?: proto.IADVSignedDeviceIdentity); /** ADVSignedDeviceIdentity details. */ - public details: Uint8Array; + public details?: (Uint8Array|null); /** ADVSignedDeviceIdentity accountSignatureKey. */ - public accountSignatureKey: Uint8Array; + public accountSignatureKey?: (Uint8Array|null); /** ADVSignedDeviceIdentity accountSignature. */ - public accountSignature: Uint8Array; + public accountSignature?: (Uint8Array|null); /** ADVSignedDeviceIdentity deviceSignature. */ - public deviceSignature: Uint8Array; + public deviceSignature?: (Uint8Array|null); /** * Creates a new ADVSignedDeviceIdentity instance using the specified properties. @@ -342,6 +357,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ADVSignedDeviceIdentity + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ADVSignedDeviceIdentityHMAC. */ @@ -367,13 +389,13 @@ export namespace proto { constructor(properties?: proto.IADVSignedDeviceIdentityHMAC); /** ADVSignedDeviceIdentityHMAC details. */ - public details: Uint8Array; + public details?: (Uint8Array|null); /** ADVSignedDeviceIdentityHMAC hmac. */ - public hmac: Uint8Array; + public hmac?: (Uint8Array|null); /** ADVSignedDeviceIdentityHMAC accountType. */ - public accountType: proto.ADVEncryptionType; + public accountType?: (proto.ADVEncryptionType|null); /** * Creates a new ADVSignedDeviceIdentityHMAC instance using the specified properties. @@ -444,6 +466,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ADVSignedDeviceIdentityHMAC + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ADVSignedKeyIndexList. */ @@ -469,13 +498,13 @@ export namespace proto { constructor(properties?: proto.IADVSignedKeyIndexList); /** ADVSignedKeyIndexList details. */ - public details: Uint8Array; + public details?: (Uint8Array|null); /** ADVSignedKeyIndexList accountSignature. */ - public accountSignature: Uint8Array; + public accountSignature?: (Uint8Array|null); /** ADVSignedKeyIndexList accountSignatureKey. */ - public accountSignatureKey: Uint8Array; + public accountSignatureKey?: (Uint8Array|null); /** * Creates a new ADVSignedKeyIndexList instance using the specified properties. @@ -546,6 +575,2082 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ADVSignedKeyIndexList + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a AIRichResponseMessage. */ + interface IAIRichResponseMessage { + + /** AIRichResponseMessage messageType */ + messageType?: (proto.AIRichResponseMessage.AIRichResponseMessageType|null); + + /** AIRichResponseMessage submessages */ + submessages?: (proto.AIRichResponseMessage.IAIRichResponseSubMessage[]|null); + + /** AIRichResponseMessage abstractData */ + abstractData?: (proto.AIRichResponseMessage.IAIRichResponseAbstractData|null); + } + + /** Represents a AIRichResponseMessage. */ + class AIRichResponseMessage implements IAIRichResponseMessage { + + /** + * Constructs a new AIRichResponseMessage. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IAIRichResponseMessage); + + /** AIRichResponseMessage messageType. */ + public messageType?: (proto.AIRichResponseMessage.AIRichResponseMessageType|null); + + /** AIRichResponseMessage submessages. */ + public submessages: proto.AIRichResponseMessage.IAIRichResponseSubMessage[]; + + /** AIRichResponseMessage abstractData. */ + public abstractData?: (proto.AIRichResponseMessage.IAIRichResponseAbstractData|null); + + /** + * Creates a new AIRichResponseMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns AIRichResponseMessage instance + */ + public static create(properties?: proto.IAIRichResponseMessage): proto.AIRichResponseMessage; + + /** + * Encodes the specified AIRichResponseMessage message. Does not implicitly {@link proto.AIRichResponseMessage.verify|verify} messages. + * @param message AIRichResponseMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IAIRichResponseMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AIRichResponseMessage message, length delimited. Does not implicitly {@link proto.AIRichResponseMessage.verify|verify} messages. + * @param message AIRichResponseMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IAIRichResponseMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a AIRichResponseMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AIRichResponseMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.AIRichResponseMessage; + + /** + * Decodes a AIRichResponseMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AIRichResponseMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.AIRichResponseMessage; + + /** + * Verifies a AIRichResponseMessage message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a AIRichResponseMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AIRichResponseMessage + */ + public static fromObject(object: { [k: string]: any }): proto.AIRichResponseMessage; + + /** + * Creates a plain object from a AIRichResponseMessage message. Also converts values to other types if specified. + * @param message AIRichResponseMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.AIRichResponseMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AIRichResponseMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AIRichResponseMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AIRichResponseMessage { + + /** Properties of a AIRichResponseAbstractData. */ + interface IAIRichResponseAbstractData { + + /** AIRichResponseAbstractData data */ + data?: (Uint8Array|null); + } + + /** Represents a AIRichResponseAbstractData. */ + class AIRichResponseAbstractData implements IAIRichResponseAbstractData { + + /** + * Constructs a new AIRichResponseAbstractData. + * @param [properties] Properties to set + */ + constructor(properties?: proto.AIRichResponseMessage.IAIRichResponseAbstractData); + + /** AIRichResponseAbstractData data. */ + public data?: (Uint8Array|null); + + /** + * Creates a new AIRichResponseAbstractData instance using the specified properties. + * @param [properties] Properties to set + * @returns AIRichResponseAbstractData instance + */ + public static create(properties?: proto.AIRichResponseMessage.IAIRichResponseAbstractData): proto.AIRichResponseMessage.AIRichResponseAbstractData; + + /** + * Encodes the specified AIRichResponseAbstractData message. Does not implicitly {@link proto.AIRichResponseMessage.AIRichResponseAbstractData.verify|verify} messages. + * @param message AIRichResponseAbstractData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.AIRichResponseMessage.IAIRichResponseAbstractData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AIRichResponseAbstractData message, length delimited. Does not implicitly {@link proto.AIRichResponseMessage.AIRichResponseAbstractData.verify|verify} messages. + * @param message AIRichResponseAbstractData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.AIRichResponseMessage.IAIRichResponseAbstractData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a AIRichResponseAbstractData message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AIRichResponseAbstractData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.AIRichResponseMessage.AIRichResponseAbstractData; + + /** + * Decodes a AIRichResponseAbstractData message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AIRichResponseAbstractData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.AIRichResponseMessage.AIRichResponseAbstractData; + + /** + * Verifies a AIRichResponseAbstractData message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a AIRichResponseAbstractData message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AIRichResponseAbstractData + */ + public static fromObject(object: { [k: string]: any }): proto.AIRichResponseMessage.AIRichResponseAbstractData; + + /** + * Creates a plain object from a AIRichResponseAbstractData message. Also converts values to other types if specified. + * @param message AIRichResponseAbstractData + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.AIRichResponseMessage.AIRichResponseAbstractData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AIRichResponseAbstractData to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AIRichResponseAbstractData + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a AIRichResponseCodeMetadata. */ + interface IAIRichResponseCodeMetadata { + + /** AIRichResponseCodeMetadata codeLanguage */ + codeLanguage?: (string|null); + + /** AIRichResponseCodeMetadata codeBlocks */ + codeBlocks?: (proto.AIRichResponseMessage.AIRichResponseCodeMetadata.IAIRichResponseCodeBlock[]|null); + } + + /** Represents a AIRichResponseCodeMetadata. */ + class AIRichResponseCodeMetadata implements IAIRichResponseCodeMetadata { + + /** + * Constructs a new AIRichResponseCodeMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: proto.AIRichResponseMessage.IAIRichResponseCodeMetadata); + + /** AIRichResponseCodeMetadata codeLanguage. */ + public codeLanguage?: (string|null); + + /** AIRichResponseCodeMetadata codeBlocks. */ + public codeBlocks: proto.AIRichResponseMessage.AIRichResponseCodeMetadata.IAIRichResponseCodeBlock[]; + + /** + * Creates a new AIRichResponseCodeMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns AIRichResponseCodeMetadata instance + */ + public static create(properties?: proto.AIRichResponseMessage.IAIRichResponseCodeMetadata): proto.AIRichResponseMessage.AIRichResponseCodeMetadata; + + /** + * Encodes the specified AIRichResponseCodeMetadata message. Does not implicitly {@link proto.AIRichResponseMessage.AIRichResponseCodeMetadata.verify|verify} messages. + * @param message AIRichResponseCodeMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.AIRichResponseMessage.IAIRichResponseCodeMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AIRichResponseCodeMetadata message, length delimited. Does not implicitly {@link proto.AIRichResponseMessage.AIRichResponseCodeMetadata.verify|verify} messages. + * @param message AIRichResponseCodeMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.AIRichResponseMessage.IAIRichResponseCodeMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a AIRichResponseCodeMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AIRichResponseCodeMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.AIRichResponseMessage.AIRichResponseCodeMetadata; + + /** + * Decodes a AIRichResponseCodeMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AIRichResponseCodeMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.AIRichResponseMessage.AIRichResponseCodeMetadata; + + /** + * Verifies a AIRichResponseCodeMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a AIRichResponseCodeMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AIRichResponseCodeMetadata + */ + public static fromObject(object: { [k: string]: any }): proto.AIRichResponseMessage.AIRichResponseCodeMetadata; + + /** + * Creates a plain object from a AIRichResponseCodeMetadata message. Also converts values to other types if specified. + * @param message AIRichResponseCodeMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.AIRichResponseMessage.AIRichResponseCodeMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AIRichResponseCodeMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AIRichResponseCodeMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AIRichResponseCodeMetadata { + + /** Properties of a AIRichResponseCodeBlock. */ + interface IAIRichResponseCodeBlock { + + /** AIRichResponseCodeBlock highlightType */ + highlightType?: (proto.AIRichResponseMessage.AIRichResponseCodeMetadata.AIRichResponseCodeHighlightType|null); + + /** AIRichResponseCodeBlock codeContent */ + codeContent?: (string|null); + } + + /** Represents a AIRichResponseCodeBlock. */ + class AIRichResponseCodeBlock implements IAIRichResponseCodeBlock { + + /** + * Constructs a new AIRichResponseCodeBlock. + * @param [properties] Properties to set + */ + constructor(properties?: proto.AIRichResponseMessage.AIRichResponseCodeMetadata.IAIRichResponseCodeBlock); + + /** AIRichResponseCodeBlock highlightType. */ + public highlightType?: (proto.AIRichResponseMessage.AIRichResponseCodeMetadata.AIRichResponseCodeHighlightType|null); + + /** AIRichResponseCodeBlock codeContent. */ + public codeContent?: (string|null); + + /** + * Creates a new AIRichResponseCodeBlock instance using the specified properties. + * @param [properties] Properties to set + * @returns AIRichResponseCodeBlock instance + */ + public static create(properties?: proto.AIRichResponseMessage.AIRichResponseCodeMetadata.IAIRichResponseCodeBlock): proto.AIRichResponseMessage.AIRichResponseCodeMetadata.AIRichResponseCodeBlock; + + /** + * Encodes the specified AIRichResponseCodeBlock message. Does not implicitly {@link proto.AIRichResponseMessage.AIRichResponseCodeMetadata.AIRichResponseCodeBlock.verify|verify} messages. + * @param message AIRichResponseCodeBlock message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.AIRichResponseMessage.AIRichResponseCodeMetadata.IAIRichResponseCodeBlock, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AIRichResponseCodeBlock message, length delimited. Does not implicitly {@link proto.AIRichResponseMessage.AIRichResponseCodeMetadata.AIRichResponseCodeBlock.verify|verify} messages. + * @param message AIRichResponseCodeBlock message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.AIRichResponseMessage.AIRichResponseCodeMetadata.IAIRichResponseCodeBlock, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a AIRichResponseCodeBlock message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AIRichResponseCodeBlock + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.AIRichResponseMessage.AIRichResponseCodeMetadata.AIRichResponseCodeBlock; + + /** + * Decodes a AIRichResponseCodeBlock message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AIRichResponseCodeBlock + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.AIRichResponseMessage.AIRichResponseCodeMetadata.AIRichResponseCodeBlock; + + /** + * Verifies a AIRichResponseCodeBlock message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a AIRichResponseCodeBlock message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AIRichResponseCodeBlock + */ + public static fromObject(object: { [k: string]: any }): proto.AIRichResponseMessage.AIRichResponseCodeMetadata.AIRichResponseCodeBlock; + + /** + * Creates a plain object from a AIRichResponseCodeBlock message. Also converts values to other types if specified. + * @param message AIRichResponseCodeBlock + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.AIRichResponseMessage.AIRichResponseCodeMetadata.AIRichResponseCodeBlock, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AIRichResponseCodeBlock to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AIRichResponseCodeBlock + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** AIRichResponseCodeHighlightType enum. */ + enum AIRichResponseCodeHighlightType { + AI_RICH_RESPONSE_CODE_HIGHLIGHT_DEFAULT = 0, + AI_RICH_RESPONSE_CODE_HIGHLIGHT_KEYWORD = 1, + AI_RICH_RESPONSE_CODE_HIGHLIGHT_METHOD = 2, + AI_RICH_RESPONSE_CODE_HIGHLIGHT_STRING = 3, + AI_RICH_RESPONSE_CODE_HIGHLIGHT_NUMBER = 4, + AI_RICH_RESPONSE_CODE_HIGHLIGHT_COMMENT = 5 + } + } + + /** Properties of a AIRichResponseContentItemsMetadata. */ + interface IAIRichResponseContentItemsMetadata { + + /** AIRichResponseContentItemsMetadata itemsMetadata */ + itemsMetadata?: (proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.IAIRichResponseContentItemMetadata[]|null); + + /** AIRichResponseContentItemsMetadata contentType */ + contentType?: (proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.ContentType|null); + } + + /** Represents a AIRichResponseContentItemsMetadata. */ + class AIRichResponseContentItemsMetadata implements IAIRichResponseContentItemsMetadata { + + /** + * Constructs a new AIRichResponseContentItemsMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: proto.AIRichResponseMessage.IAIRichResponseContentItemsMetadata); + + /** AIRichResponseContentItemsMetadata itemsMetadata. */ + public itemsMetadata: proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.IAIRichResponseContentItemMetadata[]; + + /** AIRichResponseContentItemsMetadata contentType. */ + public contentType?: (proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.ContentType|null); + + /** + * Creates a new AIRichResponseContentItemsMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns AIRichResponseContentItemsMetadata instance + */ + public static create(properties?: proto.AIRichResponseMessage.IAIRichResponseContentItemsMetadata): proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata; + + /** + * Encodes the specified AIRichResponseContentItemsMetadata message. Does not implicitly {@link proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.verify|verify} messages. + * @param message AIRichResponseContentItemsMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.AIRichResponseMessage.IAIRichResponseContentItemsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AIRichResponseContentItemsMetadata message, length delimited. Does not implicitly {@link proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.verify|verify} messages. + * @param message AIRichResponseContentItemsMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.AIRichResponseMessage.IAIRichResponseContentItemsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a AIRichResponseContentItemsMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AIRichResponseContentItemsMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata; + + /** + * Decodes a AIRichResponseContentItemsMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AIRichResponseContentItemsMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata; + + /** + * Verifies a AIRichResponseContentItemsMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a AIRichResponseContentItemsMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AIRichResponseContentItemsMetadata + */ + public static fromObject(object: { [k: string]: any }): proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata; + + /** + * Creates a plain object from a AIRichResponseContentItemsMetadata message. Also converts values to other types if specified. + * @param message AIRichResponseContentItemsMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AIRichResponseContentItemsMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AIRichResponseContentItemsMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AIRichResponseContentItemsMetadata { + + /** Properties of a AIRichResponseContentItemMetadata. */ + interface IAIRichResponseContentItemMetadata { + + /** AIRichResponseContentItemMetadata reelItem */ + reelItem?: (proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.IAIRichResponseReelItem|null); + } + + /** Represents a AIRichResponseContentItemMetadata. */ + class AIRichResponseContentItemMetadata implements IAIRichResponseContentItemMetadata { + + /** + * Constructs a new AIRichResponseContentItemMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.IAIRichResponseContentItemMetadata); + + /** AIRichResponseContentItemMetadata reelItem. */ + public reelItem?: (proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.IAIRichResponseReelItem|null); + + /** AIRichResponseContentItemMetadata aIRichResponseContentItem. */ + public aIRichResponseContentItem?: "reelItem"; + + /** + * Creates a new AIRichResponseContentItemMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns AIRichResponseContentItemMetadata instance + */ + public static create(properties?: proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.IAIRichResponseContentItemMetadata): proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata; + + /** + * Encodes the specified AIRichResponseContentItemMetadata message. Does not implicitly {@link proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata.verify|verify} messages. + * @param message AIRichResponseContentItemMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.IAIRichResponseContentItemMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AIRichResponseContentItemMetadata message, length delimited. Does not implicitly {@link proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata.verify|verify} messages. + * @param message AIRichResponseContentItemMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.IAIRichResponseContentItemMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a AIRichResponseContentItemMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AIRichResponseContentItemMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata; + + /** + * Decodes a AIRichResponseContentItemMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AIRichResponseContentItemMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata; + + /** + * Verifies a AIRichResponseContentItemMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a AIRichResponseContentItemMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AIRichResponseContentItemMetadata + */ + public static fromObject(object: { [k: string]: any }): proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata; + + /** + * Creates a plain object from a AIRichResponseContentItemMetadata message. Also converts values to other types if specified. + * @param message AIRichResponseContentItemMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AIRichResponseContentItemMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AIRichResponseContentItemMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a AIRichResponseReelItem. */ + interface IAIRichResponseReelItem { + + /** AIRichResponseReelItem title */ + title?: (string|null); + + /** AIRichResponseReelItem profileIconUrl */ + profileIconUrl?: (string|null); + + /** AIRichResponseReelItem thumbnailUrl */ + thumbnailUrl?: (string|null); + + /** AIRichResponseReelItem videoUrl */ + videoUrl?: (string|null); + } + + /** Represents a AIRichResponseReelItem. */ + class AIRichResponseReelItem implements IAIRichResponseReelItem { + + /** + * Constructs a new AIRichResponseReelItem. + * @param [properties] Properties to set + */ + constructor(properties?: proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.IAIRichResponseReelItem); + + /** AIRichResponseReelItem title. */ + public title?: (string|null); + + /** AIRichResponseReelItem profileIconUrl. */ + public profileIconUrl?: (string|null); + + /** AIRichResponseReelItem thumbnailUrl. */ + public thumbnailUrl?: (string|null); + + /** AIRichResponseReelItem videoUrl. */ + public videoUrl?: (string|null); + + /** + * Creates a new AIRichResponseReelItem instance using the specified properties. + * @param [properties] Properties to set + * @returns AIRichResponseReelItem instance + */ + public static create(properties?: proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.IAIRichResponseReelItem): proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseReelItem; + + /** + * Encodes the specified AIRichResponseReelItem message. Does not implicitly {@link proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseReelItem.verify|verify} messages. + * @param message AIRichResponseReelItem message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.IAIRichResponseReelItem, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AIRichResponseReelItem message, length delimited. Does not implicitly {@link proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseReelItem.verify|verify} messages. + * @param message AIRichResponseReelItem message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.IAIRichResponseReelItem, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a AIRichResponseReelItem message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AIRichResponseReelItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseReelItem; + + /** + * Decodes a AIRichResponseReelItem message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AIRichResponseReelItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseReelItem; + + /** + * Verifies a AIRichResponseReelItem message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a AIRichResponseReelItem message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AIRichResponseReelItem + */ + public static fromObject(object: { [k: string]: any }): proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseReelItem; + + /** + * Creates a plain object from a AIRichResponseReelItem message. Also converts values to other types if specified. + * @param message AIRichResponseReelItem + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseReelItem, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AIRichResponseReelItem to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AIRichResponseReelItem + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** ContentType enum. */ + enum ContentType { + DEFAULT = 0, + CAROUSEL = 1 + } + } + + /** Properties of a AIRichResponseDynamicMetadata. */ + interface IAIRichResponseDynamicMetadata { + + /** AIRichResponseDynamicMetadata type */ + type?: (proto.AIRichResponseMessage.AIRichResponseDynamicMetadata.AIRichResponseDynamicMetadataType|null); + + /** AIRichResponseDynamicMetadata version */ + version?: (number|Long|null); + + /** AIRichResponseDynamicMetadata url */ + url?: (string|null); + + /** AIRichResponseDynamicMetadata loopCount */ + loopCount?: (number|null); + } + + /** Represents a AIRichResponseDynamicMetadata. */ + class AIRichResponseDynamicMetadata implements IAIRichResponseDynamicMetadata { + + /** + * Constructs a new AIRichResponseDynamicMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: proto.AIRichResponseMessage.IAIRichResponseDynamicMetadata); + + /** AIRichResponseDynamicMetadata type. */ + public type?: (proto.AIRichResponseMessage.AIRichResponseDynamicMetadata.AIRichResponseDynamicMetadataType|null); + + /** AIRichResponseDynamicMetadata version. */ + public version?: (number|Long|null); + + /** AIRichResponseDynamicMetadata url. */ + public url?: (string|null); + + /** AIRichResponseDynamicMetadata loopCount. */ + public loopCount?: (number|null); + + /** + * Creates a new AIRichResponseDynamicMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns AIRichResponseDynamicMetadata instance + */ + public static create(properties?: proto.AIRichResponseMessage.IAIRichResponseDynamicMetadata): proto.AIRichResponseMessage.AIRichResponseDynamicMetadata; + + /** + * Encodes the specified AIRichResponseDynamicMetadata message. Does not implicitly {@link proto.AIRichResponseMessage.AIRichResponseDynamicMetadata.verify|verify} messages. + * @param message AIRichResponseDynamicMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.AIRichResponseMessage.IAIRichResponseDynamicMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AIRichResponseDynamicMetadata message, length delimited. Does not implicitly {@link proto.AIRichResponseMessage.AIRichResponseDynamicMetadata.verify|verify} messages. + * @param message AIRichResponseDynamicMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.AIRichResponseMessage.IAIRichResponseDynamicMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a AIRichResponseDynamicMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AIRichResponseDynamicMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.AIRichResponseMessage.AIRichResponseDynamicMetadata; + + /** + * Decodes a AIRichResponseDynamicMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AIRichResponseDynamicMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.AIRichResponseMessage.AIRichResponseDynamicMetadata; + + /** + * Verifies a AIRichResponseDynamicMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a AIRichResponseDynamicMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AIRichResponseDynamicMetadata + */ + public static fromObject(object: { [k: string]: any }): proto.AIRichResponseMessage.AIRichResponseDynamicMetadata; + + /** + * Creates a plain object from a AIRichResponseDynamicMetadata message. Also converts values to other types if specified. + * @param message AIRichResponseDynamicMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.AIRichResponseMessage.AIRichResponseDynamicMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AIRichResponseDynamicMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AIRichResponseDynamicMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AIRichResponseDynamicMetadata { + + /** AIRichResponseDynamicMetadataType enum. */ + enum AIRichResponseDynamicMetadataType { + AI_RICH_RESPONSE_DYNAMIC_METADATA_TYPE_UNKNOWN = 0, + AI_RICH_RESPONSE_DYNAMIC_METADATA_TYPE_IMAGE = 1, + AI_RICH_RESPONSE_DYNAMIC_METADATA_TYPE_GIF = 2 + } + } + + /** Properties of a AIRichResponseGridImageMetadata. */ + interface IAIRichResponseGridImageMetadata { + + /** AIRichResponseGridImageMetadata gridImageUrl */ + gridImageUrl?: (proto.AIRichResponseMessage.IAIRichResponseImageURL|null); + + /** AIRichResponseGridImageMetadata imageUrls */ + imageUrls?: (proto.AIRichResponseMessage.IAIRichResponseImageURL[]|null); + } + + /** Represents a AIRichResponseGridImageMetadata. */ + class AIRichResponseGridImageMetadata implements IAIRichResponseGridImageMetadata { + + /** + * Constructs a new AIRichResponseGridImageMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: proto.AIRichResponseMessage.IAIRichResponseGridImageMetadata); + + /** AIRichResponseGridImageMetadata gridImageUrl. */ + public gridImageUrl?: (proto.AIRichResponseMessage.IAIRichResponseImageURL|null); + + /** AIRichResponseGridImageMetadata imageUrls. */ + public imageUrls: proto.AIRichResponseMessage.IAIRichResponseImageURL[]; + + /** + * Creates a new AIRichResponseGridImageMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns AIRichResponseGridImageMetadata instance + */ + public static create(properties?: proto.AIRichResponseMessage.IAIRichResponseGridImageMetadata): proto.AIRichResponseMessage.AIRichResponseGridImageMetadata; + + /** + * Encodes the specified AIRichResponseGridImageMetadata message. Does not implicitly {@link proto.AIRichResponseMessage.AIRichResponseGridImageMetadata.verify|verify} messages. + * @param message AIRichResponseGridImageMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.AIRichResponseMessage.IAIRichResponseGridImageMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AIRichResponseGridImageMetadata message, length delimited. Does not implicitly {@link proto.AIRichResponseMessage.AIRichResponseGridImageMetadata.verify|verify} messages. + * @param message AIRichResponseGridImageMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.AIRichResponseMessage.IAIRichResponseGridImageMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a AIRichResponseGridImageMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AIRichResponseGridImageMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.AIRichResponseMessage.AIRichResponseGridImageMetadata; + + /** + * Decodes a AIRichResponseGridImageMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AIRichResponseGridImageMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.AIRichResponseMessage.AIRichResponseGridImageMetadata; + + /** + * Verifies a AIRichResponseGridImageMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a AIRichResponseGridImageMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AIRichResponseGridImageMetadata + */ + public static fromObject(object: { [k: string]: any }): proto.AIRichResponseMessage.AIRichResponseGridImageMetadata; + + /** + * Creates a plain object from a AIRichResponseGridImageMetadata message. Also converts values to other types if specified. + * @param message AIRichResponseGridImageMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.AIRichResponseMessage.AIRichResponseGridImageMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AIRichResponseGridImageMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AIRichResponseGridImageMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a AIRichResponseImageURL. */ + interface IAIRichResponseImageURL { + + /** AIRichResponseImageURL imagePreviewUrl */ + imagePreviewUrl?: (string|null); + + /** AIRichResponseImageURL imageHighResUrl */ + imageHighResUrl?: (string|null); + + /** AIRichResponseImageURL sourceUrl */ + sourceUrl?: (string|null); + } + + /** Represents a AIRichResponseImageURL. */ + class AIRichResponseImageURL implements IAIRichResponseImageURL { + + /** + * Constructs a new AIRichResponseImageURL. + * @param [properties] Properties to set + */ + constructor(properties?: proto.AIRichResponseMessage.IAIRichResponseImageURL); + + /** AIRichResponseImageURL imagePreviewUrl. */ + public imagePreviewUrl?: (string|null); + + /** AIRichResponseImageURL imageHighResUrl. */ + public imageHighResUrl?: (string|null); + + /** AIRichResponseImageURL sourceUrl. */ + public sourceUrl?: (string|null); + + /** + * Creates a new AIRichResponseImageURL instance using the specified properties. + * @param [properties] Properties to set + * @returns AIRichResponseImageURL instance + */ + public static create(properties?: proto.AIRichResponseMessage.IAIRichResponseImageURL): proto.AIRichResponseMessage.AIRichResponseImageURL; + + /** + * Encodes the specified AIRichResponseImageURL message. Does not implicitly {@link proto.AIRichResponseMessage.AIRichResponseImageURL.verify|verify} messages. + * @param message AIRichResponseImageURL message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.AIRichResponseMessage.IAIRichResponseImageURL, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AIRichResponseImageURL message, length delimited. Does not implicitly {@link proto.AIRichResponseMessage.AIRichResponseImageURL.verify|verify} messages. + * @param message AIRichResponseImageURL message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.AIRichResponseMessage.IAIRichResponseImageURL, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a AIRichResponseImageURL message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AIRichResponseImageURL + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.AIRichResponseMessage.AIRichResponseImageURL; + + /** + * Decodes a AIRichResponseImageURL message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AIRichResponseImageURL + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.AIRichResponseMessage.AIRichResponseImageURL; + + /** + * Verifies a AIRichResponseImageURL message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a AIRichResponseImageURL message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AIRichResponseImageURL + */ + public static fromObject(object: { [k: string]: any }): proto.AIRichResponseMessage.AIRichResponseImageURL; + + /** + * Creates a plain object from a AIRichResponseImageURL message. Also converts values to other types if specified. + * @param message AIRichResponseImageURL + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.AIRichResponseMessage.AIRichResponseImageURL, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AIRichResponseImageURL to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AIRichResponseImageURL + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a AIRichResponseInlineImageMetadata. */ + interface IAIRichResponseInlineImageMetadata { + + /** AIRichResponseInlineImageMetadata imageUrl */ + imageUrl?: (proto.AIRichResponseMessage.IAIRichResponseImageURL|null); + + /** AIRichResponseInlineImageMetadata imageText */ + imageText?: (string|null); + + /** AIRichResponseInlineImageMetadata alignment */ + alignment?: (proto.AIRichResponseMessage.AIRichResponseInlineImageMetadata.AIRichResponseImageAlignment|null); + + /** AIRichResponseInlineImageMetadata tapLinkUrl */ + tapLinkUrl?: (string|null); + } + + /** Represents a AIRichResponseInlineImageMetadata. */ + class AIRichResponseInlineImageMetadata implements IAIRichResponseInlineImageMetadata { + + /** + * Constructs a new AIRichResponseInlineImageMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: proto.AIRichResponseMessage.IAIRichResponseInlineImageMetadata); + + /** AIRichResponseInlineImageMetadata imageUrl. */ + public imageUrl?: (proto.AIRichResponseMessage.IAIRichResponseImageURL|null); + + /** AIRichResponseInlineImageMetadata imageText. */ + public imageText?: (string|null); + + /** AIRichResponseInlineImageMetadata alignment. */ + public alignment?: (proto.AIRichResponseMessage.AIRichResponseInlineImageMetadata.AIRichResponseImageAlignment|null); + + /** AIRichResponseInlineImageMetadata tapLinkUrl. */ + public tapLinkUrl?: (string|null); + + /** + * Creates a new AIRichResponseInlineImageMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns AIRichResponseInlineImageMetadata instance + */ + public static create(properties?: proto.AIRichResponseMessage.IAIRichResponseInlineImageMetadata): proto.AIRichResponseMessage.AIRichResponseInlineImageMetadata; + + /** + * Encodes the specified AIRichResponseInlineImageMetadata message. Does not implicitly {@link proto.AIRichResponseMessage.AIRichResponseInlineImageMetadata.verify|verify} messages. + * @param message AIRichResponseInlineImageMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.AIRichResponseMessage.IAIRichResponseInlineImageMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AIRichResponseInlineImageMetadata message, length delimited. Does not implicitly {@link proto.AIRichResponseMessage.AIRichResponseInlineImageMetadata.verify|verify} messages. + * @param message AIRichResponseInlineImageMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.AIRichResponseMessage.IAIRichResponseInlineImageMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a AIRichResponseInlineImageMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AIRichResponseInlineImageMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.AIRichResponseMessage.AIRichResponseInlineImageMetadata; + + /** + * Decodes a AIRichResponseInlineImageMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AIRichResponseInlineImageMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.AIRichResponseMessage.AIRichResponseInlineImageMetadata; + + /** + * Verifies a AIRichResponseInlineImageMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a AIRichResponseInlineImageMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AIRichResponseInlineImageMetadata + */ + public static fromObject(object: { [k: string]: any }): proto.AIRichResponseMessage.AIRichResponseInlineImageMetadata; + + /** + * Creates a plain object from a AIRichResponseInlineImageMetadata message. Also converts values to other types if specified. + * @param message AIRichResponseInlineImageMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.AIRichResponseMessage.AIRichResponseInlineImageMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AIRichResponseInlineImageMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AIRichResponseInlineImageMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AIRichResponseInlineImageMetadata { + + /** AIRichResponseImageAlignment enum. */ + enum AIRichResponseImageAlignment { + AI_RICH_RESPONSE_IMAGE_LAYOUT_LEADING_ALIGNED = 0, + AI_RICH_RESPONSE_IMAGE_LAYOUT_TRAILING_ALIGNED = 1, + AI_RICH_RESPONSE_IMAGE_LAYOUT_CENTER_ALIGNED = 2 + } + } + + /** Properties of a AIRichResponseLatexMetadata. */ + interface IAIRichResponseLatexMetadata { + + /** AIRichResponseLatexMetadata text */ + text?: (string|null); + + /** AIRichResponseLatexMetadata expressions */ + expressions?: (proto.AIRichResponseMessage.AIRichResponseLatexMetadata.IAIRichResponseLatexExpression[]|null); + } + + /** Represents a AIRichResponseLatexMetadata. */ + class AIRichResponseLatexMetadata implements IAIRichResponseLatexMetadata { + + /** + * Constructs a new AIRichResponseLatexMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: proto.AIRichResponseMessage.IAIRichResponseLatexMetadata); + + /** AIRichResponseLatexMetadata text. */ + public text?: (string|null); + + /** AIRichResponseLatexMetadata expressions. */ + public expressions: proto.AIRichResponseMessage.AIRichResponseLatexMetadata.IAIRichResponseLatexExpression[]; + + /** + * Creates a new AIRichResponseLatexMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns AIRichResponseLatexMetadata instance + */ + public static create(properties?: proto.AIRichResponseMessage.IAIRichResponseLatexMetadata): proto.AIRichResponseMessage.AIRichResponseLatexMetadata; + + /** + * Encodes the specified AIRichResponseLatexMetadata message. Does not implicitly {@link proto.AIRichResponseMessage.AIRichResponseLatexMetadata.verify|verify} messages. + * @param message AIRichResponseLatexMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.AIRichResponseMessage.IAIRichResponseLatexMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AIRichResponseLatexMetadata message, length delimited. Does not implicitly {@link proto.AIRichResponseMessage.AIRichResponseLatexMetadata.verify|verify} messages. + * @param message AIRichResponseLatexMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.AIRichResponseMessage.IAIRichResponseLatexMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a AIRichResponseLatexMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AIRichResponseLatexMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.AIRichResponseMessage.AIRichResponseLatexMetadata; + + /** + * Decodes a AIRichResponseLatexMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AIRichResponseLatexMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.AIRichResponseMessage.AIRichResponseLatexMetadata; + + /** + * Verifies a AIRichResponseLatexMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a AIRichResponseLatexMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AIRichResponseLatexMetadata + */ + public static fromObject(object: { [k: string]: any }): proto.AIRichResponseMessage.AIRichResponseLatexMetadata; + + /** + * Creates a plain object from a AIRichResponseLatexMetadata message. Also converts values to other types if specified. + * @param message AIRichResponseLatexMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.AIRichResponseMessage.AIRichResponseLatexMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AIRichResponseLatexMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AIRichResponseLatexMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AIRichResponseLatexMetadata { + + /** Properties of a AIRichResponseLatexExpression. */ + interface IAIRichResponseLatexExpression { + + /** AIRichResponseLatexExpression latexExpression */ + latexExpression?: (string|null); + + /** AIRichResponseLatexExpression url */ + url?: (string|null); + + /** AIRichResponseLatexExpression width */ + width?: (number|null); + + /** AIRichResponseLatexExpression height */ + height?: (number|null); + + /** AIRichResponseLatexExpression fontHeight */ + fontHeight?: (number|null); + } + + /** Represents a AIRichResponseLatexExpression. */ + class AIRichResponseLatexExpression implements IAIRichResponseLatexExpression { + + /** + * Constructs a new AIRichResponseLatexExpression. + * @param [properties] Properties to set + */ + constructor(properties?: proto.AIRichResponseMessage.AIRichResponseLatexMetadata.IAIRichResponseLatexExpression); + + /** AIRichResponseLatexExpression latexExpression. */ + public latexExpression?: (string|null); + + /** AIRichResponseLatexExpression url. */ + public url?: (string|null); + + /** AIRichResponseLatexExpression width. */ + public width?: (number|null); + + /** AIRichResponseLatexExpression height. */ + public height?: (number|null); + + /** AIRichResponseLatexExpression fontHeight. */ + public fontHeight?: (number|null); + + /** + * Creates a new AIRichResponseLatexExpression instance using the specified properties. + * @param [properties] Properties to set + * @returns AIRichResponseLatexExpression instance + */ + public static create(properties?: proto.AIRichResponseMessage.AIRichResponseLatexMetadata.IAIRichResponseLatexExpression): proto.AIRichResponseMessage.AIRichResponseLatexMetadata.AIRichResponseLatexExpression; + + /** + * Encodes the specified AIRichResponseLatexExpression message. Does not implicitly {@link proto.AIRichResponseMessage.AIRichResponseLatexMetadata.AIRichResponseLatexExpression.verify|verify} messages. + * @param message AIRichResponseLatexExpression message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.AIRichResponseMessage.AIRichResponseLatexMetadata.IAIRichResponseLatexExpression, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AIRichResponseLatexExpression message, length delimited. Does not implicitly {@link proto.AIRichResponseMessage.AIRichResponseLatexMetadata.AIRichResponseLatexExpression.verify|verify} messages. + * @param message AIRichResponseLatexExpression message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.AIRichResponseMessage.AIRichResponseLatexMetadata.IAIRichResponseLatexExpression, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a AIRichResponseLatexExpression message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AIRichResponseLatexExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.AIRichResponseMessage.AIRichResponseLatexMetadata.AIRichResponseLatexExpression; + + /** + * Decodes a AIRichResponseLatexExpression message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AIRichResponseLatexExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.AIRichResponseMessage.AIRichResponseLatexMetadata.AIRichResponseLatexExpression; + + /** + * Verifies a AIRichResponseLatexExpression message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a AIRichResponseLatexExpression message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AIRichResponseLatexExpression + */ + public static fromObject(object: { [k: string]: any }): proto.AIRichResponseMessage.AIRichResponseLatexMetadata.AIRichResponseLatexExpression; + + /** + * Creates a plain object from a AIRichResponseLatexExpression message. Also converts values to other types if specified. + * @param message AIRichResponseLatexExpression + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.AIRichResponseMessage.AIRichResponseLatexMetadata.AIRichResponseLatexExpression, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AIRichResponseLatexExpression to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AIRichResponseLatexExpression + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a AIRichResponseMapMetadata. */ + interface IAIRichResponseMapMetadata { + + /** AIRichResponseMapMetadata centerLatitude */ + centerLatitude?: (number|null); + + /** AIRichResponseMapMetadata centerLongitude */ + centerLongitude?: (number|null); + + /** AIRichResponseMapMetadata latitudeDelta */ + latitudeDelta?: (number|null); + + /** AIRichResponseMapMetadata longitudeDelta */ + longitudeDelta?: (number|null); + + /** AIRichResponseMapMetadata annotations */ + annotations?: (proto.AIRichResponseMessage.AIRichResponseMapMetadata.IAIRichResponseMapAnnotation[]|null); + + /** AIRichResponseMapMetadata showInfoList */ + showInfoList?: (boolean|null); + } + + /** Represents a AIRichResponseMapMetadata. */ + class AIRichResponseMapMetadata implements IAIRichResponseMapMetadata { + + /** + * Constructs a new AIRichResponseMapMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: proto.AIRichResponseMessage.IAIRichResponseMapMetadata); + + /** AIRichResponseMapMetadata centerLatitude. */ + public centerLatitude?: (number|null); + + /** AIRichResponseMapMetadata centerLongitude. */ + public centerLongitude?: (number|null); + + /** AIRichResponseMapMetadata latitudeDelta. */ + public latitudeDelta?: (number|null); + + /** AIRichResponseMapMetadata longitudeDelta. */ + public longitudeDelta?: (number|null); + + /** AIRichResponseMapMetadata annotations. */ + public annotations: proto.AIRichResponseMessage.AIRichResponseMapMetadata.IAIRichResponseMapAnnotation[]; + + /** AIRichResponseMapMetadata showInfoList. */ + public showInfoList?: (boolean|null); + + /** + * Creates a new AIRichResponseMapMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns AIRichResponseMapMetadata instance + */ + public static create(properties?: proto.AIRichResponseMessage.IAIRichResponseMapMetadata): proto.AIRichResponseMessage.AIRichResponseMapMetadata; + + /** + * Encodes the specified AIRichResponseMapMetadata message. Does not implicitly {@link proto.AIRichResponseMessage.AIRichResponseMapMetadata.verify|verify} messages. + * @param message AIRichResponseMapMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.AIRichResponseMessage.IAIRichResponseMapMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AIRichResponseMapMetadata message, length delimited. Does not implicitly {@link proto.AIRichResponseMessage.AIRichResponseMapMetadata.verify|verify} messages. + * @param message AIRichResponseMapMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.AIRichResponseMessage.IAIRichResponseMapMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a AIRichResponseMapMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AIRichResponseMapMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.AIRichResponseMessage.AIRichResponseMapMetadata; + + /** + * Decodes a AIRichResponseMapMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AIRichResponseMapMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.AIRichResponseMessage.AIRichResponseMapMetadata; + + /** + * Verifies a AIRichResponseMapMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a AIRichResponseMapMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AIRichResponseMapMetadata + */ + public static fromObject(object: { [k: string]: any }): proto.AIRichResponseMessage.AIRichResponseMapMetadata; + + /** + * Creates a plain object from a AIRichResponseMapMetadata message. Also converts values to other types if specified. + * @param message AIRichResponseMapMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.AIRichResponseMessage.AIRichResponseMapMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AIRichResponseMapMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AIRichResponseMapMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AIRichResponseMapMetadata { + + /** Properties of a AIRichResponseMapAnnotation. */ + interface IAIRichResponseMapAnnotation { + + /** AIRichResponseMapAnnotation annotationNumber */ + annotationNumber?: (number|null); + + /** AIRichResponseMapAnnotation latitude */ + latitude?: (number|null); + + /** AIRichResponseMapAnnotation longitude */ + longitude?: (number|null); + + /** AIRichResponseMapAnnotation title */ + title?: (string|null); + + /** AIRichResponseMapAnnotation body */ + body?: (string|null); + } + + /** Represents a AIRichResponseMapAnnotation. */ + class AIRichResponseMapAnnotation implements IAIRichResponseMapAnnotation { + + /** + * Constructs a new AIRichResponseMapAnnotation. + * @param [properties] Properties to set + */ + constructor(properties?: proto.AIRichResponseMessage.AIRichResponseMapMetadata.IAIRichResponseMapAnnotation); + + /** AIRichResponseMapAnnotation annotationNumber. */ + public annotationNumber?: (number|null); + + /** AIRichResponseMapAnnotation latitude. */ + public latitude?: (number|null); + + /** AIRichResponseMapAnnotation longitude. */ + public longitude?: (number|null); + + /** AIRichResponseMapAnnotation title. */ + public title?: (string|null); + + /** AIRichResponseMapAnnotation body. */ + public body?: (string|null); + + /** + * Creates a new AIRichResponseMapAnnotation instance using the specified properties. + * @param [properties] Properties to set + * @returns AIRichResponseMapAnnotation instance + */ + public static create(properties?: proto.AIRichResponseMessage.AIRichResponseMapMetadata.IAIRichResponseMapAnnotation): proto.AIRichResponseMessage.AIRichResponseMapMetadata.AIRichResponseMapAnnotation; + + /** + * Encodes the specified AIRichResponseMapAnnotation message. Does not implicitly {@link proto.AIRichResponseMessage.AIRichResponseMapMetadata.AIRichResponseMapAnnotation.verify|verify} messages. + * @param message AIRichResponseMapAnnotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.AIRichResponseMessage.AIRichResponseMapMetadata.IAIRichResponseMapAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AIRichResponseMapAnnotation message, length delimited. Does not implicitly {@link proto.AIRichResponseMessage.AIRichResponseMapMetadata.AIRichResponseMapAnnotation.verify|verify} messages. + * @param message AIRichResponseMapAnnotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.AIRichResponseMessage.AIRichResponseMapMetadata.IAIRichResponseMapAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a AIRichResponseMapAnnotation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AIRichResponseMapAnnotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.AIRichResponseMessage.AIRichResponseMapMetadata.AIRichResponseMapAnnotation; + + /** + * Decodes a AIRichResponseMapAnnotation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AIRichResponseMapAnnotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.AIRichResponseMessage.AIRichResponseMapMetadata.AIRichResponseMapAnnotation; + + /** + * Verifies a AIRichResponseMapAnnotation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a AIRichResponseMapAnnotation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AIRichResponseMapAnnotation + */ + public static fromObject(object: { [k: string]: any }): proto.AIRichResponseMessage.AIRichResponseMapMetadata.AIRichResponseMapAnnotation; + + /** + * Creates a plain object from a AIRichResponseMapAnnotation message. Also converts values to other types if specified. + * @param message AIRichResponseMapAnnotation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.AIRichResponseMessage.AIRichResponseMapMetadata.AIRichResponseMapAnnotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AIRichResponseMapAnnotation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AIRichResponseMapAnnotation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** AIRichResponseMessageType enum. */ + enum AIRichResponseMessageType { + AI_RICH_RESPONSE_TYPE_UNKNOWN = 0, + AI_RICH_RESPONSE_TYPE_STANDARD = 1 + } + + /** Properties of a AIRichResponseSubMessage. */ + interface IAIRichResponseSubMessage { + + /** AIRichResponseSubMessage messageType */ + messageType?: (proto.AIRichResponseMessage.AIRichResponseSubMessageType|null); + + /** AIRichResponseSubMessage gridImageMetadata */ + gridImageMetadata?: (proto.AIRichResponseMessage.IAIRichResponseGridImageMetadata|null); + + /** AIRichResponseSubMessage messageText */ + messageText?: (string|null); + + /** AIRichResponseSubMessage imageMetadata */ + imageMetadata?: (proto.AIRichResponseMessage.IAIRichResponseInlineImageMetadata|null); + + /** AIRichResponseSubMessage codeMetadata */ + codeMetadata?: (proto.AIRichResponseMessage.IAIRichResponseCodeMetadata|null); + + /** AIRichResponseSubMessage tableMetadata */ + tableMetadata?: (proto.AIRichResponseMessage.IAIRichResponseTableMetadata|null); + + /** AIRichResponseSubMessage dynamicMetadata */ + dynamicMetadata?: (proto.AIRichResponseMessage.IAIRichResponseDynamicMetadata|null); + + /** AIRichResponseSubMessage latexMetadata */ + latexMetadata?: (proto.AIRichResponseMessage.IAIRichResponseLatexMetadata|null); + + /** AIRichResponseSubMessage mapMetadata */ + mapMetadata?: (proto.AIRichResponseMessage.IAIRichResponseMapMetadata|null); + + /** AIRichResponseSubMessage contentItemsMetadata */ + contentItemsMetadata?: (proto.AIRichResponseMessage.IAIRichResponseContentItemsMetadata|null); + } + + /** Represents a AIRichResponseSubMessage. */ + class AIRichResponseSubMessage implements IAIRichResponseSubMessage { + + /** + * Constructs a new AIRichResponseSubMessage. + * @param [properties] Properties to set + */ + constructor(properties?: proto.AIRichResponseMessage.IAIRichResponseSubMessage); + + /** AIRichResponseSubMessage messageType. */ + public messageType?: (proto.AIRichResponseMessage.AIRichResponseSubMessageType|null); + + /** AIRichResponseSubMessage gridImageMetadata. */ + public gridImageMetadata?: (proto.AIRichResponseMessage.IAIRichResponseGridImageMetadata|null); + + /** AIRichResponseSubMessage messageText. */ + public messageText?: (string|null); + + /** AIRichResponseSubMessage imageMetadata. */ + public imageMetadata?: (proto.AIRichResponseMessage.IAIRichResponseInlineImageMetadata|null); + + /** AIRichResponseSubMessage codeMetadata. */ + public codeMetadata?: (proto.AIRichResponseMessage.IAIRichResponseCodeMetadata|null); + + /** AIRichResponseSubMessage tableMetadata. */ + public tableMetadata?: (proto.AIRichResponseMessage.IAIRichResponseTableMetadata|null); + + /** AIRichResponseSubMessage dynamicMetadata. */ + public dynamicMetadata?: (proto.AIRichResponseMessage.IAIRichResponseDynamicMetadata|null); + + /** AIRichResponseSubMessage latexMetadata. */ + public latexMetadata?: (proto.AIRichResponseMessage.IAIRichResponseLatexMetadata|null); + + /** AIRichResponseSubMessage mapMetadata. */ + public mapMetadata?: (proto.AIRichResponseMessage.IAIRichResponseMapMetadata|null); + + /** AIRichResponseSubMessage contentItemsMetadata. */ + public contentItemsMetadata?: (proto.AIRichResponseMessage.IAIRichResponseContentItemsMetadata|null); + + /** + * Creates a new AIRichResponseSubMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns AIRichResponseSubMessage instance + */ + public static create(properties?: proto.AIRichResponseMessage.IAIRichResponseSubMessage): proto.AIRichResponseMessage.AIRichResponseSubMessage; + + /** + * Encodes the specified AIRichResponseSubMessage message. Does not implicitly {@link proto.AIRichResponseMessage.AIRichResponseSubMessage.verify|verify} messages. + * @param message AIRichResponseSubMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.AIRichResponseMessage.IAIRichResponseSubMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AIRichResponseSubMessage message, length delimited. Does not implicitly {@link proto.AIRichResponseMessage.AIRichResponseSubMessage.verify|verify} messages. + * @param message AIRichResponseSubMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.AIRichResponseMessage.IAIRichResponseSubMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a AIRichResponseSubMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AIRichResponseSubMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.AIRichResponseMessage.AIRichResponseSubMessage; + + /** + * Decodes a AIRichResponseSubMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AIRichResponseSubMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.AIRichResponseMessage.AIRichResponseSubMessage; + + /** + * Verifies a AIRichResponseSubMessage message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a AIRichResponseSubMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AIRichResponseSubMessage + */ + public static fromObject(object: { [k: string]: any }): proto.AIRichResponseMessage.AIRichResponseSubMessage; + + /** + * Creates a plain object from a AIRichResponseSubMessage message. Also converts values to other types if specified. + * @param message AIRichResponseSubMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.AIRichResponseMessage.AIRichResponseSubMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AIRichResponseSubMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AIRichResponseSubMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** AIRichResponseSubMessageType enum. */ + enum AIRichResponseSubMessageType { + AI_RICH_RESPONSE_UNKNOWN = 0, + AI_RICH_RESPONSE_GRID_IMAGE = 1, + AI_RICH_RESPONSE_TEXT = 2, + AI_RICH_RESPONSE_INLINE_IMAGE = 3, + AI_RICH_RESPONSE_TABLE = 4, + AI_RICH_RESPONSE_CODE = 5, + AI_RICH_RESPONSE_DYNAMIC = 6, + AI_RICH_RESPONSE_MAP = 7, + AI_RICH_RESPONSE_LATEX = 8, + AI_RICH_RESPONSE_CONTENT_ITEMS = 9 + } + + /** Properties of a AIRichResponseTableMetadata. */ + interface IAIRichResponseTableMetadata { + + /** AIRichResponseTableMetadata rows */ + rows?: (proto.AIRichResponseMessage.AIRichResponseTableMetadata.IAIRichResponseTableRow[]|null); + } + + /** Represents a AIRichResponseTableMetadata. */ + class AIRichResponseTableMetadata implements IAIRichResponseTableMetadata { + + /** + * Constructs a new AIRichResponseTableMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: proto.AIRichResponseMessage.IAIRichResponseTableMetadata); + + /** AIRichResponseTableMetadata rows. */ + public rows: proto.AIRichResponseMessage.AIRichResponseTableMetadata.IAIRichResponseTableRow[]; + + /** + * Creates a new AIRichResponseTableMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns AIRichResponseTableMetadata instance + */ + public static create(properties?: proto.AIRichResponseMessage.IAIRichResponseTableMetadata): proto.AIRichResponseMessage.AIRichResponseTableMetadata; + + /** + * Encodes the specified AIRichResponseTableMetadata message. Does not implicitly {@link proto.AIRichResponseMessage.AIRichResponseTableMetadata.verify|verify} messages. + * @param message AIRichResponseTableMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.AIRichResponseMessage.IAIRichResponseTableMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AIRichResponseTableMetadata message, length delimited. Does not implicitly {@link proto.AIRichResponseMessage.AIRichResponseTableMetadata.verify|verify} messages. + * @param message AIRichResponseTableMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.AIRichResponseMessage.IAIRichResponseTableMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a AIRichResponseTableMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AIRichResponseTableMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.AIRichResponseMessage.AIRichResponseTableMetadata; + + /** + * Decodes a AIRichResponseTableMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AIRichResponseTableMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.AIRichResponseMessage.AIRichResponseTableMetadata; + + /** + * Verifies a AIRichResponseTableMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a AIRichResponseTableMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AIRichResponseTableMetadata + */ + public static fromObject(object: { [k: string]: any }): proto.AIRichResponseMessage.AIRichResponseTableMetadata; + + /** + * Creates a plain object from a AIRichResponseTableMetadata message. Also converts values to other types if specified. + * @param message AIRichResponseTableMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.AIRichResponseMessage.AIRichResponseTableMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AIRichResponseTableMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AIRichResponseTableMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AIRichResponseTableMetadata { + + /** Properties of a AIRichResponseTableRow. */ + interface IAIRichResponseTableRow { + + /** AIRichResponseTableRow items */ + items?: (string[]|null); + + /** AIRichResponseTableRow isHeading */ + isHeading?: (boolean|null); + } + + /** Represents a AIRichResponseTableRow. */ + class AIRichResponseTableRow implements IAIRichResponseTableRow { + + /** + * Constructs a new AIRichResponseTableRow. + * @param [properties] Properties to set + */ + constructor(properties?: proto.AIRichResponseMessage.AIRichResponseTableMetadata.IAIRichResponseTableRow); + + /** AIRichResponseTableRow items. */ + public items: string[]; + + /** AIRichResponseTableRow isHeading. */ + public isHeading?: (boolean|null); + + /** + * Creates a new AIRichResponseTableRow instance using the specified properties. + * @param [properties] Properties to set + * @returns AIRichResponseTableRow instance + */ + public static create(properties?: proto.AIRichResponseMessage.AIRichResponseTableMetadata.IAIRichResponseTableRow): proto.AIRichResponseMessage.AIRichResponseTableMetadata.AIRichResponseTableRow; + + /** + * Encodes the specified AIRichResponseTableRow message. Does not implicitly {@link proto.AIRichResponseMessage.AIRichResponseTableMetadata.AIRichResponseTableRow.verify|verify} messages. + * @param message AIRichResponseTableRow message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.AIRichResponseMessage.AIRichResponseTableMetadata.IAIRichResponseTableRow, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AIRichResponseTableRow message, length delimited. Does not implicitly {@link proto.AIRichResponseMessage.AIRichResponseTableMetadata.AIRichResponseTableRow.verify|verify} messages. + * @param message AIRichResponseTableRow message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.AIRichResponseMessage.AIRichResponseTableMetadata.IAIRichResponseTableRow, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a AIRichResponseTableRow message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AIRichResponseTableRow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.AIRichResponseMessage.AIRichResponseTableMetadata.AIRichResponseTableRow; + + /** + * Decodes a AIRichResponseTableRow message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AIRichResponseTableRow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.AIRichResponseMessage.AIRichResponseTableMetadata.AIRichResponseTableRow; + + /** + * Verifies a AIRichResponseTableRow message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a AIRichResponseTableRow message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AIRichResponseTableRow + */ + public static fromObject(object: { [k: string]: any }): proto.AIRichResponseMessage.AIRichResponseTableMetadata.AIRichResponseTableRow; + + /** + * Creates a plain object from a AIRichResponseTableRow message. Also converts values to other types if specified. + * @param message AIRichResponseTableRow + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.AIRichResponseMessage.AIRichResponseTableMetadata.AIRichResponseTableRow, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AIRichResponseTableRow to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AIRichResponseTableRow + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } } /** Properties of an ActionLink. */ @@ -568,10 +2673,10 @@ export namespace proto { constructor(properties?: proto.IActionLink); /** ActionLink url. */ - public url: string; + public url?: (string|null); /** ActionLink buttonTitle. */ - public buttonTitle: string; + public buttonTitle?: (string|null); /** * Creates a new ActionLink instance using the specified properties. @@ -642,6 +2747,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ActionLink + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an AutoDownloadSettings. */ @@ -670,16 +2782,16 @@ export namespace proto { constructor(properties?: proto.IAutoDownloadSettings); /** AutoDownloadSettings downloadImages. */ - public downloadImages: boolean; + public downloadImages?: (boolean|null); /** AutoDownloadSettings downloadAudio. */ - public downloadAudio: boolean; + public downloadAudio?: (boolean|null); /** AutoDownloadSettings downloadVideo. */ - public downloadVideo: boolean; + public downloadVideo?: (boolean|null); /** AutoDownloadSettings downloadDocuments. */ - public downloadDocuments: boolean; + public downloadDocuments?: (boolean|null); /** * Creates a new AutoDownloadSettings instance using the specified properties. @@ -750,6 +2862,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AutoDownloadSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an AvatarUserSettings. */ @@ -772,10 +2891,10 @@ export namespace proto { constructor(properties?: proto.IAvatarUserSettings); /** AvatarUserSettings fbid. */ - public fbid: string; + public fbid?: (string|null); /** AvatarUserSettings password. */ - public password: string; + public password?: (string|null); /** * Creates a new AvatarUserSettings instance using the specified properties. @@ -846,6 +2965,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AvatarUserSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a BizAccountLinkInfo. */ @@ -877,19 +3003,19 @@ export namespace proto { constructor(properties?: proto.IBizAccountLinkInfo); /** BizAccountLinkInfo whatsappBizAcctFbid. */ - public whatsappBizAcctFbid: (number|Long); + public whatsappBizAcctFbid?: (number|Long|null); /** BizAccountLinkInfo whatsappAcctNumber. */ - public whatsappAcctNumber: string; + public whatsappAcctNumber?: (string|null); /** BizAccountLinkInfo issueTime. */ - public issueTime: (number|Long); + public issueTime?: (number|Long|null); /** BizAccountLinkInfo hostStorage. */ - public hostStorage: proto.BizAccountLinkInfo.HostStorageType; + public hostStorage?: (proto.BizAccountLinkInfo.HostStorageType|null); /** BizAccountLinkInfo accountType. */ - public accountType: proto.BizAccountLinkInfo.AccountType; + public accountType?: (proto.BizAccountLinkInfo.AccountType|null); /** * Creates a new BizAccountLinkInfo instance using the specified properties. @@ -960,6 +3086,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BizAccountLinkInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace BizAccountLinkInfo { @@ -999,7 +3132,7 @@ export namespace proto { public vnameCert?: (proto.IVerifiedNameCertificate|null); /** BizAccountPayload bizAcctLinkInfo. */ - public bizAcctLinkInfo: Uint8Array; + public bizAcctLinkInfo?: (Uint8Array|null); /** * Creates a new BizAccountPayload instance using the specified properties. @@ -1070,6 +3203,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BizAccountPayload + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a BizIdentityInfo. */ @@ -1110,28 +3250,28 @@ export namespace proto { constructor(properties?: proto.IBizIdentityInfo); /** BizIdentityInfo vlevel. */ - public vlevel: proto.BizIdentityInfo.VerifiedLevelValue; + public vlevel?: (proto.BizIdentityInfo.VerifiedLevelValue|null); /** BizIdentityInfo vnameCert. */ public vnameCert?: (proto.IVerifiedNameCertificate|null); /** BizIdentityInfo signed. */ - public signed: boolean; + public signed?: (boolean|null); /** BizIdentityInfo revoked. */ - public revoked: boolean; + public revoked?: (boolean|null); /** BizIdentityInfo hostStorage. */ - public hostStorage: proto.BizIdentityInfo.HostStorageType; + public hostStorage?: (proto.BizIdentityInfo.HostStorageType|null); /** BizIdentityInfo actualActors. */ - public actualActors: proto.BizIdentityInfo.ActualActorsType; + public actualActors?: (proto.BizIdentityInfo.ActualActorsType|null); /** BizIdentityInfo privacyModeTs. */ - public privacyModeTs: (number|Long); + public privacyModeTs?: (number|Long|null); /** BizIdentityInfo featureControls. */ - public featureControls: (number|Long); + public featureControls?: (number|Long|null); /** * Creates a new BizIdentityInfo instance using the specified properties. @@ -1202,6 +3342,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BizIdentityInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace BizIdentityInfo { @@ -1255,19 +3402,19 @@ export namespace proto { constructor(properties?: proto.IBotAvatarMetadata); /** BotAvatarMetadata sentiment. */ - public sentiment: number; + public sentiment?: (number|null); /** BotAvatarMetadata behaviorGraph. */ - public behaviorGraph: string; + public behaviorGraph?: (string|null); /** BotAvatarMetadata action. */ - public action: number; + public action?: (number|null); /** BotAvatarMetadata intensity. */ - public intensity: number; + public intensity?: (number|null); /** BotAvatarMetadata wordCount. */ - public wordCount: number; + public wordCount?: (number|null); /** * Creates a new BotAvatarMetadata instance using the specified properties. @@ -1338,6 +3485,916 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BotAvatarMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BotCapabilityMetadata. */ + interface IBotCapabilityMetadata { + + /** BotCapabilityMetadata capabilities */ + capabilities?: (proto.BotCapabilityMetadata.BotCapabilityType[]|null); + } + + /** Represents a BotCapabilityMetadata. */ + class BotCapabilityMetadata implements IBotCapabilityMetadata { + + /** + * Constructs a new BotCapabilityMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IBotCapabilityMetadata); + + /** BotCapabilityMetadata capabilities. */ + public capabilities: proto.BotCapabilityMetadata.BotCapabilityType[]; + + /** + * Creates a new BotCapabilityMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns BotCapabilityMetadata instance + */ + public static create(properties?: proto.IBotCapabilityMetadata): proto.BotCapabilityMetadata; + + /** + * Encodes the specified BotCapabilityMetadata message. Does not implicitly {@link proto.BotCapabilityMetadata.verify|verify} messages. + * @param message BotCapabilityMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IBotCapabilityMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BotCapabilityMetadata message, length delimited. Does not implicitly {@link proto.BotCapabilityMetadata.verify|verify} messages. + * @param message BotCapabilityMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IBotCapabilityMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BotCapabilityMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BotCapabilityMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.BotCapabilityMetadata; + + /** + * Decodes a BotCapabilityMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BotCapabilityMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.BotCapabilityMetadata; + + /** + * Verifies a BotCapabilityMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BotCapabilityMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BotCapabilityMetadata + */ + public static fromObject(object: { [k: string]: any }): proto.BotCapabilityMetadata; + + /** + * Creates a plain object from a BotCapabilityMetadata message. Also converts values to other types if specified. + * @param message BotCapabilityMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.BotCapabilityMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BotCapabilityMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BotCapabilityMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace BotCapabilityMetadata { + + /** BotCapabilityType enum. */ + enum BotCapabilityType { + UNKNOWN = 0, + PROGRESS_INDICATOR = 1, + RICH_RESPONSE_HEADING = 2, + RICH_RESPONSE_NESTED_LIST = 3, + AI_MEMORY = 4, + RICH_RESPONSE_THREAD_SURFING = 5, + RICH_RESPONSE_TABLE = 6, + RICH_RESPONSE_CODE = 7, + RICH_RESPONSE_STRUCTURED_RESPONSE = 8, + RICH_RESPONSE_INLINE_IMAGE = 9, + WA_IG_1P_PLUGIN_RANKING_CONTROL = 10, + WA_IG_1P_PLUGIN_RANKING_UPDATE_1 = 11, + WA_IG_1P_PLUGIN_RANKING_UPDATE_2 = 12, + WA_IG_1P_PLUGIN_RANKING_UPDATE_3 = 13, + WA_IG_1P_PLUGIN_RANKING_UPDATE_4 = 14, + WA_IG_1P_PLUGIN_RANKING_UPDATE_5 = 15, + WA_IG_1P_PLUGIN_RANKING_UPDATE_6 = 16, + WA_IG_1P_PLUGIN_RANKING_UPDATE_7 = 17, + WA_IG_1P_PLUGIN_RANKING_UPDATE_8 = 18, + WA_IG_1P_PLUGIN_RANKING_UPDATE_9 = 19, + WA_IG_1P_PLUGIN_RANKING_UPDATE_10 = 20, + RICH_RESPONSE_SUB_HEADING = 21, + RICH_RESPONSE_GRID_IMAGE = 22, + AI_STUDIO_UGC_MEMORY = 23, + RICH_RESPONSE_LATEX = 24, + RICH_RESPONSE_MAPS = 25, + RICH_RESPONSE_INLINE_REELS = 26, + AGENTIC_PLANNING = 27, + ACCOUNT_LINKING = 28, + STREAMING_DISAGGREGATION = 29 + } + } + + /** Properties of a BotImagineMetadata. */ + interface IBotImagineMetadata { + + /** BotImagineMetadata imagineType */ + imagineType?: (proto.BotImagineMetadata.ImagineType|null); + } + + /** Represents a BotImagineMetadata. */ + class BotImagineMetadata implements IBotImagineMetadata { + + /** + * Constructs a new BotImagineMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IBotImagineMetadata); + + /** BotImagineMetadata imagineType. */ + public imagineType?: (proto.BotImagineMetadata.ImagineType|null); + + /** + * Creates a new BotImagineMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns BotImagineMetadata instance + */ + public static create(properties?: proto.IBotImagineMetadata): proto.BotImagineMetadata; + + /** + * Encodes the specified BotImagineMetadata message. Does not implicitly {@link proto.BotImagineMetadata.verify|verify} messages. + * @param message BotImagineMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IBotImagineMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BotImagineMetadata message, length delimited. Does not implicitly {@link proto.BotImagineMetadata.verify|verify} messages. + * @param message BotImagineMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IBotImagineMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BotImagineMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BotImagineMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.BotImagineMetadata; + + /** + * Decodes a BotImagineMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BotImagineMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.BotImagineMetadata; + + /** + * Verifies a BotImagineMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BotImagineMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BotImagineMetadata + */ + public static fromObject(object: { [k: string]: any }): proto.BotImagineMetadata; + + /** + * Creates a plain object from a BotImagineMetadata message. Also converts values to other types if specified. + * @param message BotImagineMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.BotImagineMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BotImagineMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BotImagineMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace BotImagineMetadata { + + /** ImagineType enum. */ + enum ImagineType { + UNKNOWN = 0, + IMAGINE = 1, + MEMU = 2, + FLASH = 3, + EDIT = 4 + } + } + + /** Properties of a BotLinkedAccount. */ + interface IBotLinkedAccount { + + /** BotLinkedAccount type */ + type?: (proto.BotLinkedAccount.BotLinkedAccountType|null); + } + + /** Represents a BotLinkedAccount. */ + class BotLinkedAccount implements IBotLinkedAccount { + + /** + * Constructs a new BotLinkedAccount. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IBotLinkedAccount); + + /** BotLinkedAccount type. */ + public type?: (proto.BotLinkedAccount.BotLinkedAccountType|null); + + /** + * Creates a new BotLinkedAccount instance using the specified properties. + * @param [properties] Properties to set + * @returns BotLinkedAccount instance + */ + public static create(properties?: proto.IBotLinkedAccount): proto.BotLinkedAccount; + + /** + * Encodes the specified BotLinkedAccount message. Does not implicitly {@link proto.BotLinkedAccount.verify|verify} messages. + * @param message BotLinkedAccount message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IBotLinkedAccount, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BotLinkedAccount message, length delimited. Does not implicitly {@link proto.BotLinkedAccount.verify|verify} messages. + * @param message BotLinkedAccount message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IBotLinkedAccount, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BotLinkedAccount message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BotLinkedAccount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.BotLinkedAccount; + + /** + * Decodes a BotLinkedAccount message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BotLinkedAccount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.BotLinkedAccount; + + /** + * Verifies a BotLinkedAccount message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BotLinkedAccount message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BotLinkedAccount + */ + public static fromObject(object: { [k: string]: any }): proto.BotLinkedAccount; + + /** + * Creates a plain object from a BotLinkedAccount message. Also converts values to other types if specified. + * @param message BotLinkedAccount + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.BotLinkedAccount, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BotLinkedAccount to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BotLinkedAccount + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace BotLinkedAccount { + + /** BotLinkedAccountType enum. */ + enum BotLinkedAccountType { + BOT_LINKED_ACCOUNT_TYPE_1P = 0 + } + } + + /** Properties of a BotLinkedAccountsMetadata. */ + interface IBotLinkedAccountsMetadata { + + /** BotLinkedAccountsMetadata accounts */ + accounts?: (proto.IBotLinkedAccount[]|null); + + /** BotLinkedAccountsMetadata acAuthTokens */ + acAuthTokens?: (Uint8Array|null); + } + + /** Represents a BotLinkedAccountsMetadata. */ + class BotLinkedAccountsMetadata implements IBotLinkedAccountsMetadata { + + /** + * Constructs a new BotLinkedAccountsMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IBotLinkedAccountsMetadata); + + /** BotLinkedAccountsMetadata accounts. */ + public accounts: proto.IBotLinkedAccount[]; + + /** BotLinkedAccountsMetadata acAuthTokens. */ + public acAuthTokens?: (Uint8Array|null); + + /** + * Creates a new BotLinkedAccountsMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns BotLinkedAccountsMetadata instance + */ + public static create(properties?: proto.IBotLinkedAccountsMetadata): proto.BotLinkedAccountsMetadata; + + /** + * Encodes the specified BotLinkedAccountsMetadata message. Does not implicitly {@link proto.BotLinkedAccountsMetadata.verify|verify} messages. + * @param message BotLinkedAccountsMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IBotLinkedAccountsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BotLinkedAccountsMetadata message, length delimited. Does not implicitly {@link proto.BotLinkedAccountsMetadata.verify|verify} messages. + * @param message BotLinkedAccountsMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IBotLinkedAccountsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BotLinkedAccountsMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BotLinkedAccountsMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.BotLinkedAccountsMetadata; + + /** + * Decodes a BotLinkedAccountsMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BotLinkedAccountsMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.BotLinkedAccountsMetadata; + + /** + * Verifies a BotLinkedAccountsMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BotLinkedAccountsMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BotLinkedAccountsMetadata + */ + public static fromObject(object: { [k: string]: any }): proto.BotLinkedAccountsMetadata; + + /** + * Creates a plain object from a BotLinkedAccountsMetadata message. Also converts values to other types if specified. + * @param message BotLinkedAccountsMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.BotLinkedAccountsMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BotLinkedAccountsMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BotLinkedAccountsMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BotMediaMetadata. */ + interface IBotMediaMetadata { + + /** BotMediaMetadata fileSha256 */ + fileSha256?: (string|null); + + /** BotMediaMetadata mediaKey */ + mediaKey?: (string|null); + + /** BotMediaMetadata fileEncSha256 */ + fileEncSha256?: (string|null); + + /** BotMediaMetadata directPath */ + directPath?: (string|null); + + /** BotMediaMetadata mediaKeyTimestamp */ + mediaKeyTimestamp?: (number|Long|null); + + /** BotMediaMetadata mimetype */ + mimetype?: (string|null); + + /** BotMediaMetadata orientationType */ + orientationType?: (proto.BotMediaMetadata.OrientationType|null); + } + + /** Represents a BotMediaMetadata. */ + class BotMediaMetadata implements IBotMediaMetadata { + + /** + * Constructs a new BotMediaMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IBotMediaMetadata); + + /** BotMediaMetadata fileSha256. */ + public fileSha256?: (string|null); + + /** BotMediaMetadata mediaKey. */ + public mediaKey?: (string|null); + + /** BotMediaMetadata fileEncSha256. */ + public fileEncSha256?: (string|null); + + /** BotMediaMetadata directPath. */ + public directPath?: (string|null); + + /** BotMediaMetadata mediaKeyTimestamp. */ + public mediaKeyTimestamp?: (number|Long|null); + + /** BotMediaMetadata mimetype. */ + public mimetype?: (string|null); + + /** BotMediaMetadata orientationType. */ + public orientationType?: (proto.BotMediaMetadata.OrientationType|null); + + /** + * Creates a new BotMediaMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns BotMediaMetadata instance + */ + public static create(properties?: proto.IBotMediaMetadata): proto.BotMediaMetadata; + + /** + * Encodes the specified BotMediaMetadata message. Does not implicitly {@link proto.BotMediaMetadata.verify|verify} messages. + * @param message BotMediaMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IBotMediaMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BotMediaMetadata message, length delimited. Does not implicitly {@link proto.BotMediaMetadata.verify|verify} messages. + * @param message BotMediaMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IBotMediaMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BotMediaMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BotMediaMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.BotMediaMetadata; + + /** + * Decodes a BotMediaMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BotMediaMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.BotMediaMetadata; + + /** + * Verifies a BotMediaMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BotMediaMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BotMediaMetadata + */ + public static fromObject(object: { [k: string]: any }): proto.BotMediaMetadata; + + /** + * Creates a plain object from a BotMediaMetadata message. Also converts values to other types if specified. + * @param message BotMediaMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.BotMediaMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BotMediaMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BotMediaMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace BotMediaMetadata { + + /** OrientationType enum. */ + enum OrientationType { + CENTER = 1, + LEFT = 2, + RIGHT = 3 + } + } + + /** Properties of a BotMemoryFact. */ + interface IBotMemoryFact { + + /** BotMemoryFact fact */ + fact?: (string|null); + + /** BotMemoryFact factId */ + factId?: (string|null); + } + + /** Represents a BotMemoryFact. */ + class BotMemoryFact implements IBotMemoryFact { + + /** + * Constructs a new BotMemoryFact. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IBotMemoryFact); + + /** BotMemoryFact fact. */ + public fact?: (string|null); + + /** BotMemoryFact factId. */ + public factId?: (string|null); + + /** + * Creates a new BotMemoryFact instance using the specified properties. + * @param [properties] Properties to set + * @returns BotMemoryFact instance + */ + public static create(properties?: proto.IBotMemoryFact): proto.BotMemoryFact; + + /** + * Encodes the specified BotMemoryFact message. Does not implicitly {@link proto.BotMemoryFact.verify|verify} messages. + * @param message BotMemoryFact message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IBotMemoryFact, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BotMemoryFact message, length delimited. Does not implicitly {@link proto.BotMemoryFact.verify|verify} messages. + * @param message BotMemoryFact message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IBotMemoryFact, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BotMemoryFact message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BotMemoryFact + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.BotMemoryFact; + + /** + * Decodes a BotMemoryFact message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BotMemoryFact + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.BotMemoryFact; + + /** + * Verifies a BotMemoryFact message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BotMemoryFact message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BotMemoryFact + */ + public static fromObject(object: { [k: string]: any }): proto.BotMemoryFact; + + /** + * Creates a plain object from a BotMemoryFact message. Also converts values to other types if specified. + * @param message BotMemoryFact + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.BotMemoryFact, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BotMemoryFact to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BotMemoryFact + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BotMemoryMetadata. */ + interface IBotMemoryMetadata { + + /** BotMemoryMetadata addedFacts */ + addedFacts?: (proto.IBotMemoryFact[]|null); + + /** BotMemoryMetadata removedFacts */ + removedFacts?: (proto.IBotMemoryFact[]|null); + + /** BotMemoryMetadata disclaimer */ + disclaimer?: (string|null); + } + + /** Represents a BotMemoryMetadata. */ + class BotMemoryMetadata implements IBotMemoryMetadata { + + /** + * Constructs a new BotMemoryMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IBotMemoryMetadata); + + /** BotMemoryMetadata addedFacts. */ + public addedFacts: proto.IBotMemoryFact[]; + + /** BotMemoryMetadata removedFacts. */ + public removedFacts: proto.IBotMemoryFact[]; + + /** BotMemoryMetadata disclaimer. */ + public disclaimer?: (string|null); + + /** + * Creates a new BotMemoryMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns BotMemoryMetadata instance + */ + public static create(properties?: proto.IBotMemoryMetadata): proto.BotMemoryMetadata; + + /** + * Encodes the specified BotMemoryMetadata message. Does not implicitly {@link proto.BotMemoryMetadata.verify|verify} messages. + * @param message BotMemoryMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IBotMemoryMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BotMemoryMetadata message, length delimited. Does not implicitly {@link proto.BotMemoryMetadata.verify|verify} messages. + * @param message BotMemoryMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IBotMemoryMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BotMemoryMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BotMemoryMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.BotMemoryMetadata; + + /** + * Decodes a BotMemoryMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BotMemoryMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.BotMemoryMetadata; + + /** + * Verifies a BotMemoryMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BotMemoryMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BotMemoryMetadata + */ + public static fromObject(object: { [k: string]: any }): proto.BotMemoryMetadata; + + /** + * Creates a plain object from a BotMemoryMetadata message. Also converts values to other types if specified. + * @param message BotMemoryMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.BotMemoryMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BotMemoryMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BotMemoryMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BotMemuMetadata. */ + interface IBotMemuMetadata { + + /** BotMemuMetadata faceImages */ + faceImages?: (proto.IBotMediaMetadata[]|null); + } + + /** Represents a BotMemuMetadata. */ + class BotMemuMetadata implements IBotMemuMetadata { + + /** + * Constructs a new BotMemuMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IBotMemuMetadata); + + /** BotMemuMetadata faceImages. */ + public faceImages: proto.IBotMediaMetadata[]; + + /** + * Creates a new BotMemuMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns BotMemuMetadata instance + */ + public static create(properties?: proto.IBotMemuMetadata): proto.BotMemuMetadata; + + /** + * Encodes the specified BotMemuMetadata message. Does not implicitly {@link proto.BotMemuMetadata.verify|verify} messages. + * @param message BotMemuMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IBotMemuMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BotMemuMetadata message, length delimited. Does not implicitly {@link proto.BotMemuMetadata.verify|verify} messages. + * @param message BotMemuMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IBotMemuMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BotMemuMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BotMemuMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.BotMemuMetadata; + + /** + * Decodes a BotMemuMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BotMemuMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.BotMemuMetadata; + + /** + * Verifies a BotMemuMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BotMemuMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BotMemuMetadata + */ + public static fromObject(object: { [k: string]: any }): proto.BotMemuMetadata; + + /** + * Creates a plain object from a BotMemuMetadata message. Also converts values to other types if specified. + * @param message BotMemuMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.BotMemuMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BotMemuMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BotMemuMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a BotMetadata. */ @@ -1357,6 +4414,45 @@ export namespace proto { /** BotMetadata invokerJid */ invokerJid?: (string|null); + + /** BotMetadata sessionMetadata */ + sessionMetadata?: (proto.IBotSessionMetadata|null); + + /** BotMetadata memuMetadata */ + memuMetadata?: (proto.IBotMemuMetadata|null); + + /** BotMetadata timezone */ + timezone?: (string|null); + + /** BotMetadata reminderMetadata */ + reminderMetadata?: (proto.IBotReminderMetadata|null); + + /** BotMetadata modelMetadata */ + modelMetadata?: (proto.IBotModelMetadata|null); + + /** BotMetadata messageDisclaimerText */ + messageDisclaimerText?: (string|null); + + /** BotMetadata progressIndicatorMetadata */ + progressIndicatorMetadata?: (proto.IBotProgressIndicatorMetadata|null); + + /** BotMetadata capabilityMetadata */ + capabilityMetadata?: (proto.IBotCapabilityMetadata|null); + + /** BotMetadata imagineMetadata */ + imagineMetadata?: (proto.IBotImagineMetadata|null); + + /** BotMetadata memoryMetadata */ + memoryMetadata?: (proto.IBotMemoryMetadata|null); + + /** BotMetadata renderingMetadata */ + renderingMetadata?: (proto.IBotRenderingMetadata|null); + + /** BotMetadata botMetricsMetadata */ + botMetricsMetadata?: (proto.IBotMetricsMetadata|null); + + /** BotMetadata botLinkedAccountsMetadata */ + botLinkedAccountsMetadata?: (proto.IBotLinkedAccountsMetadata|null); } /** Represents a BotMetadata. */ @@ -1372,7 +4468,7 @@ export namespace proto { public avatarMetadata?: (proto.IBotAvatarMetadata|null); /** BotMetadata personaId. */ - public personaId: string; + public personaId?: (string|null); /** BotMetadata pluginMetadata. */ public pluginMetadata?: (proto.IBotPluginMetadata|null); @@ -1381,7 +4477,46 @@ export namespace proto { public suggestedPromptMetadata?: (proto.IBotSuggestedPromptMetadata|null); /** BotMetadata invokerJid. */ - public invokerJid: string; + public invokerJid?: (string|null); + + /** BotMetadata sessionMetadata. */ + public sessionMetadata?: (proto.IBotSessionMetadata|null); + + /** BotMetadata memuMetadata. */ + public memuMetadata?: (proto.IBotMemuMetadata|null); + + /** BotMetadata timezone. */ + public timezone?: (string|null); + + /** BotMetadata reminderMetadata. */ + public reminderMetadata?: (proto.IBotReminderMetadata|null); + + /** BotMetadata modelMetadata. */ + public modelMetadata?: (proto.IBotModelMetadata|null); + + /** BotMetadata messageDisclaimerText. */ + public messageDisclaimerText?: (string|null); + + /** BotMetadata progressIndicatorMetadata. */ + public progressIndicatorMetadata?: (proto.IBotProgressIndicatorMetadata|null); + + /** BotMetadata capabilityMetadata. */ + public capabilityMetadata?: (proto.IBotCapabilityMetadata|null); + + /** BotMetadata imagineMetadata. */ + public imagineMetadata?: (proto.IBotImagineMetadata|null); + + /** BotMetadata memoryMetadata. */ + public memoryMetadata?: (proto.IBotMemoryMetadata|null); + + /** BotMetadata renderingMetadata. */ + public renderingMetadata?: (proto.IBotRenderingMetadata|null); + + /** BotMetadata botMetricsMetadata. */ + public botMetricsMetadata?: (proto.IBotMetricsMetadata|null); + + /** BotMetadata botLinkedAccountsMetadata. */ + public botLinkedAccountsMetadata?: (proto.IBotLinkedAccountsMetadata|null); /** * Creates a new BotMetadata instance using the specified properties. @@ -1452,6 +4587,257 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BotMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** BotMetricsEntryPoint enum. */ + enum BotMetricsEntryPoint { + FAVICON = 1, + CHATLIST = 2, + AISEARCH_NULL_STATE_PAPER_PLANE = 3, + AISEARCH_NULL_STATE_SUGGESTION = 4, + AISEARCH_TYPE_AHEAD_SUGGESTION = 5, + AISEARCH_TYPE_AHEAD_PAPER_PLANE = 6, + AISEARCH_TYPE_AHEAD_RESULT_CHATLIST = 7, + AISEARCH_TYPE_AHEAD_RESULT_MESSAGES = 8, + AIVOICE_SEARCH_BAR = 9, + AIVOICE_FAVICON = 10, + AISTUDIO = 11, + DEEPLINK = 12, + NOTIFICATION = 13, + PROFILE_MESSAGE_BUTTON = 14, + FORWARD = 15, + APP_SHORTCUT = 16, + FF_FAMILY = 17 + } + + /** Properties of a BotMetricsMetadata. */ + interface IBotMetricsMetadata { + + /** BotMetricsMetadata destinationId */ + destinationId?: (string|null); + + /** BotMetricsMetadata destinationEntryPoint */ + destinationEntryPoint?: (proto.BotMetricsEntryPoint|null); + } + + /** Represents a BotMetricsMetadata. */ + class BotMetricsMetadata implements IBotMetricsMetadata { + + /** + * Constructs a new BotMetricsMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IBotMetricsMetadata); + + /** BotMetricsMetadata destinationId. */ + public destinationId?: (string|null); + + /** BotMetricsMetadata destinationEntryPoint. */ + public destinationEntryPoint?: (proto.BotMetricsEntryPoint|null); + + /** + * Creates a new BotMetricsMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns BotMetricsMetadata instance + */ + public static create(properties?: proto.IBotMetricsMetadata): proto.BotMetricsMetadata; + + /** + * Encodes the specified BotMetricsMetadata message. Does not implicitly {@link proto.BotMetricsMetadata.verify|verify} messages. + * @param message BotMetricsMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IBotMetricsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BotMetricsMetadata message, length delimited. Does not implicitly {@link proto.BotMetricsMetadata.verify|verify} messages. + * @param message BotMetricsMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IBotMetricsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BotMetricsMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BotMetricsMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.BotMetricsMetadata; + + /** + * Decodes a BotMetricsMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BotMetricsMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.BotMetricsMetadata; + + /** + * Verifies a BotMetricsMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BotMetricsMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BotMetricsMetadata + */ + public static fromObject(object: { [k: string]: any }): proto.BotMetricsMetadata; + + /** + * Creates a plain object from a BotMetricsMetadata message. Also converts values to other types if specified. + * @param message BotMetricsMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.BotMetricsMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BotMetricsMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BotMetricsMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BotModelMetadata. */ + interface IBotModelMetadata { + + /** BotModelMetadata modelType */ + modelType?: (proto.BotModelMetadata.ModelType|null); + + /** BotModelMetadata premiumModelStatus */ + premiumModelStatus?: (proto.BotModelMetadata.PremiumModelStatus|null); + } + + /** Represents a BotModelMetadata. */ + class BotModelMetadata implements IBotModelMetadata { + + /** + * Constructs a new BotModelMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IBotModelMetadata); + + /** BotModelMetadata modelType. */ + public modelType?: (proto.BotModelMetadata.ModelType|null); + + /** BotModelMetadata premiumModelStatus. */ + public premiumModelStatus?: (proto.BotModelMetadata.PremiumModelStatus|null); + + /** + * Creates a new BotModelMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns BotModelMetadata instance + */ + public static create(properties?: proto.IBotModelMetadata): proto.BotModelMetadata; + + /** + * Encodes the specified BotModelMetadata message. Does not implicitly {@link proto.BotModelMetadata.verify|verify} messages. + * @param message BotModelMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IBotModelMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BotModelMetadata message, length delimited. Does not implicitly {@link proto.BotModelMetadata.verify|verify} messages. + * @param message BotModelMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IBotModelMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BotModelMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BotModelMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.BotModelMetadata; + + /** + * Decodes a BotModelMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BotModelMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.BotModelMetadata; + + /** + * Verifies a BotModelMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BotModelMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BotModelMetadata + */ + public static fromObject(object: { [k: string]: any }): proto.BotModelMetadata; + + /** + * Creates a plain object from a BotModelMetadata message. Also converts values to other types if specified. + * @param message BotModelMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.BotModelMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BotModelMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BotModelMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace BotModelMetadata { + + /** ModelType enum. */ + enum ModelType { + UNKNOWN_TYPE = 0, + LLAMA_PROD = 1, + LLAMA_PROD_PREMIUM = 2 + } + + /** PremiumModelStatus enum. */ + enum PremiumModelStatus { + UNKNOWN_STATUS = 0, + AVAILABLE = 1, + QUOTA_EXCEED_LIMIT = 2 + } } /** Properties of a BotPluginMetadata. */ @@ -1478,8 +4864,20 @@ export namespace proto { /** BotPluginMetadata expectedLinksCount */ expectedLinksCount?: (number|null); - /** BotPluginMetadata pluginVersion */ - pluginVersion?: (number|null); + /** BotPluginMetadata searchQuery */ + searchQuery?: (string|null); + + /** BotPluginMetadata parentPluginMessageKey */ + parentPluginMessageKey?: (proto.IMessageKey|null); + + /** BotPluginMetadata deprecatedField */ + deprecatedField?: (proto.BotPluginMetadata.PluginType|null); + + /** BotPluginMetadata parentPluginType */ + parentPluginType?: (proto.BotPluginMetadata.PluginType|null); + + /** BotPluginMetadata faviconCdnUrl */ + faviconCdnUrl?: (string|null); } /** Represents a BotPluginMetadata. */ @@ -1492,28 +4890,40 @@ export namespace proto { constructor(properties?: proto.IBotPluginMetadata); /** BotPluginMetadata provider. */ - public provider: proto.BotPluginMetadata.SearchProvider; + public provider?: (proto.BotPluginMetadata.SearchProvider|null); /** BotPluginMetadata pluginType. */ - public pluginType: proto.BotPluginMetadata.PluginType; + public pluginType?: (proto.BotPluginMetadata.PluginType|null); /** BotPluginMetadata thumbnailCdnUrl. */ - public thumbnailCdnUrl: string; + public thumbnailCdnUrl?: (string|null); /** BotPluginMetadata profilePhotoCdnUrl. */ - public profilePhotoCdnUrl: string; + public profilePhotoCdnUrl?: (string|null); /** BotPluginMetadata searchProviderUrl. */ - public searchProviderUrl: string; + public searchProviderUrl?: (string|null); /** BotPluginMetadata referenceIndex. */ - public referenceIndex: number; + public referenceIndex?: (number|null); /** BotPluginMetadata expectedLinksCount. */ - public expectedLinksCount: number; + public expectedLinksCount?: (number|null); - /** BotPluginMetadata pluginVersion. */ - public pluginVersion: number; + /** BotPluginMetadata searchQuery. */ + public searchQuery?: (string|null); + + /** BotPluginMetadata parentPluginMessageKey. */ + public parentPluginMessageKey?: (proto.IMessageKey|null); + + /** BotPluginMetadata deprecatedField. */ + public deprecatedField?: (proto.BotPluginMetadata.PluginType|null); + + /** BotPluginMetadata parentPluginType. */ + public parentPluginType?: (proto.BotPluginMetadata.PluginType|null); + + /** BotPluginMetadata faviconCdnUrl. */ + public faviconCdnUrl?: (string|null); /** * Creates a new BotPluginMetadata instance using the specified properties. @@ -1584,23 +4994,1055 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BotPluginMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace BotPluginMetadata { /** PluginType enum. */ enum PluginType { + UNKNOWN_PLUGIN = 0, REELS = 1, SEARCH = 2 } /** SearchProvider enum. */ enum SearchProvider { + UNKNOWN = 0, BING = 1, - GOOGLE = 2 + GOOGLE = 2, + SUPPORT = 3 } } + /** Properties of a BotProgressIndicatorMetadata. */ + interface IBotProgressIndicatorMetadata { + + /** BotProgressIndicatorMetadata progressDescription */ + progressDescription?: (string|null); + + /** BotProgressIndicatorMetadata stepsMetadata */ + stepsMetadata?: (proto.BotProgressIndicatorMetadata.IBotPlanningStepMetadata[]|null); + } + + /** Represents a BotProgressIndicatorMetadata. */ + class BotProgressIndicatorMetadata implements IBotProgressIndicatorMetadata { + + /** + * Constructs a new BotProgressIndicatorMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IBotProgressIndicatorMetadata); + + /** BotProgressIndicatorMetadata progressDescription. */ + public progressDescription?: (string|null); + + /** BotProgressIndicatorMetadata stepsMetadata. */ + public stepsMetadata: proto.BotProgressIndicatorMetadata.IBotPlanningStepMetadata[]; + + /** + * Creates a new BotProgressIndicatorMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns BotProgressIndicatorMetadata instance + */ + public static create(properties?: proto.IBotProgressIndicatorMetadata): proto.BotProgressIndicatorMetadata; + + /** + * Encodes the specified BotProgressIndicatorMetadata message. Does not implicitly {@link proto.BotProgressIndicatorMetadata.verify|verify} messages. + * @param message BotProgressIndicatorMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IBotProgressIndicatorMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BotProgressIndicatorMetadata message, length delimited. Does not implicitly {@link proto.BotProgressIndicatorMetadata.verify|verify} messages. + * @param message BotProgressIndicatorMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IBotProgressIndicatorMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BotProgressIndicatorMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BotProgressIndicatorMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.BotProgressIndicatorMetadata; + + /** + * Decodes a BotProgressIndicatorMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BotProgressIndicatorMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.BotProgressIndicatorMetadata; + + /** + * Verifies a BotProgressIndicatorMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BotProgressIndicatorMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BotProgressIndicatorMetadata + */ + public static fromObject(object: { [k: string]: any }): proto.BotProgressIndicatorMetadata; + + /** + * Creates a plain object from a BotProgressIndicatorMetadata message. Also converts values to other types if specified. + * @param message BotProgressIndicatorMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.BotProgressIndicatorMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BotProgressIndicatorMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BotProgressIndicatorMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace BotProgressIndicatorMetadata { + + /** Properties of a BotPlanningStepMetadata. */ + interface IBotPlanningStepMetadata { + + /** BotPlanningStepMetadata statusTitle */ + statusTitle?: (string|null); + + /** BotPlanningStepMetadata statusBody */ + statusBody?: (string|null); + + /** BotPlanningStepMetadata sourcesMetadata */ + sourcesMetadata?: (proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.IBotPlanningSearchSourcesMetadata[]|null); + + /** BotPlanningStepMetadata status */ + status?: (proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.PlanningStepStatus|null); + + /** BotPlanningStepMetadata isReasoning */ + isReasoning?: (boolean|null); + + /** BotPlanningStepMetadata isEnhancedSearch */ + isEnhancedSearch?: (boolean|null); + } + + /** Represents a BotPlanningStepMetadata. */ + class BotPlanningStepMetadata implements IBotPlanningStepMetadata { + + /** + * Constructs a new BotPlanningStepMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: proto.BotProgressIndicatorMetadata.IBotPlanningStepMetadata); + + /** BotPlanningStepMetadata statusTitle. */ + public statusTitle?: (string|null); + + /** BotPlanningStepMetadata statusBody. */ + public statusBody?: (string|null); + + /** BotPlanningStepMetadata sourcesMetadata. */ + public sourcesMetadata: proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.IBotPlanningSearchSourcesMetadata[]; + + /** BotPlanningStepMetadata status. */ + public status?: (proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.PlanningStepStatus|null); + + /** BotPlanningStepMetadata isReasoning. */ + public isReasoning?: (boolean|null); + + /** BotPlanningStepMetadata isEnhancedSearch. */ + public isEnhancedSearch?: (boolean|null); + + /** + * Creates a new BotPlanningStepMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns BotPlanningStepMetadata instance + */ + public static create(properties?: proto.BotProgressIndicatorMetadata.IBotPlanningStepMetadata): proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata; + + /** + * Encodes the specified BotPlanningStepMetadata message. Does not implicitly {@link proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.verify|verify} messages. + * @param message BotPlanningStepMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.BotProgressIndicatorMetadata.IBotPlanningStepMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BotPlanningStepMetadata message, length delimited. Does not implicitly {@link proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.verify|verify} messages. + * @param message BotPlanningStepMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.BotProgressIndicatorMetadata.IBotPlanningStepMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BotPlanningStepMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BotPlanningStepMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata; + + /** + * Decodes a BotPlanningStepMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BotPlanningStepMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata; + + /** + * Verifies a BotPlanningStepMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BotPlanningStepMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BotPlanningStepMetadata + */ + public static fromObject(object: { [k: string]: any }): proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata; + + /** + * Creates a plain object from a BotPlanningStepMetadata message. Also converts values to other types if specified. + * @param message BotPlanningStepMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BotPlanningStepMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BotPlanningStepMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace BotPlanningStepMetadata { + + /** Properties of a BotPlanningSearchSourcesMetadata. */ + interface IBotPlanningSearchSourcesMetadata { + + /** BotPlanningSearchSourcesMetadata sourceTitle */ + sourceTitle?: (string|null); + + /** BotPlanningSearchSourcesMetadata provider */ + provider?: (proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata.BotPlanningSearchSourceProvider|null); + + /** BotPlanningSearchSourcesMetadata sourceUrl */ + sourceUrl?: (string|null); + } + + /** Represents a BotPlanningSearchSourcesMetadata. */ + class BotPlanningSearchSourcesMetadata implements IBotPlanningSearchSourcesMetadata { + + /** + * Constructs a new BotPlanningSearchSourcesMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.IBotPlanningSearchSourcesMetadata); + + /** BotPlanningSearchSourcesMetadata sourceTitle. */ + public sourceTitle?: (string|null); + + /** BotPlanningSearchSourcesMetadata provider. */ + public provider?: (proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata.BotPlanningSearchSourceProvider|null); + + /** BotPlanningSearchSourcesMetadata sourceUrl. */ + public sourceUrl?: (string|null); + + /** + * Creates a new BotPlanningSearchSourcesMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns BotPlanningSearchSourcesMetadata instance + */ + public static create(properties?: proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.IBotPlanningSearchSourcesMetadata): proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata; + + /** + * Encodes the specified BotPlanningSearchSourcesMetadata message. Does not implicitly {@link proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata.verify|verify} messages. + * @param message BotPlanningSearchSourcesMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.IBotPlanningSearchSourcesMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BotPlanningSearchSourcesMetadata message, length delimited. Does not implicitly {@link proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata.verify|verify} messages. + * @param message BotPlanningSearchSourcesMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.IBotPlanningSearchSourcesMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BotPlanningSearchSourcesMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BotPlanningSearchSourcesMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata; + + /** + * Decodes a BotPlanningSearchSourcesMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BotPlanningSearchSourcesMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata; + + /** + * Verifies a BotPlanningSearchSourcesMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BotPlanningSearchSourcesMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BotPlanningSearchSourcesMetadata + */ + public static fromObject(object: { [k: string]: any }): proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata; + + /** + * Creates a plain object from a BotPlanningSearchSourcesMetadata message. Also converts values to other types if specified. + * @param message BotPlanningSearchSourcesMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BotPlanningSearchSourcesMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BotPlanningSearchSourcesMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace BotPlanningSearchSourcesMetadata { + + /** BotPlanningSearchSourceProvider enum. */ + enum BotPlanningSearchSourceProvider { + UNKNOWN = 0, + OTHER = 1, + GOOGLE = 2, + BING = 3 + } + } + + /** PlanningStepStatus enum. */ + enum PlanningStepStatus { + UNKNOWN = 0, + PLANNED = 1, + EXECUTING = 2, + FINISHED = 3 + } + } + } + + /** Properties of a BotPromptSuggestion. */ + interface IBotPromptSuggestion { + + /** BotPromptSuggestion prompt */ + prompt?: (string|null); + + /** BotPromptSuggestion promptId */ + promptId?: (string|null); + } + + /** Represents a BotPromptSuggestion. */ + class BotPromptSuggestion implements IBotPromptSuggestion { + + /** + * Constructs a new BotPromptSuggestion. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IBotPromptSuggestion); + + /** BotPromptSuggestion prompt. */ + public prompt?: (string|null); + + /** BotPromptSuggestion promptId. */ + public promptId?: (string|null); + + /** + * Creates a new BotPromptSuggestion instance using the specified properties. + * @param [properties] Properties to set + * @returns BotPromptSuggestion instance + */ + public static create(properties?: proto.IBotPromptSuggestion): proto.BotPromptSuggestion; + + /** + * Encodes the specified BotPromptSuggestion message. Does not implicitly {@link proto.BotPromptSuggestion.verify|verify} messages. + * @param message BotPromptSuggestion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IBotPromptSuggestion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BotPromptSuggestion message, length delimited. Does not implicitly {@link proto.BotPromptSuggestion.verify|verify} messages. + * @param message BotPromptSuggestion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IBotPromptSuggestion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BotPromptSuggestion message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BotPromptSuggestion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.BotPromptSuggestion; + + /** + * Decodes a BotPromptSuggestion message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BotPromptSuggestion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.BotPromptSuggestion; + + /** + * Verifies a BotPromptSuggestion message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BotPromptSuggestion message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BotPromptSuggestion + */ + public static fromObject(object: { [k: string]: any }): proto.BotPromptSuggestion; + + /** + * Creates a plain object from a BotPromptSuggestion message. Also converts values to other types if specified. + * @param message BotPromptSuggestion + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.BotPromptSuggestion, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BotPromptSuggestion to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BotPromptSuggestion + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BotPromptSuggestions. */ + interface IBotPromptSuggestions { + + /** BotPromptSuggestions suggestions */ + suggestions?: (proto.IBotPromptSuggestion[]|null); + } + + /** Represents a BotPromptSuggestions. */ + class BotPromptSuggestions implements IBotPromptSuggestions { + + /** + * Constructs a new BotPromptSuggestions. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IBotPromptSuggestions); + + /** BotPromptSuggestions suggestions. */ + public suggestions: proto.IBotPromptSuggestion[]; + + /** + * Creates a new BotPromptSuggestions instance using the specified properties. + * @param [properties] Properties to set + * @returns BotPromptSuggestions instance + */ + public static create(properties?: proto.IBotPromptSuggestions): proto.BotPromptSuggestions; + + /** + * Encodes the specified BotPromptSuggestions message. Does not implicitly {@link proto.BotPromptSuggestions.verify|verify} messages. + * @param message BotPromptSuggestions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IBotPromptSuggestions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BotPromptSuggestions message, length delimited. Does not implicitly {@link proto.BotPromptSuggestions.verify|verify} messages. + * @param message BotPromptSuggestions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IBotPromptSuggestions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BotPromptSuggestions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BotPromptSuggestions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.BotPromptSuggestions; + + /** + * Decodes a BotPromptSuggestions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BotPromptSuggestions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.BotPromptSuggestions; + + /** + * Verifies a BotPromptSuggestions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BotPromptSuggestions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BotPromptSuggestions + */ + public static fromObject(object: { [k: string]: any }): proto.BotPromptSuggestions; + + /** + * Creates a plain object from a BotPromptSuggestions message. Also converts values to other types if specified. + * @param message BotPromptSuggestions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.BotPromptSuggestions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BotPromptSuggestions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BotPromptSuggestions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BotReminderMetadata. */ + interface IBotReminderMetadata { + + /** BotReminderMetadata requestMessageKey */ + requestMessageKey?: (proto.IMessageKey|null); + + /** BotReminderMetadata action */ + action?: (proto.BotReminderMetadata.ReminderAction|null); + + /** BotReminderMetadata name */ + name?: (string|null); + + /** BotReminderMetadata nextTriggerTimestamp */ + nextTriggerTimestamp?: (number|Long|null); + + /** BotReminderMetadata frequency */ + frequency?: (proto.BotReminderMetadata.ReminderFrequency|null); + } + + /** Represents a BotReminderMetadata. */ + class BotReminderMetadata implements IBotReminderMetadata { + + /** + * Constructs a new BotReminderMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IBotReminderMetadata); + + /** BotReminderMetadata requestMessageKey. */ + public requestMessageKey?: (proto.IMessageKey|null); + + /** BotReminderMetadata action. */ + public action?: (proto.BotReminderMetadata.ReminderAction|null); + + /** BotReminderMetadata name. */ + public name?: (string|null); + + /** BotReminderMetadata nextTriggerTimestamp. */ + public nextTriggerTimestamp?: (number|Long|null); + + /** BotReminderMetadata frequency. */ + public frequency?: (proto.BotReminderMetadata.ReminderFrequency|null); + + /** + * Creates a new BotReminderMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns BotReminderMetadata instance + */ + public static create(properties?: proto.IBotReminderMetadata): proto.BotReminderMetadata; + + /** + * Encodes the specified BotReminderMetadata message. Does not implicitly {@link proto.BotReminderMetadata.verify|verify} messages. + * @param message BotReminderMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IBotReminderMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BotReminderMetadata message, length delimited. Does not implicitly {@link proto.BotReminderMetadata.verify|verify} messages. + * @param message BotReminderMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IBotReminderMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BotReminderMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BotReminderMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.BotReminderMetadata; + + /** + * Decodes a BotReminderMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BotReminderMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.BotReminderMetadata; + + /** + * Verifies a BotReminderMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BotReminderMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BotReminderMetadata + */ + public static fromObject(object: { [k: string]: any }): proto.BotReminderMetadata; + + /** + * Creates a plain object from a BotReminderMetadata message. Also converts values to other types if specified. + * @param message BotReminderMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.BotReminderMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BotReminderMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BotReminderMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace BotReminderMetadata { + + /** ReminderAction enum. */ + enum ReminderAction { + NOTIFY = 1, + CREATE = 2, + DELETE = 3, + UPDATE = 4 + } + + /** ReminderFrequency enum. */ + enum ReminderFrequency { + ONCE = 1, + DAILY = 2, + WEEKLY = 3, + BIWEEKLY = 4, + MONTHLY = 5 + } + } + + /** Properties of a BotRenderingMetadata. */ + interface IBotRenderingMetadata { + + /** BotRenderingMetadata keywords */ + keywords?: (proto.BotRenderingMetadata.IKeyword[]|null); + } + + /** Represents a BotRenderingMetadata. */ + class BotRenderingMetadata implements IBotRenderingMetadata { + + /** + * Constructs a new BotRenderingMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IBotRenderingMetadata); + + /** BotRenderingMetadata keywords. */ + public keywords: proto.BotRenderingMetadata.IKeyword[]; + + /** + * Creates a new BotRenderingMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns BotRenderingMetadata instance + */ + public static create(properties?: proto.IBotRenderingMetadata): proto.BotRenderingMetadata; + + /** + * Encodes the specified BotRenderingMetadata message. Does not implicitly {@link proto.BotRenderingMetadata.verify|verify} messages. + * @param message BotRenderingMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IBotRenderingMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BotRenderingMetadata message, length delimited. Does not implicitly {@link proto.BotRenderingMetadata.verify|verify} messages. + * @param message BotRenderingMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IBotRenderingMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BotRenderingMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BotRenderingMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.BotRenderingMetadata; + + /** + * Decodes a BotRenderingMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BotRenderingMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.BotRenderingMetadata; + + /** + * Verifies a BotRenderingMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BotRenderingMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BotRenderingMetadata + */ + public static fromObject(object: { [k: string]: any }): proto.BotRenderingMetadata; + + /** + * Creates a plain object from a BotRenderingMetadata message. Also converts values to other types if specified. + * @param message BotRenderingMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.BotRenderingMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BotRenderingMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BotRenderingMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace BotRenderingMetadata { + + /** Properties of a Keyword. */ + interface IKeyword { + + /** Keyword value */ + value?: (string|null); + + /** Keyword associatedPrompts */ + associatedPrompts?: (string[]|null); + } + + /** Represents a Keyword. */ + class Keyword implements IKeyword { + + /** + * Constructs a new Keyword. + * @param [properties] Properties to set + */ + constructor(properties?: proto.BotRenderingMetadata.IKeyword); + + /** Keyword value. */ + public value?: (string|null); + + /** Keyword associatedPrompts. */ + public associatedPrompts: string[]; + + /** + * Creates a new Keyword instance using the specified properties. + * @param [properties] Properties to set + * @returns Keyword instance + */ + public static create(properties?: proto.BotRenderingMetadata.IKeyword): proto.BotRenderingMetadata.Keyword; + + /** + * Encodes the specified Keyword message. Does not implicitly {@link proto.BotRenderingMetadata.Keyword.verify|verify} messages. + * @param message Keyword message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.BotRenderingMetadata.IKeyword, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Keyword message, length delimited. Does not implicitly {@link proto.BotRenderingMetadata.Keyword.verify|verify} messages. + * @param message Keyword message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.BotRenderingMetadata.IKeyword, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Keyword message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Keyword + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.BotRenderingMetadata.Keyword; + + /** + * Decodes a Keyword message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Keyword + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.BotRenderingMetadata.Keyword; + + /** + * Verifies a Keyword message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Keyword message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Keyword + */ + public static fromObject(object: { [k: string]: any }): proto.BotRenderingMetadata.Keyword; + + /** + * Creates a plain object from a Keyword message. Also converts values to other types if specified. + * @param message Keyword + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.BotRenderingMetadata.Keyword, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Keyword to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Keyword + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a BotSessionMetadata. */ + interface IBotSessionMetadata { + + /** BotSessionMetadata sessionId */ + sessionId?: (string|null); + + /** BotSessionMetadata sessionSource */ + sessionSource?: (proto.BotSessionSource|null); + } + + /** Represents a BotSessionMetadata. */ + class BotSessionMetadata implements IBotSessionMetadata { + + /** + * Constructs a new BotSessionMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IBotSessionMetadata); + + /** BotSessionMetadata sessionId. */ + public sessionId?: (string|null); + + /** BotSessionMetadata sessionSource. */ + public sessionSource?: (proto.BotSessionSource|null); + + /** + * Creates a new BotSessionMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns BotSessionMetadata instance + */ + public static create(properties?: proto.IBotSessionMetadata): proto.BotSessionMetadata; + + /** + * Encodes the specified BotSessionMetadata message. Does not implicitly {@link proto.BotSessionMetadata.verify|verify} messages. + * @param message BotSessionMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IBotSessionMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BotSessionMetadata message, length delimited. Does not implicitly {@link proto.BotSessionMetadata.verify|verify} messages. + * @param message BotSessionMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IBotSessionMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BotSessionMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BotSessionMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.BotSessionMetadata; + + /** + * Decodes a BotSessionMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BotSessionMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.BotSessionMetadata; + + /** + * Verifies a BotSessionMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BotSessionMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BotSessionMetadata + */ + public static fromObject(object: { [k: string]: any }): proto.BotSessionMetadata; + + /** + * Creates a plain object from a BotSessionMetadata message. Also converts values to other types if specified. + * @param message BotSessionMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.BotSessionMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BotSessionMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BotSessionMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** BotSessionSource enum. */ + enum BotSessionSource { + NONE = 0, + NULL_STATE = 1, + TYPEAHEAD = 2, + USER_INPUT = 3, + EMU_FLASH = 4, + EMU_FLASH_FOLLOWUP = 5, + VOICE = 6 + } + /** Properties of a BotSuggestedPromptMetadata. */ interface IBotSuggestedPromptMetadata { @@ -1609,6 +6051,12 @@ export namespace proto { /** BotSuggestedPromptMetadata selectedPromptIndex */ selectedPromptIndex?: (number|null); + + /** BotSuggestedPromptMetadata promptSuggestions */ + promptSuggestions?: (proto.IBotPromptSuggestions|null); + + /** BotSuggestedPromptMetadata selectedPromptId */ + selectedPromptId?: (string|null); } /** Represents a BotSuggestedPromptMetadata. */ @@ -1624,7 +6072,13 @@ export namespace proto { public suggestedPrompts: string[]; /** BotSuggestedPromptMetadata selectedPromptIndex. */ - public selectedPromptIndex: number; + public selectedPromptIndex?: (number|null); + + /** BotSuggestedPromptMetadata promptSuggestions. */ + public promptSuggestions?: (proto.IBotPromptSuggestions|null); + + /** BotSuggestedPromptMetadata selectedPromptId. */ + public selectedPromptId?: (string|null); /** * Creates a new BotSuggestedPromptMetadata instance using the specified properties. @@ -1695,6 +6149,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BotSuggestedPromptMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CallLogRecord. */ @@ -1756,49 +6217,49 @@ export namespace proto { constructor(properties?: proto.ICallLogRecord); /** CallLogRecord callResult. */ - public callResult: proto.CallLogRecord.CallResult; + public callResult?: (proto.CallLogRecord.CallResult|null); /** CallLogRecord isDndMode. */ - public isDndMode: boolean; + public isDndMode?: (boolean|null); /** CallLogRecord silenceReason. */ - public silenceReason: proto.CallLogRecord.SilenceReason; + public silenceReason?: (proto.CallLogRecord.SilenceReason|null); /** CallLogRecord duration. */ - public duration: (number|Long); + public duration?: (number|Long|null); /** CallLogRecord startTime. */ - public startTime: (number|Long); + public startTime?: (number|Long|null); /** CallLogRecord isIncoming. */ - public isIncoming: boolean; + public isIncoming?: (boolean|null); /** CallLogRecord isVideo. */ - public isVideo: boolean; + public isVideo?: (boolean|null); /** CallLogRecord isCallLink. */ - public isCallLink: boolean; + public isCallLink?: (boolean|null); /** CallLogRecord callLinkToken. */ - public callLinkToken: string; + public callLinkToken?: (string|null); /** CallLogRecord scheduledCallId. */ - public scheduledCallId: string; + public scheduledCallId?: (string|null); /** CallLogRecord callId. */ - public callId: string; + public callId?: (string|null); /** CallLogRecord callCreatorJid. */ - public callCreatorJid: string; + public callCreatorJid?: (string|null); /** CallLogRecord groupJid. */ - public groupJid: string; + public groupJid?: (string|null); /** CallLogRecord participants. */ public participants: proto.CallLogRecord.IParticipantInfo[]; /** CallLogRecord callType. */ - public callType: proto.CallLogRecord.CallType; + public callType?: (proto.CallLogRecord.CallType|null); /** * Creates a new CallLogRecord instance using the specified properties. @@ -1869,6 +6330,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CallLogRecord + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace CallLogRecord { @@ -1915,10 +6383,10 @@ export namespace proto { constructor(properties?: proto.CallLogRecord.IParticipantInfo); /** ParticipantInfo userJid. */ - public userJid: string; + public userJid?: (string|null); /** ParticipantInfo callResult. */ - public callResult: proto.CallLogRecord.CallResult; + public callResult?: (proto.CallLogRecord.CallResult|null); /** * Creates a new ParticipantInfo instance using the specified properties. @@ -1989,6 +6457,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ParticipantInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** SilenceReason enum. */ @@ -2094,6 +6569,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CertChain + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace CertChain { @@ -2118,10 +6600,10 @@ export namespace proto { constructor(properties?: proto.CertChain.INoiseCertificate); /** NoiseCertificate details. */ - public details: Uint8Array; + public details?: (Uint8Array|null); /** NoiseCertificate signature. */ - public signature: Uint8Array; + public signature?: (Uint8Array|null); /** * Creates a new NoiseCertificate instance using the specified properties. @@ -2192,6 +6674,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NoiseCertificate + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace NoiseCertificate { @@ -2225,19 +6714,19 @@ export namespace proto { constructor(properties?: proto.CertChain.NoiseCertificate.IDetails); /** Details serial. */ - public serial: number; + public serial?: (number|null); /** Details issuerSerial. */ - public issuerSerial: number; + public issuerSerial?: (number|null); /** Details key. */ - public key: Uint8Array; + public key?: (Uint8Array|null); /** Details notBefore. */ - public notBefore: (number|Long); + public notBefore?: (number|Long|null); /** Details notAfter. */ - public notAfter: (number|Long); + public notAfter?: (number|Long|null); /** * Creates a new Details instance using the specified properties. @@ -2308,10 +6797,120 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Details + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } } + /** Properties of a ChatLockSettings. */ + interface IChatLockSettings { + + /** ChatLockSettings hideLockedChats */ + hideLockedChats?: (boolean|null); + + /** ChatLockSettings secretCode */ + secretCode?: (proto.IUserPassword|null); + } + + /** Represents a ChatLockSettings. */ + class ChatLockSettings implements IChatLockSettings { + + /** + * Constructs a new ChatLockSettings. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IChatLockSettings); + + /** ChatLockSettings hideLockedChats. */ + public hideLockedChats?: (boolean|null); + + /** ChatLockSettings secretCode. */ + public secretCode?: (proto.IUserPassword|null); + + /** + * Creates a new ChatLockSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns ChatLockSettings instance + */ + public static create(properties?: proto.IChatLockSettings): proto.ChatLockSettings; + + /** + * Encodes the specified ChatLockSettings message. Does not implicitly {@link proto.ChatLockSettings.verify|verify} messages. + * @param message ChatLockSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IChatLockSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ChatLockSettings message, length delimited. Does not implicitly {@link proto.ChatLockSettings.verify|verify} messages. + * @param message ChatLockSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IChatLockSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ChatLockSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ChatLockSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.ChatLockSettings; + + /** + * Decodes a ChatLockSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ChatLockSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.ChatLockSettings; + + /** + * Verifies a ChatLockSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ChatLockSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ChatLockSettings + */ + public static fromObject(object: { [k: string]: any }): proto.ChatLockSettings; + + /** + * Creates a plain object from a ChatLockSettings message. Also converts values to other types if specified. + * @param message ChatLockSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.ChatLockSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ChatLockSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ChatLockSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a ChatRowOpaqueData. */ interface IChatRowOpaqueData { @@ -2400,6 +6999,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ChatRowOpaqueData + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace ChatRowOpaqueData { @@ -2433,10 +7039,10 @@ export namespace proto { constructor(properties?: proto.ChatRowOpaqueData.IDraftMessage); /** DraftMessage text. */ - public text: string; + public text?: (string|null); /** DraftMessage omittedUrl. */ - public omittedUrl: string; + public omittedUrl?: (string|null); /** DraftMessage ctwaContextLinkData. */ public ctwaContextLinkData?: (proto.ChatRowOpaqueData.DraftMessage.ICtwaContextLinkData|null); @@ -2445,7 +7051,7 @@ export namespace proto { public ctwaContext?: (proto.ChatRowOpaqueData.DraftMessage.ICtwaContextData|null); /** DraftMessage timestamp. */ - public timestamp: (number|Long); + public timestamp?: (number|Long|null); /** * Creates a new DraftMessage instance using the specified properties. @@ -2516,6 +7122,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DraftMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace DraftMessage { @@ -2570,40 +7183,40 @@ export namespace proto { constructor(properties?: proto.ChatRowOpaqueData.DraftMessage.ICtwaContextData); /** CtwaContextData conversionSource. */ - public conversionSource: string; + public conversionSource?: (string|null); /** CtwaContextData conversionData. */ - public conversionData: Uint8Array; + public conversionData?: (Uint8Array|null); /** CtwaContextData sourceUrl. */ - public sourceUrl: string; + public sourceUrl?: (string|null); /** CtwaContextData sourceId. */ - public sourceId: string; + public sourceId?: (string|null); /** CtwaContextData sourceType. */ - public sourceType: string; + public sourceType?: (string|null); /** CtwaContextData title. */ - public title: string; + public title?: (string|null); /** CtwaContextData description. */ - public description: string; + public description?: (string|null); /** CtwaContextData thumbnail. */ - public thumbnail: string; + public thumbnail?: (string|null); /** CtwaContextData thumbnailUrl. */ - public thumbnailUrl: string; + public thumbnailUrl?: (string|null); /** CtwaContextData mediaType. */ - public mediaType: proto.ChatRowOpaqueData.DraftMessage.CtwaContextData.ContextInfoExternalAdReplyInfoMediaType; + public mediaType?: (proto.ChatRowOpaqueData.DraftMessage.CtwaContextData.ContextInfoExternalAdReplyInfoMediaType|null); /** CtwaContextData mediaUrl. */ - public mediaUrl: string; + public mediaUrl?: (string|null); /** CtwaContextData isSuspiciousLink. */ - public isSuspiciousLink: boolean; + public isSuspiciousLink?: (boolean|null); /** * Creates a new CtwaContextData instance using the specified properties. @@ -2674,6 +7287,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CtwaContextData + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace CtwaContextData { @@ -2712,16 +7332,16 @@ export namespace proto { constructor(properties?: proto.ChatRowOpaqueData.DraftMessage.ICtwaContextLinkData); /** CtwaContextLinkData context. */ - public context: string; + public context?: (string|null); /** CtwaContextLinkData sourceUrl. */ - public sourceUrl: string; + public sourceUrl?: (string|null); /** CtwaContextLinkData icebreaker. */ - public icebreaker: string; + public icebreaker?: (string|null); /** CtwaContextLinkData phone. */ - public phone: string; + public phone?: (string|null); /** * Creates a new CtwaContextLinkData instance using the specified properties. @@ -2792,10 +7412,235 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CtwaContextLinkData + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } } + /** Properties of a Citation. */ + interface ICitation { + + /** Citation title */ + title: string; + + /** Citation subtitle */ + subtitle: string; + + /** Citation cmsId */ + cmsId: string; + + /** Citation imageUrl */ + imageUrl: string; + } + + /** Represents a Citation. */ + class Citation implements ICitation { + + /** + * Constructs a new Citation. + * @param [properties] Properties to set + */ + constructor(properties?: proto.ICitation); + + /** Citation title. */ + public title: string; + + /** Citation subtitle. */ + public subtitle: string; + + /** Citation cmsId. */ + public cmsId: string; + + /** Citation imageUrl. */ + public imageUrl: string; + + /** + * Creates a new Citation instance using the specified properties. + * @param [properties] Properties to set + * @returns Citation instance + */ + public static create(properties?: proto.ICitation): proto.Citation; + + /** + * Encodes the specified Citation message. Does not implicitly {@link proto.Citation.verify|verify} messages. + * @param message Citation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.ICitation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Citation message, length delimited. Does not implicitly {@link proto.Citation.verify|verify} messages. + * @param message Citation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.ICitation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Citation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Citation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.Citation; + + /** + * Decodes a Citation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Citation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.Citation; + + /** + * Verifies a Citation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Citation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Citation + */ + public static fromObject(object: { [k: string]: any }): proto.Citation; + + /** + * Creates a plain object from a Citation message. Also converts values to other types if specified. + * @param message Citation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Citation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Citation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Citation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ClientPairingProps. */ + interface IClientPairingProps { + + /** ClientPairingProps isChatDbLidMigrated */ + isChatDbLidMigrated?: (boolean|null); + + /** ClientPairingProps isSyncdPureLidSession */ + isSyncdPureLidSession?: (boolean|null); + } + + /** Represents a ClientPairingProps. */ + class ClientPairingProps implements IClientPairingProps { + + /** + * Constructs a new ClientPairingProps. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IClientPairingProps); + + /** ClientPairingProps isChatDbLidMigrated. */ + public isChatDbLidMigrated?: (boolean|null); + + /** ClientPairingProps isSyncdPureLidSession. */ + public isSyncdPureLidSession?: (boolean|null); + + /** + * Creates a new ClientPairingProps instance using the specified properties. + * @param [properties] Properties to set + * @returns ClientPairingProps instance + */ + public static create(properties?: proto.IClientPairingProps): proto.ClientPairingProps; + + /** + * Encodes the specified ClientPairingProps message. Does not implicitly {@link proto.ClientPairingProps.verify|verify} messages. + * @param message ClientPairingProps message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IClientPairingProps, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ClientPairingProps message, length delimited. Does not implicitly {@link proto.ClientPairingProps.verify|verify} messages. + * @param message ClientPairingProps message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IClientPairingProps, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ClientPairingProps message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ClientPairingProps + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.ClientPairingProps; + + /** + * Decodes a ClientPairingProps message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ClientPairingProps + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.ClientPairingProps; + + /** + * Verifies a ClientPairingProps message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ClientPairingProps message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ClientPairingProps + */ + public static fromObject(object: { [k: string]: any }): proto.ClientPairingProps; + + /** + * Creates a plain object from a ClientPairingProps message. Also converts values to other types if specified. + * @param message ClientPairingProps + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.ClientPairingProps, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ClientPairingProps to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ClientPairingProps + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a ClientPayload. */ interface IClientPayload { @@ -2879,6 +7724,9 @@ export namespace proto { /** ClientPayload interopData */ interopData?: (proto.ClientPayload.IInteropData|null); + + /** ClientPayload trafficAnonymization */ + trafficAnonymization?: (proto.ClientPayload.TrafficAnonymization|null); } /** Represents a ClientPayload. */ @@ -2891,10 +7739,10 @@ export namespace proto { constructor(properties?: proto.IClientPayload); /** ClientPayload username. */ - public username: (number|Long); + public username?: (number|Long|null); /** ClientPayload passive. */ - public passive: boolean; + public passive?: (boolean|null); /** ClientPayload userAgent. */ public userAgent?: (proto.ClientPayload.IUserAgent|null); @@ -2903,19 +7751,19 @@ export namespace proto { public webInfo?: (proto.ClientPayload.IWebInfo|null); /** ClientPayload pushName. */ - public pushName: string; + public pushName?: (string|null); /** ClientPayload sessionId. */ - public sessionId: number; + public sessionId?: (number|null); /** ClientPayload shortConnect. */ - public shortConnect: boolean; + public shortConnect?: (boolean|null); /** ClientPayload connectType. */ - public connectType: proto.ClientPayload.ConnectType; + public connectType?: (proto.ClientPayload.ConnectType|null); /** ClientPayload connectReason. */ - public connectReason: proto.ClientPayload.ConnectReason; + public connectReason?: (proto.ClientPayload.ConnectReason|null); /** ClientPayload shards. */ public shards: number[]; @@ -2924,53 +7772,56 @@ export namespace proto { public dnsSource?: (proto.ClientPayload.IDNSSource|null); /** ClientPayload connectAttemptCount. */ - public connectAttemptCount: number; + public connectAttemptCount?: (number|null); /** ClientPayload device. */ - public device: number; + public device?: (number|null); /** ClientPayload devicePairingData. */ public devicePairingData?: (proto.ClientPayload.IDevicePairingRegistrationData|null); /** ClientPayload product. */ - public product: proto.ClientPayload.Product; + public product?: (proto.ClientPayload.Product|null); /** ClientPayload fbCat. */ - public fbCat: Uint8Array; + public fbCat?: (Uint8Array|null); /** ClientPayload fbUserAgent. */ - public fbUserAgent: Uint8Array; + public fbUserAgent?: (Uint8Array|null); /** ClientPayload oc. */ - public oc: boolean; + public oc?: (boolean|null); /** ClientPayload lc. */ - public lc: number; + public lc?: (number|null); /** ClientPayload iosAppExtension. */ - public iosAppExtension: proto.ClientPayload.IOSAppExtension; + public iosAppExtension?: (proto.ClientPayload.IOSAppExtension|null); /** ClientPayload fbAppId. */ - public fbAppId: (number|Long); + public fbAppId?: (number|Long|null); /** ClientPayload fbDeviceId. */ - public fbDeviceId: Uint8Array; + public fbDeviceId?: (Uint8Array|null); /** ClientPayload pull. */ - public pull: boolean; + public pull?: (boolean|null); /** ClientPayload paddingBytes. */ - public paddingBytes: Uint8Array; + public paddingBytes?: (Uint8Array|null); /** ClientPayload yearClass. */ - public yearClass: number; + public yearClass?: (number|null); /** ClientPayload memClass. */ - public memClass: number; + public memClass?: (number|null); /** ClientPayload interopData. */ public interopData?: (proto.ClientPayload.IInteropData|null); + /** ClientPayload trafficAnonymization. */ + public trafficAnonymization?: (proto.ClientPayload.TrafficAnonymization|null); + /** * Creates a new ClientPayload instance using the specified properties. * @param [properties] Properties to set @@ -3040,6 +7891,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ClientPayload + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace ClientPayload { @@ -3094,10 +7952,10 @@ export namespace proto { constructor(properties?: proto.ClientPayload.IDNSSource); /** DNSSource dnsMethod. */ - public dnsMethod: proto.ClientPayload.DNSSource.DNSResolutionMethod; + public dnsMethod?: (proto.ClientPayload.DNSSource.DNSResolutionMethod|null); /** DNSSource appCached. */ - public appCached: boolean; + public appCached?: (boolean|null); /** * Creates a new DNSSource instance using the specified properties. @@ -3168,6 +8026,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DNSSource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace DNSSource { @@ -3178,7 +8043,8 @@ export namespace proto { GOOGLE = 1, HARDCODED = 2, OVERRIDE = 3, - FALLBACK = 4 + FALLBACK = 4, + MNS = 5 } } @@ -3220,28 +8086,28 @@ export namespace proto { constructor(properties?: proto.ClientPayload.IDevicePairingRegistrationData); /** DevicePairingRegistrationData eRegid. */ - public eRegid: Uint8Array; + public eRegid?: (Uint8Array|null); /** DevicePairingRegistrationData eKeytype. */ - public eKeytype: Uint8Array; + public eKeytype?: (Uint8Array|null); /** DevicePairingRegistrationData eIdent. */ - public eIdent: Uint8Array; + public eIdent?: (Uint8Array|null); /** DevicePairingRegistrationData eSkeyId. */ - public eSkeyId: Uint8Array; + public eSkeyId?: (Uint8Array|null); /** DevicePairingRegistrationData eSkeyVal. */ - public eSkeyVal: Uint8Array; + public eSkeyVal?: (Uint8Array|null); /** DevicePairingRegistrationData eSkeySig. */ - public eSkeySig: Uint8Array; + public eSkeySig?: (Uint8Array|null); /** DevicePairingRegistrationData buildHash. */ - public buildHash: Uint8Array; + public buildHash?: (Uint8Array|null); /** DevicePairingRegistrationData deviceProps. */ - public deviceProps: Uint8Array; + public deviceProps?: (Uint8Array|null); /** * Creates a new DevicePairingRegistrationData instance using the specified properties. @@ -3312,6 +8178,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DevicePairingRegistrationData + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** IOSAppExtension enum. */ @@ -3329,6 +8202,9 @@ export namespace proto { /** InteropData token */ token?: (Uint8Array|null); + + /** InteropData enableReadReceipts */ + enableReadReceipts?: (boolean|null); } /** Represents an InteropData. */ @@ -3341,10 +8217,13 @@ export namespace proto { constructor(properties?: proto.ClientPayload.IInteropData); /** InteropData accountId. */ - public accountId: (number|Long); + public accountId?: (number|Long|null); /** InteropData token. */ - public token: Uint8Array; + public token?: (Uint8Array|null); + + /** InteropData enableReadReceipts. */ + public enableReadReceipts?: (boolean|null); /** * Creates a new InteropData instance using the specified properties. @@ -3415,6 +8294,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InteropData + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Product enum. */ @@ -3425,6 +8311,12 @@ export namespace proto { INTEROP_MSGR = 3 } + /** TrafficAnonymization enum. */ + enum TrafficAnonymization { + OFF = 0, + STANDARD = 1 + } + /** Properties of a UserAgent. */ interface IUserAgent { @@ -3472,6 +8364,9 @@ export namespace proto { /** UserAgent deviceType */ deviceType?: (proto.ClientPayload.UserAgent.DeviceType|null); + + /** UserAgent deviceModelType */ + deviceModelType?: (string|null); } /** Represents a UserAgent. */ @@ -3484,49 +8379,52 @@ export namespace proto { constructor(properties?: proto.ClientPayload.IUserAgent); /** UserAgent platform. */ - public platform: proto.ClientPayload.UserAgent.Platform; + public platform?: (proto.ClientPayload.UserAgent.Platform|null); /** UserAgent appVersion. */ public appVersion?: (proto.ClientPayload.UserAgent.IAppVersion|null); /** UserAgent mcc. */ - public mcc: string; + public mcc?: (string|null); /** UserAgent mnc. */ - public mnc: string; + public mnc?: (string|null); /** UserAgent osVersion. */ - public osVersion: string; + public osVersion?: (string|null); /** UserAgent manufacturer. */ - public manufacturer: string; + public manufacturer?: (string|null); /** UserAgent device. */ - public device: string; + public device?: (string|null); /** UserAgent osBuildNumber. */ - public osBuildNumber: string; + public osBuildNumber?: (string|null); /** UserAgent phoneId. */ - public phoneId: string; + public phoneId?: (string|null); /** UserAgent releaseChannel. */ - public releaseChannel: proto.ClientPayload.UserAgent.ReleaseChannel; + public releaseChannel?: (proto.ClientPayload.UserAgent.ReleaseChannel|null); /** UserAgent localeLanguageIso6391. */ - public localeLanguageIso6391: string; + public localeLanguageIso6391?: (string|null); /** UserAgent localeCountryIso31661Alpha2. */ - public localeCountryIso31661Alpha2: string; + public localeCountryIso31661Alpha2?: (string|null); /** UserAgent deviceBoard. */ - public deviceBoard: string; + public deviceBoard?: (string|null); /** UserAgent deviceExpId. */ - public deviceExpId: string; + public deviceExpId?: (string|null); /** UserAgent deviceType. */ - public deviceType: proto.ClientPayload.UserAgent.DeviceType; + public deviceType?: (proto.ClientPayload.UserAgent.DeviceType|null); + + /** UserAgent deviceModelType. */ + public deviceModelType?: (string|null); /** * Creates a new UserAgent instance using the specified properties. @@ -3597,6 +8495,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UserAgent + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace UserAgent { @@ -3630,19 +8535,19 @@ export namespace proto { constructor(properties?: proto.ClientPayload.UserAgent.IAppVersion); /** AppVersion primary. */ - public primary: number; + public primary?: (number|null); /** AppVersion secondary. */ - public secondary: number; + public secondary?: (number|null); /** AppVersion tertiary. */ - public tertiary: number; + public tertiary?: (number|null); /** AppVersion quaternary. */ - public quaternary: number; + public quaternary?: (number|null); /** AppVersion quinary. */ - public quinary: number; + public quinary?: (number|null); /** * Creates a new AppVersion instance using the specified properties. @@ -3713,6 +8618,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AppVersion + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** DeviceType enum. */ @@ -3799,16 +8711,16 @@ export namespace proto { constructor(properties?: proto.ClientPayload.IWebInfo); /** WebInfo refToken. */ - public refToken: string; + public refToken?: (string|null); /** WebInfo version. */ - public version: string; + public version?: (string|null); /** WebInfo webdPayload. */ public webdPayload?: (proto.ClientPayload.WebInfo.IWebdPayload|null); /** WebInfo webSubPlatform. */ - public webSubPlatform: proto.ClientPayload.WebInfo.WebSubPlatform; + public webSubPlatform?: (proto.ClientPayload.WebInfo.WebSubPlatform|null); /** * Creates a new WebInfo instance using the specified properties. @@ -3879,6 +8791,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WebInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace WebInfo { @@ -3889,7 +8808,8 @@ export namespace proto { APP_STORE = 1, WIN_STORE = 2, DARWIN = 3, - WIN32 = 4 + WIN32 = 4, + WIN_HYBRID = 5 } /** Properties of a WebdPayload. */ @@ -3939,37 +8859,37 @@ export namespace proto { constructor(properties?: proto.ClientPayload.WebInfo.IWebdPayload); /** WebdPayload usesParticipantInKey. */ - public usesParticipantInKey: boolean; + public usesParticipantInKey?: (boolean|null); /** WebdPayload supportsStarredMessages. */ - public supportsStarredMessages: boolean; + public supportsStarredMessages?: (boolean|null); /** WebdPayload supportsDocumentMessages. */ - public supportsDocumentMessages: boolean; + public supportsDocumentMessages?: (boolean|null); /** WebdPayload supportsUrlMessages. */ - public supportsUrlMessages: boolean; + public supportsUrlMessages?: (boolean|null); /** WebdPayload supportsMediaRetry. */ - public supportsMediaRetry: boolean; + public supportsMediaRetry?: (boolean|null); /** WebdPayload supportsE2EImage. */ - public supportsE2EImage: boolean; + public supportsE2EImage?: (boolean|null); /** WebdPayload supportsE2EVideo. */ - public supportsE2EVideo: boolean; + public supportsE2EVideo?: (boolean|null); /** WebdPayload supportsE2EAudio. */ - public supportsE2EAudio: boolean; + public supportsE2EAudio?: (boolean|null); /** WebdPayload supportsE2EDocument. */ - public supportsE2EDocument: boolean; + public supportsE2EDocument?: (boolean|null); /** WebdPayload documentTypes. */ - public documentTypes: string; + public documentTypes?: (string|null); /** WebdPayload features. */ - public features: Uint8Array; + public features?: (Uint8Array|null); /** * Creates a new WebdPayload instance using the specified properties. @@ -4040,6 +8960,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WebdPayload + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } } @@ -4067,7 +8994,7 @@ export namespace proto { public commentParentKey?: (proto.IMessageKey|null); /** CommentMetadata replyCount. */ - public replyCount: number; + public replyCount?: (number|null); /** * Creates a new CommentMetadata instance using the specified properties. @@ -4138,6 +9065,322 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CommentMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CompanionCommitment. */ + interface ICompanionCommitment { + + /** CompanionCommitment hash */ + hash?: (Uint8Array|null); + } + + /** Represents a CompanionCommitment. */ + class CompanionCommitment implements ICompanionCommitment { + + /** + * Constructs a new CompanionCommitment. + * @param [properties] Properties to set + */ + constructor(properties?: proto.ICompanionCommitment); + + /** CompanionCommitment hash. */ + public hash?: (Uint8Array|null); + + /** + * Creates a new CompanionCommitment instance using the specified properties. + * @param [properties] Properties to set + * @returns CompanionCommitment instance + */ + public static create(properties?: proto.ICompanionCommitment): proto.CompanionCommitment; + + /** + * Encodes the specified CompanionCommitment message. Does not implicitly {@link proto.CompanionCommitment.verify|verify} messages. + * @param message CompanionCommitment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.ICompanionCommitment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CompanionCommitment message, length delimited. Does not implicitly {@link proto.CompanionCommitment.verify|verify} messages. + * @param message CompanionCommitment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.ICompanionCommitment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CompanionCommitment message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CompanionCommitment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.CompanionCommitment; + + /** + * Decodes a CompanionCommitment message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CompanionCommitment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.CompanionCommitment; + + /** + * Verifies a CompanionCommitment message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CompanionCommitment message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CompanionCommitment + */ + public static fromObject(object: { [k: string]: any }): proto.CompanionCommitment; + + /** + * Creates a plain object from a CompanionCommitment message. Also converts values to other types if specified. + * @param message CompanionCommitment + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.CompanionCommitment, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CompanionCommitment to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CompanionCommitment + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CompanionEphemeralIdentity. */ + interface ICompanionEphemeralIdentity { + + /** CompanionEphemeralIdentity publicKey */ + publicKey?: (Uint8Array|null); + + /** CompanionEphemeralIdentity deviceType */ + deviceType?: (proto.DeviceProps.PlatformType|null); + + /** CompanionEphemeralIdentity ref */ + ref?: (string|null); + } + + /** Represents a CompanionEphemeralIdentity. */ + class CompanionEphemeralIdentity implements ICompanionEphemeralIdentity { + + /** + * Constructs a new CompanionEphemeralIdentity. + * @param [properties] Properties to set + */ + constructor(properties?: proto.ICompanionEphemeralIdentity); + + /** CompanionEphemeralIdentity publicKey. */ + public publicKey?: (Uint8Array|null); + + /** CompanionEphemeralIdentity deviceType. */ + public deviceType?: (proto.DeviceProps.PlatformType|null); + + /** CompanionEphemeralIdentity ref. */ + public ref?: (string|null); + + /** + * Creates a new CompanionEphemeralIdentity instance using the specified properties. + * @param [properties] Properties to set + * @returns CompanionEphemeralIdentity instance + */ + public static create(properties?: proto.ICompanionEphemeralIdentity): proto.CompanionEphemeralIdentity; + + /** + * Encodes the specified CompanionEphemeralIdentity message. Does not implicitly {@link proto.CompanionEphemeralIdentity.verify|verify} messages. + * @param message CompanionEphemeralIdentity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.ICompanionEphemeralIdentity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CompanionEphemeralIdentity message, length delimited. Does not implicitly {@link proto.CompanionEphemeralIdentity.verify|verify} messages. + * @param message CompanionEphemeralIdentity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.ICompanionEphemeralIdentity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CompanionEphemeralIdentity message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CompanionEphemeralIdentity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.CompanionEphemeralIdentity; + + /** + * Decodes a CompanionEphemeralIdentity message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CompanionEphemeralIdentity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.CompanionEphemeralIdentity; + + /** + * Verifies a CompanionEphemeralIdentity message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CompanionEphemeralIdentity message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CompanionEphemeralIdentity + */ + public static fromObject(object: { [k: string]: any }): proto.CompanionEphemeralIdentity; + + /** + * Creates a plain object from a CompanionEphemeralIdentity message. Also converts values to other types if specified. + * @param message CompanionEphemeralIdentity + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.CompanionEphemeralIdentity, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CompanionEphemeralIdentity to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CompanionEphemeralIdentity + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Config. */ + interface IConfig { + + /** Config field */ + field?: ({ [k: string]: proto.IField }|null); + + /** Config version */ + version?: (number|null); + } + + /** Represents a Config. */ + class Config implements IConfig { + + /** + * Constructs a new Config. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IConfig); + + /** Config field. */ + public field: { [k: string]: proto.IField }; + + /** Config version. */ + public version?: (number|null); + + /** + * Creates a new Config instance using the specified properties. + * @param [properties] Properties to set + * @returns Config instance + */ + public static create(properties?: proto.IConfig): proto.Config; + + /** + * Encodes the specified Config message. Does not implicitly {@link proto.Config.verify|verify} messages. + * @param message Config message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Config message, length delimited. Does not implicitly {@link proto.Config.verify|verify} messages. + * @param message Config message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Config message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Config + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.Config; + + /** + * Decodes a Config message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Config + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.Config; + + /** + * Verifies a Config message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Config message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Config + */ + public static fromObject(object: { [k: string]: any }): proto.Config; + + /** + * Creates a plain object from a Config message. Also converts values to other types if specified. + * @param message Config + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Config, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Config to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Config + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ContextInfo. */ @@ -4241,6 +9484,39 @@ export namespace proto { /** ContextInfo dataSharingContext */ dataSharingContext?: (proto.ContextInfo.IDataSharingContext|null); + + /** ContextInfo alwaysShowAdAttribution */ + alwaysShowAdAttribution?: (boolean|null); + + /** ContextInfo featureEligibilities */ + featureEligibilities?: (proto.ContextInfo.IFeatureEligibilities|null); + + /** ContextInfo entryPointConversionExternalSource */ + entryPointConversionExternalSource?: (string|null); + + /** ContextInfo entryPointConversionExternalMedium */ + entryPointConversionExternalMedium?: (string|null); + + /** ContextInfo ctwaSignals */ + ctwaSignals?: (string|null); + + /** ContextInfo ctwaPayload */ + ctwaPayload?: (Uint8Array|null); + + /** ContextInfo forwardedAiBotMessageInfo */ + forwardedAiBotMessageInfo?: (proto.ContextInfo.IForwardedAIBotMessageInfo|null); + + /** ContextInfo statusAttributionType */ + statusAttributionType?: (proto.ContextInfo.StatusAttributionType|null); + + /** ContextInfo urlTrackingMap */ + urlTrackingMap?: (proto.IUrlTrackingMap|null); + + /** ContextInfo pairedMediaType */ + pairedMediaType?: (proto.ContextInfo.PairedMediaType|null); + + /** ContextInfo rankingVersion */ + rankingVersion?: (number|null); } /** Represents a ContextInfo. */ @@ -4253,34 +9529,34 @@ export namespace proto { constructor(properties?: proto.IContextInfo); /** ContextInfo stanzaId. */ - public stanzaId: string; + public stanzaId?: (string|null); /** ContextInfo participant. */ - public participant: string; + public participant?: (string|null); /** ContextInfo quotedMessage. */ public quotedMessage?: (proto.IMessage|null); /** ContextInfo remoteJid. */ - public remoteJid: string; + public remoteJid?: (string|null); /** ContextInfo mentionedJid. */ public mentionedJid: string[]; /** ContextInfo conversionSource. */ - public conversionSource: string; + public conversionSource?: (string|null); /** ContextInfo conversionData. */ - public conversionData: Uint8Array; + public conversionData?: (Uint8Array|null); /** ContextInfo conversionDelaySeconds. */ - public conversionDelaySeconds: number; + public conversionDelaySeconds?: (number|null); /** ContextInfo forwardingScore. */ - public forwardingScore: number; + public forwardingScore?: (number|null); /** ContextInfo isForwarded. */ - public isForwarded: boolean; + public isForwarded?: (boolean|null); /** ContextInfo quotedAd. */ public quotedAd?: (proto.ContextInfo.IAdReplyInfo|null); @@ -4289,25 +9565,25 @@ export namespace proto { public placeholderKey?: (proto.IMessageKey|null); /** ContextInfo expiration. */ - public expiration: number; + public expiration?: (number|null); /** ContextInfo ephemeralSettingTimestamp. */ - public ephemeralSettingTimestamp: (number|Long); + public ephemeralSettingTimestamp?: (number|Long|null); /** ContextInfo ephemeralSharedSecret. */ - public ephemeralSharedSecret: Uint8Array; + public ephemeralSharedSecret?: (Uint8Array|null); /** ContextInfo externalAdReply. */ public externalAdReply?: (proto.ContextInfo.IExternalAdReplyInfo|null); /** ContextInfo entryPointConversionSource. */ - public entryPointConversionSource: string; + public entryPointConversionSource?: (string|null); /** ContextInfo entryPointConversionApp. */ - public entryPointConversionApp: string; + public entryPointConversionApp?: (string|null); /** ContextInfo entryPointConversionDelaySeconds. */ - public entryPointConversionDelaySeconds: number; + public entryPointConversionDelaySeconds?: (number|null); /** ContextInfo disappearingMode. */ public disappearingMode?: (proto.IDisappearingMode|null); @@ -4316,19 +9592,19 @@ export namespace proto { public actionLink?: (proto.IActionLink|null); /** ContextInfo groupSubject. */ - public groupSubject: string; + public groupSubject?: (string|null); /** ContextInfo parentGroupJid. */ - public parentGroupJid: string; + public parentGroupJid?: (string|null); /** ContextInfo trustBannerType. */ - public trustBannerType: string; + public trustBannerType?: (string|null); /** ContextInfo trustBannerAction. */ - public trustBannerAction: number; + public trustBannerAction?: (number|null); /** ContextInfo isSampled. */ - public isSampled: boolean; + public isSampled?: (boolean|null); /** ContextInfo groupMentions. */ public groupMentions: proto.IGroupMention[]; @@ -4343,14 +9619,47 @@ export namespace proto { public businessMessageForwardInfo?: (proto.ContextInfo.IBusinessMessageForwardInfo|null); /** ContextInfo smbClientCampaignId. */ - public smbClientCampaignId: string; + public smbClientCampaignId?: (string|null); /** ContextInfo smbServerCampaignId. */ - public smbServerCampaignId: string; + public smbServerCampaignId?: (string|null); /** ContextInfo dataSharingContext. */ public dataSharingContext?: (proto.ContextInfo.IDataSharingContext|null); + /** ContextInfo alwaysShowAdAttribution. */ + public alwaysShowAdAttribution?: (boolean|null); + + /** ContextInfo featureEligibilities. */ + public featureEligibilities?: (proto.ContextInfo.IFeatureEligibilities|null); + + /** ContextInfo entryPointConversionExternalSource. */ + public entryPointConversionExternalSource?: (string|null); + + /** ContextInfo entryPointConversionExternalMedium. */ + public entryPointConversionExternalMedium?: (string|null); + + /** ContextInfo ctwaSignals. */ + public ctwaSignals?: (string|null); + + /** ContextInfo ctwaPayload. */ + public ctwaPayload?: (Uint8Array|null); + + /** ContextInfo forwardedAiBotMessageInfo. */ + public forwardedAiBotMessageInfo?: (proto.ContextInfo.IForwardedAIBotMessageInfo|null); + + /** ContextInfo statusAttributionType. */ + public statusAttributionType?: (proto.ContextInfo.StatusAttributionType|null); + + /** ContextInfo urlTrackingMap. */ + public urlTrackingMap?: (proto.IUrlTrackingMap|null); + + /** ContextInfo pairedMediaType. */ + public pairedMediaType?: (proto.ContextInfo.PairedMediaType|null); + + /** ContextInfo rankingVersion. */ + public rankingVersion?: (number|null); + /** * Creates a new ContextInfo instance using the specified properties. * @param [properties] Properties to set @@ -4420,6 +9729,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ContextInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace ContextInfo { @@ -4450,16 +9766,16 @@ export namespace proto { constructor(properties?: proto.ContextInfo.IAdReplyInfo); /** AdReplyInfo advertiserName. */ - public advertiserName: string; + public advertiserName?: (string|null); /** AdReplyInfo mediaType. */ - public mediaType: proto.ContextInfo.AdReplyInfo.MediaType; + public mediaType?: (proto.ContextInfo.AdReplyInfo.MediaType|null); /** AdReplyInfo jpegThumbnail. */ - public jpegThumbnail: Uint8Array; + public jpegThumbnail?: (Uint8Array|null); /** AdReplyInfo caption. */ - public caption: string; + public caption?: (string|null); /** * Creates a new AdReplyInfo instance using the specified properties. @@ -4530,6 +9846,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AdReplyInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace AdReplyInfo { @@ -4559,7 +9882,7 @@ export namespace proto { constructor(properties?: proto.ContextInfo.IBusinessMessageForwardInfo); /** BusinessMessageForwardInfo businessOwnerJid. */ - public businessOwnerJid: string; + public businessOwnerJid?: (string|null); /** * Creates a new BusinessMessageForwardInfo instance using the specified properties. @@ -4630,6 +9953,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BusinessMessageForwardInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DataSharingContext. */ @@ -4637,6 +9967,12 @@ export namespace proto { /** DataSharingContext showMmDisclosure */ showMmDisclosure?: (boolean|null); + + /** DataSharingContext encryptedSignalTokenConsented */ + encryptedSignalTokenConsented?: (string|null); + + /** DataSharingContext parameters */ + parameters?: (proto.ContextInfo.DataSharingContext.IParameters[]|null); } /** Represents a DataSharingContext. */ @@ -4649,7 +9985,13 @@ export namespace proto { constructor(properties?: proto.ContextInfo.IDataSharingContext); /** DataSharingContext showMmDisclosure. */ - public showMmDisclosure: boolean; + public showMmDisclosure?: (boolean|null); + + /** DataSharingContext encryptedSignalTokenConsented. */ + public encryptedSignalTokenConsented?: (string|null); + + /** DataSharingContext parameters. */ + public parameters: proto.ContextInfo.DataSharingContext.IParameters[]; /** * Creates a new DataSharingContext instance using the specified properties. @@ -4720,6 +10062,137 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataSharingContext + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DataSharingContext { + + /** Properties of a Parameters. */ + interface IParameters { + + /** Parameters key */ + key?: (string|null); + + /** Parameters stringData */ + stringData?: (string|null); + + /** Parameters intData */ + intData?: (number|Long|null); + + /** Parameters floatData */ + floatData?: (number|null); + + /** Parameters contents */ + contents?: (proto.ContextInfo.DataSharingContext.IParameters|null); + } + + /** Represents a Parameters. */ + class Parameters implements IParameters { + + /** + * Constructs a new Parameters. + * @param [properties] Properties to set + */ + constructor(properties?: proto.ContextInfo.DataSharingContext.IParameters); + + /** Parameters key. */ + public key?: (string|null); + + /** Parameters stringData. */ + public stringData?: (string|null); + + /** Parameters intData. */ + public intData?: (number|Long|null); + + /** Parameters floatData. */ + public floatData?: (number|null); + + /** Parameters contents. */ + public contents?: (proto.ContextInfo.DataSharingContext.IParameters|null); + + /** + * Creates a new Parameters instance using the specified properties. + * @param [properties] Properties to set + * @returns Parameters instance + */ + public static create(properties?: proto.ContextInfo.DataSharingContext.IParameters): proto.ContextInfo.DataSharingContext.Parameters; + + /** + * Encodes the specified Parameters message. Does not implicitly {@link proto.ContextInfo.DataSharingContext.Parameters.verify|verify} messages. + * @param message Parameters message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.ContextInfo.DataSharingContext.IParameters, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Parameters message, length delimited. Does not implicitly {@link proto.ContextInfo.DataSharingContext.Parameters.verify|verify} messages. + * @param message Parameters message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.ContextInfo.DataSharingContext.IParameters, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Parameters message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Parameters + * @throws {Error} If the payload is not 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.DataSharingContext.Parameters; + + /** + * Decodes a Parameters message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Parameters + * @throws {Error} If the payload 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.DataSharingContext.Parameters; + + /** + * Verifies a Parameters message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Parameters message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Parameters + */ + public static fromObject(object: { [k: string]: any }): proto.ContextInfo.DataSharingContext.Parameters; + + /** + * Creates a plain object from a Parameters message. Also converts values to other types if specified. + * @param message Parameters + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.ContextInfo.DataSharingContext.Parameters, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Parameters to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Parameters + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } } /** Properties of an ExternalAdReplyInfo. */ @@ -4766,6 +10239,30 @@ export namespace proto { /** ExternalAdReplyInfo ref */ ref?: (string|null); + + /** ExternalAdReplyInfo clickToWhatsappCall */ + clickToWhatsappCall?: (boolean|null); + + /** ExternalAdReplyInfo adContextPreviewDismissed */ + adContextPreviewDismissed?: (boolean|null); + + /** ExternalAdReplyInfo sourceApp */ + sourceApp?: (string|null); + + /** ExternalAdReplyInfo automatedGreetingMessageShown */ + automatedGreetingMessageShown?: (boolean|null); + + /** ExternalAdReplyInfo greetingMessageBody */ + greetingMessageBody?: (string|null); + + /** ExternalAdReplyInfo ctaPayload */ + ctaPayload?: (string|null); + + /** ExternalAdReplyInfo disableNudge */ + disableNudge?: (boolean|null); + + /** ExternalAdReplyInfo originalImageUrl */ + originalImageUrl?: (string|null); } /** Represents an ExternalAdReplyInfo. */ @@ -4778,46 +10275,70 @@ export namespace proto { constructor(properties?: proto.ContextInfo.IExternalAdReplyInfo); /** ExternalAdReplyInfo title. */ - public title: string; + public title?: (string|null); /** ExternalAdReplyInfo body. */ - public body: string; + public body?: (string|null); /** ExternalAdReplyInfo mediaType. */ - public mediaType: proto.ContextInfo.ExternalAdReplyInfo.MediaType; + public mediaType?: (proto.ContextInfo.ExternalAdReplyInfo.MediaType|null); /** ExternalAdReplyInfo thumbnailUrl. */ - public thumbnailUrl: string; + public thumbnailUrl?: (string|null); /** ExternalAdReplyInfo mediaUrl. */ - public mediaUrl: string; + public mediaUrl?: (string|null); /** ExternalAdReplyInfo thumbnail. */ - public thumbnail: Uint8Array; + public thumbnail?: (Uint8Array|null); /** ExternalAdReplyInfo sourceType. */ - public sourceType: string; + public sourceType?: (string|null); /** ExternalAdReplyInfo sourceId. */ - public sourceId: string; + public sourceId?: (string|null); /** ExternalAdReplyInfo sourceUrl. */ - public sourceUrl: string; + public sourceUrl?: (string|null); /** ExternalAdReplyInfo containsAutoReply. */ - public containsAutoReply: boolean; + public containsAutoReply?: (boolean|null); /** ExternalAdReplyInfo renderLargerThumbnail. */ - public renderLargerThumbnail: boolean; + public renderLargerThumbnail?: (boolean|null); /** ExternalAdReplyInfo showAdAttribution. */ - public showAdAttribution: boolean; + public showAdAttribution?: (boolean|null); /** ExternalAdReplyInfo ctwaClid. */ - public ctwaClid: string; + public ctwaClid?: (string|null); /** ExternalAdReplyInfo ref. */ - public ref: string; + public ref?: (string|null); + + /** ExternalAdReplyInfo clickToWhatsappCall. */ + public clickToWhatsappCall?: (boolean|null); + + /** ExternalAdReplyInfo adContextPreviewDismissed. */ + public adContextPreviewDismissed?: (boolean|null); + + /** ExternalAdReplyInfo sourceApp. */ + public sourceApp?: (string|null); + + /** ExternalAdReplyInfo automatedGreetingMessageShown. */ + public automatedGreetingMessageShown?: (boolean|null); + + /** ExternalAdReplyInfo greetingMessageBody. */ + public greetingMessageBody?: (string|null); + + /** ExternalAdReplyInfo ctaPayload. */ + public ctaPayload?: (string|null); + + /** ExternalAdReplyInfo disableNudge. */ + public disableNudge?: (boolean|null); + + /** ExternalAdReplyInfo originalImageUrl. */ + public originalImageUrl?: (string|null); /** * Creates a new ExternalAdReplyInfo instance using the specified properties. @@ -4888,6 +10409,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExternalAdReplyInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace ExternalAdReplyInfo { @@ -4900,6 +10428,230 @@ export namespace proto { } } + /** Properties of a FeatureEligibilities. */ + interface IFeatureEligibilities { + + /** FeatureEligibilities cannotBeReactedTo */ + cannotBeReactedTo?: (boolean|null); + + /** FeatureEligibilities cannotBeRanked */ + cannotBeRanked?: (boolean|null); + + /** FeatureEligibilities canRequestFeedback */ + canRequestFeedback?: (boolean|null); + + /** FeatureEligibilities canBeReshared */ + canBeReshared?: (boolean|null); + } + + /** Represents a FeatureEligibilities. */ + class FeatureEligibilities implements IFeatureEligibilities { + + /** + * Constructs a new FeatureEligibilities. + * @param [properties] Properties to set + */ + constructor(properties?: proto.ContextInfo.IFeatureEligibilities); + + /** FeatureEligibilities cannotBeReactedTo. */ + public cannotBeReactedTo?: (boolean|null); + + /** FeatureEligibilities cannotBeRanked. */ + public cannotBeRanked?: (boolean|null); + + /** FeatureEligibilities canRequestFeedback. */ + public canRequestFeedback?: (boolean|null); + + /** FeatureEligibilities canBeReshared. */ + public canBeReshared?: (boolean|null); + + /** + * Creates a new FeatureEligibilities instance using the specified properties. + * @param [properties] Properties to set + * @returns FeatureEligibilities instance + */ + public static create(properties?: proto.ContextInfo.IFeatureEligibilities): proto.ContextInfo.FeatureEligibilities; + + /** + * Encodes the specified FeatureEligibilities message. Does not implicitly {@link proto.ContextInfo.FeatureEligibilities.verify|verify} messages. + * @param message FeatureEligibilities message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.ContextInfo.IFeatureEligibilities, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FeatureEligibilities message, length delimited. Does not implicitly {@link proto.ContextInfo.FeatureEligibilities.verify|verify} messages. + * @param message FeatureEligibilities message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.ContextInfo.IFeatureEligibilities, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeatureEligibilities message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeatureEligibilities + * @throws {Error} If the payload is not 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.FeatureEligibilities; + + /** + * Decodes a FeatureEligibilities message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeatureEligibilities + * @throws {Error} If the payload 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.FeatureEligibilities; + + /** + * Verifies a FeatureEligibilities message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FeatureEligibilities message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeatureEligibilities + */ + public static fromObject(object: { [k: string]: any }): proto.ContextInfo.FeatureEligibilities; + + /** + * Creates a plain object from a FeatureEligibilities message. Also converts values to other types if specified. + * @param message FeatureEligibilities + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.ContextInfo.FeatureEligibilities, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FeatureEligibilities to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeatureEligibilities + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ForwardedAIBotMessageInfo. */ + interface IForwardedAIBotMessageInfo { + + /** ForwardedAIBotMessageInfo botName */ + botName?: (string|null); + + /** ForwardedAIBotMessageInfo botJid */ + botJid?: (string|null); + + /** ForwardedAIBotMessageInfo creatorName */ + creatorName?: (string|null); + } + + /** Represents a ForwardedAIBotMessageInfo. */ + class ForwardedAIBotMessageInfo implements IForwardedAIBotMessageInfo { + + /** + * Constructs a new ForwardedAIBotMessageInfo. + * @param [properties] Properties to set + */ + constructor(properties?: proto.ContextInfo.IForwardedAIBotMessageInfo); + + /** ForwardedAIBotMessageInfo botName. */ + public botName?: (string|null); + + /** ForwardedAIBotMessageInfo botJid. */ + public botJid?: (string|null); + + /** ForwardedAIBotMessageInfo creatorName. */ + public creatorName?: (string|null); + + /** + * Creates a new ForwardedAIBotMessageInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns ForwardedAIBotMessageInfo instance + */ + public static create(properties?: proto.ContextInfo.IForwardedAIBotMessageInfo): proto.ContextInfo.ForwardedAIBotMessageInfo; + + /** + * Encodes the specified ForwardedAIBotMessageInfo message. Does not implicitly {@link proto.ContextInfo.ForwardedAIBotMessageInfo.verify|verify} messages. + * @param message ForwardedAIBotMessageInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.ContextInfo.IForwardedAIBotMessageInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ForwardedAIBotMessageInfo message, length delimited. Does not implicitly {@link proto.ContextInfo.ForwardedAIBotMessageInfo.verify|verify} messages. + * @param message ForwardedAIBotMessageInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.ContextInfo.IForwardedAIBotMessageInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ForwardedAIBotMessageInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ForwardedAIBotMessageInfo + * @throws {Error} If the payload is not 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.ForwardedAIBotMessageInfo; + + /** + * Decodes a ForwardedAIBotMessageInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ForwardedAIBotMessageInfo + * @throws {Error} If the payload 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.ForwardedAIBotMessageInfo; + + /** + * Verifies a ForwardedAIBotMessageInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ForwardedAIBotMessageInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ForwardedAIBotMessageInfo + */ + public static fromObject(object: { [k: string]: any }): proto.ContextInfo.ForwardedAIBotMessageInfo; + + /** + * Creates a plain object from a ForwardedAIBotMessageInfo message. Also converts values to other types if specified. + * @param message ForwardedAIBotMessageInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.ContextInfo.ForwardedAIBotMessageInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ForwardedAIBotMessageInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ForwardedAIBotMessageInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a ForwardedNewsletterMessageInfo. */ interface IForwardedNewsletterMessageInfo { @@ -4929,19 +10681,19 @@ export namespace proto { constructor(properties?: proto.ContextInfo.IForwardedNewsletterMessageInfo); /** ForwardedNewsletterMessageInfo newsletterJid. */ - public newsletterJid: string; + public newsletterJid?: (string|null); /** ForwardedNewsletterMessageInfo serverMessageId. */ - public serverMessageId: number; + public serverMessageId?: (number|null); /** ForwardedNewsletterMessageInfo newsletterName. */ - public newsletterName: string; + public newsletterName?: (string|null); /** ForwardedNewsletterMessageInfo contentType. */ - public contentType: proto.ContextInfo.ForwardedNewsletterMessageInfo.ContentType; + public contentType?: (proto.ContextInfo.ForwardedNewsletterMessageInfo.ContentType|null); /** ForwardedNewsletterMessageInfo accessibilityText. */ - public accessibilityText: string; + public accessibilityText?: (string|null); /** * Creates a new ForwardedNewsletterMessageInfo instance using the specified properties. @@ -5012,6 +10764,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ForwardedNewsletterMessageInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace ForwardedNewsletterMessageInfo { @@ -5024,6 +10783,22 @@ export namespace proto { } } + /** PairedMediaType enum. */ + enum PairedMediaType { + NOT_PAIRED_MEDIA = 0, + SD_VIDEO_PARENT = 1, + HD_VIDEO_CHILD = 2, + SD_IMAGE_PARENT = 3, + HD_IMAGE_CHILD = 4 + } + + /** StatusAttributionType enum. */ + enum StatusAttributionType { + NONE = 0, + RESHARED_FROM_MENTION = 1, + RESHARED_FROM_POST = 2 + } + /** Properties of a UTMInfo. */ interface IUTMInfo { @@ -5044,10 +10819,10 @@ export namespace proto { constructor(properties?: proto.ContextInfo.IUTMInfo); /** UTMInfo utmSource. */ - public utmSource: string; + public utmSource?: (string|null); /** UTMInfo utmCampaign. */ - public utmCampaign: string; + public utmCampaign?: (string|null); /** * Creates a new UTMInfo instance using the specified properties. @@ -5118,6 +10893,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UTMInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -5258,6 +11040,21 @@ export namespace proto { /** Conversation commentsCount */ commentsCount?: (number|null); + + /** Conversation locked */ + locked?: (boolean|null); + + /** Conversation systemMessageToInsert */ + systemMessageToInsert?: (proto.PrivacySystemMessage|null); + + /** Conversation capiCreatedGroup */ + capiCreatedGroup?: (boolean|null); + + /** Conversation accountLid */ + accountLid?: (string|null); + + /** Conversation limitSharing */ + limitSharing?: (boolean|null); } /** Represents a Conversation. */ @@ -5276,133 +11073,148 @@ export namespace proto { public messages: proto.IHistorySyncMsg[]; /** Conversation newJid. */ - public newJid: string; + public newJid?: (string|null); /** Conversation oldJid. */ - public oldJid: string; + public oldJid?: (string|null); /** Conversation lastMsgTimestamp. */ - public lastMsgTimestamp: (number|Long); + public lastMsgTimestamp?: (number|Long|null); /** Conversation unreadCount. */ - public unreadCount: number; + public unreadCount?: (number|null); /** Conversation readOnly. */ - public readOnly: boolean; + public readOnly?: (boolean|null); /** Conversation endOfHistoryTransfer. */ - public endOfHistoryTransfer: boolean; + public endOfHistoryTransfer?: (boolean|null); /** Conversation ephemeralExpiration. */ - public ephemeralExpiration: number; + public ephemeralExpiration?: (number|null); /** Conversation ephemeralSettingTimestamp. */ - public ephemeralSettingTimestamp: (number|Long); + public ephemeralSettingTimestamp?: (number|Long|null); /** Conversation endOfHistoryTransferType. */ - public endOfHistoryTransferType: proto.Conversation.EndOfHistoryTransferType; + public endOfHistoryTransferType?: (proto.Conversation.EndOfHistoryTransferType|null); /** Conversation conversationTimestamp. */ - public conversationTimestamp: (number|Long); + public conversationTimestamp?: (number|Long|null); /** Conversation name. */ - public name: string; + public name?: (string|null); /** Conversation pHash. */ - public pHash: string; + public pHash?: (string|null); /** Conversation notSpam. */ - public notSpam: boolean; + public notSpam?: (boolean|null); /** Conversation archived. */ - public archived: boolean; + public archived?: (boolean|null); /** Conversation disappearingMode. */ public disappearingMode?: (proto.IDisappearingMode|null); /** Conversation unreadMentionCount. */ - public unreadMentionCount: number; + public unreadMentionCount?: (number|null); /** Conversation markedAsUnread. */ - public markedAsUnread: boolean; + public markedAsUnread?: (boolean|null); /** Conversation participant. */ public participant: proto.IGroupParticipant[]; /** Conversation tcToken. */ - public tcToken: Uint8Array; + public tcToken?: (Uint8Array|null); /** Conversation tcTokenTimestamp. */ - public tcTokenTimestamp: (number|Long); + public tcTokenTimestamp?: (number|Long|null); /** Conversation contactPrimaryIdentityKey. */ - public contactPrimaryIdentityKey: Uint8Array; + public contactPrimaryIdentityKey?: (Uint8Array|null); /** Conversation pinned. */ - public pinned: number; + public pinned?: (number|null); /** Conversation muteEndTime. */ - public muteEndTime: (number|Long); + public muteEndTime?: (number|Long|null); /** Conversation wallpaper. */ public wallpaper?: (proto.IWallpaperSettings|null); /** Conversation mediaVisibility. */ - public mediaVisibility: proto.MediaVisibility; + public mediaVisibility?: (proto.MediaVisibility|null); /** Conversation tcTokenSenderTimestamp. */ - public tcTokenSenderTimestamp: (number|Long); + public tcTokenSenderTimestamp?: (number|Long|null); /** Conversation suspended. */ - public suspended: boolean; + public suspended?: (boolean|null); /** Conversation terminated. */ - public terminated: boolean; + public terminated?: (boolean|null); /** Conversation createdAt. */ - public createdAt: (number|Long); + public createdAt?: (number|Long|null); /** Conversation createdBy. */ - public createdBy: string; + public createdBy?: (string|null); /** Conversation description. */ - public description: string; + public description?: (string|null); /** Conversation support. */ - public support: boolean; + public support?: (boolean|null); /** Conversation isParentGroup. */ - public isParentGroup: boolean; + public isParentGroup?: (boolean|null); /** Conversation parentGroupId. */ - public parentGroupId: string; + public parentGroupId?: (string|null); /** Conversation isDefaultSubgroup. */ - public isDefaultSubgroup: boolean; + public isDefaultSubgroup?: (boolean|null); /** Conversation displayName. */ - public displayName: string; + public displayName?: (string|null); /** Conversation pnJid. */ - public pnJid: string; + public pnJid?: (string|null); /** Conversation shareOwnPn. */ - public shareOwnPn: boolean; + public shareOwnPn?: (boolean|null); /** Conversation pnhDuplicateLidThread. */ - public pnhDuplicateLidThread: boolean; + public pnhDuplicateLidThread?: (boolean|null); /** Conversation lidJid. */ - public lidJid: string; + public lidJid?: (string|null); /** Conversation username. */ - public username: string; + public username?: (string|null); /** Conversation lidOriginType. */ - public lidOriginType: string; + public lidOriginType?: (string|null); /** Conversation commentsCount. */ - public commentsCount: number; + public commentsCount?: (number|null); + + /** Conversation locked. */ + public locked?: (boolean|null); + + /** Conversation systemMessageToInsert. */ + public systemMessageToInsert?: (proto.PrivacySystemMessage|null); + + /** Conversation capiCreatedGroup. */ + public capiCreatedGroup?: (boolean|null); + + /** Conversation accountLid. */ + public accountLid?: (string|null); + + /** Conversation limitSharing. */ + public limitSharing?: (boolean|null); /** * Creates a new Conversation instance using the specified properties. @@ -5473,6 +11285,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Conversation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace Conversation { @@ -5485,6 +11304,216 @@ export namespace proto { } } + /** Properties of a DeviceCapabilities. */ + interface IDeviceCapabilities { + + /** DeviceCapabilities chatLockSupportLevel */ + chatLockSupportLevel?: (proto.DeviceCapabilities.ChatLockSupportLevel|null); + + /** DeviceCapabilities lidMigration */ + lidMigration?: (proto.DeviceCapabilities.ILIDMigration|null); + } + + /** Represents a DeviceCapabilities. */ + class DeviceCapabilities implements IDeviceCapabilities { + + /** + * Constructs a new DeviceCapabilities. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IDeviceCapabilities); + + /** DeviceCapabilities chatLockSupportLevel. */ + public chatLockSupportLevel?: (proto.DeviceCapabilities.ChatLockSupportLevel|null); + + /** DeviceCapabilities lidMigration. */ + public lidMigration?: (proto.DeviceCapabilities.ILIDMigration|null); + + /** + * Creates a new DeviceCapabilities instance using the specified properties. + * @param [properties] Properties to set + * @returns DeviceCapabilities instance + */ + public static create(properties?: proto.IDeviceCapabilities): proto.DeviceCapabilities; + + /** + * Encodes the specified DeviceCapabilities message. Does not implicitly {@link proto.DeviceCapabilities.verify|verify} messages. + * @param message DeviceCapabilities message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IDeviceCapabilities, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeviceCapabilities message, length delimited. Does not implicitly {@link proto.DeviceCapabilities.verify|verify} messages. + * @param message DeviceCapabilities message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IDeviceCapabilities, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeviceCapabilities message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeviceCapabilities + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.DeviceCapabilities; + + /** + * Decodes a DeviceCapabilities message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeviceCapabilities + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.DeviceCapabilities; + + /** + * Verifies a DeviceCapabilities message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeviceCapabilities message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeviceCapabilities + */ + public static fromObject(object: { [k: string]: any }): proto.DeviceCapabilities; + + /** + * Creates a plain object from a DeviceCapabilities message. Also converts values to other types if specified. + * @param message DeviceCapabilities + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.DeviceCapabilities, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeviceCapabilities to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeviceCapabilities + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DeviceCapabilities { + + /** ChatLockSupportLevel enum. */ + enum ChatLockSupportLevel { + NONE = 0, + MINIMAL = 1, + FULL = 2 + } + + /** Properties of a LIDMigration. */ + interface ILIDMigration { + + /** LIDMigration chatDbMigrationTimestamp */ + chatDbMigrationTimestamp?: (number|Long|null); + } + + /** Represents a LIDMigration. */ + class LIDMigration implements ILIDMigration { + + /** + * Constructs a new LIDMigration. + * @param [properties] Properties to set + */ + constructor(properties?: proto.DeviceCapabilities.ILIDMigration); + + /** LIDMigration chatDbMigrationTimestamp. */ + public chatDbMigrationTimestamp?: (number|Long|null); + + /** + * Creates a new LIDMigration instance using the specified properties. + * @param [properties] Properties to set + * @returns LIDMigration instance + */ + public static create(properties?: proto.DeviceCapabilities.ILIDMigration): proto.DeviceCapabilities.LIDMigration; + + /** + * Encodes the specified LIDMigration message. Does not implicitly {@link proto.DeviceCapabilities.LIDMigration.verify|verify} messages. + * @param message LIDMigration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.DeviceCapabilities.ILIDMigration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LIDMigration message, length delimited. Does not implicitly {@link proto.DeviceCapabilities.LIDMigration.verify|verify} messages. + * @param message LIDMigration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.DeviceCapabilities.ILIDMigration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LIDMigration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LIDMigration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.DeviceCapabilities.LIDMigration; + + /** + * Decodes a LIDMigration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LIDMigration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.DeviceCapabilities.LIDMigration; + + /** + * Verifies a LIDMigration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LIDMigration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LIDMigration + */ + public static fromObject(object: { [k: string]: any }): proto.DeviceCapabilities.LIDMigration; + + /** + * Creates a plain object from a LIDMigration message. Also converts values to other types if specified. + * @param message LIDMigration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.DeviceCapabilities.LIDMigration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LIDMigration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LIDMigration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + /** Properties of a DeviceConsistencyCodeMessage. */ interface IDeviceConsistencyCodeMessage { @@ -5505,10 +11534,10 @@ export namespace proto { constructor(properties?: proto.IDeviceConsistencyCodeMessage); /** DeviceConsistencyCodeMessage generation. */ - public generation: number; + public generation?: (number|null); /** DeviceConsistencyCodeMessage signature. */ - public signature: Uint8Array; + public signature?: (Uint8Array|null); /** * Creates a new DeviceConsistencyCodeMessage instance using the specified properties. @@ -5579,6 +11608,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeviceConsistencyCodeMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DeviceListMetadata. */ @@ -5619,25 +11655,25 @@ export namespace proto { constructor(properties?: proto.IDeviceListMetadata); /** DeviceListMetadata senderKeyHash. */ - public senderKeyHash: Uint8Array; + public senderKeyHash?: (Uint8Array|null); /** DeviceListMetadata senderTimestamp. */ - public senderTimestamp: (number|Long); + public senderTimestamp?: (number|Long|null); /** DeviceListMetadata senderKeyIndexes. */ public senderKeyIndexes: number[]; /** DeviceListMetadata senderAccountType. */ - public senderAccountType: proto.ADVEncryptionType; + public senderAccountType?: (proto.ADVEncryptionType|null); /** DeviceListMetadata receiverAccountType. */ - public receiverAccountType: proto.ADVEncryptionType; + public receiverAccountType?: (proto.ADVEncryptionType|null); /** DeviceListMetadata recipientKeyHash. */ - public recipientKeyHash: Uint8Array; + public recipientKeyHash?: (Uint8Array|null); /** DeviceListMetadata recipientTimestamp. */ - public recipientTimestamp: (number|Long); + public recipientTimestamp?: (number|Long|null); /** DeviceListMetadata recipientKeyIndexes. */ public recipientKeyIndexes: number[]; @@ -5711,6 +11747,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeviceListMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DeviceProps. */ @@ -5742,16 +11785,16 @@ export namespace proto { constructor(properties?: proto.IDeviceProps); /** DeviceProps os. */ - public os: string; + public os?: (string|null); /** DeviceProps version. */ public version?: (proto.DeviceProps.IAppVersion|null); /** DeviceProps platformType. */ - public platformType: proto.DeviceProps.PlatformType; + public platformType?: (proto.DeviceProps.PlatformType|null); /** DeviceProps requireFullSync. */ - public requireFullSync: boolean; + public requireFullSync?: (boolean|null); /** DeviceProps historySyncConfig. */ public historySyncConfig?: (proto.DeviceProps.IHistorySyncConfig|null); @@ -5825,6 +11868,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeviceProps + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace DeviceProps { @@ -5858,19 +11908,19 @@ export namespace proto { constructor(properties?: proto.DeviceProps.IAppVersion); /** AppVersion primary. */ - public primary: number; + public primary?: (number|null); /** AppVersion secondary. */ - public secondary: number; + public secondary?: (number|null); /** AppVersion tertiary. */ - public tertiary: number; + public tertiary?: (number|null); /** AppVersion quaternary. */ - public quaternary: number; + public quaternary?: (number|null); /** AppVersion quinary. */ - public quinary: number; + public quinary?: (number|null); /** * Creates a new AppVersion instance using the specified properties. @@ -5941,6 +11991,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AppVersion + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a HistorySyncConfig. */ @@ -5969,6 +12026,24 @@ export namespace proto { /** HistorySyncConfig supportCagReactionsAndPolls */ supportCagReactionsAndPolls?: (boolean|null); + + /** HistorySyncConfig supportBizHostedMsg */ + supportBizHostedMsg?: (boolean|null); + + /** HistorySyncConfig supportRecentSyncChunkMessageCountTuning */ + supportRecentSyncChunkMessageCountTuning?: (boolean|null); + + /** HistorySyncConfig supportHostedGroupMsg */ + supportHostedGroupMsg?: (boolean|null); + + /** HistorySyncConfig supportFbidBotChatHistory */ + supportFbidBotChatHistory?: (boolean|null); + + /** HistorySyncConfig supportAddOnHistorySyncMigration */ + supportAddOnHistorySyncMigration?: (boolean|null); + + /** HistorySyncConfig supportMessageAssociation */ + supportMessageAssociation?: (boolean|null); } /** Represents a HistorySyncConfig. */ @@ -5981,28 +12056,46 @@ export namespace proto { constructor(properties?: proto.DeviceProps.IHistorySyncConfig); /** HistorySyncConfig fullSyncDaysLimit. */ - public fullSyncDaysLimit: number; + public fullSyncDaysLimit?: (number|null); /** HistorySyncConfig fullSyncSizeMbLimit. */ - public fullSyncSizeMbLimit: number; + public fullSyncSizeMbLimit?: (number|null); /** HistorySyncConfig storageQuotaMb. */ - public storageQuotaMb: number; + public storageQuotaMb?: (number|null); /** HistorySyncConfig inlineInitialPayloadInE2EeMsg. */ - public inlineInitialPayloadInE2EeMsg: boolean; + public inlineInitialPayloadInE2EeMsg?: (boolean|null); /** HistorySyncConfig recentSyncDaysLimit. */ - public recentSyncDaysLimit: number; + public recentSyncDaysLimit?: (number|null); /** HistorySyncConfig supportCallLogHistory. */ - public supportCallLogHistory: boolean; + public supportCallLogHistory?: (boolean|null); /** HistorySyncConfig supportBotUserAgentChatHistory. */ - public supportBotUserAgentChatHistory: boolean; + public supportBotUserAgentChatHistory?: (boolean|null); /** HistorySyncConfig supportCagReactionsAndPolls. */ - public supportCagReactionsAndPolls: boolean; + public supportCagReactionsAndPolls?: (boolean|null); + + /** HistorySyncConfig supportBizHostedMsg. */ + public supportBizHostedMsg?: (boolean|null); + + /** HistorySyncConfig supportRecentSyncChunkMessageCountTuning. */ + public supportRecentSyncChunkMessageCountTuning?: (boolean|null); + + /** HistorySyncConfig supportHostedGroupMsg. */ + public supportHostedGroupMsg?: (boolean|null); + + /** HistorySyncConfig supportFbidBotChatHistory. */ + public supportFbidBotChatHistory?: (boolean|null); + + /** HistorySyncConfig supportAddOnHistorySyncMigration. */ + public supportAddOnHistorySyncMigration?: (boolean|null); + + /** HistorySyncConfig supportMessageAssociation. */ + public supportMessageAssociation?: (boolean|null); /** * Creates a new HistorySyncConfig instance using the specified properties. @@ -6073,6 +12166,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HistorySyncConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** PlatformType enum. */ @@ -6099,7 +12199,9 @@ export namespace proto { AR_WRIST = 19, AR_DEVICE = 20, UWP = 21, - VR = 22 + VR = 22, + CLOUD_API = 23, + SMARTGLASSES = 24 } } @@ -6129,16 +12231,16 @@ export namespace proto { constructor(properties?: proto.IDisappearingMode); /** DisappearingMode initiator. */ - public initiator: proto.DisappearingMode.Initiator; + public initiator?: (proto.DisappearingMode.Initiator|null); /** DisappearingMode trigger. */ - public trigger: proto.DisappearingMode.Trigger; + public trigger?: (proto.DisappearingMode.Trigger|null); /** DisappearingMode initiatorDeviceJid. */ - public initiatorDeviceJid: string; + public initiatorDeviceJid?: (string|null); /** DisappearingMode initiatedByMe. */ - public initiatedByMe: boolean; + public initiatedByMe?: (boolean|null); /** * Creates a new DisappearingMode instance using the specified properties. @@ -6209,6 +12311,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DisappearingMode + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace DisappearingMode { @@ -6227,10 +12336,480 @@ export namespace proto { CHAT_SETTING = 1, ACCOUNT_SETTING = 2, BULK_CHANGE = 3, - BIZ_SUPPORTS_FB_HOSTING = 4 + BIZ_SUPPORTS_FB_HOSTING = 4, + UNKNOWN_GROUPS = 5 } } + /** Properties of an EmbeddedContent. */ + interface IEmbeddedContent { + + /** EmbeddedContent embeddedMessage */ + embeddedMessage?: (proto.IEmbeddedMessage|null); + + /** EmbeddedContent embeddedMusic */ + embeddedMusic?: (proto.IEmbeddedMusic|null); + } + + /** Represents an EmbeddedContent. */ + class EmbeddedContent implements IEmbeddedContent { + + /** + * Constructs a new EmbeddedContent. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IEmbeddedContent); + + /** EmbeddedContent embeddedMessage. */ + public embeddedMessage?: (proto.IEmbeddedMessage|null); + + /** EmbeddedContent embeddedMusic. */ + public embeddedMusic?: (proto.IEmbeddedMusic|null); + + /** EmbeddedContent content. */ + public content?: ("embeddedMessage"|"embeddedMusic"); + + /** + * Creates a new EmbeddedContent instance using the specified properties. + * @param [properties] Properties to set + * @returns EmbeddedContent instance + */ + public static create(properties?: proto.IEmbeddedContent): proto.EmbeddedContent; + + /** + * Encodes the specified EmbeddedContent message. Does not implicitly {@link proto.EmbeddedContent.verify|verify} messages. + * @param message EmbeddedContent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IEmbeddedContent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EmbeddedContent message, length delimited. Does not implicitly {@link proto.EmbeddedContent.verify|verify} messages. + * @param message EmbeddedContent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IEmbeddedContent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EmbeddedContent message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EmbeddedContent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.EmbeddedContent; + + /** + * Decodes an EmbeddedContent message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EmbeddedContent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.EmbeddedContent; + + /** + * Verifies an EmbeddedContent message. + * @param message Plain 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 EmbeddedContent message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EmbeddedContent + */ + public static fromObject(object: { [k: string]: any }): proto.EmbeddedContent; + + /** + * Creates a plain object from an EmbeddedContent message. Also converts values to other types if specified. + * @param message EmbeddedContent + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.EmbeddedContent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EmbeddedContent to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EmbeddedContent + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EmbeddedMessage. */ + interface IEmbeddedMessage { + + /** EmbeddedMessage stanzaId */ + stanzaId?: (string|null); + + /** EmbeddedMessage message */ + message?: (proto.IMessage|null); + } + + /** Represents an EmbeddedMessage. */ + class EmbeddedMessage implements IEmbeddedMessage { + + /** + * Constructs a new EmbeddedMessage. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IEmbeddedMessage); + + /** EmbeddedMessage stanzaId. */ + public stanzaId?: (string|null); + + /** EmbeddedMessage message. */ + public message?: (proto.IMessage|null); + + /** + * Creates a new EmbeddedMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns EmbeddedMessage instance + */ + public static create(properties?: proto.IEmbeddedMessage): proto.EmbeddedMessage; + + /** + * Encodes the specified EmbeddedMessage message. Does not implicitly {@link proto.EmbeddedMessage.verify|verify} messages. + * @param message EmbeddedMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IEmbeddedMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EmbeddedMessage message, length delimited. Does not implicitly {@link proto.EmbeddedMessage.verify|verify} messages. + * @param message EmbeddedMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IEmbeddedMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EmbeddedMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EmbeddedMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.EmbeddedMessage; + + /** + * Decodes an EmbeddedMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EmbeddedMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.EmbeddedMessage; + + /** + * Verifies an EmbeddedMessage message. + * @param message Plain 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 EmbeddedMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EmbeddedMessage + */ + public static fromObject(object: { [k: string]: any }): proto.EmbeddedMessage; + + /** + * Creates a plain object from an EmbeddedMessage message. Also converts values to other types if specified. + * @param message EmbeddedMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.EmbeddedMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EmbeddedMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EmbeddedMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EmbeddedMusic. */ + interface IEmbeddedMusic { + + /** EmbeddedMusic musicContentMediaId */ + musicContentMediaId?: (string|null); + + /** EmbeddedMusic songId */ + songId?: (string|null); + + /** EmbeddedMusic author */ + author?: (string|null); + + /** EmbeddedMusic title */ + title?: (string|null); + + /** EmbeddedMusic artworkDirectPath */ + artworkDirectPath?: (string|null); + + /** EmbeddedMusic artworkSha256 */ + artworkSha256?: (Uint8Array|null); + + /** EmbeddedMusic artworkEncSha256 */ + artworkEncSha256?: (Uint8Array|null); + + /** EmbeddedMusic artworkMediaKey */ + artworkMediaKey?: (Uint8Array|null); + + /** EmbeddedMusic artistAttribution */ + artistAttribution?: (string|null); + + /** EmbeddedMusic countryBlocklist */ + countryBlocklist?: (Uint8Array|null); + + /** EmbeddedMusic isExplicit */ + isExplicit?: (boolean|null); + } + + /** Represents an EmbeddedMusic. */ + class EmbeddedMusic implements IEmbeddedMusic { + + /** + * Constructs a new EmbeddedMusic. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IEmbeddedMusic); + + /** EmbeddedMusic musicContentMediaId. */ + public musicContentMediaId?: (string|null); + + /** EmbeddedMusic songId. */ + public songId?: (string|null); + + /** EmbeddedMusic author. */ + public author?: (string|null); + + /** EmbeddedMusic title. */ + public title?: (string|null); + + /** EmbeddedMusic artworkDirectPath. */ + public artworkDirectPath?: (string|null); + + /** EmbeddedMusic artworkSha256. */ + public artworkSha256?: (Uint8Array|null); + + /** EmbeddedMusic artworkEncSha256. */ + public artworkEncSha256?: (Uint8Array|null); + + /** EmbeddedMusic artworkMediaKey. */ + public artworkMediaKey?: (Uint8Array|null); + + /** EmbeddedMusic artistAttribution. */ + public artistAttribution?: (string|null); + + /** EmbeddedMusic countryBlocklist. */ + public countryBlocklist?: (Uint8Array|null); + + /** EmbeddedMusic isExplicit. */ + public isExplicit?: (boolean|null); + + /** + * Creates a new EmbeddedMusic instance using the specified properties. + * @param [properties] Properties to set + * @returns EmbeddedMusic instance + */ + public static create(properties?: proto.IEmbeddedMusic): proto.EmbeddedMusic; + + /** + * Encodes the specified EmbeddedMusic message. Does not implicitly {@link proto.EmbeddedMusic.verify|verify} messages. + * @param message EmbeddedMusic message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IEmbeddedMusic, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EmbeddedMusic message, length delimited. Does not implicitly {@link proto.EmbeddedMusic.verify|verify} messages. + * @param message EmbeddedMusic message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IEmbeddedMusic, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EmbeddedMusic message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EmbeddedMusic + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.EmbeddedMusic; + + /** + * Decodes an EmbeddedMusic message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EmbeddedMusic + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.EmbeddedMusic; + + /** + * Verifies an EmbeddedMusic message. + * @param message Plain 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 EmbeddedMusic message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EmbeddedMusic + */ + public static fromObject(object: { [k: string]: any }): proto.EmbeddedMusic; + + /** + * Creates a plain object from an EmbeddedMusic message. Also converts values to other types if specified. + * @param message EmbeddedMusic + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.EmbeddedMusic, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EmbeddedMusic to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EmbeddedMusic + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EncryptedPairingRequest. */ + interface IEncryptedPairingRequest { + + /** EncryptedPairingRequest encryptedPayload */ + encryptedPayload?: (Uint8Array|null); + + /** EncryptedPairingRequest iv */ + iv?: (Uint8Array|null); + } + + /** Represents an EncryptedPairingRequest. */ + class EncryptedPairingRequest implements IEncryptedPairingRequest { + + /** + * Constructs a new EncryptedPairingRequest. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IEncryptedPairingRequest); + + /** EncryptedPairingRequest encryptedPayload. */ + public encryptedPayload?: (Uint8Array|null); + + /** EncryptedPairingRequest iv. */ + public iv?: (Uint8Array|null); + + /** + * Creates a new EncryptedPairingRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns EncryptedPairingRequest instance + */ + public static create(properties?: proto.IEncryptedPairingRequest): proto.EncryptedPairingRequest; + + /** + * Encodes the specified EncryptedPairingRequest message. Does not implicitly {@link proto.EncryptedPairingRequest.verify|verify} messages. + * @param message EncryptedPairingRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IEncryptedPairingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EncryptedPairingRequest message, length delimited. Does not implicitly {@link proto.EncryptedPairingRequest.verify|verify} messages. + * @param message EncryptedPairingRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IEncryptedPairingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EncryptedPairingRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EncryptedPairingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.EncryptedPairingRequest; + + /** + * Decodes an EncryptedPairingRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EncryptedPairingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.EncryptedPairingRequest; + + /** + * Verifies an EncryptedPairingRequest message. + * @param message Plain 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 EncryptedPairingRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EncryptedPairingRequest + */ + public static fromObject(object: { [k: string]: any }): proto.EncryptedPairingRequest; + + /** + * Creates a plain object from an EncryptedPairingRequest message. Also converts values to other types if specified. + * @param message EncryptedPairingRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.EncryptedPairingRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EncryptedPairingRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EncryptedPairingRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of an EphemeralSetting. */ interface IEphemeralSetting { @@ -6251,10 +12830,10 @@ export namespace proto { constructor(properties?: proto.IEphemeralSetting); /** EphemeralSetting duration. */ - public duration: number; + public duration?: (number|null); /** EphemeralSetting timestamp. */ - public timestamp: (number|Long); + public timestamp?: (number|Long|null); /** * Creates a new EphemeralSetting instance using the specified properties. @@ -6325,6 +12904,110 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EphemeralSetting + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EventAdditionalMetadata. */ + interface IEventAdditionalMetadata { + + /** EventAdditionalMetadata isStale */ + isStale?: (boolean|null); + } + + /** Represents an EventAdditionalMetadata. */ + class EventAdditionalMetadata implements IEventAdditionalMetadata { + + /** + * Constructs a new EventAdditionalMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IEventAdditionalMetadata); + + /** EventAdditionalMetadata isStale. */ + public isStale?: (boolean|null); + + /** + * Creates a new EventAdditionalMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns EventAdditionalMetadata instance + */ + public static create(properties?: proto.IEventAdditionalMetadata): proto.EventAdditionalMetadata; + + /** + * Encodes the specified EventAdditionalMetadata message. Does not implicitly {@link proto.EventAdditionalMetadata.verify|verify} messages. + * @param message EventAdditionalMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IEventAdditionalMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EventAdditionalMetadata message, length delimited. Does not implicitly {@link proto.EventAdditionalMetadata.verify|verify} messages. + * @param message EventAdditionalMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IEventAdditionalMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EventAdditionalMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EventAdditionalMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.EventAdditionalMetadata; + + /** + * Decodes an EventAdditionalMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EventAdditionalMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.EventAdditionalMetadata; + + /** + * Verifies an EventAdditionalMetadata message. + * @param message Plain 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 EventAdditionalMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EventAdditionalMetadata + */ + public static fromObject(object: { [k: string]: any }): proto.EventAdditionalMetadata; + + /** + * Creates a plain object from an EventAdditionalMetadata message. Also converts values to other types if specified. + * @param message EventAdditionalMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.EventAdditionalMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EventAdditionalMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EventAdditionalMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an EventResponse. */ @@ -6356,13 +13039,13 @@ export namespace proto { public eventResponseMessageKey?: (proto.IMessageKey|null); /** EventResponse timestampMs. */ - public timestampMs: (number|Long); + public timestampMs?: (number|Long|null); /** EventResponse eventResponseMessage. */ public eventResponseMessage?: (proto.Message.IEventResponseMessage|null); /** EventResponse unread. */ - public unread: boolean; + public unread?: (boolean|null); /** * Creates a new EventResponse instance using the specified properties. @@ -6433,6 +13116,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EventResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an ExitCode. */ @@ -6455,10 +13145,10 @@ export namespace proto { constructor(properties?: proto.IExitCode); /** ExitCode code. */ - public code: (number|Long); + public code?: (number|Long|null); /** ExitCode text. */ - public text: string; + public text?: (string|null); /** * Creates a new ExitCode instance using the specified properties. @@ -6529,6 +13219,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExitCode + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an ExternalBlobReference. */ @@ -6563,22 +13260,22 @@ export namespace proto { constructor(properties?: proto.IExternalBlobReference); /** ExternalBlobReference mediaKey. */ - public mediaKey: Uint8Array; + public mediaKey?: (Uint8Array|null); /** ExternalBlobReference directPath. */ - public directPath: string; + public directPath?: (string|null); /** ExternalBlobReference handle. */ - public handle: string; + public handle?: (string|null); /** ExternalBlobReference fileSizeBytes. */ - public fileSizeBytes: (number|Long); + public fileSizeBytes?: (number|Long|null); /** ExternalBlobReference fileSha256. */ - public fileSha256: Uint8Array; + public fileSha256?: (Uint8Array|null); /** ExternalBlobReference fileEncSha256. */ - public fileEncSha256: Uint8Array; + public fileEncSha256?: (Uint8Array|null); /** * Creates a new ExternalBlobReference instance using the specified properties. @@ -6649,6 +13346,134 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExternalBlobReference + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Field. */ + interface IField { + + /** Field minVersion */ + minVersion?: (number|null); + + /** Field maxVersion */ + maxVersion?: (number|null); + + /** Field notReportableMinVersion */ + notReportableMinVersion?: (number|null); + + /** Field isMessage */ + isMessage?: (boolean|null); + + /** Field subfield */ + subfield?: ({ [k: string]: proto.IField }|null); + } + + /** Represents a Field. */ + class Field implements IField { + + /** + * Constructs a new Field. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IField); + + /** Field minVersion. */ + public minVersion?: (number|null); + + /** Field maxVersion. */ + public maxVersion?: (number|null); + + /** Field notReportableMinVersion. */ + public notReportableMinVersion?: (number|null); + + /** Field isMessage. */ + public isMessage?: (boolean|null); + + /** Field subfield. */ + public subfield: { [k: string]: proto.IField }; + + /** + * Creates a new Field instance using the specified properties. + * @param [properties] Properties to set + * @returns Field instance + */ + public static create(properties?: proto.IField): proto.Field; + + /** + * Encodes the specified Field message. Does not implicitly {@link proto.Field.verify|verify} messages. + * @param message Field message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IField, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Field message, length delimited. Does not implicitly {@link proto.Field.verify|verify} messages. + * @param message Field message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IField, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Field message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Field + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.Field; + + /** + * Decodes a Field message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Field + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.Field; + + /** + * Verifies a Field message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Field message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Field + */ + public static fromObject(object: { [k: string]: any }): proto.Field; + + /** + * Creates a plain object from a Field message. Also converts values to other types if specified. + * @param message Field + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Field, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Field to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Field + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GlobalSettings. */ @@ -6707,6 +13532,9 @@ export namespace proto { /** GlobalSettings groupNotificationSettings */ groupNotificationSettings?: (proto.INotificationSettings|null); + + /** GlobalSettings chatLockSettings */ + chatLockSettings?: (proto.IChatLockSettings|null); } /** Represents a GlobalSettings. */ @@ -6722,7 +13550,7 @@ export namespace proto { public lightThemeWallpaper?: (proto.IWallpaperSettings|null); /** GlobalSettings mediaVisibility. */ - public mediaVisibility: proto.MediaVisibility; + public mediaVisibility?: (proto.MediaVisibility|null); /** GlobalSettings darkThemeWallpaper. */ public darkThemeWallpaper?: (proto.IWallpaperSettings|null); @@ -6737,34 +13565,34 @@ export namespace proto { public autoDownloadRoaming?: (proto.IAutoDownloadSettings|null); /** GlobalSettings showIndividualNotificationsPreview. */ - public showIndividualNotificationsPreview: boolean; + public showIndividualNotificationsPreview?: (boolean|null); /** GlobalSettings showGroupNotificationsPreview. */ - public showGroupNotificationsPreview: boolean; + public showGroupNotificationsPreview?: (boolean|null); /** GlobalSettings disappearingModeDuration. */ - public disappearingModeDuration: number; + public disappearingModeDuration?: (number|null); /** GlobalSettings disappearingModeTimestamp. */ - public disappearingModeTimestamp: (number|Long); + public disappearingModeTimestamp?: (number|Long|null); /** GlobalSettings avatarUserSettings. */ public avatarUserSettings?: (proto.IAvatarUserSettings|null); /** GlobalSettings fontSize. */ - public fontSize: number; + public fontSize?: (number|null); /** GlobalSettings securityNotifications. */ - public securityNotifications: boolean; + public securityNotifications?: (boolean|null); /** GlobalSettings autoUnarchiveChats. */ - public autoUnarchiveChats: boolean; + public autoUnarchiveChats?: (boolean|null); /** GlobalSettings videoQualityMode. */ - public videoQualityMode: number; + public videoQualityMode?: (number|null); /** GlobalSettings photoQualityMode. */ - public photoQualityMode: number; + public photoQualityMode?: (number|null); /** GlobalSettings individualNotificationSettings. */ public individualNotificationSettings?: (proto.INotificationSettings|null); @@ -6772,6 +13600,9 @@ export namespace proto { /** GlobalSettings groupNotificationSettings. */ public groupNotificationSettings?: (proto.INotificationSettings|null); + /** GlobalSettings chatLockSettings. */ + public chatLockSettings?: (proto.IChatLockSettings|null); + /** * Creates a new GlobalSettings instance using the specified properties. * @param [properties] Properties to set @@ -6841,6 +13672,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GlobalSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GroupMention. */ @@ -6863,10 +13701,10 @@ export namespace proto { constructor(properties?: proto.IGroupMention); /** GroupMention groupJid. */ - public groupJid: string; + public groupJid?: (string|null); /** GroupMention groupSubject. */ - public groupSubject: string; + public groupSubject?: (string|null); /** * Creates a new GroupMention instance using the specified properties. @@ -6937,6 +13775,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GroupMention + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GroupParticipant. */ @@ -6962,7 +13807,7 @@ export namespace proto { public userJid: string; /** GroupParticipant rank. */ - public rank: proto.GroupParticipant.Rank; + public rank?: (proto.GroupParticipant.Rank|null); /** * Creates a new GroupParticipant instance using the specified properties. @@ -7033,6 +13878,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GroupParticipant + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace GroupParticipant { @@ -7145,6 +13997,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HandshakeMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace HandshakeMessage { @@ -7169,10 +14028,10 @@ export namespace proto { constructor(properties?: proto.HandshakeMessage.IClientFinish); /** ClientFinish static. */ - public static: Uint8Array; + public static?: (Uint8Array|null); /** ClientFinish payload. */ - public payload: Uint8Array; + public payload?: (Uint8Array|null); /** * Creates a new ClientFinish instance using the specified properties. @@ -7243,6 +14102,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ClientFinish + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ClientHello. */ @@ -7268,13 +14134,13 @@ export namespace proto { constructor(properties?: proto.HandshakeMessage.IClientHello); /** ClientHello ephemeral. */ - public ephemeral: Uint8Array; + public ephemeral?: (Uint8Array|null); /** ClientHello static. */ - public static: Uint8Array; + public static?: (Uint8Array|null); /** ClientHello payload. */ - public payload: Uint8Array; + public payload?: (Uint8Array|null); /** * Creates a new ClientHello instance using the specified properties. @@ -7345,6 +14211,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ClientHello + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ServerHello. */ @@ -7370,13 +14243,13 @@ export namespace proto { constructor(properties?: proto.HandshakeMessage.IServerHello); /** ServerHello ephemeral. */ - public ephemeral: Uint8Array; + public ephemeral?: (Uint8Array|null); /** ServerHello static. */ - public static: Uint8Array; + public static?: (Uint8Array|null); /** ServerHello payload. */ - public payload: Uint8Array; + public payload?: (Uint8Array|null); /** * Creates a new ServerHello instance using the specified properties. @@ -7447,6 +14320,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServerHello + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -7494,6 +14374,12 @@ export namespace proto { /** HistorySync phoneNumberToLidMappings */ phoneNumberToLidMappings?: (proto.IPhoneNumberToLIDMapping[]|null); + + /** HistorySync companionMetaNonce */ + companionMetaNonce?: (string|null); + + /** HistorySync shareableChatIdentifierEncryptionKey */ + shareableChatIdentifierEncryptionKey?: (Uint8Array|null); } /** Represents a HistorySync. */ @@ -7515,10 +14401,10 @@ export namespace proto { public statusV3Messages: proto.IWebMessageInfo[]; /** HistorySync chunkOrder. */ - public chunkOrder: number; + public chunkOrder?: (number|null); /** HistorySync progress. */ - public progress: number; + public progress?: (number|null); /** HistorySync pushnames. */ public pushnames: proto.IPushname[]; @@ -7527,10 +14413,10 @@ export namespace proto { public globalSettings?: (proto.IGlobalSettings|null); /** HistorySync threadIdUserSecret. */ - public threadIdUserSecret: Uint8Array; + public threadIdUserSecret?: (Uint8Array|null); /** HistorySync threadDsTimeframeOffset. */ - public threadDsTimeframeOffset: number; + public threadDsTimeframeOffset?: (number|null); /** HistorySync recentStickers. */ public recentStickers: proto.IStickerMetadata[]; @@ -7542,11 +14428,17 @@ export namespace proto { public callLogRecords: proto.ICallLogRecord[]; /** HistorySync aiWaitListState. */ - public aiWaitListState: proto.HistorySync.BotAIWaitListState; + public aiWaitListState?: (proto.HistorySync.BotAIWaitListState|null); /** HistorySync phoneNumberToLidMappings. */ public phoneNumberToLidMappings: proto.IPhoneNumberToLIDMapping[]; + /** HistorySync companionMetaNonce. */ + public companionMetaNonce?: (string|null); + + /** HistorySync shareableChatIdentifierEncryptionKey. */ + public shareableChatIdentifierEncryptionKey?: (Uint8Array|null); + /** * Creates a new HistorySync instance using the specified properties. * @param [properties] Properties to set @@ -7616,6 +14508,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HistorySync + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace HistorySync { @@ -7661,7 +14560,7 @@ export namespace proto { public message?: (proto.IWebMessageInfo|null); /** HistorySyncMsg msgOrderId. */ - public msgOrderId: (number|Long); + public msgOrderId?: (number|Long|null); /** * Creates a new HistorySyncMsg instance using the specified properties. @@ -7732,6 +14631,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HistorySyncMsg + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a HydratedTemplateButton. */ @@ -7760,7 +14666,7 @@ export namespace proto { constructor(properties?: proto.IHydratedTemplateButton); /** HydratedTemplateButton index. */ - public index: number; + public index?: (number|null); /** HydratedTemplateButton quickReplyButton. */ public quickReplyButton?: (proto.HydratedTemplateButton.IHydratedQuickReplyButton|null); @@ -7843,6 +14749,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HydratedTemplateButton + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace HydratedTemplateButton { @@ -7867,10 +14780,10 @@ export namespace proto { constructor(properties?: proto.HydratedTemplateButton.IHydratedCallButton); /** HydratedCallButton displayText. */ - public displayText: string; + public displayText?: (string|null); /** HydratedCallButton phoneNumber. */ - public phoneNumber: string; + public phoneNumber?: (string|null); /** * Creates a new HydratedCallButton instance using the specified properties. @@ -7941,6 +14854,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HydratedCallButton + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a HydratedQuickReplyButton. */ @@ -7963,10 +14883,10 @@ export namespace proto { constructor(properties?: proto.HydratedTemplateButton.IHydratedQuickReplyButton); /** HydratedQuickReplyButton displayText. */ - public displayText: string; + public displayText?: (string|null); /** HydratedQuickReplyButton id. */ - public id: string; + public id?: (string|null); /** * Creates a new HydratedQuickReplyButton instance using the specified properties. @@ -8037,6 +14957,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HydratedQuickReplyButton + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a HydratedURLButton. */ @@ -8065,16 +14992,16 @@ export namespace proto { constructor(properties?: proto.HydratedTemplateButton.IHydratedURLButton); /** HydratedURLButton displayText. */ - public displayText: string; + public displayText?: (string|null); /** HydratedURLButton url. */ - public url: string; + public url?: (string|null); /** HydratedURLButton consentedUsersUrl. */ - public consentedUsersUrl: string; + public consentedUsersUrl?: (string|null); /** HydratedURLButton webviewPresentation. */ - public webviewPresentation: proto.HydratedTemplateButton.HydratedURLButton.WebviewPresentationType; + public webviewPresentation?: (proto.HydratedTemplateButton.HydratedURLButton.WebviewPresentationType|null); /** * Creates a new HydratedURLButton instance using the specified properties. @@ -8145,6 +15072,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HydratedURLButton + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace HydratedURLButton { @@ -8178,10 +15112,10 @@ export namespace proto { constructor(properties?: proto.IIdentityKeyPairStructure); /** IdentityKeyPairStructure publicKey. */ - public publicKey: Uint8Array; + public publicKey?: (Uint8Array|null); /** IdentityKeyPairStructure privateKey. */ - public privateKey: Uint8Array; + public privateKey?: (Uint8Array|null); /** * Creates a new IdentityKeyPairStructure instance using the specified properties. @@ -8252,6 +15186,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for IdentityKeyPairStructure + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an InteractiveAnnotation. */ @@ -8263,11 +15204,20 @@ export namespace proto { /** InteractiveAnnotation shouldSkipConfirmation */ shouldSkipConfirmation?: (boolean|null); + /** InteractiveAnnotation embeddedContent */ + embeddedContent?: (proto.IEmbeddedContent|null); + /** InteractiveAnnotation location */ location?: (proto.ILocation|null); /** InteractiveAnnotation newsletter */ newsletter?: (proto.ContextInfo.IForwardedNewsletterMessageInfo|null); + + /** InteractiveAnnotation embeddedAction */ + embeddedAction?: (boolean|null); + + /** InteractiveAnnotation tapAction */ + tapAction?: (proto.ITapLinkAction|null); } /** Represents an InteractiveAnnotation. */ @@ -8283,7 +15233,10 @@ export namespace proto { public polygonVertices: proto.IPoint[]; /** InteractiveAnnotation shouldSkipConfirmation. */ - public shouldSkipConfirmation: boolean; + public shouldSkipConfirmation?: (boolean|null); + + /** InteractiveAnnotation embeddedContent. */ + public embeddedContent?: (proto.IEmbeddedContent|null); /** InteractiveAnnotation location. */ public location?: (proto.ILocation|null); @@ -8291,8 +15244,14 @@ export namespace proto { /** InteractiveAnnotation newsletter. */ public newsletter?: (proto.ContextInfo.IForwardedNewsletterMessageInfo|null); + /** InteractiveAnnotation embeddedAction. */ + public embeddedAction?: (boolean|null); + + /** InteractiveAnnotation tapAction. */ + public tapAction?: (proto.ITapLinkAction|null); + /** InteractiveAnnotation action. */ - public action?: ("location"|"newsletter"); + public action?: ("location"|"newsletter"|"embeddedAction"|"tapAction"); /** * Creates a new InteractiveAnnotation instance using the specified properties. @@ -8363,6 +15322,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InteractiveAnnotation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a KeepInChat. */ @@ -8397,22 +15363,22 @@ export namespace proto { constructor(properties?: proto.IKeepInChat); /** KeepInChat keepType. */ - public keepType: proto.KeepType; + public keepType?: (proto.KeepType|null); /** KeepInChat serverTimestamp. */ - public serverTimestamp: (number|Long); + public serverTimestamp?: (number|Long|null); /** KeepInChat key. */ public key?: (proto.IMessageKey|null); /** KeepInChat deviceJid. */ - public deviceJid: string; + public deviceJid?: (string|null); /** KeepInChat clientTimestampMs. */ - public clientTimestampMs: (number|Long); + public clientTimestampMs?: (number|Long|null); /** KeepInChat serverTimestampMs. */ - public serverTimestampMs: (number|Long); + public serverTimestampMs?: (number|Long|null); /** * Creates a new KeepInChat instance using the specified properties. @@ -8483,6 +15449,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for KeepInChat + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** KeepType enum. */ @@ -8521,19 +15494,19 @@ export namespace proto { constructor(properties?: proto.IKeyExchangeMessage); /** KeyExchangeMessage id. */ - public id: number; + public id?: (number|null); /** KeyExchangeMessage baseKey. */ - public baseKey: Uint8Array; + public baseKey?: (Uint8Array|null); /** KeyExchangeMessage ratchetKey. */ - public ratchetKey: Uint8Array; + public ratchetKey?: (Uint8Array|null); /** KeyExchangeMessage identityKey. */ - public identityKey: Uint8Array; + public identityKey?: (Uint8Array|null); /** KeyExchangeMessage baseKeySignature. */ - public baseKeySignature: Uint8Array; + public baseKeySignature?: (Uint8Array|null); /** * Creates a new KeyExchangeMessage instance using the specified properties. @@ -8604,6 +15577,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for KeyExchangeMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a KeyId. */ @@ -8623,7 +15603,7 @@ export namespace proto { constructor(properties?: proto.IKeyId); /** KeyId id. */ - public id: Uint8Array; + public id?: (Uint8Array|null); /** * Creates a new KeyId instance using the specified properties. @@ -8694,6 +15674,531 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for KeyId + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LIDMigrationMapping. */ + interface ILIDMigrationMapping { + + /** LIDMigrationMapping pn */ + pn: (number|Long); + + /** LIDMigrationMapping assignedLid */ + assignedLid: (number|Long); + + /** LIDMigrationMapping latestLid */ + latestLid?: (number|Long|null); + } + + /** Represents a LIDMigrationMapping. */ + class LIDMigrationMapping implements ILIDMigrationMapping { + + /** + * Constructs a new LIDMigrationMapping. + * @param [properties] Properties to set + */ + constructor(properties?: proto.ILIDMigrationMapping); + + /** LIDMigrationMapping pn. */ + public pn: (number|Long); + + /** LIDMigrationMapping assignedLid. */ + public assignedLid: (number|Long); + + /** LIDMigrationMapping latestLid. */ + public latestLid?: (number|Long|null); + + /** + * Creates a new LIDMigrationMapping instance using the specified properties. + * @param [properties] Properties to set + * @returns LIDMigrationMapping instance + */ + public static create(properties?: proto.ILIDMigrationMapping): proto.LIDMigrationMapping; + + /** + * Encodes the specified LIDMigrationMapping message. Does not implicitly {@link proto.LIDMigrationMapping.verify|verify} messages. + * @param message LIDMigrationMapping message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.ILIDMigrationMapping, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LIDMigrationMapping message, length delimited. Does not implicitly {@link proto.LIDMigrationMapping.verify|verify} messages. + * @param message LIDMigrationMapping message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.ILIDMigrationMapping, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LIDMigrationMapping message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LIDMigrationMapping + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.LIDMigrationMapping; + + /** + * Decodes a LIDMigrationMapping message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LIDMigrationMapping + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.LIDMigrationMapping; + + /** + * Verifies a LIDMigrationMapping message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LIDMigrationMapping message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LIDMigrationMapping + */ + public static fromObject(object: { [k: string]: any }): proto.LIDMigrationMapping; + + /** + * Creates a plain object from a LIDMigrationMapping message. Also converts values to other types if specified. + * @param message LIDMigrationMapping + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.LIDMigrationMapping, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LIDMigrationMapping to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LIDMigrationMapping + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LIDMigrationMappingSyncMessage. */ + interface ILIDMigrationMappingSyncMessage { + + /** LIDMigrationMappingSyncMessage encodedMappingPayload */ + encodedMappingPayload?: (Uint8Array|null); + } + + /** Represents a LIDMigrationMappingSyncMessage. */ + class LIDMigrationMappingSyncMessage implements ILIDMigrationMappingSyncMessage { + + /** + * Constructs a new LIDMigrationMappingSyncMessage. + * @param [properties] Properties to set + */ + constructor(properties?: proto.ILIDMigrationMappingSyncMessage); + + /** LIDMigrationMappingSyncMessage encodedMappingPayload. */ + public encodedMappingPayload?: (Uint8Array|null); + + /** + * Creates a new LIDMigrationMappingSyncMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns LIDMigrationMappingSyncMessage instance + */ + public static create(properties?: proto.ILIDMigrationMappingSyncMessage): proto.LIDMigrationMappingSyncMessage; + + /** + * Encodes the specified LIDMigrationMappingSyncMessage message. Does not implicitly {@link proto.LIDMigrationMappingSyncMessage.verify|verify} messages. + * @param message LIDMigrationMappingSyncMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.ILIDMigrationMappingSyncMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LIDMigrationMappingSyncMessage message, length delimited. Does not implicitly {@link proto.LIDMigrationMappingSyncMessage.verify|verify} messages. + * @param message LIDMigrationMappingSyncMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.ILIDMigrationMappingSyncMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LIDMigrationMappingSyncMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LIDMigrationMappingSyncMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.LIDMigrationMappingSyncMessage; + + /** + * Decodes a LIDMigrationMappingSyncMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LIDMigrationMappingSyncMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.LIDMigrationMappingSyncMessage; + + /** + * Verifies a LIDMigrationMappingSyncMessage message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LIDMigrationMappingSyncMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LIDMigrationMappingSyncMessage + */ + public static fromObject(object: { [k: string]: any }): proto.LIDMigrationMappingSyncMessage; + + /** + * Creates a plain object from a LIDMigrationMappingSyncMessage message. Also converts values to other types if specified. + * @param message LIDMigrationMappingSyncMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.LIDMigrationMappingSyncMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LIDMigrationMappingSyncMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LIDMigrationMappingSyncMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LIDMigrationMappingSyncPayload. */ + interface ILIDMigrationMappingSyncPayload { + + /** LIDMigrationMappingSyncPayload pnToLidMappings */ + pnToLidMappings?: (proto.ILIDMigrationMapping[]|null); + } + + /** Represents a LIDMigrationMappingSyncPayload. */ + class LIDMigrationMappingSyncPayload implements ILIDMigrationMappingSyncPayload { + + /** + * Constructs a new LIDMigrationMappingSyncPayload. + * @param [properties] Properties to set + */ + constructor(properties?: proto.ILIDMigrationMappingSyncPayload); + + /** LIDMigrationMappingSyncPayload pnToLidMappings. */ + public pnToLidMappings: proto.ILIDMigrationMapping[]; + + /** + * Creates a new LIDMigrationMappingSyncPayload instance using the specified properties. + * @param [properties] Properties to set + * @returns LIDMigrationMappingSyncPayload instance + */ + public static create(properties?: proto.ILIDMigrationMappingSyncPayload): proto.LIDMigrationMappingSyncPayload; + + /** + * Encodes the specified LIDMigrationMappingSyncPayload message. Does not implicitly {@link proto.LIDMigrationMappingSyncPayload.verify|verify} messages. + * @param message LIDMigrationMappingSyncPayload message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.ILIDMigrationMappingSyncPayload, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LIDMigrationMappingSyncPayload message, length delimited. Does not implicitly {@link proto.LIDMigrationMappingSyncPayload.verify|verify} messages. + * @param message LIDMigrationMappingSyncPayload message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.ILIDMigrationMappingSyncPayload, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LIDMigrationMappingSyncPayload message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LIDMigrationMappingSyncPayload + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.LIDMigrationMappingSyncPayload; + + /** + * Decodes a LIDMigrationMappingSyncPayload message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LIDMigrationMappingSyncPayload + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.LIDMigrationMappingSyncPayload; + + /** + * Verifies a LIDMigrationMappingSyncPayload message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LIDMigrationMappingSyncPayload message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LIDMigrationMappingSyncPayload + */ + public static fromObject(object: { [k: string]: any }): proto.LIDMigrationMappingSyncPayload; + + /** + * Creates a plain object from a LIDMigrationMappingSyncPayload message. Also converts values to other types if specified. + * @param message LIDMigrationMappingSyncPayload + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.LIDMigrationMappingSyncPayload, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LIDMigrationMappingSyncPayload to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LIDMigrationMappingSyncPayload + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LegacyMessage. */ + interface ILegacyMessage { + + /** LegacyMessage eventResponseMessage */ + eventResponseMessage?: (proto.Message.IEventResponseMessage|null); + + /** LegacyMessage pollVote */ + pollVote?: (proto.Message.IPollVoteMessage|null); + } + + /** Represents a LegacyMessage. */ + class LegacyMessage implements ILegacyMessage { + + /** + * Constructs a new LegacyMessage. + * @param [properties] Properties to set + */ + constructor(properties?: proto.ILegacyMessage); + + /** LegacyMessage eventResponseMessage. */ + public eventResponseMessage?: (proto.Message.IEventResponseMessage|null); + + /** LegacyMessage pollVote. */ + public pollVote?: (proto.Message.IPollVoteMessage|null); + + /** + * Creates a new LegacyMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns LegacyMessage instance + */ + public static create(properties?: proto.ILegacyMessage): proto.LegacyMessage; + + /** + * Encodes the specified LegacyMessage message. Does not implicitly {@link proto.LegacyMessage.verify|verify} messages. + * @param message LegacyMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.ILegacyMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LegacyMessage message, length delimited. Does not implicitly {@link proto.LegacyMessage.verify|verify} messages. + * @param message LegacyMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.ILegacyMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LegacyMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LegacyMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.LegacyMessage; + + /** + * Decodes a LegacyMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LegacyMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.LegacyMessage; + + /** + * Verifies a LegacyMessage message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LegacyMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LegacyMessage + */ + public static fromObject(object: { [k: string]: any }): proto.LegacyMessage; + + /** + * Creates a plain object from a LegacyMessage message. Also converts values to other types if specified. + * @param message LegacyMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.LegacyMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LegacyMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LegacyMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LimitSharing. */ + interface ILimitSharing { + + /** LimitSharing sharingLimited */ + sharingLimited?: (boolean|null); + + /** LimitSharing trigger */ + trigger?: (proto.LimitSharing.Trigger|null); + } + + /** Represents a LimitSharing. */ + class LimitSharing implements ILimitSharing { + + /** + * Constructs a new LimitSharing. + * @param [properties] Properties to set + */ + constructor(properties?: proto.ILimitSharing); + + /** LimitSharing sharingLimited. */ + public sharingLimited?: (boolean|null); + + /** LimitSharing trigger. */ + public trigger?: (proto.LimitSharing.Trigger|null); + + /** + * Creates a new LimitSharing instance using the specified properties. + * @param [properties] Properties to set + * @returns LimitSharing instance + */ + public static create(properties?: proto.ILimitSharing): proto.LimitSharing; + + /** + * Encodes the specified LimitSharing message. Does not implicitly {@link proto.LimitSharing.verify|verify} messages. + * @param message LimitSharing message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.ILimitSharing, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LimitSharing message, length delimited. Does not implicitly {@link proto.LimitSharing.verify|verify} messages. + * @param message LimitSharing message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.ILimitSharing, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LimitSharing message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LimitSharing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.LimitSharing; + + /** + * Decodes a LimitSharing message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LimitSharing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.LimitSharing; + + /** + * Verifies a LimitSharing message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LimitSharing message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LimitSharing + */ + public static fromObject(object: { [k: string]: any }): proto.LimitSharing; + + /** + * Creates a plain object from a LimitSharing message. Also converts values to other types if specified. + * @param message LimitSharing + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.LimitSharing, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LimitSharing to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LimitSharing + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace LimitSharing { + + /** Trigger enum. */ + enum Trigger { + CHAT_SETTING = 0, + BIZ_SUPPORTS_FB_HOSTING = 1 + } } /** Properties of a LocalizedName. */ @@ -8719,13 +16224,13 @@ export namespace proto { constructor(properties?: proto.ILocalizedName); /** LocalizedName lg. */ - public lg: string; + public lg?: (string|null); /** LocalizedName lc. */ - public lc: string; + public lc?: (string|null); /** LocalizedName verifiedName. */ - public verifiedName: string; + public verifiedName?: (string|null); /** * Creates a new LocalizedName instance using the specified properties. @@ -8796,6 +16301,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LocalizedName + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Location. */ @@ -8821,13 +16333,13 @@ export namespace proto { constructor(properties?: proto.ILocation); /** Location degreesLatitude. */ - public degreesLatitude: number; + public degreesLatitude?: (number|null); /** Location degreesLongitude. */ - public degreesLongitude: number; + public degreesLongitude?: (number|null); /** Location name. */ - public name: string; + public name?: (string|null); /** * Creates a new Location instance using the specified properties. @@ -8898,6 +16410,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Location + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a MediaData. */ @@ -8917,7 +16436,7 @@ export namespace proto { constructor(properties?: proto.IMediaData); /** MediaData localPath. */ - public localPath: string; + public localPath?: (string|null); /** * Creates a new MediaData instance using the specified properties. @@ -8988,399 +16507,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; - } - - /** Properties of a MediaEntry. */ - interface IMediaEntry { - - /** MediaEntry fileSha256 */ - fileSha256?: (Uint8Array|null); - - /** MediaEntry mediaKey */ - mediaKey?: (Uint8Array|null); - - /** MediaEntry fileEncSha256 */ - fileEncSha256?: (Uint8Array|null); - - /** MediaEntry directPath */ - directPath?: (string|null); - - /** MediaEntry mediaKeyTimestamp */ - mediaKeyTimestamp?: (number|Long|null); - - /** MediaEntry serverMediaType */ - serverMediaType?: (string|null); - - /** MediaEntry uploadToken */ - uploadToken?: (Uint8Array|null); - - /** MediaEntry validatedTimestamp */ - validatedTimestamp?: (Uint8Array|null); - - /** MediaEntry sidecar */ - sidecar?: (Uint8Array|null); - - /** MediaEntry objectId */ - objectId?: (string|null); - - /** MediaEntry fbid */ - fbid?: (string|null); - - /** MediaEntry downloadableThumbnail */ - downloadableThumbnail?: (proto.MediaEntry.IDownloadableThumbnail|null); - - /** MediaEntry handle */ - handle?: (string|null); - - /** MediaEntry filename */ - filename?: (string|null); - - /** MediaEntry progressiveJpegDetails */ - progressiveJpegDetails?: (proto.MediaEntry.IProgressiveJpegDetails|null); - } - - /** Represents a MediaEntry. */ - class MediaEntry implements IMediaEntry { /** - * Constructs a new MediaEntry. - * @param [properties] Properties to set + * Gets the default type url for MediaData + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url */ - constructor(properties?: proto.IMediaEntry); - - /** MediaEntry fileSha256. */ - public fileSha256: Uint8Array; - - /** MediaEntry mediaKey. */ - public mediaKey: Uint8Array; - - /** MediaEntry fileEncSha256. */ - public fileEncSha256: Uint8Array; - - /** MediaEntry directPath. */ - public directPath: string; - - /** MediaEntry mediaKeyTimestamp. */ - public mediaKeyTimestamp: (number|Long); - - /** MediaEntry serverMediaType. */ - public serverMediaType: string; - - /** MediaEntry uploadToken. */ - public uploadToken: Uint8Array; - - /** MediaEntry validatedTimestamp. */ - public validatedTimestamp: Uint8Array; - - /** MediaEntry sidecar. */ - public sidecar: Uint8Array; - - /** MediaEntry objectId. */ - public objectId: string; - - /** MediaEntry fbid. */ - public fbid: string; - - /** MediaEntry downloadableThumbnail. */ - public downloadableThumbnail?: (proto.MediaEntry.IDownloadableThumbnail|null); - - /** MediaEntry handle. */ - public handle: string; - - /** MediaEntry filename. */ - public filename: string; - - /** MediaEntry progressiveJpegDetails. */ - public progressiveJpegDetails?: (proto.MediaEntry.IProgressiveJpegDetails|null); - - /** - * Creates a new MediaEntry instance using the specified properties. - * @param [properties] Properties to set - * @returns MediaEntry instance - */ - public static create(properties?: proto.IMediaEntry): proto.MediaEntry; - - /** - * Encodes the specified MediaEntry message. Does not implicitly {@link proto.MediaEntry.verify|verify} messages. - * @param message MediaEntry message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IMediaEntry, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MediaEntry message, length delimited. Does not implicitly {@link proto.MediaEntry.verify|verify} messages. - * @param message MediaEntry message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IMediaEntry, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MediaEntry message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MediaEntry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.MediaEntry; - - /** - * Decodes a MediaEntry message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MediaEntry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.MediaEntry; - - /** - * Verifies a MediaEntry message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MediaEntry message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MediaEntry - */ - public static fromObject(object: { [k: string]: any }): proto.MediaEntry; - - /** - * Creates a plain object from a MediaEntry message. Also converts values to other types if specified. - * @param message MediaEntry - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.MediaEntry, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MediaEntry to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace MediaEntry { - - /** Properties of a DownloadableThumbnail. */ - interface IDownloadableThumbnail { - - /** DownloadableThumbnail fileSha256 */ - fileSha256?: (Uint8Array|null); - - /** DownloadableThumbnail fileEncSha256 */ - fileEncSha256?: (Uint8Array|null); - - /** DownloadableThumbnail directPath */ - directPath?: (string|null); - - /** DownloadableThumbnail mediaKey */ - mediaKey?: (Uint8Array|null); - - /** DownloadableThumbnail mediaKeyTimestamp */ - mediaKeyTimestamp?: (number|Long|null); - - /** DownloadableThumbnail objectId */ - objectId?: (string|null); - } - - /** Represents a DownloadableThumbnail. */ - class DownloadableThumbnail implements IDownloadableThumbnail { - - /** - * Constructs a new DownloadableThumbnail. - * @param [properties] Properties to set - */ - constructor(properties?: proto.MediaEntry.IDownloadableThumbnail); - - /** DownloadableThumbnail fileSha256. */ - public fileSha256: Uint8Array; - - /** DownloadableThumbnail fileEncSha256. */ - public fileEncSha256: Uint8Array; - - /** DownloadableThumbnail directPath. */ - public directPath: string; - - /** DownloadableThumbnail mediaKey. */ - public mediaKey: Uint8Array; - - /** DownloadableThumbnail mediaKeyTimestamp. */ - public mediaKeyTimestamp: (number|Long); - - /** DownloadableThumbnail objectId. */ - public objectId: string; - - /** - * Creates a new DownloadableThumbnail instance using the specified properties. - * @param [properties] Properties to set - * @returns DownloadableThumbnail instance - */ - public static create(properties?: proto.MediaEntry.IDownloadableThumbnail): proto.MediaEntry.DownloadableThumbnail; - - /** - * Encodes the specified DownloadableThumbnail message. Does not implicitly {@link proto.MediaEntry.DownloadableThumbnail.verify|verify} messages. - * @param message DownloadableThumbnail message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.MediaEntry.IDownloadableThumbnail, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DownloadableThumbnail message, length delimited. Does not implicitly {@link proto.MediaEntry.DownloadableThumbnail.verify|verify} messages. - * @param message DownloadableThumbnail message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.MediaEntry.IDownloadableThumbnail, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DownloadableThumbnail message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DownloadableThumbnail - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.MediaEntry.DownloadableThumbnail; - - /** - * Decodes a DownloadableThumbnail message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DownloadableThumbnail - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.MediaEntry.DownloadableThumbnail; - - /** - * Verifies a DownloadableThumbnail message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DownloadableThumbnail message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DownloadableThumbnail - */ - public static fromObject(object: { [k: string]: any }): proto.MediaEntry.DownloadableThumbnail; - - /** - * Creates a plain object from a DownloadableThumbnail message. Also converts values to other types if specified. - * @param message DownloadableThumbnail - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.MediaEntry.DownloadableThumbnail, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DownloadableThumbnail to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ProgressiveJpegDetails. */ - interface IProgressiveJpegDetails { - - /** ProgressiveJpegDetails scanLengths */ - scanLengths?: ((number|Long)[]|null); - - /** ProgressiveJpegDetails sidecar */ - sidecar?: (Uint8Array|null); - } - - /** Represents a ProgressiveJpegDetails. */ - class ProgressiveJpegDetails implements IProgressiveJpegDetails { - - /** - * Constructs a new ProgressiveJpegDetails. - * @param [properties] Properties to set - */ - constructor(properties?: proto.MediaEntry.IProgressiveJpegDetails); - - /** ProgressiveJpegDetails scanLengths. */ - public scanLengths: (number|Long)[]; - - /** ProgressiveJpegDetails sidecar. */ - public sidecar: Uint8Array; - - /** - * Creates a new ProgressiveJpegDetails instance using the specified properties. - * @param [properties] Properties to set - * @returns ProgressiveJpegDetails instance - */ - public static create(properties?: proto.MediaEntry.IProgressiveJpegDetails): proto.MediaEntry.ProgressiveJpegDetails; - - /** - * Encodes the specified ProgressiveJpegDetails message. Does not implicitly {@link proto.MediaEntry.ProgressiveJpegDetails.verify|verify} messages. - * @param message ProgressiveJpegDetails message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.MediaEntry.IProgressiveJpegDetails, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ProgressiveJpegDetails message, length delimited. Does not implicitly {@link proto.MediaEntry.ProgressiveJpegDetails.verify|verify} messages. - * @param message ProgressiveJpegDetails message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.MediaEntry.IProgressiveJpegDetails, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ProgressiveJpegDetails message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ProgressiveJpegDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.MediaEntry.ProgressiveJpegDetails; - - /** - * Decodes a ProgressiveJpegDetails message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ProgressiveJpegDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.MediaEntry.ProgressiveJpegDetails; - - /** - * Verifies a ProgressiveJpegDetails message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ProgressiveJpegDetails message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ProgressiveJpegDetails - */ - public static fromObject(object: { [k: string]: any }): proto.MediaEntry.ProgressiveJpegDetails; - - /** - * Creates a plain object from a ProgressiveJpegDetails message. Also converts values to other types if specified. - * @param message ProgressiveJpegDetails - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.MediaEntry.ProgressiveJpegDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ProgressiveJpegDetails to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a MediaNotifyMessage. */ @@ -9406,13 +16539,13 @@ export namespace proto { constructor(properties?: proto.IMediaNotifyMessage); /** MediaNotifyMessage expressPathUrl. */ - public expressPathUrl: string; + public expressPathUrl?: (string|null); /** MediaNotifyMessage fileEncSha256. */ - public fileEncSha256: Uint8Array; + public fileEncSha256?: (Uint8Array|null); /** MediaNotifyMessage fileLength. */ - public fileLength: (number|Long); + public fileLength?: (number|Long|null); /** * Creates a new MediaNotifyMessage instance using the specified properties. @@ -9483,6 +16616,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MediaNotifyMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a MediaRetryNotification. */ @@ -9496,6 +16636,9 @@ export namespace proto { /** MediaRetryNotification result */ result?: (proto.MediaRetryNotification.ResultType|null); + + /** MediaRetryNotification messageSecret */ + messageSecret?: (Uint8Array|null); } /** Represents a MediaRetryNotification. */ @@ -9508,13 +16651,16 @@ export namespace proto { constructor(properties?: proto.IMediaRetryNotification); /** MediaRetryNotification stanzaId. */ - public stanzaId: string; + public stanzaId?: (string|null); /** MediaRetryNotification directPath. */ - public directPath: string; + public directPath?: (string|null); /** MediaRetryNotification result. */ - public result: proto.MediaRetryNotification.ResultType; + public result?: (proto.MediaRetryNotification.ResultType|null); + + /** MediaRetryNotification messageSecret. */ + public messageSecret?: (Uint8Array|null); /** * Creates a new MediaRetryNotification instance using the specified properties. @@ -9585,6 +16731,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MediaRetryNotification + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace MediaRetryNotification { @@ -9797,20 +16950,62 @@ export namespace proto { /** Message eventMessage */ eventMessage?: (proto.Message.IEventMessage|null); + /** Message encEventResponseMessage */ + encEventResponseMessage?: (proto.Message.IEncEventResponseMessage|null); + /** Message commentMessage */ commentMessage?: (proto.Message.ICommentMessage|null); /** Message newsletterAdminInviteMessage */ newsletterAdminInviteMessage?: (proto.Message.INewsletterAdminInviteMessage|null); - /** Message extendedTextMessageWithParentKey */ - extendedTextMessageWithParentKey?: (proto.Message.IExtendedTextMessageWithParentKey|null); - /** Message placeholderMessage */ placeholderMessage?: (proto.Message.IPlaceholderMessage|null); - /** Message encEventUpdateMessage */ - encEventUpdateMessage?: (proto.Message.IEncEventUpdateMessage|null); + /** Message secretEncryptedMessage */ + secretEncryptedMessage?: (proto.Message.ISecretEncryptedMessage|null); + + /** Message albumMessage */ + albumMessage?: (proto.Message.IAlbumMessage|null); + + /** Message eventCoverImage */ + eventCoverImage?: (proto.Message.IFutureProofMessage|null); + + /** Message stickerPackMessage */ + stickerPackMessage?: (proto.Message.IStickerPackMessage|null); + + /** Message statusMentionMessage */ + statusMentionMessage?: (proto.Message.IFutureProofMessage|null); + + /** Message pollResultSnapshotMessage */ + pollResultSnapshotMessage?: (proto.Message.IPollResultSnapshotMessage|null); + + /** Message pollCreationOptionImageMessage */ + pollCreationOptionImageMessage?: (proto.Message.IFutureProofMessage|null); + + /** Message associatedChildMessage */ + associatedChildMessage?: (proto.Message.IFutureProofMessage|null); + + /** Message groupStatusMentionMessage */ + groupStatusMentionMessage?: (proto.Message.IFutureProofMessage|null); + + /** Message pollCreationMessageV4 */ + pollCreationMessageV4?: (proto.Message.IFutureProofMessage|null); + + /** Message pollCreationMessageV5 */ + pollCreationMessageV5?: (proto.Message.IFutureProofMessage|null); + + /** Message statusAddYours */ + statusAddYours?: (proto.Message.IFutureProofMessage|null); + + /** Message groupStatusMessage */ + groupStatusMessage?: (proto.Message.IFutureProofMessage|null); + + /** Message richResponseMessage */ + richResponseMessage?: (proto.IAIRichResponseMessage|null); + + /** Message statusNotificationMessage */ + statusNotificationMessage?: (proto.Message.IStatusNotificationMessage|null); } /** Represents a Message. */ @@ -9823,7 +17018,7 @@ export namespace proto { constructor(properties?: proto.IMessage); /** Message conversation. */ - public conversation: string; + public conversation?: (string|null); /** Message senderKeyDistributionMessage. */ public senderKeyDistributionMessage?: (proto.Message.ISenderKeyDistributionMessage|null); @@ -10011,20 +17206,62 @@ export namespace proto { /** Message eventMessage. */ public eventMessage?: (proto.Message.IEventMessage|null); + /** Message encEventResponseMessage. */ + public encEventResponseMessage?: (proto.Message.IEncEventResponseMessage|null); + /** Message commentMessage. */ public commentMessage?: (proto.Message.ICommentMessage|null); /** Message newsletterAdminInviteMessage. */ public newsletterAdminInviteMessage?: (proto.Message.INewsletterAdminInviteMessage|null); - /** Message extendedTextMessageWithParentKey. */ - public extendedTextMessageWithParentKey?: (proto.Message.IExtendedTextMessageWithParentKey|null); - /** Message placeholderMessage. */ public placeholderMessage?: (proto.Message.IPlaceholderMessage|null); - /** Message encEventUpdateMessage. */ - public encEventUpdateMessage?: (proto.Message.IEncEventUpdateMessage|null); + /** Message secretEncryptedMessage. */ + public secretEncryptedMessage?: (proto.Message.ISecretEncryptedMessage|null); + + /** Message albumMessage. */ + public albumMessage?: (proto.Message.IAlbumMessage|null); + + /** Message eventCoverImage. */ + public eventCoverImage?: (proto.Message.IFutureProofMessage|null); + + /** Message stickerPackMessage. */ + public stickerPackMessage?: (proto.Message.IStickerPackMessage|null); + + /** Message statusMentionMessage. */ + public statusMentionMessage?: (proto.Message.IFutureProofMessage|null); + + /** Message pollResultSnapshotMessage. */ + public pollResultSnapshotMessage?: (proto.Message.IPollResultSnapshotMessage|null); + + /** Message pollCreationOptionImageMessage. */ + public pollCreationOptionImageMessage?: (proto.Message.IFutureProofMessage|null); + + /** Message associatedChildMessage. */ + public associatedChildMessage?: (proto.Message.IFutureProofMessage|null); + + /** Message groupStatusMentionMessage. */ + public groupStatusMentionMessage?: (proto.Message.IFutureProofMessage|null); + + /** Message pollCreationMessageV4. */ + public pollCreationMessageV4?: (proto.Message.IFutureProofMessage|null); + + /** Message pollCreationMessageV5. */ + public pollCreationMessageV5?: (proto.Message.IFutureProofMessage|null); + + /** Message statusAddYours. */ + public statusAddYours?: (proto.Message.IFutureProofMessage|null); + + /** Message groupStatusMessage. */ + public groupStatusMessage?: (proto.Message.IFutureProofMessage|null); + + /** Message richResponseMessage. */ + public richResponseMessage?: (proto.IAIRichResponseMessage|null); + + /** Message statusNotificationMessage. */ + public statusNotificationMessage?: (proto.Message.IStatusNotificationMessage|null); /** * Creates a new Message instance using the specified properties. @@ -10095,10 +17332,126 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Message + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace Message { + /** Properties of an AlbumMessage. */ + interface IAlbumMessage { + + /** AlbumMessage expectedImageCount */ + expectedImageCount?: (number|null); + + /** AlbumMessage expectedVideoCount */ + expectedVideoCount?: (number|null); + + /** AlbumMessage contextInfo */ + contextInfo?: (proto.IContextInfo|null); + } + + /** Represents an AlbumMessage. */ + class AlbumMessage implements IAlbumMessage { + + /** + * Constructs a new AlbumMessage. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.IAlbumMessage); + + /** AlbumMessage expectedImageCount. */ + public expectedImageCount?: (number|null); + + /** AlbumMessage expectedVideoCount. */ + public expectedVideoCount?: (number|null); + + /** AlbumMessage contextInfo. */ + public contextInfo?: (proto.IContextInfo|null); + + /** + * Creates a new AlbumMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns AlbumMessage instance + */ + public static create(properties?: proto.Message.IAlbumMessage): proto.Message.AlbumMessage; + + /** + * Encodes the specified AlbumMessage message. Does not implicitly {@link proto.Message.AlbumMessage.verify|verify} messages. + * @param message AlbumMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.IAlbumMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AlbumMessage message, length delimited. Does not implicitly {@link proto.Message.AlbumMessage.verify|verify} messages. + * @param message AlbumMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.IAlbumMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AlbumMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AlbumMessage + * @throws {Error} If the payload is not 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.AlbumMessage; + + /** + * Decodes an AlbumMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AlbumMessage + * @throws {Error} If the payload 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.AlbumMessage; + + /** + * Verifies an AlbumMessage message. + * @param message Plain 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 AlbumMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AlbumMessage + */ + public static fromObject(object: { [k: string]: any }): proto.Message.AlbumMessage; + + /** + * Creates a plain object from an AlbumMessage message. Also converts values to other types if specified. + * @param message AlbumMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.AlbumMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AlbumMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AlbumMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of an AppStateFatalExceptionNotification. */ interface IAppStateFatalExceptionNotification { @@ -10122,7 +17475,7 @@ export namespace proto { public collectionNames: string[]; /** AppStateFatalExceptionNotification timestamp. */ - public timestamp: (number|Long); + public timestamp?: (number|Long|null); /** * Creates a new AppStateFatalExceptionNotification instance using the specified properties. @@ -10193,6 +17546,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AppStateFatalExceptionNotification + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an AppStateSyncKey. */ @@ -10289,6 +17649,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AppStateSyncKey + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an AppStateSyncKeyData. */ @@ -10314,13 +17681,13 @@ export namespace proto { constructor(properties?: proto.Message.IAppStateSyncKeyData); /** AppStateSyncKeyData keyData. */ - public keyData: Uint8Array; + public keyData?: (Uint8Array|null); /** AppStateSyncKeyData fingerprint. */ public fingerprint?: (proto.Message.IAppStateSyncKeyFingerprint|null); /** AppStateSyncKeyData timestamp. */ - public timestamp: (number|Long); + public timestamp?: (number|Long|null); /** * Creates a new AppStateSyncKeyData instance using the specified properties. @@ -10391,6 +17758,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AppStateSyncKeyData + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an AppStateSyncKeyFingerprint. */ @@ -10416,10 +17790,10 @@ export namespace proto { constructor(properties?: proto.Message.IAppStateSyncKeyFingerprint); /** AppStateSyncKeyFingerprint rawId. */ - public rawId: number; + public rawId?: (number|null); /** AppStateSyncKeyFingerprint currentIndex. */ - public currentIndex: number; + public currentIndex?: (number|null); /** AppStateSyncKeyFingerprint deviceIndexes. */ public deviceIndexes: number[]; @@ -10493,6 +17867,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AppStateSyncKeyFingerprint + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an AppStateSyncKeyId. */ @@ -10512,7 +17893,7 @@ export namespace proto { constructor(properties?: proto.Message.IAppStateSyncKeyId); /** AppStateSyncKeyId keyId. */ - public keyId: Uint8Array; + public keyId?: (Uint8Array|null); /** * Creates a new AppStateSyncKeyId instance using the specified properties. @@ -10583,6 +17964,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AppStateSyncKeyId + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an AppStateSyncKeyRequest. */ @@ -10673,6 +18061,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AppStateSyncKeyRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an AppStateSyncKeyShare. */ @@ -10763,6 +18158,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AppStateSyncKeyShare + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an AudioMessage. */ @@ -10812,6 +18214,9 @@ export namespace proto { /** AudioMessage viewOnce */ viewOnce?: (boolean|null); + + /** AudioMessage accessibilityLabel */ + accessibilityLabel?: (string|null); } /** Represents an AudioMessage. */ @@ -10824,49 +18229,52 @@ export namespace proto { constructor(properties?: proto.Message.IAudioMessage); /** AudioMessage url. */ - public url: string; + public url?: (string|null); /** AudioMessage mimetype. */ - public mimetype: string; + public mimetype?: (string|null); /** AudioMessage fileSha256. */ - public fileSha256: Uint8Array; + public fileSha256?: (Uint8Array|null); /** AudioMessage fileLength. */ - public fileLength: (number|Long); + public fileLength?: (number|Long|null); /** AudioMessage seconds. */ - public seconds: number; + public seconds?: (number|null); /** AudioMessage ptt. */ - public ptt: boolean; + public ptt?: (boolean|null); /** AudioMessage mediaKey. */ - public mediaKey: Uint8Array; + public mediaKey?: (Uint8Array|null); /** AudioMessage fileEncSha256. */ - public fileEncSha256: Uint8Array; + public fileEncSha256?: (Uint8Array|null); /** AudioMessage directPath. */ - public directPath: string; + public directPath?: (string|null); /** AudioMessage mediaKeyTimestamp. */ - public mediaKeyTimestamp: (number|Long); + public mediaKeyTimestamp?: (number|Long|null); /** AudioMessage contextInfo. */ public contextInfo?: (proto.IContextInfo|null); /** AudioMessage streamingSidecar. */ - public streamingSidecar: Uint8Array; + public streamingSidecar?: (Uint8Array|null); /** AudioMessage waveform. */ - public waveform: Uint8Array; + public waveform?: (Uint8Array|null); /** AudioMessage backgroundArgb. */ - public backgroundArgb: number; + public backgroundArgb?: (number|null); /** AudioMessage viewOnce. */ - public viewOnce: boolean; + public viewOnce?: (boolean|null); + + /** AudioMessage accessibilityLabel. */ + public accessibilityLabel?: (string|null); /** * Creates a new AudioMessage instance using the specified properties. @@ -10937,6 +18345,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AudioMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a BCallMessage. */ @@ -10965,16 +18380,16 @@ export namespace proto { constructor(properties?: proto.Message.IBCallMessage); /** BCallMessage sessionId. */ - public sessionId: string; + public sessionId?: (string|null); /** BCallMessage mediaType. */ - public mediaType: proto.Message.BCallMessage.MediaType; + public mediaType?: (proto.Message.BCallMessage.MediaType|null); /** BCallMessage masterKey. */ - public masterKey: Uint8Array; + public masterKey?: (Uint8Array|null); /** BCallMessage caption. */ - public caption: string; + public caption?: (string|null); /** * Creates a new BCallMessage instance using the specified properties. @@ -11045,6 +18460,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BCallMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace BCallMessage { @@ -11074,6 +18496,9 @@ export namespace proto { /** BotFeedbackMessage kindPositive */ kindPositive?: (number|Long|null); + + /** BotFeedbackMessage kindReport */ + kindReport?: (proto.Message.BotFeedbackMessage.ReportKind|null); } /** Represents a BotFeedbackMessage. */ @@ -11089,16 +18514,19 @@ export namespace proto { public messageKey?: (proto.IMessageKey|null); /** BotFeedbackMessage kind. */ - public kind: proto.Message.BotFeedbackMessage.BotFeedbackKind; + public kind?: (proto.Message.BotFeedbackMessage.BotFeedbackKind|null); /** BotFeedbackMessage text. */ - public text: string; + public text?: (string|null); /** BotFeedbackMessage kindNegative. */ - public kindNegative: (number|Long); + public kindNegative?: (number|Long|null); /** BotFeedbackMessage kindPositive. */ - public kindPositive: (number|Long); + public kindPositive?: (number|Long|null); + + /** BotFeedbackMessage kindReport. */ + public kindReport?: (proto.Message.BotFeedbackMessage.ReportKind|null); /** * Creates a new BotFeedbackMessage instance using the specified properties. @@ -11169,6 +18597,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BotFeedbackMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace BotFeedbackMessage { @@ -11184,7 +18619,10 @@ export namespace proto { BOT_FEEDBACK_NEGATIVE_OTHER = 6, BOT_FEEDBACK_NEGATIVE_REFUSED = 7, BOT_FEEDBACK_NEGATIVE_NOT_VISUALLY_APPEALING = 8, - BOT_FEEDBACK_NEGATIVE_NOT_RELEVANT_TO_TEXT = 9 + BOT_FEEDBACK_NEGATIVE_NOT_RELEVANT_TO_TEXT = 9, + BOT_FEEDBACK_NEGATIVE_PERSONALIZED = 10, + BOT_FEEDBACK_NEGATIVE_CLARITY = 11, + BOT_FEEDBACK_NEGATIVE_DOESNT_LOOK_LIKE_THE_PERSON = 12 } /** BotFeedbackKindMultipleNegative enum. */ @@ -11204,6 +18642,11 @@ export namespace proto { enum BotFeedbackKindMultiplePositive { BOT_FEEDBACK_MULTIPLE_POSITIVE_GENERIC = 1 } + + /** ReportKind enum. */ + enum ReportKind { + GENERIC = 0 + } } /** Properties of a ButtonsMessage. */ @@ -11250,10 +18693,10 @@ export namespace proto { constructor(properties?: proto.Message.IButtonsMessage); /** ButtonsMessage contentText. */ - public contentText: string; + public contentText?: (string|null); /** ButtonsMessage footerText. */ - public footerText: string; + public footerText?: (string|null); /** ButtonsMessage contextInfo. */ public contextInfo?: (proto.IContextInfo|null); @@ -11262,7 +18705,7 @@ export namespace proto { public buttons: proto.Message.ButtonsMessage.IButton[]; /** ButtonsMessage headerType. */ - public headerType: proto.Message.ButtonsMessage.HeaderType; + public headerType?: (proto.Message.ButtonsMessage.HeaderType|null); /** ButtonsMessage text. */ public text?: (string|null); @@ -11351,6 +18794,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ButtonsMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace ButtonsMessage { @@ -11381,13 +18831,13 @@ export namespace proto { constructor(properties?: proto.Message.ButtonsMessage.IButton); /** Button buttonId. */ - public buttonId: string; + public buttonId?: (string|null); /** Button buttonText. */ public buttonText?: (proto.Message.ButtonsMessage.Button.IButtonText|null); /** Button type. */ - public type: proto.Message.ButtonsMessage.Button.Type; + public type?: (proto.Message.ButtonsMessage.Button.Type|null); /** Button nativeFlowInfo. */ public nativeFlowInfo?: (proto.Message.ButtonsMessage.Button.INativeFlowInfo|null); @@ -11461,6 +18911,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Button + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace Button { @@ -11482,7 +18939,7 @@ export namespace proto { constructor(properties?: proto.Message.ButtonsMessage.Button.IButtonText); /** ButtonText displayText. */ - public displayText: string; + public displayText?: (string|null); /** * Creates a new ButtonText instance using the specified properties. @@ -11553,6 +19010,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ButtonText + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a NativeFlowInfo. */ @@ -11575,10 +19039,10 @@ export namespace proto { constructor(properties?: proto.Message.ButtonsMessage.Button.INativeFlowInfo); /** NativeFlowInfo name. */ - public name: string; + public name?: (string|null); /** NativeFlowInfo paramsJson. */ - public paramsJson: string; + public paramsJson?: (string|null); /** * Creates a new NativeFlowInfo instance using the specified properties. @@ -11649,6 +19113,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NativeFlowInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Type enum. */ @@ -11697,13 +19168,13 @@ export namespace proto { constructor(properties?: proto.Message.IButtonsResponseMessage); /** ButtonsResponseMessage selectedButtonId. */ - public selectedButtonId: string; + public selectedButtonId?: (string|null); /** ButtonsResponseMessage contextInfo. */ public contextInfo?: (proto.IContextInfo|null); /** ButtonsResponseMessage type. */ - public type: proto.Message.ButtonsResponseMessage.Type; + public type?: (proto.Message.ButtonsResponseMessage.Type|null); /** ButtonsResponseMessage selectedDisplayText. */ public selectedDisplayText?: (string|null); @@ -11780,6 +19251,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ButtonsResponseMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace ButtonsResponseMessage { @@ -11805,6 +19283,12 @@ export namespace proto { /** Call conversionDelaySeconds */ conversionDelaySeconds?: (number|null); + + /** Call ctwaSignals */ + ctwaSignals?: (string|null); + + /** Call ctwaPayload */ + ctwaPayload?: (Uint8Array|null); } /** Represents a Call. */ @@ -11817,16 +19301,22 @@ export namespace proto { constructor(properties?: proto.Message.ICall); /** Call callKey. */ - public callKey: Uint8Array; + public callKey?: (Uint8Array|null); /** Call conversionSource. */ - public conversionSource: string; + public conversionSource?: (string|null); /** Call conversionData. */ - public conversionData: Uint8Array; + public conversionData?: (Uint8Array|null); /** Call conversionDelaySeconds. */ - public conversionDelaySeconds: number; + public conversionDelaySeconds?: (number|null); + + /** Call ctwaSignals. */ + public ctwaSignals?: (string|null); + + /** Call ctwaPayload. */ + public ctwaPayload?: (Uint8Array|null); /** * Creates a new Call instance using the specified properties. @@ -11897,6 +19387,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Call + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CallLogMessage. */ @@ -11928,16 +19425,16 @@ export namespace proto { constructor(properties?: proto.Message.ICallLogMessage); /** CallLogMessage isVideo. */ - public isVideo: boolean; + public isVideo?: (boolean|null); /** CallLogMessage callOutcome. */ - public callOutcome: proto.Message.CallLogMessage.CallOutcome; + public callOutcome?: (proto.Message.CallLogMessage.CallOutcome|null); /** CallLogMessage durationSecs. */ - public durationSecs: (number|Long); + public durationSecs?: (number|Long|null); /** CallLogMessage callType. */ - public callType: proto.Message.CallLogMessage.CallType; + public callType?: (proto.Message.CallLogMessage.CallType|null); /** CallLogMessage participants. */ public participants: proto.Message.CallLogMessage.ICallParticipant[]; @@ -12011,6 +19508,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CallLogMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace CallLogMessage { @@ -12047,10 +19551,10 @@ export namespace proto { constructor(properties?: proto.Message.CallLogMessage.ICallParticipant); /** CallParticipant jid. */ - public jid: string; + public jid?: (string|null); /** CallParticipant callOutcome. */ - public callOutcome: proto.Message.CallLogMessage.CallOutcome; + public callOutcome?: (proto.Message.CallLogMessage.CallOutcome|null); /** * Creates a new CallParticipant instance using the specified properties. @@ -12121,6 +19625,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CallParticipant + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** CallType enum. */ @@ -12219,6 +19730,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CancelPaymentRequestMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Chat. */ @@ -12241,10 +19759,10 @@ export namespace proto { constructor(properties?: proto.Message.IChat); /** Chat displayName. */ - public displayName: string; + public displayName?: (string|null); /** Chat id. */ - public id: string; + public id?: (string|null); /** * Creates a new Chat instance using the specified properties. @@ -12315,6 +19833,138 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Chat + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CloudAPIThreadControlNotification. */ + interface ICloudAPIThreadControlNotification { + + /** CloudAPIThreadControlNotification status */ + status?: (proto.Message.CloudAPIThreadControlNotification.CloudAPIThreadControl|null); + + /** CloudAPIThreadControlNotification senderNotificationTimestampMs */ + senderNotificationTimestampMs?: (number|Long|null); + + /** CloudAPIThreadControlNotification consumerLid */ + consumerLid?: (string|null); + + /** CloudAPIThreadControlNotification consumerPhoneNumber */ + consumerPhoneNumber?: (string|null); + } + + /** Represents a CloudAPIThreadControlNotification. */ + class CloudAPIThreadControlNotification implements ICloudAPIThreadControlNotification { + + /** + * Constructs a new CloudAPIThreadControlNotification. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.ICloudAPIThreadControlNotification); + + /** CloudAPIThreadControlNotification status. */ + public status?: (proto.Message.CloudAPIThreadControlNotification.CloudAPIThreadControl|null); + + /** CloudAPIThreadControlNotification senderNotificationTimestampMs. */ + public senderNotificationTimestampMs?: (number|Long|null); + + /** CloudAPIThreadControlNotification consumerLid. */ + public consumerLid?: (string|null); + + /** CloudAPIThreadControlNotification consumerPhoneNumber. */ + public consumerPhoneNumber?: (string|null); + + /** + * Creates a new CloudAPIThreadControlNotification instance using the specified properties. + * @param [properties] Properties to set + * @returns CloudAPIThreadControlNotification instance + */ + public static create(properties?: proto.Message.ICloudAPIThreadControlNotification): proto.Message.CloudAPIThreadControlNotification; + + /** + * Encodes the specified CloudAPIThreadControlNotification message. Does not implicitly {@link proto.Message.CloudAPIThreadControlNotification.verify|verify} messages. + * @param message CloudAPIThreadControlNotification message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.ICloudAPIThreadControlNotification, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CloudAPIThreadControlNotification message, length delimited. Does not implicitly {@link proto.Message.CloudAPIThreadControlNotification.verify|verify} messages. + * @param message CloudAPIThreadControlNotification message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.ICloudAPIThreadControlNotification, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CloudAPIThreadControlNotification message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CloudAPIThreadControlNotification + * @throws {Error} If the payload is not 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.CloudAPIThreadControlNotification; + + /** + * Decodes a CloudAPIThreadControlNotification message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CloudAPIThreadControlNotification + * @throws {Error} If the payload 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.CloudAPIThreadControlNotification; + + /** + * Verifies a CloudAPIThreadControlNotification message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CloudAPIThreadControlNotification message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CloudAPIThreadControlNotification + */ + public static fromObject(object: { [k: string]: any }): proto.Message.CloudAPIThreadControlNotification; + + /** + * Creates a plain object from a CloudAPIThreadControlNotification message. Also converts values to other types if specified. + * @param message CloudAPIThreadControlNotification + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.CloudAPIThreadControlNotification, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CloudAPIThreadControlNotification to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CloudAPIThreadControlNotification + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace CloudAPIThreadControlNotification { + + /** CloudAPIThreadControl enum. */ + enum CloudAPIThreadControl { + UNKNOWN = 0, + CONTROL_PASSED = 1, + CONTROL_TAKEN = 2 + } } /** Properties of a CommentMessage. */ @@ -12411,6 +20061,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CommentMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ContactMessage. */ @@ -12436,10 +20093,10 @@ export namespace proto { constructor(properties?: proto.Message.IContactMessage); /** ContactMessage displayName. */ - public displayName: string; + public displayName?: (string|null); /** ContactMessage vcard. */ - public vcard: string; + public vcard?: (string|null); /** ContactMessage contextInfo. */ public contextInfo?: (proto.IContextInfo|null); @@ -12513,6 +20170,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ContactMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ContactsArrayMessage. */ @@ -12538,7 +20202,7 @@ export namespace proto { constructor(properties?: proto.Message.IContactsArrayMessage); /** ContactsArrayMessage displayName. */ - public displayName: string; + public displayName?: (string|null); /** ContactsArrayMessage contacts. */ public contacts: proto.Message.IContactMessage[]; @@ -12615,6 +20279,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ContactsArrayMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DeclinePaymentRequestMessage. */ @@ -12705,6 +20376,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeclinePaymentRequestMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DeviceSentMessage. */ @@ -12730,13 +20408,13 @@ export namespace proto { constructor(properties?: proto.Message.IDeviceSentMessage); /** DeviceSentMessage destinationJid. */ - public destinationJid: string; + public destinationJid?: (string|null); /** DeviceSentMessage message. */ public message?: (proto.IMessage|null); /** DeviceSentMessage phash. */ - public phash: string; + public phash?: (string|null); /** * Creates a new DeviceSentMessage instance using the specified properties. @@ -12807,6 +20485,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeviceSentMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DocumentMessage. */ @@ -12871,6 +20556,9 @@ export namespace proto { /** DocumentMessage caption */ caption?: (string|null); + + /** DocumentMessage accessibilityLabel */ + accessibilityLabel?: (string|null); } /** Represents a DocumentMessage. */ @@ -12883,64 +20571,67 @@ export namespace proto { constructor(properties?: proto.Message.IDocumentMessage); /** DocumentMessage url. */ - public url: string; + public url?: (string|null); /** DocumentMessage mimetype. */ - public mimetype: string; + public mimetype?: (string|null); /** DocumentMessage title. */ - public title: string; + public title?: (string|null); /** DocumentMessage fileSha256. */ - public fileSha256: Uint8Array; + public fileSha256?: (Uint8Array|null); /** DocumentMessage fileLength. */ - public fileLength: (number|Long); + public fileLength?: (number|Long|null); /** DocumentMessage pageCount. */ - public pageCount: number; + public pageCount?: (number|null); /** DocumentMessage mediaKey. */ - public mediaKey: Uint8Array; + public mediaKey?: (Uint8Array|null); /** DocumentMessage fileName. */ - public fileName: string; + public fileName?: (string|null); /** DocumentMessage fileEncSha256. */ - public fileEncSha256: Uint8Array; + public fileEncSha256?: (Uint8Array|null); /** DocumentMessage directPath. */ - public directPath: string; + public directPath?: (string|null); /** DocumentMessage mediaKeyTimestamp. */ - public mediaKeyTimestamp: (number|Long); + public mediaKeyTimestamp?: (number|Long|null); /** DocumentMessage contactVcard. */ - public contactVcard: boolean; + public contactVcard?: (boolean|null); /** DocumentMessage thumbnailDirectPath. */ - public thumbnailDirectPath: string; + public thumbnailDirectPath?: (string|null); /** DocumentMessage thumbnailSha256. */ - public thumbnailSha256: Uint8Array; + public thumbnailSha256?: (Uint8Array|null); /** DocumentMessage thumbnailEncSha256. */ - public thumbnailEncSha256: Uint8Array; + public thumbnailEncSha256?: (Uint8Array|null); /** DocumentMessage jpegThumbnail. */ - public jpegThumbnail: Uint8Array; + public jpegThumbnail?: (Uint8Array|null); /** DocumentMessage contextInfo. */ public contextInfo?: (proto.IContextInfo|null); /** DocumentMessage thumbnailHeight. */ - public thumbnailHeight: number; + public thumbnailHeight?: (number|null); /** DocumentMessage thumbnailWidth. */ - public thumbnailWidth: number; + public thumbnailWidth?: (number|null); /** DocumentMessage caption. */ - public caption: string; + public caption?: (string|null); + + /** DocumentMessage accessibilityLabel. */ + public accessibilityLabel?: (string|null); /** * Creates a new DocumentMessage instance using the specified properties. @@ -13011,6 +20702,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DocumentMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an EncCommentMessage. */ @@ -13039,10 +20737,10 @@ export namespace proto { public targetMessageKey?: (proto.IMessageKey|null); /** EncCommentMessage encPayload. */ - public encPayload: Uint8Array; + public encPayload?: (Uint8Array|null); /** EncCommentMessage encIv. */ - public encIv: Uint8Array; + public encIv?: (Uint8Array|null); /** * Creates a new EncCommentMessage instance using the specified properties. @@ -13113,108 +20811,122 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EncCommentMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an EncEventUpdateMessage. */ - interface IEncEventUpdateMessage { + /** Properties of an EncEventResponseMessage. */ + interface IEncEventResponseMessage { - /** EncEventUpdateMessage eventCreationMessageKey */ + /** EncEventResponseMessage eventCreationMessageKey */ eventCreationMessageKey?: (proto.IMessageKey|null); - /** EncEventUpdateMessage encPayload */ + /** EncEventResponseMessage encPayload */ encPayload?: (Uint8Array|null); - /** EncEventUpdateMessage encIv */ + /** EncEventResponseMessage encIv */ encIv?: (Uint8Array|null); } - /** Represents an EncEventUpdateMessage. */ - class EncEventUpdateMessage implements IEncEventUpdateMessage { + /** Represents an EncEventResponseMessage. */ + class EncEventResponseMessage implements IEncEventResponseMessage { /** - * Constructs a new EncEventUpdateMessage. + * Constructs a new EncEventResponseMessage. * @param [properties] Properties to set */ - constructor(properties?: proto.Message.IEncEventUpdateMessage); + constructor(properties?: proto.Message.IEncEventResponseMessage); - /** EncEventUpdateMessage eventCreationMessageKey. */ + /** EncEventResponseMessage eventCreationMessageKey. */ public eventCreationMessageKey?: (proto.IMessageKey|null); - /** EncEventUpdateMessage encPayload. */ - public encPayload: Uint8Array; + /** EncEventResponseMessage encPayload. */ + public encPayload?: (Uint8Array|null); - /** EncEventUpdateMessage encIv. */ - public encIv: Uint8Array; + /** EncEventResponseMessage encIv. */ + public encIv?: (Uint8Array|null); /** - * Creates a new EncEventUpdateMessage instance using the specified properties. + * Creates a new EncEventResponseMessage instance using the specified properties. * @param [properties] Properties to set - * @returns EncEventUpdateMessage instance + * @returns EncEventResponseMessage instance */ - public static create(properties?: proto.Message.IEncEventUpdateMessage): proto.Message.EncEventUpdateMessage; + public static create(properties?: proto.Message.IEncEventResponseMessage): proto.Message.EncEventResponseMessage; /** - * Encodes the specified EncEventUpdateMessage message. Does not implicitly {@link proto.Message.EncEventUpdateMessage.verify|verify} messages. - * @param message EncEventUpdateMessage message or plain object to encode + * Encodes the specified EncEventResponseMessage message. Does not implicitly {@link proto.Message.EncEventResponseMessage.verify|verify} messages. + * @param message EncEventResponseMessage message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: proto.Message.IEncEventUpdateMessage, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: proto.Message.IEncEventResponseMessage, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified EncEventUpdateMessage message, length delimited. Does not implicitly {@link proto.Message.EncEventUpdateMessage.verify|verify} messages. - * @param message EncEventUpdateMessage message or plain object to encode + * Encodes the specified EncEventResponseMessage message, length delimited. Does not implicitly {@link proto.Message.EncEventResponseMessage.verify|verify} messages. + * @param message EncEventResponseMessage message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: proto.Message.IEncEventUpdateMessage, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: proto.Message.IEncEventResponseMessage, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an EncEventUpdateMessage message from the specified reader or buffer. + * Decodes an EncEventResponseMessage message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns EncEventUpdateMessage + * @returns EncEventResponseMessage * @throws {Error} If the payload is not 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.EncEventUpdateMessage; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.Message.EncEventResponseMessage; /** - * Decodes an EncEventUpdateMessage message from the specified reader or buffer, length delimited. + * Decodes an EncEventResponseMessage message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns EncEventUpdateMessage + * @returns EncEventResponseMessage * @throws {Error} If the payload 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.EncEventUpdateMessage; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.Message.EncEventResponseMessage; /** - * Verifies an EncEventUpdateMessage message. + * Verifies an EncEventResponseMessage message. * @param message Plain 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 EncEventUpdateMessage message from a plain object. Also converts values to their respective internal types. + * Creates an EncEventResponseMessage message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns EncEventUpdateMessage + * @returns EncEventResponseMessage */ - public static fromObject(object: { [k: string]: any }): proto.Message.EncEventUpdateMessage; + public static fromObject(object: { [k: string]: any }): proto.Message.EncEventResponseMessage; /** - * Creates a plain object from an EncEventUpdateMessage message. Also converts values to other types if specified. - * @param message EncEventUpdateMessage + * Creates a plain object from an EncEventResponseMessage message. Also converts values to other types if specified. + * @param message EncEventResponseMessage * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: proto.Message.EncEventUpdateMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: proto.Message.EncEventResponseMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this EncEventUpdateMessage to JSON. + * Converts this EncEventResponseMessage to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EncEventResponseMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an EncReactionMessage. */ @@ -13243,10 +20955,10 @@ export namespace proto { public targetMessageKey?: (proto.IMessageKey|null); /** EncReactionMessage encPayload. */ - public encPayload: Uint8Array; + public encPayload?: (Uint8Array|null); /** EncReactionMessage encIv. */ - public encIv: Uint8Array; + public encIv?: (Uint8Array|null); /** * Creates a new EncReactionMessage instance using the specified properties. @@ -13317,102 +21029,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; - } - - /** Properties of an EventEditMessage. */ - interface IEventEditMessage { - - /** EventEditMessage eventEditMessage */ - eventEditMessage?: (proto.Message.IEventMessage|null); - - /** EventEditMessage editTimestampMs */ - editTimestampMs?: (number|Long|null); - } - - /** Represents an EventEditMessage. */ - class EventEditMessage implements IEventEditMessage { /** - * Constructs a new EventEditMessage. - * @param [properties] Properties to set + * Gets the default type url for EncReactionMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url */ - constructor(properties?: proto.Message.IEventEditMessage); - - /** EventEditMessage eventEditMessage. */ - public eventEditMessage?: (proto.Message.IEventMessage|null); - - /** EventEditMessage editTimestampMs. */ - public editTimestampMs: (number|Long); - - /** - * Creates a new EventEditMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns EventEditMessage instance - */ - public static create(properties?: proto.Message.IEventEditMessage): proto.Message.EventEditMessage; - - /** - * Encodes the specified EventEditMessage message. Does not implicitly {@link proto.Message.EventEditMessage.verify|verify} messages. - * @param message EventEditMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.Message.IEventEditMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EventEditMessage message, length delimited. Does not implicitly {@link proto.Message.EventEditMessage.verify|verify} messages. - * @param message EventEditMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.Message.IEventEditMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EventEditMessage message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EventEditMessage - * @throws {Error} If the payload is not 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.EventEditMessage; - - /** - * Decodes an EventEditMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EventEditMessage - * @throws {Error} If the payload 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.EventEditMessage; - - /** - * Verifies an EventEditMessage message. - * @param message Plain 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 EventEditMessage message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EventEditMessage - */ - public static fromObject(object: { [k: string]: any }): proto.Message.EventEditMessage; - - /** - * Creates a plain object from an EventEditMessage message. Also converts values to other types if specified. - * @param message EventEditMessage - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.Message.EventEditMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EventEditMessage to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an EventMessage. */ @@ -13438,6 +21061,12 @@ export namespace proto { /** EventMessage startTime */ startTime?: (number|Long|null); + + /** EventMessage endTime */ + endTime?: (number|Long|null); + + /** EventMessage extraGuestsAllowed */ + extraGuestsAllowed?: (boolean|null); } /** Represents an EventMessage. */ @@ -13453,22 +21082,28 @@ export namespace proto { public contextInfo?: (proto.IContextInfo|null); /** EventMessage isCanceled. */ - public isCanceled: boolean; + public isCanceled?: (boolean|null); /** EventMessage name. */ - public name: string; + public name?: (string|null); /** EventMessage description. */ - public description: string; + public description?: (string|null); /** EventMessage location. */ public location?: (proto.Message.ILocationMessage|null); /** EventMessage joinLink. */ - public joinLink: string; + public joinLink?: (string|null); /** EventMessage startTime. */ - public startTime: (number|Long); + public startTime?: (number|Long|null); + + /** EventMessage endTime. */ + public endTime?: (number|Long|null); + + /** EventMessage extraGuestsAllowed. */ + public extraGuestsAllowed?: (boolean|null); /** * Creates a new EventMessage instance using the specified properties. @@ -13539,6 +21174,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EventMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an EventResponseMessage. */ @@ -13549,6 +21191,9 @@ export namespace proto { /** EventResponseMessage timestampMs */ timestampMs?: (number|Long|null); + + /** EventResponseMessage extraGuestCount */ + extraGuestCount?: (number|null); } /** Represents an EventResponseMessage. */ @@ -13561,10 +21206,13 @@ export namespace proto { constructor(properties?: proto.Message.IEventResponseMessage); /** EventResponseMessage response. */ - public response: proto.Message.EventResponseMessage.EventResponseType; + public response?: (proto.Message.EventResponseMessage.EventResponseType|null); /** EventResponseMessage timestampMs. */ - public timestampMs: (number|Long); + public timestampMs?: (number|Long|null); + + /** EventResponseMessage extraGuestCount. */ + public extraGuestCount?: (number|null); /** * Creates a new EventResponseMessage instance using the specified properties. @@ -13635,6 +21283,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EventResponseMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace EventResponseMessage { @@ -13643,106 +21298,11 @@ export namespace proto { enum EventResponseType { UNKNOWN = 0, GOING = 1, - NOT_GOING = 2 + NOT_GOING = 2, + MAYBE = 3 } } - /** Properties of an EventUpdateMessage. */ - interface IEventUpdateMessage { - - /** EventUpdateMessage response */ - response?: (proto.Message.IEventResponseMessage|null); - - /** EventUpdateMessage edit */ - edit?: (proto.Message.IEventEditMessage|null); - } - - /** Represents an EventUpdateMessage. */ - class EventUpdateMessage implements IEventUpdateMessage { - - /** - * Constructs a new EventUpdateMessage. - * @param [properties] Properties to set - */ - constructor(properties?: proto.Message.IEventUpdateMessage); - - /** EventUpdateMessage response. */ - public response?: (proto.Message.IEventResponseMessage|null); - - /** EventUpdateMessage edit. */ - public edit?: (proto.Message.IEventEditMessage|null); - - /** - * Creates a new EventUpdateMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns EventUpdateMessage instance - */ - public static create(properties?: proto.Message.IEventUpdateMessage): proto.Message.EventUpdateMessage; - - /** - * Encodes the specified EventUpdateMessage message. Does not implicitly {@link proto.Message.EventUpdateMessage.verify|verify} messages. - * @param message EventUpdateMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.Message.IEventUpdateMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EventUpdateMessage message, length delimited. Does not implicitly {@link proto.Message.EventUpdateMessage.verify|verify} messages. - * @param message EventUpdateMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.Message.IEventUpdateMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EventUpdateMessage message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EventUpdateMessage - * @throws {Error} If the payload is not 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.EventUpdateMessage; - - /** - * Decodes an EventUpdateMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EventUpdateMessage - * @throws {Error} If the payload 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.EventUpdateMessage; - - /** - * Verifies an EventUpdateMessage message. - * @param message Plain 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 EventUpdateMessage message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EventUpdateMessage - */ - public static fromObject(object: { [k: string]: any }): proto.Message.EventUpdateMessage; - - /** - * Creates a plain object from an EventUpdateMessage message. Also converts values to other types if specified. - * @param message EventUpdateMessage - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.Message.EventUpdateMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EventUpdateMessage to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - /** Properties of an ExtendedTextMessage. */ interface IExtendedTextMessage { @@ -13752,9 +21312,6 @@ export namespace proto { /** ExtendedTextMessage matchedText */ matchedText?: (string|null); - /** ExtendedTextMessage canonicalUrl */ - canonicalUrl?: (string|null); - /** ExtendedTextMessage description */ description?: (string|null); @@ -13817,6 +21374,15 @@ export namespace proto { /** ExtendedTextMessage viewOnce */ viewOnce?: (boolean|null); + + /** ExtendedTextMessage videoHeight */ + videoHeight?: (number|null); + + /** ExtendedTextMessage videoWidth */ + videoWidth?: (number|null); + + /** ExtendedTextMessage faviconMMSMetadata */ + faviconMMSMetadata?: (proto.Message.IMMSThumbnailMetadata|null); } /** Represents an ExtendedTextMessage. */ @@ -13829,76 +21395,82 @@ export namespace proto { constructor(properties?: proto.Message.IExtendedTextMessage); /** ExtendedTextMessage text. */ - public text: string; + public text?: (string|null); /** ExtendedTextMessage matchedText. */ - public matchedText: string; - - /** ExtendedTextMessage canonicalUrl. */ - public canonicalUrl: string; + public matchedText?: (string|null); /** ExtendedTextMessage description. */ - public description: string; + public description?: (string|null); /** ExtendedTextMessage title. */ - public title: string; + public title?: (string|null); /** ExtendedTextMessage textArgb. */ - public textArgb: number; + public textArgb?: (number|null); /** ExtendedTextMessage backgroundArgb. */ - public backgroundArgb: number; + public backgroundArgb?: (number|null); /** ExtendedTextMessage font. */ - public font: proto.Message.ExtendedTextMessage.FontType; + public font?: (proto.Message.ExtendedTextMessage.FontType|null); /** ExtendedTextMessage previewType. */ - public previewType: proto.Message.ExtendedTextMessage.PreviewType; + public previewType?: (proto.Message.ExtendedTextMessage.PreviewType|null); /** ExtendedTextMessage jpegThumbnail. */ - public jpegThumbnail: Uint8Array; + public jpegThumbnail?: (Uint8Array|null); /** ExtendedTextMessage contextInfo. */ public contextInfo?: (proto.IContextInfo|null); /** ExtendedTextMessage doNotPlayInline. */ - public doNotPlayInline: boolean; + public doNotPlayInline?: (boolean|null); /** ExtendedTextMessage thumbnailDirectPath. */ - public thumbnailDirectPath: string; + public thumbnailDirectPath?: (string|null); /** ExtendedTextMessage thumbnailSha256. */ - public thumbnailSha256: Uint8Array; + public thumbnailSha256?: (Uint8Array|null); /** ExtendedTextMessage thumbnailEncSha256. */ - public thumbnailEncSha256: Uint8Array; + public thumbnailEncSha256?: (Uint8Array|null); /** ExtendedTextMessage mediaKey. */ - public mediaKey: Uint8Array; + public mediaKey?: (Uint8Array|null); /** ExtendedTextMessage mediaKeyTimestamp. */ - public mediaKeyTimestamp: (number|Long); + public mediaKeyTimestamp?: (number|Long|null); /** ExtendedTextMessage thumbnailHeight. */ - public thumbnailHeight: number; + public thumbnailHeight?: (number|null); /** ExtendedTextMessage thumbnailWidth. */ - public thumbnailWidth: number; + public thumbnailWidth?: (number|null); /** ExtendedTextMessage inviteLinkGroupType. */ - public inviteLinkGroupType: proto.Message.ExtendedTextMessage.InviteLinkGroupType; + public inviteLinkGroupType?: (proto.Message.ExtendedTextMessage.InviteLinkGroupType|null); /** ExtendedTextMessage inviteLinkParentGroupSubjectV2. */ - public inviteLinkParentGroupSubjectV2: string; + public inviteLinkParentGroupSubjectV2?: (string|null); /** ExtendedTextMessage inviteLinkParentGroupThumbnailV2. */ - public inviteLinkParentGroupThumbnailV2: Uint8Array; + public inviteLinkParentGroupThumbnailV2?: (Uint8Array|null); /** ExtendedTextMessage inviteLinkGroupTypeV2. */ - public inviteLinkGroupTypeV2: proto.Message.ExtendedTextMessage.InviteLinkGroupType; + public inviteLinkGroupTypeV2?: (proto.Message.ExtendedTextMessage.InviteLinkGroupType|null); /** ExtendedTextMessage viewOnce. */ - public viewOnce: boolean; + public viewOnce?: (boolean|null); + + /** ExtendedTextMessage videoHeight. */ + public videoHeight?: (number|null); + + /** ExtendedTextMessage videoWidth. */ + public videoWidth?: (number|null); + + /** ExtendedTextMessage faviconMMSMetadata. */ + public faviconMMSMetadata?: (proto.Message.IMMSThumbnailMetadata|null); /** * Creates a new ExtendedTextMessage instance using the specified properties. @@ -13969,6 +21541,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExtendedTextMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace ExtendedTextMessage { @@ -13998,104 +21577,107 @@ export namespace proto { NONE = 0, VIDEO = 1, PLACEHOLDER = 4, - IMAGE = 5 + IMAGE = 5, + PAYMENT_LINKS = 6, + PROFILE = 7 } } - /** Properties of an ExtendedTextMessageWithParentKey. */ - interface IExtendedTextMessageWithParentKey { + /** Properties of a FullHistorySyncOnDemandRequestMetadata. */ + interface IFullHistorySyncOnDemandRequestMetadata { - /** ExtendedTextMessageWithParentKey key */ - key?: (proto.IMessageKey|null); - - /** ExtendedTextMessageWithParentKey extendedTextMessage */ - extendedTextMessage?: (proto.Message.IExtendedTextMessage|null); + /** FullHistorySyncOnDemandRequestMetadata requestId */ + requestId?: (string|null); } - /** Represents an ExtendedTextMessageWithParentKey. */ - class ExtendedTextMessageWithParentKey implements IExtendedTextMessageWithParentKey { + /** Represents a FullHistorySyncOnDemandRequestMetadata. */ + class FullHistorySyncOnDemandRequestMetadata implements IFullHistorySyncOnDemandRequestMetadata { /** - * Constructs a new ExtendedTextMessageWithParentKey. + * Constructs a new FullHistorySyncOnDemandRequestMetadata. * @param [properties] Properties to set */ - constructor(properties?: proto.Message.IExtendedTextMessageWithParentKey); + constructor(properties?: proto.Message.IFullHistorySyncOnDemandRequestMetadata); - /** ExtendedTextMessageWithParentKey key. */ - public key?: (proto.IMessageKey|null); - - /** ExtendedTextMessageWithParentKey extendedTextMessage. */ - public extendedTextMessage?: (proto.Message.IExtendedTextMessage|null); + /** FullHistorySyncOnDemandRequestMetadata requestId. */ + public requestId?: (string|null); /** - * Creates a new ExtendedTextMessageWithParentKey instance using the specified properties. + * Creates a new FullHistorySyncOnDemandRequestMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns ExtendedTextMessageWithParentKey instance + * @returns FullHistorySyncOnDemandRequestMetadata instance */ - public static create(properties?: proto.Message.IExtendedTextMessageWithParentKey): proto.Message.ExtendedTextMessageWithParentKey; + public static create(properties?: proto.Message.IFullHistorySyncOnDemandRequestMetadata): proto.Message.FullHistorySyncOnDemandRequestMetadata; /** - * Encodes the specified ExtendedTextMessageWithParentKey message. Does not implicitly {@link proto.Message.ExtendedTextMessageWithParentKey.verify|verify} messages. - * @param message ExtendedTextMessageWithParentKey message or plain object to encode + * Encodes the specified FullHistorySyncOnDemandRequestMetadata message. Does not implicitly {@link proto.Message.FullHistorySyncOnDemandRequestMetadata.verify|verify} messages. + * @param message FullHistorySyncOnDemandRequestMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: proto.Message.IExtendedTextMessageWithParentKey, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: proto.Message.IFullHistorySyncOnDemandRequestMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ExtendedTextMessageWithParentKey message, length delimited. Does not implicitly {@link proto.Message.ExtendedTextMessageWithParentKey.verify|verify} messages. - * @param message ExtendedTextMessageWithParentKey message or plain object to encode + * Encodes the specified FullHistorySyncOnDemandRequestMetadata message, length delimited. Does not implicitly {@link proto.Message.FullHistorySyncOnDemandRequestMetadata.verify|verify} messages. + * @param message FullHistorySyncOnDemandRequestMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: proto.Message.IExtendedTextMessageWithParentKey, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: proto.Message.IFullHistorySyncOnDemandRequestMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ExtendedTextMessageWithParentKey message from the specified reader or buffer. + * Decodes a FullHistorySyncOnDemandRequestMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ExtendedTextMessageWithParentKey + * @returns FullHistorySyncOnDemandRequestMetadata * @throws {Error} If the payload is not 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.ExtendedTextMessageWithParentKey; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.Message.FullHistorySyncOnDemandRequestMetadata; /** - * Decodes an ExtendedTextMessageWithParentKey message from the specified reader or buffer, length delimited. + * Decodes a FullHistorySyncOnDemandRequestMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ExtendedTextMessageWithParentKey + * @returns FullHistorySyncOnDemandRequestMetadata * @throws {Error} If the payload 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.ExtendedTextMessageWithParentKey; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.Message.FullHistorySyncOnDemandRequestMetadata; /** - * Verifies an ExtendedTextMessageWithParentKey message. + * Verifies a FullHistorySyncOnDemandRequestMetadata message. * @param message Plain 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 ExtendedTextMessageWithParentKey message from a plain object. Also converts values to their respective internal types. + * Creates a FullHistorySyncOnDemandRequestMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ExtendedTextMessageWithParentKey + * @returns FullHistorySyncOnDemandRequestMetadata */ - public static fromObject(object: { [k: string]: any }): proto.Message.ExtendedTextMessageWithParentKey; + public static fromObject(object: { [k: string]: any }): proto.Message.FullHistorySyncOnDemandRequestMetadata; /** - * Creates a plain object from an ExtendedTextMessageWithParentKey message. Also converts values to other types if specified. - * @param message ExtendedTextMessageWithParentKey + * Creates a plain object from a FullHistorySyncOnDemandRequestMetadata message. Also converts values to other types if specified. + * @param message FullHistorySyncOnDemandRequestMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: proto.Message.ExtendedTextMessageWithParentKey, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: proto.Message.FullHistorySyncOnDemandRequestMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ExtendedTextMessageWithParentKey to JSON. + * Converts this FullHistorySyncOnDemandRequestMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FullHistorySyncOnDemandRequestMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a FutureProofMessage. */ @@ -14186,6 +21768,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FutureProofMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GroupInviteMessage. */ @@ -14226,28 +21815,28 @@ export namespace proto { constructor(properties?: proto.Message.IGroupInviteMessage); /** GroupInviteMessage groupJid. */ - public groupJid: string; + public groupJid?: (string|null); /** GroupInviteMessage inviteCode. */ - public inviteCode: string; + public inviteCode?: (string|null); /** GroupInviteMessage inviteExpiration. */ - public inviteExpiration: (number|Long); + public inviteExpiration?: (number|Long|null); /** GroupInviteMessage groupName. */ - public groupName: string; + public groupName?: (string|null); /** GroupInviteMessage jpegThumbnail. */ - public jpegThumbnail: Uint8Array; + public jpegThumbnail?: (Uint8Array|null); /** GroupInviteMessage caption. */ - public caption: string; + public caption?: (string|null); /** GroupInviteMessage contextInfo. */ public contextInfo?: (proto.IContextInfo|null); /** GroupInviteMessage groupType. */ - public groupType: proto.Message.GroupInviteMessage.GroupType; + public groupType?: (proto.Message.GroupInviteMessage.GroupType|null); /** * Creates a new GroupInviteMessage instance using the specified properties. @@ -14318,6 +21907,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GroupInviteMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace GroupInviteMessage { @@ -14370,28 +21966,28 @@ export namespace proto { constructor(properties?: proto.Message.IHighlyStructuredMessage); /** HighlyStructuredMessage namespace. */ - public namespace: string; + public namespace?: (string|null); /** HighlyStructuredMessage elementName. */ - public elementName: string; + public elementName?: (string|null); /** HighlyStructuredMessage params. */ public params: string[]; /** HighlyStructuredMessage fallbackLg. */ - public fallbackLg: string; + public fallbackLg?: (string|null); /** HighlyStructuredMessage fallbackLc. */ - public fallbackLc: string; + public fallbackLc?: (string|null); /** HighlyStructuredMessage localizableParams. */ public localizableParams: proto.Message.HighlyStructuredMessage.IHSMLocalizableParameter[]; /** HighlyStructuredMessage deterministicLg. */ - public deterministicLg: string; + public deterministicLg?: (string|null); /** HighlyStructuredMessage deterministicLc. */ - public deterministicLc: string; + public deterministicLc?: (string|null); /** HighlyStructuredMessage hydratedHsm. */ public hydratedHsm?: (proto.Message.ITemplateMessage|null); @@ -14465,6 +22061,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HighlyStructuredMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace HighlyStructuredMessage { @@ -14492,7 +22095,7 @@ export namespace proto { constructor(properties?: proto.Message.HighlyStructuredMessage.IHSMLocalizableParameter); /** HSMLocalizableParameter default. */ - public default: string; + public default?: (string|null); /** HSMLocalizableParameter currency. */ public currency?: (proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.IHSMCurrency|null); @@ -14572,6 +22175,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HSMLocalizableParameter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace HSMLocalizableParameter { @@ -14596,10 +22206,10 @@ export namespace proto { constructor(properties?: proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.IHSMCurrency); /** HSMCurrency currencyCode. */ - public currencyCode: string; + public currencyCode?: (string|null); /** HSMCurrency amount1000. */ - public amount1000: (number|Long); + public amount1000?: (number|Long|null); /** * Creates a new HSMCurrency instance using the specified properties. @@ -14670,6 +22280,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HSMCurrency + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a HSMDateTime. */ @@ -14769,6 +22386,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HSMDateTime + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace HSMDateTime { @@ -14808,25 +22432,25 @@ export namespace proto { constructor(properties?: proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.IHSMDateTimeComponent); /** HSMDateTimeComponent dayOfWeek. */ - public dayOfWeek: proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent.DayOfWeekType; + public dayOfWeek?: (proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent.DayOfWeekType|null); /** HSMDateTimeComponent year. */ - public year: number; + public year?: (number|null); /** HSMDateTimeComponent month. */ - public month: number; + public month?: (number|null); /** HSMDateTimeComponent dayOfMonth. */ - public dayOfMonth: number; + public dayOfMonth?: (number|null); /** HSMDateTimeComponent hour. */ - public hour: number; + public hour?: (number|null); /** HSMDateTimeComponent minute. */ - public minute: number; + public minute?: (number|null); /** HSMDateTimeComponent calendar. */ - public calendar: proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent.CalendarType; + public calendar?: (proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent.CalendarType|null); /** * Creates a new HSMDateTimeComponent instance using the specified properties. @@ -14897,6 +22521,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HSMDateTimeComponent + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace HSMDateTimeComponent { @@ -14936,7 +22567,7 @@ export namespace proto { constructor(properties?: proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.IHSMDateTimeUnixEpoch); /** HSMDateTimeUnixEpoch timestamp. */ - public timestamp: (number|Long); + public timestamp?: (number|Long|null); /** * Creates a new HSMDateTimeUnixEpoch instance using the specified properties. @@ -15007,6 +22638,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HSMDateTimeUnixEpoch + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } } @@ -15050,6 +22688,12 @@ export namespace proto { /** HistorySyncNotification peerDataRequestSessionId */ peerDataRequestSessionId?: (string|null); + + /** HistorySyncNotification fullHistorySyncOnDemandRequestMetadata */ + fullHistorySyncOnDemandRequestMetadata?: (proto.Message.IFullHistorySyncOnDemandRequestMetadata|null); + + /** HistorySyncNotification encHandle */ + encHandle?: (string|null); } /** Represents a HistorySyncNotification. */ @@ -15062,40 +22706,46 @@ export namespace proto { constructor(properties?: proto.Message.IHistorySyncNotification); /** HistorySyncNotification fileSha256. */ - public fileSha256: Uint8Array; + public fileSha256?: (Uint8Array|null); /** HistorySyncNotification fileLength. */ - public fileLength: (number|Long); + public fileLength?: (number|Long|null); /** HistorySyncNotification mediaKey. */ - public mediaKey: Uint8Array; + public mediaKey?: (Uint8Array|null); /** HistorySyncNotification fileEncSha256. */ - public fileEncSha256: Uint8Array; + public fileEncSha256?: (Uint8Array|null); /** HistorySyncNotification directPath. */ - public directPath: string; + public directPath?: (string|null); /** HistorySyncNotification syncType. */ - public syncType: proto.Message.HistorySyncNotification.HistorySyncType; + public syncType?: (proto.Message.HistorySyncNotification.HistorySyncType|null); /** HistorySyncNotification chunkOrder. */ - public chunkOrder: number; + public chunkOrder?: (number|null); /** HistorySyncNotification originalMessageId. */ - public originalMessageId: string; + public originalMessageId?: (string|null); /** HistorySyncNotification progress. */ - public progress: number; + public progress?: (number|null); /** HistorySyncNotification oldestMsgInChunkTimestampSec. */ - public oldestMsgInChunkTimestampSec: (number|Long); + public oldestMsgInChunkTimestampSec?: (number|Long|null); /** HistorySyncNotification initialHistBootstrapInlinePayload. */ - public initialHistBootstrapInlinePayload: Uint8Array; + public initialHistBootstrapInlinePayload?: (Uint8Array|null); /** HistorySyncNotification peerDataRequestSessionId. */ - public peerDataRequestSessionId: string; + public peerDataRequestSessionId?: (string|null); + + /** HistorySyncNotification fullHistorySyncOnDemandRequestMetadata. */ + public fullHistorySyncOnDemandRequestMetadata?: (proto.Message.IFullHistorySyncOnDemandRequestMetadata|null); + + /** HistorySyncNotification encHandle. */ + public encHandle?: (string|null); /** * Creates a new HistorySyncNotification instance using the specified properties. @@ -15166,6 +22816,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HistorySyncNotification + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace HistorySyncNotification { @@ -15178,7 +22835,8 @@ export namespace proto { RECENT = 3, PUSH_NAME = 4, NON_BLOCKING_DATA = 5, - ON_DEMAND = 6 + ON_DEMAND = 6, + NO_HISTORY = 7 } } @@ -15265,6 +22923,12 @@ export namespace proto { /** ImageMessage annotations */ annotations?: (proto.IInteractiveAnnotation[]|null); + + /** ImageMessage imageSourceType */ + imageSourceType?: (proto.Message.ImageMessage.ImageSourceType|null); + + /** ImageMessage accessibilityLabel */ + accessibilityLabel?: (string|null); } /** Represents an ImageMessage. */ @@ -15277,86 +22941,92 @@ export namespace proto { constructor(properties?: proto.Message.IImageMessage); /** ImageMessage url. */ - public url: string; + public url?: (string|null); /** ImageMessage mimetype. */ - public mimetype: string; + public mimetype?: (string|null); /** ImageMessage caption. */ - public caption: string; + public caption?: (string|null); /** ImageMessage fileSha256. */ - public fileSha256: Uint8Array; + public fileSha256?: (Uint8Array|null); /** ImageMessage fileLength. */ - public fileLength: (number|Long); + public fileLength?: (number|Long|null); /** ImageMessage height. */ - public height: number; + public height?: (number|null); /** ImageMessage width. */ - public width: number; + public width?: (number|null); /** ImageMessage mediaKey. */ - public mediaKey: Uint8Array; + public mediaKey?: (Uint8Array|null); /** ImageMessage fileEncSha256. */ - public fileEncSha256: Uint8Array; + public fileEncSha256?: (Uint8Array|null); /** ImageMessage interactiveAnnotations. */ public interactiveAnnotations: proto.IInteractiveAnnotation[]; /** ImageMessage directPath. */ - public directPath: string; + public directPath?: (string|null); /** ImageMessage mediaKeyTimestamp. */ - public mediaKeyTimestamp: (number|Long); + public mediaKeyTimestamp?: (number|Long|null); /** ImageMessage jpegThumbnail. */ - public jpegThumbnail: Uint8Array; + public jpegThumbnail?: (Uint8Array|null); /** ImageMessage contextInfo. */ public contextInfo?: (proto.IContextInfo|null); /** ImageMessage firstScanSidecar. */ - public firstScanSidecar: Uint8Array; + public firstScanSidecar?: (Uint8Array|null); /** ImageMessage firstScanLength. */ - public firstScanLength: number; + public firstScanLength?: (number|null); /** ImageMessage experimentGroupId. */ - public experimentGroupId: number; + public experimentGroupId?: (number|null); /** ImageMessage scansSidecar. */ - public scansSidecar: Uint8Array; + public scansSidecar?: (Uint8Array|null); /** ImageMessage scanLengths. */ public scanLengths: number[]; /** ImageMessage midQualityFileSha256. */ - public midQualityFileSha256: Uint8Array; + public midQualityFileSha256?: (Uint8Array|null); /** ImageMessage midQualityFileEncSha256. */ - public midQualityFileEncSha256: Uint8Array; + public midQualityFileEncSha256?: (Uint8Array|null); /** ImageMessage viewOnce. */ - public viewOnce: boolean; + public viewOnce?: (boolean|null); /** ImageMessage thumbnailDirectPath. */ - public thumbnailDirectPath: string; + public thumbnailDirectPath?: (string|null); /** ImageMessage thumbnailSha256. */ - public thumbnailSha256: Uint8Array; + public thumbnailSha256?: (Uint8Array|null); /** ImageMessage thumbnailEncSha256. */ - public thumbnailEncSha256: Uint8Array; + public thumbnailEncSha256?: (Uint8Array|null); /** ImageMessage staticUrl. */ - public staticUrl: string; + public staticUrl?: (string|null); /** ImageMessage annotations. */ public annotations: proto.IInteractiveAnnotation[]; + /** ImageMessage imageSourceType. */ + public imageSourceType?: (proto.Message.ImageMessage.ImageSourceType|null); + + /** ImageMessage accessibilityLabel. */ + public accessibilityLabel?: (string|null); + /** * Creates a new ImageMessage instance using the specified properties. * @param [properties] Properties to set @@ -15426,6 +23096,24 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ImageMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ImageMessage { + + /** ImageSourceType enum. */ + enum ImageSourceType { + USER_IMAGE = 0, + AI_GENERATED = 1, + AI_MODIFIED = 2, + RASTERIZED_TEXT_STATUS = 3 + } } /** Properties of an InitialSecurityNotificationSettingSync. */ @@ -15445,7 +23133,7 @@ export namespace proto { constructor(properties?: proto.Message.IInitialSecurityNotificationSettingSync); /** InitialSecurityNotificationSettingSync securityNotificationEnabled. */ - public securityNotificationEnabled: boolean; + public securityNotificationEnabled?: (boolean|null); /** * Creates a new InitialSecurityNotificationSettingSync instance using the specified properties. @@ -15516,6 +23204,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InitialSecurityNotificationSettingSync + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an InteractiveMessage. */ @@ -15533,6 +23228,9 @@ export namespace proto { /** InteractiveMessage contextInfo */ contextInfo?: (proto.IContextInfo|null); + /** InteractiveMessage urlTrackingMap */ + urlTrackingMap?: (proto.IUrlTrackingMap|null); + /** InteractiveMessage shopStorefrontMessage */ shopStorefrontMessage?: (proto.Message.InteractiveMessage.IShopMessage|null); @@ -15567,6 +23265,9 @@ export namespace proto { /** InteractiveMessage contextInfo. */ public contextInfo?: (proto.IContextInfo|null); + /** InteractiveMessage urlTrackingMap. */ + public urlTrackingMap?: (proto.IUrlTrackingMap|null); + /** InteractiveMessage shopStorefrontMessage. */ public shopStorefrontMessage?: (proto.Message.InteractiveMessage.IShopMessage|null); @@ -15651,6 +23352,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InteractiveMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace InteractiveMessage { @@ -15672,7 +23380,7 @@ export namespace proto { constructor(properties?: proto.Message.InteractiveMessage.IBody); /** Body text. */ - public text: string; + public text?: (string|null); /** * Creates a new Body instance using the specified properties. @@ -15743,6 +23451,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Body + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CarouselMessage. */ @@ -15768,7 +23483,7 @@ export namespace proto { public cards: proto.Message.IInteractiveMessage[]; /** CarouselMessage messageVersion. */ - public messageVersion: number; + public messageVersion?: (number|null); /** * Creates a new CarouselMessage instance using the specified properties. @@ -15839,6 +23554,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CarouselMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CollectionMessage. */ @@ -15864,13 +23586,13 @@ export namespace proto { constructor(properties?: proto.Message.InteractiveMessage.ICollectionMessage); /** CollectionMessage bizJid. */ - public bizJid: string; + public bizJid?: (string|null); /** CollectionMessage id. */ - public id: string; + public id?: (string|null); /** CollectionMessage messageVersion. */ - public messageVersion: number; + public messageVersion?: (number|null); /** * Creates a new CollectionMessage instance using the specified properties. @@ -15941,6 +23663,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CollectionMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Footer. */ @@ -15960,7 +23689,7 @@ export namespace proto { constructor(properties?: proto.Message.InteractiveMessage.IFooter); /** Footer text. */ - public text: string; + public text?: (string|null); /** * Creates a new Footer instance using the specified properties. @@ -16031,6 +23760,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Footer + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Header. */ @@ -16059,6 +23795,9 @@ export namespace proto { /** Header locationMessage */ locationMessage?: (proto.Message.ILocationMessage|null); + + /** Header productMessage */ + productMessage?: (proto.Message.IProductMessage|null); } /** Represents a Header. */ @@ -16071,13 +23810,13 @@ export namespace proto { constructor(properties?: proto.Message.InteractiveMessage.IHeader); /** Header title. */ - public title: string; + public title?: (string|null); /** Header subtitle. */ - public subtitle: string; + public subtitle?: (string|null); /** Header hasMediaAttachment. */ - public hasMediaAttachment: boolean; + public hasMediaAttachment?: (boolean|null); /** Header documentMessage. */ public documentMessage?: (proto.Message.IDocumentMessage|null); @@ -16094,8 +23833,11 @@ export namespace proto { /** Header locationMessage. */ public locationMessage?: (proto.Message.ILocationMessage|null); + /** Header productMessage. */ + public productMessage?: (proto.Message.IProductMessage|null); + /** Header media. */ - public media?: ("documentMessage"|"imageMessage"|"jpegThumbnail"|"videoMessage"|"locationMessage"); + public media?: ("documentMessage"|"imageMessage"|"jpegThumbnail"|"videoMessage"|"locationMessage"|"productMessage"); /** * Creates a new Header instance using the specified properties. @@ -16166,6 +23908,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Header + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a NativeFlowMessage. */ @@ -16194,10 +23943,10 @@ export namespace proto { public buttons: proto.Message.InteractiveMessage.NativeFlowMessage.INativeFlowButton[]; /** NativeFlowMessage messageParamsJson. */ - public messageParamsJson: string; + public messageParamsJson?: (string|null); /** NativeFlowMessage messageVersion. */ - public messageVersion: number; + public messageVersion?: (number|null); /** * Creates a new NativeFlowMessage instance using the specified properties. @@ -16268,6 +24017,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NativeFlowMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace NativeFlowMessage { @@ -16292,10 +24048,10 @@ export namespace proto { constructor(properties?: proto.Message.InteractiveMessage.NativeFlowMessage.INativeFlowButton); /** NativeFlowButton name. */ - public name: string; + public name?: (string|null); /** NativeFlowButton buttonParamsJson. */ - public buttonParamsJson: string; + public buttonParamsJson?: (string|null); /** * Creates a new NativeFlowButton instance using the specified properties. @@ -16366,6 +24122,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NativeFlowButton + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -16392,13 +24155,13 @@ export namespace proto { constructor(properties?: proto.Message.InteractiveMessage.IShopMessage); /** ShopMessage id. */ - public id: string; + public id?: (string|null); /** ShopMessage surface. */ - public surface: proto.Message.InteractiveMessage.ShopMessage.Surface; + public surface?: (proto.Message.InteractiveMessage.ShopMessage.Surface|null); /** ShopMessage messageVersion. */ - public messageVersion: number; + public messageVersion?: (number|null); /** * Creates a new ShopMessage instance using the specified properties. @@ -16469,6 +24232,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ShopMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace ShopMessage { @@ -16586,6 +24356,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InteractiveResponseMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace InteractiveResponseMessage { @@ -16610,10 +24387,10 @@ export namespace proto { constructor(properties?: proto.Message.InteractiveResponseMessage.IBody); /** Body text. */ - public text: string; + public text?: (string|null); /** Body format. */ - public format: proto.Message.InteractiveResponseMessage.Body.Format; + public format?: (proto.Message.InteractiveResponseMessage.Body.Format|null); /** * Creates a new Body instance using the specified properties. @@ -16684,6 +24461,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Body + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace Body { @@ -16718,13 +24502,13 @@ export namespace proto { constructor(properties?: proto.Message.InteractiveResponseMessage.INativeFlowResponseMessage); /** NativeFlowResponseMessage name. */ - public name: string; + public name?: (string|null); /** NativeFlowResponseMessage paramsJson. */ - public paramsJson: string; + public paramsJson?: (string|null); /** NativeFlowResponseMessage version. */ - public version: number; + public version?: (number|null); /** * Creates a new NativeFlowResponseMessage instance using the specified properties. @@ -16795,6 +24579,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NativeFlowResponseMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -16842,34 +24633,34 @@ export namespace proto { constructor(properties?: proto.Message.IInvoiceMessage); /** InvoiceMessage note. */ - public note: string; + public note?: (string|null); /** InvoiceMessage token. */ - public token: string; + public token?: (string|null); /** InvoiceMessage attachmentType. */ - public attachmentType: proto.Message.InvoiceMessage.AttachmentType; + public attachmentType?: (proto.Message.InvoiceMessage.AttachmentType|null); /** InvoiceMessage attachmentMimetype. */ - public attachmentMimetype: string; + public attachmentMimetype?: (string|null); /** InvoiceMessage attachmentMediaKey. */ - public attachmentMediaKey: Uint8Array; + public attachmentMediaKey?: (Uint8Array|null); /** InvoiceMessage attachmentMediaKeyTimestamp. */ - public attachmentMediaKeyTimestamp: (number|Long); + public attachmentMediaKeyTimestamp?: (number|Long|null); /** InvoiceMessage attachmentFileSha256. */ - public attachmentFileSha256: Uint8Array; + public attachmentFileSha256?: (Uint8Array|null); /** InvoiceMessage attachmentFileEncSha256. */ - public attachmentFileEncSha256: Uint8Array; + public attachmentFileEncSha256?: (Uint8Array|null); /** InvoiceMessage attachmentDirectPath. */ - public attachmentDirectPath: string; + public attachmentDirectPath?: (string|null); /** InvoiceMessage attachmentJpegThumbnail. */ - public attachmentJpegThumbnail: Uint8Array; + public attachmentJpegThumbnail?: (Uint8Array|null); /** * Creates a new InvoiceMessage instance using the specified properties. @@ -16940,6 +24731,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InvoiceMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace InvoiceMessage { @@ -16977,10 +24775,10 @@ export namespace proto { public key?: (proto.IMessageKey|null); /** KeepInChatMessage keepType. */ - public keepType: proto.KeepType; + public keepType?: (proto.KeepType|null); /** KeepInChatMessage timestampMs. */ - public timestampMs: (number|Long); + public timestampMs?: (number|Long|null); /** * Creates a new KeepInChatMessage instance using the specified properties. @@ -17051,6 +24849,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for KeepInChatMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListMessage. */ @@ -17091,16 +24896,16 @@ export namespace proto { constructor(properties?: proto.Message.IListMessage); /** ListMessage title. */ - public title: string; + public title?: (string|null); /** ListMessage description. */ - public description: string; + public description?: (string|null); /** ListMessage buttonText. */ - public buttonText: string; + public buttonText?: (string|null); /** ListMessage listType. */ - public listType: proto.Message.ListMessage.ListType; + public listType?: (proto.Message.ListMessage.ListType|null); /** ListMessage sections. */ public sections: proto.Message.ListMessage.ISection[]; @@ -17109,7 +24914,7 @@ export namespace proto { public productListInfo?: (proto.Message.ListMessage.IProductListInfo|null); /** ListMessage footerText. */ - public footerText: string; + public footerText?: (string|null); /** ListMessage contextInfo. */ public contextInfo?: (proto.IContextInfo|null); @@ -17183,6 +24988,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace ListMessage { @@ -17211,7 +25023,7 @@ export namespace proto { constructor(properties?: proto.Message.ListMessage.IProduct); /** Product productId. */ - public productId: string; + public productId?: (string|null); /** * Creates a new Product instance using the specified properties. @@ -17282,6 +25094,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Product + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ProductListHeaderImage. */ @@ -17304,10 +25123,10 @@ export namespace proto { constructor(properties?: proto.Message.ListMessage.IProductListHeaderImage); /** ProductListHeaderImage productId. */ - public productId: string; + public productId?: (string|null); /** ProductListHeaderImage jpegThumbnail. */ - public jpegThumbnail: Uint8Array; + public jpegThumbnail?: (Uint8Array|null); /** * Creates a new ProductListHeaderImage instance using the specified properties. @@ -17378,6 +25197,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ProductListHeaderImage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ProductListInfo. */ @@ -17409,7 +25235,7 @@ export namespace proto { public headerImage?: (proto.Message.ListMessage.IProductListHeaderImage|null); /** ProductListInfo businessOwnerJid. */ - public businessOwnerJid: string; + public businessOwnerJid?: (string|null); /** * Creates a new ProductListInfo instance using the specified properties. @@ -17480,6 +25306,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ProductListInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ProductSection. */ @@ -17502,7 +25335,7 @@ export namespace proto { constructor(properties?: proto.Message.ListMessage.IProductSection); /** ProductSection title. */ - public title: string; + public title?: (string|null); /** ProductSection products. */ public products: proto.Message.ListMessage.IProduct[]; @@ -17576,6 +25409,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ProductSection + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Row. */ @@ -17601,13 +25441,13 @@ export namespace proto { constructor(properties?: proto.Message.ListMessage.IRow); /** Row title. */ - public title: string; + public title?: (string|null); /** Row description. */ - public description: string; + public description?: (string|null); /** Row rowId. */ - public rowId: string; + public rowId?: (string|null); /** * Creates a new Row instance using the specified properties. @@ -17678,6 +25518,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Row + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Section. */ @@ -17700,7 +25547,7 @@ export namespace proto { constructor(properties?: proto.Message.ListMessage.ISection); /** Section title. */ - public title: string; + public title?: (string|null); /** Section rows. */ public rows: proto.Message.ListMessage.IRow[]; @@ -17774,6 +25621,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Section + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -17806,10 +25660,10 @@ export namespace proto { constructor(properties?: proto.Message.IListResponseMessage); /** ListResponseMessage title. */ - public title: string; + public title?: (string|null); /** ListResponseMessage listType. */ - public listType: proto.Message.ListResponseMessage.ListType; + public listType?: (proto.Message.ListResponseMessage.ListType|null); /** ListResponseMessage singleSelectReply. */ public singleSelectReply?: (proto.Message.ListResponseMessage.ISingleSelectReply|null); @@ -17818,7 +25672,7 @@ export namespace proto { public contextInfo?: (proto.IContextInfo|null); /** ListResponseMessage description. */ - public description: string; + public description?: (string|null); /** * Creates a new ListResponseMessage instance using the specified properties. @@ -17889,6 +25743,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListResponseMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace ListResponseMessage { @@ -17916,7 +25777,7 @@ export namespace proto { constructor(properties?: proto.Message.ListResponseMessage.ISingleSelectReply); /** SingleSelectReply selectedRowId. */ - public selectedRowId: string; + public selectedRowId?: (string|null); /** * Creates a new SingleSelectReply instance using the specified properties. @@ -17987,6 +25848,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SingleSelectReply + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -18034,31 +25902,31 @@ export namespace proto { constructor(properties?: proto.Message.ILiveLocationMessage); /** LiveLocationMessage degreesLatitude. */ - public degreesLatitude: number; + public degreesLatitude?: (number|null); /** LiveLocationMessage degreesLongitude. */ - public degreesLongitude: number; + public degreesLongitude?: (number|null); /** LiveLocationMessage accuracyInMeters. */ - public accuracyInMeters: number; + public accuracyInMeters?: (number|null); /** LiveLocationMessage speedInMps. */ - public speedInMps: number; + public speedInMps?: (number|null); /** LiveLocationMessage degreesClockwiseFromMagneticNorth. */ - public degreesClockwiseFromMagneticNorth: number; + public degreesClockwiseFromMagneticNorth?: (number|null); /** LiveLocationMessage caption. */ - public caption: string; + public caption?: (string|null); /** LiveLocationMessage sequenceNumber. */ - public sequenceNumber: (number|Long); + public sequenceNumber?: (number|Long|null); /** LiveLocationMessage timeOffset. */ - public timeOffset: number; + public timeOffset?: (number|null); /** LiveLocationMessage jpegThumbnail. */ - public jpegThumbnail: Uint8Array; + public jpegThumbnail?: (Uint8Array|null); /** LiveLocationMessage contextInfo. */ public contextInfo?: (proto.IContextInfo|null); @@ -18132,6 +26000,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LiveLocationMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a LocationMessage. */ @@ -18184,37 +26059,37 @@ export namespace proto { constructor(properties?: proto.Message.ILocationMessage); /** LocationMessage degreesLatitude. */ - public degreesLatitude: number; + public degreesLatitude?: (number|null); /** LocationMessage degreesLongitude. */ - public degreesLongitude: number; + public degreesLongitude?: (number|null); /** LocationMessage name. */ - public name: string; + public name?: (string|null); /** LocationMessage address. */ - public address: string; + public address?: (string|null); /** LocationMessage url. */ - public url: string; + public url?: (string|null); /** LocationMessage isLive. */ - public isLive: boolean; + public isLive?: (boolean|null); /** LocationMessage accuracyInMeters. */ - public accuracyInMeters: number; + public accuracyInMeters?: (number|null); /** LocationMessage speedInMps. */ - public speedInMps: number; + public speedInMps?: (number|null); /** LocationMessage degreesClockwiseFromMagneticNorth. */ - public degreesClockwiseFromMagneticNorth: number; + public degreesClockwiseFromMagneticNorth?: (number|null); /** LocationMessage comment. */ - public comment: string; + public comment?: (string|null); /** LocationMessage jpegThumbnail. */ - public jpegThumbnail: Uint8Array; + public jpegThumbnail?: (Uint8Array|null); /** LocationMessage contextInfo. */ public contextInfo?: (proto.IContextInfo|null); @@ -18288,6 +26163,146 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LocationMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MMSThumbnailMetadata. */ + interface IMMSThumbnailMetadata { + + /** MMSThumbnailMetadata thumbnailDirectPath */ + thumbnailDirectPath?: (string|null); + + /** MMSThumbnailMetadata thumbnailSha256 */ + thumbnailSha256?: (Uint8Array|null); + + /** MMSThumbnailMetadata thumbnailEncSha256 */ + thumbnailEncSha256?: (Uint8Array|null); + + /** MMSThumbnailMetadata mediaKey */ + mediaKey?: (Uint8Array|null); + + /** MMSThumbnailMetadata mediaKeyTimestamp */ + mediaKeyTimestamp?: (number|Long|null); + + /** MMSThumbnailMetadata thumbnailHeight */ + thumbnailHeight?: (number|null); + + /** MMSThumbnailMetadata thumbnailWidth */ + thumbnailWidth?: (number|null); + } + + /** Represents a MMSThumbnailMetadata. */ + class MMSThumbnailMetadata implements IMMSThumbnailMetadata { + + /** + * Constructs a new MMSThumbnailMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.IMMSThumbnailMetadata); + + /** MMSThumbnailMetadata thumbnailDirectPath. */ + public thumbnailDirectPath?: (string|null); + + /** MMSThumbnailMetadata thumbnailSha256. */ + public thumbnailSha256?: (Uint8Array|null); + + /** MMSThumbnailMetadata thumbnailEncSha256. */ + public thumbnailEncSha256?: (Uint8Array|null); + + /** MMSThumbnailMetadata mediaKey. */ + public mediaKey?: (Uint8Array|null); + + /** MMSThumbnailMetadata mediaKeyTimestamp. */ + public mediaKeyTimestamp?: (number|Long|null); + + /** MMSThumbnailMetadata thumbnailHeight. */ + public thumbnailHeight?: (number|null); + + /** MMSThumbnailMetadata thumbnailWidth. */ + public thumbnailWidth?: (number|null); + + /** + * Creates a new MMSThumbnailMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns MMSThumbnailMetadata instance + */ + public static create(properties?: proto.Message.IMMSThumbnailMetadata): proto.Message.MMSThumbnailMetadata; + + /** + * Encodes the specified MMSThumbnailMetadata message. Does not implicitly {@link proto.Message.MMSThumbnailMetadata.verify|verify} messages. + * @param message MMSThumbnailMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.IMMSThumbnailMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MMSThumbnailMetadata message, length delimited. Does not implicitly {@link proto.Message.MMSThumbnailMetadata.verify|verify} messages. + * @param message MMSThumbnailMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.IMMSThumbnailMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MMSThumbnailMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MMSThumbnailMetadata + * @throws {Error} If the payload is not 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.MMSThumbnailMetadata; + + /** + * Decodes a MMSThumbnailMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MMSThumbnailMetadata + * @throws {Error} If the payload 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.MMSThumbnailMetadata; + + /** + * Verifies a MMSThumbnailMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MMSThumbnailMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MMSThumbnailMetadata + */ + public static fromObject(object: { [k: string]: any }): proto.Message.MMSThumbnailMetadata; + + /** + * Creates a plain object from a MMSThumbnailMetadata message. Also converts values to other types if specified. + * @param message MMSThumbnailMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.MMSThumbnailMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MMSThumbnailMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MMSThumbnailMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a MessageHistoryBundle. */ @@ -18328,22 +26343,22 @@ export namespace proto { constructor(properties?: proto.Message.IMessageHistoryBundle); /** MessageHistoryBundle mimetype. */ - public mimetype: string; + public mimetype?: (string|null); /** MessageHistoryBundle fileSha256. */ - public fileSha256: Uint8Array; + public fileSha256?: (Uint8Array|null); /** MessageHistoryBundle mediaKey. */ - public mediaKey: Uint8Array; + public mediaKey?: (Uint8Array|null); /** MessageHistoryBundle fileEncSha256. */ - public fileEncSha256: Uint8Array; + public fileEncSha256?: (Uint8Array|null); /** MessageHistoryBundle directPath. */ - public directPath: string; + public directPath?: (string|null); /** MessageHistoryBundle mediaKeyTimestamp. */ - public mediaKeyTimestamp: (number|Long); + public mediaKeyTimestamp?: (number|Long|null); /** MessageHistoryBundle contextInfo. */ public contextInfo?: (proto.IContextInfo|null); @@ -18420,6 +26435,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MessageHistoryBundle + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a NewsletterAdminInviteMessage. */ @@ -18439,6 +26461,9 @@ export namespace proto { /** NewsletterAdminInviteMessage inviteExpiration */ inviteExpiration?: (number|Long|null); + + /** NewsletterAdminInviteMessage contextInfo */ + contextInfo?: (proto.IContextInfo|null); } /** Represents a NewsletterAdminInviteMessage. */ @@ -18451,19 +26476,22 @@ export namespace proto { constructor(properties?: proto.Message.INewsletterAdminInviteMessage); /** NewsletterAdminInviteMessage newsletterJid. */ - public newsletterJid: string; + public newsletterJid?: (string|null); /** NewsletterAdminInviteMessage newsletterName. */ - public newsletterName: string; + public newsletterName?: (string|null); /** NewsletterAdminInviteMessage jpegThumbnail. */ - public jpegThumbnail: Uint8Array; + public jpegThumbnail?: (Uint8Array|null); /** NewsletterAdminInviteMessage caption. */ - public caption: string; + public caption?: (string|null); /** NewsletterAdminInviteMessage inviteExpiration. */ - public inviteExpiration: (number|Long); + public inviteExpiration?: (number|Long|null); + + /** NewsletterAdminInviteMessage contextInfo. */ + public contextInfo?: (proto.IContextInfo|null); /** * Creates a new NewsletterAdminInviteMessage instance using the specified properties. @@ -18534,6 +26562,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NewsletterAdminInviteMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an OrderMessage. */ @@ -18592,43 +26627,43 @@ export namespace proto { constructor(properties?: proto.Message.IOrderMessage); /** OrderMessage orderId. */ - public orderId: string; + public orderId?: (string|null); /** OrderMessage thumbnail. */ - public thumbnail: Uint8Array; + public thumbnail?: (Uint8Array|null); /** OrderMessage itemCount. */ - public itemCount: number; + public itemCount?: (number|null); /** OrderMessage status. */ - public status: proto.Message.OrderMessage.OrderStatus; + public status?: (proto.Message.OrderMessage.OrderStatus|null); /** OrderMessage surface. */ - public surface: proto.Message.OrderMessage.OrderSurface; + public surface?: (proto.Message.OrderMessage.OrderSurface|null); /** OrderMessage message. */ - public message: string; + public message?: (string|null); /** OrderMessage orderTitle. */ - public orderTitle: string; + public orderTitle?: (string|null); /** OrderMessage sellerJid. */ - public sellerJid: string; + public sellerJid?: (string|null); /** OrderMessage token. */ - public token: string; + public token?: (string|null); /** OrderMessage totalAmount1000. */ - public totalAmount1000: (number|Long); + public totalAmount1000?: (number|Long|null); /** OrderMessage totalCurrencyCode. */ - public totalCurrencyCode: string; + public totalCurrencyCode?: (string|null); /** OrderMessage contextInfo. */ public contextInfo?: (proto.IContextInfo|null); /** OrderMessage messageVersion. */ - public messageVersion: number; + public messageVersion?: (number|null); /** OrderMessage orderRequestMessageId. */ public orderRequestMessageId?: (proto.IMessageKey|null); @@ -18702,6 +26737,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OrderMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace OrderMessage { @@ -18739,10 +26781,10 @@ export namespace proto { constructor(properties?: proto.Message.IPaymentInviteMessage); /** PaymentInviteMessage serviceType. */ - public serviceType: proto.Message.PaymentInviteMessage.ServiceType; + public serviceType?: (proto.Message.PaymentInviteMessage.ServiceType|null); /** PaymentInviteMessage expiryTimestamp. */ - public expiryTimestamp: (number|Long); + public expiryTimestamp?: (number|Long|null); /** * Creates a new PaymentInviteMessage instance using the specified properties. @@ -18813,6 +26855,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PaymentInviteMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace PaymentInviteMessage { @@ -18843,6 +26892,9 @@ export namespace proto { /** PeerDataOperationRequestMessage placeholderMessageResendRequest */ placeholderMessageResendRequest?: (proto.Message.PeerDataOperationRequestMessage.IPlaceholderMessageResendRequest[]|null); + + /** PeerDataOperationRequestMessage fullHistorySyncOnDemandRequest */ + fullHistorySyncOnDemandRequest?: (proto.Message.PeerDataOperationRequestMessage.IFullHistorySyncOnDemandRequest|null); } /** Represents a PeerDataOperationRequestMessage. */ @@ -18855,7 +26907,7 @@ export namespace proto { constructor(properties?: proto.Message.IPeerDataOperationRequestMessage); /** PeerDataOperationRequestMessage peerDataOperationRequestType. */ - public peerDataOperationRequestType: proto.Message.PeerDataOperationRequestType; + public peerDataOperationRequestType?: (proto.Message.PeerDataOperationRequestType|null); /** PeerDataOperationRequestMessage requestStickerReupload. */ public requestStickerReupload: proto.Message.PeerDataOperationRequestMessage.IRequestStickerReupload[]; @@ -18869,6 +26921,9 @@ export namespace proto { /** PeerDataOperationRequestMessage placeholderMessageResendRequest. */ public placeholderMessageResendRequest: proto.Message.PeerDataOperationRequestMessage.IPlaceholderMessageResendRequest[]; + /** PeerDataOperationRequestMessage fullHistorySyncOnDemandRequest. */ + public fullHistorySyncOnDemandRequest?: (proto.Message.PeerDataOperationRequestMessage.IFullHistorySyncOnDemandRequest|null); + /** * Creates a new PeerDataOperationRequestMessage instance using the specified properties. * @param [properties] Properties to set @@ -18938,10 +26993,120 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PeerDataOperationRequestMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace PeerDataOperationRequestMessage { + /** Properties of a FullHistorySyncOnDemandRequest. */ + interface IFullHistorySyncOnDemandRequest { + + /** FullHistorySyncOnDemandRequest requestMetadata */ + requestMetadata?: (proto.Message.IFullHistorySyncOnDemandRequestMetadata|null); + + /** FullHistorySyncOnDemandRequest historySyncConfig */ + historySyncConfig?: (proto.DeviceProps.IHistorySyncConfig|null); + } + + /** Represents a FullHistorySyncOnDemandRequest. */ + class FullHistorySyncOnDemandRequest implements IFullHistorySyncOnDemandRequest { + + /** + * Constructs a new FullHistorySyncOnDemandRequest. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.PeerDataOperationRequestMessage.IFullHistorySyncOnDemandRequest); + + /** FullHistorySyncOnDemandRequest requestMetadata. */ + public requestMetadata?: (proto.Message.IFullHistorySyncOnDemandRequestMetadata|null); + + /** FullHistorySyncOnDemandRequest historySyncConfig. */ + public historySyncConfig?: (proto.DeviceProps.IHistorySyncConfig|null); + + /** + * Creates a new FullHistorySyncOnDemandRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns FullHistorySyncOnDemandRequest instance + */ + public static create(properties?: proto.Message.PeerDataOperationRequestMessage.IFullHistorySyncOnDemandRequest): proto.Message.PeerDataOperationRequestMessage.FullHistorySyncOnDemandRequest; + + /** + * Encodes the specified FullHistorySyncOnDemandRequest message. Does not implicitly {@link proto.Message.PeerDataOperationRequestMessage.FullHistorySyncOnDemandRequest.verify|verify} messages. + * @param message FullHistorySyncOnDemandRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.PeerDataOperationRequestMessage.IFullHistorySyncOnDemandRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FullHistorySyncOnDemandRequest message, length delimited. Does not implicitly {@link proto.Message.PeerDataOperationRequestMessage.FullHistorySyncOnDemandRequest.verify|verify} messages. + * @param message FullHistorySyncOnDemandRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.PeerDataOperationRequestMessage.IFullHistorySyncOnDemandRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FullHistorySyncOnDemandRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FullHistorySyncOnDemandRequest + * @throws {Error} If the payload is not 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.PeerDataOperationRequestMessage.FullHistorySyncOnDemandRequest; + + /** + * Decodes a FullHistorySyncOnDemandRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FullHistorySyncOnDemandRequest + * @throws {Error} If the payload 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.PeerDataOperationRequestMessage.FullHistorySyncOnDemandRequest; + + /** + * Verifies a FullHistorySyncOnDemandRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FullHistorySyncOnDemandRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FullHistorySyncOnDemandRequest + */ + public static fromObject(object: { [k: string]: any }): proto.Message.PeerDataOperationRequestMessage.FullHistorySyncOnDemandRequest; + + /** + * Creates a plain object from a FullHistorySyncOnDemandRequest message. Also converts values to other types if specified. + * @param message FullHistorySyncOnDemandRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.PeerDataOperationRequestMessage.FullHistorySyncOnDemandRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FullHistorySyncOnDemandRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FullHistorySyncOnDemandRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a HistorySyncOnDemandRequest. */ interface IHistorySyncOnDemandRequest { @@ -18959,6 +27124,9 @@ export namespace proto { /** HistorySyncOnDemandRequest oldestMsgTimestampMs */ oldestMsgTimestampMs?: (number|Long|null); + + /** HistorySyncOnDemandRequest accountLid */ + accountLid?: (string|null); } /** Represents a HistorySyncOnDemandRequest. */ @@ -18971,19 +27139,22 @@ export namespace proto { constructor(properties?: proto.Message.PeerDataOperationRequestMessage.IHistorySyncOnDemandRequest); /** HistorySyncOnDemandRequest chatJid. */ - public chatJid: string; + public chatJid?: (string|null); /** HistorySyncOnDemandRequest oldestMsgId. */ - public oldestMsgId: string; + public oldestMsgId?: (string|null); /** HistorySyncOnDemandRequest oldestMsgFromMe. */ - public oldestMsgFromMe: boolean; + public oldestMsgFromMe?: (boolean|null); /** HistorySyncOnDemandRequest onDemandMsgCount. */ - public onDemandMsgCount: number; + public onDemandMsgCount?: (number|null); /** HistorySyncOnDemandRequest oldestMsgTimestampMs. */ - public oldestMsgTimestampMs: (number|Long); + public oldestMsgTimestampMs?: (number|Long|null); + + /** HistorySyncOnDemandRequest accountLid. */ + public accountLid?: (string|null); /** * Creates a new HistorySyncOnDemandRequest instance using the specified properties. @@ -19054,6 +27225,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HistorySyncOnDemandRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a PlaceholderMessageResendRequest. */ @@ -19144,6 +27322,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PlaceholderMessageResendRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a RequestStickerReupload. */ @@ -19163,7 +27348,7 @@ export namespace proto { constructor(properties?: proto.Message.PeerDataOperationRequestMessage.IRequestStickerReupload); /** RequestStickerReupload fileSha256. */ - public fileSha256: string; + public fileSha256?: (string|null); /** * Creates a new RequestStickerReupload instance using the specified properties. @@ -19234,6 +27419,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RequestStickerReupload + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a RequestUrlPreview. */ @@ -19256,10 +27448,10 @@ export namespace proto { constructor(properties?: proto.Message.PeerDataOperationRequestMessage.IRequestUrlPreview); /** RequestUrlPreview url. */ - public url: string; + public url?: (string|null); /** RequestUrlPreview includeHqThumbnail. */ - public includeHqThumbnail: boolean; + public includeHqThumbnail?: (boolean|null); /** * Creates a new RequestUrlPreview instance using the specified properties. @@ -19330,6 +27522,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RequestUrlPreview + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -19356,10 +27555,10 @@ export namespace proto { constructor(properties?: proto.Message.IPeerDataOperationRequestResponseMessage); /** PeerDataOperationRequestResponseMessage peerDataOperationRequestType. */ - public peerDataOperationRequestType: proto.Message.PeerDataOperationRequestType; + public peerDataOperationRequestType?: (proto.Message.PeerDataOperationRequestType|null); /** PeerDataOperationRequestResponseMessage stanzaId. */ - public stanzaId: string; + public stanzaId?: (string|null); /** PeerDataOperationRequestResponseMessage peerDataOperationResult. */ public peerDataOperationResult: proto.Message.PeerDataOperationRequestResponseMessage.IPeerDataOperationResult[]; @@ -19433,6 +27632,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PeerDataOperationRequestResponseMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace PeerDataOperationRequestResponseMessage { @@ -19451,6 +27657,15 @@ export namespace proto { /** PeerDataOperationResult placeholderMessageResendResponse */ placeholderMessageResendResponse?: (proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.IPlaceholderMessageResendResponse|null); + + /** PeerDataOperationResult waffleNonceFetchRequestResponse */ + waffleNonceFetchRequestResponse?: (proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.IWaffleNonceFetchResponse|null); + + /** PeerDataOperationResult fullHistorySyncOnDemandRequestResponse */ + fullHistorySyncOnDemandRequestResponse?: (proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.IFullHistorySyncOnDemandRequestResponse|null); + + /** PeerDataOperationResult companionMetaNonceFetchRequestResponse */ + companionMetaNonceFetchRequestResponse?: (proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.ICompanionMetaNonceFetchResponse|null); } /** Represents a PeerDataOperationResult. */ @@ -19463,7 +27678,7 @@ export namespace proto { constructor(properties?: proto.Message.PeerDataOperationRequestResponseMessage.IPeerDataOperationResult); /** PeerDataOperationResult mediaUploadResult. */ - public mediaUploadResult: proto.MediaRetryNotification.ResultType; + public mediaUploadResult?: (proto.MediaRetryNotification.ResultType|null); /** PeerDataOperationResult stickerMessage. */ public stickerMessage?: (proto.Message.IStickerMessage|null); @@ -19474,6 +27689,15 @@ export namespace proto { /** PeerDataOperationResult placeholderMessageResendResponse. */ public placeholderMessageResendResponse?: (proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.IPlaceholderMessageResendResponse|null); + /** PeerDataOperationResult waffleNonceFetchRequestResponse. */ + public waffleNonceFetchRequestResponse?: (proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.IWaffleNonceFetchResponse|null); + + /** PeerDataOperationResult fullHistorySyncOnDemandRequestResponse. */ + public fullHistorySyncOnDemandRequestResponse?: (proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.IFullHistorySyncOnDemandRequestResponse|null); + + /** PeerDataOperationResult companionMetaNonceFetchRequestResponse. */ + public companionMetaNonceFetchRequestResponse?: (proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.ICompanionMetaNonceFetchResponse|null); + /** * Creates a new PeerDataOperationResult instance using the specified properties. * @param [properties] Properties to set @@ -19543,10 +27767,228 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PeerDataOperationResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace PeerDataOperationResult { + /** Properties of a CompanionMetaNonceFetchResponse. */ + interface ICompanionMetaNonceFetchResponse { + + /** CompanionMetaNonceFetchResponse nonce */ + nonce?: (string|null); + } + + /** Represents a CompanionMetaNonceFetchResponse. */ + class CompanionMetaNonceFetchResponse implements ICompanionMetaNonceFetchResponse { + + /** + * Constructs a new CompanionMetaNonceFetchResponse. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.ICompanionMetaNonceFetchResponse); + + /** CompanionMetaNonceFetchResponse nonce. */ + public nonce?: (string|null); + + /** + * Creates a new CompanionMetaNonceFetchResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns CompanionMetaNonceFetchResponse instance + */ + public static create(properties?: proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.ICompanionMetaNonceFetchResponse): proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionMetaNonceFetchResponse; + + /** + * Encodes the specified CompanionMetaNonceFetchResponse message. Does not implicitly {@link proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionMetaNonceFetchResponse.verify|verify} messages. + * @param message CompanionMetaNonceFetchResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.ICompanionMetaNonceFetchResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CompanionMetaNonceFetchResponse message, length delimited. Does not implicitly {@link proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionMetaNonceFetchResponse.verify|verify} messages. + * @param message CompanionMetaNonceFetchResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.ICompanionMetaNonceFetchResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CompanionMetaNonceFetchResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CompanionMetaNonceFetchResponse + * @throws {Error} If the payload is not 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.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionMetaNonceFetchResponse; + + /** + * Decodes a CompanionMetaNonceFetchResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CompanionMetaNonceFetchResponse + * @throws {Error} If the payload 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.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionMetaNonceFetchResponse; + + /** + * Verifies a CompanionMetaNonceFetchResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CompanionMetaNonceFetchResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CompanionMetaNonceFetchResponse + */ + public static fromObject(object: { [k: string]: any }): proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionMetaNonceFetchResponse; + + /** + * Creates a plain object from a CompanionMetaNonceFetchResponse message. Also converts values to other types if specified. + * @param message CompanionMetaNonceFetchResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionMetaNonceFetchResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CompanionMetaNonceFetchResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CompanionMetaNonceFetchResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FullHistorySyncOnDemandRequestResponse. */ + interface IFullHistorySyncOnDemandRequestResponse { + + /** FullHistorySyncOnDemandRequestResponse requestMetadata */ + requestMetadata?: (proto.Message.IFullHistorySyncOnDemandRequestMetadata|null); + + /** FullHistorySyncOnDemandRequestResponse responseCode */ + responseCode?: (proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.FullHistorySyncOnDemandResponseCode|null); + } + + /** Represents a FullHistorySyncOnDemandRequestResponse. */ + class FullHistorySyncOnDemandRequestResponse implements IFullHistorySyncOnDemandRequestResponse { + + /** + * Constructs a new FullHistorySyncOnDemandRequestResponse. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.IFullHistorySyncOnDemandRequestResponse); + + /** FullHistorySyncOnDemandRequestResponse requestMetadata. */ + public requestMetadata?: (proto.Message.IFullHistorySyncOnDemandRequestMetadata|null); + + /** FullHistorySyncOnDemandRequestResponse responseCode. */ + public responseCode?: (proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.FullHistorySyncOnDemandResponseCode|null); + + /** + * Creates a new FullHistorySyncOnDemandRequestResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns FullHistorySyncOnDemandRequestResponse instance + */ + public static create(properties?: proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.IFullHistorySyncOnDemandRequestResponse): proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.FullHistorySyncOnDemandRequestResponse; + + /** + * Encodes the specified FullHistorySyncOnDemandRequestResponse message. Does not implicitly {@link proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.FullHistorySyncOnDemandRequestResponse.verify|verify} messages. + * @param message FullHistorySyncOnDemandRequestResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.IFullHistorySyncOnDemandRequestResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FullHistorySyncOnDemandRequestResponse message, length delimited. Does not implicitly {@link proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.FullHistorySyncOnDemandRequestResponse.verify|verify} messages. + * @param message FullHistorySyncOnDemandRequestResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.IFullHistorySyncOnDemandRequestResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FullHistorySyncOnDemandRequestResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FullHistorySyncOnDemandRequestResponse + * @throws {Error} If the payload is not 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.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.FullHistorySyncOnDemandRequestResponse; + + /** + * Decodes a FullHistorySyncOnDemandRequestResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FullHistorySyncOnDemandRequestResponse + * @throws {Error} If the payload 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.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.FullHistorySyncOnDemandRequestResponse; + + /** + * Verifies a FullHistorySyncOnDemandRequestResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FullHistorySyncOnDemandRequestResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FullHistorySyncOnDemandRequestResponse + */ + public static fromObject(object: { [k: string]: any }): proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.FullHistorySyncOnDemandRequestResponse; + + /** + * Creates a plain object from a FullHistorySyncOnDemandRequestResponse message. Also converts values to other types if specified. + * @param message FullHistorySyncOnDemandRequestResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.FullHistorySyncOnDemandRequestResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FullHistorySyncOnDemandRequestResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FullHistorySyncOnDemandRequestResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** FullHistorySyncOnDemandResponseCode enum. */ + enum FullHistorySyncOnDemandResponseCode { + REQUEST_SUCCESS = 0, + REQUEST_TIME_EXPIRED = 1, + DECLINED_SHARING_HISTORY = 2, + GENERIC_ERROR = 3, + ERROR_REQUEST_ON_NON_SMB_PRIMARY = 4, + ERROR_HOSTED_DEVICE_NOT_CONNECTED = 5, + ERROR_HOSTED_DEVICE_LOGIN_TIME_NOT_SET = 6 + } + /** Properties of a LinkPreviewResponse. */ interface ILinkPreviewResponse { @@ -19562,9 +28004,6 @@ export namespace proto { /** LinkPreviewResponse thumbData */ thumbData?: (Uint8Array|null); - /** LinkPreviewResponse canonicalUrl */ - canonicalUrl?: (string|null); - /** LinkPreviewResponse matchText */ matchText?: (string|null); @@ -19585,25 +28024,22 @@ export namespace proto { constructor(properties?: proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.ILinkPreviewResponse); /** LinkPreviewResponse url. */ - public url: string; + public url?: (string|null); /** LinkPreviewResponse title. */ - public title: string; + public title?: (string|null); /** LinkPreviewResponse description. */ - public description: string; + public description?: (string|null); /** LinkPreviewResponse thumbData. */ - public thumbData: Uint8Array; - - /** LinkPreviewResponse canonicalUrl. */ - public canonicalUrl: string; + public thumbData?: (Uint8Array|null); /** LinkPreviewResponse matchText. */ - public matchText: string; + public matchText?: (string|null); /** LinkPreviewResponse previewType. */ - public previewType: string; + public previewType?: (string|null); /** LinkPreviewResponse hqThumbnail. */ public hqThumbnail?: (proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.ILinkPreviewHighQualityThumbnail|null); @@ -19677,6 +28113,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LinkPreviewResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace LinkPreviewResponse { @@ -19716,25 +28159,25 @@ export namespace proto { constructor(properties?: proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.ILinkPreviewHighQualityThumbnail); /** LinkPreviewHighQualityThumbnail directPath. */ - public directPath: string; + public directPath?: (string|null); /** LinkPreviewHighQualityThumbnail thumbHash. */ - public thumbHash: string; + public thumbHash?: (string|null); /** LinkPreviewHighQualityThumbnail encThumbHash. */ - public encThumbHash: string; + public encThumbHash?: (string|null); /** LinkPreviewHighQualityThumbnail mediaKey. */ - public mediaKey: Uint8Array; + public mediaKey?: (Uint8Array|null); /** LinkPreviewHighQualityThumbnail mediaKeyTimestampMs. */ - public mediaKeyTimestampMs: (number|Long); + public mediaKeyTimestampMs?: (number|Long|null); /** LinkPreviewHighQualityThumbnail thumbWidth. */ - public thumbWidth: number; + public thumbWidth?: (number|null); /** LinkPreviewHighQualityThumbnail thumbHeight. */ - public thumbHeight: number; + public thumbHeight?: (number|null); /** * Creates a new LinkPreviewHighQualityThumbnail instance using the specified properties. @@ -19805,6 +28248,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LinkPreviewHighQualityThumbnail + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -19825,7 +28275,7 @@ export namespace proto { constructor(properties?: proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.IPlaceholderMessageResendResponse); /** PlaceholderMessageResendResponse webMessageInfoBytes. */ - public webMessageInfoBytes: Uint8Array; + public webMessageInfoBytes?: (Uint8Array|null); /** * Creates a new PlaceholderMessageResendResponse instance using the specified properties. @@ -19896,6 +28346,116 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PlaceholderMessageResendResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a WaffleNonceFetchResponse. */ + interface IWaffleNonceFetchResponse { + + /** WaffleNonceFetchResponse nonce */ + nonce?: (string|null); + + /** WaffleNonceFetchResponse waEntFbid */ + waEntFbid?: (string|null); + } + + /** Represents a WaffleNonceFetchResponse. */ + class WaffleNonceFetchResponse implements IWaffleNonceFetchResponse { + + /** + * Constructs a new WaffleNonceFetchResponse. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.IWaffleNonceFetchResponse); + + /** WaffleNonceFetchResponse nonce. */ + public nonce?: (string|null); + + /** WaffleNonceFetchResponse waEntFbid. */ + public waEntFbid?: (string|null); + + /** + * Creates a new WaffleNonceFetchResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns WaffleNonceFetchResponse instance + */ + public static create(properties?: proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.IWaffleNonceFetchResponse): proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.WaffleNonceFetchResponse; + + /** + * Encodes the specified WaffleNonceFetchResponse message. Does not implicitly {@link proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.WaffleNonceFetchResponse.verify|verify} messages. + * @param message WaffleNonceFetchResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.IWaffleNonceFetchResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WaffleNonceFetchResponse message, length delimited. Does not implicitly {@link proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.WaffleNonceFetchResponse.verify|verify} messages. + * @param message WaffleNonceFetchResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.IWaffleNonceFetchResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WaffleNonceFetchResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WaffleNonceFetchResponse + * @throws {Error} If the payload is not 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.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.WaffleNonceFetchResponse; + + /** + * Decodes a WaffleNonceFetchResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WaffleNonceFetchResponse + * @throws {Error} If the payload 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.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.WaffleNonceFetchResponse; + + /** + * Verifies a WaffleNonceFetchResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WaffleNonceFetchResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WaffleNonceFetchResponse + */ + public static fromObject(object: { [k: string]: any }): proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.WaffleNonceFetchResponse; + + /** + * Creates a plain object from a WaffleNonceFetchResponse message. Also converts values to other types if specified. + * @param message WaffleNonceFetchResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.WaffleNonceFetchResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WaffleNonceFetchResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WaffleNonceFetchResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } } @@ -19906,7 +28466,10 @@ export namespace proto { SEND_RECENT_STICKER_BOOTSTRAP = 1, GENERATE_LINK_PREVIEW = 2, HISTORY_SYNC_ON_DEMAND = 3, - PLACEHOLDER_MESSAGE_RESEND = 4 + PLACEHOLDER_MESSAGE_RESEND = 4, + WAFFLE_LINKING_NONCE_FETCH = 5, + FULL_HISTORY_SYNC_ON_DEMAND = 6, + COMPANION_META_NONCE_FETCH = 7 } /** Properties of a PinInChatMessage. */ @@ -19935,10 +28498,10 @@ export namespace proto { public key?: (proto.IMessageKey|null); /** PinInChatMessage type. */ - public type: proto.Message.PinInChatMessage.Type; + public type?: (proto.Message.PinInChatMessage.Type|null); /** PinInChatMessage senderTimestampMs. */ - public senderTimestampMs: (number|Long); + public senderTimestampMs?: (number|Long|null); /** * Creates a new PinInChatMessage instance using the specified properties. @@ -20009,6 +28572,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PinInChatMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace PinInChatMessage { @@ -20038,7 +28608,7 @@ export namespace proto { constructor(properties?: proto.Message.IPlaceholderMessage); /** PlaceholderMessage type. */ - public type: proto.Message.PlaceholderMessage.PlaceholderType; + public type?: (proto.Message.PlaceholderMessage.PlaceholderType|null); /** * Creates a new PlaceholderMessage instance using the specified properties. @@ -20109,6 +28679,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PlaceholderMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace PlaceholderMessage { @@ -20119,6 +28696,13 @@ export namespace proto { } } + /** PollContentType enum. */ + enum PollContentType { + UNKNOWN = 0, + TEXT = 1, + IMAGE = 2 + } + /** Properties of a PollCreationMessage. */ interface IPollCreationMessage { @@ -20136,6 +28720,15 @@ export namespace proto { /** PollCreationMessage contextInfo */ contextInfo?: (proto.IContextInfo|null); + + /** PollCreationMessage pollContentType */ + pollContentType?: (proto.Message.PollContentType|null); + + /** PollCreationMessage pollType */ + pollType?: (proto.Message.PollCreationMessage.PollType|null); + + /** PollCreationMessage correctAnswer */ + correctAnswer?: (proto.Message.PollCreationMessage.IOption|null); } /** Represents a PollCreationMessage. */ @@ -20148,20 +28741,29 @@ export namespace proto { constructor(properties?: proto.Message.IPollCreationMessage); /** PollCreationMessage encKey. */ - public encKey: Uint8Array; + public encKey?: (Uint8Array|null); /** PollCreationMessage name. */ - public name: string; + public name?: (string|null); /** PollCreationMessage options. */ public options: proto.Message.PollCreationMessage.IOption[]; /** PollCreationMessage selectableOptionsCount. */ - public selectableOptionsCount: number; + public selectableOptionsCount?: (number|null); /** PollCreationMessage contextInfo. */ public contextInfo?: (proto.IContextInfo|null); + /** PollCreationMessage pollContentType. */ + public pollContentType?: (proto.Message.PollContentType|null); + + /** PollCreationMessage pollType. */ + public pollType?: (proto.Message.PollCreationMessage.PollType|null); + + /** PollCreationMessage correctAnswer. */ + public correctAnswer?: (proto.Message.PollCreationMessage.IOption|null); + /** * Creates a new PollCreationMessage instance using the specified properties. * @param [properties] Properties to set @@ -20231,6 +28833,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PollCreationMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace PollCreationMessage { @@ -20240,6 +28849,9 @@ export namespace proto { /** Option optionName */ optionName?: (string|null); + + /** Option optionHash */ + optionHash?: (string|null); } /** Represents an Option. */ @@ -20252,7 +28864,10 @@ export namespace proto { constructor(properties?: proto.Message.PollCreationMessage.IOption); /** Option optionName. */ - public optionName: string; + public optionName?: (string|null); + + /** Option optionHash. */ + public optionHash?: (string|null); /** * Creates a new Option instance using the specified properties. @@ -20323,6 +28938,19 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Option + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** PollType enum. */ + enum PollType { + POLL = 0, + QUIZ = 1 } } @@ -20346,10 +28974,10 @@ export namespace proto { constructor(properties?: proto.Message.IPollEncValue); /** PollEncValue encPayload. */ - public encPayload: Uint8Array; + public encPayload?: (Uint8Array|null); /** PollEncValue encIv. */ - public encIv: Uint8Array; + public encIv?: (Uint8Array|null); /** * Creates a new PollEncValue instance using the specified properties. @@ -20420,6 +29048,228 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PollEncValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PollResultSnapshotMessage. */ + interface IPollResultSnapshotMessage { + + /** PollResultSnapshotMessage name */ + name?: (string|null); + + /** PollResultSnapshotMessage pollVotes */ + pollVotes?: (proto.Message.PollResultSnapshotMessage.IPollVote[]|null); + + /** PollResultSnapshotMessage contextInfo */ + contextInfo?: (proto.IContextInfo|null); + } + + /** Represents a PollResultSnapshotMessage. */ + class PollResultSnapshotMessage implements IPollResultSnapshotMessage { + + /** + * Constructs a new PollResultSnapshotMessage. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.IPollResultSnapshotMessage); + + /** PollResultSnapshotMessage name. */ + public name?: (string|null); + + /** PollResultSnapshotMessage pollVotes. */ + public pollVotes: proto.Message.PollResultSnapshotMessage.IPollVote[]; + + /** PollResultSnapshotMessage contextInfo. */ + public contextInfo?: (proto.IContextInfo|null); + + /** + * Creates a new PollResultSnapshotMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns PollResultSnapshotMessage instance + */ + public static create(properties?: proto.Message.IPollResultSnapshotMessage): proto.Message.PollResultSnapshotMessage; + + /** + * Encodes the specified PollResultSnapshotMessage message. Does not implicitly {@link proto.Message.PollResultSnapshotMessage.verify|verify} messages. + * @param message PollResultSnapshotMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.IPollResultSnapshotMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PollResultSnapshotMessage message, length delimited. Does not implicitly {@link proto.Message.PollResultSnapshotMessage.verify|verify} messages. + * @param message PollResultSnapshotMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.IPollResultSnapshotMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PollResultSnapshotMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PollResultSnapshotMessage + * @throws {Error} If the payload is not 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.PollResultSnapshotMessage; + + /** + * Decodes a PollResultSnapshotMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PollResultSnapshotMessage + * @throws {Error} If the payload 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.PollResultSnapshotMessage; + + /** + * Verifies a PollResultSnapshotMessage message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PollResultSnapshotMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PollResultSnapshotMessage + */ + public static fromObject(object: { [k: string]: any }): proto.Message.PollResultSnapshotMessage; + + /** + * Creates a plain object from a PollResultSnapshotMessage message. Also converts values to other types if specified. + * @param message PollResultSnapshotMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.PollResultSnapshotMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PollResultSnapshotMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PollResultSnapshotMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace PollResultSnapshotMessage { + + /** Properties of a PollVote. */ + interface IPollVote { + + /** PollVote optionName */ + optionName?: (string|null); + + /** PollVote optionVoteCount */ + optionVoteCount?: (number|Long|null); + } + + /** Represents a PollVote. */ + class PollVote implements IPollVote { + + /** + * Constructs a new PollVote. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.PollResultSnapshotMessage.IPollVote); + + /** PollVote optionName. */ + public optionName?: (string|null); + + /** PollVote optionVoteCount. */ + public optionVoteCount?: (number|Long|null); + + /** + * Creates a new PollVote instance using the specified properties. + * @param [properties] Properties to set + * @returns PollVote instance + */ + public static create(properties?: proto.Message.PollResultSnapshotMessage.IPollVote): proto.Message.PollResultSnapshotMessage.PollVote; + + /** + * Encodes the specified PollVote message. Does not implicitly {@link proto.Message.PollResultSnapshotMessage.PollVote.verify|verify} messages. + * @param message PollVote message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.PollResultSnapshotMessage.IPollVote, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PollVote message, length delimited. Does not implicitly {@link proto.Message.PollResultSnapshotMessage.PollVote.verify|verify} messages. + * @param message PollVote message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.PollResultSnapshotMessage.IPollVote, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PollVote message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PollVote + * @throws {Error} If the payload is not 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.PollResultSnapshotMessage.PollVote; + + /** + * Decodes a PollVote message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PollVote + * @throws {Error} If the payload 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.PollResultSnapshotMessage.PollVote; + + /** + * Verifies a PollVote message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PollVote message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PollVote + */ + public static fromObject(object: { [k: string]: any }): proto.Message.PollResultSnapshotMessage.PollVote; + + /** + * Creates a plain object from a PollVote message. Also converts values to other types if specified. + * @param message PollVote + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.PollResultSnapshotMessage.PollVote, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PollVote to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PollVote + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } } /** Properties of a PollUpdateMessage. */ @@ -20457,7 +29307,7 @@ export namespace proto { public metadata?: (proto.Message.IPollUpdateMessageMetadata|null); /** PollUpdateMessage senderTimestampMs. */ - public senderTimestampMs: (number|Long); + public senderTimestampMs?: (number|Long|null); /** * Creates a new PollUpdateMessage instance using the specified properties. @@ -20528,6 +29378,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PollUpdateMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a PollUpdateMessageMetadata. */ @@ -20612,6 +29469,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PollUpdateMessageMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a PollVoteMessage. */ @@ -20702,6 +29566,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PollVoteMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ProductMessage. */ @@ -20739,16 +29610,16 @@ export namespace proto { public product?: (proto.Message.ProductMessage.IProductSnapshot|null); /** ProductMessage businessOwnerJid. */ - public businessOwnerJid: string; + public businessOwnerJid?: (string|null); /** ProductMessage catalog. */ public catalog?: (proto.Message.ProductMessage.ICatalogSnapshot|null); /** ProductMessage body. */ - public body: string; + public body?: (string|null); /** ProductMessage footer. */ - public footer: string; + public footer?: (string|null); /** ProductMessage contextInfo. */ public contextInfo?: (proto.IContextInfo|null); @@ -20822,6 +29693,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ProductMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace ProductMessage { @@ -20852,10 +29730,10 @@ export namespace proto { public catalogImage?: (proto.Message.IImageMessage|null); /** CatalogSnapshot title. */ - public title: string; + public title?: (string|null); /** CatalogSnapshot description. */ - public description: string; + public description?: (string|null); /** * Creates a new CatalogSnapshot instance using the specified properties. @@ -20926,6 +29804,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CatalogSnapshot + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ProductSnapshot. */ @@ -20963,6 +29848,9 @@ export namespace proto { /** ProductSnapshot salePriceAmount1000 */ salePriceAmount1000?: (number|Long|null); + + /** ProductSnapshot signedUrl */ + signedUrl?: (string|null); } /** Represents a ProductSnapshot. */ @@ -20978,34 +29866,37 @@ export namespace proto { public productImage?: (proto.Message.IImageMessage|null); /** ProductSnapshot productId. */ - public productId: string; + public productId?: (string|null); /** ProductSnapshot title. */ - public title: string; + public title?: (string|null); /** ProductSnapshot description. */ - public description: string; + public description?: (string|null); /** ProductSnapshot currencyCode. */ - public currencyCode: string; + public currencyCode?: (string|null); /** ProductSnapshot priceAmount1000. */ - public priceAmount1000: (number|Long); + public priceAmount1000?: (number|Long|null); /** ProductSnapshot retailerId. */ - public retailerId: string; + public retailerId?: (string|null); /** ProductSnapshot url. */ - public url: string; + public url?: (string|null); /** ProductSnapshot productImageCount. */ - public productImageCount: number; + public productImageCount?: (number|null); /** ProductSnapshot firstImageId. */ - public firstImageId: string; + public firstImageId?: (string|null); /** ProductSnapshot salePriceAmount1000. */ - public salePriceAmount1000: (number|Long); + public salePriceAmount1000?: (number|Long|null); + + /** ProductSnapshot signedUrl. */ + public signedUrl?: (string|null); /** * Creates a new ProductSnapshot instance using the specified properties. @@ -21076,6 +29967,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ProductSnapshot + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -21135,6 +30033,15 @@ export namespace proto { /** ProtocolMessage mediaNotifyMessage */ mediaNotifyMessage?: (proto.IMediaNotifyMessage|null); + + /** ProtocolMessage cloudApiThreadControlNotification */ + cloudApiThreadControlNotification?: (proto.Message.ICloudAPIThreadControlNotification|null); + + /** ProtocolMessage lidMigrationMappingSyncMessage */ + lidMigrationMappingSyncMessage?: (proto.ILIDMigrationMappingSyncMessage|null); + + /** ProtocolMessage limitSharing */ + limitSharing?: (proto.ILimitSharing|null); } /** Represents a ProtocolMessage. */ @@ -21150,13 +30057,13 @@ export namespace proto { public key?: (proto.IMessageKey|null); /** ProtocolMessage type. */ - public type: proto.Message.ProtocolMessage.Type; + public type?: (proto.Message.ProtocolMessage.Type|null); /** ProtocolMessage ephemeralExpiration. */ - public ephemeralExpiration: number; + public ephemeralExpiration?: (number|null); /** ProtocolMessage ephemeralSettingTimestamp. */ - public ephemeralSettingTimestamp: (number|Long); + public ephemeralSettingTimestamp?: (number|Long|null); /** ProtocolMessage historySyncNotification. */ public historySyncNotification?: (proto.Message.IHistorySyncNotification|null); @@ -21180,7 +30087,7 @@ export namespace proto { public editedMessage?: (proto.IMessage|null); /** ProtocolMessage timestampMs. */ - public timestampMs: (number|Long); + public timestampMs?: (number|Long|null); /** ProtocolMessage peerDataOperationRequestMessage. */ public peerDataOperationRequestMessage?: (proto.Message.IPeerDataOperationRequestMessage|null); @@ -21192,7 +30099,7 @@ export namespace proto { public botFeedbackMessage?: (proto.Message.IBotFeedbackMessage|null); /** ProtocolMessage invokerJid. */ - public invokerJid: string; + public invokerJid?: (string|null); /** ProtocolMessage requestWelcomeMessageMetadata. */ public requestWelcomeMessageMetadata?: (proto.Message.IRequestWelcomeMessageMetadata|null); @@ -21200,6 +30107,15 @@ export namespace proto { /** ProtocolMessage mediaNotifyMessage. */ public mediaNotifyMessage?: (proto.IMediaNotifyMessage|null); + /** ProtocolMessage cloudApiThreadControlNotification. */ + public cloudApiThreadControlNotification?: (proto.Message.ICloudAPIThreadControlNotification|null); + + /** ProtocolMessage lidMigrationMappingSyncMessage. */ + public lidMigrationMappingSyncMessage?: (proto.ILIDMigrationMappingSyncMessage|null); + + /** ProtocolMessage limitSharing. */ + public limitSharing?: (proto.ILimitSharing|null); + /** * Creates a new ProtocolMessage instance using the specified properties. * @param [properties] Properties to set @@ -21269,6 +30185,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ProtocolMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace ProtocolMessage { @@ -21290,7 +30213,14 @@ export namespace proto { PEER_DATA_OPERATION_REQUEST_RESPONSE_MESSAGE = 17, REQUEST_WELCOME_MESSAGE = 18, BOT_FEEDBACK_MESSAGE = 19, - MEDIA_NOTIFY_MESSAGE = 20 + MEDIA_NOTIFY_MESSAGE = 20, + CLOUD_API_THREAD_CONTROL_NOTIFICATION = 21, + LID_MIGRATION_MAPPING_SYNC = 22, + REMINDER_MESSAGE = 23, + BOT_MEMU_ONBOARDING_MESSAGE = 24, + STATUS_MENTION_MESSAGE = 25, + STOP_GENERATION_MESSAGE = 26, + LIMIT_SHARING = 27 } } @@ -21323,13 +30253,13 @@ export namespace proto { public key?: (proto.IMessageKey|null); /** ReactionMessage text. */ - public text: string; + public text?: (string|null); /** ReactionMessage groupingKey. */ - public groupingKey: string; + public groupingKey?: (string|null); /** ReactionMessage senderTimestampMs. */ - public senderTimestampMs: (number|Long); + public senderTimestampMs?: (number|Long|null); /** * Creates a new ReactionMessage instance using the specified properties. @@ -21400,6 +30330,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReactionMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a RequestPaymentMessage. */ @@ -21440,16 +30377,16 @@ export namespace proto { public noteMessage?: (proto.IMessage|null); /** RequestPaymentMessage currencyCodeIso4217. */ - public currencyCodeIso4217: string; + public currencyCodeIso4217?: (string|null); /** RequestPaymentMessage amount1000. */ - public amount1000: (number|Long); + public amount1000?: (number|Long|null); /** RequestPaymentMessage requestFrom. */ - public requestFrom: string; + public requestFrom?: (string|null); /** RequestPaymentMessage expiryTimestamp. */ - public expiryTimestamp: (number|Long); + public expiryTimestamp?: (number|Long|null); /** RequestPaymentMessage amount. */ public amount?: (proto.IMoney|null); @@ -21526,6 +30463,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RequestPaymentMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a RequestPhoneNumberMessage. */ @@ -21616,6 +30560,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RequestPhoneNumberMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a RequestWelcomeMessageMetadata. */ @@ -21635,7 +30586,7 @@ export namespace proto { constructor(properties?: proto.Message.IRequestWelcomeMessageMetadata); /** RequestWelcomeMessageMetadata localChatState. */ - public localChatState: proto.Message.RequestWelcomeMessageMetadata.LocalChatState; + public localChatState?: (proto.Message.RequestWelcomeMessageMetadata.LocalChatState|null); /** * Creates a new RequestWelcomeMessageMetadata instance using the specified properties. @@ -21706,6 +30657,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RequestWelcomeMessageMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace RequestWelcomeMessageMetadata { @@ -21740,13 +30698,13 @@ export namespace proto { constructor(properties?: proto.Message.IScheduledCallCreationMessage); /** ScheduledCallCreationMessage scheduledTimestampMs. */ - public scheduledTimestampMs: (number|Long); + public scheduledTimestampMs?: (number|Long|null); /** ScheduledCallCreationMessage callType. */ - public callType: proto.Message.ScheduledCallCreationMessage.CallType; + public callType?: (proto.Message.ScheduledCallCreationMessage.CallType|null); /** ScheduledCallCreationMessage title. */ - public title: string; + public title?: (string|null); /** * Creates a new ScheduledCallCreationMessage instance using the specified properties. @@ -21817,6 +30775,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ScheduledCallCreationMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace ScheduledCallCreationMessage { @@ -21852,7 +30817,7 @@ export namespace proto { public key?: (proto.IMessageKey|null); /** ScheduledCallEditMessage editType. */ - public editType: proto.Message.ScheduledCallEditMessage.EditType; + public editType?: (proto.Message.ScheduledCallEditMessage.EditType|null); /** * Creates a new ScheduledCallEditMessage instance using the specified properties. @@ -21923,6 +30888,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ScheduledCallEditMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace ScheduledCallEditMessage { @@ -21934,6 +30906,130 @@ export namespace proto { } } + /** Properties of a SecretEncryptedMessage. */ + interface ISecretEncryptedMessage { + + /** SecretEncryptedMessage targetMessageKey */ + targetMessageKey?: (proto.IMessageKey|null); + + /** SecretEncryptedMessage encPayload */ + encPayload?: (Uint8Array|null); + + /** SecretEncryptedMessage encIv */ + encIv?: (Uint8Array|null); + + /** SecretEncryptedMessage secretEncType */ + secretEncType?: (proto.Message.SecretEncryptedMessage.SecretEncType|null); + } + + /** Represents a SecretEncryptedMessage. */ + class SecretEncryptedMessage implements ISecretEncryptedMessage { + + /** + * Constructs a new SecretEncryptedMessage. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.ISecretEncryptedMessage); + + /** SecretEncryptedMessage targetMessageKey. */ + public targetMessageKey?: (proto.IMessageKey|null); + + /** SecretEncryptedMessage encPayload. */ + public encPayload?: (Uint8Array|null); + + /** SecretEncryptedMessage encIv. */ + public encIv?: (Uint8Array|null); + + /** SecretEncryptedMessage secretEncType. */ + public secretEncType?: (proto.Message.SecretEncryptedMessage.SecretEncType|null); + + /** + * Creates a new SecretEncryptedMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns SecretEncryptedMessage instance + */ + public static create(properties?: proto.Message.ISecretEncryptedMessage): proto.Message.SecretEncryptedMessage; + + /** + * Encodes the specified SecretEncryptedMessage message. Does not implicitly {@link proto.Message.SecretEncryptedMessage.verify|verify} messages. + * @param message SecretEncryptedMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.ISecretEncryptedMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SecretEncryptedMessage message, length delimited. Does not implicitly {@link proto.Message.SecretEncryptedMessage.verify|verify} messages. + * @param message SecretEncryptedMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.ISecretEncryptedMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SecretEncryptedMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SecretEncryptedMessage + * @throws {Error} If the payload is not 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.SecretEncryptedMessage; + + /** + * Decodes a SecretEncryptedMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SecretEncryptedMessage + * @throws {Error} If the payload 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.SecretEncryptedMessage; + + /** + * Verifies a SecretEncryptedMessage message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SecretEncryptedMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SecretEncryptedMessage + */ + public static fromObject(object: { [k: string]: any }): proto.Message.SecretEncryptedMessage; + + /** + * Creates a plain object from a SecretEncryptedMessage message. Also converts values to other types if specified. + * @param message SecretEncryptedMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.SecretEncryptedMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SecretEncryptedMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SecretEncryptedMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SecretEncryptedMessage { + + /** SecretEncType enum. */ + enum SecretEncType { + UNKNOWN = 0, + EVENT_EDIT = 1 + } + } + /** Properties of a SendPaymentMessage. */ interface ISendPaymentMessage { @@ -22034,6 +31130,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SendPaymentMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a SenderKeyDistributionMessage. */ @@ -22056,10 +31159,10 @@ export namespace proto { constructor(properties?: proto.Message.ISenderKeyDistributionMessage); /** SenderKeyDistributionMessage groupId. */ - public groupId: string; + public groupId?: (string|null); /** SenderKeyDistributionMessage axolotlSenderKeyDistributionMessage. */ - public axolotlSenderKeyDistributionMessage: Uint8Array; + public axolotlSenderKeyDistributionMessage?: (Uint8Array|null); /** * Creates a new SenderKeyDistributionMessage instance using the specified properties. @@ -22130,6 +31233,132 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SenderKeyDistributionMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a StatusNotificationMessage. */ + interface IStatusNotificationMessage { + + /** StatusNotificationMessage responseMessageKey */ + responseMessageKey?: (proto.IMessageKey|null); + + /** StatusNotificationMessage originalMessageKey */ + originalMessageKey?: (proto.IMessageKey|null); + + /** StatusNotificationMessage type */ + type?: (proto.Message.StatusNotificationMessage.StatusNotificationType|null); + } + + /** Represents a StatusNotificationMessage. */ + class StatusNotificationMessage implements IStatusNotificationMessage { + + /** + * Constructs a new StatusNotificationMessage. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.IStatusNotificationMessage); + + /** StatusNotificationMessage responseMessageKey. */ + public responseMessageKey?: (proto.IMessageKey|null); + + /** StatusNotificationMessage originalMessageKey. */ + public originalMessageKey?: (proto.IMessageKey|null); + + /** StatusNotificationMessage type. */ + public type?: (proto.Message.StatusNotificationMessage.StatusNotificationType|null); + + /** + * Creates a new StatusNotificationMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns StatusNotificationMessage instance + */ + public static create(properties?: proto.Message.IStatusNotificationMessage): proto.Message.StatusNotificationMessage; + + /** + * Encodes the specified StatusNotificationMessage message. Does not implicitly {@link proto.Message.StatusNotificationMessage.verify|verify} messages. + * @param message StatusNotificationMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.IStatusNotificationMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StatusNotificationMessage message, length delimited. Does not implicitly {@link proto.Message.StatusNotificationMessage.verify|verify} messages. + * @param message StatusNotificationMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.IStatusNotificationMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StatusNotificationMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StatusNotificationMessage + * @throws {Error} If the payload is not 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.StatusNotificationMessage; + + /** + * Decodes a StatusNotificationMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StatusNotificationMessage + * @throws {Error} If the payload 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.StatusNotificationMessage; + + /** + * Verifies a StatusNotificationMessage message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StatusNotificationMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StatusNotificationMessage + */ + public static fromObject(object: { [k: string]: any }): proto.Message.StatusNotificationMessage; + + /** + * Creates a plain object from a StatusNotificationMessage message. Also converts values to other types if specified. + * @param message StatusNotificationMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.StatusNotificationMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StatusNotificationMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StatusNotificationMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace StatusNotificationMessage { + + /** StatusNotificationType enum. */ + enum StatusNotificationType { + UNKNOWN = 0, + STATUS_ADD_YOURS = 1, + STATUS_RESHARE = 2 + } } /** Properties of a StickerMessage. */ @@ -22191,6 +31420,9 @@ export namespace proto { /** StickerMessage isLottie */ isLottie?: (boolean|null); + + /** StickerMessage accessibilityLabel */ + accessibilityLabel?: (string|null); } /** Represents a StickerMessage. */ @@ -22203,61 +31435,64 @@ export namespace proto { constructor(properties?: proto.Message.IStickerMessage); /** StickerMessage url. */ - public url: string; + public url?: (string|null); /** StickerMessage fileSha256. */ - public fileSha256: Uint8Array; + public fileSha256?: (Uint8Array|null); /** StickerMessage fileEncSha256. */ - public fileEncSha256: Uint8Array; + public fileEncSha256?: (Uint8Array|null); /** StickerMessage mediaKey. */ - public mediaKey: Uint8Array; + public mediaKey?: (Uint8Array|null); /** StickerMessage mimetype. */ - public mimetype: string; + public mimetype?: (string|null); /** StickerMessage height. */ - public height: number; + public height?: (number|null); /** StickerMessage width. */ - public width: number; + public width?: (number|null); /** StickerMessage directPath. */ - public directPath: string; + public directPath?: (string|null); /** StickerMessage fileLength. */ - public fileLength: (number|Long); + public fileLength?: (number|Long|null); /** StickerMessage mediaKeyTimestamp. */ - public mediaKeyTimestamp: (number|Long); + public mediaKeyTimestamp?: (number|Long|null); /** StickerMessage firstFrameLength. */ - public firstFrameLength: number; + public firstFrameLength?: (number|null); /** StickerMessage firstFrameSidecar. */ - public firstFrameSidecar: Uint8Array; + public firstFrameSidecar?: (Uint8Array|null); /** StickerMessage isAnimated. */ - public isAnimated: boolean; + public isAnimated?: (boolean|null); /** StickerMessage pngThumbnail. */ - public pngThumbnail: Uint8Array; + public pngThumbnail?: (Uint8Array|null); /** StickerMessage contextInfo. */ public contextInfo?: (proto.IContextInfo|null); /** StickerMessage stickerSentTs. */ - public stickerSentTs: (number|Long); + public stickerSentTs?: (number|Long|null); /** StickerMessage isAvatar. */ - public isAvatar: boolean; + public isAvatar?: (boolean|null); /** StickerMessage isAiSticker. */ - public isAiSticker: boolean; + public isAiSticker?: (boolean|null); /** StickerMessage isLottie. */ - public isLottie: boolean; + public isLottie?: (boolean|null); + + /** StickerMessage accessibilityLabel. */ + public accessibilityLabel?: (string|null); /** * Creates a new StickerMessage instance using the specified properties. @@ -22328,6 +31563,373 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StickerMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a StickerPackMessage. */ + interface IStickerPackMessage { + + /** StickerPackMessage stickerPackId */ + stickerPackId?: (string|null); + + /** StickerPackMessage name */ + name?: (string|null); + + /** StickerPackMessage publisher */ + publisher?: (string|null); + + /** StickerPackMessage stickers */ + stickers?: (proto.Message.StickerPackMessage.ISticker[]|null); + + /** StickerPackMessage fileLength */ + fileLength?: (number|Long|null); + + /** StickerPackMessage fileSha256 */ + fileSha256?: (Uint8Array|null); + + /** StickerPackMessage fileEncSha256 */ + fileEncSha256?: (Uint8Array|null); + + /** StickerPackMessage mediaKey */ + mediaKey?: (Uint8Array|null); + + /** StickerPackMessage directPath */ + directPath?: (string|null); + + /** StickerPackMessage caption */ + caption?: (string|null); + + /** StickerPackMessage contextInfo */ + contextInfo?: (proto.IContextInfo|null); + + /** StickerPackMessage packDescription */ + packDescription?: (string|null); + + /** StickerPackMessage mediaKeyTimestamp */ + mediaKeyTimestamp?: (number|Long|null); + + /** StickerPackMessage trayIconFileName */ + trayIconFileName?: (string|null); + + /** StickerPackMessage thumbnailDirectPath */ + thumbnailDirectPath?: (string|null); + + /** StickerPackMessage thumbnailSha256 */ + thumbnailSha256?: (Uint8Array|null); + + /** StickerPackMessage thumbnailEncSha256 */ + thumbnailEncSha256?: (Uint8Array|null); + + /** StickerPackMessage thumbnailHeight */ + thumbnailHeight?: (number|null); + + /** StickerPackMessage thumbnailWidth */ + thumbnailWidth?: (number|null); + + /** StickerPackMessage imageDataHash */ + imageDataHash?: (string|null); + + /** StickerPackMessage stickerPackSize */ + stickerPackSize?: (number|Long|null); + + /** StickerPackMessage stickerPackOrigin */ + stickerPackOrigin?: (proto.Message.StickerPackMessage.StickerPackOrigin|null); + } + + /** Represents a StickerPackMessage. */ + class StickerPackMessage implements IStickerPackMessage { + + /** + * Constructs a new StickerPackMessage. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.IStickerPackMessage); + + /** StickerPackMessage stickerPackId. */ + public stickerPackId?: (string|null); + + /** StickerPackMessage name. */ + public name?: (string|null); + + /** StickerPackMessage publisher. */ + public publisher?: (string|null); + + /** StickerPackMessage stickers. */ + public stickers: proto.Message.StickerPackMessage.ISticker[]; + + /** StickerPackMessage fileLength. */ + public fileLength?: (number|Long|null); + + /** StickerPackMessage fileSha256. */ + public fileSha256?: (Uint8Array|null); + + /** StickerPackMessage fileEncSha256. */ + public fileEncSha256?: (Uint8Array|null); + + /** StickerPackMessage mediaKey. */ + public mediaKey?: (Uint8Array|null); + + /** StickerPackMessage directPath. */ + public directPath?: (string|null); + + /** StickerPackMessage caption. */ + public caption?: (string|null); + + /** StickerPackMessage contextInfo. */ + public contextInfo?: (proto.IContextInfo|null); + + /** StickerPackMessage packDescription. */ + public packDescription?: (string|null); + + /** StickerPackMessage mediaKeyTimestamp. */ + public mediaKeyTimestamp?: (number|Long|null); + + /** StickerPackMessage trayIconFileName. */ + public trayIconFileName?: (string|null); + + /** StickerPackMessage thumbnailDirectPath. */ + public thumbnailDirectPath?: (string|null); + + /** StickerPackMessage thumbnailSha256. */ + public thumbnailSha256?: (Uint8Array|null); + + /** StickerPackMessage thumbnailEncSha256. */ + public thumbnailEncSha256?: (Uint8Array|null); + + /** StickerPackMessage thumbnailHeight. */ + public thumbnailHeight?: (number|null); + + /** StickerPackMessage thumbnailWidth. */ + public thumbnailWidth?: (number|null); + + /** StickerPackMessage imageDataHash. */ + public imageDataHash?: (string|null); + + /** StickerPackMessage stickerPackSize. */ + public stickerPackSize?: (number|Long|null); + + /** StickerPackMessage stickerPackOrigin. */ + public stickerPackOrigin?: (proto.Message.StickerPackMessage.StickerPackOrigin|null); + + /** + * Creates a new StickerPackMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns StickerPackMessage instance + */ + public static create(properties?: proto.Message.IStickerPackMessage): proto.Message.StickerPackMessage; + + /** + * Encodes the specified StickerPackMessage message. Does not implicitly {@link proto.Message.StickerPackMessage.verify|verify} messages. + * @param message StickerPackMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.IStickerPackMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StickerPackMessage message, length delimited. Does not implicitly {@link proto.Message.StickerPackMessage.verify|verify} messages. + * @param message StickerPackMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.IStickerPackMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StickerPackMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StickerPackMessage + * @throws {Error} If the payload is not 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.StickerPackMessage; + + /** + * Decodes a StickerPackMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StickerPackMessage + * @throws {Error} If the payload 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.StickerPackMessage; + + /** + * Verifies a StickerPackMessage message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StickerPackMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StickerPackMessage + */ + public static fromObject(object: { [k: string]: any }): proto.Message.StickerPackMessage; + + /** + * Creates a plain object from a StickerPackMessage message. Also converts values to other types if specified. + * @param message StickerPackMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.StickerPackMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StickerPackMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StickerPackMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace StickerPackMessage { + + /** Properties of a Sticker. */ + interface ISticker { + + /** Sticker fileName */ + fileName?: (string|null); + + /** Sticker isAnimated */ + isAnimated?: (boolean|null); + + /** Sticker emojis */ + emojis?: (string[]|null); + + /** Sticker accessibilityLabel */ + accessibilityLabel?: (string|null); + + /** Sticker isLottie */ + isLottie?: (boolean|null); + + /** Sticker mimetype */ + mimetype?: (string|null); + } + + /** Represents a Sticker. */ + class Sticker implements ISticker { + + /** + * Constructs a new Sticker. + * @param [properties] Properties to set + */ + constructor(properties?: proto.Message.StickerPackMessage.ISticker); + + /** Sticker fileName. */ + public fileName?: (string|null); + + /** Sticker isAnimated. */ + public isAnimated?: (boolean|null); + + /** Sticker emojis. */ + public emojis: string[]; + + /** Sticker accessibilityLabel. */ + public accessibilityLabel?: (string|null); + + /** Sticker isLottie. */ + public isLottie?: (boolean|null); + + /** Sticker mimetype. */ + public mimetype?: (string|null); + + /** + * Creates a new Sticker instance using the specified properties. + * @param [properties] Properties to set + * @returns Sticker instance + */ + public static create(properties?: proto.Message.StickerPackMessage.ISticker): proto.Message.StickerPackMessage.Sticker; + + /** + * Encodes the specified Sticker message. Does not implicitly {@link proto.Message.StickerPackMessage.Sticker.verify|verify} messages. + * @param message Sticker message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.Message.StickerPackMessage.ISticker, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Sticker message, length delimited. Does not implicitly {@link proto.Message.StickerPackMessage.Sticker.verify|verify} messages. + * @param message Sticker message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.Message.StickerPackMessage.ISticker, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Sticker message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Sticker + * @throws {Error} If the payload is not 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.StickerPackMessage.Sticker; + + /** + * Decodes a Sticker message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Sticker + * @throws {Error} If the payload 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.StickerPackMessage.Sticker; + + /** + * Verifies a Sticker message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Sticker message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Sticker + */ + public static fromObject(object: { [k: string]: any }): proto.Message.StickerPackMessage.Sticker; + + /** + * Creates a plain object from a Sticker message. Also converts values to other types if specified. + * @param message Sticker + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Message.StickerPackMessage.Sticker, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Sticker to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Sticker + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** StickerPackOrigin enum. */ + enum StickerPackOrigin { + FIRST_PARTY = 0, + THIRD_PARTY = 1, + USER_CREATED = 2 + } } /** Properties of a StickerSyncRMRMessage. */ @@ -22356,10 +31958,10 @@ export namespace proto { public filehash: string[]; /** StickerSyncRMRMessage rmrSource. */ - public rmrSource: string; + public rmrSource?: (string|null); /** StickerSyncRMRMessage requestTimestamp. */ - public requestTimestamp: (number|Long); + public requestTimestamp?: (number|Long|null); /** * Creates a new StickerSyncRMRMessage instance using the specified properties. @@ -22430,6 +32032,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StickerSyncRMRMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a TemplateButtonReplyMessage. */ @@ -22461,19 +32070,19 @@ export namespace proto { constructor(properties?: proto.Message.ITemplateButtonReplyMessage); /** TemplateButtonReplyMessage selectedId. */ - public selectedId: string; + public selectedId?: (string|null); /** TemplateButtonReplyMessage selectedDisplayText. */ - public selectedDisplayText: string; + public selectedDisplayText?: (string|null); /** TemplateButtonReplyMessage contextInfo. */ public contextInfo?: (proto.IContextInfo|null); /** TemplateButtonReplyMessage selectedIndex. */ - public selectedIndex: number; + public selectedIndex?: (number|null); /** TemplateButtonReplyMessage selectedCarouselCardIndex. */ - public selectedCarouselCardIndex: number; + public selectedCarouselCardIndex?: (number|null); /** * Creates a new TemplateButtonReplyMessage instance using the specified properties. @@ -22544,6 +32153,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TemplateButtonReplyMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a TemplateMessage. */ @@ -22584,7 +32200,7 @@ export namespace proto { public hydratedTemplate?: (proto.Message.TemplateMessage.IHydratedFourRowTemplate|null); /** TemplateMessage templateId. */ - public templateId: string; + public templateId?: (string|null); /** TemplateMessage fourRowTemplate. */ public fourRowTemplate?: (proto.Message.TemplateMessage.IFourRowTemplate|null); @@ -22667,6 +32283,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TemplateMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace TemplateMessage { @@ -22804,6 +32427,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FourRowTemplate + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a HydratedFourRowTemplate. */ @@ -22850,19 +32480,19 @@ export namespace proto { constructor(properties?: proto.Message.TemplateMessage.IHydratedFourRowTemplate); /** HydratedFourRowTemplate hydratedContentText. */ - public hydratedContentText: string; + public hydratedContentText?: (string|null); /** HydratedFourRowTemplate hydratedFooterText. */ - public hydratedFooterText: string; + public hydratedFooterText?: (string|null); /** HydratedFourRowTemplate hydratedButtons. */ public hydratedButtons: proto.IHydratedTemplateButton[]; /** HydratedFourRowTemplate templateId. */ - public templateId: string; + public templateId?: (string|null); /** HydratedFourRowTemplate maskLinkedDevices. */ - public maskLinkedDevices: boolean; + public maskLinkedDevices?: (boolean|null); /** HydratedFourRowTemplate documentMessage. */ public documentMessage?: (proto.Message.IDocumentMessage|null); @@ -22951,6 +32581,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HydratedFourRowTemplate + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -23028,6 +32665,15 @@ export namespace proto { /** VideoMessage annotations */ annotations?: (proto.IInteractiveAnnotation[]|null); + + /** VideoMessage accessibilityLabel */ + accessibilityLabel?: (string|null); + + /** VideoMessage processedVideos */ + processedVideos?: (proto.IProcessedVideo[]|null); + + /** VideoMessage externalShareFullVideoDurationInSeconds */ + externalShareFullVideoDurationInSeconds?: (number|null); } /** Represents a VideoMessage. */ @@ -23040,77 +32686,86 @@ export namespace proto { constructor(properties?: proto.Message.IVideoMessage); /** VideoMessage url. */ - public url: string; + public url?: (string|null); /** VideoMessage mimetype. */ - public mimetype: string; + public mimetype?: (string|null); /** VideoMessage fileSha256. */ - public fileSha256: Uint8Array; + public fileSha256?: (Uint8Array|null); /** VideoMessage fileLength. */ - public fileLength: (number|Long); + public fileLength?: (number|Long|null); /** VideoMessage seconds. */ - public seconds: number; + public seconds?: (number|null); /** VideoMessage mediaKey. */ - public mediaKey: Uint8Array; + public mediaKey?: (Uint8Array|null); /** VideoMessage caption. */ - public caption: string; + public caption?: (string|null); /** VideoMessage gifPlayback. */ - public gifPlayback: boolean; + public gifPlayback?: (boolean|null); /** VideoMessage height. */ - public height: number; + public height?: (number|null); /** VideoMessage width. */ - public width: number; + public width?: (number|null); /** VideoMessage fileEncSha256. */ - public fileEncSha256: Uint8Array; + public fileEncSha256?: (Uint8Array|null); /** VideoMessage interactiveAnnotations. */ public interactiveAnnotations: proto.IInteractiveAnnotation[]; /** VideoMessage directPath. */ - public directPath: string; + public directPath?: (string|null); /** VideoMessage mediaKeyTimestamp. */ - public mediaKeyTimestamp: (number|Long); + public mediaKeyTimestamp?: (number|Long|null); /** VideoMessage jpegThumbnail. */ - public jpegThumbnail: Uint8Array; + public jpegThumbnail?: (Uint8Array|null); /** VideoMessage contextInfo. */ public contextInfo?: (proto.IContextInfo|null); /** VideoMessage streamingSidecar. */ - public streamingSidecar: Uint8Array; + public streamingSidecar?: (Uint8Array|null); /** VideoMessage gifAttribution. */ - public gifAttribution: proto.Message.VideoMessage.Attribution; + public gifAttribution?: (proto.Message.VideoMessage.Attribution|null); /** VideoMessage viewOnce. */ - public viewOnce: boolean; + public viewOnce?: (boolean|null); /** VideoMessage thumbnailDirectPath. */ - public thumbnailDirectPath: string; + public thumbnailDirectPath?: (string|null); /** VideoMessage thumbnailSha256. */ - public thumbnailSha256: Uint8Array; + public thumbnailSha256?: (Uint8Array|null); /** VideoMessage thumbnailEncSha256. */ - public thumbnailEncSha256: Uint8Array; + public thumbnailEncSha256?: (Uint8Array|null); /** VideoMessage staticUrl. */ - public staticUrl: string; + public staticUrl?: (string|null); /** VideoMessage annotations. */ public annotations: proto.IInteractiveAnnotation[]; + /** VideoMessage accessibilityLabel. */ + public accessibilityLabel?: (string|null); + + /** VideoMessage processedVideos. */ + public processedVideos: proto.IProcessedVideo[]; + + /** VideoMessage externalShareFullVideoDurationInSeconds. */ + public externalShareFullVideoDurationInSeconds?: (number|null); + /** * Creates a new VideoMessage instance using the specified properties. * @param [properties] Properties to set @@ -23180,6 +32835,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VideoMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace VideoMessage { @@ -23193,11 +32855,165 @@ export namespace proto { } } + /** Properties of a MessageAddOn. */ + interface IMessageAddOn { + + /** MessageAddOn messageAddOnType */ + messageAddOnType?: (proto.MessageAddOn.MessageAddOnType|null); + + /** MessageAddOn messageAddOn */ + messageAddOn?: (proto.IMessage|null); + + /** MessageAddOn senderTimestampMs */ + senderTimestampMs?: (number|Long|null); + + /** MessageAddOn serverTimestampMs */ + serverTimestampMs?: (number|Long|null); + + /** MessageAddOn status */ + status?: (proto.WebMessageInfo.Status|null); + + /** MessageAddOn addOnContextInfo */ + addOnContextInfo?: (proto.IMessageAddOnContextInfo|null); + + /** MessageAddOn messageAddOnKey */ + messageAddOnKey?: (proto.IMessageKey|null); + + /** MessageAddOn legacyMessage */ + legacyMessage?: (proto.ILegacyMessage|null); + } + + /** Represents a MessageAddOn. */ + class MessageAddOn implements IMessageAddOn { + + /** + * Constructs a new MessageAddOn. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IMessageAddOn); + + /** MessageAddOn messageAddOnType. */ + public messageAddOnType?: (proto.MessageAddOn.MessageAddOnType|null); + + /** MessageAddOn messageAddOn. */ + public messageAddOn?: (proto.IMessage|null); + + /** MessageAddOn senderTimestampMs. */ + public senderTimestampMs?: (number|Long|null); + + /** MessageAddOn serverTimestampMs. */ + public serverTimestampMs?: (number|Long|null); + + /** MessageAddOn status. */ + public status?: (proto.WebMessageInfo.Status|null); + + /** MessageAddOn addOnContextInfo. */ + public addOnContextInfo?: (proto.IMessageAddOnContextInfo|null); + + /** MessageAddOn messageAddOnKey. */ + public messageAddOnKey?: (proto.IMessageKey|null); + + /** MessageAddOn legacyMessage. */ + public legacyMessage?: (proto.ILegacyMessage|null); + + /** + * Creates a new MessageAddOn instance using the specified properties. + * @param [properties] Properties to set + * @returns MessageAddOn instance + */ + public static create(properties?: proto.IMessageAddOn): proto.MessageAddOn; + + /** + * Encodes the specified MessageAddOn message. Does not implicitly {@link proto.MessageAddOn.verify|verify} messages. + * @param message MessageAddOn message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IMessageAddOn, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MessageAddOn message, length delimited. Does not implicitly {@link proto.MessageAddOn.verify|verify} messages. + * @param message MessageAddOn message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IMessageAddOn, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MessageAddOn message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MessageAddOn + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.MessageAddOn; + + /** + * Decodes a MessageAddOn message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MessageAddOn + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.MessageAddOn; + + /** + * Verifies a MessageAddOn message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MessageAddOn message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MessageAddOn + */ + public static fromObject(object: { [k: string]: any }): proto.MessageAddOn; + + /** + * Creates a plain object from a MessageAddOn message. Also converts values to other types if specified. + * @param message MessageAddOn + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.MessageAddOn, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MessageAddOn to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MessageAddOn + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MessageAddOn { + + /** MessageAddOnType enum. */ + enum MessageAddOnType { + UNDEFINED = 0, + REACTION = 1, + EVENT_RESPONSE = 2, + POLL_UPDATE = 3, + PIN_IN_CHAT = 4 + } + } + /** Properties of a MessageAddOnContextInfo. */ interface IMessageAddOnContextInfo { /** MessageAddOnContextInfo messageAddOnDurationInSecs */ messageAddOnDurationInSecs?: (number|null); + + /** MessageAddOnContextInfo messageAddOnExpiryType */ + messageAddOnExpiryType?: (proto.MessageContextInfo.MessageAddonExpiryType|null); } /** Represents a MessageAddOnContextInfo. */ @@ -23210,7 +33026,10 @@ export namespace proto { constructor(properties?: proto.IMessageAddOnContextInfo); /** MessageAddOnContextInfo messageAddOnDurationInSecs. */ - public messageAddOnDurationInSecs: number; + public messageAddOnDurationInSecs?: (number|null); + + /** MessageAddOnContextInfo messageAddOnExpiryType. */ + public messageAddOnExpiryType?: (proto.MessageContextInfo.MessageAddonExpiryType|null); /** * Creates a new MessageAddOnContextInfo instance using the specified properties. @@ -23281,6 +33100,141 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MessageAddOnContextInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MessageAssociation. */ + interface IMessageAssociation { + + /** MessageAssociation associationType */ + associationType?: (proto.MessageAssociation.AssociationType|null); + + /** MessageAssociation parentMessageKey */ + parentMessageKey?: (proto.IMessageKey|null); + + /** MessageAssociation messageIndex */ + messageIndex?: (number|null); + } + + /** Represents a MessageAssociation. */ + class MessageAssociation implements IMessageAssociation { + + /** + * Constructs a new MessageAssociation. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IMessageAssociation); + + /** MessageAssociation associationType. */ + public associationType?: (proto.MessageAssociation.AssociationType|null); + + /** MessageAssociation parentMessageKey. */ + public parentMessageKey?: (proto.IMessageKey|null); + + /** MessageAssociation messageIndex. */ + public messageIndex?: (number|null); + + /** + * Creates a new MessageAssociation instance using the specified properties. + * @param [properties] Properties to set + * @returns MessageAssociation instance + */ + public static create(properties?: proto.IMessageAssociation): proto.MessageAssociation; + + /** + * Encodes the specified MessageAssociation message. Does not implicitly {@link proto.MessageAssociation.verify|verify} messages. + * @param message MessageAssociation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IMessageAssociation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MessageAssociation message, length delimited. Does not implicitly {@link proto.MessageAssociation.verify|verify} messages. + * @param message MessageAssociation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IMessageAssociation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MessageAssociation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MessageAssociation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.MessageAssociation; + + /** + * Decodes a MessageAssociation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MessageAssociation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.MessageAssociation; + + /** + * Verifies a MessageAssociation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MessageAssociation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MessageAssociation + */ + public static fromObject(object: { [k: string]: any }): proto.MessageAssociation; + + /** + * Creates a plain object from a MessageAssociation message. Also converts values to other types if specified. + * @param message MessageAssociation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.MessageAssociation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MessageAssociation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MessageAssociation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MessageAssociation { + + /** AssociationType enum. */ + enum AssociationType { + UNKNOWN = 0, + MEDIA_ALBUM = 1, + BOT_PLUGIN = 2, + EVENT_COVER_IMAGE = 3, + STATUS_POLL = 4, + HD_VIDEO_DUAL_UPLOAD = 5, + STATUS_TAPPABLE_MESSAGE = 6, + MEDIA_POLL = 7, + STATUS_ADD_YOURS = 8, + STATUS_NOTIFICATION = 9, + HD_IMAGE_DUAL_UPLOAD = 10, + STICKER_ANNOTATION = 11 + } } /** Properties of a MessageContextInfo. */ @@ -23309,6 +33263,18 @@ export namespace proto { /** MessageContextInfo reportingTokenVersion */ reportingTokenVersion?: (number|null); + + /** MessageContextInfo messageAddOnExpiryType */ + messageAddOnExpiryType?: (proto.MessageContextInfo.MessageAddonExpiryType|null); + + /** MessageContextInfo messageAssociation */ + messageAssociation?: (proto.IMessageAssociation|null); + + /** MessageContextInfo capiCreatedGroup */ + capiCreatedGroup?: (boolean|null); + + /** MessageContextInfo supportPayload */ + supportPayload?: (string|null); } /** Represents a MessageContextInfo. */ @@ -23324,25 +33290,37 @@ export namespace proto { public deviceListMetadata?: (proto.IDeviceListMetadata|null); /** MessageContextInfo deviceListMetadataVersion. */ - public deviceListMetadataVersion: number; + public deviceListMetadataVersion?: (number|null); /** MessageContextInfo messageSecret. */ - public messageSecret: Uint8Array; + public messageSecret?: (Uint8Array|null); /** MessageContextInfo paddingBytes. */ - public paddingBytes: Uint8Array; + public paddingBytes?: (Uint8Array|null); /** MessageContextInfo messageAddOnDurationInSecs. */ - public messageAddOnDurationInSecs: number; + public messageAddOnDurationInSecs?: (number|null); /** MessageContextInfo botMessageSecret. */ - public botMessageSecret: Uint8Array; + public botMessageSecret?: (Uint8Array|null); /** MessageContextInfo botMetadata. */ public botMetadata?: (proto.IBotMetadata|null); /** MessageContextInfo reportingTokenVersion. */ - public reportingTokenVersion: number; + public reportingTokenVersion?: (number|null); + + /** MessageContextInfo messageAddOnExpiryType. */ + public messageAddOnExpiryType?: (proto.MessageContextInfo.MessageAddonExpiryType|null); + + /** MessageContextInfo messageAssociation. */ + public messageAssociation?: (proto.IMessageAssociation|null); + + /** MessageContextInfo capiCreatedGroup. */ + public capiCreatedGroup?: (boolean|null); + + /** MessageContextInfo supportPayload. */ + public supportPayload?: (string|null); /** * Creates a new MessageContextInfo instance using the specified properties. @@ -23413,6 +33391,22 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MessageContextInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MessageContextInfo { + + /** MessageAddonExpiryType enum. */ + enum MessageAddonExpiryType { + STATIC = 1, + DEPENDENT_ON_PARENT = 2 + } } /** Properties of a MessageKey. */ @@ -23441,16 +33435,16 @@ export namespace proto { constructor(properties?: proto.IMessageKey); /** MessageKey remoteJid. */ - public remoteJid: string; + public remoteJid?: (string|null); /** MessageKey fromMe. */ - public fromMe: boolean; + public fromMe?: (boolean|null); /** MessageKey id. */ - public id: string; + public id?: (string|null); /** MessageKey participant. */ - public participant: string; + public participant?: (string|null); /** * Creates a new MessageKey instance using the specified properties. @@ -23521,6 +33515,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MessageKey + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a MessageSecretMessage. */ @@ -23546,13 +33547,13 @@ export namespace proto { constructor(properties?: proto.IMessageSecretMessage); /** MessageSecretMessage version. */ - public version: number; + public version?: (number|null); /** MessageSecretMessage encIv. */ - public encIv: Uint8Array; + public encIv?: (Uint8Array|null); /** MessageSecretMessage encPayload. */ - public encPayload: Uint8Array; + public encPayload?: (Uint8Array|null); /** * Creates a new MessageSecretMessage instance using the specified properties. @@ -23623,6 +33624,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MessageSecretMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Money. */ @@ -23648,13 +33656,13 @@ export namespace proto { constructor(properties?: proto.IMoney); /** Money value. */ - public value: (number|Long); + public value?: (number|Long|null); /** Money offset. */ - public offset: number; + public offset?: (number|null); /** Money currencyCode. */ - public currencyCode: string; + public currencyCode?: (string|null); /** * Creates a new Money instance using the specified properties. @@ -23725,6 +33733,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Money + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a MsgOpaqueData. */ @@ -23751,9 +33766,6 @@ export namespace proto { /** MsgOpaqueData paymentNoteMsgBody */ paymentNoteMsgBody?: (string|null); - /** MsgOpaqueData canonicalUrl */ - canonicalUrl?: (string|null); - /** MsgOpaqueData matchedText */ matchedText?: (string|null); @@ -23799,6 +33811,12 @@ export namespace proto { /** MsgOpaqueData isSentCagPollCreation */ isSentCagPollCreation?: (boolean|null); + /** MsgOpaqueData pollContentType */ + pollContentType?: (proto.MsgOpaqueData.PollContentType|null); + + /** MsgOpaqueData pollVotesSnapshot */ + pollVotesSnapshot?: (proto.MsgOpaqueData.IPollVotesSnapshot|null); + /** MsgOpaqueData encReactionTargetMessageKey */ encReactionTargetMessageKey?: (string|null); @@ -23819,6 +33837,27 @@ export namespace proto { /** MsgOpaqueData encIv */ encIv?: (Uint8Array|null); + + /** MsgOpaqueData eventName */ + eventName?: (string|null); + + /** MsgOpaqueData isEventCanceled */ + isEventCanceled?: (boolean|null); + + /** MsgOpaqueData eventDescription */ + eventDescription?: (string|null); + + /** MsgOpaqueData eventJoinLink */ + eventJoinLink?: (string|null); + + /** MsgOpaqueData eventStartTime */ + eventStartTime?: (number|Long|null); + + /** MsgOpaqueData eventLocation */ + eventLocation?: (proto.MsgOpaqueData.IEventLocation|null); + + /** MsgOpaqueData eventEndTime */ + eventEndTime?: (number|Long|null); } /** Represents a MsgOpaqueData. */ @@ -23831,94 +33870,118 @@ export namespace proto { constructor(properties?: proto.IMsgOpaqueData); /** MsgOpaqueData body. */ - public body: string; + public body?: (string|null); /** MsgOpaqueData caption. */ - public caption: string; + public caption?: (string|null); /** MsgOpaqueData lng. */ - public lng: number; + public lng?: (number|null); /** MsgOpaqueData isLive. */ - public isLive: boolean; + public isLive?: (boolean|null); /** MsgOpaqueData lat. */ - public lat: number; + public lat?: (number|null); /** MsgOpaqueData paymentAmount1000. */ - public paymentAmount1000: number; + public paymentAmount1000?: (number|null); /** MsgOpaqueData paymentNoteMsgBody. */ - public paymentNoteMsgBody: string; - - /** MsgOpaqueData canonicalUrl. */ - public canonicalUrl: string; + public paymentNoteMsgBody?: (string|null); /** MsgOpaqueData matchedText. */ - public matchedText: string; + public matchedText?: (string|null); /** MsgOpaqueData title. */ - public title: string; + public title?: (string|null); /** MsgOpaqueData description. */ - public description: string; + public description?: (string|null); /** MsgOpaqueData futureproofBuffer. */ - public futureproofBuffer: Uint8Array; + public futureproofBuffer?: (Uint8Array|null); /** MsgOpaqueData clientUrl. */ - public clientUrl: string; + public clientUrl?: (string|null); /** MsgOpaqueData loc. */ - public loc: string; + public loc?: (string|null); /** MsgOpaqueData pollName. */ - public pollName: string; + public pollName?: (string|null); /** MsgOpaqueData pollOptions. */ public pollOptions: proto.MsgOpaqueData.IPollOption[]; /** MsgOpaqueData pollSelectableOptionsCount. */ - public pollSelectableOptionsCount: number; + public pollSelectableOptionsCount?: (number|null); /** MsgOpaqueData messageSecret. */ - public messageSecret: Uint8Array; + public messageSecret?: (Uint8Array|null); /** MsgOpaqueData originalSelfAuthor. */ - public originalSelfAuthor: string; + public originalSelfAuthor?: (string|null); /** MsgOpaqueData senderTimestampMs. */ - public senderTimestampMs: (number|Long); + public senderTimestampMs?: (number|Long|null); /** MsgOpaqueData pollUpdateParentKey. */ - public pollUpdateParentKey: string; + public pollUpdateParentKey?: (string|null); /** MsgOpaqueData encPollVote. */ public encPollVote?: (proto.IPollEncValue|null); /** MsgOpaqueData isSentCagPollCreation. */ - public isSentCagPollCreation: boolean; + public isSentCagPollCreation?: (boolean|null); + + /** MsgOpaqueData pollContentType. */ + public pollContentType?: (proto.MsgOpaqueData.PollContentType|null); + + /** MsgOpaqueData pollVotesSnapshot. */ + public pollVotesSnapshot?: (proto.MsgOpaqueData.IPollVotesSnapshot|null); /** MsgOpaqueData encReactionTargetMessageKey. */ - public encReactionTargetMessageKey: string; + public encReactionTargetMessageKey?: (string|null); /** MsgOpaqueData encReactionEncPayload. */ - public encReactionEncPayload: Uint8Array; + public encReactionEncPayload?: (Uint8Array|null); /** MsgOpaqueData encReactionEncIv. */ - public encReactionEncIv: Uint8Array; + public encReactionEncIv?: (Uint8Array|null); /** MsgOpaqueData botMessageSecret. */ - public botMessageSecret: Uint8Array; + public botMessageSecret?: (Uint8Array|null); /** MsgOpaqueData targetMessageKey. */ - public targetMessageKey: string; + public targetMessageKey?: (string|null); /** MsgOpaqueData encPayload. */ - public encPayload: Uint8Array; + public encPayload?: (Uint8Array|null); /** MsgOpaqueData encIv. */ - public encIv: Uint8Array; + public encIv?: (Uint8Array|null); + + /** MsgOpaqueData eventName. */ + public eventName?: (string|null); + + /** MsgOpaqueData isEventCanceled. */ + public isEventCanceled?: (boolean|null); + + /** MsgOpaqueData eventDescription. */ + public eventDescription?: (string|null); + + /** MsgOpaqueData eventJoinLink. */ + public eventJoinLink?: (string|null); + + /** MsgOpaqueData eventStartTime. */ + public eventStartTime?: (number|Long|null); + + /** MsgOpaqueData eventLocation. */ + public eventLocation?: (proto.MsgOpaqueData.IEventLocation|null); + + /** MsgOpaqueData eventEndTime. */ + public eventEndTime?: (number|Long|null); /** * Creates a new MsgOpaqueData instance using the specified properties. @@ -23989,15 +34052,159 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MsgOpaqueData + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace MsgOpaqueData { + /** Properties of an EventLocation. */ + interface IEventLocation { + + /** EventLocation degreesLatitude */ + degreesLatitude?: (number|null); + + /** EventLocation degreesLongitude */ + degreesLongitude?: (number|null); + + /** EventLocation name */ + name?: (string|null); + + /** EventLocation address */ + address?: (string|null); + + /** EventLocation url */ + url?: (string|null); + + /** EventLocation jpegThumbnail */ + jpegThumbnail?: (Uint8Array|null); + } + + /** Represents an EventLocation. */ + class EventLocation implements IEventLocation { + + /** + * Constructs a new EventLocation. + * @param [properties] Properties to set + */ + constructor(properties?: proto.MsgOpaqueData.IEventLocation); + + /** EventLocation degreesLatitude. */ + public degreesLatitude?: (number|null); + + /** EventLocation degreesLongitude. */ + public degreesLongitude?: (number|null); + + /** EventLocation name. */ + public name?: (string|null); + + /** EventLocation address. */ + public address?: (string|null); + + /** EventLocation url. */ + public url?: (string|null); + + /** EventLocation jpegThumbnail. */ + public jpegThumbnail?: (Uint8Array|null); + + /** + * Creates a new EventLocation instance using the specified properties. + * @param [properties] Properties to set + * @returns EventLocation instance + */ + public static create(properties?: proto.MsgOpaqueData.IEventLocation): proto.MsgOpaqueData.EventLocation; + + /** + * Encodes the specified EventLocation message. Does not implicitly {@link proto.MsgOpaqueData.EventLocation.verify|verify} messages. + * @param message EventLocation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.MsgOpaqueData.IEventLocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EventLocation message, length delimited. Does not implicitly {@link proto.MsgOpaqueData.EventLocation.verify|verify} messages. + * @param message EventLocation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.MsgOpaqueData.IEventLocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EventLocation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EventLocation + * @throws {Error} If the payload is not 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.EventLocation; + + /** + * Decodes an EventLocation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EventLocation + * @throws {Error} If the payload 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.EventLocation; + + /** + * Verifies an EventLocation message. + * @param message Plain 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 EventLocation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EventLocation + */ + public static fromObject(object: { [k: string]: any }): proto.MsgOpaqueData.EventLocation; + + /** + * Creates a plain object from an EventLocation message. Also converts values to other types if specified. + * @param message EventLocation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.MsgOpaqueData.EventLocation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EventLocation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EventLocation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** PollContentType enum. */ + enum PollContentType { + UNKNOWN = 0, + TEXT = 1, + IMAGE = 2 + } + /** Properties of a PollOption. */ interface IPollOption { /** PollOption name */ name?: (string|null); + + /** PollOption hash */ + hash?: (string|null); } /** Represents a PollOption. */ @@ -24010,7 +34217,10 @@ export namespace proto { constructor(properties?: proto.MsgOpaqueData.IPollOption); /** PollOption name. */ - public name: string; + public name?: (string|null); + + /** PollOption hash. */ + public hash?: (string|null); /** * Creates a new PollOption instance using the specified properties. @@ -24081,6 +34291,213 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PollOption + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PollVoteSnapshot. */ + interface IPollVoteSnapshot { + + /** PollVoteSnapshot option */ + option?: (proto.MsgOpaqueData.IPollOption|null); + + /** PollVoteSnapshot optionVoteCount */ + optionVoteCount?: (number|null); + } + + /** Represents a PollVoteSnapshot. */ + class PollVoteSnapshot implements IPollVoteSnapshot { + + /** + * Constructs a new PollVoteSnapshot. + * @param [properties] Properties to set + */ + constructor(properties?: proto.MsgOpaqueData.IPollVoteSnapshot); + + /** PollVoteSnapshot option. */ + public option?: (proto.MsgOpaqueData.IPollOption|null); + + /** PollVoteSnapshot optionVoteCount. */ + public optionVoteCount?: (number|null); + + /** + * Creates a new PollVoteSnapshot instance using the specified properties. + * @param [properties] Properties to set + * @returns PollVoteSnapshot instance + */ + public static create(properties?: proto.MsgOpaqueData.IPollVoteSnapshot): proto.MsgOpaqueData.PollVoteSnapshot; + + /** + * Encodes the specified PollVoteSnapshot message. Does not implicitly {@link proto.MsgOpaqueData.PollVoteSnapshot.verify|verify} messages. + * @param message PollVoteSnapshot message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.MsgOpaqueData.IPollVoteSnapshot, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PollVoteSnapshot message, length delimited. Does not implicitly {@link proto.MsgOpaqueData.PollVoteSnapshot.verify|verify} messages. + * @param message PollVoteSnapshot message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.MsgOpaqueData.IPollVoteSnapshot, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PollVoteSnapshot message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PollVoteSnapshot + * @throws {Error} If the payload is not 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.PollVoteSnapshot; + + /** + * Decodes a PollVoteSnapshot message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PollVoteSnapshot + * @throws {Error} If the payload 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.PollVoteSnapshot; + + /** + * Verifies a PollVoteSnapshot message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PollVoteSnapshot message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PollVoteSnapshot + */ + public static fromObject(object: { [k: string]: any }): proto.MsgOpaqueData.PollVoteSnapshot; + + /** + * Creates a plain object from a PollVoteSnapshot message. Also converts values to other types if specified. + * @param message PollVoteSnapshot + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.MsgOpaqueData.PollVoteSnapshot, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PollVoteSnapshot to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PollVoteSnapshot + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PollVotesSnapshot. */ + interface IPollVotesSnapshot { + + /** PollVotesSnapshot pollVotes */ + pollVotes?: (proto.MsgOpaqueData.IPollVoteSnapshot[]|null); + } + + /** Represents a PollVotesSnapshot. */ + class PollVotesSnapshot implements IPollVotesSnapshot { + + /** + * Constructs a new PollVotesSnapshot. + * @param [properties] Properties to set + */ + constructor(properties?: proto.MsgOpaqueData.IPollVotesSnapshot); + + /** PollVotesSnapshot pollVotes. */ + public pollVotes: proto.MsgOpaqueData.IPollVoteSnapshot[]; + + /** + * Creates a new PollVotesSnapshot instance using the specified properties. + * @param [properties] Properties to set + * @returns PollVotesSnapshot instance + */ + public static create(properties?: proto.MsgOpaqueData.IPollVotesSnapshot): proto.MsgOpaqueData.PollVotesSnapshot; + + /** + * Encodes the specified PollVotesSnapshot message. Does not implicitly {@link proto.MsgOpaqueData.PollVotesSnapshot.verify|verify} messages. + * @param message PollVotesSnapshot message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.MsgOpaqueData.IPollVotesSnapshot, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PollVotesSnapshot message, length delimited. Does not implicitly {@link proto.MsgOpaqueData.PollVotesSnapshot.verify|verify} messages. + * @param message PollVotesSnapshot message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.MsgOpaqueData.IPollVotesSnapshot, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PollVotesSnapshot message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PollVotesSnapshot + * @throws {Error} If the payload is not 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.PollVotesSnapshot; + + /** + * Decodes a PollVotesSnapshot message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PollVotesSnapshot + * @throws {Error} If the payload 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.PollVotesSnapshot; + + /** + * Verifies a PollVotesSnapshot message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PollVotesSnapshot message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PollVotesSnapshot + */ + public static fromObject(object: { [k: string]: any }): proto.MsgOpaqueData.PollVotesSnapshot; + + /** + * Creates a plain object from a PollVotesSnapshot message. Also converts values to other types if specified. + * @param message PollVotesSnapshot + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.MsgOpaqueData.PollVotesSnapshot, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PollVotesSnapshot to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PollVotesSnapshot + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -24178,6 +34595,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MsgRowOpaqueData + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a NoiseCertificate. */ @@ -24200,10 +34624,10 @@ export namespace proto { constructor(properties?: proto.INoiseCertificate); /** NoiseCertificate details. */ - public details: Uint8Array; + public details?: (Uint8Array|null); /** NoiseCertificate signature. */ - public signature: Uint8Array; + public signature?: (Uint8Array|null); /** * Creates a new NoiseCertificate instance using the specified properties. @@ -24274,6 +34698,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NoiseCertificate + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace NoiseCertificate { @@ -24307,19 +34738,19 @@ export namespace proto { constructor(properties?: proto.NoiseCertificate.IDetails); /** Details serial. */ - public serial: number; + public serial?: (number|null); /** Details issuer. */ - public issuer: string; + public issuer?: (string|null); /** Details expires. */ - public expires: (number|Long); + public expires?: (number|Long|null); /** Details subject. */ - public subject: string; + public subject?: (string|null); /** Details key. */ - public key: Uint8Array; + public key?: (Uint8Array|null); /** * Creates a new Details instance using the specified properties. @@ -24390,6 +34821,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Details + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -24425,10 +34863,10 @@ export namespace proto { public message?: (proto.IMessage|null); /** NotificationMessageInfo messageTimestamp. */ - public messageTimestamp: (number|Long); + public messageTimestamp?: (number|Long|null); /** NotificationMessageInfo participant. */ - public participant: string; + public participant?: (string|null); /** * Creates a new NotificationMessageInfo instance using the specified properties. @@ -24499,6 +34937,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NotificationMessageInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a NotificationSettings. */ @@ -24533,22 +34978,22 @@ export namespace proto { constructor(properties?: proto.INotificationSettings); /** NotificationSettings messageVibrate. */ - public messageVibrate: string; + public messageVibrate?: (string|null); /** NotificationSettings messagePopup. */ - public messagePopup: string; + public messagePopup?: (string|null); /** NotificationSettings messageLight. */ - public messageLight: string; + public messageLight?: (string|null); /** NotificationSettings lowPriorityNotifications. */ - public lowPriorityNotifications: boolean; + public lowPriorityNotifications?: (boolean|null); /** NotificationSettings reactionsMuted. */ - public reactionsMuted: boolean; + public reactionsMuted?: (boolean|null); /** NotificationSettings callVibrate. */ - public callVibrate: string; + public callVibrate?: (string|null); /** * Creates a new NotificationSettings instance using the specified properties. @@ -24619,6 +35064,122 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NotificationSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PairingRequest. */ + interface IPairingRequest { + + /** PairingRequest companionPublicKey */ + companionPublicKey?: (Uint8Array|null); + + /** PairingRequest companionIdentityKey */ + companionIdentityKey?: (Uint8Array|null); + + /** PairingRequest advSecret */ + advSecret?: (Uint8Array|null); + } + + /** Represents a PairingRequest. */ + class PairingRequest implements IPairingRequest { + + /** + * Constructs a new PairingRequest. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IPairingRequest); + + /** PairingRequest companionPublicKey. */ + public companionPublicKey?: (Uint8Array|null); + + /** PairingRequest companionIdentityKey. */ + public companionIdentityKey?: (Uint8Array|null); + + /** PairingRequest advSecret. */ + public advSecret?: (Uint8Array|null); + + /** + * Creates a new PairingRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns PairingRequest instance + */ + public static create(properties?: proto.IPairingRequest): proto.PairingRequest; + + /** + * Encodes the specified PairingRequest message. Does not implicitly {@link proto.PairingRequest.verify|verify} messages. + * @param message PairingRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IPairingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PairingRequest message, length delimited. Does not implicitly {@link proto.PairingRequest.verify|verify} messages. + * @param message PairingRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IPairingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PairingRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PairingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.PairingRequest; + + /** + * Decodes a PairingRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PairingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.PairingRequest; + + /** + * Verifies a PairingRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PairingRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PairingRequest + */ + public static fromObject(object: { [k: string]: any }): proto.PairingRequest; + + /** + * Creates a plain object from a PairingRequest message. Also converts values to other types if specified. + * @param message PairingRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.PairingRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PairingRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PairingRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a PastParticipant. */ @@ -24644,13 +35205,13 @@ export namespace proto { constructor(properties?: proto.IPastParticipant); /** PastParticipant userJid. */ - public userJid: string; + public userJid?: (string|null); /** PastParticipant leaveReason. */ - public leaveReason: proto.PastParticipant.LeaveReason; + public leaveReason?: (proto.PastParticipant.LeaveReason|null); /** PastParticipant leaveTs. */ - public leaveTs: (number|Long); + public leaveTs?: (number|Long|null); /** * Creates a new PastParticipant instance using the specified properties. @@ -24721,6 +35282,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PastParticipant + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace PastParticipant { @@ -24752,7 +35320,7 @@ export namespace proto { constructor(properties?: proto.IPastParticipants); /** PastParticipants groupJid. */ - public groupJid: string; + public groupJid?: (string|null); /** PastParticipants pastParticipants. */ public pastParticipants: proto.IPastParticipant[]; @@ -24826,6 +35394,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PastParticipants + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a PatchDebugData. */ @@ -24875,37 +35450,37 @@ export namespace proto { constructor(properties?: proto.IPatchDebugData); /** PatchDebugData currentLthash. */ - public currentLthash: Uint8Array; + public currentLthash?: (Uint8Array|null); /** PatchDebugData newLthash. */ - public newLthash: Uint8Array; + public newLthash?: (Uint8Array|null); /** PatchDebugData patchVersion. */ - public patchVersion: Uint8Array; + public patchVersion?: (Uint8Array|null); /** PatchDebugData collectionName. */ - public collectionName: Uint8Array; + public collectionName?: (Uint8Array|null); /** PatchDebugData firstFourBytesFromAHashOfSnapshotMacKey. */ - public firstFourBytesFromAHashOfSnapshotMacKey: Uint8Array; + public firstFourBytesFromAHashOfSnapshotMacKey?: (Uint8Array|null); /** PatchDebugData newLthashSubtract. */ - public newLthashSubtract: Uint8Array; + public newLthashSubtract?: (Uint8Array|null); /** PatchDebugData numberAdd. */ - public numberAdd: number; + public numberAdd?: (number|null); /** PatchDebugData numberRemove. */ - public numberRemove: number; + public numberRemove?: (number|null); /** PatchDebugData numberOverride. */ - public numberOverride: number; + public numberOverride?: (number|null); /** PatchDebugData senderPlatform. */ - public senderPlatform: proto.PatchDebugData.Platform; + public senderPlatform?: (proto.PatchDebugData.Platform|null); /** PatchDebugData isSenderPrimary. */ - public isSenderPrimary: boolean; + public isSenderPrimary?: (boolean|null); /** * Creates a new PatchDebugData instance using the specified properties. @@ -24976,6 +35551,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PatchDebugData + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace PatchDebugData { @@ -24988,7 +35570,9 @@ export namespace proto { SMBI = 3, WEB = 4, UWP = 5, - DARWIN = 6 + DARWIN = 6, + IPAD = 7, + WEAROS = 8 } } @@ -25036,34 +35620,34 @@ export namespace proto { constructor(properties?: proto.IPaymentBackground); /** PaymentBackground id. */ - public id: string; + public id?: (string|null); /** PaymentBackground fileLength. */ - public fileLength: (number|Long); + public fileLength?: (number|Long|null); /** PaymentBackground width. */ - public width: number; + public width?: (number|null); /** PaymentBackground height. */ - public height: number; + public height?: (number|null); /** PaymentBackground mimetype. */ - public mimetype: string; + public mimetype?: (string|null); /** PaymentBackground placeholderArgb. */ - public placeholderArgb: number; + public placeholderArgb?: (number|null); /** PaymentBackground textArgb. */ - public textArgb: number; + public textArgb?: (number|null); /** PaymentBackground subtextArgb. */ - public subtextArgb: number; + public subtextArgb?: (number|null); /** PaymentBackground mediaData. */ public mediaData?: (proto.PaymentBackground.IMediaData|null); /** PaymentBackground type. */ - public type: proto.PaymentBackground.Type; + public type?: (proto.PaymentBackground.Type|null); /** * Creates a new PaymentBackground instance using the specified properties. @@ -25134,6 +35718,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PaymentBackground + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace PaymentBackground { @@ -25167,19 +35758,19 @@ export namespace proto { constructor(properties?: proto.PaymentBackground.IMediaData); /** MediaData mediaKey. */ - public mediaKey: Uint8Array; + public mediaKey?: (Uint8Array|null); /** MediaData mediaKeyTimestamp. */ - public mediaKeyTimestamp: (number|Long); + public mediaKeyTimestamp?: (number|Long|null); /** MediaData fileSha256. */ - public fileSha256: Uint8Array; + public fileSha256?: (Uint8Array|null); /** MediaData fileEncSha256. */ - public fileEncSha256: Uint8Array; + public fileEncSha256?: (Uint8Array|null); /** MediaData directPath. */ - public directPath: string; + public directPath?: (string|null); /** * Creates a new MediaData instance using the specified properties. @@ -25250,6 +35841,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MediaData + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Type enum. */ @@ -25312,37 +35910,37 @@ export namespace proto { constructor(properties?: proto.IPaymentInfo); /** PaymentInfo currencyDeprecated. */ - public currencyDeprecated: proto.PaymentInfo.Currency; + public currencyDeprecated?: (proto.PaymentInfo.Currency|null); /** PaymentInfo amount1000. */ - public amount1000: (number|Long); + public amount1000?: (number|Long|null); /** PaymentInfo receiverJid. */ - public receiverJid: string; + public receiverJid?: (string|null); /** PaymentInfo status. */ - public status: proto.PaymentInfo.Status; + public status?: (proto.PaymentInfo.Status|null); /** PaymentInfo transactionTimestamp. */ - public transactionTimestamp: (number|Long); + public transactionTimestamp?: (number|Long|null); /** PaymentInfo requestMessageKey. */ public requestMessageKey?: (proto.IMessageKey|null); /** PaymentInfo expiryTimestamp. */ - public expiryTimestamp: (number|Long); + public expiryTimestamp?: (number|Long|null); /** PaymentInfo futureproofed. */ - public futureproofed: boolean; + public futureproofed?: (boolean|null); /** PaymentInfo currency. */ - public currency: string; + public currency?: (string|null); /** PaymentInfo txnStatus. */ - public txnStatus: proto.PaymentInfo.TxnStatus; + public txnStatus?: (proto.PaymentInfo.TxnStatus|null); /** PaymentInfo useNoviFiatFormat. */ - public useNoviFiatFormat: boolean; + public useNoviFiatFormat?: (boolean|null); /** PaymentInfo primaryAmount. */ public primaryAmount?: (proto.IMoney|null); @@ -25419,6 +36017,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PaymentInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace PaymentInfo { @@ -25502,10 +36107,10 @@ export namespace proto { constructor(properties?: proto.IPhoneNumberToLIDMapping); /** PhoneNumberToLIDMapping pnJid. */ - public pnJid: string; + public pnJid?: (string|null); /** PhoneNumberToLIDMapping lidJid. */ - public lidJid: string; + public lidJid?: (string|null); /** * Creates a new PhoneNumberToLIDMapping instance using the specified properties. @@ -25576,6 +36181,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PhoneNumberToLIDMapping + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a PhotoChange. */ @@ -25601,13 +36213,13 @@ export namespace proto { constructor(properties?: proto.IPhotoChange); /** PhotoChange oldPhoto. */ - public oldPhoto: Uint8Array; + public oldPhoto?: (Uint8Array|null); /** PhotoChange newPhoto. */ - public newPhoto: Uint8Array; + public newPhoto?: (Uint8Array|null); /** PhotoChange newPhotoId. */ - public newPhotoId: number; + public newPhotoId?: (number|null); /** * Creates a new PhotoChange instance using the specified properties. @@ -25678,6 +36290,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PhotoChange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a PinInChat. */ @@ -25709,16 +36328,16 @@ export namespace proto { constructor(properties?: proto.IPinInChat); /** PinInChat type. */ - public type: proto.PinInChat.Type; + public type?: (proto.PinInChat.Type|null); /** PinInChat key. */ public key?: (proto.IMessageKey|null); /** PinInChat senderTimestampMs. */ - public senderTimestampMs: (number|Long); + public senderTimestampMs?: (number|Long|null); /** PinInChat serverTimestampMs. */ - public serverTimestampMs: (number|Long); + public serverTimestampMs?: (number|Long|null); /** PinInChat messageAddOnContextInfo. */ public messageAddOnContextInfo?: (proto.IMessageAddOnContextInfo|null); @@ -25792,6 +36411,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PinInChat + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace PinInChat { @@ -25830,16 +36456,16 @@ export namespace proto { constructor(properties?: proto.IPoint); /** Point xDeprecated. */ - public xDeprecated: number; + public xDeprecated?: (number|null); /** Point yDeprecated. */ - public yDeprecated: number; + public yDeprecated?: (number|null); /** Point x. */ - public x: number; + public x?: (number|null); /** Point y. */ - public y: number; + public y?: (number|null); /** * Creates a new Point instance using the specified properties. @@ -25910,6 +36536,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Point + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a PollAdditionalMetadata. */ @@ -25929,7 +36562,7 @@ export namespace proto { constructor(properties?: proto.IPollAdditionalMetadata); /** PollAdditionalMetadata pollInvalidated. */ - public pollInvalidated: boolean; + public pollInvalidated?: (boolean|null); /** * Creates a new PollAdditionalMetadata instance using the specified properties. @@ -26000,6 +36633,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PollAdditionalMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a PollEncValue. */ @@ -26022,10 +36662,10 @@ export namespace proto { constructor(properties?: proto.IPollEncValue); /** PollEncValue encPayload. */ - public encPayload: Uint8Array; + public encPayload?: (Uint8Array|null); /** PollEncValue encIv. */ - public encIv: Uint8Array; + public encIv?: (Uint8Array|null); /** * Creates a new PollEncValue instance using the specified properties. @@ -26096,6 +36736,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PollEncValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a PollUpdate. */ @@ -26133,13 +36780,13 @@ export namespace proto { public vote?: (proto.Message.IPollVoteMessage|null); /** PollUpdate senderTimestampMs. */ - public senderTimestampMs: (number|Long); + public senderTimestampMs?: (number|Long|null); /** PollUpdate serverTimestampMs. */ - public serverTimestampMs: (number|Long); + public serverTimestampMs?: (number|Long|null); /** PollUpdate unread. */ - public unread: boolean; + public unread?: (boolean|null); /** * Creates a new PollUpdate instance using the specified properties. @@ -26210,6 +36857,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PollUpdate + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a PreKeyRecordStructure. */ @@ -26235,13 +36889,13 @@ export namespace proto { constructor(properties?: proto.IPreKeyRecordStructure); /** PreKeyRecordStructure id. */ - public id: number; + public id?: (number|null); /** PreKeyRecordStructure publicKey. */ - public publicKey: Uint8Array; + public publicKey?: (Uint8Array|null); /** PreKeyRecordStructure privateKey. */ - public privateKey: Uint8Array; + public privateKey?: (Uint8Array|null); /** * Creates a new PreKeyRecordStructure instance using the specified properties. @@ -26312,6 +36966,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PreKeyRecordStructure + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a PreKeySignalMessage. */ @@ -26346,22 +37007,22 @@ export namespace proto { constructor(properties?: proto.IPreKeySignalMessage); /** PreKeySignalMessage registrationId. */ - public registrationId: number; + public registrationId?: (number|null); /** PreKeySignalMessage preKeyId. */ - public preKeyId: number; + public preKeyId?: (number|null); /** PreKeySignalMessage signedPreKeyId. */ - public signedPreKeyId: number; + public signedPreKeyId?: (number|null); /** PreKeySignalMessage baseKey. */ - public baseKey: Uint8Array; + public baseKey?: (Uint8Array|null); /** PreKeySignalMessage identityKey. */ - public identityKey: Uint8Array; + public identityKey?: (Uint8Array|null); /** PreKeySignalMessage message. */ - public message: Uint8Array; + public message?: (Uint8Array|null); /** * Creates a new PreKeySignalMessage instance using the specified properties. @@ -26432,6 +37093,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PreKeySignalMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a PremiumMessageInfo. */ @@ -26451,7 +37119,7 @@ export namespace proto { constructor(properties?: proto.IPremiumMessageInfo); /** PremiumMessageInfo serverCampaignId. */ - public serverCampaignId: string; + public serverCampaignId?: (string|null); /** * Creates a new PremiumMessageInfo instance using the specified properties. @@ -26522,6 +37190,376 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PremiumMessageInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PrimaryEphemeralIdentity. */ + interface IPrimaryEphemeralIdentity { + + /** PrimaryEphemeralIdentity publicKey */ + publicKey?: (Uint8Array|null); + + /** PrimaryEphemeralIdentity nonce */ + nonce?: (Uint8Array|null); + } + + /** Represents a PrimaryEphemeralIdentity. */ + class PrimaryEphemeralIdentity implements IPrimaryEphemeralIdentity { + + /** + * Constructs a new PrimaryEphemeralIdentity. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IPrimaryEphemeralIdentity); + + /** PrimaryEphemeralIdentity publicKey. */ + public publicKey?: (Uint8Array|null); + + /** PrimaryEphemeralIdentity nonce. */ + public nonce?: (Uint8Array|null); + + /** + * Creates a new PrimaryEphemeralIdentity instance using the specified properties. + * @param [properties] Properties to set + * @returns PrimaryEphemeralIdentity instance + */ + public static create(properties?: proto.IPrimaryEphemeralIdentity): proto.PrimaryEphemeralIdentity; + + /** + * Encodes the specified PrimaryEphemeralIdentity message. Does not implicitly {@link proto.PrimaryEphemeralIdentity.verify|verify} messages. + * @param message PrimaryEphemeralIdentity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IPrimaryEphemeralIdentity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PrimaryEphemeralIdentity message, length delimited. Does not implicitly {@link proto.PrimaryEphemeralIdentity.verify|verify} messages. + * @param message PrimaryEphemeralIdentity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IPrimaryEphemeralIdentity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PrimaryEphemeralIdentity message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PrimaryEphemeralIdentity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.PrimaryEphemeralIdentity; + + /** + * Decodes a PrimaryEphemeralIdentity message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PrimaryEphemeralIdentity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.PrimaryEphemeralIdentity; + + /** + * Verifies a PrimaryEphemeralIdentity message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PrimaryEphemeralIdentity message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PrimaryEphemeralIdentity + */ + public static fromObject(object: { [k: string]: any }): proto.PrimaryEphemeralIdentity; + + /** + * Creates a plain object from a PrimaryEphemeralIdentity message. Also converts values to other types if specified. + * @param message PrimaryEphemeralIdentity + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.PrimaryEphemeralIdentity, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PrimaryEphemeralIdentity to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PrimaryEphemeralIdentity + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** PrivacySystemMessage enum. */ + enum PrivacySystemMessage { + E2EE_MSG = 1, + NE2EE_SELF = 2, + NE2EE_OTHER = 3 + } + + /** Properties of a ProcessedVideo. */ + interface IProcessedVideo { + + /** ProcessedVideo directPath */ + directPath?: (string|null); + + /** ProcessedVideo fileSha256 */ + fileSha256?: (Uint8Array|null); + + /** ProcessedVideo height */ + height?: (number|null); + + /** ProcessedVideo width */ + width?: (number|null); + + /** ProcessedVideo fileLength */ + fileLength?: (number|Long|null); + + /** ProcessedVideo bitrate */ + bitrate?: (number|null); + + /** ProcessedVideo quality */ + quality?: (proto.ProcessedVideo.VideoQuality|null); + + /** ProcessedVideo capabilities */ + capabilities?: (string[]|null); + } + + /** Represents a ProcessedVideo. */ + class ProcessedVideo implements IProcessedVideo { + + /** + * Constructs a new ProcessedVideo. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IProcessedVideo); + + /** ProcessedVideo directPath. */ + public directPath?: (string|null); + + /** ProcessedVideo fileSha256. */ + public fileSha256?: (Uint8Array|null); + + /** ProcessedVideo height. */ + public height?: (number|null); + + /** ProcessedVideo width. */ + public width?: (number|null); + + /** ProcessedVideo fileLength. */ + public fileLength?: (number|Long|null); + + /** ProcessedVideo bitrate. */ + public bitrate?: (number|null); + + /** ProcessedVideo quality. */ + public quality?: (proto.ProcessedVideo.VideoQuality|null); + + /** ProcessedVideo capabilities. */ + public capabilities: string[]; + + /** + * Creates a new ProcessedVideo instance using the specified properties. + * @param [properties] Properties to set + * @returns ProcessedVideo instance + */ + public static create(properties?: proto.IProcessedVideo): proto.ProcessedVideo; + + /** + * Encodes the specified ProcessedVideo message. Does not implicitly {@link proto.ProcessedVideo.verify|verify} messages. + * @param message ProcessedVideo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IProcessedVideo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ProcessedVideo message, length delimited. Does not implicitly {@link proto.ProcessedVideo.verify|verify} messages. + * @param message ProcessedVideo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IProcessedVideo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ProcessedVideo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ProcessedVideo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.ProcessedVideo; + + /** + * Decodes a ProcessedVideo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ProcessedVideo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.ProcessedVideo; + + /** + * Verifies a ProcessedVideo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ProcessedVideo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ProcessedVideo + */ + public static fromObject(object: { [k: string]: any }): proto.ProcessedVideo; + + /** + * Creates a plain object from a ProcessedVideo message. Also converts values to other types if specified. + * @param message ProcessedVideo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.ProcessedVideo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ProcessedVideo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ProcessedVideo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ProcessedVideo { + + /** VideoQuality enum. */ + enum VideoQuality { + UNDEFINED = 0, + LOW = 1, + MID = 2, + HIGH = 3 + } + } + + /** Properties of a ProloguePayload. */ + interface IProloguePayload { + + /** ProloguePayload companionEphemeralIdentity */ + companionEphemeralIdentity?: (Uint8Array|null); + + /** ProloguePayload commitment */ + commitment?: (proto.ICompanionCommitment|null); + } + + /** Represents a ProloguePayload. */ + class ProloguePayload implements IProloguePayload { + + /** + * Constructs a new ProloguePayload. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IProloguePayload); + + /** ProloguePayload companionEphemeralIdentity. */ + public companionEphemeralIdentity?: (Uint8Array|null); + + /** ProloguePayload commitment. */ + public commitment?: (proto.ICompanionCommitment|null); + + /** + * Creates a new ProloguePayload instance using the specified properties. + * @param [properties] Properties to set + * @returns ProloguePayload instance + */ + public static create(properties?: proto.IProloguePayload): proto.ProloguePayload; + + /** + * Encodes the specified ProloguePayload message. Does not implicitly {@link proto.ProloguePayload.verify|verify} messages. + * @param message ProloguePayload message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IProloguePayload, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ProloguePayload message, length delimited. Does not implicitly {@link proto.ProloguePayload.verify|verify} messages. + * @param message ProloguePayload message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IProloguePayload, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ProloguePayload message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ProloguePayload + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.ProloguePayload; + + /** + * Decodes a ProloguePayload message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ProloguePayload + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.ProloguePayload; + + /** + * Verifies a ProloguePayload message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ProloguePayload message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ProloguePayload + */ + public static fromObject(object: { [k: string]: any }): proto.ProloguePayload; + + /** + * Creates a plain object from a ProloguePayload message. Also converts values to other types if specified. + * @param message ProloguePayload + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.ProloguePayload, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ProloguePayload to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ProloguePayload + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Pushname. */ @@ -26544,10 +37582,10 @@ export namespace proto { constructor(properties?: proto.IPushname); /** Pushname id. */ - public id: string; + public id?: (string|null); /** Pushname pushname. */ - public pushname: string; + public pushname?: (string|null); /** * Creates a new Pushname instance using the specified properties. @@ -26618,419 +37656,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; - } - - /** Properties of a QP. */ - interface IQP { - } - - /** Represents a QP. */ - class QP implements IQP { /** - * Constructs a new QP. - * @param [properties] Properties to set + * Gets the default type url for Pushname + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url */ - constructor(properties?: proto.IQP); - - /** - * Creates a new QP instance using the specified properties. - * @param [properties] Properties to set - * @returns QP instance - */ - public static create(properties?: proto.IQP): proto.QP; - - /** - * Encodes the specified QP message. Does not implicitly {@link proto.QP.verify|verify} messages. - * @param message QP message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.IQP, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QP message, length delimited. Does not implicitly {@link proto.QP.verify|verify} messages. - * @param message QP message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.IQP, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QP message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QP - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.QP; - - /** - * Decodes a QP message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QP - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.QP; - - /** - * Verifies a QP message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QP message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QP - */ - public static fromObject(object: { [k: string]: any }): proto.QP; - - /** - * Creates a plain object from a QP message. Also converts values to other types if specified. - * @param message QP - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.QP, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QP to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace QP { - - /** ClauseType enum. */ - enum ClauseType { - AND = 1, - OR = 2, - NOR = 3 - } - - /** Properties of a Filter. */ - interface IFilter { - - /** Filter filterName */ - filterName: string; - - /** Filter parameters */ - parameters?: (proto.QP.IFilterParameters[]|null); - - /** Filter filterResult */ - filterResult?: (proto.QP.FilterResult|null); - - /** Filter clientNotSupportedConfig */ - clientNotSupportedConfig: proto.QP.FilterClientNotSupportedConfig; - } - - /** Represents a Filter. */ - class Filter implements IFilter { - - /** - * Constructs a new Filter. - * @param [properties] Properties to set - */ - constructor(properties?: proto.QP.IFilter); - - /** Filter filterName. */ - public filterName: string; - - /** Filter parameters. */ - public parameters: proto.QP.IFilterParameters[]; - - /** Filter filterResult. */ - public filterResult: proto.QP.FilterResult; - - /** Filter clientNotSupportedConfig. */ - public clientNotSupportedConfig: proto.QP.FilterClientNotSupportedConfig; - - /** - * Creates a new Filter instance using the specified properties. - * @param [properties] Properties to set - * @returns Filter instance - */ - public static create(properties?: proto.QP.IFilter): proto.QP.Filter; - - /** - * Encodes the specified Filter message. Does not implicitly {@link proto.QP.Filter.verify|verify} messages. - * @param message Filter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.QP.IFilter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Filter message, length delimited. Does not implicitly {@link proto.QP.Filter.verify|verify} messages. - * @param message Filter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.QP.IFilter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Filter message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Filter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.QP.Filter; - - /** - * Decodes a Filter message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Filter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.QP.Filter; - - /** - * Verifies a Filter message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Filter message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Filter - */ - public static fromObject(object: { [k: string]: any }): proto.QP.Filter; - - /** - * Creates a plain object from a Filter message. Also converts values to other types if specified. - * @param message Filter - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.QP.Filter, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Filter to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a FilterClause. */ - interface IFilterClause { - - /** FilterClause clauseType */ - clauseType: proto.QP.ClauseType; - - /** FilterClause clauses */ - clauses?: (proto.QP.IFilterClause[]|null); - - /** FilterClause filters */ - filters?: (proto.QP.IFilter[]|null); - } - - /** Represents a FilterClause. */ - class FilterClause implements IFilterClause { - - /** - * Constructs a new FilterClause. - * @param [properties] Properties to set - */ - constructor(properties?: proto.QP.IFilterClause); - - /** FilterClause clauseType. */ - public clauseType: proto.QP.ClauseType; - - /** FilterClause clauses. */ - public clauses: proto.QP.IFilterClause[]; - - /** FilterClause filters. */ - public filters: proto.QP.IFilter[]; - - /** - * Creates a new FilterClause instance using the specified properties. - * @param [properties] Properties to set - * @returns FilterClause instance - */ - public static create(properties?: proto.QP.IFilterClause): proto.QP.FilterClause; - - /** - * Encodes the specified FilterClause message. Does not implicitly {@link proto.QP.FilterClause.verify|verify} messages. - * @param message FilterClause message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.QP.IFilterClause, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FilterClause message, length delimited. Does not implicitly {@link proto.QP.FilterClause.verify|verify} messages. - * @param message FilterClause message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.QP.IFilterClause, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FilterClause message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FilterClause - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.QP.FilterClause; - - /** - * Decodes a FilterClause message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FilterClause - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.QP.FilterClause; - - /** - * Verifies a FilterClause message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FilterClause message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FilterClause - */ - public static fromObject(object: { [k: string]: any }): proto.QP.FilterClause; - - /** - * Creates a plain object from a FilterClause message. Also converts values to other types if specified. - * @param message FilterClause - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.QP.FilterClause, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FilterClause to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** FilterClientNotSupportedConfig enum. */ - enum FilterClientNotSupportedConfig { - PASS_BY_DEFAULT = 1, - FAIL_BY_DEFAULT = 2 - } - - /** Properties of a FilterParameters. */ - interface IFilterParameters { - - /** FilterParameters key */ - key?: (string|null); - - /** FilterParameters value */ - value?: (string|null); - } - - /** Represents a FilterParameters. */ - class FilterParameters implements IFilterParameters { - - /** - * Constructs a new FilterParameters. - * @param [properties] Properties to set - */ - constructor(properties?: proto.QP.IFilterParameters); - - /** FilterParameters key. */ - public key: string; - - /** FilterParameters value. */ - public value: string; - - /** - * Creates a new FilterParameters instance using the specified properties. - * @param [properties] Properties to set - * @returns FilterParameters instance - */ - public static create(properties?: proto.QP.IFilterParameters): proto.QP.FilterParameters; - - /** - * Encodes the specified FilterParameters message. Does not implicitly {@link proto.QP.FilterParameters.verify|verify} messages. - * @param message FilterParameters message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: proto.QP.IFilterParameters, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FilterParameters message, length delimited. Does not implicitly {@link proto.QP.FilterParameters.verify|verify} messages. - * @param message FilterParameters message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: proto.QP.IFilterParameters, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FilterParameters message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FilterParameters - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.QP.FilterParameters; - - /** - * Decodes a FilterParameters message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FilterParameters - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.QP.FilterParameters; - - /** - * Verifies a FilterParameters message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FilterParameters message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FilterParameters - */ - public static fromObject(object: { [k: string]: any }): proto.QP.FilterParameters; - - /** - * Creates a plain object from a FilterParameters message. Also converts values to other types if specified. - * @param message FilterParameters - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: proto.QP.FilterParameters, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FilterParameters to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** FilterResult enum. */ - enum FilterResult { - TRUE = 1, - FALSE = 2, - UNKNOWN = 3 - } + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Reaction. */ @@ -27065,16 +37697,16 @@ export namespace proto { public key?: (proto.IMessageKey|null); /** Reaction text. */ - public text: string; + public text?: (string|null); /** Reaction groupingKey. */ - public groupingKey: string; + public groupingKey?: (string|null); /** Reaction senderTimestampMs. */ - public senderTimestampMs: (number|Long); + public senderTimestampMs?: (number|Long|null); /** Reaction unread. */ - public unread: boolean; + public unread?: (boolean|null); /** * Creates a new Reaction instance using the specified properties. @@ -27145,6 +37777,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Reaction + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a RecentEmojiWeight. */ @@ -27167,10 +37806,10 @@ export namespace proto { constructor(properties?: proto.IRecentEmojiWeight); /** RecentEmojiWeight emoji. */ - public emoji: string; + public emoji?: (string|null); /** RecentEmojiWeight weight. */ - public weight: number; + public weight?: (number|null); /** * Creates a new RecentEmojiWeight instance using the specified properties. @@ -27241,6 +37880,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RecentEmojiWeight + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a RecordStructure. */ @@ -27337,6 +37983,128 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RecordStructure + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Reportable. */ + interface IReportable { + + /** Reportable minVersion */ + minVersion?: (number|null); + + /** Reportable maxVersion */ + maxVersion?: (number|null); + + /** Reportable notReportableMinVersion */ + notReportableMinVersion?: (number|null); + + /** Reportable never */ + never?: (boolean|null); + } + + /** Represents a Reportable. */ + class Reportable implements IReportable { + + /** + * Constructs a new Reportable. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IReportable); + + /** Reportable minVersion. */ + public minVersion?: (number|null); + + /** Reportable maxVersion. */ + public maxVersion?: (number|null); + + /** Reportable notReportableMinVersion. */ + public notReportableMinVersion?: (number|null); + + /** Reportable never. */ + public never?: (boolean|null); + + /** + * Creates a new Reportable instance using the specified properties. + * @param [properties] Properties to set + * @returns Reportable instance + */ + public static create(properties?: proto.IReportable): proto.Reportable; + + /** + * Encodes the specified Reportable message. Does not implicitly {@link proto.Reportable.verify|verify} messages. + * @param message Reportable message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IReportable, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Reportable message, length delimited. Does not implicitly {@link proto.Reportable.verify|verify} messages. + * @param message Reportable message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IReportable, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Reportable message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Reportable + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.Reportable; + + /** + * Decodes a Reportable message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Reportable + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.Reportable; + + /** + * Verifies a Reportable message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Reportable message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Reportable + */ + public static fromObject(object: { [k: string]: any }): proto.Reportable; + + /** + * Creates a plain object from a Reportable message. Also converts values to other types if specified. + * @param message Reportable + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.Reportable, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Reportable to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Reportable + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ReportingTokenInfo. */ @@ -27356,7 +38124,7 @@ export namespace proto { constructor(properties?: proto.IReportingTokenInfo); /** ReportingTokenInfo reportingTag. */ - public reportingTag: Uint8Array; + public reportingTag?: (Uint8Array|null); /** * Creates a new ReportingTokenInfo instance using the specified properties. @@ -27427,6 +38195,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReportingTokenInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a SenderKeyDistributionMessage. */ @@ -27455,16 +38230,16 @@ export namespace proto { constructor(properties?: proto.ISenderKeyDistributionMessage); /** SenderKeyDistributionMessage id. */ - public id: number; + public id?: (number|null); /** SenderKeyDistributionMessage iteration. */ - public iteration: number; + public iteration?: (number|null); /** SenderKeyDistributionMessage chainKey. */ - public chainKey: Uint8Array; + public chainKey?: (Uint8Array|null); /** SenderKeyDistributionMessage signingKey. */ - public signingKey: Uint8Array; + public signingKey?: (Uint8Array|null); /** * Creates a new SenderKeyDistributionMessage instance using the specified properties. @@ -27535,6 +38310,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SenderKeyDistributionMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a SenderKeyMessage. */ @@ -27560,13 +38342,13 @@ export namespace proto { constructor(properties?: proto.ISenderKeyMessage); /** SenderKeyMessage id. */ - public id: number; + public id?: (number|null); /** SenderKeyMessage iteration. */ - public iteration: number; + public iteration?: (number|null); /** SenderKeyMessage ciphertext. */ - public ciphertext: Uint8Array; + public ciphertext?: (Uint8Array|null); /** * Creates a new SenderKeyMessage instance using the specified properties. @@ -27637,6 +38419,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SenderKeyMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a SenderKeyRecordStructure. */ @@ -27727,6 +38516,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SenderKeyRecordStructure + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a SenderKeyStateStructure. */ @@ -27755,7 +38551,7 @@ export namespace proto { constructor(properties?: proto.ISenderKeyStateStructure); /** SenderKeyStateStructure senderKeyId. */ - public senderKeyId: number; + public senderKeyId?: (number|null); /** SenderKeyStateStructure senderChainKey. */ public senderChainKey?: (proto.SenderKeyStateStructure.ISenderChainKey|null); @@ -27835,6 +38631,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SenderKeyStateStructure + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace SenderKeyStateStructure { @@ -27859,10 +38662,10 @@ export namespace proto { constructor(properties?: proto.SenderKeyStateStructure.ISenderChainKey); /** SenderChainKey iteration. */ - public iteration: number; + public iteration?: (number|null); /** SenderChainKey seed. */ - public seed: Uint8Array; + public seed?: (Uint8Array|null); /** * Creates a new SenderChainKey instance using the specified properties. @@ -27933,6 +38736,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SenderChainKey + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a SenderMessageKey. */ @@ -27955,10 +38765,10 @@ export namespace proto { constructor(properties?: proto.SenderKeyStateStructure.ISenderMessageKey); /** SenderMessageKey iteration. */ - public iteration: number; + public iteration?: (number|null); /** SenderMessageKey seed. */ - public seed: Uint8Array; + public seed?: (Uint8Array|null); /** * Creates a new SenderMessageKey instance using the specified properties. @@ -28029,6 +38839,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SenderMessageKey + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a SenderSigningKey. */ @@ -28051,10 +38868,10 @@ export namespace proto { constructor(properties?: proto.SenderKeyStateStructure.ISenderSigningKey); /** SenderSigningKey public. */ - public public: Uint8Array; + public public?: (Uint8Array|null); /** SenderSigningKey private. */ - public private: Uint8Array; + public private?: (Uint8Array|null); /** * Creates a new SenderSigningKey instance using the specified properties. @@ -28125,6 +38942,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SenderSigningKey + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -28145,7 +38969,7 @@ export namespace proto { constructor(properties?: proto.IServerErrorReceipt); /** ServerErrorReceipt stanzaId. */ - public stanzaId: string; + public stanzaId?: (string|null); /** * Creates a new ServerErrorReceipt instance using the specified properties. @@ -28216,6 +39040,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServerErrorReceipt + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a SessionStructure. */ @@ -28271,19 +39102,19 @@ export namespace proto { constructor(properties?: proto.ISessionStructure); /** SessionStructure sessionVersion. */ - public sessionVersion: number; + public sessionVersion?: (number|null); /** SessionStructure localIdentityPublic. */ - public localIdentityPublic: Uint8Array; + public localIdentityPublic?: (Uint8Array|null); /** SessionStructure remoteIdentityPublic. */ - public remoteIdentityPublic: Uint8Array; + public remoteIdentityPublic?: (Uint8Array|null); /** SessionStructure rootKey. */ - public rootKey: Uint8Array; + public rootKey?: (Uint8Array|null); /** SessionStructure previousCounter. */ - public previousCounter: number; + public previousCounter?: (number|null); /** SessionStructure senderChain. */ public senderChain?: (proto.SessionStructure.IChain|null); @@ -28298,16 +39129,16 @@ export namespace proto { public pendingPreKey?: (proto.SessionStructure.IPendingPreKey|null); /** SessionStructure remoteRegistrationId. */ - public remoteRegistrationId: number; + public remoteRegistrationId?: (number|null); /** SessionStructure localRegistrationId. */ - public localRegistrationId: number; + public localRegistrationId?: (number|null); /** SessionStructure needsRefresh. */ - public needsRefresh: boolean; + public needsRefresh?: (boolean|null); /** SessionStructure aliceBaseKey. */ - public aliceBaseKey: Uint8Array; + public aliceBaseKey?: (Uint8Array|null); /** * Creates a new SessionStructure instance using the specified properties. @@ -28378,6 +39209,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SessionStructure + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace SessionStructure { @@ -28408,10 +39246,10 @@ export namespace proto { constructor(properties?: proto.SessionStructure.IChain); /** Chain senderRatchetKey. */ - public senderRatchetKey: Uint8Array; + public senderRatchetKey?: (Uint8Array|null); /** Chain senderRatchetKeyPrivate. */ - public senderRatchetKeyPrivate: Uint8Array; + public senderRatchetKeyPrivate?: (Uint8Array|null); /** Chain chainKey. */ public chainKey?: (proto.SessionStructure.Chain.IChainKey|null); @@ -28488,6 +39326,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Chain + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace Chain { @@ -28512,10 +39357,10 @@ export namespace proto { constructor(properties?: proto.SessionStructure.Chain.IChainKey); /** ChainKey index. */ - public index: number; + public index?: (number|null); /** ChainKey key. */ - public key: Uint8Array; + public key?: (Uint8Array|null); /** * Creates a new ChainKey instance using the specified properties. @@ -28586,6 +39431,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ChainKey + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a MessageKey. */ @@ -28614,16 +39466,16 @@ export namespace proto { constructor(properties?: proto.SessionStructure.Chain.IMessageKey); /** MessageKey index. */ - public index: number; + public index?: (number|null); /** MessageKey cipherKey. */ - public cipherKey: Uint8Array; + public cipherKey?: (Uint8Array|null); /** MessageKey macKey. */ - public macKey: Uint8Array; + public macKey?: (Uint8Array|null); /** MessageKey iv. */ - public iv: Uint8Array; + public iv?: (Uint8Array|null); /** * Creates a new MessageKey instance using the specified properties. @@ -28694,6 +39546,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MessageKey + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -28732,25 +39591,25 @@ export namespace proto { constructor(properties?: proto.SessionStructure.IPendingKeyExchange); /** PendingKeyExchange sequence. */ - public sequence: number; + public sequence?: (number|null); /** PendingKeyExchange localBaseKey. */ - public localBaseKey: Uint8Array; + public localBaseKey?: (Uint8Array|null); /** PendingKeyExchange localBaseKeyPrivate. */ - public localBaseKeyPrivate: Uint8Array; + public localBaseKeyPrivate?: (Uint8Array|null); /** PendingKeyExchange localRatchetKey. */ - public localRatchetKey: Uint8Array; + public localRatchetKey?: (Uint8Array|null); /** PendingKeyExchange localRatchetKeyPrivate. */ - public localRatchetKeyPrivate: Uint8Array; + public localRatchetKeyPrivate?: (Uint8Array|null); /** PendingKeyExchange localIdentityKey. */ - public localIdentityKey: Uint8Array; + public localIdentityKey?: (Uint8Array|null); /** PendingKeyExchange localIdentityKeyPrivate. */ - public localIdentityKeyPrivate: Uint8Array; + public localIdentityKeyPrivate?: (Uint8Array|null); /** * Creates a new PendingKeyExchange instance using the specified properties. @@ -28821,6 +39680,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PendingKeyExchange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a PendingPreKey. */ @@ -28846,13 +39712,13 @@ export namespace proto { constructor(properties?: proto.SessionStructure.IPendingPreKey); /** PendingPreKey preKeyId. */ - public preKeyId: number; + public preKeyId?: (number|null); /** PendingPreKey signedPreKeyId. */ - public signedPreKeyId: number; + public signedPreKeyId?: (number|null); /** PendingPreKey baseKey. */ - public baseKey: Uint8Array; + public baseKey?: (Uint8Array|null); /** * Creates a new PendingPreKey instance using the specified properties. @@ -28923,6 +39789,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PendingPreKey + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -28952,16 +39825,16 @@ export namespace proto { constructor(properties?: proto.ISignalMessage); /** SignalMessage ratchetKey. */ - public ratchetKey: Uint8Array; + public ratchetKey?: (Uint8Array|null); /** SignalMessage counter. */ - public counter: number; + public counter?: (number|null); /** SignalMessage previousCounter. */ - public previousCounter: number; + public previousCounter?: (number|null); /** SignalMessage ciphertext. */ - public ciphertext: Uint8Array; + public ciphertext?: (Uint8Array|null); /** * Creates a new SignalMessage instance using the specified properties. @@ -29032,6 +39905,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SignalMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a SignedPreKeyRecordStructure. */ @@ -29063,19 +39943,19 @@ export namespace proto { constructor(properties?: proto.ISignedPreKeyRecordStructure); /** SignedPreKeyRecordStructure id. */ - public id: number; + public id?: (number|null); /** SignedPreKeyRecordStructure publicKey. */ - public publicKey: Uint8Array; + public publicKey?: (Uint8Array|null); /** SignedPreKeyRecordStructure privateKey. */ - public privateKey: Uint8Array; + public privateKey?: (Uint8Array|null); /** SignedPreKeyRecordStructure signature. */ - public signature: Uint8Array; + public signature?: (Uint8Array|null); /** SignedPreKeyRecordStructure timestamp. */ - public timestamp: (number|Long); + public timestamp?: (number|Long|null); /** * Creates a new SignedPreKeyRecordStructure instance using the specified properties. @@ -29146,6 +40026,110 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SignedPreKeyRecordStructure + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a StatusMentionMessage. */ + interface IStatusMentionMessage { + + /** StatusMentionMessage quotedStatus */ + quotedStatus?: (proto.IMessage|null); + } + + /** Represents a StatusMentionMessage. */ + class StatusMentionMessage implements IStatusMentionMessage { + + /** + * Constructs a new StatusMentionMessage. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IStatusMentionMessage); + + /** StatusMentionMessage quotedStatus. */ + public quotedStatus?: (proto.IMessage|null); + + /** + * Creates a new StatusMentionMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns StatusMentionMessage instance + */ + public static create(properties?: proto.IStatusMentionMessage): proto.StatusMentionMessage; + + /** + * Encodes the specified StatusMentionMessage message. Does not implicitly {@link proto.StatusMentionMessage.verify|verify} messages. + * @param message StatusMentionMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IStatusMentionMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StatusMentionMessage message, length delimited. Does not implicitly {@link proto.StatusMentionMessage.verify|verify} messages. + * @param message StatusMentionMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IStatusMentionMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StatusMentionMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StatusMentionMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.StatusMentionMessage; + + /** + * Decodes a StatusMentionMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StatusMentionMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.StatusMentionMessage; + + /** + * Verifies a StatusMentionMessage message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StatusMentionMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StatusMentionMessage + */ + public static fromObject(object: { [k: string]: any }): proto.StatusMentionMessage; + + /** + * Creates a plain object from a StatusMentionMessage message. Also converts values to other types if specified. + * @param message StatusMentionMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.StatusMentionMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StatusMentionMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StatusMentionMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a StatusPSA. */ @@ -29171,7 +40155,7 @@ export namespace proto { public campaignId: (number|Long); /** StatusPSA campaignExpirationTimestamp. */ - public campaignExpirationTimestamp: (number|Long); + public campaignExpirationTimestamp?: (number|Long|null); /** * Creates a new StatusPSA instance using the specified properties. @@ -29242,6 +40226,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StatusPSA + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a StickerMetadata. */ @@ -29279,6 +40270,9 @@ export namespace proto { /** StickerMetadata lastStickerSentTs */ lastStickerSentTs?: (number|Long|null); + + /** StickerMetadata isLottie */ + isLottie?: (boolean|null); } /** Represents a StickerMetadata. */ @@ -29291,37 +40285,40 @@ export namespace proto { constructor(properties?: proto.IStickerMetadata); /** StickerMetadata url. */ - public url: string; + public url?: (string|null); /** StickerMetadata fileSha256. */ - public fileSha256: Uint8Array; + public fileSha256?: (Uint8Array|null); /** StickerMetadata fileEncSha256. */ - public fileEncSha256: Uint8Array; + public fileEncSha256?: (Uint8Array|null); /** StickerMetadata mediaKey. */ - public mediaKey: Uint8Array; + public mediaKey?: (Uint8Array|null); /** StickerMetadata mimetype. */ - public mimetype: string; + public mimetype?: (string|null); /** StickerMetadata height. */ - public height: number; + public height?: (number|null); /** StickerMetadata width. */ - public width: number; + public width?: (number|null); /** StickerMetadata directPath. */ - public directPath: string; + public directPath?: (string|null); /** StickerMetadata fileLength. */ - public fileLength: (number|Long); + public fileLength?: (number|Long|null); /** StickerMetadata weight. */ - public weight: number; + public weight?: (number|null); /** StickerMetadata lastStickerSentTs. */ - public lastStickerSentTs: (number|Long); + public lastStickerSentTs?: (number|Long|null); + + /** StickerMetadata isLottie. */ + public isLottie?: (boolean|null); /** * Creates a new StickerMetadata instance using the specified properties. @@ -29392,6 +40389,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StickerMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a SyncActionData. */ @@ -29420,16 +40424,16 @@ export namespace proto { constructor(properties?: proto.ISyncActionData); /** SyncActionData index. */ - public index: Uint8Array; + public index?: (Uint8Array|null); /** SyncActionData value. */ public value?: (proto.ISyncActionValue|null); /** SyncActionData padding. */ - public padding: Uint8Array; + public padding?: (Uint8Array|null); /** SyncActionData version. */ - public version: number; + public version?: (number|null); /** * Creates a new SyncActionData instance using the specified properties. @@ -29500,6 +40504,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SyncActionData + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a SyncActionValue. */ @@ -29633,6 +40644,39 @@ export namespace proto { /** SyncActionValue customPaymentMethodsAction */ customPaymentMethodsAction?: (proto.SyncActionValue.ICustomPaymentMethodsAction|null); + + /** SyncActionValue lockChatAction */ + lockChatAction?: (proto.SyncActionValue.ILockChatAction|null); + + /** SyncActionValue chatLockSettings */ + chatLockSettings?: (proto.IChatLockSettings|null); + + /** SyncActionValue wamoUserIdentifierAction */ + wamoUserIdentifierAction?: (proto.SyncActionValue.IWamoUserIdentifierAction|null); + + /** SyncActionValue privacySettingDisableLinkPreviewsAction */ + privacySettingDisableLinkPreviewsAction?: (proto.SyncActionValue.IPrivacySettingDisableLinkPreviewsAction|null); + + /** SyncActionValue deviceCapabilities */ + deviceCapabilities?: (proto.IDeviceCapabilities|null); + + /** SyncActionValue noteEditAction */ + noteEditAction?: (proto.SyncActionValue.INoteEditAction|null); + + /** SyncActionValue favoritesAction */ + favoritesAction?: (proto.SyncActionValue.IFavoritesAction|null); + + /** SyncActionValue merchantPaymentPartnerAction */ + merchantPaymentPartnerAction?: (proto.SyncActionValue.IMerchantPaymentPartnerAction|null); + + /** SyncActionValue waffleAccountLinkStateAction */ + waffleAccountLinkStateAction?: (proto.SyncActionValue.IWaffleAccountLinkStateAction|null); + + /** SyncActionValue usernameChatStartMode */ + usernameChatStartMode?: (proto.SyncActionValue.IUsernameChatStartModeAction|null); + + /** SyncActionValue notificationActivitySettingAction */ + notificationActivitySettingAction?: (proto.SyncActionValue.INotificationActivitySettingAction|null); } /** Represents a SyncActionValue. */ @@ -29645,7 +40689,7 @@ export namespace proto { constructor(properties?: proto.ISyncActionValue); /** SyncActionValue timestamp. */ - public timestamp: (number|Long); + public timestamp?: (number|Long|null); /** SyncActionValue starAction. */ public starAction?: (proto.SyncActionValue.IStarAction|null); @@ -29773,6 +40817,39 @@ export namespace proto { /** SyncActionValue customPaymentMethodsAction. */ public customPaymentMethodsAction?: (proto.SyncActionValue.ICustomPaymentMethodsAction|null); + /** SyncActionValue lockChatAction. */ + public lockChatAction?: (proto.SyncActionValue.ILockChatAction|null); + + /** SyncActionValue chatLockSettings. */ + public chatLockSettings?: (proto.IChatLockSettings|null); + + /** SyncActionValue wamoUserIdentifierAction. */ + public wamoUserIdentifierAction?: (proto.SyncActionValue.IWamoUserIdentifierAction|null); + + /** SyncActionValue privacySettingDisableLinkPreviewsAction. */ + public privacySettingDisableLinkPreviewsAction?: (proto.SyncActionValue.IPrivacySettingDisableLinkPreviewsAction|null); + + /** SyncActionValue deviceCapabilities. */ + public deviceCapabilities?: (proto.IDeviceCapabilities|null); + + /** SyncActionValue noteEditAction. */ + public noteEditAction?: (proto.SyncActionValue.INoteEditAction|null); + + /** SyncActionValue favoritesAction. */ + public favoritesAction?: (proto.SyncActionValue.IFavoritesAction|null); + + /** SyncActionValue merchantPaymentPartnerAction. */ + public merchantPaymentPartnerAction?: (proto.SyncActionValue.IMerchantPaymentPartnerAction|null); + + /** SyncActionValue waffleAccountLinkStateAction. */ + public waffleAccountLinkStateAction?: (proto.SyncActionValue.IWaffleAccountLinkStateAction|null); + + /** SyncActionValue usernameChatStartMode. */ + public usernameChatStartMode?: (proto.SyncActionValue.IUsernameChatStartModeAction|null); + + /** SyncActionValue notificationActivitySettingAction. */ + public notificationActivitySettingAction?: (proto.SyncActionValue.INotificationActivitySettingAction|null); + /** * Creates a new SyncActionValue instance using the specified properties. * @param [properties] Properties to set @@ -29842,6 +40919,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SyncActionValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace SyncActionValue { @@ -29869,13 +40953,13 @@ export namespace proto { constructor(properties?: proto.SyncActionValue.IAgentAction); /** AgentAction name. */ - public name: string; + public name?: (string|null); /** AgentAction deviceID. */ - public deviceID: number; + public deviceID?: (number|null); /** AgentAction isDeleted. */ - public isDeleted: boolean; + public isDeleted?: (boolean|null); /** * Creates a new AgentAction instance using the specified properties. @@ -29946,6 +41030,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AgentAction + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an AndroidUnsupportedActions. */ @@ -29965,7 +41056,7 @@ export namespace proto { constructor(properties?: proto.SyncActionValue.IAndroidUnsupportedActions); /** AndroidUnsupportedActions allowed. */ - public allowed: boolean; + public allowed?: (boolean|null); /** * Creates a new AndroidUnsupportedActions instance using the specified properties. @@ -30036,6 +41127,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AndroidUnsupportedActions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an ArchiveChatAction. */ @@ -30058,7 +41156,7 @@ export namespace proto { constructor(properties?: proto.SyncActionValue.IArchiveChatAction); /** ArchiveChatAction archived. */ - public archived: boolean; + public archived?: (boolean|null); /** ArchiveChatAction messageRange. */ public messageRange?: (proto.SyncActionValue.ISyncActionMessageRange|null); @@ -30132,6 +41230,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ArchiveChatAction + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a BotWelcomeRequestAction. */ @@ -30151,7 +41256,7 @@ export namespace proto { constructor(properties?: proto.SyncActionValue.IBotWelcomeRequestAction); /** BotWelcomeRequestAction isSent. */ - public isSent: boolean; + public isSent?: (boolean|null); /** * Creates a new BotWelcomeRequestAction instance using the specified properties. @@ -30222,6 +41327,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BotWelcomeRequestAction + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CallLogAction. */ @@ -30312,6 +41424,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CallLogAction + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ChatAssignmentAction. */ @@ -30331,7 +41450,7 @@ export namespace proto { constructor(properties?: proto.SyncActionValue.IChatAssignmentAction); /** ChatAssignmentAction deviceAgentID. */ - public deviceAgentID: string; + public deviceAgentID?: (string|null); /** * Creates a new ChatAssignmentAction instance using the specified properties. @@ -30402,6 +41521,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ChatAssignmentAction + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ChatAssignmentOpenedStatusAction. */ @@ -30421,7 +41547,7 @@ export namespace proto { constructor(properties?: proto.SyncActionValue.IChatAssignmentOpenedStatusAction); /** ChatAssignmentOpenedStatusAction chatOpened. */ - public chatOpened: boolean; + public chatOpened?: (boolean|null); /** * Creates a new ChatAssignmentOpenedStatusAction instance using the specified properties. @@ -30492,6 +41618,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ChatAssignmentOpenedStatusAction + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ClearChatAction. */ @@ -30582,6 +41715,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ClearChatAction + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ContactAction. */ @@ -30610,16 +41750,16 @@ export namespace proto { constructor(properties?: proto.SyncActionValue.IContactAction); /** ContactAction fullName. */ - public fullName: string; + public fullName?: (string|null); /** ContactAction firstName. */ - public firstName: string; + public firstName?: (string|null); /** ContactAction lidJid. */ - public lidJid: string; + public lidJid?: (string|null); /** ContactAction saveOnPrimaryAddressbook. */ - public saveOnPrimaryAddressbook: boolean; + public saveOnPrimaryAddressbook?: (boolean|null); /** * Creates a new ContactAction instance using the specified properties. @@ -30690,6 +41830,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ContactAction + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CustomPaymentMethod. */ @@ -30798,6 +41945,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CustomPaymentMethod + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CustomPaymentMethodMetadata. */ @@ -30894,6 +42048,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CustomPaymentMethodMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CustomPaymentMethodsAction. */ @@ -30984,6 +42145,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CustomPaymentMethodsAction + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DeleteChatAction. */ @@ -31074,6 +42242,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteChatAction + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DeleteIndividualCallLogAction. */ @@ -31096,10 +42271,10 @@ export namespace proto { constructor(properties?: proto.SyncActionValue.IDeleteIndividualCallLogAction); /** DeleteIndividualCallLogAction peerJid. */ - public peerJid: string; + public peerJid?: (string|null); /** DeleteIndividualCallLogAction isIncoming. */ - public isIncoming: boolean; + public isIncoming?: (boolean|null); /** * Creates a new DeleteIndividualCallLogAction instance using the specified properties. @@ -31170,6 +42345,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteIndividualCallLogAction + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DeleteMessageForMeAction. */ @@ -31192,10 +42374,10 @@ export namespace proto { constructor(properties?: proto.SyncActionValue.IDeleteMessageForMeAction); /** DeleteMessageForMeAction deleteMedia. */ - public deleteMedia: boolean; + public deleteMedia?: (boolean|null); /** DeleteMessageForMeAction messageTimestamp. */ - public messageTimestamp: (number|Long); + public messageTimestamp?: (number|Long|null); /** * Creates a new DeleteMessageForMeAction instance using the specified properties. @@ -31266,6 +42448,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteMessageForMeAction + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an ExternalWebBetaAction. */ @@ -31285,7 +42474,7 @@ export namespace proto { constructor(properties?: proto.SyncActionValue.IExternalWebBetaAction); /** ExternalWebBetaAction isOptIn. */ - public isOptIn: boolean; + public isOptIn?: (boolean|null); /** * Creates a new ExternalWebBetaAction instance using the specified properties. @@ -31356,6 +42545,210 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExternalWebBetaAction + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FavoritesAction. */ + interface IFavoritesAction { + + /** FavoritesAction favorites */ + favorites?: (proto.SyncActionValue.FavoritesAction.IFavorite[]|null); + } + + /** Represents a FavoritesAction. */ + class FavoritesAction implements IFavoritesAction { + + /** + * Constructs a new FavoritesAction. + * @param [properties] Properties to set + */ + constructor(properties?: proto.SyncActionValue.IFavoritesAction); + + /** FavoritesAction favorites. */ + public favorites: proto.SyncActionValue.FavoritesAction.IFavorite[]; + + /** + * Creates a new FavoritesAction instance using the specified properties. + * @param [properties] Properties to set + * @returns FavoritesAction instance + */ + public static create(properties?: proto.SyncActionValue.IFavoritesAction): proto.SyncActionValue.FavoritesAction; + + /** + * Encodes the specified FavoritesAction message. Does not implicitly {@link proto.SyncActionValue.FavoritesAction.verify|verify} messages. + * @param message FavoritesAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.SyncActionValue.IFavoritesAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FavoritesAction message, length delimited. Does not implicitly {@link proto.SyncActionValue.FavoritesAction.verify|verify} messages. + * @param message FavoritesAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.SyncActionValue.IFavoritesAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FavoritesAction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FavoritesAction + * @throws {Error} If the payload is not 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.FavoritesAction; + + /** + * Decodes a FavoritesAction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FavoritesAction + * @throws {Error} If the payload 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.FavoritesAction; + + /** + * Verifies a FavoritesAction message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FavoritesAction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FavoritesAction + */ + public static fromObject(object: { [k: string]: any }): proto.SyncActionValue.FavoritesAction; + + /** + * Creates a plain object from a FavoritesAction message. Also converts values to other types if specified. + * @param message FavoritesAction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.SyncActionValue.FavoritesAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FavoritesAction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FavoritesAction + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FavoritesAction { + + /** Properties of a Favorite. */ + interface IFavorite { + + /** Favorite id */ + id?: (string|null); + } + + /** Represents a Favorite. */ + class Favorite implements IFavorite { + + /** + * Constructs a new Favorite. + * @param [properties] Properties to set + */ + constructor(properties?: proto.SyncActionValue.FavoritesAction.IFavorite); + + /** Favorite id. */ + public id?: (string|null); + + /** + * Creates a new Favorite instance using the specified properties. + * @param [properties] Properties to set + * @returns Favorite instance + */ + public static create(properties?: proto.SyncActionValue.FavoritesAction.IFavorite): proto.SyncActionValue.FavoritesAction.Favorite; + + /** + * Encodes the specified Favorite message. Does not implicitly {@link proto.SyncActionValue.FavoritesAction.Favorite.verify|verify} messages. + * @param message Favorite message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.SyncActionValue.FavoritesAction.IFavorite, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Favorite message, length delimited. Does not implicitly {@link proto.SyncActionValue.FavoritesAction.Favorite.verify|verify} messages. + * @param message Favorite message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.SyncActionValue.FavoritesAction.IFavorite, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Favorite message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Favorite + * @throws {Error} If the payload is not 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.FavoritesAction.Favorite; + + /** + * Decodes a Favorite message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Favorite + * @throws {Error} If the payload 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.FavoritesAction.Favorite; + + /** + * Verifies a Favorite message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Favorite message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Favorite + */ + public static fromObject(object: { [k: string]: any }): proto.SyncActionValue.FavoritesAction.Favorite; + + /** + * Creates a plain object from a Favorite message. Also converts values to other types if specified. + * @param message Favorite + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.SyncActionValue.FavoritesAction.Favorite, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Favorite to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Favorite + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } } /** Properties of a KeyExpiration. */ @@ -31375,7 +42768,7 @@ export namespace proto { constructor(properties?: proto.SyncActionValue.IKeyExpiration); /** KeyExpiration expiredKeyEpoch. */ - public expiredKeyEpoch: number; + public expiredKeyEpoch?: (number|null); /** * Creates a new KeyExpiration instance using the specified properties. @@ -31446,6 +42839,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for KeyExpiration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a LabelAssociationAction. */ @@ -31465,7 +42865,7 @@ export namespace proto { constructor(properties?: proto.SyncActionValue.ILabelAssociationAction); /** LabelAssociationAction labeled. */ - public labeled: boolean; + public labeled?: (boolean|null); /** * Creates a new LabelAssociationAction instance using the specified properties. @@ -31536,6 +42936,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LabelAssociationAction + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a LabelEditAction. */ @@ -31555,6 +42962,12 @@ export namespace proto { /** LabelEditAction orderIndex */ orderIndex?: (number|null); + + /** LabelEditAction isActive */ + isActive?: (boolean|null); + + /** LabelEditAction type */ + type?: (proto.SyncActionValue.LabelEditAction.ListType|null); } /** Represents a LabelEditAction. */ @@ -31567,19 +42980,25 @@ export namespace proto { constructor(properties?: proto.SyncActionValue.ILabelEditAction); /** LabelEditAction name. */ - public name: string; + public name?: (string|null); /** LabelEditAction color. */ - public color: number; + public color?: (number|null); /** LabelEditAction predefinedId. */ - public predefinedId: number; + public predefinedId?: (number|null); /** LabelEditAction deleted. */ - public deleted: boolean; + public deleted?: (boolean|null); /** LabelEditAction orderIndex. */ - public orderIndex: number; + public orderIndex?: (number|null); + + /** LabelEditAction isActive. */ + public isActive?: (boolean|null); + + /** LabelEditAction type. */ + public type?: (proto.SyncActionValue.LabelEditAction.ListType|null); /** * Creates a new LabelEditAction instance using the specified properties. @@ -31650,6 +43069,26 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LabelEditAction + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace LabelEditAction { + + /** ListType enum. */ + enum ListType { + NONE = 0, + UNREAD = 1, + GROUPS = 2, + FAVORITES = 3, + PREDEFINED = 4, + CUSTOM = 5 + } } /** Properties of a LabelReorderingAction. */ @@ -31740,6 +43179,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LabelReorderingAction + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a LocaleSetting. */ @@ -31759,7 +43205,7 @@ export namespace proto { constructor(properties?: proto.SyncActionValue.ILocaleSetting); /** LocaleSetting locale. */ - public locale: string; + public locale?: (string|null); /** * Creates a new LocaleSetting instance using the specified properties. @@ -31830,6 +43276,110 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LocaleSetting + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LockChatAction. */ + interface ILockChatAction { + + /** LockChatAction locked */ + locked?: (boolean|null); + } + + /** Represents a LockChatAction. */ + class LockChatAction implements ILockChatAction { + + /** + * Constructs a new LockChatAction. + * @param [properties] Properties to set + */ + constructor(properties?: proto.SyncActionValue.ILockChatAction); + + /** LockChatAction locked. */ + public locked?: (boolean|null); + + /** + * Creates a new LockChatAction instance using the specified properties. + * @param [properties] Properties to set + * @returns LockChatAction instance + */ + public static create(properties?: proto.SyncActionValue.ILockChatAction): proto.SyncActionValue.LockChatAction; + + /** + * Encodes the specified LockChatAction message. Does not implicitly {@link proto.SyncActionValue.LockChatAction.verify|verify} messages. + * @param message LockChatAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.SyncActionValue.ILockChatAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LockChatAction message, length delimited. Does not implicitly {@link proto.SyncActionValue.LockChatAction.verify|verify} messages. + * @param message LockChatAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.SyncActionValue.ILockChatAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LockChatAction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LockChatAction + * @throws {Error} If the payload is not 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.LockChatAction; + + /** + * Decodes a LockChatAction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LockChatAction + * @throws {Error} If the payload 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.LockChatAction; + + /** + * Verifies a LockChatAction message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LockChatAction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LockChatAction + */ + public static fromObject(object: { [k: string]: any }): proto.SyncActionValue.LockChatAction; + + /** + * Creates a plain object from a LockChatAction message. Also converts values to other types if specified. + * @param message LockChatAction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.SyncActionValue.LockChatAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LockChatAction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LockChatAction + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a MarkChatAsReadAction. */ @@ -31852,7 +43402,7 @@ export namespace proto { constructor(properties?: proto.SyncActionValue.IMarkChatAsReadAction); /** MarkChatAsReadAction read. */ - public read: boolean; + public read?: (boolean|null); /** MarkChatAsReadAction messageRange. */ public messageRange?: (proto.SyncActionValue.ISyncActionMessageRange|null); @@ -31926,6 +43476,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MarkChatAsReadAction + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a MarketingMessageAction. */ @@ -31963,25 +43520,25 @@ export namespace proto { constructor(properties?: proto.SyncActionValue.IMarketingMessageAction); /** MarketingMessageAction name. */ - public name: string; + public name?: (string|null); /** MarketingMessageAction message. */ - public message: string; + public message?: (string|null); /** MarketingMessageAction type. */ - public type: proto.SyncActionValue.MarketingMessageAction.MarketingMessagePrototypeType; + public type?: (proto.SyncActionValue.MarketingMessageAction.MarketingMessagePrototypeType|null); /** MarketingMessageAction createdAt. */ - public createdAt: (number|Long); + public createdAt?: (number|Long|null); /** MarketingMessageAction lastSentAt. */ - public lastSentAt: (number|Long); + public lastSentAt?: (number|Long|null); /** MarketingMessageAction isDeleted. */ - public isDeleted: boolean; + public isDeleted?: (boolean|null); /** MarketingMessageAction mediaId. */ - public mediaId: string; + public mediaId?: (string|null); /** * Creates a new MarketingMessageAction instance using the specified properties. @@ -32052,6 +43609,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MarketingMessageAction + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace MarketingMessageAction { @@ -32079,7 +43643,7 @@ export namespace proto { constructor(properties?: proto.SyncActionValue.IMarketingMessageBroadcastAction); /** MarketingMessageBroadcastAction repliedCount. */ - public repliedCount: number; + public repliedCount?: (number|null); /** * Creates a new MarketingMessageBroadcastAction instance using the specified properties. @@ -32150,6 +43714,137 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MarketingMessageBroadcastAction + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MerchantPaymentPartnerAction. */ + interface IMerchantPaymentPartnerAction { + + /** MerchantPaymentPartnerAction status */ + status: proto.SyncActionValue.MerchantPaymentPartnerAction.Status; + + /** MerchantPaymentPartnerAction country */ + country: string; + + /** MerchantPaymentPartnerAction gatewayName */ + gatewayName?: (string|null); + + /** MerchantPaymentPartnerAction credentialId */ + credentialId?: (string|null); + } + + /** Represents a MerchantPaymentPartnerAction. */ + class MerchantPaymentPartnerAction implements IMerchantPaymentPartnerAction { + + /** + * Constructs a new MerchantPaymentPartnerAction. + * @param [properties] Properties to set + */ + constructor(properties?: proto.SyncActionValue.IMerchantPaymentPartnerAction); + + /** MerchantPaymentPartnerAction status. */ + public status: proto.SyncActionValue.MerchantPaymentPartnerAction.Status; + + /** MerchantPaymentPartnerAction country. */ + public country: string; + + /** MerchantPaymentPartnerAction gatewayName. */ + public gatewayName?: (string|null); + + /** MerchantPaymentPartnerAction credentialId. */ + public credentialId?: (string|null); + + /** + * Creates a new MerchantPaymentPartnerAction instance using the specified properties. + * @param [properties] Properties to set + * @returns MerchantPaymentPartnerAction instance + */ + public static create(properties?: proto.SyncActionValue.IMerchantPaymentPartnerAction): proto.SyncActionValue.MerchantPaymentPartnerAction; + + /** + * Encodes the specified MerchantPaymentPartnerAction message. Does not implicitly {@link proto.SyncActionValue.MerchantPaymentPartnerAction.verify|verify} messages. + * @param message MerchantPaymentPartnerAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.SyncActionValue.IMerchantPaymentPartnerAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MerchantPaymentPartnerAction message, length delimited. Does not implicitly {@link proto.SyncActionValue.MerchantPaymentPartnerAction.verify|verify} messages. + * @param message MerchantPaymentPartnerAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.SyncActionValue.IMerchantPaymentPartnerAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MerchantPaymentPartnerAction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MerchantPaymentPartnerAction + * @throws {Error} If the payload is not 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.MerchantPaymentPartnerAction; + + /** + * Decodes a MerchantPaymentPartnerAction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MerchantPaymentPartnerAction + * @throws {Error} If the payload 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.MerchantPaymentPartnerAction; + + /** + * Verifies a MerchantPaymentPartnerAction message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MerchantPaymentPartnerAction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MerchantPaymentPartnerAction + */ + public static fromObject(object: { [k: string]: any }): proto.SyncActionValue.MerchantPaymentPartnerAction; + + /** + * Creates a plain object from a MerchantPaymentPartnerAction message. Also converts values to other types if specified. + * @param message MerchantPaymentPartnerAction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.SyncActionValue.MerchantPaymentPartnerAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MerchantPaymentPartnerAction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MerchantPaymentPartnerAction + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MerchantPaymentPartnerAction { + + /** Status enum. */ + enum Status { + ACTIVE = 0, + INACTIVE = 1 + } } /** Properties of a MuteAction. */ @@ -32175,13 +43870,13 @@ export namespace proto { constructor(properties?: proto.SyncActionValue.IMuteAction); /** MuteAction muted. */ - public muted: boolean; + public muted?: (boolean|null); /** MuteAction muteEndTimestamp. */ - public muteEndTimestamp: (number|Long); + public muteEndTimestamp?: (number|Long|null); /** MuteAction autoMuted. */ - public autoMuted: boolean; + public autoMuted?: (boolean|null); /** * Creates a new MuteAction instance using the specified properties. @@ -32252,6 +43947,251 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MuteAction + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NoteEditAction. */ + interface INoteEditAction { + + /** NoteEditAction type */ + type?: (proto.SyncActionValue.NoteEditAction.NoteType|null); + + /** NoteEditAction chatJid */ + chatJid?: (string|null); + + /** NoteEditAction createdAt */ + createdAt?: (number|Long|null); + + /** NoteEditAction deleted */ + deleted?: (boolean|null); + + /** NoteEditAction unstructuredContent */ + unstructuredContent?: (string|null); + } + + /** Represents a NoteEditAction. */ + class NoteEditAction implements INoteEditAction { + + /** + * Constructs a new NoteEditAction. + * @param [properties] Properties to set + */ + constructor(properties?: proto.SyncActionValue.INoteEditAction); + + /** NoteEditAction type. */ + public type?: (proto.SyncActionValue.NoteEditAction.NoteType|null); + + /** NoteEditAction chatJid. */ + public chatJid?: (string|null); + + /** NoteEditAction createdAt. */ + public createdAt?: (number|Long|null); + + /** NoteEditAction deleted. */ + public deleted?: (boolean|null); + + /** NoteEditAction unstructuredContent. */ + public unstructuredContent?: (string|null); + + /** + * Creates a new NoteEditAction instance using the specified properties. + * @param [properties] Properties to set + * @returns NoteEditAction instance + */ + public static create(properties?: proto.SyncActionValue.INoteEditAction): proto.SyncActionValue.NoteEditAction; + + /** + * Encodes the specified NoteEditAction message. Does not implicitly {@link proto.SyncActionValue.NoteEditAction.verify|verify} messages. + * @param message NoteEditAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.SyncActionValue.INoteEditAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NoteEditAction message, length delimited. Does not implicitly {@link proto.SyncActionValue.NoteEditAction.verify|verify} messages. + * @param message NoteEditAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.SyncActionValue.INoteEditAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NoteEditAction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NoteEditAction + * @throws {Error} If the payload is not 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.NoteEditAction; + + /** + * Decodes a NoteEditAction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NoteEditAction + * @throws {Error} If the payload 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.NoteEditAction; + + /** + * Verifies a NoteEditAction message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NoteEditAction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NoteEditAction + */ + public static fromObject(object: { [k: string]: any }): proto.SyncActionValue.NoteEditAction; + + /** + * Creates a plain object from a NoteEditAction message. Also converts values to other types if specified. + * @param message NoteEditAction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.SyncActionValue.NoteEditAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NoteEditAction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NoteEditAction + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace NoteEditAction { + + /** NoteType enum. */ + enum NoteType { + UNSTRUCTURED = 1, + STRUCTURED = 2 + } + } + + /** Properties of a NotificationActivitySettingAction. */ + interface INotificationActivitySettingAction { + + /** NotificationActivitySettingAction notificationActivitySetting */ + notificationActivitySetting?: (proto.SyncActionValue.NotificationActivitySettingAction.NotificationActivitySetting|null); + } + + /** Represents a NotificationActivitySettingAction. */ + class NotificationActivitySettingAction implements INotificationActivitySettingAction { + + /** + * Constructs a new NotificationActivitySettingAction. + * @param [properties] Properties to set + */ + constructor(properties?: proto.SyncActionValue.INotificationActivitySettingAction); + + /** NotificationActivitySettingAction notificationActivitySetting. */ + public notificationActivitySetting?: (proto.SyncActionValue.NotificationActivitySettingAction.NotificationActivitySetting|null); + + /** + * Creates a new NotificationActivitySettingAction instance using the specified properties. + * @param [properties] Properties to set + * @returns NotificationActivitySettingAction instance + */ + public static create(properties?: proto.SyncActionValue.INotificationActivitySettingAction): proto.SyncActionValue.NotificationActivitySettingAction; + + /** + * Encodes the specified NotificationActivitySettingAction message. Does not implicitly {@link proto.SyncActionValue.NotificationActivitySettingAction.verify|verify} messages. + * @param message NotificationActivitySettingAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.SyncActionValue.INotificationActivitySettingAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NotificationActivitySettingAction message, length delimited. Does not implicitly {@link proto.SyncActionValue.NotificationActivitySettingAction.verify|verify} messages. + * @param message NotificationActivitySettingAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.SyncActionValue.INotificationActivitySettingAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NotificationActivitySettingAction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NotificationActivitySettingAction + * @throws {Error} If the payload is not 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.NotificationActivitySettingAction; + + /** + * Decodes a NotificationActivitySettingAction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NotificationActivitySettingAction + * @throws {Error} If the payload 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.NotificationActivitySettingAction; + + /** + * Verifies a NotificationActivitySettingAction message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NotificationActivitySettingAction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NotificationActivitySettingAction + */ + public static fromObject(object: { [k: string]: any }): proto.SyncActionValue.NotificationActivitySettingAction; + + /** + * Creates a plain object from a NotificationActivitySettingAction message. Also converts values to other types if specified. + * @param message NotificationActivitySettingAction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.SyncActionValue.NotificationActivitySettingAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NotificationActivitySettingAction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NotificationActivitySettingAction + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace NotificationActivitySettingAction { + + /** NotificationActivitySetting enum. */ + enum NotificationActivitySetting { + DEFAULT_ALL_MESSAGES = 0, + ALL_MESSAGES = 1, + HIGHLIGHTS = 2, + DEFAULT_HIGHLIGHTS = 3 + } } /** Properties of a NuxAction. */ @@ -32271,7 +44211,7 @@ export namespace proto { constructor(properties?: proto.SyncActionValue.INuxAction); /** NuxAction acknowledged. */ - public acknowledged: boolean; + public acknowledged?: (boolean|null); /** * Creates a new NuxAction instance using the specified properties. @@ -32342,6 +44282,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NuxAction + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a PaymentInfoAction. */ @@ -32361,7 +44308,7 @@ export namespace proto { constructor(properties?: proto.SyncActionValue.IPaymentInfoAction); /** PaymentInfoAction cpi. */ - public cpi: string; + public cpi?: (string|null); /** * Creates a new PaymentInfoAction instance using the specified properties. @@ -32432,6 +44379,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PaymentInfoAction + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a PinAction. */ @@ -32451,7 +44405,7 @@ export namespace proto { constructor(properties?: proto.SyncActionValue.IPinAction); /** PinAction pinned. */ - public pinned: boolean; + public pinned?: (boolean|null); /** * Creates a new PinAction instance using the specified properties. @@ -32522,6 +44476,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PinAction + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a PnForLidChatAction. */ @@ -32541,7 +44502,7 @@ export namespace proto { constructor(properties?: proto.SyncActionValue.IPnForLidChatAction); /** PnForLidChatAction pnJid. */ - public pnJid: string; + public pnJid?: (string|null); /** * Creates a new PnForLidChatAction instance using the specified properties. @@ -32612,6 +44573,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PnForLidChatAction + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a PrimaryFeature. */ @@ -32702,6 +44670,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PrimaryFeature + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a PrimaryVersionAction. */ @@ -32721,7 +44696,7 @@ export namespace proto { constructor(properties?: proto.SyncActionValue.IPrimaryVersionAction); /** PrimaryVersionAction version. */ - public version: string; + public version?: (string|null); /** * Creates a new PrimaryVersionAction instance using the specified properties. @@ -32792,6 +44767,110 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PrimaryVersionAction + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PrivacySettingDisableLinkPreviewsAction. */ + interface IPrivacySettingDisableLinkPreviewsAction { + + /** PrivacySettingDisableLinkPreviewsAction isPreviewsDisabled */ + isPreviewsDisabled?: (boolean|null); + } + + /** Represents a PrivacySettingDisableLinkPreviewsAction. */ + class PrivacySettingDisableLinkPreviewsAction implements IPrivacySettingDisableLinkPreviewsAction { + + /** + * Constructs a new PrivacySettingDisableLinkPreviewsAction. + * @param [properties] Properties to set + */ + constructor(properties?: proto.SyncActionValue.IPrivacySettingDisableLinkPreviewsAction); + + /** PrivacySettingDisableLinkPreviewsAction isPreviewsDisabled. */ + public isPreviewsDisabled?: (boolean|null); + + /** + * Creates a new PrivacySettingDisableLinkPreviewsAction instance using the specified properties. + * @param [properties] Properties to set + * @returns PrivacySettingDisableLinkPreviewsAction instance + */ + public static create(properties?: proto.SyncActionValue.IPrivacySettingDisableLinkPreviewsAction): proto.SyncActionValue.PrivacySettingDisableLinkPreviewsAction; + + /** + * Encodes the specified PrivacySettingDisableLinkPreviewsAction message. Does not implicitly {@link proto.SyncActionValue.PrivacySettingDisableLinkPreviewsAction.verify|verify} messages. + * @param message PrivacySettingDisableLinkPreviewsAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.SyncActionValue.IPrivacySettingDisableLinkPreviewsAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PrivacySettingDisableLinkPreviewsAction message, length delimited. Does not implicitly {@link proto.SyncActionValue.PrivacySettingDisableLinkPreviewsAction.verify|verify} messages. + * @param message PrivacySettingDisableLinkPreviewsAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.SyncActionValue.IPrivacySettingDisableLinkPreviewsAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PrivacySettingDisableLinkPreviewsAction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PrivacySettingDisableLinkPreviewsAction + * @throws {Error} If the payload is not 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.PrivacySettingDisableLinkPreviewsAction; + + /** + * Decodes a PrivacySettingDisableLinkPreviewsAction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PrivacySettingDisableLinkPreviewsAction + * @throws {Error} If the payload 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.PrivacySettingDisableLinkPreviewsAction; + + /** + * Verifies a PrivacySettingDisableLinkPreviewsAction message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PrivacySettingDisableLinkPreviewsAction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PrivacySettingDisableLinkPreviewsAction + */ + public static fromObject(object: { [k: string]: any }): proto.SyncActionValue.PrivacySettingDisableLinkPreviewsAction; + + /** + * Creates a plain object from a PrivacySettingDisableLinkPreviewsAction message. Also converts values to other types if specified. + * @param message PrivacySettingDisableLinkPreviewsAction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.SyncActionValue.PrivacySettingDisableLinkPreviewsAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PrivacySettingDisableLinkPreviewsAction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PrivacySettingDisableLinkPreviewsAction + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a PrivacySettingRelayAllCalls. */ @@ -32811,7 +44890,7 @@ export namespace proto { constructor(properties?: proto.SyncActionValue.IPrivacySettingRelayAllCalls); /** PrivacySettingRelayAllCalls isEnabled. */ - public isEnabled: boolean; + public isEnabled?: (boolean|null); /** * Creates a new PrivacySettingRelayAllCalls instance using the specified properties. @@ -32882,6 +44961,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PrivacySettingRelayAllCalls + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a PushNameSetting. */ @@ -32901,7 +44987,7 @@ export namespace proto { constructor(properties?: proto.SyncActionValue.IPushNameSetting); /** PushNameSetting name. */ - public name: string; + public name?: (string|null); /** * Creates a new PushNameSetting instance using the specified properties. @@ -32972,6 +45058,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PushNameSetting + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a QuickReplyAction. */ @@ -33003,19 +45096,19 @@ export namespace proto { constructor(properties?: proto.SyncActionValue.IQuickReplyAction); /** QuickReplyAction shortcut. */ - public shortcut: string; + public shortcut?: (string|null); /** QuickReplyAction message. */ - public message: string; + public message?: (string|null); /** QuickReplyAction keywords. */ public keywords: string[]; /** QuickReplyAction count. */ - public count: number; + public count?: (number|null); /** QuickReplyAction deleted. */ - public deleted: boolean; + public deleted?: (boolean|null); /** * Creates a new QuickReplyAction instance using the specified properties. @@ -33086,6 +45179,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QuickReplyAction + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a RecentEmojiWeightsAction. */ @@ -33176,6 +45276,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RecentEmojiWeightsAction + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a RemoveRecentStickerAction. */ @@ -33195,7 +45302,7 @@ export namespace proto { constructor(properties?: proto.SyncActionValue.IRemoveRecentStickerAction); /** RemoveRecentStickerAction lastStickerSentTs. */ - public lastStickerSentTs: (number|Long); + public lastStickerSentTs?: (number|Long|null); /** * Creates a new RemoveRecentStickerAction instance using the specified properties. @@ -33266,6 +45373,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RemoveRecentStickerAction + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a SecurityNotificationSetting. */ @@ -33285,7 +45399,7 @@ export namespace proto { constructor(properties?: proto.SyncActionValue.ISecurityNotificationSetting); /** SecurityNotificationSetting showNotification. */ - public showNotification: boolean; + public showNotification?: (boolean|null); /** * Creates a new SecurityNotificationSetting instance using the specified properties. @@ -33356,6 +45470,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SecurityNotificationSetting + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a StarAction. */ @@ -33375,7 +45496,7 @@ export namespace proto { constructor(properties?: proto.SyncActionValue.IStarAction); /** StarAction starred. */ - public starred: boolean; + public starred?: (boolean|null); /** * Creates a new StarAction instance using the specified properties. @@ -33446,6 +45567,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StarAction + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a StatusPrivacyAction. */ @@ -33468,7 +45596,7 @@ export namespace proto { constructor(properties?: proto.SyncActionValue.IStatusPrivacyAction); /** StatusPrivacyAction mode. */ - public mode: proto.SyncActionValue.StatusPrivacyAction.StatusDistributionMode; + public mode?: (proto.SyncActionValue.StatusPrivacyAction.StatusDistributionMode|null); /** StatusPrivacyAction userJid. */ public userJid: string[]; @@ -33542,6 +45670,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StatusPrivacyAction + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace StatusPrivacyAction { @@ -33586,6 +45721,9 @@ export namespace proto { /** StickerAction deviceIdHint */ deviceIdHint?: (number|null); + + /** StickerAction isLottie */ + isLottie?: (boolean|null); } /** Represents a StickerAction. */ @@ -33598,34 +45736,37 @@ export namespace proto { constructor(properties?: proto.SyncActionValue.IStickerAction); /** StickerAction url. */ - public url: string; + public url?: (string|null); /** StickerAction fileEncSha256. */ - public fileEncSha256: Uint8Array; + public fileEncSha256?: (Uint8Array|null); /** StickerAction mediaKey. */ - public mediaKey: Uint8Array; + public mediaKey?: (Uint8Array|null); /** StickerAction mimetype. */ - public mimetype: string; + public mimetype?: (string|null); /** StickerAction height. */ - public height: number; + public height?: (number|null); /** StickerAction width. */ - public width: number; + public width?: (number|null); /** StickerAction directPath. */ - public directPath: string; + public directPath?: (string|null); /** StickerAction fileLength. */ - public fileLength: (number|Long); + public fileLength?: (number|Long|null); /** StickerAction isFavorite. */ - public isFavorite: boolean; + public isFavorite?: (boolean|null); /** StickerAction deviceIdHint. */ - public deviceIdHint: number; + public deviceIdHint?: (number|null); + + /** StickerAction isLottie. */ + public isLottie?: (boolean|null); /** * Creates a new StickerAction instance using the specified properties. @@ -33696,6 +45837,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StickerAction + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a SubscriptionAction. */ @@ -33721,13 +45869,13 @@ export namespace proto { constructor(properties?: proto.SyncActionValue.ISubscriptionAction); /** SubscriptionAction isDeactivated. */ - public isDeactivated: boolean; + public isDeactivated?: (boolean|null); /** SubscriptionAction isAutoRenewing. */ - public isAutoRenewing: boolean; + public isAutoRenewing?: (boolean|null); /** SubscriptionAction expirationDate. */ - public expirationDate: (number|Long); + public expirationDate?: (number|Long|null); /** * Creates a new SubscriptionAction instance using the specified properties. @@ -33798,6 +45946,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SubscriptionAction + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a SyncActionMessage. */ @@ -33823,7 +45978,7 @@ export namespace proto { public key?: (proto.IMessageKey|null); /** SyncActionMessage timestamp. */ - public timestamp: (number|Long); + public timestamp?: (number|Long|null); /** * Creates a new SyncActionMessage instance using the specified properties. @@ -33894,6 +46049,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SyncActionMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a SyncActionMessageRange. */ @@ -33919,10 +46081,10 @@ export namespace proto { constructor(properties?: proto.SyncActionValue.ISyncActionMessageRange); /** SyncActionMessageRange lastMessageTimestamp. */ - public lastMessageTimestamp: (number|Long); + public lastMessageTimestamp?: (number|Long|null); /** SyncActionMessageRange lastSystemMessageTimestamp. */ - public lastSystemMessageTimestamp: (number|Long); + public lastSystemMessageTimestamp?: (number|Long|null); /** SyncActionMessageRange messages. */ public messages: proto.SyncActionValue.ISyncActionMessage[]; @@ -33996,6 +46158,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SyncActionMessageRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a TimeFormatAction. */ @@ -34015,7 +46184,7 @@ export namespace proto { constructor(properties?: proto.SyncActionValue.ITimeFormatAction); /** TimeFormatAction isTwentyFourHourFormatEnabled. */ - public isTwentyFourHourFormatEnabled: boolean; + public isTwentyFourHourFormatEnabled?: (boolean|null); /** * Creates a new TimeFormatAction instance using the specified properties. @@ -34086,6 +46255,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TimeFormatAction + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an UnarchiveChatsSetting. */ @@ -34105,7 +46281,7 @@ export namespace proto { constructor(properties?: proto.SyncActionValue.IUnarchiveChatsSetting); /** UnarchiveChatsSetting unarchiveChats. */ - public unarchiveChats: boolean; + public unarchiveChats?: (boolean|null); /** * Creates a new UnarchiveChatsSetting instance using the specified properties. @@ -34176,6 +46352,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UnarchiveChatsSetting + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a UserStatusMuteAction. */ @@ -34195,7 +46378,7 @@ export namespace proto { constructor(properties?: proto.SyncActionValue.IUserStatusMuteAction); /** UserStatusMuteAction muted. */ - public muted: boolean; + public muted?: (boolean|null); /** * Creates a new UserStatusMuteAction instance using the specified properties. @@ -34266,6 +46449,321 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UserStatusMuteAction + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a UsernameChatStartModeAction. */ + interface IUsernameChatStartModeAction { + + /** UsernameChatStartModeAction chatStartMode */ + chatStartMode?: (proto.SyncActionValue.UsernameChatStartModeAction.ChatStartMode|null); + } + + /** Represents a UsernameChatStartModeAction. */ + class UsernameChatStartModeAction implements IUsernameChatStartModeAction { + + /** + * Constructs a new UsernameChatStartModeAction. + * @param [properties] Properties to set + */ + constructor(properties?: proto.SyncActionValue.IUsernameChatStartModeAction); + + /** UsernameChatStartModeAction chatStartMode. */ + public chatStartMode?: (proto.SyncActionValue.UsernameChatStartModeAction.ChatStartMode|null); + + /** + * Creates a new UsernameChatStartModeAction instance using the specified properties. + * @param [properties] Properties to set + * @returns UsernameChatStartModeAction instance + */ + public static create(properties?: proto.SyncActionValue.IUsernameChatStartModeAction): proto.SyncActionValue.UsernameChatStartModeAction; + + /** + * Encodes the specified UsernameChatStartModeAction message. Does not implicitly {@link proto.SyncActionValue.UsernameChatStartModeAction.verify|verify} messages. + * @param message UsernameChatStartModeAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.SyncActionValue.IUsernameChatStartModeAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UsernameChatStartModeAction message, length delimited. Does not implicitly {@link proto.SyncActionValue.UsernameChatStartModeAction.verify|verify} messages. + * @param message UsernameChatStartModeAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.SyncActionValue.IUsernameChatStartModeAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UsernameChatStartModeAction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UsernameChatStartModeAction + * @throws {Error} If the payload is not 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.UsernameChatStartModeAction; + + /** + * Decodes a UsernameChatStartModeAction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UsernameChatStartModeAction + * @throws {Error} If the payload 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.UsernameChatStartModeAction; + + /** + * Verifies a UsernameChatStartModeAction message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a UsernameChatStartModeAction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UsernameChatStartModeAction + */ + public static fromObject(object: { [k: string]: any }): proto.SyncActionValue.UsernameChatStartModeAction; + + /** + * Creates a plain object from a UsernameChatStartModeAction message. Also converts values to other types if specified. + * @param message UsernameChatStartModeAction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.SyncActionValue.UsernameChatStartModeAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UsernameChatStartModeAction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UsernameChatStartModeAction + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace UsernameChatStartModeAction { + + /** ChatStartMode enum. */ + enum ChatStartMode { + LID = 1, + PN = 2 + } + } + + /** Properties of a WaffleAccountLinkStateAction. */ + interface IWaffleAccountLinkStateAction { + + /** WaffleAccountLinkStateAction linkState */ + linkState?: (proto.SyncActionValue.WaffleAccountLinkStateAction.AccountLinkState|null); + } + + /** Represents a WaffleAccountLinkStateAction. */ + class WaffleAccountLinkStateAction implements IWaffleAccountLinkStateAction { + + /** + * Constructs a new WaffleAccountLinkStateAction. + * @param [properties] Properties to set + */ + constructor(properties?: proto.SyncActionValue.IWaffleAccountLinkStateAction); + + /** WaffleAccountLinkStateAction linkState. */ + public linkState?: (proto.SyncActionValue.WaffleAccountLinkStateAction.AccountLinkState|null); + + /** + * Creates a new WaffleAccountLinkStateAction instance using the specified properties. + * @param [properties] Properties to set + * @returns WaffleAccountLinkStateAction instance + */ + public static create(properties?: proto.SyncActionValue.IWaffleAccountLinkStateAction): proto.SyncActionValue.WaffleAccountLinkStateAction; + + /** + * Encodes the specified WaffleAccountLinkStateAction message. Does not implicitly {@link proto.SyncActionValue.WaffleAccountLinkStateAction.verify|verify} messages. + * @param message WaffleAccountLinkStateAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.SyncActionValue.IWaffleAccountLinkStateAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WaffleAccountLinkStateAction message, length delimited. Does not implicitly {@link proto.SyncActionValue.WaffleAccountLinkStateAction.verify|verify} messages. + * @param message WaffleAccountLinkStateAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.SyncActionValue.IWaffleAccountLinkStateAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WaffleAccountLinkStateAction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WaffleAccountLinkStateAction + * @throws {Error} If the payload is not 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.WaffleAccountLinkStateAction; + + /** + * Decodes a WaffleAccountLinkStateAction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WaffleAccountLinkStateAction + * @throws {Error} If the payload 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.WaffleAccountLinkStateAction; + + /** + * Verifies a WaffleAccountLinkStateAction message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WaffleAccountLinkStateAction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WaffleAccountLinkStateAction + */ + public static fromObject(object: { [k: string]: any }): proto.SyncActionValue.WaffleAccountLinkStateAction; + + /** + * Creates a plain object from a WaffleAccountLinkStateAction message. Also converts values to other types if specified. + * @param message WaffleAccountLinkStateAction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.SyncActionValue.WaffleAccountLinkStateAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WaffleAccountLinkStateAction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WaffleAccountLinkStateAction + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace WaffleAccountLinkStateAction { + + /** AccountLinkState enum. */ + enum AccountLinkState { + ACTIVE = 0 + } + } + + /** Properties of a WamoUserIdentifierAction. */ + interface IWamoUserIdentifierAction { + + /** WamoUserIdentifierAction identifier */ + identifier?: (string|null); + } + + /** Represents a WamoUserIdentifierAction. */ + class WamoUserIdentifierAction implements IWamoUserIdentifierAction { + + /** + * Constructs a new WamoUserIdentifierAction. + * @param [properties] Properties to set + */ + constructor(properties?: proto.SyncActionValue.IWamoUserIdentifierAction); + + /** WamoUserIdentifierAction identifier. */ + public identifier?: (string|null); + + /** + * Creates a new WamoUserIdentifierAction instance using the specified properties. + * @param [properties] Properties to set + * @returns WamoUserIdentifierAction instance + */ + public static create(properties?: proto.SyncActionValue.IWamoUserIdentifierAction): proto.SyncActionValue.WamoUserIdentifierAction; + + /** + * Encodes the specified WamoUserIdentifierAction message. Does not implicitly {@link proto.SyncActionValue.WamoUserIdentifierAction.verify|verify} messages. + * @param message WamoUserIdentifierAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.SyncActionValue.IWamoUserIdentifierAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WamoUserIdentifierAction message, length delimited. Does not implicitly {@link proto.SyncActionValue.WamoUserIdentifierAction.verify|verify} messages. + * @param message WamoUserIdentifierAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.SyncActionValue.IWamoUserIdentifierAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WamoUserIdentifierAction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WamoUserIdentifierAction + * @throws {Error} If the payload is not 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.WamoUserIdentifierAction; + + /** + * Decodes a WamoUserIdentifierAction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WamoUserIdentifierAction + * @throws {Error} If the payload 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.WamoUserIdentifierAction; + + /** + * Verifies a WamoUserIdentifierAction message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WamoUserIdentifierAction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WamoUserIdentifierAction + */ + public static fromObject(object: { [k: string]: any }): proto.SyncActionValue.WamoUserIdentifierAction; + + /** + * Creates a plain object from a WamoUserIdentifierAction message. Also converts values to other types if specified. + * @param message WamoUserIdentifierAction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.SyncActionValue.WamoUserIdentifierAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WamoUserIdentifierAction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WamoUserIdentifierAction + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -34286,7 +46784,7 @@ export namespace proto { constructor(properties?: proto.ISyncdIndex); /** SyncdIndex blob. */ - public blob: Uint8Array; + public blob?: (Uint8Array|null); /** * Creates a new SyncdIndex instance using the specified properties. @@ -34357,6 +46855,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SyncdIndex + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a SyncdMutation. */ @@ -34379,7 +46884,7 @@ export namespace proto { constructor(properties?: proto.ISyncdMutation); /** SyncdMutation operation. */ - public operation: proto.SyncdMutation.SyncdOperation; + public operation?: (proto.SyncdMutation.SyncdOperation|null); /** SyncdMutation record. */ public record?: (proto.ISyncdRecord|null); @@ -34453,6 +46958,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SyncdMutation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace SyncdMutation { @@ -34552,6 +47064,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SyncdMutations + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a SyncdPatch. */ @@ -34604,10 +47123,10 @@ export namespace proto { public externalMutations?: (proto.IExternalBlobReference|null); /** SyncdPatch snapshotMac. */ - public snapshotMac: Uint8Array; + public snapshotMac?: (Uint8Array|null); /** SyncdPatch patchMac. */ - public patchMac: Uint8Array; + public patchMac?: (Uint8Array|null); /** SyncdPatch keyId. */ public keyId?: (proto.IKeyId|null); @@ -34616,10 +47135,10 @@ export namespace proto { public exitCode?: (proto.IExitCode|null); /** SyncdPatch deviceIndex. */ - public deviceIndex: number; + public deviceIndex?: (number|null); /** SyncdPatch clientDebugData. */ - public clientDebugData: Uint8Array; + public clientDebugData?: (Uint8Array|null); /** * Creates a new SyncdPatch instance using the specified properties. @@ -34690,6 +47209,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SyncdPatch + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a SyncdRecord. */ @@ -34792,6 +47318,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SyncdRecord + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a SyncdSnapshot. */ @@ -34826,7 +47359,7 @@ export namespace proto { public records: proto.ISyncdRecord[]; /** SyncdSnapshot mac. */ - public mac: Uint8Array; + public mac?: (Uint8Array|null); /** SyncdSnapshot keyId. */ public keyId?: (proto.IKeyId|null); @@ -34900,6 +47433,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SyncdSnapshot + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a SyncdValue. */ @@ -34919,7 +47459,7 @@ export namespace proto { constructor(properties?: proto.ISyncdValue); /** SyncdValue blob. */ - public blob: Uint8Array; + public blob?: (Uint8Array|null); /** * Creates a new SyncdValue instance using the specified properties. @@ -34990,6 +47530,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SyncdValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a SyncdVersion. */ @@ -35009,7 +47556,7 @@ export namespace proto { constructor(properties?: proto.ISyncdVersion); /** SyncdVersion version. */ - public version: (number|Long); + public version?: (number|Long|null); /** * Creates a new SyncdVersion instance using the specified properties. @@ -35080,6 +47627,116 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SyncdVersion + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TapLinkAction. */ + interface ITapLinkAction { + + /** TapLinkAction title */ + title?: (string|null); + + /** TapLinkAction tapUrl */ + tapUrl?: (string|null); + } + + /** Represents a TapLinkAction. */ + class TapLinkAction implements ITapLinkAction { + + /** + * Constructs a new TapLinkAction. + * @param [properties] Properties to set + */ + constructor(properties?: proto.ITapLinkAction); + + /** TapLinkAction title. */ + public title?: (string|null); + + /** TapLinkAction tapUrl. */ + public tapUrl?: (string|null); + + /** + * Creates a new TapLinkAction instance using the specified properties. + * @param [properties] Properties to set + * @returns TapLinkAction instance + */ + public static create(properties?: proto.ITapLinkAction): proto.TapLinkAction; + + /** + * Encodes the specified TapLinkAction message. Does not implicitly {@link proto.TapLinkAction.verify|verify} messages. + * @param message TapLinkAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.ITapLinkAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TapLinkAction message, length delimited. Does not implicitly {@link proto.TapLinkAction.verify|verify} messages. + * @param message TapLinkAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.ITapLinkAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TapLinkAction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TapLinkAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.TapLinkAction; + + /** + * Decodes a TapLinkAction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TapLinkAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.TapLinkAction; + + /** + * Verifies a TapLinkAction message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TapLinkAction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TapLinkAction + */ + public static fromObject(object: { [k: string]: any }): proto.TapLinkAction; + + /** + * Creates a plain object from a TapLinkAction message. Also converts values to other types if specified. + * @param message TapLinkAction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.TapLinkAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TapLinkAction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TapLinkAction + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a TemplateButton. */ @@ -35108,7 +47765,7 @@ export namespace proto { constructor(properties?: proto.ITemplateButton); /** TemplateButton index. */ - public index: number; + public index?: (number|null); /** TemplateButton quickReplyButton. */ public quickReplyButton?: (proto.TemplateButton.IQuickReplyButton|null); @@ -35191,6 +47848,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TemplateButton + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace TemplateButton { @@ -35289,6 +47953,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CallButton + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a QuickReplyButton. */ @@ -35314,7 +47985,7 @@ export namespace proto { public displayText?: (proto.Message.IHighlyStructuredMessage|null); /** QuickReplyButton id. */ - public id: string; + public id?: (string|null); /** * Creates a new QuickReplyButton instance using the specified properties. @@ -35385,6 +48056,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QuickReplyButton + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a URLButton. */ @@ -35481,6 +48159,571 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for URLButton + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an UrlTrackingMap. */ + interface IUrlTrackingMap { + + /** UrlTrackingMap urlTrackingMapElements */ + urlTrackingMapElements?: (proto.UrlTrackingMap.IUrlTrackingMapElement[]|null); + } + + /** Represents an UrlTrackingMap. */ + class UrlTrackingMap implements IUrlTrackingMap { + + /** + * Constructs a new UrlTrackingMap. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IUrlTrackingMap); + + /** UrlTrackingMap urlTrackingMapElements. */ + public urlTrackingMapElements: proto.UrlTrackingMap.IUrlTrackingMapElement[]; + + /** + * Creates a new UrlTrackingMap instance using the specified properties. + * @param [properties] Properties to set + * @returns UrlTrackingMap instance + */ + public static create(properties?: proto.IUrlTrackingMap): proto.UrlTrackingMap; + + /** + * Encodes the specified UrlTrackingMap message. Does not implicitly {@link proto.UrlTrackingMap.verify|verify} messages. + * @param message UrlTrackingMap message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IUrlTrackingMap, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UrlTrackingMap message, length delimited. Does not implicitly {@link proto.UrlTrackingMap.verify|verify} messages. + * @param message UrlTrackingMap message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IUrlTrackingMap, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UrlTrackingMap message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UrlTrackingMap + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.UrlTrackingMap; + + /** + * Decodes an UrlTrackingMap message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UrlTrackingMap + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.UrlTrackingMap; + + /** + * Verifies an UrlTrackingMap message. + * @param message Plain 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 UrlTrackingMap message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UrlTrackingMap + */ + public static fromObject(object: { [k: string]: any }): proto.UrlTrackingMap; + + /** + * Creates a plain object from an UrlTrackingMap message. Also converts values to other types if specified. + * @param message UrlTrackingMap + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.UrlTrackingMap, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UrlTrackingMap to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UrlTrackingMap + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace UrlTrackingMap { + + /** Properties of an UrlTrackingMapElement. */ + interface IUrlTrackingMapElement { + + /** UrlTrackingMapElement originalUrl */ + originalUrl?: (string|null); + + /** UrlTrackingMapElement unconsentedUsersUrl */ + unconsentedUsersUrl?: (string|null); + + /** UrlTrackingMapElement consentedUsersUrl */ + consentedUsersUrl?: (string|null); + + /** UrlTrackingMapElement cardIndex */ + cardIndex?: (number|null); + } + + /** Represents an UrlTrackingMapElement. */ + class UrlTrackingMapElement implements IUrlTrackingMapElement { + + /** + * Constructs a new UrlTrackingMapElement. + * @param [properties] Properties to set + */ + constructor(properties?: proto.UrlTrackingMap.IUrlTrackingMapElement); + + /** UrlTrackingMapElement originalUrl. */ + public originalUrl?: (string|null); + + /** UrlTrackingMapElement unconsentedUsersUrl. */ + public unconsentedUsersUrl?: (string|null); + + /** UrlTrackingMapElement consentedUsersUrl. */ + public consentedUsersUrl?: (string|null); + + /** UrlTrackingMapElement cardIndex. */ + public cardIndex?: (number|null); + + /** + * Creates a new UrlTrackingMapElement instance using the specified properties. + * @param [properties] Properties to set + * @returns UrlTrackingMapElement instance + */ + public static create(properties?: proto.UrlTrackingMap.IUrlTrackingMapElement): proto.UrlTrackingMap.UrlTrackingMapElement; + + /** + * Encodes the specified UrlTrackingMapElement message. Does not implicitly {@link proto.UrlTrackingMap.UrlTrackingMapElement.verify|verify} messages. + * @param message UrlTrackingMapElement message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.UrlTrackingMap.IUrlTrackingMapElement, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UrlTrackingMapElement message, length delimited. Does not implicitly {@link proto.UrlTrackingMap.UrlTrackingMapElement.verify|verify} messages. + * @param message UrlTrackingMapElement message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.UrlTrackingMap.IUrlTrackingMapElement, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UrlTrackingMapElement message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UrlTrackingMapElement + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.UrlTrackingMap.UrlTrackingMapElement; + + /** + * Decodes an UrlTrackingMapElement message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UrlTrackingMapElement + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.UrlTrackingMap.UrlTrackingMapElement; + + /** + * Verifies an UrlTrackingMapElement message. + * @param message Plain 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 UrlTrackingMapElement message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UrlTrackingMapElement + */ + public static fromObject(object: { [k: string]: any }): proto.UrlTrackingMap.UrlTrackingMapElement; + + /** + * Creates a plain object from an UrlTrackingMapElement message. Also converts values to other types if specified. + * @param message UrlTrackingMapElement + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.UrlTrackingMap.UrlTrackingMapElement, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UrlTrackingMapElement to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UrlTrackingMapElement + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a UserPassword. */ + interface IUserPassword { + + /** UserPassword encoding */ + encoding?: (proto.UserPassword.Encoding|null); + + /** UserPassword transformer */ + transformer?: (proto.UserPassword.Transformer|null); + + /** UserPassword transformerArg */ + transformerArg?: (proto.UserPassword.ITransformerArg[]|null); + + /** UserPassword transformedData */ + transformedData?: (Uint8Array|null); + } + + /** Represents a UserPassword. */ + class UserPassword implements IUserPassword { + + /** + * Constructs a new UserPassword. + * @param [properties] Properties to set + */ + constructor(properties?: proto.IUserPassword); + + /** UserPassword encoding. */ + public encoding?: (proto.UserPassword.Encoding|null); + + /** UserPassword transformer. */ + public transformer?: (proto.UserPassword.Transformer|null); + + /** UserPassword transformerArg. */ + public transformerArg: proto.UserPassword.ITransformerArg[]; + + /** UserPassword transformedData. */ + public transformedData?: (Uint8Array|null); + + /** + * Creates a new UserPassword instance using the specified properties. + * @param [properties] Properties to set + * @returns UserPassword instance + */ + public static create(properties?: proto.IUserPassword): proto.UserPassword; + + /** + * Encodes the specified UserPassword message. Does not implicitly {@link proto.UserPassword.verify|verify} messages. + * @param message UserPassword message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.IUserPassword, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UserPassword message, length delimited. Does not implicitly {@link proto.UserPassword.verify|verify} messages. + * @param message UserPassword message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.IUserPassword, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UserPassword message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UserPassword + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.UserPassword; + + /** + * Decodes a UserPassword message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UserPassword + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.UserPassword; + + /** + * Verifies a UserPassword message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a UserPassword message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UserPassword + */ + public static fromObject(object: { [k: string]: any }): proto.UserPassword; + + /** + * Creates a plain object from a UserPassword message. Also converts values to other types if specified. + * @param message UserPassword + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.UserPassword, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UserPassword to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UserPassword + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace UserPassword { + + /** Encoding enum. */ + enum Encoding { + UTF8 = 0, + UTF8_BROKEN = 1 + } + + /** Transformer enum. */ + enum Transformer { + NONE = 0, + PBKDF2_HMAC_SHA512 = 1, + PBKDF2_HMAC_SHA384 = 2 + } + + /** Properties of a TransformerArg. */ + interface ITransformerArg { + + /** TransformerArg key */ + key?: (string|null); + + /** TransformerArg value */ + value?: (proto.UserPassword.TransformerArg.IValue|null); + } + + /** Represents a TransformerArg. */ + class TransformerArg implements ITransformerArg { + + /** + * Constructs a new TransformerArg. + * @param [properties] Properties to set + */ + constructor(properties?: proto.UserPassword.ITransformerArg); + + /** TransformerArg key. */ + public key?: (string|null); + + /** TransformerArg value. */ + public value?: (proto.UserPassword.TransformerArg.IValue|null); + + /** + * Creates a new TransformerArg instance using the specified properties. + * @param [properties] Properties to set + * @returns TransformerArg instance + */ + public static create(properties?: proto.UserPassword.ITransformerArg): proto.UserPassword.TransformerArg; + + /** + * Encodes the specified TransformerArg message. Does not implicitly {@link proto.UserPassword.TransformerArg.verify|verify} messages. + * @param message TransformerArg message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.UserPassword.ITransformerArg, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TransformerArg message, length delimited. Does not implicitly {@link proto.UserPassword.TransformerArg.verify|verify} messages. + * @param message TransformerArg message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.UserPassword.ITransformerArg, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TransformerArg message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TransformerArg + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.UserPassword.TransformerArg; + + /** + * Decodes a TransformerArg message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TransformerArg + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.UserPassword.TransformerArg; + + /** + * Verifies a TransformerArg message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TransformerArg message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TransformerArg + */ + public static fromObject(object: { [k: string]: any }): proto.UserPassword.TransformerArg; + + /** + * Creates a plain object from a TransformerArg message. Also converts values to other types if specified. + * @param message TransformerArg + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.UserPassword.TransformerArg, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TransformerArg to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TransformerArg + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace TransformerArg { + + /** Properties of a Value. */ + interface IValue { + + /** Value asBlob */ + asBlob?: (Uint8Array|null); + + /** Value asUnsignedInteger */ + asUnsignedInteger?: (number|null); + } + + /** Represents a Value. */ + class Value implements IValue { + + /** + * Constructs a new Value. + * @param [properties] Properties to set + */ + constructor(properties?: proto.UserPassword.TransformerArg.IValue); + + /** Value asBlob. */ + public asBlob?: (Uint8Array|null); + + /** Value asUnsignedInteger. */ + public asUnsignedInteger?: (number|null); + + /** Value value. */ + public value?: ("asBlob"|"asUnsignedInteger"); + + /** + * Creates a new Value instance using the specified properties. + * @param [properties] Properties to set + * @returns Value instance + */ + public static create(properties?: proto.UserPassword.TransformerArg.IValue): proto.UserPassword.TransformerArg.Value; + + /** + * Encodes the specified Value message. Does not implicitly {@link proto.UserPassword.TransformerArg.Value.verify|verify} messages. + * @param message Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: proto.UserPassword.TransformerArg.IValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Value message, length delimited. Does not implicitly {@link proto.UserPassword.TransformerArg.Value.verify|verify} messages. + * @param message Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: proto.UserPassword.TransformerArg.IValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Value message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): proto.UserPassword.TransformerArg.Value; + + /** + * Decodes a Value message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): proto.UserPassword.TransformerArg.Value; + + /** + * Verifies a Value message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Value message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Value + */ + public static fromObject(object: { [k: string]: any }): proto.UserPassword.TransformerArg.Value; + + /** + * Creates a plain object from a Value message. Also converts values to other types if specified. + * @param message Value + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: proto.UserPassword.TransformerArg.Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Value to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Value + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } } } @@ -35519,13 +48762,13 @@ export namespace proto { public userJid: string; /** UserReceipt receiptTimestamp. */ - public receiptTimestamp: (number|Long); + public receiptTimestamp?: (number|Long|null); /** UserReceipt readTimestamp. */ - public readTimestamp: (number|Long); + public readTimestamp?: (number|Long|null); /** UserReceipt playedTimestamp. */ - public playedTimestamp: (number|Long); + public playedTimestamp?: (number|Long|null); /** UserReceipt pendingDeviceJid. */ public pendingDeviceJid: string[]; @@ -35602,6 +48845,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UserReceipt + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a VerifiedNameCertificate. */ @@ -35627,13 +48877,13 @@ export namespace proto { constructor(properties?: proto.IVerifiedNameCertificate); /** VerifiedNameCertificate details. */ - public details: Uint8Array; + public details?: (Uint8Array|null); /** VerifiedNameCertificate signature. */ - public signature: Uint8Array; + public signature?: (Uint8Array|null); /** VerifiedNameCertificate serverSignature. */ - public serverSignature: Uint8Array; + public serverSignature?: (Uint8Array|null); /** * Creates a new VerifiedNameCertificate instance using the specified properties. @@ -35704,6 +48954,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VerifiedNameCertificate + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace VerifiedNameCertificate { @@ -35737,19 +48994,19 @@ export namespace proto { constructor(properties?: proto.VerifiedNameCertificate.IDetails); /** Details serial. */ - public serial: (number|Long); + public serial?: (number|Long|null); /** Details issuer. */ - public issuer: string; + public issuer?: (string|null); /** Details verifiedName. */ - public verifiedName: string; + public verifiedName?: (string|null); /** Details localizedNames. */ public localizedNames: proto.ILocalizedName[]; /** Details issueTime. */ - public issueTime: (number|Long); + public issueTime?: (number|Long|null); /** * Creates a new Details instance using the specified properties. @@ -35820,6 +49077,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Details + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -35843,10 +49107,10 @@ export namespace proto { constructor(properties?: proto.IWallpaperSettings); /** WallpaperSettings filename. */ - public filename: string; + public filename?: (string|null); /** WallpaperSettings opacity. */ - public opacity: number; + public opacity?: (number|null); /** * Creates a new WallpaperSettings instance using the specified properties. @@ -35917,6 +49181,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WallpaperSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a WebFeatures. */ @@ -36068,139 +49339,139 @@ export namespace proto { constructor(properties?: proto.IWebFeatures); /** WebFeatures labelsDisplay. */ - public labelsDisplay: proto.WebFeatures.Flag; + public labelsDisplay?: (proto.WebFeatures.Flag|null); /** WebFeatures voipIndividualOutgoing. */ - public voipIndividualOutgoing: proto.WebFeatures.Flag; + public voipIndividualOutgoing?: (proto.WebFeatures.Flag|null); /** WebFeatures groupsV3. */ - public groupsV3: proto.WebFeatures.Flag; + public groupsV3?: (proto.WebFeatures.Flag|null); /** WebFeatures groupsV3Create. */ - public groupsV3Create: proto.WebFeatures.Flag; + public groupsV3Create?: (proto.WebFeatures.Flag|null); /** WebFeatures changeNumberV2. */ - public changeNumberV2: proto.WebFeatures.Flag; + public changeNumberV2?: (proto.WebFeatures.Flag|null); /** WebFeatures queryStatusV3Thumbnail. */ - public queryStatusV3Thumbnail: proto.WebFeatures.Flag; + public queryStatusV3Thumbnail?: (proto.WebFeatures.Flag|null); /** WebFeatures liveLocations. */ - public liveLocations: proto.WebFeatures.Flag; + public liveLocations?: (proto.WebFeatures.Flag|null); /** WebFeatures queryVname. */ - public queryVname: proto.WebFeatures.Flag; + public queryVname?: (proto.WebFeatures.Flag|null); /** WebFeatures voipIndividualIncoming. */ - public voipIndividualIncoming: proto.WebFeatures.Flag; + public voipIndividualIncoming?: (proto.WebFeatures.Flag|null); /** WebFeatures quickRepliesQuery. */ - public quickRepliesQuery: proto.WebFeatures.Flag; + public quickRepliesQuery?: (proto.WebFeatures.Flag|null); /** WebFeatures payments. */ - public payments: proto.WebFeatures.Flag; + public payments?: (proto.WebFeatures.Flag|null); /** WebFeatures stickerPackQuery. */ - public stickerPackQuery: proto.WebFeatures.Flag; + public stickerPackQuery?: (proto.WebFeatures.Flag|null); /** WebFeatures liveLocationsFinal. */ - public liveLocationsFinal: proto.WebFeatures.Flag; + public liveLocationsFinal?: (proto.WebFeatures.Flag|null); /** WebFeatures labelsEdit. */ - public labelsEdit: proto.WebFeatures.Flag; + public labelsEdit?: (proto.WebFeatures.Flag|null); /** WebFeatures mediaUpload. */ - public mediaUpload: proto.WebFeatures.Flag; + public mediaUpload?: (proto.WebFeatures.Flag|null); /** WebFeatures mediaUploadRichQuickReplies. */ - public mediaUploadRichQuickReplies: proto.WebFeatures.Flag; + public mediaUploadRichQuickReplies?: (proto.WebFeatures.Flag|null); /** WebFeatures vnameV2. */ - public vnameV2: proto.WebFeatures.Flag; + public vnameV2?: (proto.WebFeatures.Flag|null); /** WebFeatures videoPlaybackUrl. */ - public videoPlaybackUrl: proto.WebFeatures.Flag; + public videoPlaybackUrl?: (proto.WebFeatures.Flag|null); /** WebFeatures statusRanking. */ - public statusRanking: proto.WebFeatures.Flag; + public statusRanking?: (proto.WebFeatures.Flag|null); /** WebFeatures voipIndividualVideo. */ - public voipIndividualVideo: proto.WebFeatures.Flag; + public voipIndividualVideo?: (proto.WebFeatures.Flag|null); /** WebFeatures thirdPartyStickers. */ - public thirdPartyStickers: proto.WebFeatures.Flag; + public thirdPartyStickers?: (proto.WebFeatures.Flag|null); /** WebFeatures frequentlyForwardedSetting. */ - public frequentlyForwardedSetting: proto.WebFeatures.Flag; + public frequentlyForwardedSetting?: (proto.WebFeatures.Flag|null); /** WebFeatures groupsV4JoinPermission. */ - public groupsV4JoinPermission: proto.WebFeatures.Flag; + public groupsV4JoinPermission?: (proto.WebFeatures.Flag|null); /** WebFeatures recentStickers. */ - public recentStickers: proto.WebFeatures.Flag; + public recentStickers?: (proto.WebFeatures.Flag|null); /** WebFeatures catalog. */ - public catalog: proto.WebFeatures.Flag; + public catalog?: (proto.WebFeatures.Flag|null); /** WebFeatures starredStickers. */ - public starredStickers: proto.WebFeatures.Flag; + public starredStickers?: (proto.WebFeatures.Flag|null); /** WebFeatures voipGroupCall. */ - public voipGroupCall: proto.WebFeatures.Flag; + public voipGroupCall?: (proto.WebFeatures.Flag|null); /** WebFeatures templateMessage. */ - public templateMessage: proto.WebFeatures.Flag; + public templateMessage?: (proto.WebFeatures.Flag|null); /** WebFeatures templateMessageInteractivity. */ - public templateMessageInteractivity: proto.WebFeatures.Flag; + public templateMessageInteractivity?: (proto.WebFeatures.Flag|null); /** WebFeatures ephemeralMessages. */ - public ephemeralMessages: proto.WebFeatures.Flag; + public ephemeralMessages?: (proto.WebFeatures.Flag|null); /** WebFeatures e2ENotificationSync. */ - public e2ENotificationSync: proto.WebFeatures.Flag; + public e2ENotificationSync?: (proto.WebFeatures.Flag|null); /** WebFeatures recentStickersV2. */ - public recentStickersV2: proto.WebFeatures.Flag; + public recentStickersV2?: (proto.WebFeatures.Flag|null); /** WebFeatures recentStickersV3. */ - public recentStickersV3: proto.WebFeatures.Flag; + public recentStickersV3?: (proto.WebFeatures.Flag|null); /** WebFeatures userNotice. */ - public userNotice: proto.WebFeatures.Flag; + public userNotice?: (proto.WebFeatures.Flag|null); /** WebFeatures support. */ - public support: proto.WebFeatures.Flag; + public support?: (proto.WebFeatures.Flag|null); /** WebFeatures groupUiiCleanup. */ - public groupUiiCleanup: proto.WebFeatures.Flag; + public groupUiiCleanup?: (proto.WebFeatures.Flag|null); /** WebFeatures groupDogfoodingInternalOnly. */ - public groupDogfoodingInternalOnly: proto.WebFeatures.Flag; + public groupDogfoodingInternalOnly?: (proto.WebFeatures.Flag|null); /** WebFeatures settingsSync. */ - public settingsSync: proto.WebFeatures.Flag; + public settingsSync?: (proto.WebFeatures.Flag|null); /** WebFeatures archiveV2. */ - public archiveV2: proto.WebFeatures.Flag; + public archiveV2?: (proto.WebFeatures.Flag|null); /** WebFeatures ephemeralAllowGroupMembers. */ - public ephemeralAllowGroupMembers: proto.WebFeatures.Flag; + public ephemeralAllowGroupMembers?: (proto.WebFeatures.Flag|null); /** WebFeatures ephemeral24HDuration. */ - public ephemeral24HDuration: proto.WebFeatures.Flag; + public ephemeral24HDuration?: (proto.WebFeatures.Flag|null); /** WebFeatures mdForceUpgrade. */ - public mdForceUpgrade: proto.WebFeatures.Flag; + public mdForceUpgrade?: (proto.WebFeatures.Flag|null); /** WebFeatures disappearingMode. */ - public disappearingMode: proto.WebFeatures.Flag; + public disappearingMode?: (proto.WebFeatures.Flag|null); /** WebFeatures externalMdOptInAvailable. */ - public externalMdOptInAvailable: proto.WebFeatures.Flag; + public externalMdOptInAvailable?: (proto.WebFeatures.Flag|null); /** WebFeatures noDeleteMessageTimeLimit. */ - public noDeleteMessageTimeLimit: proto.WebFeatures.Flag; + public noDeleteMessageTimeLimit?: (proto.WebFeatures.Flag|null); /** * Creates a new WebFeatures instance using the specified properties. @@ -36271,6 +49542,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WebFeatures + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace WebFeatures { @@ -36442,6 +49720,36 @@ export namespace proto { /** WebMessageInfo newsletterServerId */ newsletterServerId?: (number|Long|null); + + /** WebMessageInfo eventAdditionalMetadata */ + eventAdditionalMetadata?: (proto.IEventAdditionalMetadata|null); + + /** WebMessageInfo isMentionedInStatus */ + isMentionedInStatus?: (boolean|null); + + /** WebMessageInfo statusMentions */ + statusMentions?: (string[]|null); + + /** WebMessageInfo targetMessageId */ + targetMessageId?: (proto.IMessageKey|null); + + /** WebMessageInfo messageAddOns */ + messageAddOns?: (proto.IMessageAddOn[]|null); + + /** WebMessageInfo statusMentionMessageInfo */ + statusMentionMessageInfo?: (proto.IStatusMentionMessage|null); + + /** WebMessageInfo isSupportAiMessage */ + isSupportAiMessage?: (boolean|null); + + /** WebMessageInfo statusMentionSources */ + statusMentionSources?: (string[]|null); + + /** WebMessageInfo supportAiCitations */ + supportAiCitations?: (proto.ICitation[]|null); + + /** WebMessageInfo botTargetId */ + botTargetId?: (string|null); } /** Represents a WebMessageInfo. */ @@ -36460,52 +49768,52 @@ export namespace proto { public message?: (proto.IMessage|null); /** WebMessageInfo messageTimestamp. */ - public messageTimestamp: (number|Long); + public messageTimestamp?: (number|Long|null); /** WebMessageInfo status. */ - public status: proto.WebMessageInfo.Status; + public status?: (proto.WebMessageInfo.Status|null); /** WebMessageInfo participant. */ - public participant: string; + public participant?: (string|null); /** WebMessageInfo messageC2STimestamp. */ - public messageC2STimestamp: (number|Long); + public messageC2STimestamp?: (number|Long|null); /** WebMessageInfo ignore. */ - public ignore: boolean; + public ignore?: (boolean|null); /** WebMessageInfo starred. */ - public starred: boolean; + public starred?: (boolean|null); /** WebMessageInfo broadcast. */ - public broadcast: boolean; + public broadcast?: (boolean|null); /** WebMessageInfo pushName. */ - public pushName: string; + public pushName?: (string|null); /** WebMessageInfo mediaCiphertextSha256. */ - public mediaCiphertextSha256: Uint8Array; + public mediaCiphertextSha256?: (Uint8Array|null); /** WebMessageInfo multicast. */ - public multicast: boolean; + public multicast?: (boolean|null); /** WebMessageInfo urlText. */ - public urlText: boolean; + public urlText?: (boolean|null); /** WebMessageInfo urlNumber. */ - public urlNumber: boolean; + public urlNumber?: (boolean|null); /** WebMessageInfo messageStubType. */ - public messageStubType: proto.WebMessageInfo.StubType; + public messageStubType?: (proto.WebMessageInfo.StubType|null); /** WebMessageInfo clearMedia. */ - public clearMedia: boolean; + public clearMedia?: (boolean|null); /** WebMessageInfo messageStubParameters. */ public messageStubParameters: string[]; /** WebMessageInfo duration. */ - public duration: number; + public duration?: (number|null); /** WebMessageInfo labels. */ public labels: string[]; @@ -36520,22 +49828,22 @@ export namespace proto { public quotedPaymentInfo?: (proto.IPaymentInfo|null); /** WebMessageInfo ephemeralStartTimestamp. */ - public ephemeralStartTimestamp: (number|Long); + public ephemeralStartTimestamp?: (number|Long|null); /** WebMessageInfo ephemeralDuration. */ - public ephemeralDuration: number; + public ephemeralDuration?: (number|null); /** WebMessageInfo ephemeralOffToOn. */ - public ephemeralOffToOn: boolean; + public ephemeralOffToOn?: (boolean|null); /** WebMessageInfo ephemeralOutOfSync. */ - public ephemeralOutOfSync: boolean; + public ephemeralOutOfSync?: (boolean|null); /** WebMessageInfo bizPrivacyStatus. */ - public bizPrivacyStatus: proto.WebMessageInfo.BizPrivacyStatus; + public bizPrivacyStatus?: (proto.WebMessageInfo.BizPrivacyStatus|null); /** WebMessageInfo verifiedBizName. */ - public verifiedBizName: string; + public verifiedBizName?: (string|null); /** WebMessageInfo mediaData. */ public mediaData?: (proto.IMediaData|null); @@ -36553,7 +49861,7 @@ export namespace proto { public quotedStickerData?: (proto.IMediaData|null); /** WebMessageInfo futureproofData. */ - public futureproofData: Uint8Array; + public futureproofData?: (Uint8Array|null); /** WebMessageInfo statusPsa. */ public statusPsa?: (proto.IStatusPSA|null); @@ -36565,22 +49873,22 @@ export namespace proto { public pollAdditionalMetadata?: (proto.IPollAdditionalMetadata|null); /** WebMessageInfo agentId. */ - public agentId: string; + public agentId?: (string|null); /** WebMessageInfo statusAlreadyViewed. */ - public statusAlreadyViewed: boolean; + public statusAlreadyViewed?: (boolean|null); /** WebMessageInfo messageSecret. */ - public messageSecret: Uint8Array; + public messageSecret?: (Uint8Array|null); /** WebMessageInfo keepInChat. */ public keepInChat?: (proto.IKeepInChat|null); /** WebMessageInfo originalSelfAuthorUserJidString. */ - public originalSelfAuthorUserJidString: string; + public originalSelfAuthorUserJidString?: (string|null); /** WebMessageInfo revokeMessageTimestamp. */ - public revokeMessageTimestamp: (number|Long); + public revokeMessageTimestamp?: (number|Long|null); /** WebMessageInfo pinInChat. */ public pinInChat?: (proto.IPinInChat|null); @@ -36589,13 +49897,13 @@ export namespace proto { public premiumMessageInfo?: (proto.IPremiumMessageInfo|null); /** WebMessageInfo is1PBizBotMessage. */ - public is1PBizBotMessage: boolean; + public is1PBizBotMessage?: (boolean|null); /** WebMessageInfo isGroupHistoryMessage. */ - public isGroupHistoryMessage: boolean; + public isGroupHistoryMessage?: (boolean|null); /** WebMessageInfo botMessageInvokerJid. */ - public botMessageInvokerJid: string; + public botMessageInvokerJid?: (string|null); /** WebMessageInfo commentMetadata. */ public commentMetadata?: (proto.ICommentMetadata|null); @@ -36607,7 +49915,37 @@ export namespace proto { public reportingTokenInfo?: (proto.IReportingTokenInfo|null); /** WebMessageInfo newsletterServerId. */ - public newsletterServerId: (number|Long); + public newsletterServerId?: (number|Long|null); + + /** WebMessageInfo eventAdditionalMetadata. */ + public eventAdditionalMetadata?: (proto.IEventAdditionalMetadata|null); + + /** WebMessageInfo isMentionedInStatus. */ + public isMentionedInStatus?: (boolean|null); + + /** WebMessageInfo statusMentions. */ + public statusMentions: string[]; + + /** WebMessageInfo targetMessageId. */ + public targetMessageId?: (proto.IMessageKey|null); + + /** WebMessageInfo messageAddOns. */ + public messageAddOns: proto.IMessageAddOn[]; + + /** WebMessageInfo statusMentionMessageInfo. */ + public statusMentionMessageInfo?: (proto.IStatusMentionMessage|null); + + /** WebMessageInfo isSupportAiMessage. */ + public isSupportAiMessage?: (boolean|null); + + /** WebMessageInfo statusMentionSources. */ + public statusMentionSources: string[]; + + /** WebMessageInfo supportAiCitations. */ + public supportAiCitations: proto.ICitation[]; + + /** WebMessageInfo botTargetId. */ + public botTargetId?: (string|null); /** * Creates a new WebMessageInfo instance using the specified properties. @@ -36678,6 +50016,13 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WebMessageInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace WebMessageInfo { @@ -36902,7 +50247,22 @@ export namespace proto { BIZ_BOT_3P_MESSAGING_ENABLED = 197, REMINDER_SETUP_MESSAGE = 198, REMINDER_SENT_MESSAGE = 199, - REMINDER_CANCEL_MESSAGE = 200 + REMINDER_CANCEL_MESSAGE = 200, + BIZ_COEX_PRIVACY_INIT = 201, + BIZ_COEX_PRIVACY_TRANSITION = 202, + GROUP_DEACTIVATED = 203, + COMMUNITY_DEACTIVATE_SIBLING_GROUP = 204, + EVENT_UPDATED = 205, + EVENT_CANCELED = 206, + COMMUNITY_OWNER_UPDATED = 207, + COMMUNITY_SUB_GROUP_VISIBILITY_HIDDEN = 208, + CAPI_GROUP_NE2EE_SYSTEM_MESSAGE = 209, + STATUS_MENTION = 210, + USER_CONTROLS_SYSTEM_MESSAGE = 211, + SUPPORT_SYSTEM_MESSAGE = 212, + CHANGE_LID = 213, + BIZ_CUSTOMER_3PD_DATA_SHARING_OPT_IN_MESSAGE = 214, + BIZ_CUSTOMER_3PD_DATA_SHARING_OPT_OUT_MESSAGE = 215 } } @@ -36932,13 +50292,13 @@ export namespace proto { constructor(properties?: proto.IWebNotificationsInfo); /** WebNotificationsInfo timestamp. */ - public timestamp: (number|Long); + public timestamp?: (number|Long|null); /** WebNotificationsInfo unreadChats. */ - public unreadChats: number; + public unreadChats?: (number|null); /** WebNotificationsInfo notifyMessageCount. */ - public notifyMessageCount: number; + public notifyMessageCount?: (number|null); /** WebNotificationsInfo notifyMessages. */ public notifyMessages: proto.IWebMessageInfo[]; @@ -37012,5 +50372,12 @@ export namespace proto { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WebNotificationsInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } diff --git a/WAProto/index.js b/WAProto/index.js index 412098b..d4ecfca 100644 --- a/WAProto/index.js +++ b/WAProto/index.js @@ -48,43 +48,76 @@ $root.proto = (function() { /** * ADVDeviceIdentity rawId. - * @member {number} rawId + * @member {number|null|undefined} rawId * @memberof proto.ADVDeviceIdentity * @instance */ - ADVDeviceIdentity.prototype.rawId = 0; + ADVDeviceIdentity.prototype.rawId = null; /** * ADVDeviceIdentity timestamp. - * @member {number|Long} timestamp + * @member {number|Long|null|undefined} timestamp * @memberof proto.ADVDeviceIdentity * @instance */ - ADVDeviceIdentity.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + ADVDeviceIdentity.prototype.timestamp = null; /** * ADVDeviceIdentity keyIndex. - * @member {number} keyIndex + * @member {number|null|undefined} keyIndex * @memberof proto.ADVDeviceIdentity * @instance */ - ADVDeviceIdentity.prototype.keyIndex = 0; + ADVDeviceIdentity.prototype.keyIndex = null; /** * ADVDeviceIdentity accountType. - * @member {proto.ADVEncryptionType} accountType + * @member {proto.ADVEncryptionType|null|undefined} accountType * @memberof proto.ADVDeviceIdentity * @instance */ - ADVDeviceIdentity.prototype.accountType = 0; + ADVDeviceIdentity.prototype.accountType = null; /** * ADVDeviceIdentity deviceType. - * @member {proto.ADVEncryptionType} deviceType + * @member {proto.ADVEncryptionType|null|undefined} deviceType * @memberof proto.ADVDeviceIdentity * @instance */ - ADVDeviceIdentity.prototype.deviceType = 0; + ADVDeviceIdentity.prototype.deviceType = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ADVDeviceIdentity.prototype, "_rawId", { + get: $util.oneOfGetter($oneOfFields = ["rawId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ADVDeviceIdentity.prototype, "_timestamp", { + get: $util.oneOfGetter($oneOfFields = ["timestamp"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ADVDeviceIdentity.prototype, "_keyIndex", { + get: $util.oneOfGetter($oneOfFields = ["keyIndex"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ADVDeviceIdentity.prototype, "_accountType", { + get: $util.oneOfGetter($oneOfFields = ["accountType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ADVDeviceIdentity.prototype, "_deviceType", { + get: $util.oneOfGetter($oneOfFields = ["deviceType"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new ADVDeviceIdentity instance using the specified properties. @@ -154,21 +187,26 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.rawId = reader.uint32(); - break; - case 2: - message.timestamp = reader.uint64(); - break; - case 3: - message.keyIndex = reader.uint32(); - break; - case 4: - message.accountType = reader.int32(); - break; - case 5: - message.deviceType = reader.int32(); - break; + case 1: { + message.rawId = reader.uint32(); + break; + } + case 2: { + message.timestamp = reader.uint64(); + break; + } + case 3: { + message.keyIndex = reader.uint32(); + break; + } + case 4: { + message.accountType = reader.int32(); + break; + } + case 5: { + message.deviceType = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -204,16 +242,24 @@ $root.proto = (function() { ADVDeviceIdentity.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.rawId != null && message.hasOwnProperty("rawId")) + var properties = {}; + if (message.rawId != null && message.hasOwnProperty("rawId")) { + properties._rawId = 1; if (!$util.isInteger(message.rawId)) return "rawId: integer expected"; - if (message.timestamp != null && message.hasOwnProperty("timestamp")) + } + if (message.timestamp != null && message.hasOwnProperty("timestamp")) { + properties._timestamp = 1; if (!$util.isInteger(message.timestamp) && !(message.timestamp && $util.isInteger(message.timestamp.low) && $util.isInteger(message.timestamp.high))) return "timestamp: integer|Long expected"; - if (message.keyIndex != null && message.hasOwnProperty("keyIndex")) + } + if (message.keyIndex != null && message.hasOwnProperty("keyIndex")) { + properties._keyIndex = 1; if (!$util.isInteger(message.keyIndex)) return "keyIndex: integer expected"; - if (message.accountType != null && message.hasOwnProperty("accountType")) + } + if (message.accountType != null && message.hasOwnProperty("accountType")) { + properties._accountType = 1; switch (message.accountType) { default: return "accountType: enum value expected"; @@ -221,7 +267,9 @@ $root.proto = (function() { case 1: break; } - if (message.deviceType != null && message.hasOwnProperty("deviceType")) + } + if (message.deviceType != null && message.hasOwnProperty("deviceType")) { + properties._deviceType = 1; switch (message.deviceType) { default: return "deviceType: enum value expected"; @@ -229,6 +277,7 @@ $root.proto = (function() { case 1: break; } + } return null; }; @@ -258,6 +307,12 @@ $root.proto = (function() { if (object.keyIndex != null) message.keyIndex = object.keyIndex >>> 0; switch (object.accountType) { + default: + if (typeof object.accountType === "number") { + message.accountType = object.accountType; + break; + } + break; case "E2EE": case 0: message.accountType = 0; @@ -268,6 +323,12 @@ $root.proto = (function() { break; } switch (object.deviceType) { + default: + if (typeof object.deviceType === "number") { + message.deviceType = object.deviceType; + break; + } + break; case "E2EE": case 0: message.deviceType = 0; @@ -293,30 +354,34 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.rawId = 0; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.timestamp = options.longs === String ? "0" : 0; - object.keyIndex = 0; - object.accountType = options.enums === String ? "E2EE" : 0; - object.deviceType = options.enums === String ? "E2EE" : 0; - } - if (message.rawId != null && message.hasOwnProperty("rawId")) + if (message.rawId != null && message.hasOwnProperty("rawId")) { object.rawId = message.rawId; - if (message.timestamp != null && message.hasOwnProperty("timestamp")) + if (options.oneofs) + object._rawId = "rawId"; + } + 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(true) : message.timestamp; - if (message.keyIndex != null && message.hasOwnProperty("keyIndex")) + if (options.oneofs) + object._timestamp = "timestamp"; + } + if (message.keyIndex != null && message.hasOwnProperty("keyIndex")) { object.keyIndex = message.keyIndex; - if (message.accountType != null && message.hasOwnProperty("accountType")) - object.accountType = options.enums === String ? $root.proto.ADVEncryptionType[message.accountType] : message.accountType; - if (message.deviceType != null && message.hasOwnProperty("deviceType")) - object.deviceType = options.enums === String ? $root.proto.ADVEncryptionType[message.deviceType] : message.deviceType; + if (options.oneofs) + object._keyIndex = "keyIndex"; + } + if (message.accountType != null && message.hasOwnProperty("accountType")) { + object.accountType = options.enums === String ? $root.proto.ADVEncryptionType[message.accountType] === undefined ? message.accountType : $root.proto.ADVEncryptionType[message.accountType] : message.accountType; + if (options.oneofs) + object._accountType = "accountType"; + } + if (message.deviceType != null && message.hasOwnProperty("deviceType")) { + object.deviceType = options.enums === String ? $root.proto.ADVEncryptionType[message.deviceType] === undefined ? message.deviceType : $root.proto.ADVEncryptionType[message.deviceType] : message.deviceType; + if (options.oneofs) + object._deviceType = "deviceType"; + } return object; }; @@ -331,6 +396,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ADVDeviceIdentity + * @function getTypeUrl + * @memberof proto.ADVDeviceIdentity + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ADVDeviceIdentity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.ADVDeviceIdentity"; + }; + return ADVDeviceIdentity; })(); @@ -379,27 +459,27 @@ $root.proto = (function() { /** * ADVKeyIndexList rawId. - * @member {number} rawId + * @member {number|null|undefined} rawId * @memberof proto.ADVKeyIndexList * @instance */ - ADVKeyIndexList.prototype.rawId = 0; + ADVKeyIndexList.prototype.rawId = null; /** * ADVKeyIndexList timestamp. - * @member {number|Long} timestamp + * @member {number|Long|null|undefined} timestamp * @memberof proto.ADVKeyIndexList * @instance */ - ADVKeyIndexList.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + ADVKeyIndexList.prototype.timestamp = null; /** * ADVKeyIndexList currentIndex. - * @member {number} currentIndex + * @member {number|null|undefined} currentIndex * @memberof proto.ADVKeyIndexList * @instance */ - ADVKeyIndexList.prototype.currentIndex = 0; + ADVKeyIndexList.prototype.currentIndex = null; /** * ADVKeyIndexList validIndexes. @@ -411,11 +491,38 @@ $root.proto = (function() { /** * ADVKeyIndexList accountType. - * @member {proto.ADVEncryptionType} accountType + * @member {proto.ADVEncryptionType|null|undefined} accountType * @memberof proto.ADVKeyIndexList * @instance */ - ADVKeyIndexList.prototype.accountType = 0; + ADVKeyIndexList.prototype.accountType = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ADVKeyIndexList.prototype, "_rawId", { + get: $util.oneOfGetter($oneOfFields = ["rawId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ADVKeyIndexList.prototype, "_timestamp", { + get: $util.oneOfGetter($oneOfFields = ["timestamp"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ADVKeyIndexList.prototype, "_currentIndex", { + get: $util.oneOfGetter($oneOfFields = ["currentIndex"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ADVKeyIndexList.prototype, "_accountType", { + get: $util.oneOfGetter($oneOfFields = ["accountType"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new ADVKeyIndexList instance using the specified properties. @@ -489,28 +596,33 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.rawId = reader.uint32(); - break; - case 2: - message.timestamp = reader.uint64(); - break; - case 3: - message.currentIndex = reader.uint32(); - break; - case 4: - if (!(message.validIndexes && message.validIndexes.length)) - message.validIndexes = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) + case 1: { + message.rawId = reader.uint32(); + break; + } + case 2: { + message.timestamp = reader.uint64(); + break; + } + case 3: { + message.currentIndex = reader.uint32(); + break; + } + case 4: { + if (!(message.validIndexes && message.validIndexes.length)) + message.validIndexes = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.validIndexes.push(reader.uint32()); + } else message.validIndexes.push(reader.uint32()); - } else - message.validIndexes.push(reader.uint32()); - break; - case 5: - message.accountType = reader.int32(); - break; + break; + } + case 5: { + message.accountType = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -546,15 +658,22 @@ $root.proto = (function() { ADVKeyIndexList.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.rawId != null && message.hasOwnProperty("rawId")) + var properties = {}; + if (message.rawId != null && message.hasOwnProperty("rawId")) { + properties._rawId = 1; if (!$util.isInteger(message.rawId)) return "rawId: integer expected"; - if (message.timestamp != null && message.hasOwnProperty("timestamp")) + } + if (message.timestamp != null && message.hasOwnProperty("timestamp")) { + properties._timestamp = 1; if (!$util.isInteger(message.timestamp) && !(message.timestamp && $util.isInteger(message.timestamp.low) && $util.isInteger(message.timestamp.high))) return "timestamp: integer|Long expected"; - if (message.currentIndex != null && message.hasOwnProperty("currentIndex")) + } + if (message.currentIndex != null && message.hasOwnProperty("currentIndex")) { + properties._currentIndex = 1; if (!$util.isInteger(message.currentIndex)) return "currentIndex: integer expected"; + } if (message.validIndexes != null && message.hasOwnProperty("validIndexes")) { if (!Array.isArray(message.validIndexes)) return "validIndexes: array expected"; @@ -562,7 +681,8 @@ $root.proto = (function() { if (!$util.isInteger(message.validIndexes[i])) return "validIndexes: integer[] expected"; } - if (message.accountType != null && message.hasOwnProperty("accountType")) + if (message.accountType != null && message.hasOwnProperty("accountType")) { + properties._accountType = 1; switch (message.accountType) { default: return "accountType: enum value expected"; @@ -570,6 +690,7 @@ $root.proto = (function() { case 1: break; } + } return null; }; @@ -606,6 +727,12 @@ $root.proto = (function() { message.validIndexes[i] = object.validIndexes[i] >>> 0; } switch (object.accountType) { + default: + if (typeof object.accountType === "number") { + message.accountType = object.accountType; + break; + } + break; case "E2EE": case 0: message.accountType = 0; @@ -633,32 +760,34 @@ $root.proto = (function() { var object = {}; if (options.arrays || options.defaults) object.validIndexes = []; - if (options.defaults) { - object.rawId = 0; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.timestamp = options.longs === String ? "0" : 0; - object.currentIndex = 0; - object.accountType = options.enums === String ? "E2EE" : 0; - } - if (message.rawId != null && message.hasOwnProperty("rawId")) + if (message.rawId != null && message.hasOwnProperty("rawId")) { object.rawId = message.rawId; - if (message.timestamp != null && message.hasOwnProperty("timestamp")) + if (options.oneofs) + object._rawId = "rawId"; + } + 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(true) : message.timestamp; - if (message.currentIndex != null && message.hasOwnProperty("currentIndex")) + if (options.oneofs) + object._timestamp = "timestamp"; + } + if (message.currentIndex != null && message.hasOwnProperty("currentIndex")) { object.currentIndex = message.currentIndex; + if (options.oneofs) + object._currentIndex = "currentIndex"; + } if (message.validIndexes && message.validIndexes.length) { object.validIndexes = []; for (var j = 0; j < message.validIndexes.length; ++j) object.validIndexes[j] = message.validIndexes[j]; } - if (message.accountType != null && message.hasOwnProperty("accountType")) - object.accountType = options.enums === String ? $root.proto.ADVEncryptionType[message.accountType] : message.accountType; + if (message.accountType != null && message.hasOwnProperty("accountType")) { + object.accountType = options.enums === String ? $root.proto.ADVEncryptionType[message.accountType] === undefined ? message.accountType : $root.proto.ADVEncryptionType[message.accountType] : message.accountType; + if (options.oneofs) + object._accountType = "accountType"; + } return object; }; @@ -673,6 +802,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ADVKeyIndexList + * @function getTypeUrl + * @memberof proto.ADVKeyIndexList + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ADVKeyIndexList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.ADVKeyIndexList"; + }; + return ADVKeyIndexList; })(); @@ -705,35 +849,62 @@ $root.proto = (function() { /** * ADVSignedDeviceIdentity details. - * @member {Uint8Array} details + * @member {Uint8Array|null|undefined} details * @memberof proto.ADVSignedDeviceIdentity * @instance */ - ADVSignedDeviceIdentity.prototype.details = $util.newBuffer([]); + ADVSignedDeviceIdentity.prototype.details = null; /** * ADVSignedDeviceIdentity accountSignatureKey. - * @member {Uint8Array} accountSignatureKey + * @member {Uint8Array|null|undefined} accountSignatureKey * @memberof proto.ADVSignedDeviceIdentity * @instance */ - ADVSignedDeviceIdentity.prototype.accountSignatureKey = $util.newBuffer([]); + ADVSignedDeviceIdentity.prototype.accountSignatureKey = null; /** * ADVSignedDeviceIdentity accountSignature. - * @member {Uint8Array} accountSignature + * @member {Uint8Array|null|undefined} accountSignature * @memberof proto.ADVSignedDeviceIdentity * @instance */ - ADVSignedDeviceIdentity.prototype.accountSignature = $util.newBuffer([]); + ADVSignedDeviceIdentity.prototype.accountSignature = null; /** * ADVSignedDeviceIdentity deviceSignature. - * @member {Uint8Array} deviceSignature + * @member {Uint8Array|null|undefined} deviceSignature * @memberof proto.ADVSignedDeviceIdentity * @instance */ - ADVSignedDeviceIdentity.prototype.deviceSignature = $util.newBuffer([]); + ADVSignedDeviceIdentity.prototype.deviceSignature = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ADVSignedDeviceIdentity.prototype, "_details", { + get: $util.oneOfGetter($oneOfFields = ["details"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ADVSignedDeviceIdentity.prototype, "_accountSignatureKey", { + get: $util.oneOfGetter($oneOfFields = ["accountSignatureKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ADVSignedDeviceIdentity.prototype, "_accountSignature", { + get: $util.oneOfGetter($oneOfFields = ["accountSignature"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ADVSignedDeviceIdentity.prototype, "_deviceSignature", { + get: $util.oneOfGetter($oneOfFields = ["deviceSignature"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new ADVSignedDeviceIdentity instance using the specified properties. @@ -801,18 +972,22 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.details = reader.bytes(); - break; - case 2: - message.accountSignatureKey = reader.bytes(); - break; - case 3: - message.accountSignature = reader.bytes(); - break; - case 4: - message.deviceSignature = reader.bytes(); - break; + case 1: { + message.details = reader.bytes(); + break; + } + case 2: { + message.accountSignatureKey = reader.bytes(); + break; + } + case 3: { + message.accountSignature = reader.bytes(); + break; + } + case 4: { + message.deviceSignature = reader.bytes(); + break; + } default: reader.skipType(tag & 7); break; @@ -848,18 +1023,27 @@ $root.proto = (function() { ADVSignedDeviceIdentity.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.details != null && message.hasOwnProperty("details")) + var properties = {}; + if (message.details != null && message.hasOwnProperty("details")) { + properties._details = 1; if (!(message.details && typeof message.details.length === "number" || $util.isString(message.details))) return "details: buffer expected"; - if (message.accountSignatureKey != null && message.hasOwnProperty("accountSignatureKey")) + } + if (message.accountSignatureKey != null && message.hasOwnProperty("accountSignatureKey")) { + properties._accountSignatureKey = 1; if (!(message.accountSignatureKey && typeof message.accountSignatureKey.length === "number" || $util.isString(message.accountSignatureKey))) return "accountSignatureKey: buffer expected"; - if (message.accountSignature != null && message.hasOwnProperty("accountSignature")) + } + if (message.accountSignature != null && message.hasOwnProperty("accountSignature")) { + properties._accountSignature = 1; if (!(message.accountSignature && typeof message.accountSignature.length === "number" || $util.isString(message.accountSignature))) return "accountSignature: buffer expected"; - if (message.deviceSignature != null && message.hasOwnProperty("deviceSignature")) + } + if (message.deviceSignature != null && message.hasOwnProperty("deviceSignature")) { + properties._deviceSignature = 1; if (!(message.deviceSignature && typeof message.deviceSignature.length === "number" || $util.isString(message.deviceSignature))) return "deviceSignature: buffer expected"; + } return null; }; @@ -878,22 +1062,22 @@ $root.proto = (function() { 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) + else if (object.details.length >= 0) message.details = object.details; if (object.accountSignatureKey != null) if (typeof object.accountSignatureKey === "string") $util.base64.decode(object.accountSignatureKey, message.accountSignatureKey = $util.newBuffer($util.base64.length(object.accountSignatureKey)), 0); - else if (object.accountSignatureKey.length) + else if (object.accountSignatureKey.length >= 0) message.accountSignatureKey = object.accountSignatureKey; if (object.accountSignature != null) if (typeof object.accountSignature === "string") $util.base64.decode(object.accountSignature, message.accountSignature = $util.newBuffer($util.base64.length(object.accountSignature)), 0); - else if (object.accountSignature.length) + else if (object.accountSignature.length >= 0) message.accountSignature = object.accountSignature; if (object.deviceSignature != null) if (typeof object.deviceSignature === "string") $util.base64.decode(object.deviceSignature, message.deviceSignature = $util.newBuffer($util.base64.length(object.deviceSignature)), 0); - else if (object.deviceSignature.length) + else if (object.deviceSignature.length >= 0) message.deviceSignature = object.deviceSignature; return message; }; @@ -911,44 +1095,26 @@ $root.proto = (function() { 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.accountSignatureKey = ""; - else { - object.accountSignatureKey = []; - if (options.bytes !== Array) - object.accountSignatureKey = $util.newBuffer(object.accountSignatureKey); - } - if (options.bytes === String) - object.accountSignature = ""; - else { - object.accountSignature = []; - if (options.bytes !== Array) - object.accountSignature = $util.newBuffer(object.accountSignature); - } - if (options.bytes === String) - object.deviceSignature = ""; - else { - object.deviceSignature = []; - if (options.bytes !== Array) - object.deviceSignature = $util.newBuffer(object.deviceSignature); - } - } - if (message.details != null && message.hasOwnProperty("details")) + 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.accountSignatureKey != null && message.hasOwnProperty("accountSignatureKey")) + if (options.oneofs) + object._details = "details"; + } + if (message.accountSignatureKey != null && message.hasOwnProperty("accountSignatureKey")) { object.accountSignatureKey = options.bytes === String ? $util.base64.encode(message.accountSignatureKey, 0, message.accountSignatureKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.accountSignatureKey) : message.accountSignatureKey; - if (message.accountSignature != null && message.hasOwnProperty("accountSignature")) + if (options.oneofs) + object._accountSignatureKey = "accountSignatureKey"; + } + if (message.accountSignature != null && message.hasOwnProperty("accountSignature")) { object.accountSignature = options.bytes === String ? $util.base64.encode(message.accountSignature, 0, message.accountSignature.length) : options.bytes === Array ? Array.prototype.slice.call(message.accountSignature) : message.accountSignature; - if (message.deviceSignature != null && message.hasOwnProperty("deviceSignature")) + if (options.oneofs) + object._accountSignature = "accountSignature"; + } + if (message.deviceSignature != null && message.hasOwnProperty("deviceSignature")) { object.deviceSignature = options.bytes === String ? $util.base64.encode(message.deviceSignature, 0, message.deviceSignature.length) : options.bytes === Array ? Array.prototype.slice.call(message.deviceSignature) : message.deviceSignature; + if (options.oneofs) + object._deviceSignature = "deviceSignature"; + } return object; }; @@ -963,6 +1129,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ADVSignedDeviceIdentity + * @function getTypeUrl + * @memberof proto.ADVSignedDeviceIdentity + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ADVSignedDeviceIdentity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.ADVSignedDeviceIdentity"; + }; + return ADVSignedDeviceIdentity; })(); @@ -994,27 +1175,48 @@ $root.proto = (function() { /** * ADVSignedDeviceIdentityHMAC details. - * @member {Uint8Array} details + * @member {Uint8Array|null|undefined} details * @memberof proto.ADVSignedDeviceIdentityHMAC * @instance */ - ADVSignedDeviceIdentityHMAC.prototype.details = $util.newBuffer([]); + ADVSignedDeviceIdentityHMAC.prototype.details = null; /** * ADVSignedDeviceIdentityHMAC hmac. - * @member {Uint8Array} hmac + * @member {Uint8Array|null|undefined} hmac * @memberof proto.ADVSignedDeviceIdentityHMAC * @instance */ - ADVSignedDeviceIdentityHMAC.prototype.hmac = $util.newBuffer([]); + ADVSignedDeviceIdentityHMAC.prototype.hmac = null; /** * ADVSignedDeviceIdentityHMAC accountType. - * @member {proto.ADVEncryptionType} accountType + * @member {proto.ADVEncryptionType|null|undefined} accountType * @memberof proto.ADVSignedDeviceIdentityHMAC * @instance */ - ADVSignedDeviceIdentityHMAC.prototype.accountType = 0; + ADVSignedDeviceIdentityHMAC.prototype.accountType = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ADVSignedDeviceIdentityHMAC.prototype, "_details", { + get: $util.oneOfGetter($oneOfFields = ["details"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ADVSignedDeviceIdentityHMAC.prototype, "_hmac", { + get: $util.oneOfGetter($oneOfFields = ["hmac"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ADVSignedDeviceIdentityHMAC.prototype, "_accountType", { + get: $util.oneOfGetter($oneOfFields = ["accountType"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new ADVSignedDeviceIdentityHMAC instance using the specified properties. @@ -1080,15 +1282,18 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.details = reader.bytes(); - break; - case 2: - message.hmac = reader.bytes(); - break; - case 3: - message.accountType = reader.int32(); - break; + case 1: { + message.details = reader.bytes(); + break; + } + case 2: { + message.hmac = reader.bytes(); + break; + } + case 3: { + message.accountType = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -1124,13 +1329,19 @@ $root.proto = (function() { ADVSignedDeviceIdentityHMAC.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.details != null && message.hasOwnProperty("details")) + var properties = {}; + if (message.details != null && message.hasOwnProperty("details")) { + properties._details = 1; if (!(message.details && typeof message.details.length === "number" || $util.isString(message.details))) return "details: buffer expected"; - if (message.hmac != null && message.hasOwnProperty("hmac")) + } + if (message.hmac != null && message.hasOwnProperty("hmac")) { + properties._hmac = 1; if (!(message.hmac && typeof message.hmac.length === "number" || $util.isString(message.hmac))) return "hmac: buffer expected"; - if (message.accountType != null && message.hasOwnProperty("accountType")) + } + if (message.accountType != null && message.hasOwnProperty("accountType")) { + properties._accountType = 1; switch (message.accountType) { default: return "accountType: enum value expected"; @@ -1138,6 +1349,7 @@ $root.proto = (function() { case 1: break; } + } return null; }; @@ -1156,14 +1368,20 @@ $root.proto = (function() { 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) + else if (object.details.length >= 0) message.details = object.details; if (object.hmac != null) if (typeof object.hmac === "string") $util.base64.decode(object.hmac, message.hmac = $util.newBuffer($util.base64.length(object.hmac)), 0); - else if (object.hmac.length) + else if (object.hmac.length >= 0) message.hmac = object.hmac; switch (object.accountType) { + default: + if (typeof object.accountType === "number") { + message.accountType = object.accountType; + break; + } + break; case "E2EE": case 0: message.accountType = 0; @@ -1189,29 +1407,21 @@ $root.proto = (function() { 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.hmac = ""; - else { - object.hmac = []; - if (options.bytes !== Array) - object.hmac = $util.newBuffer(object.hmac); - } - object.accountType = options.enums === String ? "E2EE" : 0; - } - if (message.details != null && message.hasOwnProperty("details")) + 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.hmac != null && message.hasOwnProperty("hmac")) + if (options.oneofs) + object._details = "details"; + } + if (message.hmac != null && message.hasOwnProperty("hmac")) { object.hmac = options.bytes === String ? $util.base64.encode(message.hmac, 0, message.hmac.length) : options.bytes === Array ? Array.prototype.slice.call(message.hmac) : message.hmac; - if (message.accountType != null && message.hasOwnProperty("accountType")) - object.accountType = options.enums === String ? $root.proto.ADVEncryptionType[message.accountType] : message.accountType; + if (options.oneofs) + object._hmac = "hmac"; + } + if (message.accountType != null && message.hasOwnProperty("accountType")) { + object.accountType = options.enums === String ? $root.proto.ADVEncryptionType[message.accountType] === undefined ? message.accountType : $root.proto.ADVEncryptionType[message.accountType] : message.accountType; + if (options.oneofs) + object._accountType = "accountType"; + } return object; }; @@ -1226,6 +1436,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ADVSignedDeviceIdentityHMAC + * @function getTypeUrl + * @memberof proto.ADVSignedDeviceIdentityHMAC + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ADVSignedDeviceIdentityHMAC.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.ADVSignedDeviceIdentityHMAC"; + }; + return ADVSignedDeviceIdentityHMAC; })(); @@ -1257,27 +1482,48 @@ $root.proto = (function() { /** * ADVSignedKeyIndexList details. - * @member {Uint8Array} details + * @member {Uint8Array|null|undefined} details * @memberof proto.ADVSignedKeyIndexList * @instance */ - ADVSignedKeyIndexList.prototype.details = $util.newBuffer([]); + ADVSignedKeyIndexList.prototype.details = null; /** * ADVSignedKeyIndexList accountSignature. - * @member {Uint8Array} accountSignature + * @member {Uint8Array|null|undefined} accountSignature * @memberof proto.ADVSignedKeyIndexList * @instance */ - ADVSignedKeyIndexList.prototype.accountSignature = $util.newBuffer([]); + ADVSignedKeyIndexList.prototype.accountSignature = null; /** * ADVSignedKeyIndexList accountSignatureKey. - * @member {Uint8Array} accountSignatureKey + * @member {Uint8Array|null|undefined} accountSignatureKey * @memberof proto.ADVSignedKeyIndexList * @instance */ - ADVSignedKeyIndexList.prototype.accountSignatureKey = $util.newBuffer([]); + ADVSignedKeyIndexList.prototype.accountSignatureKey = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ADVSignedKeyIndexList.prototype, "_details", { + get: $util.oneOfGetter($oneOfFields = ["details"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ADVSignedKeyIndexList.prototype, "_accountSignature", { + get: $util.oneOfGetter($oneOfFields = ["accountSignature"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ADVSignedKeyIndexList.prototype, "_accountSignatureKey", { + get: $util.oneOfGetter($oneOfFields = ["accountSignatureKey"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new ADVSignedKeyIndexList instance using the specified properties. @@ -1343,15 +1589,18 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.details = reader.bytes(); - break; - case 2: - message.accountSignature = reader.bytes(); - break; - case 3: - message.accountSignatureKey = reader.bytes(); - break; + case 1: { + message.details = reader.bytes(); + break; + } + case 2: { + message.accountSignature = reader.bytes(); + break; + } + case 3: { + message.accountSignatureKey = reader.bytes(); + break; + } default: reader.skipType(tag & 7); break; @@ -1387,15 +1636,22 @@ $root.proto = (function() { ADVSignedKeyIndexList.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.details != null && message.hasOwnProperty("details")) + var properties = {}; + if (message.details != null && message.hasOwnProperty("details")) { + properties._details = 1; if (!(message.details && typeof message.details.length === "number" || $util.isString(message.details))) return "details: buffer expected"; - if (message.accountSignature != null && message.hasOwnProperty("accountSignature")) + } + if (message.accountSignature != null && message.hasOwnProperty("accountSignature")) { + properties._accountSignature = 1; if (!(message.accountSignature && typeof message.accountSignature.length === "number" || $util.isString(message.accountSignature))) return "accountSignature: buffer expected"; - if (message.accountSignatureKey != null && message.hasOwnProperty("accountSignatureKey")) + } + if (message.accountSignatureKey != null && message.hasOwnProperty("accountSignatureKey")) { + properties._accountSignatureKey = 1; if (!(message.accountSignatureKey && typeof message.accountSignatureKey.length === "number" || $util.isString(message.accountSignatureKey))) return "accountSignatureKey: buffer expected"; + } return null; }; @@ -1414,17 +1670,17 @@ $root.proto = (function() { 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) + else if (object.details.length >= 0) message.details = object.details; if (object.accountSignature != null) if (typeof object.accountSignature === "string") $util.base64.decode(object.accountSignature, message.accountSignature = $util.newBuffer($util.base64.length(object.accountSignature)), 0); - else if (object.accountSignature.length) + else if (object.accountSignature.length >= 0) message.accountSignature = object.accountSignature; if (object.accountSignatureKey != null) if (typeof object.accountSignatureKey === "string") $util.base64.decode(object.accountSignatureKey, message.accountSignatureKey = $util.newBuffer($util.base64.length(object.accountSignatureKey)), 0); - else if (object.accountSignatureKey.length) + else if (object.accountSignatureKey.length >= 0) message.accountSignatureKey = object.accountSignatureKey; return message; }; @@ -1442,35 +1698,21 @@ $root.proto = (function() { 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.accountSignature = ""; - else { - object.accountSignature = []; - if (options.bytes !== Array) - object.accountSignature = $util.newBuffer(object.accountSignature); - } - if (options.bytes === String) - object.accountSignatureKey = ""; - else { - object.accountSignatureKey = []; - if (options.bytes !== Array) - object.accountSignatureKey = $util.newBuffer(object.accountSignatureKey); - } - } - if (message.details != null && message.hasOwnProperty("details")) + 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.accountSignature != null && message.hasOwnProperty("accountSignature")) + if (options.oneofs) + object._details = "details"; + } + if (message.accountSignature != null && message.hasOwnProperty("accountSignature")) { object.accountSignature = options.bytes === String ? $util.base64.encode(message.accountSignature, 0, message.accountSignature.length) : options.bytes === Array ? Array.prototype.slice.call(message.accountSignature) : message.accountSignature; - if (message.accountSignatureKey != null && message.hasOwnProperty("accountSignatureKey")) + if (options.oneofs) + object._accountSignature = "accountSignature"; + } + if (message.accountSignatureKey != null && message.hasOwnProperty("accountSignatureKey")) { object.accountSignatureKey = options.bytes === String ? $util.base64.encode(message.accountSignatureKey, 0, message.accountSignatureKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.accountSignatureKey) : message.accountSignatureKey; + if (options.oneofs) + object._accountSignatureKey = "accountSignatureKey"; + } return object; }; @@ -1485,9 +1727,5738 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ADVSignedKeyIndexList + * @function getTypeUrl + * @memberof proto.ADVSignedKeyIndexList + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ADVSignedKeyIndexList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.ADVSignedKeyIndexList"; + }; + return ADVSignedKeyIndexList; })(); + proto.AIRichResponseMessage = (function() { + + /** + * Properties of a AIRichResponseMessage. + * @memberof proto + * @interface IAIRichResponseMessage + * @property {proto.AIRichResponseMessage.AIRichResponseMessageType|null} [messageType] AIRichResponseMessage messageType + * @property {Array.|null} [submessages] AIRichResponseMessage submessages + * @property {proto.AIRichResponseMessage.IAIRichResponseAbstractData|null} [abstractData] AIRichResponseMessage abstractData + */ + + /** + * Constructs a new AIRichResponseMessage. + * @memberof proto + * @classdesc Represents a AIRichResponseMessage. + * @implements IAIRichResponseMessage + * @constructor + * @param {proto.IAIRichResponseMessage=} [properties] Properties to set + */ + function AIRichResponseMessage(properties) { + this.submessages = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AIRichResponseMessage messageType. + * @member {proto.AIRichResponseMessage.AIRichResponseMessageType|null|undefined} messageType + * @memberof proto.AIRichResponseMessage + * @instance + */ + AIRichResponseMessage.prototype.messageType = null; + + /** + * AIRichResponseMessage submessages. + * @member {Array.} submessages + * @memberof proto.AIRichResponseMessage + * @instance + */ + AIRichResponseMessage.prototype.submessages = $util.emptyArray; + + /** + * AIRichResponseMessage abstractData. + * @member {proto.AIRichResponseMessage.IAIRichResponseAbstractData|null|undefined} abstractData + * @memberof proto.AIRichResponseMessage + * @instance + */ + AIRichResponseMessage.prototype.abstractData = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AIRichResponseMessage.prototype, "_messageType", { + get: $util.oneOfGetter($oneOfFields = ["messageType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AIRichResponseMessage.prototype, "_abstractData", { + get: $util.oneOfGetter($oneOfFields = ["abstractData"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AIRichResponseMessage instance using the specified properties. + * @function create + * @memberof proto.AIRichResponseMessage + * @static + * @param {proto.IAIRichResponseMessage=} [properties] Properties to set + * @returns {proto.AIRichResponseMessage} AIRichResponseMessage instance + */ + AIRichResponseMessage.create = function create(properties) { + return new AIRichResponseMessage(properties); + }; + + /** + * Encodes the specified AIRichResponseMessage message. Does not implicitly {@link proto.AIRichResponseMessage.verify|verify} messages. + * @function encode + * @memberof proto.AIRichResponseMessage + * @static + * @param {proto.IAIRichResponseMessage} message AIRichResponseMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AIRichResponseMessage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.messageType != null && Object.hasOwnProperty.call(message, "messageType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.messageType); + if (message.submessages != null && message.submessages.length) + for (var i = 0; i < message.submessages.length; ++i) + $root.proto.AIRichResponseMessage.AIRichResponseSubMessage.encode(message.submessages[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.abstractData != null && Object.hasOwnProperty.call(message, "abstractData")) + $root.proto.AIRichResponseMessage.AIRichResponseAbstractData.encode(message.abstractData, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AIRichResponseMessage message, length delimited. Does not implicitly {@link proto.AIRichResponseMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.AIRichResponseMessage + * @static + * @param {proto.IAIRichResponseMessage} message AIRichResponseMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AIRichResponseMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a AIRichResponseMessage message from the specified reader or buffer. + * @function decode + * @memberof proto.AIRichResponseMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.AIRichResponseMessage} AIRichResponseMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AIRichResponseMessage.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.AIRichResponseMessage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.messageType = reader.int32(); + break; + } + case 2: { + if (!(message.submessages && message.submessages.length)) + message.submessages = []; + message.submessages.push($root.proto.AIRichResponseMessage.AIRichResponseSubMessage.decode(reader, reader.uint32())); + break; + } + case 3: { + message.abstractData = $root.proto.AIRichResponseMessage.AIRichResponseAbstractData.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a AIRichResponseMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.AIRichResponseMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.AIRichResponseMessage} AIRichResponseMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AIRichResponseMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a AIRichResponseMessage message. + * @function verify + * @memberof proto.AIRichResponseMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AIRichResponseMessage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.messageType != null && message.hasOwnProperty("messageType")) { + properties._messageType = 1; + switch (message.messageType) { + default: + return "messageType: enum value expected"; + case 0: + case 1: + break; + } + } + if (message.submessages != null && message.hasOwnProperty("submessages")) { + if (!Array.isArray(message.submessages)) + return "submessages: array expected"; + for (var i = 0; i < message.submessages.length; ++i) { + var error = $root.proto.AIRichResponseMessage.AIRichResponseSubMessage.verify(message.submessages[i]); + if (error) + return "submessages." + error; + } + } + if (message.abstractData != null && message.hasOwnProperty("abstractData")) { + properties._abstractData = 1; + { + var error = $root.proto.AIRichResponseMessage.AIRichResponseAbstractData.verify(message.abstractData); + if (error) + return "abstractData." + error; + } + } + return null; + }; + + /** + * Creates a AIRichResponseMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.AIRichResponseMessage + * @static + * @param {Object.} object Plain object + * @returns {proto.AIRichResponseMessage} AIRichResponseMessage + */ + AIRichResponseMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.AIRichResponseMessage) + return object; + var message = new $root.proto.AIRichResponseMessage(); + switch (object.messageType) { + default: + if (typeof object.messageType === "number") { + message.messageType = object.messageType; + break; + } + break; + case "AI_RICH_RESPONSE_TYPE_UNKNOWN": + case 0: + message.messageType = 0; + break; + case "AI_RICH_RESPONSE_TYPE_STANDARD": + case 1: + message.messageType = 1; + break; + } + if (object.submessages) { + if (!Array.isArray(object.submessages)) + throw TypeError(".proto.AIRichResponseMessage.submessages: array expected"); + message.submessages = []; + for (var i = 0; i < object.submessages.length; ++i) { + if (typeof object.submessages[i] !== "object") + throw TypeError(".proto.AIRichResponseMessage.submessages: object expected"); + message.submessages[i] = $root.proto.AIRichResponseMessage.AIRichResponseSubMessage.fromObject(object.submessages[i]); + } + } + if (object.abstractData != null) { + if (typeof object.abstractData !== "object") + throw TypeError(".proto.AIRichResponseMessage.abstractData: object expected"); + message.abstractData = $root.proto.AIRichResponseMessage.AIRichResponseAbstractData.fromObject(object.abstractData); + } + return message; + }; + + /** + * Creates a plain object from a AIRichResponseMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.AIRichResponseMessage + * @static + * @param {proto.AIRichResponseMessage} message AIRichResponseMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AIRichResponseMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.submessages = []; + if (message.messageType != null && message.hasOwnProperty("messageType")) { + object.messageType = options.enums === String ? $root.proto.AIRichResponseMessage.AIRichResponseMessageType[message.messageType] === undefined ? message.messageType : $root.proto.AIRichResponseMessage.AIRichResponseMessageType[message.messageType] : message.messageType; + if (options.oneofs) + object._messageType = "messageType"; + } + if (message.submessages && message.submessages.length) { + object.submessages = []; + for (var j = 0; j < message.submessages.length; ++j) + object.submessages[j] = $root.proto.AIRichResponseMessage.AIRichResponseSubMessage.toObject(message.submessages[j], options); + } + if (message.abstractData != null && message.hasOwnProperty("abstractData")) { + object.abstractData = $root.proto.AIRichResponseMessage.AIRichResponseAbstractData.toObject(message.abstractData, options); + if (options.oneofs) + object._abstractData = "abstractData"; + } + return object; + }; + + /** + * Converts this AIRichResponseMessage to JSON. + * @function toJSON + * @memberof proto.AIRichResponseMessage + * @instance + * @returns {Object.} JSON object + */ + AIRichResponseMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AIRichResponseMessage + * @function getTypeUrl + * @memberof proto.AIRichResponseMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AIRichResponseMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.AIRichResponseMessage"; + }; + + AIRichResponseMessage.AIRichResponseAbstractData = (function() { + + /** + * Properties of a AIRichResponseAbstractData. + * @memberof proto.AIRichResponseMessage + * @interface IAIRichResponseAbstractData + * @property {Uint8Array|null} [data] AIRichResponseAbstractData data + */ + + /** + * Constructs a new AIRichResponseAbstractData. + * @memberof proto.AIRichResponseMessage + * @classdesc Represents a AIRichResponseAbstractData. + * @implements IAIRichResponseAbstractData + * @constructor + * @param {proto.AIRichResponseMessage.IAIRichResponseAbstractData=} [properties] Properties to set + */ + function AIRichResponseAbstractData(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AIRichResponseAbstractData data. + * @member {Uint8Array|null|undefined} data + * @memberof proto.AIRichResponseMessage.AIRichResponseAbstractData + * @instance + */ + AIRichResponseAbstractData.prototype.data = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AIRichResponseAbstractData.prototype, "_data", { + get: $util.oneOfGetter($oneOfFields = ["data"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AIRichResponseAbstractData instance using the specified properties. + * @function create + * @memberof proto.AIRichResponseMessage.AIRichResponseAbstractData + * @static + * @param {proto.AIRichResponseMessage.IAIRichResponseAbstractData=} [properties] Properties to set + * @returns {proto.AIRichResponseMessage.AIRichResponseAbstractData} AIRichResponseAbstractData instance + */ + AIRichResponseAbstractData.create = function create(properties) { + return new AIRichResponseAbstractData(properties); + }; + + /** + * Encodes the specified AIRichResponseAbstractData message. Does not implicitly {@link proto.AIRichResponseMessage.AIRichResponseAbstractData.verify|verify} messages. + * @function encode + * @memberof proto.AIRichResponseMessage.AIRichResponseAbstractData + * @static + * @param {proto.AIRichResponseMessage.IAIRichResponseAbstractData} message AIRichResponseAbstractData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AIRichResponseAbstractData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.data != null && Object.hasOwnProperty.call(message, "data")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.data); + return writer; + }; + + /** + * Encodes the specified AIRichResponseAbstractData message, length delimited. Does not implicitly {@link proto.AIRichResponseMessage.AIRichResponseAbstractData.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.AIRichResponseMessage.AIRichResponseAbstractData + * @static + * @param {proto.AIRichResponseMessage.IAIRichResponseAbstractData} message AIRichResponseAbstractData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AIRichResponseAbstractData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a AIRichResponseAbstractData message from the specified reader or buffer. + * @function decode + * @memberof proto.AIRichResponseMessage.AIRichResponseAbstractData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.AIRichResponseMessage.AIRichResponseAbstractData} AIRichResponseAbstractData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AIRichResponseAbstractData.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.AIRichResponseMessage.AIRichResponseAbstractData(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.data = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a AIRichResponseAbstractData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.AIRichResponseMessage.AIRichResponseAbstractData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.AIRichResponseMessage.AIRichResponseAbstractData} AIRichResponseAbstractData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AIRichResponseAbstractData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a AIRichResponseAbstractData message. + * @function verify + * @memberof proto.AIRichResponseMessage.AIRichResponseAbstractData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AIRichResponseAbstractData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.data != null && message.hasOwnProperty("data")) { + properties._data = 1; + if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) + return "data: buffer expected"; + } + return null; + }; + + /** + * Creates a AIRichResponseAbstractData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.AIRichResponseMessage.AIRichResponseAbstractData + * @static + * @param {Object.} object Plain object + * @returns {proto.AIRichResponseMessage.AIRichResponseAbstractData} AIRichResponseAbstractData + */ + AIRichResponseAbstractData.fromObject = function fromObject(object) { + if (object instanceof $root.proto.AIRichResponseMessage.AIRichResponseAbstractData) + return object; + var message = new $root.proto.AIRichResponseMessage.AIRichResponseAbstractData(); + if (object.data != null) + if (typeof object.data === "string") + $util.base64.decode(object.data, message.data = $util.newBuffer($util.base64.length(object.data)), 0); + else if (object.data.length >= 0) + message.data = object.data; + return message; + }; + + /** + * Creates a plain object from a AIRichResponseAbstractData message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.AIRichResponseMessage.AIRichResponseAbstractData + * @static + * @param {proto.AIRichResponseMessage.AIRichResponseAbstractData} message AIRichResponseAbstractData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AIRichResponseAbstractData.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.data != null && message.hasOwnProperty("data")) { + object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; + if (options.oneofs) + object._data = "data"; + } + return object; + }; + + /** + * Converts this AIRichResponseAbstractData to JSON. + * @function toJSON + * @memberof proto.AIRichResponseMessage.AIRichResponseAbstractData + * @instance + * @returns {Object.} JSON object + */ + AIRichResponseAbstractData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AIRichResponseAbstractData + * @function getTypeUrl + * @memberof proto.AIRichResponseMessage.AIRichResponseAbstractData + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AIRichResponseAbstractData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.AIRichResponseMessage.AIRichResponseAbstractData"; + }; + + return AIRichResponseAbstractData; + })(); + + AIRichResponseMessage.AIRichResponseCodeMetadata = (function() { + + /** + * Properties of a AIRichResponseCodeMetadata. + * @memberof proto.AIRichResponseMessage + * @interface IAIRichResponseCodeMetadata + * @property {string|null} [codeLanguage] AIRichResponseCodeMetadata codeLanguage + * @property {Array.|null} [codeBlocks] AIRichResponseCodeMetadata codeBlocks + */ + + /** + * Constructs a new AIRichResponseCodeMetadata. + * @memberof proto.AIRichResponseMessage + * @classdesc Represents a AIRichResponseCodeMetadata. + * @implements IAIRichResponseCodeMetadata + * @constructor + * @param {proto.AIRichResponseMessage.IAIRichResponseCodeMetadata=} [properties] Properties to set + */ + function AIRichResponseCodeMetadata(properties) { + this.codeBlocks = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AIRichResponseCodeMetadata codeLanguage. + * @member {string|null|undefined} codeLanguage + * @memberof proto.AIRichResponseMessage.AIRichResponseCodeMetadata + * @instance + */ + AIRichResponseCodeMetadata.prototype.codeLanguage = null; + + /** + * AIRichResponseCodeMetadata codeBlocks. + * @member {Array.} codeBlocks + * @memberof proto.AIRichResponseMessage.AIRichResponseCodeMetadata + * @instance + */ + AIRichResponseCodeMetadata.prototype.codeBlocks = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AIRichResponseCodeMetadata.prototype, "_codeLanguage", { + get: $util.oneOfGetter($oneOfFields = ["codeLanguage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AIRichResponseCodeMetadata instance using the specified properties. + * @function create + * @memberof proto.AIRichResponseMessage.AIRichResponseCodeMetadata + * @static + * @param {proto.AIRichResponseMessage.IAIRichResponseCodeMetadata=} [properties] Properties to set + * @returns {proto.AIRichResponseMessage.AIRichResponseCodeMetadata} AIRichResponseCodeMetadata instance + */ + AIRichResponseCodeMetadata.create = function create(properties) { + return new AIRichResponseCodeMetadata(properties); + }; + + /** + * Encodes the specified AIRichResponseCodeMetadata message. Does not implicitly {@link proto.AIRichResponseMessage.AIRichResponseCodeMetadata.verify|verify} messages. + * @function encode + * @memberof proto.AIRichResponseMessage.AIRichResponseCodeMetadata + * @static + * @param {proto.AIRichResponseMessage.IAIRichResponseCodeMetadata} message AIRichResponseCodeMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AIRichResponseCodeMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.codeLanguage != null && Object.hasOwnProperty.call(message, "codeLanguage")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.codeLanguage); + if (message.codeBlocks != null && message.codeBlocks.length) + for (var i = 0; i < message.codeBlocks.length; ++i) + $root.proto.AIRichResponseMessage.AIRichResponseCodeMetadata.AIRichResponseCodeBlock.encode(message.codeBlocks[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AIRichResponseCodeMetadata message, length delimited. Does not implicitly {@link proto.AIRichResponseMessage.AIRichResponseCodeMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.AIRichResponseMessage.AIRichResponseCodeMetadata + * @static + * @param {proto.AIRichResponseMessage.IAIRichResponseCodeMetadata} message AIRichResponseCodeMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AIRichResponseCodeMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a AIRichResponseCodeMetadata message from the specified reader or buffer. + * @function decode + * @memberof proto.AIRichResponseMessage.AIRichResponseCodeMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.AIRichResponseMessage.AIRichResponseCodeMetadata} AIRichResponseCodeMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AIRichResponseCodeMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.AIRichResponseMessage.AIRichResponseCodeMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.codeLanguage = reader.string(); + break; + } + case 2: { + if (!(message.codeBlocks && message.codeBlocks.length)) + message.codeBlocks = []; + message.codeBlocks.push($root.proto.AIRichResponseMessage.AIRichResponseCodeMetadata.AIRichResponseCodeBlock.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a AIRichResponseCodeMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.AIRichResponseMessage.AIRichResponseCodeMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.AIRichResponseMessage.AIRichResponseCodeMetadata} AIRichResponseCodeMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AIRichResponseCodeMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a AIRichResponseCodeMetadata message. + * @function verify + * @memberof proto.AIRichResponseMessage.AIRichResponseCodeMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AIRichResponseCodeMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.codeLanguage != null && message.hasOwnProperty("codeLanguage")) { + properties._codeLanguage = 1; + if (!$util.isString(message.codeLanguage)) + return "codeLanguage: string expected"; + } + if (message.codeBlocks != null && message.hasOwnProperty("codeBlocks")) { + if (!Array.isArray(message.codeBlocks)) + return "codeBlocks: array expected"; + for (var i = 0; i < message.codeBlocks.length; ++i) { + var error = $root.proto.AIRichResponseMessage.AIRichResponseCodeMetadata.AIRichResponseCodeBlock.verify(message.codeBlocks[i]); + if (error) + return "codeBlocks." + error; + } + } + return null; + }; + + /** + * Creates a AIRichResponseCodeMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.AIRichResponseMessage.AIRichResponseCodeMetadata + * @static + * @param {Object.} object Plain object + * @returns {proto.AIRichResponseMessage.AIRichResponseCodeMetadata} AIRichResponseCodeMetadata + */ + AIRichResponseCodeMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.proto.AIRichResponseMessage.AIRichResponseCodeMetadata) + return object; + var message = new $root.proto.AIRichResponseMessage.AIRichResponseCodeMetadata(); + if (object.codeLanguage != null) + message.codeLanguage = String(object.codeLanguage); + if (object.codeBlocks) { + if (!Array.isArray(object.codeBlocks)) + throw TypeError(".proto.AIRichResponseMessage.AIRichResponseCodeMetadata.codeBlocks: array expected"); + message.codeBlocks = []; + for (var i = 0; i < object.codeBlocks.length; ++i) { + if (typeof object.codeBlocks[i] !== "object") + throw TypeError(".proto.AIRichResponseMessage.AIRichResponseCodeMetadata.codeBlocks: object expected"); + message.codeBlocks[i] = $root.proto.AIRichResponseMessage.AIRichResponseCodeMetadata.AIRichResponseCodeBlock.fromObject(object.codeBlocks[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a AIRichResponseCodeMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.AIRichResponseMessage.AIRichResponseCodeMetadata + * @static + * @param {proto.AIRichResponseMessage.AIRichResponseCodeMetadata} message AIRichResponseCodeMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AIRichResponseCodeMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.codeBlocks = []; + if (message.codeLanguage != null && message.hasOwnProperty("codeLanguage")) { + object.codeLanguage = message.codeLanguage; + if (options.oneofs) + object._codeLanguage = "codeLanguage"; + } + if (message.codeBlocks && message.codeBlocks.length) { + object.codeBlocks = []; + for (var j = 0; j < message.codeBlocks.length; ++j) + object.codeBlocks[j] = $root.proto.AIRichResponseMessage.AIRichResponseCodeMetadata.AIRichResponseCodeBlock.toObject(message.codeBlocks[j], options); + } + return object; + }; + + /** + * Converts this AIRichResponseCodeMetadata to JSON. + * @function toJSON + * @memberof proto.AIRichResponseMessage.AIRichResponseCodeMetadata + * @instance + * @returns {Object.} JSON object + */ + AIRichResponseCodeMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AIRichResponseCodeMetadata + * @function getTypeUrl + * @memberof proto.AIRichResponseMessage.AIRichResponseCodeMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AIRichResponseCodeMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.AIRichResponseMessage.AIRichResponseCodeMetadata"; + }; + + AIRichResponseCodeMetadata.AIRichResponseCodeBlock = (function() { + + /** + * Properties of a AIRichResponseCodeBlock. + * @memberof proto.AIRichResponseMessage.AIRichResponseCodeMetadata + * @interface IAIRichResponseCodeBlock + * @property {proto.AIRichResponseMessage.AIRichResponseCodeMetadata.AIRichResponseCodeHighlightType|null} [highlightType] AIRichResponseCodeBlock highlightType + * @property {string|null} [codeContent] AIRichResponseCodeBlock codeContent + */ + + /** + * Constructs a new AIRichResponseCodeBlock. + * @memberof proto.AIRichResponseMessage.AIRichResponseCodeMetadata + * @classdesc Represents a AIRichResponseCodeBlock. + * @implements IAIRichResponseCodeBlock + * @constructor + * @param {proto.AIRichResponseMessage.AIRichResponseCodeMetadata.IAIRichResponseCodeBlock=} [properties] Properties to set + */ + function AIRichResponseCodeBlock(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AIRichResponseCodeBlock highlightType. + * @member {proto.AIRichResponseMessage.AIRichResponseCodeMetadata.AIRichResponseCodeHighlightType|null|undefined} highlightType + * @memberof proto.AIRichResponseMessage.AIRichResponseCodeMetadata.AIRichResponseCodeBlock + * @instance + */ + AIRichResponseCodeBlock.prototype.highlightType = null; + + /** + * AIRichResponseCodeBlock codeContent. + * @member {string|null|undefined} codeContent + * @memberof proto.AIRichResponseMessage.AIRichResponseCodeMetadata.AIRichResponseCodeBlock + * @instance + */ + AIRichResponseCodeBlock.prototype.codeContent = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AIRichResponseCodeBlock.prototype, "_highlightType", { + get: $util.oneOfGetter($oneOfFields = ["highlightType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AIRichResponseCodeBlock.prototype, "_codeContent", { + get: $util.oneOfGetter($oneOfFields = ["codeContent"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AIRichResponseCodeBlock instance using the specified properties. + * @function create + * @memberof proto.AIRichResponseMessage.AIRichResponseCodeMetadata.AIRichResponseCodeBlock + * @static + * @param {proto.AIRichResponseMessage.AIRichResponseCodeMetadata.IAIRichResponseCodeBlock=} [properties] Properties to set + * @returns {proto.AIRichResponseMessage.AIRichResponseCodeMetadata.AIRichResponseCodeBlock} AIRichResponseCodeBlock instance + */ + AIRichResponseCodeBlock.create = function create(properties) { + return new AIRichResponseCodeBlock(properties); + }; + + /** + * Encodes the specified AIRichResponseCodeBlock message. Does not implicitly {@link proto.AIRichResponseMessage.AIRichResponseCodeMetadata.AIRichResponseCodeBlock.verify|verify} messages. + * @function encode + * @memberof proto.AIRichResponseMessage.AIRichResponseCodeMetadata.AIRichResponseCodeBlock + * @static + * @param {proto.AIRichResponseMessage.AIRichResponseCodeMetadata.IAIRichResponseCodeBlock} message AIRichResponseCodeBlock message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AIRichResponseCodeBlock.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.highlightType != null && Object.hasOwnProperty.call(message, "highlightType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.highlightType); + if (message.codeContent != null && Object.hasOwnProperty.call(message, "codeContent")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.codeContent); + return writer; + }; + + /** + * Encodes the specified AIRichResponseCodeBlock message, length delimited. Does not implicitly {@link proto.AIRichResponseMessage.AIRichResponseCodeMetadata.AIRichResponseCodeBlock.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.AIRichResponseMessage.AIRichResponseCodeMetadata.AIRichResponseCodeBlock + * @static + * @param {proto.AIRichResponseMessage.AIRichResponseCodeMetadata.IAIRichResponseCodeBlock} message AIRichResponseCodeBlock message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AIRichResponseCodeBlock.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a AIRichResponseCodeBlock message from the specified reader or buffer. + * @function decode + * @memberof proto.AIRichResponseMessage.AIRichResponseCodeMetadata.AIRichResponseCodeBlock + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.AIRichResponseMessage.AIRichResponseCodeMetadata.AIRichResponseCodeBlock} AIRichResponseCodeBlock + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AIRichResponseCodeBlock.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.AIRichResponseMessage.AIRichResponseCodeMetadata.AIRichResponseCodeBlock(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.highlightType = reader.int32(); + break; + } + case 2: { + message.codeContent = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a AIRichResponseCodeBlock message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.AIRichResponseMessage.AIRichResponseCodeMetadata.AIRichResponseCodeBlock + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.AIRichResponseMessage.AIRichResponseCodeMetadata.AIRichResponseCodeBlock} AIRichResponseCodeBlock + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AIRichResponseCodeBlock.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a AIRichResponseCodeBlock message. + * @function verify + * @memberof proto.AIRichResponseMessage.AIRichResponseCodeMetadata.AIRichResponseCodeBlock + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AIRichResponseCodeBlock.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.highlightType != null && message.hasOwnProperty("highlightType")) { + properties._highlightType = 1; + switch (message.highlightType) { + default: + return "highlightType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + } + if (message.codeContent != null && message.hasOwnProperty("codeContent")) { + properties._codeContent = 1; + if (!$util.isString(message.codeContent)) + return "codeContent: string expected"; + } + return null; + }; + + /** + * Creates a AIRichResponseCodeBlock message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.AIRichResponseMessage.AIRichResponseCodeMetadata.AIRichResponseCodeBlock + * @static + * @param {Object.} object Plain object + * @returns {proto.AIRichResponseMessage.AIRichResponseCodeMetadata.AIRichResponseCodeBlock} AIRichResponseCodeBlock + */ + AIRichResponseCodeBlock.fromObject = function fromObject(object) { + if (object instanceof $root.proto.AIRichResponseMessage.AIRichResponseCodeMetadata.AIRichResponseCodeBlock) + return object; + var message = new $root.proto.AIRichResponseMessage.AIRichResponseCodeMetadata.AIRichResponseCodeBlock(); + switch (object.highlightType) { + default: + if (typeof object.highlightType === "number") { + message.highlightType = object.highlightType; + break; + } + break; + case "AI_RICH_RESPONSE_CODE_HIGHLIGHT_DEFAULT": + case 0: + message.highlightType = 0; + break; + case "AI_RICH_RESPONSE_CODE_HIGHLIGHT_KEYWORD": + case 1: + message.highlightType = 1; + break; + case "AI_RICH_RESPONSE_CODE_HIGHLIGHT_METHOD": + case 2: + message.highlightType = 2; + break; + case "AI_RICH_RESPONSE_CODE_HIGHLIGHT_STRING": + case 3: + message.highlightType = 3; + break; + case "AI_RICH_RESPONSE_CODE_HIGHLIGHT_NUMBER": + case 4: + message.highlightType = 4; + break; + case "AI_RICH_RESPONSE_CODE_HIGHLIGHT_COMMENT": + case 5: + message.highlightType = 5; + break; + } + if (object.codeContent != null) + message.codeContent = String(object.codeContent); + return message; + }; + + /** + * Creates a plain object from a AIRichResponseCodeBlock message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.AIRichResponseMessage.AIRichResponseCodeMetadata.AIRichResponseCodeBlock + * @static + * @param {proto.AIRichResponseMessage.AIRichResponseCodeMetadata.AIRichResponseCodeBlock} message AIRichResponseCodeBlock + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AIRichResponseCodeBlock.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.highlightType != null && message.hasOwnProperty("highlightType")) { + object.highlightType = options.enums === String ? $root.proto.AIRichResponseMessage.AIRichResponseCodeMetadata.AIRichResponseCodeHighlightType[message.highlightType] === undefined ? message.highlightType : $root.proto.AIRichResponseMessage.AIRichResponseCodeMetadata.AIRichResponseCodeHighlightType[message.highlightType] : message.highlightType; + if (options.oneofs) + object._highlightType = "highlightType"; + } + if (message.codeContent != null && message.hasOwnProperty("codeContent")) { + object.codeContent = message.codeContent; + if (options.oneofs) + object._codeContent = "codeContent"; + } + return object; + }; + + /** + * Converts this AIRichResponseCodeBlock to JSON. + * @function toJSON + * @memberof proto.AIRichResponseMessage.AIRichResponseCodeMetadata.AIRichResponseCodeBlock + * @instance + * @returns {Object.} JSON object + */ + AIRichResponseCodeBlock.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AIRichResponseCodeBlock + * @function getTypeUrl + * @memberof proto.AIRichResponseMessage.AIRichResponseCodeMetadata.AIRichResponseCodeBlock + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AIRichResponseCodeBlock.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.AIRichResponseMessage.AIRichResponseCodeMetadata.AIRichResponseCodeBlock"; + }; + + return AIRichResponseCodeBlock; + })(); + + /** + * AIRichResponseCodeHighlightType enum. + * @name proto.AIRichResponseMessage.AIRichResponseCodeMetadata.AIRichResponseCodeHighlightType + * @enum {number} + * @property {number} AI_RICH_RESPONSE_CODE_HIGHLIGHT_DEFAULT=0 AI_RICH_RESPONSE_CODE_HIGHLIGHT_DEFAULT value + * @property {number} AI_RICH_RESPONSE_CODE_HIGHLIGHT_KEYWORD=1 AI_RICH_RESPONSE_CODE_HIGHLIGHT_KEYWORD value + * @property {number} AI_RICH_RESPONSE_CODE_HIGHLIGHT_METHOD=2 AI_RICH_RESPONSE_CODE_HIGHLIGHT_METHOD value + * @property {number} AI_RICH_RESPONSE_CODE_HIGHLIGHT_STRING=3 AI_RICH_RESPONSE_CODE_HIGHLIGHT_STRING value + * @property {number} AI_RICH_RESPONSE_CODE_HIGHLIGHT_NUMBER=4 AI_RICH_RESPONSE_CODE_HIGHLIGHT_NUMBER value + * @property {number} AI_RICH_RESPONSE_CODE_HIGHLIGHT_COMMENT=5 AI_RICH_RESPONSE_CODE_HIGHLIGHT_COMMENT value + */ + AIRichResponseCodeMetadata.AIRichResponseCodeHighlightType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "AI_RICH_RESPONSE_CODE_HIGHLIGHT_DEFAULT"] = 0; + values[valuesById[1] = "AI_RICH_RESPONSE_CODE_HIGHLIGHT_KEYWORD"] = 1; + values[valuesById[2] = "AI_RICH_RESPONSE_CODE_HIGHLIGHT_METHOD"] = 2; + values[valuesById[3] = "AI_RICH_RESPONSE_CODE_HIGHLIGHT_STRING"] = 3; + values[valuesById[4] = "AI_RICH_RESPONSE_CODE_HIGHLIGHT_NUMBER"] = 4; + values[valuesById[5] = "AI_RICH_RESPONSE_CODE_HIGHLIGHT_COMMENT"] = 5; + return values; + })(); + + return AIRichResponseCodeMetadata; + })(); + + AIRichResponseMessage.AIRichResponseContentItemsMetadata = (function() { + + /** + * Properties of a AIRichResponseContentItemsMetadata. + * @memberof proto.AIRichResponseMessage + * @interface IAIRichResponseContentItemsMetadata + * @property {Array.|null} [itemsMetadata] AIRichResponseContentItemsMetadata itemsMetadata + * @property {proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.ContentType|null} [contentType] AIRichResponseContentItemsMetadata contentType + */ + + /** + * Constructs a new AIRichResponseContentItemsMetadata. + * @memberof proto.AIRichResponseMessage + * @classdesc Represents a AIRichResponseContentItemsMetadata. + * @implements IAIRichResponseContentItemsMetadata + * @constructor + * @param {proto.AIRichResponseMessage.IAIRichResponseContentItemsMetadata=} [properties] Properties to set + */ + function AIRichResponseContentItemsMetadata(properties) { + this.itemsMetadata = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AIRichResponseContentItemsMetadata itemsMetadata. + * @member {Array.} itemsMetadata + * @memberof proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata + * @instance + */ + AIRichResponseContentItemsMetadata.prototype.itemsMetadata = $util.emptyArray; + + /** + * AIRichResponseContentItemsMetadata contentType. + * @member {proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.ContentType|null|undefined} contentType + * @memberof proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata + * @instance + */ + AIRichResponseContentItemsMetadata.prototype.contentType = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AIRichResponseContentItemsMetadata.prototype, "_contentType", { + get: $util.oneOfGetter($oneOfFields = ["contentType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AIRichResponseContentItemsMetadata instance using the specified properties. + * @function create + * @memberof proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata + * @static + * @param {proto.AIRichResponseMessage.IAIRichResponseContentItemsMetadata=} [properties] Properties to set + * @returns {proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata} AIRichResponseContentItemsMetadata instance + */ + AIRichResponseContentItemsMetadata.create = function create(properties) { + return new AIRichResponseContentItemsMetadata(properties); + }; + + /** + * Encodes the specified AIRichResponseContentItemsMetadata message. Does not implicitly {@link proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.verify|verify} messages. + * @function encode + * @memberof proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata + * @static + * @param {proto.AIRichResponseMessage.IAIRichResponseContentItemsMetadata} message AIRichResponseContentItemsMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AIRichResponseContentItemsMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.itemsMetadata != null && message.itemsMetadata.length) + for (var i = 0; i < message.itemsMetadata.length; ++i) + $root.proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata.encode(message.itemsMetadata[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.contentType != null && Object.hasOwnProperty.call(message, "contentType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.contentType); + return writer; + }; + + /** + * Encodes the specified AIRichResponseContentItemsMetadata message, length delimited. Does not implicitly {@link proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata + * @static + * @param {proto.AIRichResponseMessage.IAIRichResponseContentItemsMetadata} message AIRichResponseContentItemsMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AIRichResponseContentItemsMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a AIRichResponseContentItemsMetadata message from the specified reader or buffer. + * @function decode + * @memberof proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata} AIRichResponseContentItemsMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AIRichResponseContentItemsMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.itemsMetadata && message.itemsMetadata.length)) + message.itemsMetadata = []; + message.itemsMetadata.push($root.proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata.decode(reader, reader.uint32())); + break; + } + case 2: { + message.contentType = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a AIRichResponseContentItemsMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata} AIRichResponseContentItemsMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AIRichResponseContentItemsMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a AIRichResponseContentItemsMetadata message. + * @function verify + * @memberof proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AIRichResponseContentItemsMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.itemsMetadata != null && message.hasOwnProperty("itemsMetadata")) { + if (!Array.isArray(message.itemsMetadata)) + return "itemsMetadata: array expected"; + for (var i = 0; i < message.itemsMetadata.length; ++i) { + var error = $root.proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata.verify(message.itemsMetadata[i]); + if (error) + return "itemsMetadata." + error; + } + } + if (message.contentType != null && message.hasOwnProperty("contentType")) { + properties._contentType = 1; + switch (message.contentType) { + default: + return "contentType: enum value expected"; + case 0: + case 1: + break; + } + } + return null; + }; + + /** + * Creates a AIRichResponseContentItemsMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata + * @static + * @param {Object.} object Plain object + * @returns {proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata} AIRichResponseContentItemsMetadata + */ + AIRichResponseContentItemsMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata) + return object; + var message = new $root.proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata(); + if (object.itemsMetadata) { + if (!Array.isArray(object.itemsMetadata)) + throw TypeError(".proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.itemsMetadata: array expected"); + message.itemsMetadata = []; + for (var i = 0; i < object.itemsMetadata.length; ++i) { + if (typeof object.itemsMetadata[i] !== "object") + throw TypeError(".proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.itemsMetadata: object expected"); + message.itemsMetadata[i] = $root.proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata.fromObject(object.itemsMetadata[i]); + } + } + switch (object.contentType) { + default: + if (typeof object.contentType === "number") { + message.contentType = object.contentType; + break; + } + break; + case "DEFAULT": + case 0: + message.contentType = 0; + break; + case "CAROUSEL": + case 1: + message.contentType = 1; + break; + } + return message; + }; + + /** + * Creates a plain object from a AIRichResponseContentItemsMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata + * @static + * @param {proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata} message AIRichResponseContentItemsMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AIRichResponseContentItemsMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.itemsMetadata = []; + if (message.itemsMetadata && message.itemsMetadata.length) { + object.itemsMetadata = []; + for (var j = 0; j < message.itemsMetadata.length; ++j) + object.itemsMetadata[j] = $root.proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata.toObject(message.itemsMetadata[j], options); + } + if (message.contentType != null && message.hasOwnProperty("contentType")) { + object.contentType = options.enums === String ? $root.proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.ContentType[message.contentType] === undefined ? message.contentType : $root.proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.ContentType[message.contentType] : message.contentType; + if (options.oneofs) + object._contentType = "contentType"; + } + return object; + }; + + /** + * Converts this AIRichResponseContentItemsMetadata to JSON. + * @function toJSON + * @memberof proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata + * @instance + * @returns {Object.} JSON object + */ + AIRichResponseContentItemsMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AIRichResponseContentItemsMetadata + * @function getTypeUrl + * @memberof proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AIRichResponseContentItemsMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata"; + }; + + AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata = (function() { + + /** + * Properties of a AIRichResponseContentItemMetadata. + * @memberof proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata + * @interface IAIRichResponseContentItemMetadata + * @property {proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.IAIRichResponseReelItem|null} [reelItem] AIRichResponseContentItemMetadata reelItem + */ + + /** + * Constructs a new AIRichResponseContentItemMetadata. + * @memberof proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata + * @classdesc Represents a AIRichResponseContentItemMetadata. + * @implements IAIRichResponseContentItemMetadata + * @constructor + * @param {proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.IAIRichResponseContentItemMetadata=} [properties] Properties to set + */ + function AIRichResponseContentItemMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AIRichResponseContentItemMetadata reelItem. + * @member {proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.IAIRichResponseReelItem|null|undefined} reelItem + * @memberof proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata + * @instance + */ + AIRichResponseContentItemMetadata.prototype.reelItem = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AIRichResponseContentItemMetadata aIRichResponseContentItem. + * @member {"reelItem"|undefined} aIRichResponseContentItem + * @memberof proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata + * @instance + */ + Object.defineProperty(AIRichResponseContentItemMetadata.prototype, "aIRichResponseContentItem", { + get: $util.oneOfGetter($oneOfFields = ["reelItem"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AIRichResponseContentItemMetadata instance using the specified properties. + * @function create + * @memberof proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata + * @static + * @param {proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.IAIRichResponseContentItemMetadata=} [properties] Properties to set + * @returns {proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata} AIRichResponseContentItemMetadata instance + */ + AIRichResponseContentItemMetadata.create = function create(properties) { + return new AIRichResponseContentItemMetadata(properties); + }; + + /** + * Encodes the specified AIRichResponseContentItemMetadata message. Does not implicitly {@link proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata.verify|verify} messages. + * @function encode + * @memberof proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata + * @static + * @param {proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.IAIRichResponseContentItemMetadata} message AIRichResponseContentItemMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AIRichResponseContentItemMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.reelItem != null && Object.hasOwnProperty.call(message, "reelItem")) + $root.proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseReelItem.encode(message.reelItem, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AIRichResponseContentItemMetadata message, length delimited. Does not implicitly {@link proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata + * @static + * @param {proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.IAIRichResponseContentItemMetadata} message AIRichResponseContentItemMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AIRichResponseContentItemMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a AIRichResponseContentItemMetadata message from the specified reader or buffer. + * @function decode + * @memberof proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata} AIRichResponseContentItemMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AIRichResponseContentItemMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.reelItem = $root.proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseReelItem.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a AIRichResponseContentItemMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata} AIRichResponseContentItemMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AIRichResponseContentItemMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a AIRichResponseContentItemMetadata message. + * @function verify + * @memberof proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AIRichResponseContentItemMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.reelItem != null && message.hasOwnProperty("reelItem")) { + properties.aIRichResponseContentItem = 1; + { + var error = $root.proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseReelItem.verify(message.reelItem); + if (error) + return "reelItem." + error; + } + } + return null; + }; + + /** + * Creates a AIRichResponseContentItemMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata + * @static + * @param {Object.} object Plain object + * @returns {proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata} AIRichResponseContentItemMetadata + */ + AIRichResponseContentItemMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata) + return object; + var message = new $root.proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata(); + if (object.reelItem != null) { + if (typeof object.reelItem !== "object") + throw TypeError(".proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata.reelItem: object expected"); + message.reelItem = $root.proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseReelItem.fromObject(object.reelItem); + } + return message; + }; + + /** + * Creates a plain object from a AIRichResponseContentItemMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata + * @static + * @param {proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata} message AIRichResponseContentItemMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AIRichResponseContentItemMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.reelItem != null && message.hasOwnProperty("reelItem")) { + object.reelItem = $root.proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseReelItem.toObject(message.reelItem, options); + if (options.oneofs) + object.aIRichResponseContentItem = "reelItem"; + } + return object; + }; + + /** + * Converts this AIRichResponseContentItemMetadata to JSON. + * @function toJSON + * @memberof proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata + * @instance + * @returns {Object.} JSON object + */ + AIRichResponseContentItemMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AIRichResponseContentItemMetadata + * @function getTypeUrl + * @memberof proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AIRichResponseContentItemMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata"; + }; + + return AIRichResponseContentItemMetadata; + })(); + + AIRichResponseContentItemsMetadata.AIRichResponseReelItem = (function() { + + /** + * Properties of a AIRichResponseReelItem. + * @memberof proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata + * @interface IAIRichResponseReelItem + * @property {string|null} [title] AIRichResponseReelItem title + * @property {string|null} [profileIconUrl] AIRichResponseReelItem profileIconUrl + * @property {string|null} [thumbnailUrl] AIRichResponseReelItem thumbnailUrl + * @property {string|null} [videoUrl] AIRichResponseReelItem videoUrl + */ + + /** + * Constructs a new AIRichResponseReelItem. + * @memberof proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata + * @classdesc Represents a AIRichResponseReelItem. + * @implements IAIRichResponseReelItem + * @constructor + * @param {proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.IAIRichResponseReelItem=} [properties] Properties to set + */ + function AIRichResponseReelItem(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AIRichResponseReelItem title. + * @member {string|null|undefined} title + * @memberof proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseReelItem + * @instance + */ + AIRichResponseReelItem.prototype.title = null; + + /** + * AIRichResponseReelItem profileIconUrl. + * @member {string|null|undefined} profileIconUrl + * @memberof proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseReelItem + * @instance + */ + AIRichResponseReelItem.prototype.profileIconUrl = null; + + /** + * AIRichResponseReelItem thumbnailUrl. + * @member {string|null|undefined} thumbnailUrl + * @memberof proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseReelItem + * @instance + */ + AIRichResponseReelItem.prototype.thumbnailUrl = null; + + /** + * AIRichResponseReelItem videoUrl. + * @member {string|null|undefined} videoUrl + * @memberof proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseReelItem + * @instance + */ + AIRichResponseReelItem.prototype.videoUrl = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AIRichResponseReelItem.prototype, "_title", { + get: $util.oneOfGetter($oneOfFields = ["title"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AIRichResponseReelItem.prototype, "_profileIconUrl", { + get: $util.oneOfGetter($oneOfFields = ["profileIconUrl"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AIRichResponseReelItem.prototype, "_thumbnailUrl", { + get: $util.oneOfGetter($oneOfFields = ["thumbnailUrl"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AIRichResponseReelItem.prototype, "_videoUrl", { + get: $util.oneOfGetter($oneOfFields = ["videoUrl"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AIRichResponseReelItem instance using the specified properties. + * @function create + * @memberof proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseReelItem + * @static + * @param {proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.IAIRichResponseReelItem=} [properties] Properties to set + * @returns {proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseReelItem} AIRichResponseReelItem instance + */ + AIRichResponseReelItem.create = function create(properties) { + return new AIRichResponseReelItem(properties); + }; + + /** + * Encodes the specified AIRichResponseReelItem message. Does not implicitly {@link proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseReelItem.verify|verify} messages. + * @function encode + * @memberof proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseReelItem + * @static + * @param {proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.IAIRichResponseReelItem} message AIRichResponseReelItem message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AIRichResponseReelItem.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.profileIconUrl != null && Object.hasOwnProperty.call(message, "profileIconUrl")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.profileIconUrl); + if (message.thumbnailUrl != null && Object.hasOwnProperty.call(message, "thumbnailUrl")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.thumbnailUrl); + if (message.videoUrl != null && Object.hasOwnProperty.call(message, "videoUrl")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.videoUrl); + return writer; + }; + + /** + * Encodes the specified AIRichResponseReelItem message, length delimited. Does not implicitly {@link proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseReelItem.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseReelItem + * @static + * @param {proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.IAIRichResponseReelItem} message AIRichResponseReelItem message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AIRichResponseReelItem.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a AIRichResponseReelItem message from the specified reader or buffer. + * @function decode + * @memberof proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseReelItem + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseReelItem} AIRichResponseReelItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AIRichResponseReelItem.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseReelItem(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.title = reader.string(); + break; + } + case 2: { + message.profileIconUrl = reader.string(); + break; + } + case 3: { + message.thumbnailUrl = reader.string(); + break; + } + case 4: { + message.videoUrl = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a AIRichResponseReelItem message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseReelItem + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseReelItem} AIRichResponseReelItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AIRichResponseReelItem.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a AIRichResponseReelItem message. + * @function verify + * @memberof proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseReelItem + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AIRichResponseReelItem.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.title != null && message.hasOwnProperty("title")) { + properties._title = 1; + if (!$util.isString(message.title)) + return "title: string expected"; + } + if (message.profileIconUrl != null && message.hasOwnProperty("profileIconUrl")) { + properties._profileIconUrl = 1; + if (!$util.isString(message.profileIconUrl)) + return "profileIconUrl: string expected"; + } + if (message.thumbnailUrl != null && message.hasOwnProperty("thumbnailUrl")) { + properties._thumbnailUrl = 1; + if (!$util.isString(message.thumbnailUrl)) + return "thumbnailUrl: string expected"; + } + if (message.videoUrl != null && message.hasOwnProperty("videoUrl")) { + properties._videoUrl = 1; + if (!$util.isString(message.videoUrl)) + return "videoUrl: string expected"; + } + return null; + }; + + /** + * Creates a AIRichResponseReelItem message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseReelItem + * @static + * @param {Object.} object Plain object + * @returns {proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseReelItem} AIRichResponseReelItem + */ + AIRichResponseReelItem.fromObject = function fromObject(object) { + if (object instanceof $root.proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseReelItem) + return object; + var message = new $root.proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseReelItem(); + if (object.title != null) + message.title = String(object.title); + if (object.profileIconUrl != null) + message.profileIconUrl = String(object.profileIconUrl); + if (object.thumbnailUrl != null) + message.thumbnailUrl = String(object.thumbnailUrl); + if (object.videoUrl != null) + message.videoUrl = String(object.videoUrl); + return message; + }; + + /** + * Creates a plain object from a AIRichResponseReelItem message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseReelItem + * @static + * @param {proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseReelItem} message AIRichResponseReelItem + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AIRichResponseReelItem.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.title != null && message.hasOwnProperty("title")) { + object.title = message.title; + if (options.oneofs) + object._title = "title"; + } + if (message.profileIconUrl != null && message.hasOwnProperty("profileIconUrl")) { + object.profileIconUrl = message.profileIconUrl; + if (options.oneofs) + object._profileIconUrl = "profileIconUrl"; + } + if (message.thumbnailUrl != null && message.hasOwnProperty("thumbnailUrl")) { + object.thumbnailUrl = message.thumbnailUrl; + if (options.oneofs) + object._thumbnailUrl = "thumbnailUrl"; + } + if (message.videoUrl != null && message.hasOwnProperty("videoUrl")) { + object.videoUrl = message.videoUrl; + if (options.oneofs) + object._videoUrl = "videoUrl"; + } + return object; + }; + + /** + * Converts this AIRichResponseReelItem to JSON. + * @function toJSON + * @memberof proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseReelItem + * @instance + * @returns {Object.} JSON object + */ + AIRichResponseReelItem.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AIRichResponseReelItem + * @function getTypeUrl + * @memberof proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseReelItem + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AIRichResponseReelItem.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.AIRichResponseReelItem"; + }; + + return AIRichResponseReelItem; + })(); + + /** + * ContentType enum. + * @name proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.ContentType + * @enum {number} + * @property {number} DEFAULT=0 DEFAULT value + * @property {number} CAROUSEL=1 CAROUSEL value + */ + AIRichResponseContentItemsMetadata.ContentType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DEFAULT"] = 0; + values[valuesById[1] = "CAROUSEL"] = 1; + return values; + })(); + + return AIRichResponseContentItemsMetadata; + })(); + + AIRichResponseMessage.AIRichResponseDynamicMetadata = (function() { + + /** + * Properties of a AIRichResponseDynamicMetadata. + * @memberof proto.AIRichResponseMessage + * @interface IAIRichResponseDynamicMetadata + * @property {proto.AIRichResponseMessage.AIRichResponseDynamicMetadata.AIRichResponseDynamicMetadataType|null} [type] AIRichResponseDynamicMetadata type + * @property {number|Long|null} [version] AIRichResponseDynamicMetadata version + * @property {string|null} [url] AIRichResponseDynamicMetadata url + * @property {number|null} [loopCount] AIRichResponseDynamicMetadata loopCount + */ + + /** + * Constructs a new AIRichResponseDynamicMetadata. + * @memberof proto.AIRichResponseMessage + * @classdesc Represents a AIRichResponseDynamicMetadata. + * @implements IAIRichResponseDynamicMetadata + * @constructor + * @param {proto.AIRichResponseMessage.IAIRichResponseDynamicMetadata=} [properties] Properties to set + */ + function AIRichResponseDynamicMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AIRichResponseDynamicMetadata type. + * @member {proto.AIRichResponseMessage.AIRichResponseDynamicMetadata.AIRichResponseDynamicMetadataType|null|undefined} type + * @memberof proto.AIRichResponseMessage.AIRichResponseDynamicMetadata + * @instance + */ + AIRichResponseDynamicMetadata.prototype.type = null; + + /** + * AIRichResponseDynamicMetadata version. + * @member {number|Long|null|undefined} version + * @memberof proto.AIRichResponseMessage.AIRichResponseDynamicMetadata + * @instance + */ + AIRichResponseDynamicMetadata.prototype.version = null; + + /** + * AIRichResponseDynamicMetadata url. + * @member {string|null|undefined} url + * @memberof proto.AIRichResponseMessage.AIRichResponseDynamicMetadata + * @instance + */ + AIRichResponseDynamicMetadata.prototype.url = null; + + /** + * AIRichResponseDynamicMetadata loopCount. + * @member {number|null|undefined} loopCount + * @memberof proto.AIRichResponseMessage.AIRichResponseDynamicMetadata + * @instance + */ + AIRichResponseDynamicMetadata.prototype.loopCount = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AIRichResponseDynamicMetadata.prototype, "_type", { + get: $util.oneOfGetter($oneOfFields = ["type"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AIRichResponseDynamicMetadata.prototype, "_version", { + get: $util.oneOfGetter($oneOfFields = ["version"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AIRichResponseDynamicMetadata.prototype, "_url", { + get: $util.oneOfGetter($oneOfFields = ["url"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AIRichResponseDynamicMetadata.prototype, "_loopCount", { + get: $util.oneOfGetter($oneOfFields = ["loopCount"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AIRichResponseDynamicMetadata instance using the specified properties. + * @function create + * @memberof proto.AIRichResponseMessage.AIRichResponseDynamicMetadata + * @static + * @param {proto.AIRichResponseMessage.IAIRichResponseDynamicMetadata=} [properties] Properties to set + * @returns {proto.AIRichResponseMessage.AIRichResponseDynamicMetadata} AIRichResponseDynamicMetadata instance + */ + AIRichResponseDynamicMetadata.create = function create(properties) { + return new AIRichResponseDynamicMetadata(properties); + }; + + /** + * Encodes the specified AIRichResponseDynamicMetadata message. Does not implicitly {@link proto.AIRichResponseMessage.AIRichResponseDynamicMetadata.verify|verify} messages. + * @function encode + * @memberof proto.AIRichResponseMessage.AIRichResponseDynamicMetadata + * @static + * @param {proto.AIRichResponseMessage.IAIRichResponseDynamicMetadata} message AIRichResponseDynamicMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AIRichResponseDynamicMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.version); + if (message.url != null && Object.hasOwnProperty.call(message, "url")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.url); + if (message.loopCount != null && Object.hasOwnProperty.call(message, "loopCount")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.loopCount); + return writer; + }; + + /** + * Encodes the specified AIRichResponseDynamicMetadata message, length delimited. Does not implicitly {@link proto.AIRichResponseMessage.AIRichResponseDynamicMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.AIRichResponseMessage.AIRichResponseDynamicMetadata + * @static + * @param {proto.AIRichResponseMessage.IAIRichResponseDynamicMetadata} message AIRichResponseDynamicMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AIRichResponseDynamicMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a AIRichResponseDynamicMetadata message from the specified reader or buffer. + * @function decode + * @memberof proto.AIRichResponseMessage.AIRichResponseDynamicMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.AIRichResponseMessage.AIRichResponseDynamicMetadata} AIRichResponseDynamicMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AIRichResponseDynamicMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.AIRichResponseMessage.AIRichResponseDynamicMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.type = reader.int32(); + break; + } + case 2: { + message.version = reader.uint64(); + break; + } + case 3: { + message.url = reader.string(); + break; + } + case 4: { + message.loopCount = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a AIRichResponseDynamicMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.AIRichResponseMessage.AIRichResponseDynamicMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.AIRichResponseMessage.AIRichResponseDynamicMetadata} AIRichResponseDynamicMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AIRichResponseDynamicMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a AIRichResponseDynamicMetadata message. + * @function verify + * @memberof proto.AIRichResponseMessage.AIRichResponseDynamicMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AIRichResponseDynamicMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.type != null && message.hasOwnProperty("type")) { + properties._type = 1; + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.version != null && message.hasOwnProperty("version")) { + properties._version = 1; + if (!$util.isInteger(message.version) && !(message.version && $util.isInteger(message.version.low) && $util.isInteger(message.version.high))) + return "version: integer|Long expected"; + } + if (message.url != null && message.hasOwnProperty("url")) { + properties._url = 1; + if (!$util.isString(message.url)) + return "url: string expected"; + } + if (message.loopCount != null && message.hasOwnProperty("loopCount")) { + properties._loopCount = 1; + if (!$util.isInteger(message.loopCount)) + return "loopCount: integer expected"; + } + return null; + }; + + /** + * Creates a AIRichResponseDynamicMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.AIRichResponseMessage.AIRichResponseDynamicMetadata + * @static + * @param {Object.} object Plain object + * @returns {proto.AIRichResponseMessage.AIRichResponseDynamicMetadata} AIRichResponseDynamicMetadata + */ + AIRichResponseDynamicMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.proto.AIRichResponseMessage.AIRichResponseDynamicMetadata) + return object; + var message = new $root.proto.AIRichResponseMessage.AIRichResponseDynamicMetadata(); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "AI_RICH_RESPONSE_DYNAMIC_METADATA_TYPE_UNKNOWN": + case 0: + message.type = 0; + break; + case "AI_RICH_RESPONSE_DYNAMIC_METADATA_TYPE_IMAGE": + case 1: + message.type = 1; + break; + case "AI_RICH_RESPONSE_DYNAMIC_METADATA_TYPE_GIF": + case 2: + message.type = 2; + break; + } + if (object.version != null) + if ($util.Long) + (message.version = $util.Long.fromValue(object.version)).unsigned = true; + else if (typeof object.version === "string") + message.version = parseInt(object.version, 10); + else if (typeof object.version === "number") + message.version = object.version; + else if (typeof object.version === "object") + message.version = new $util.LongBits(object.version.low >>> 0, object.version.high >>> 0).toNumber(true); + if (object.url != null) + message.url = String(object.url); + if (object.loopCount != null) + message.loopCount = object.loopCount >>> 0; + return message; + }; + + /** + * Creates a plain object from a AIRichResponseDynamicMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.AIRichResponseMessage.AIRichResponseDynamicMetadata + * @static + * @param {proto.AIRichResponseMessage.AIRichResponseDynamicMetadata} message AIRichResponseDynamicMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AIRichResponseDynamicMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.type != null && message.hasOwnProperty("type")) { + object.type = options.enums === String ? $root.proto.AIRichResponseMessage.AIRichResponseDynamicMetadata.AIRichResponseDynamicMetadataType[message.type] === undefined ? message.type : $root.proto.AIRichResponseMessage.AIRichResponseDynamicMetadata.AIRichResponseDynamicMetadataType[message.type] : message.type; + if (options.oneofs) + object._type = "type"; + } + if (message.version != null && message.hasOwnProperty("version")) { + if (typeof message.version === "number") + object.version = options.longs === String ? String(message.version) : message.version; + else + object.version = options.longs === String ? $util.Long.prototype.toString.call(message.version) : options.longs === Number ? new $util.LongBits(message.version.low >>> 0, message.version.high >>> 0).toNumber(true) : message.version; + if (options.oneofs) + object._version = "version"; + } + if (message.url != null && message.hasOwnProperty("url")) { + object.url = message.url; + if (options.oneofs) + object._url = "url"; + } + if (message.loopCount != null && message.hasOwnProperty("loopCount")) { + object.loopCount = message.loopCount; + if (options.oneofs) + object._loopCount = "loopCount"; + } + return object; + }; + + /** + * Converts this AIRichResponseDynamicMetadata to JSON. + * @function toJSON + * @memberof proto.AIRichResponseMessage.AIRichResponseDynamicMetadata + * @instance + * @returns {Object.} JSON object + */ + AIRichResponseDynamicMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AIRichResponseDynamicMetadata + * @function getTypeUrl + * @memberof proto.AIRichResponseMessage.AIRichResponseDynamicMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AIRichResponseDynamicMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.AIRichResponseMessage.AIRichResponseDynamicMetadata"; + }; + + /** + * AIRichResponseDynamicMetadataType enum. + * @name proto.AIRichResponseMessage.AIRichResponseDynamicMetadata.AIRichResponseDynamicMetadataType + * @enum {number} + * @property {number} AI_RICH_RESPONSE_DYNAMIC_METADATA_TYPE_UNKNOWN=0 AI_RICH_RESPONSE_DYNAMIC_METADATA_TYPE_UNKNOWN value + * @property {number} AI_RICH_RESPONSE_DYNAMIC_METADATA_TYPE_IMAGE=1 AI_RICH_RESPONSE_DYNAMIC_METADATA_TYPE_IMAGE value + * @property {number} AI_RICH_RESPONSE_DYNAMIC_METADATA_TYPE_GIF=2 AI_RICH_RESPONSE_DYNAMIC_METADATA_TYPE_GIF value + */ + AIRichResponseDynamicMetadata.AIRichResponseDynamicMetadataType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "AI_RICH_RESPONSE_DYNAMIC_METADATA_TYPE_UNKNOWN"] = 0; + values[valuesById[1] = "AI_RICH_RESPONSE_DYNAMIC_METADATA_TYPE_IMAGE"] = 1; + values[valuesById[2] = "AI_RICH_RESPONSE_DYNAMIC_METADATA_TYPE_GIF"] = 2; + return values; + })(); + + return AIRichResponseDynamicMetadata; + })(); + + AIRichResponseMessage.AIRichResponseGridImageMetadata = (function() { + + /** + * Properties of a AIRichResponseGridImageMetadata. + * @memberof proto.AIRichResponseMessage + * @interface IAIRichResponseGridImageMetadata + * @property {proto.AIRichResponseMessage.IAIRichResponseImageURL|null} [gridImageUrl] AIRichResponseGridImageMetadata gridImageUrl + * @property {Array.|null} [imageUrls] AIRichResponseGridImageMetadata imageUrls + */ + + /** + * Constructs a new AIRichResponseGridImageMetadata. + * @memberof proto.AIRichResponseMessage + * @classdesc Represents a AIRichResponseGridImageMetadata. + * @implements IAIRichResponseGridImageMetadata + * @constructor + * @param {proto.AIRichResponseMessage.IAIRichResponseGridImageMetadata=} [properties] Properties to set + */ + function AIRichResponseGridImageMetadata(properties) { + this.imageUrls = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AIRichResponseGridImageMetadata gridImageUrl. + * @member {proto.AIRichResponseMessage.IAIRichResponseImageURL|null|undefined} gridImageUrl + * @memberof proto.AIRichResponseMessage.AIRichResponseGridImageMetadata + * @instance + */ + AIRichResponseGridImageMetadata.prototype.gridImageUrl = null; + + /** + * AIRichResponseGridImageMetadata imageUrls. + * @member {Array.} imageUrls + * @memberof proto.AIRichResponseMessage.AIRichResponseGridImageMetadata + * @instance + */ + AIRichResponseGridImageMetadata.prototype.imageUrls = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AIRichResponseGridImageMetadata.prototype, "_gridImageUrl", { + get: $util.oneOfGetter($oneOfFields = ["gridImageUrl"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AIRichResponseGridImageMetadata instance using the specified properties. + * @function create + * @memberof proto.AIRichResponseMessage.AIRichResponseGridImageMetadata + * @static + * @param {proto.AIRichResponseMessage.IAIRichResponseGridImageMetadata=} [properties] Properties to set + * @returns {proto.AIRichResponseMessage.AIRichResponseGridImageMetadata} AIRichResponseGridImageMetadata instance + */ + AIRichResponseGridImageMetadata.create = function create(properties) { + return new AIRichResponseGridImageMetadata(properties); + }; + + /** + * Encodes the specified AIRichResponseGridImageMetadata message. Does not implicitly {@link proto.AIRichResponseMessage.AIRichResponseGridImageMetadata.verify|verify} messages. + * @function encode + * @memberof proto.AIRichResponseMessage.AIRichResponseGridImageMetadata + * @static + * @param {proto.AIRichResponseMessage.IAIRichResponseGridImageMetadata} message AIRichResponseGridImageMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AIRichResponseGridImageMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.gridImageUrl != null && Object.hasOwnProperty.call(message, "gridImageUrl")) + $root.proto.AIRichResponseMessage.AIRichResponseImageURL.encode(message.gridImageUrl, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.imageUrls != null && message.imageUrls.length) + for (var i = 0; i < message.imageUrls.length; ++i) + $root.proto.AIRichResponseMessage.AIRichResponseImageURL.encode(message.imageUrls[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AIRichResponseGridImageMetadata message, length delimited. Does not implicitly {@link proto.AIRichResponseMessage.AIRichResponseGridImageMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.AIRichResponseMessage.AIRichResponseGridImageMetadata + * @static + * @param {proto.AIRichResponseMessage.IAIRichResponseGridImageMetadata} message AIRichResponseGridImageMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AIRichResponseGridImageMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a AIRichResponseGridImageMetadata message from the specified reader or buffer. + * @function decode + * @memberof proto.AIRichResponseMessage.AIRichResponseGridImageMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.AIRichResponseMessage.AIRichResponseGridImageMetadata} AIRichResponseGridImageMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AIRichResponseGridImageMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.AIRichResponseMessage.AIRichResponseGridImageMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.gridImageUrl = $root.proto.AIRichResponseMessage.AIRichResponseImageURL.decode(reader, reader.uint32()); + break; + } + case 2: { + if (!(message.imageUrls && message.imageUrls.length)) + message.imageUrls = []; + message.imageUrls.push($root.proto.AIRichResponseMessage.AIRichResponseImageURL.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a AIRichResponseGridImageMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.AIRichResponseMessage.AIRichResponseGridImageMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.AIRichResponseMessage.AIRichResponseGridImageMetadata} AIRichResponseGridImageMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AIRichResponseGridImageMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a AIRichResponseGridImageMetadata message. + * @function verify + * @memberof proto.AIRichResponseMessage.AIRichResponseGridImageMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AIRichResponseGridImageMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.gridImageUrl != null && message.hasOwnProperty("gridImageUrl")) { + properties._gridImageUrl = 1; + { + var error = $root.proto.AIRichResponseMessage.AIRichResponseImageURL.verify(message.gridImageUrl); + if (error) + return "gridImageUrl." + error; + } + } + if (message.imageUrls != null && message.hasOwnProperty("imageUrls")) { + if (!Array.isArray(message.imageUrls)) + return "imageUrls: array expected"; + for (var i = 0; i < message.imageUrls.length; ++i) { + var error = $root.proto.AIRichResponseMessage.AIRichResponseImageURL.verify(message.imageUrls[i]); + if (error) + return "imageUrls." + error; + } + } + return null; + }; + + /** + * Creates a AIRichResponseGridImageMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.AIRichResponseMessage.AIRichResponseGridImageMetadata + * @static + * @param {Object.} object Plain object + * @returns {proto.AIRichResponseMessage.AIRichResponseGridImageMetadata} AIRichResponseGridImageMetadata + */ + AIRichResponseGridImageMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.proto.AIRichResponseMessage.AIRichResponseGridImageMetadata) + return object; + var message = new $root.proto.AIRichResponseMessage.AIRichResponseGridImageMetadata(); + if (object.gridImageUrl != null) { + if (typeof object.gridImageUrl !== "object") + throw TypeError(".proto.AIRichResponseMessage.AIRichResponseGridImageMetadata.gridImageUrl: object expected"); + message.gridImageUrl = $root.proto.AIRichResponseMessage.AIRichResponseImageURL.fromObject(object.gridImageUrl); + } + if (object.imageUrls) { + if (!Array.isArray(object.imageUrls)) + throw TypeError(".proto.AIRichResponseMessage.AIRichResponseGridImageMetadata.imageUrls: array expected"); + message.imageUrls = []; + for (var i = 0; i < object.imageUrls.length; ++i) { + if (typeof object.imageUrls[i] !== "object") + throw TypeError(".proto.AIRichResponseMessage.AIRichResponseGridImageMetadata.imageUrls: object expected"); + message.imageUrls[i] = $root.proto.AIRichResponseMessage.AIRichResponseImageURL.fromObject(object.imageUrls[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a AIRichResponseGridImageMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.AIRichResponseMessage.AIRichResponseGridImageMetadata + * @static + * @param {proto.AIRichResponseMessage.AIRichResponseGridImageMetadata} message AIRichResponseGridImageMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AIRichResponseGridImageMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.imageUrls = []; + if (message.gridImageUrl != null && message.hasOwnProperty("gridImageUrl")) { + object.gridImageUrl = $root.proto.AIRichResponseMessage.AIRichResponseImageURL.toObject(message.gridImageUrl, options); + if (options.oneofs) + object._gridImageUrl = "gridImageUrl"; + } + if (message.imageUrls && message.imageUrls.length) { + object.imageUrls = []; + for (var j = 0; j < message.imageUrls.length; ++j) + object.imageUrls[j] = $root.proto.AIRichResponseMessage.AIRichResponseImageURL.toObject(message.imageUrls[j], options); + } + return object; + }; + + /** + * Converts this AIRichResponseGridImageMetadata to JSON. + * @function toJSON + * @memberof proto.AIRichResponseMessage.AIRichResponseGridImageMetadata + * @instance + * @returns {Object.} JSON object + */ + AIRichResponseGridImageMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AIRichResponseGridImageMetadata + * @function getTypeUrl + * @memberof proto.AIRichResponseMessage.AIRichResponseGridImageMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AIRichResponseGridImageMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.AIRichResponseMessage.AIRichResponseGridImageMetadata"; + }; + + return AIRichResponseGridImageMetadata; + })(); + + AIRichResponseMessage.AIRichResponseImageURL = (function() { + + /** + * Properties of a AIRichResponseImageURL. + * @memberof proto.AIRichResponseMessage + * @interface IAIRichResponseImageURL + * @property {string|null} [imagePreviewUrl] AIRichResponseImageURL imagePreviewUrl + * @property {string|null} [imageHighResUrl] AIRichResponseImageURL imageHighResUrl + * @property {string|null} [sourceUrl] AIRichResponseImageURL sourceUrl + */ + + /** + * Constructs a new AIRichResponseImageURL. + * @memberof proto.AIRichResponseMessage + * @classdesc Represents a AIRichResponseImageURL. + * @implements IAIRichResponseImageURL + * @constructor + * @param {proto.AIRichResponseMessage.IAIRichResponseImageURL=} [properties] Properties to set + */ + function AIRichResponseImageURL(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AIRichResponseImageURL imagePreviewUrl. + * @member {string|null|undefined} imagePreviewUrl + * @memberof proto.AIRichResponseMessage.AIRichResponseImageURL + * @instance + */ + AIRichResponseImageURL.prototype.imagePreviewUrl = null; + + /** + * AIRichResponseImageURL imageHighResUrl. + * @member {string|null|undefined} imageHighResUrl + * @memberof proto.AIRichResponseMessage.AIRichResponseImageURL + * @instance + */ + AIRichResponseImageURL.prototype.imageHighResUrl = null; + + /** + * AIRichResponseImageURL sourceUrl. + * @member {string|null|undefined} sourceUrl + * @memberof proto.AIRichResponseMessage.AIRichResponseImageURL + * @instance + */ + AIRichResponseImageURL.prototype.sourceUrl = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AIRichResponseImageURL.prototype, "_imagePreviewUrl", { + get: $util.oneOfGetter($oneOfFields = ["imagePreviewUrl"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AIRichResponseImageURL.prototype, "_imageHighResUrl", { + get: $util.oneOfGetter($oneOfFields = ["imageHighResUrl"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AIRichResponseImageURL.prototype, "_sourceUrl", { + get: $util.oneOfGetter($oneOfFields = ["sourceUrl"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AIRichResponseImageURL instance using the specified properties. + * @function create + * @memberof proto.AIRichResponseMessage.AIRichResponseImageURL + * @static + * @param {proto.AIRichResponseMessage.IAIRichResponseImageURL=} [properties] Properties to set + * @returns {proto.AIRichResponseMessage.AIRichResponseImageURL} AIRichResponseImageURL instance + */ + AIRichResponseImageURL.create = function create(properties) { + return new AIRichResponseImageURL(properties); + }; + + /** + * Encodes the specified AIRichResponseImageURL message. Does not implicitly {@link proto.AIRichResponseMessage.AIRichResponseImageURL.verify|verify} messages. + * @function encode + * @memberof proto.AIRichResponseMessage.AIRichResponseImageURL + * @static + * @param {proto.AIRichResponseMessage.IAIRichResponseImageURL} message AIRichResponseImageURL message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AIRichResponseImageURL.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.imagePreviewUrl != null && Object.hasOwnProperty.call(message, "imagePreviewUrl")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.imagePreviewUrl); + if (message.imageHighResUrl != null && Object.hasOwnProperty.call(message, "imageHighResUrl")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.imageHighResUrl); + if (message.sourceUrl != null && Object.hasOwnProperty.call(message, "sourceUrl")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.sourceUrl); + return writer; + }; + + /** + * Encodes the specified AIRichResponseImageURL message, length delimited. Does not implicitly {@link proto.AIRichResponseMessage.AIRichResponseImageURL.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.AIRichResponseMessage.AIRichResponseImageURL + * @static + * @param {proto.AIRichResponseMessage.IAIRichResponseImageURL} message AIRichResponseImageURL message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AIRichResponseImageURL.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a AIRichResponseImageURL message from the specified reader or buffer. + * @function decode + * @memberof proto.AIRichResponseMessage.AIRichResponseImageURL + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.AIRichResponseMessage.AIRichResponseImageURL} AIRichResponseImageURL + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AIRichResponseImageURL.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.AIRichResponseMessage.AIRichResponseImageURL(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.imagePreviewUrl = reader.string(); + break; + } + case 2: { + message.imageHighResUrl = reader.string(); + break; + } + case 3: { + message.sourceUrl = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a AIRichResponseImageURL message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.AIRichResponseMessage.AIRichResponseImageURL + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.AIRichResponseMessage.AIRichResponseImageURL} AIRichResponseImageURL + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AIRichResponseImageURL.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a AIRichResponseImageURL message. + * @function verify + * @memberof proto.AIRichResponseMessage.AIRichResponseImageURL + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AIRichResponseImageURL.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.imagePreviewUrl != null && message.hasOwnProperty("imagePreviewUrl")) { + properties._imagePreviewUrl = 1; + if (!$util.isString(message.imagePreviewUrl)) + return "imagePreviewUrl: string expected"; + } + if (message.imageHighResUrl != null && message.hasOwnProperty("imageHighResUrl")) { + properties._imageHighResUrl = 1; + if (!$util.isString(message.imageHighResUrl)) + return "imageHighResUrl: string expected"; + } + if (message.sourceUrl != null && message.hasOwnProperty("sourceUrl")) { + properties._sourceUrl = 1; + if (!$util.isString(message.sourceUrl)) + return "sourceUrl: string expected"; + } + return null; + }; + + /** + * Creates a AIRichResponseImageURL message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.AIRichResponseMessage.AIRichResponseImageURL + * @static + * @param {Object.} object Plain object + * @returns {proto.AIRichResponseMessage.AIRichResponseImageURL} AIRichResponseImageURL + */ + AIRichResponseImageURL.fromObject = function fromObject(object) { + if (object instanceof $root.proto.AIRichResponseMessage.AIRichResponseImageURL) + return object; + var message = new $root.proto.AIRichResponseMessage.AIRichResponseImageURL(); + if (object.imagePreviewUrl != null) + message.imagePreviewUrl = String(object.imagePreviewUrl); + if (object.imageHighResUrl != null) + message.imageHighResUrl = String(object.imageHighResUrl); + if (object.sourceUrl != null) + message.sourceUrl = String(object.sourceUrl); + return message; + }; + + /** + * Creates a plain object from a AIRichResponseImageURL message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.AIRichResponseMessage.AIRichResponseImageURL + * @static + * @param {proto.AIRichResponseMessage.AIRichResponseImageURL} message AIRichResponseImageURL + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AIRichResponseImageURL.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.imagePreviewUrl != null && message.hasOwnProperty("imagePreviewUrl")) { + object.imagePreviewUrl = message.imagePreviewUrl; + if (options.oneofs) + object._imagePreviewUrl = "imagePreviewUrl"; + } + if (message.imageHighResUrl != null && message.hasOwnProperty("imageHighResUrl")) { + object.imageHighResUrl = message.imageHighResUrl; + if (options.oneofs) + object._imageHighResUrl = "imageHighResUrl"; + } + if (message.sourceUrl != null && message.hasOwnProperty("sourceUrl")) { + object.sourceUrl = message.sourceUrl; + if (options.oneofs) + object._sourceUrl = "sourceUrl"; + } + return object; + }; + + /** + * Converts this AIRichResponseImageURL to JSON. + * @function toJSON + * @memberof proto.AIRichResponseMessage.AIRichResponseImageURL + * @instance + * @returns {Object.} JSON object + */ + AIRichResponseImageURL.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AIRichResponseImageURL + * @function getTypeUrl + * @memberof proto.AIRichResponseMessage.AIRichResponseImageURL + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AIRichResponseImageURL.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.AIRichResponseMessage.AIRichResponseImageURL"; + }; + + return AIRichResponseImageURL; + })(); + + AIRichResponseMessage.AIRichResponseInlineImageMetadata = (function() { + + /** + * Properties of a AIRichResponseInlineImageMetadata. + * @memberof proto.AIRichResponseMessage + * @interface IAIRichResponseInlineImageMetadata + * @property {proto.AIRichResponseMessage.IAIRichResponseImageURL|null} [imageUrl] AIRichResponseInlineImageMetadata imageUrl + * @property {string|null} [imageText] AIRichResponseInlineImageMetadata imageText + * @property {proto.AIRichResponseMessage.AIRichResponseInlineImageMetadata.AIRichResponseImageAlignment|null} [alignment] AIRichResponseInlineImageMetadata alignment + * @property {string|null} [tapLinkUrl] AIRichResponseInlineImageMetadata tapLinkUrl + */ + + /** + * Constructs a new AIRichResponseInlineImageMetadata. + * @memberof proto.AIRichResponseMessage + * @classdesc Represents a AIRichResponseInlineImageMetadata. + * @implements IAIRichResponseInlineImageMetadata + * @constructor + * @param {proto.AIRichResponseMessage.IAIRichResponseInlineImageMetadata=} [properties] Properties to set + */ + function AIRichResponseInlineImageMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AIRichResponseInlineImageMetadata imageUrl. + * @member {proto.AIRichResponseMessage.IAIRichResponseImageURL|null|undefined} imageUrl + * @memberof proto.AIRichResponseMessage.AIRichResponseInlineImageMetadata + * @instance + */ + AIRichResponseInlineImageMetadata.prototype.imageUrl = null; + + /** + * AIRichResponseInlineImageMetadata imageText. + * @member {string|null|undefined} imageText + * @memberof proto.AIRichResponseMessage.AIRichResponseInlineImageMetadata + * @instance + */ + AIRichResponseInlineImageMetadata.prototype.imageText = null; + + /** + * AIRichResponseInlineImageMetadata alignment. + * @member {proto.AIRichResponseMessage.AIRichResponseInlineImageMetadata.AIRichResponseImageAlignment|null|undefined} alignment + * @memberof proto.AIRichResponseMessage.AIRichResponseInlineImageMetadata + * @instance + */ + AIRichResponseInlineImageMetadata.prototype.alignment = null; + + /** + * AIRichResponseInlineImageMetadata tapLinkUrl. + * @member {string|null|undefined} tapLinkUrl + * @memberof proto.AIRichResponseMessage.AIRichResponseInlineImageMetadata + * @instance + */ + AIRichResponseInlineImageMetadata.prototype.tapLinkUrl = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AIRichResponseInlineImageMetadata.prototype, "_imageUrl", { + get: $util.oneOfGetter($oneOfFields = ["imageUrl"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AIRichResponseInlineImageMetadata.prototype, "_imageText", { + get: $util.oneOfGetter($oneOfFields = ["imageText"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AIRichResponseInlineImageMetadata.prototype, "_alignment", { + get: $util.oneOfGetter($oneOfFields = ["alignment"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AIRichResponseInlineImageMetadata.prototype, "_tapLinkUrl", { + get: $util.oneOfGetter($oneOfFields = ["tapLinkUrl"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AIRichResponseInlineImageMetadata instance using the specified properties. + * @function create + * @memberof proto.AIRichResponseMessage.AIRichResponseInlineImageMetadata + * @static + * @param {proto.AIRichResponseMessage.IAIRichResponseInlineImageMetadata=} [properties] Properties to set + * @returns {proto.AIRichResponseMessage.AIRichResponseInlineImageMetadata} AIRichResponseInlineImageMetadata instance + */ + AIRichResponseInlineImageMetadata.create = function create(properties) { + return new AIRichResponseInlineImageMetadata(properties); + }; + + /** + * Encodes the specified AIRichResponseInlineImageMetadata message. Does not implicitly {@link proto.AIRichResponseMessage.AIRichResponseInlineImageMetadata.verify|verify} messages. + * @function encode + * @memberof proto.AIRichResponseMessage.AIRichResponseInlineImageMetadata + * @static + * @param {proto.AIRichResponseMessage.IAIRichResponseInlineImageMetadata} message AIRichResponseInlineImageMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AIRichResponseInlineImageMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.imageUrl != null && Object.hasOwnProperty.call(message, "imageUrl")) + $root.proto.AIRichResponseMessage.AIRichResponseImageURL.encode(message.imageUrl, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.imageText != null && Object.hasOwnProperty.call(message, "imageText")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.imageText); + if (message.alignment != null && Object.hasOwnProperty.call(message, "alignment")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.alignment); + if (message.tapLinkUrl != null && Object.hasOwnProperty.call(message, "tapLinkUrl")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.tapLinkUrl); + return writer; + }; + + /** + * Encodes the specified AIRichResponseInlineImageMetadata message, length delimited. Does not implicitly {@link proto.AIRichResponseMessage.AIRichResponseInlineImageMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.AIRichResponseMessage.AIRichResponseInlineImageMetadata + * @static + * @param {proto.AIRichResponseMessage.IAIRichResponseInlineImageMetadata} message AIRichResponseInlineImageMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AIRichResponseInlineImageMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a AIRichResponseInlineImageMetadata message from the specified reader or buffer. + * @function decode + * @memberof proto.AIRichResponseMessage.AIRichResponseInlineImageMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.AIRichResponseMessage.AIRichResponseInlineImageMetadata} AIRichResponseInlineImageMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AIRichResponseInlineImageMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.AIRichResponseMessage.AIRichResponseInlineImageMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.imageUrl = $root.proto.AIRichResponseMessage.AIRichResponseImageURL.decode(reader, reader.uint32()); + break; + } + case 2: { + message.imageText = reader.string(); + break; + } + case 3: { + message.alignment = reader.int32(); + break; + } + case 4: { + message.tapLinkUrl = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a AIRichResponseInlineImageMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.AIRichResponseMessage.AIRichResponseInlineImageMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.AIRichResponseMessage.AIRichResponseInlineImageMetadata} AIRichResponseInlineImageMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AIRichResponseInlineImageMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a AIRichResponseInlineImageMetadata message. + * @function verify + * @memberof proto.AIRichResponseMessage.AIRichResponseInlineImageMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AIRichResponseInlineImageMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.imageUrl != null && message.hasOwnProperty("imageUrl")) { + properties._imageUrl = 1; + { + var error = $root.proto.AIRichResponseMessage.AIRichResponseImageURL.verify(message.imageUrl); + if (error) + return "imageUrl." + error; + } + } + if (message.imageText != null && message.hasOwnProperty("imageText")) { + properties._imageText = 1; + if (!$util.isString(message.imageText)) + return "imageText: string expected"; + } + if (message.alignment != null && message.hasOwnProperty("alignment")) { + properties._alignment = 1; + switch (message.alignment) { + default: + return "alignment: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.tapLinkUrl != null && message.hasOwnProperty("tapLinkUrl")) { + properties._tapLinkUrl = 1; + if (!$util.isString(message.tapLinkUrl)) + return "tapLinkUrl: string expected"; + } + return null; + }; + + /** + * Creates a AIRichResponseInlineImageMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.AIRichResponseMessage.AIRichResponseInlineImageMetadata + * @static + * @param {Object.} object Plain object + * @returns {proto.AIRichResponseMessage.AIRichResponseInlineImageMetadata} AIRichResponseInlineImageMetadata + */ + AIRichResponseInlineImageMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.proto.AIRichResponseMessage.AIRichResponseInlineImageMetadata) + return object; + var message = new $root.proto.AIRichResponseMessage.AIRichResponseInlineImageMetadata(); + if (object.imageUrl != null) { + if (typeof object.imageUrl !== "object") + throw TypeError(".proto.AIRichResponseMessage.AIRichResponseInlineImageMetadata.imageUrl: object expected"); + message.imageUrl = $root.proto.AIRichResponseMessage.AIRichResponseImageURL.fromObject(object.imageUrl); + } + if (object.imageText != null) + message.imageText = String(object.imageText); + switch (object.alignment) { + default: + if (typeof object.alignment === "number") { + message.alignment = object.alignment; + break; + } + break; + case "AI_RICH_RESPONSE_IMAGE_LAYOUT_LEADING_ALIGNED": + case 0: + message.alignment = 0; + break; + case "AI_RICH_RESPONSE_IMAGE_LAYOUT_TRAILING_ALIGNED": + case 1: + message.alignment = 1; + break; + case "AI_RICH_RESPONSE_IMAGE_LAYOUT_CENTER_ALIGNED": + case 2: + message.alignment = 2; + break; + } + if (object.tapLinkUrl != null) + message.tapLinkUrl = String(object.tapLinkUrl); + return message; + }; + + /** + * Creates a plain object from a AIRichResponseInlineImageMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.AIRichResponseMessage.AIRichResponseInlineImageMetadata + * @static + * @param {proto.AIRichResponseMessage.AIRichResponseInlineImageMetadata} message AIRichResponseInlineImageMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AIRichResponseInlineImageMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.imageUrl != null && message.hasOwnProperty("imageUrl")) { + object.imageUrl = $root.proto.AIRichResponseMessage.AIRichResponseImageURL.toObject(message.imageUrl, options); + if (options.oneofs) + object._imageUrl = "imageUrl"; + } + if (message.imageText != null && message.hasOwnProperty("imageText")) { + object.imageText = message.imageText; + if (options.oneofs) + object._imageText = "imageText"; + } + if (message.alignment != null && message.hasOwnProperty("alignment")) { + object.alignment = options.enums === String ? $root.proto.AIRichResponseMessage.AIRichResponseInlineImageMetadata.AIRichResponseImageAlignment[message.alignment] === undefined ? message.alignment : $root.proto.AIRichResponseMessage.AIRichResponseInlineImageMetadata.AIRichResponseImageAlignment[message.alignment] : message.alignment; + if (options.oneofs) + object._alignment = "alignment"; + } + if (message.tapLinkUrl != null && message.hasOwnProperty("tapLinkUrl")) { + object.tapLinkUrl = message.tapLinkUrl; + if (options.oneofs) + object._tapLinkUrl = "tapLinkUrl"; + } + return object; + }; + + /** + * Converts this AIRichResponseInlineImageMetadata to JSON. + * @function toJSON + * @memberof proto.AIRichResponseMessage.AIRichResponseInlineImageMetadata + * @instance + * @returns {Object.} JSON object + */ + AIRichResponseInlineImageMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AIRichResponseInlineImageMetadata + * @function getTypeUrl + * @memberof proto.AIRichResponseMessage.AIRichResponseInlineImageMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AIRichResponseInlineImageMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.AIRichResponseMessage.AIRichResponseInlineImageMetadata"; + }; + + /** + * AIRichResponseImageAlignment enum. + * @name proto.AIRichResponseMessage.AIRichResponseInlineImageMetadata.AIRichResponseImageAlignment + * @enum {number} + * @property {number} AI_RICH_RESPONSE_IMAGE_LAYOUT_LEADING_ALIGNED=0 AI_RICH_RESPONSE_IMAGE_LAYOUT_LEADING_ALIGNED value + * @property {number} AI_RICH_RESPONSE_IMAGE_LAYOUT_TRAILING_ALIGNED=1 AI_RICH_RESPONSE_IMAGE_LAYOUT_TRAILING_ALIGNED value + * @property {number} AI_RICH_RESPONSE_IMAGE_LAYOUT_CENTER_ALIGNED=2 AI_RICH_RESPONSE_IMAGE_LAYOUT_CENTER_ALIGNED value + */ + AIRichResponseInlineImageMetadata.AIRichResponseImageAlignment = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "AI_RICH_RESPONSE_IMAGE_LAYOUT_LEADING_ALIGNED"] = 0; + values[valuesById[1] = "AI_RICH_RESPONSE_IMAGE_LAYOUT_TRAILING_ALIGNED"] = 1; + values[valuesById[2] = "AI_RICH_RESPONSE_IMAGE_LAYOUT_CENTER_ALIGNED"] = 2; + return values; + })(); + + return AIRichResponseInlineImageMetadata; + })(); + + AIRichResponseMessage.AIRichResponseLatexMetadata = (function() { + + /** + * Properties of a AIRichResponseLatexMetadata. + * @memberof proto.AIRichResponseMessage + * @interface IAIRichResponseLatexMetadata + * @property {string|null} [text] AIRichResponseLatexMetadata text + * @property {Array.|null} [expressions] AIRichResponseLatexMetadata expressions + */ + + /** + * Constructs a new AIRichResponseLatexMetadata. + * @memberof proto.AIRichResponseMessage + * @classdesc Represents a AIRichResponseLatexMetadata. + * @implements IAIRichResponseLatexMetadata + * @constructor + * @param {proto.AIRichResponseMessage.IAIRichResponseLatexMetadata=} [properties] Properties to set + */ + function AIRichResponseLatexMetadata(properties) { + this.expressions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AIRichResponseLatexMetadata text. + * @member {string|null|undefined} text + * @memberof proto.AIRichResponseMessage.AIRichResponseLatexMetadata + * @instance + */ + AIRichResponseLatexMetadata.prototype.text = null; + + /** + * AIRichResponseLatexMetadata expressions. + * @member {Array.} expressions + * @memberof proto.AIRichResponseMessage.AIRichResponseLatexMetadata + * @instance + */ + AIRichResponseLatexMetadata.prototype.expressions = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AIRichResponseLatexMetadata.prototype, "_text", { + get: $util.oneOfGetter($oneOfFields = ["text"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AIRichResponseLatexMetadata instance using the specified properties. + * @function create + * @memberof proto.AIRichResponseMessage.AIRichResponseLatexMetadata + * @static + * @param {proto.AIRichResponseMessage.IAIRichResponseLatexMetadata=} [properties] Properties to set + * @returns {proto.AIRichResponseMessage.AIRichResponseLatexMetadata} AIRichResponseLatexMetadata instance + */ + AIRichResponseLatexMetadata.create = function create(properties) { + return new AIRichResponseLatexMetadata(properties); + }; + + /** + * Encodes the specified AIRichResponseLatexMetadata message. Does not implicitly {@link proto.AIRichResponseMessage.AIRichResponseLatexMetadata.verify|verify} messages. + * @function encode + * @memberof proto.AIRichResponseMessage.AIRichResponseLatexMetadata + * @static + * @param {proto.AIRichResponseMessage.IAIRichResponseLatexMetadata} message AIRichResponseLatexMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AIRichResponseLatexMetadata.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.expressions != null && message.expressions.length) + for (var i = 0; i < message.expressions.length; ++i) + $root.proto.AIRichResponseMessage.AIRichResponseLatexMetadata.AIRichResponseLatexExpression.encode(message.expressions[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AIRichResponseLatexMetadata message, length delimited. Does not implicitly {@link proto.AIRichResponseMessage.AIRichResponseLatexMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.AIRichResponseMessage.AIRichResponseLatexMetadata + * @static + * @param {proto.AIRichResponseMessage.IAIRichResponseLatexMetadata} message AIRichResponseLatexMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AIRichResponseLatexMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a AIRichResponseLatexMetadata message from the specified reader or buffer. + * @function decode + * @memberof proto.AIRichResponseMessage.AIRichResponseLatexMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.AIRichResponseMessage.AIRichResponseLatexMetadata} AIRichResponseLatexMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AIRichResponseLatexMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.AIRichResponseMessage.AIRichResponseLatexMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.text = reader.string(); + break; + } + case 2: { + if (!(message.expressions && message.expressions.length)) + message.expressions = []; + message.expressions.push($root.proto.AIRichResponseMessage.AIRichResponseLatexMetadata.AIRichResponseLatexExpression.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a AIRichResponseLatexMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.AIRichResponseMessage.AIRichResponseLatexMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.AIRichResponseMessage.AIRichResponseLatexMetadata} AIRichResponseLatexMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AIRichResponseLatexMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a AIRichResponseLatexMetadata message. + * @function verify + * @memberof proto.AIRichResponseMessage.AIRichResponseLatexMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AIRichResponseLatexMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.text != null && message.hasOwnProperty("text")) { + properties._text = 1; + if (!$util.isString(message.text)) + return "text: string expected"; + } + if (message.expressions != null && message.hasOwnProperty("expressions")) { + if (!Array.isArray(message.expressions)) + return "expressions: array expected"; + for (var i = 0; i < message.expressions.length; ++i) { + var error = $root.proto.AIRichResponseMessage.AIRichResponseLatexMetadata.AIRichResponseLatexExpression.verify(message.expressions[i]); + if (error) + return "expressions." + error; + } + } + return null; + }; + + /** + * Creates a AIRichResponseLatexMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.AIRichResponseMessage.AIRichResponseLatexMetadata + * @static + * @param {Object.} object Plain object + * @returns {proto.AIRichResponseMessage.AIRichResponseLatexMetadata} AIRichResponseLatexMetadata + */ + AIRichResponseLatexMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.proto.AIRichResponseMessage.AIRichResponseLatexMetadata) + return object; + var message = new $root.proto.AIRichResponseMessage.AIRichResponseLatexMetadata(); + if (object.text != null) + message.text = String(object.text); + if (object.expressions) { + if (!Array.isArray(object.expressions)) + throw TypeError(".proto.AIRichResponseMessage.AIRichResponseLatexMetadata.expressions: array expected"); + message.expressions = []; + for (var i = 0; i < object.expressions.length; ++i) { + if (typeof object.expressions[i] !== "object") + throw TypeError(".proto.AIRichResponseMessage.AIRichResponseLatexMetadata.expressions: object expected"); + message.expressions[i] = $root.proto.AIRichResponseMessage.AIRichResponseLatexMetadata.AIRichResponseLatexExpression.fromObject(object.expressions[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a AIRichResponseLatexMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.AIRichResponseMessage.AIRichResponseLatexMetadata + * @static + * @param {proto.AIRichResponseMessage.AIRichResponseLatexMetadata} message AIRichResponseLatexMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AIRichResponseLatexMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.expressions = []; + if (message.text != null && message.hasOwnProperty("text")) { + object.text = message.text; + if (options.oneofs) + object._text = "text"; + } + if (message.expressions && message.expressions.length) { + object.expressions = []; + for (var j = 0; j < message.expressions.length; ++j) + object.expressions[j] = $root.proto.AIRichResponseMessage.AIRichResponseLatexMetadata.AIRichResponseLatexExpression.toObject(message.expressions[j], options); + } + return object; + }; + + /** + * Converts this AIRichResponseLatexMetadata to JSON. + * @function toJSON + * @memberof proto.AIRichResponseMessage.AIRichResponseLatexMetadata + * @instance + * @returns {Object.} JSON object + */ + AIRichResponseLatexMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AIRichResponseLatexMetadata + * @function getTypeUrl + * @memberof proto.AIRichResponseMessage.AIRichResponseLatexMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AIRichResponseLatexMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.AIRichResponseMessage.AIRichResponseLatexMetadata"; + }; + + AIRichResponseLatexMetadata.AIRichResponseLatexExpression = (function() { + + /** + * Properties of a AIRichResponseLatexExpression. + * @memberof proto.AIRichResponseMessage.AIRichResponseLatexMetadata + * @interface IAIRichResponseLatexExpression + * @property {string|null} [latexExpression] AIRichResponseLatexExpression latexExpression + * @property {string|null} [url] AIRichResponseLatexExpression url + * @property {number|null} [width] AIRichResponseLatexExpression width + * @property {number|null} [height] AIRichResponseLatexExpression height + * @property {number|null} [fontHeight] AIRichResponseLatexExpression fontHeight + */ + + /** + * Constructs a new AIRichResponseLatexExpression. + * @memberof proto.AIRichResponseMessage.AIRichResponseLatexMetadata + * @classdesc Represents a AIRichResponseLatexExpression. + * @implements IAIRichResponseLatexExpression + * @constructor + * @param {proto.AIRichResponseMessage.AIRichResponseLatexMetadata.IAIRichResponseLatexExpression=} [properties] Properties to set + */ + function AIRichResponseLatexExpression(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AIRichResponseLatexExpression latexExpression. + * @member {string|null|undefined} latexExpression + * @memberof proto.AIRichResponseMessage.AIRichResponseLatexMetadata.AIRichResponseLatexExpression + * @instance + */ + AIRichResponseLatexExpression.prototype.latexExpression = null; + + /** + * AIRichResponseLatexExpression url. + * @member {string|null|undefined} url + * @memberof proto.AIRichResponseMessage.AIRichResponseLatexMetadata.AIRichResponseLatexExpression + * @instance + */ + AIRichResponseLatexExpression.prototype.url = null; + + /** + * AIRichResponseLatexExpression width. + * @member {number|null|undefined} width + * @memberof proto.AIRichResponseMessage.AIRichResponseLatexMetadata.AIRichResponseLatexExpression + * @instance + */ + AIRichResponseLatexExpression.prototype.width = null; + + /** + * AIRichResponseLatexExpression height. + * @member {number|null|undefined} height + * @memberof proto.AIRichResponseMessage.AIRichResponseLatexMetadata.AIRichResponseLatexExpression + * @instance + */ + AIRichResponseLatexExpression.prototype.height = null; + + /** + * AIRichResponseLatexExpression fontHeight. + * @member {number|null|undefined} fontHeight + * @memberof proto.AIRichResponseMessage.AIRichResponseLatexMetadata.AIRichResponseLatexExpression + * @instance + */ + AIRichResponseLatexExpression.prototype.fontHeight = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AIRichResponseLatexExpression.prototype, "_latexExpression", { + get: $util.oneOfGetter($oneOfFields = ["latexExpression"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AIRichResponseLatexExpression.prototype, "_url", { + get: $util.oneOfGetter($oneOfFields = ["url"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AIRichResponseLatexExpression.prototype, "_width", { + get: $util.oneOfGetter($oneOfFields = ["width"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AIRichResponseLatexExpression.prototype, "_height", { + get: $util.oneOfGetter($oneOfFields = ["height"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AIRichResponseLatexExpression.prototype, "_fontHeight", { + get: $util.oneOfGetter($oneOfFields = ["fontHeight"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AIRichResponseLatexExpression instance using the specified properties. + * @function create + * @memberof proto.AIRichResponseMessage.AIRichResponseLatexMetadata.AIRichResponseLatexExpression + * @static + * @param {proto.AIRichResponseMessage.AIRichResponseLatexMetadata.IAIRichResponseLatexExpression=} [properties] Properties to set + * @returns {proto.AIRichResponseMessage.AIRichResponseLatexMetadata.AIRichResponseLatexExpression} AIRichResponseLatexExpression instance + */ + AIRichResponseLatexExpression.create = function create(properties) { + return new AIRichResponseLatexExpression(properties); + }; + + /** + * Encodes the specified AIRichResponseLatexExpression message. Does not implicitly {@link proto.AIRichResponseMessage.AIRichResponseLatexMetadata.AIRichResponseLatexExpression.verify|verify} messages. + * @function encode + * @memberof proto.AIRichResponseMessage.AIRichResponseLatexMetadata.AIRichResponseLatexExpression + * @static + * @param {proto.AIRichResponseMessage.AIRichResponseLatexMetadata.IAIRichResponseLatexExpression} message AIRichResponseLatexExpression message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AIRichResponseLatexExpression.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.latexExpression != null && Object.hasOwnProperty.call(message, "latexExpression")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.latexExpression); + if (message.url != null && Object.hasOwnProperty.call(message, "url")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.url); + if (message.width != null && Object.hasOwnProperty.call(message, "width")) + writer.uint32(/* id 3, wireType 1 =*/25).double(message.width); + if (message.height != null && Object.hasOwnProperty.call(message, "height")) + writer.uint32(/* id 4, wireType 1 =*/33).double(message.height); + if (message.fontHeight != null && Object.hasOwnProperty.call(message, "fontHeight")) + writer.uint32(/* id 5, wireType 1 =*/41).double(message.fontHeight); + return writer; + }; + + /** + * Encodes the specified AIRichResponseLatexExpression message, length delimited. Does not implicitly {@link proto.AIRichResponseMessage.AIRichResponseLatexMetadata.AIRichResponseLatexExpression.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.AIRichResponseMessage.AIRichResponseLatexMetadata.AIRichResponseLatexExpression + * @static + * @param {proto.AIRichResponseMessage.AIRichResponseLatexMetadata.IAIRichResponseLatexExpression} message AIRichResponseLatexExpression message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AIRichResponseLatexExpression.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a AIRichResponseLatexExpression message from the specified reader or buffer. + * @function decode + * @memberof proto.AIRichResponseMessage.AIRichResponseLatexMetadata.AIRichResponseLatexExpression + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.AIRichResponseMessage.AIRichResponseLatexMetadata.AIRichResponseLatexExpression} AIRichResponseLatexExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AIRichResponseLatexExpression.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.AIRichResponseMessage.AIRichResponseLatexMetadata.AIRichResponseLatexExpression(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.latexExpression = reader.string(); + break; + } + case 2: { + message.url = reader.string(); + break; + } + case 3: { + message.width = reader.double(); + break; + } + case 4: { + message.height = reader.double(); + break; + } + case 5: { + message.fontHeight = reader.double(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a AIRichResponseLatexExpression message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.AIRichResponseMessage.AIRichResponseLatexMetadata.AIRichResponseLatexExpression + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.AIRichResponseMessage.AIRichResponseLatexMetadata.AIRichResponseLatexExpression} AIRichResponseLatexExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AIRichResponseLatexExpression.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a AIRichResponseLatexExpression message. + * @function verify + * @memberof proto.AIRichResponseMessage.AIRichResponseLatexMetadata.AIRichResponseLatexExpression + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AIRichResponseLatexExpression.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.latexExpression != null && message.hasOwnProperty("latexExpression")) { + properties._latexExpression = 1; + if (!$util.isString(message.latexExpression)) + return "latexExpression: string expected"; + } + if (message.url != null && message.hasOwnProperty("url")) { + properties._url = 1; + if (!$util.isString(message.url)) + return "url: string expected"; + } + if (message.width != null && message.hasOwnProperty("width")) { + properties._width = 1; + if (typeof message.width !== "number") + return "width: number expected"; + } + if (message.height != null && message.hasOwnProperty("height")) { + properties._height = 1; + if (typeof message.height !== "number") + return "height: number expected"; + } + if (message.fontHeight != null && message.hasOwnProperty("fontHeight")) { + properties._fontHeight = 1; + if (typeof message.fontHeight !== "number") + return "fontHeight: number expected"; + } + return null; + }; + + /** + * Creates a AIRichResponseLatexExpression message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.AIRichResponseMessage.AIRichResponseLatexMetadata.AIRichResponseLatexExpression + * @static + * @param {Object.} object Plain object + * @returns {proto.AIRichResponseMessage.AIRichResponseLatexMetadata.AIRichResponseLatexExpression} AIRichResponseLatexExpression + */ + AIRichResponseLatexExpression.fromObject = function fromObject(object) { + if (object instanceof $root.proto.AIRichResponseMessage.AIRichResponseLatexMetadata.AIRichResponseLatexExpression) + return object; + var message = new $root.proto.AIRichResponseMessage.AIRichResponseLatexMetadata.AIRichResponseLatexExpression(); + if (object.latexExpression != null) + message.latexExpression = String(object.latexExpression); + if (object.url != null) + message.url = String(object.url); + if (object.width != null) + message.width = Number(object.width); + if (object.height != null) + message.height = Number(object.height); + if (object.fontHeight != null) + message.fontHeight = Number(object.fontHeight); + return message; + }; + + /** + * Creates a plain object from a AIRichResponseLatexExpression message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.AIRichResponseMessage.AIRichResponseLatexMetadata.AIRichResponseLatexExpression + * @static + * @param {proto.AIRichResponseMessage.AIRichResponseLatexMetadata.AIRichResponseLatexExpression} message AIRichResponseLatexExpression + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AIRichResponseLatexExpression.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.latexExpression != null && message.hasOwnProperty("latexExpression")) { + object.latexExpression = message.latexExpression; + if (options.oneofs) + object._latexExpression = "latexExpression"; + } + if (message.url != null && message.hasOwnProperty("url")) { + object.url = message.url; + if (options.oneofs) + object._url = "url"; + } + if (message.width != null && message.hasOwnProperty("width")) { + object.width = options.json && !isFinite(message.width) ? String(message.width) : message.width; + if (options.oneofs) + object._width = "width"; + } + if (message.height != null && message.hasOwnProperty("height")) { + object.height = options.json && !isFinite(message.height) ? String(message.height) : message.height; + if (options.oneofs) + object._height = "height"; + } + if (message.fontHeight != null && message.hasOwnProperty("fontHeight")) { + object.fontHeight = options.json && !isFinite(message.fontHeight) ? String(message.fontHeight) : message.fontHeight; + if (options.oneofs) + object._fontHeight = "fontHeight"; + } + return object; + }; + + /** + * Converts this AIRichResponseLatexExpression to JSON. + * @function toJSON + * @memberof proto.AIRichResponseMessage.AIRichResponseLatexMetadata.AIRichResponseLatexExpression + * @instance + * @returns {Object.} JSON object + */ + AIRichResponseLatexExpression.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AIRichResponseLatexExpression + * @function getTypeUrl + * @memberof proto.AIRichResponseMessage.AIRichResponseLatexMetadata.AIRichResponseLatexExpression + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AIRichResponseLatexExpression.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.AIRichResponseMessage.AIRichResponseLatexMetadata.AIRichResponseLatexExpression"; + }; + + return AIRichResponseLatexExpression; + })(); + + return AIRichResponseLatexMetadata; + })(); + + AIRichResponseMessage.AIRichResponseMapMetadata = (function() { + + /** + * Properties of a AIRichResponseMapMetadata. + * @memberof proto.AIRichResponseMessage + * @interface IAIRichResponseMapMetadata + * @property {number|null} [centerLatitude] AIRichResponseMapMetadata centerLatitude + * @property {number|null} [centerLongitude] AIRichResponseMapMetadata centerLongitude + * @property {number|null} [latitudeDelta] AIRichResponseMapMetadata latitudeDelta + * @property {number|null} [longitudeDelta] AIRichResponseMapMetadata longitudeDelta + * @property {Array.|null} [annotations] AIRichResponseMapMetadata annotations + * @property {boolean|null} [showInfoList] AIRichResponseMapMetadata showInfoList + */ + + /** + * Constructs a new AIRichResponseMapMetadata. + * @memberof proto.AIRichResponseMessage + * @classdesc Represents a AIRichResponseMapMetadata. + * @implements IAIRichResponseMapMetadata + * @constructor + * @param {proto.AIRichResponseMessage.IAIRichResponseMapMetadata=} [properties] Properties to set + */ + function AIRichResponseMapMetadata(properties) { + this.annotations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AIRichResponseMapMetadata centerLatitude. + * @member {number|null|undefined} centerLatitude + * @memberof proto.AIRichResponseMessage.AIRichResponseMapMetadata + * @instance + */ + AIRichResponseMapMetadata.prototype.centerLatitude = null; + + /** + * AIRichResponseMapMetadata centerLongitude. + * @member {number|null|undefined} centerLongitude + * @memberof proto.AIRichResponseMessage.AIRichResponseMapMetadata + * @instance + */ + AIRichResponseMapMetadata.prototype.centerLongitude = null; + + /** + * AIRichResponseMapMetadata latitudeDelta. + * @member {number|null|undefined} latitudeDelta + * @memberof proto.AIRichResponseMessage.AIRichResponseMapMetadata + * @instance + */ + AIRichResponseMapMetadata.prototype.latitudeDelta = null; + + /** + * AIRichResponseMapMetadata longitudeDelta. + * @member {number|null|undefined} longitudeDelta + * @memberof proto.AIRichResponseMessage.AIRichResponseMapMetadata + * @instance + */ + AIRichResponseMapMetadata.prototype.longitudeDelta = null; + + /** + * AIRichResponseMapMetadata annotations. + * @member {Array.} annotations + * @memberof proto.AIRichResponseMessage.AIRichResponseMapMetadata + * @instance + */ + AIRichResponseMapMetadata.prototype.annotations = $util.emptyArray; + + /** + * AIRichResponseMapMetadata showInfoList. + * @member {boolean|null|undefined} showInfoList + * @memberof proto.AIRichResponseMessage.AIRichResponseMapMetadata + * @instance + */ + AIRichResponseMapMetadata.prototype.showInfoList = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AIRichResponseMapMetadata.prototype, "_centerLatitude", { + get: $util.oneOfGetter($oneOfFields = ["centerLatitude"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AIRichResponseMapMetadata.prototype, "_centerLongitude", { + get: $util.oneOfGetter($oneOfFields = ["centerLongitude"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AIRichResponseMapMetadata.prototype, "_latitudeDelta", { + get: $util.oneOfGetter($oneOfFields = ["latitudeDelta"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AIRichResponseMapMetadata.prototype, "_longitudeDelta", { + get: $util.oneOfGetter($oneOfFields = ["longitudeDelta"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AIRichResponseMapMetadata.prototype, "_showInfoList", { + get: $util.oneOfGetter($oneOfFields = ["showInfoList"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AIRichResponseMapMetadata instance using the specified properties. + * @function create + * @memberof proto.AIRichResponseMessage.AIRichResponseMapMetadata + * @static + * @param {proto.AIRichResponseMessage.IAIRichResponseMapMetadata=} [properties] Properties to set + * @returns {proto.AIRichResponseMessage.AIRichResponseMapMetadata} AIRichResponseMapMetadata instance + */ + AIRichResponseMapMetadata.create = function create(properties) { + return new AIRichResponseMapMetadata(properties); + }; + + /** + * Encodes the specified AIRichResponseMapMetadata message. Does not implicitly {@link proto.AIRichResponseMessage.AIRichResponseMapMetadata.verify|verify} messages. + * @function encode + * @memberof proto.AIRichResponseMessage.AIRichResponseMapMetadata + * @static + * @param {proto.AIRichResponseMessage.IAIRichResponseMapMetadata} message AIRichResponseMapMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AIRichResponseMapMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.centerLatitude != null && Object.hasOwnProperty.call(message, "centerLatitude")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.centerLatitude); + if (message.centerLongitude != null && Object.hasOwnProperty.call(message, "centerLongitude")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.centerLongitude); + if (message.latitudeDelta != null && Object.hasOwnProperty.call(message, "latitudeDelta")) + writer.uint32(/* id 3, wireType 1 =*/25).double(message.latitudeDelta); + if (message.longitudeDelta != null && Object.hasOwnProperty.call(message, "longitudeDelta")) + writer.uint32(/* id 4, wireType 1 =*/33).double(message.longitudeDelta); + if (message.annotations != null && message.annotations.length) + for (var i = 0; i < message.annotations.length; ++i) + $root.proto.AIRichResponseMessage.AIRichResponseMapMetadata.AIRichResponseMapAnnotation.encode(message.annotations[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.showInfoList != null && Object.hasOwnProperty.call(message, "showInfoList")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.showInfoList); + return writer; + }; + + /** + * Encodes the specified AIRichResponseMapMetadata message, length delimited. Does not implicitly {@link proto.AIRichResponseMessage.AIRichResponseMapMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.AIRichResponseMessage.AIRichResponseMapMetadata + * @static + * @param {proto.AIRichResponseMessage.IAIRichResponseMapMetadata} message AIRichResponseMapMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AIRichResponseMapMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a AIRichResponseMapMetadata message from the specified reader or buffer. + * @function decode + * @memberof proto.AIRichResponseMessage.AIRichResponseMapMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.AIRichResponseMessage.AIRichResponseMapMetadata} AIRichResponseMapMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AIRichResponseMapMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.AIRichResponseMessage.AIRichResponseMapMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.centerLatitude = reader.double(); + break; + } + case 2: { + message.centerLongitude = reader.double(); + break; + } + case 3: { + message.latitudeDelta = reader.double(); + break; + } + case 4: { + message.longitudeDelta = reader.double(); + break; + } + case 5: { + if (!(message.annotations && message.annotations.length)) + message.annotations = []; + message.annotations.push($root.proto.AIRichResponseMessage.AIRichResponseMapMetadata.AIRichResponseMapAnnotation.decode(reader, reader.uint32())); + break; + } + case 6: { + message.showInfoList = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a AIRichResponseMapMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.AIRichResponseMessage.AIRichResponseMapMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.AIRichResponseMessage.AIRichResponseMapMetadata} AIRichResponseMapMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AIRichResponseMapMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a AIRichResponseMapMetadata message. + * @function verify + * @memberof proto.AIRichResponseMessage.AIRichResponseMapMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AIRichResponseMapMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.centerLatitude != null && message.hasOwnProperty("centerLatitude")) { + properties._centerLatitude = 1; + if (typeof message.centerLatitude !== "number") + return "centerLatitude: number expected"; + } + if (message.centerLongitude != null && message.hasOwnProperty("centerLongitude")) { + properties._centerLongitude = 1; + if (typeof message.centerLongitude !== "number") + return "centerLongitude: number expected"; + } + if (message.latitudeDelta != null && message.hasOwnProperty("latitudeDelta")) { + properties._latitudeDelta = 1; + if (typeof message.latitudeDelta !== "number") + return "latitudeDelta: number expected"; + } + if (message.longitudeDelta != null && message.hasOwnProperty("longitudeDelta")) { + properties._longitudeDelta = 1; + if (typeof message.longitudeDelta !== "number") + return "longitudeDelta: number expected"; + } + if (message.annotations != null && message.hasOwnProperty("annotations")) { + if (!Array.isArray(message.annotations)) + return "annotations: array expected"; + for (var i = 0; i < message.annotations.length; ++i) { + var error = $root.proto.AIRichResponseMessage.AIRichResponseMapMetadata.AIRichResponseMapAnnotation.verify(message.annotations[i]); + if (error) + return "annotations." + error; + } + } + if (message.showInfoList != null && message.hasOwnProperty("showInfoList")) { + properties._showInfoList = 1; + if (typeof message.showInfoList !== "boolean") + return "showInfoList: boolean expected"; + } + return null; + }; + + /** + * Creates a AIRichResponseMapMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.AIRichResponseMessage.AIRichResponseMapMetadata + * @static + * @param {Object.} object Plain object + * @returns {proto.AIRichResponseMessage.AIRichResponseMapMetadata} AIRichResponseMapMetadata + */ + AIRichResponseMapMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.proto.AIRichResponseMessage.AIRichResponseMapMetadata) + return object; + var message = new $root.proto.AIRichResponseMessage.AIRichResponseMapMetadata(); + if (object.centerLatitude != null) + message.centerLatitude = Number(object.centerLatitude); + if (object.centerLongitude != null) + message.centerLongitude = Number(object.centerLongitude); + if (object.latitudeDelta != null) + message.latitudeDelta = Number(object.latitudeDelta); + if (object.longitudeDelta != null) + message.longitudeDelta = Number(object.longitudeDelta); + if (object.annotations) { + if (!Array.isArray(object.annotations)) + throw TypeError(".proto.AIRichResponseMessage.AIRichResponseMapMetadata.annotations: array expected"); + message.annotations = []; + for (var i = 0; i < object.annotations.length; ++i) { + if (typeof object.annotations[i] !== "object") + throw TypeError(".proto.AIRichResponseMessage.AIRichResponseMapMetadata.annotations: object expected"); + message.annotations[i] = $root.proto.AIRichResponseMessage.AIRichResponseMapMetadata.AIRichResponseMapAnnotation.fromObject(object.annotations[i]); + } + } + if (object.showInfoList != null) + message.showInfoList = Boolean(object.showInfoList); + return message; + }; + + /** + * Creates a plain object from a AIRichResponseMapMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.AIRichResponseMessage.AIRichResponseMapMetadata + * @static + * @param {proto.AIRichResponseMessage.AIRichResponseMapMetadata} message AIRichResponseMapMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AIRichResponseMapMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.annotations = []; + if (message.centerLatitude != null && message.hasOwnProperty("centerLatitude")) { + object.centerLatitude = options.json && !isFinite(message.centerLatitude) ? String(message.centerLatitude) : message.centerLatitude; + if (options.oneofs) + object._centerLatitude = "centerLatitude"; + } + if (message.centerLongitude != null && message.hasOwnProperty("centerLongitude")) { + object.centerLongitude = options.json && !isFinite(message.centerLongitude) ? String(message.centerLongitude) : message.centerLongitude; + if (options.oneofs) + object._centerLongitude = "centerLongitude"; + } + if (message.latitudeDelta != null && message.hasOwnProperty("latitudeDelta")) { + object.latitudeDelta = options.json && !isFinite(message.latitudeDelta) ? String(message.latitudeDelta) : message.latitudeDelta; + if (options.oneofs) + object._latitudeDelta = "latitudeDelta"; + } + if (message.longitudeDelta != null && message.hasOwnProperty("longitudeDelta")) { + object.longitudeDelta = options.json && !isFinite(message.longitudeDelta) ? String(message.longitudeDelta) : message.longitudeDelta; + if (options.oneofs) + object._longitudeDelta = "longitudeDelta"; + } + if (message.annotations && message.annotations.length) { + object.annotations = []; + for (var j = 0; j < message.annotations.length; ++j) + object.annotations[j] = $root.proto.AIRichResponseMessage.AIRichResponseMapMetadata.AIRichResponseMapAnnotation.toObject(message.annotations[j], options); + } + if (message.showInfoList != null && message.hasOwnProperty("showInfoList")) { + object.showInfoList = message.showInfoList; + if (options.oneofs) + object._showInfoList = "showInfoList"; + } + return object; + }; + + /** + * Converts this AIRichResponseMapMetadata to JSON. + * @function toJSON + * @memberof proto.AIRichResponseMessage.AIRichResponseMapMetadata + * @instance + * @returns {Object.} JSON object + */ + AIRichResponseMapMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AIRichResponseMapMetadata + * @function getTypeUrl + * @memberof proto.AIRichResponseMessage.AIRichResponseMapMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AIRichResponseMapMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.AIRichResponseMessage.AIRichResponseMapMetadata"; + }; + + AIRichResponseMapMetadata.AIRichResponseMapAnnotation = (function() { + + /** + * Properties of a AIRichResponseMapAnnotation. + * @memberof proto.AIRichResponseMessage.AIRichResponseMapMetadata + * @interface IAIRichResponseMapAnnotation + * @property {number|null} [annotationNumber] AIRichResponseMapAnnotation annotationNumber + * @property {number|null} [latitude] AIRichResponseMapAnnotation latitude + * @property {number|null} [longitude] AIRichResponseMapAnnotation longitude + * @property {string|null} [title] AIRichResponseMapAnnotation title + * @property {string|null} [body] AIRichResponseMapAnnotation body + */ + + /** + * Constructs a new AIRichResponseMapAnnotation. + * @memberof proto.AIRichResponseMessage.AIRichResponseMapMetadata + * @classdesc Represents a AIRichResponseMapAnnotation. + * @implements IAIRichResponseMapAnnotation + * @constructor + * @param {proto.AIRichResponseMessage.AIRichResponseMapMetadata.IAIRichResponseMapAnnotation=} [properties] Properties to set + */ + function AIRichResponseMapAnnotation(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AIRichResponseMapAnnotation annotationNumber. + * @member {number|null|undefined} annotationNumber + * @memberof proto.AIRichResponseMessage.AIRichResponseMapMetadata.AIRichResponseMapAnnotation + * @instance + */ + AIRichResponseMapAnnotation.prototype.annotationNumber = null; + + /** + * AIRichResponseMapAnnotation latitude. + * @member {number|null|undefined} latitude + * @memberof proto.AIRichResponseMessage.AIRichResponseMapMetadata.AIRichResponseMapAnnotation + * @instance + */ + AIRichResponseMapAnnotation.prototype.latitude = null; + + /** + * AIRichResponseMapAnnotation longitude. + * @member {number|null|undefined} longitude + * @memberof proto.AIRichResponseMessage.AIRichResponseMapMetadata.AIRichResponseMapAnnotation + * @instance + */ + AIRichResponseMapAnnotation.prototype.longitude = null; + + /** + * AIRichResponseMapAnnotation title. + * @member {string|null|undefined} title + * @memberof proto.AIRichResponseMessage.AIRichResponseMapMetadata.AIRichResponseMapAnnotation + * @instance + */ + AIRichResponseMapAnnotation.prototype.title = null; + + /** + * AIRichResponseMapAnnotation body. + * @member {string|null|undefined} body + * @memberof proto.AIRichResponseMessage.AIRichResponseMapMetadata.AIRichResponseMapAnnotation + * @instance + */ + AIRichResponseMapAnnotation.prototype.body = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AIRichResponseMapAnnotation.prototype, "_annotationNumber", { + get: $util.oneOfGetter($oneOfFields = ["annotationNumber"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AIRichResponseMapAnnotation.prototype, "_latitude", { + get: $util.oneOfGetter($oneOfFields = ["latitude"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AIRichResponseMapAnnotation.prototype, "_longitude", { + get: $util.oneOfGetter($oneOfFields = ["longitude"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AIRichResponseMapAnnotation.prototype, "_title", { + get: $util.oneOfGetter($oneOfFields = ["title"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AIRichResponseMapAnnotation.prototype, "_body", { + get: $util.oneOfGetter($oneOfFields = ["body"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AIRichResponseMapAnnotation instance using the specified properties. + * @function create + * @memberof proto.AIRichResponseMessage.AIRichResponseMapMetadata.AIRichResponseMapAnnotation + * @static + * @param {proto.AIRichResponseMessage.AIRichResponseMapMetadata.IAIRichResponseMapAnnotation=} [properties] Properties to set + * @returns {proto.AIRichResponseMessage.AIRichResponseMapMetadata.AIRichResponseMapAnnotation} AIRichResponseMapAnnotation instance + */ + AIRichResponseMapAnnotation.create = function create(properties) { + return new AIRichResponseMapAnnotation(properties); + }; + + /** + * Encodes the specified AIRichResponseMapAnnotation message. Does not implicitly {@link proto.AIRichResponseMessage.AIRichResponseMapMetadata.AIRichResponseMapAnnotation.verify|verify} messages. + * @function encode + * @memberof proto.AIRichResponseMessage.AIRichResponseMapMetadata.AIRichResponseMapAnnotation + * @static + * @param {proto.AIRichResponseMessage.AIRichResponseMapMetadata.IAIRichResponseMapAnnotation} message AIRichResponseMapAnnotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AIRichResponseMapAnnotation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.annotationNumber != null && Object.hasOwnProperty.call(message, "annotationNumber")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.annotationNumber); + if (message.latitude != null && Object.hasOwnProperty.call(message, "latitude")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.latitude); + if (message.longitude != null && Object.hasOwnProperty.call(message, "longitude")) + writer.uint32(/* id 3, wireType 1 =*/25).double(message.longitude); + if (message.title != null && Object.hasOwnProperty.call(message, "title")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.title); + if (message.body != null && Object.hasOwnProperty.call(message, "body")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.body); + return writer; + }; + + /** + * Encodes the specified AIRichResponseMapAnnotation message, length delimited. Does not implicitly {@link proto.AIRichResponseMessage.AIRichResponseMapMetadata.AIRichResponseMapAnnotation.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.AIRichResponseMessage.AIRichResponseMapMetadata.AIRichResponseMapAnnotation + * @static + * @param {proto.AIRichResponseMessage.AIRichResponseMapMetadata.IAIRichResponseMapAnnotation} message AIRichResponseMapAnnotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AIRichResponseMapAnnotation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a AIRichResponseMapAnnotation message from the specified reader or buffer. + * @function decode + * @memberof proto.AIRichResponseMessage.AIRichResponseMapMetadata.AIRichResponseMapAnnotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.AIRichResponseMessage.AIRichResponseMapMetadata.AIRichResponseMapAnnotation} AIRichResponseMapAnnotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AIRichResponseMapAnnotation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.AIRichResponseMessage.AIRichResponseMapMetadata.AIRichResponseMapAnnotation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.annotationNumber = reader.uint32(); + break; + } + case 2: { + message.latitude = reader.double(); + break; + } + case 3: { + message.longitude = reader.double(); + break; + } + case 4: { + message.title = reader.string(); + break; + } + case 5: { + message.body = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a AIRichResponseMapAnnotation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.AIRichResponseMessage.AIRichResponseMapMetadata.AIRichResponseMapAnnotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.AIRichResponseMessage.AIRichResponseMapMetadata.AIRichResponseMapAnnotation} AIRichResponseMapAnnotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AIRichResponseMapAnnotation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a AIRichResponseMapAnnotation message. + * @function verify + * @memberof proto.AIRichResponseMessage.AIRichResponseMapMetadata.AIRichResponseMapAnnotation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AIRichResponseMapAnnotation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.annotationNumber != null && message.hasOwnProperty("annotationNumber")) { + properties._annotationNumber = 1; + if (!$util.isInteger(message.annotationNumber)) + return "annotationNumber: integer expected"; + } + if (message.latitude != null && message.hasOwnProperty("latitude")) { + properties._latitude = 1; + if (typeof message.latitude !== "number") + return "latitude: number expected"; + } + if (message.longitude != null && message.hasOwnProperty("longitude")) { + properties._longitude = 1; + if (typeof message.longitude !== "number") + return "longitude: number expected"; + } + if (message.title != null && message.hasOwnProperty("title")) { + properties._title = 1; + if (!$util.isString(message.title)) + return "title: string expected"; + } + if (message.body != null && message.hasOwnProperty("body")) { + properties._body = 1; + if (!$util.isString(message.body)) + return "body: string expected"; + } + return null; + }; + + /** + * Creates a AIRichResponseMapAnnotation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.AIRichResponseMessage.AIRichResponseMapMetadata.AIRichResponseMapAnnotation + * @static + * @param {Object.} object Plain object + * @returns {proto.AIRichResponseMessage.AIRichResponseMapMetadata.AIRichResponseMapAnnotation} AIRichResponseMapAnnotation + */ + AIRichResponseMapAnnotation.fromObject = function fromObject(object) { + if (object instanceof $root.proto.AIRichResponseMessage.AIRichResponseMapMetadata.AIRichResponseMapAnnotation) + return object; + var message = new $root.proto.AIRichResponseMessage.AIRichResponseMapMetadata.AIRichResponseMapAnnotation(); + if (object.annotationNumber != null) + message.annotationNumber = object.annotationNumber >>> 0; + if (object.latitude != null) + message.latitude = Number(object.latitude); + if (object.longitude != null) + message.longitude = Number(object.longitude); + if (object.title != null) + message.title = String(object.title); + if (object.body != null) + message.body = String(object.body); + return message; + }; + + /** + * Creates a plain object from a AIRichResponseMapAnnotation message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.AIRichResponseMessage.AIRichResponseMapMetadata.AIRichResponseMapAnnotation + * @static + * @param {proto.AIRichResponseMessage.AIRichResponseMapMetadata.AIRichResponseMapAnnotation} message AIRichResponseMapAnnotation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AIRichResponseMapAnnotation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.annotationNumber != null && message.hasOwnProperty("annotationNumber")) { + object.annotationNumber = message.annotationNumber; + if (options.oneofs) + object._annotationNumber = "annotationNumber"; + } + if (message.latitude != null && message.hasOwnProperty("latitude")) { + object.latitude = options.json && !isFinite(message.latitude) ? String(message.latitude) : message.latitude; + if (options.oneofs) + object._latitude = "latitude"; + } + if (message.longitude != null && message.hasOwnProperty("longitude")) { + object.longitude = options.json && !isFinite(message.longitude) ? String(message.longitude) : message.longitude; + if (options.oneofs) + object._longitude = "longitude"; + } + if (message.title != null && message.hasOwnProperty("title")) { + object.title = message.title; + if (options.oneofs) + object._title = "title"; + } + if (message.body != null && message.hasOwnProperty("body")) { + object.body = message.body; + if (options.oneofs) + object._body = "body"; + } + return object; + }; + + /** + * Converts this AIRichResponseMapAnnotation to JSON. + * @function toJSON + * @memberof proto.AIRichResponseMessage.AIRichResponseMapMetadata.AIRichResponseMapAnnotation + * @instance + * @returns {Object.} JSON object + */ + AIRichResponseMapAnnotation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AIRichResponseMapAnnotation + * @function getTypeUrl + * @memberof proto.AIRichResponseMessage.AIRichResponseMapMetadata.AIRichResponseMapAnnotation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AIRichResponseMapAnnotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.AIRichResponseMessage.AIRichResponseMapMetadata.AIRichResponseMapAnnotation"; + }; + + return AIRichResponseMapAnnotation; + })(); + + return AIRichResponseMapMetadata; + })(); + + /** + * AIRichResponseMessageType enum. + * @name proto.AIRichResponseMessage.AIRichResponseMessageType + * @enum {number} + * @property {number} AI_RICH_RESPONSE_TYPE_UNKNOWN=0 AI_RICH_RESPONSE_TYPE_UNKNOWN value + * @property {number} AI_RICH_RESPONSE_TYPE_STANDARD=1 AI_RICH_RESPONSE_TYPE_STANDARD value + */ + AIRichResponseMessage.AIRichResponseMessageType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "AI_RICH_RESPONSE_TYPE_UNKNOWN"] = 0; + values[valuesById[1] = "AI_RICH_RESPONSE_TYPE_STANDARD"] = 1; + return values; + })(); + + AIRichResponseMessage.AIRichResponseSubMessage = (function() { + + /** + * Properties of a AIRichResponseSubMessage. + * @memberof proto.AIRichResponseMessage + * @interface IAIRichResponseSubMessage + * @property {proto.AIRichResponseMessage.AIRichResponseSubMessageType|null} [messageType] AIRichResponseSubMessage messageType + * @property {proto.AIRichResponseMessage.IAIRichResponseGridImageMetadata|null} [gridImageMetadata] AIRichResponseSubMessage gridImageMetadata + * @property {string|null} [messageText] AIRichResponseSubMessage messageText + * @property {proto.AIRichResponseMessage.IAIRichResponseInlineImageMetadata|null} [imageMetadata] AIRichResponseSubMessage imageMetadata + * @property {proto.AIRichResponseMessage.IAIRichResponseCodeMetadata|null} [codeMetadata] AIRichResponseSubMessage codeMetadata + * @property {proto.AIRichResponseMessage.IAIRichResponseTableMetadata|null} [tableMetadata] AIRichResponseSubMessage tableMetadata + * @property {proto.AIRichResponseMessage.IAIRichResponseDynamicMetadata|null} [dynamicMetadata] AIRichResponseSubMessage dynamicMetadata + * @property {proto.AIRichResponseMessage.IAIRichResponseLatexMetadata|null} [latexMetadata] AIRichResponseSubMessage latexMetadata + * @property {proto.AIRichResponseMessage.IAIRichResponseMapMetadata|null} [mapMetadata] AIRichResponseSubMessage mapMetadata + * @property {proto.AIRichResponseMessage.IAIRichResponseContentItemsMetadata|null} [contentItemsMetadata] AIRichResponseSubMessage contentItemsMetadata + */ + + /** + * Constructs a new AIRichResponseSubMessage. + * @memberof proto.AIRichResponseMessage + * @classdesc Represents a AIRichResponseSubMessage. + * @implements IAIRichResponseSubMessage + * @constructor + * @param {proto.AIRichResponseMessage.IAIRichResponseSubMessage=} [properties] Properties to set + */ + function AIRichResponseSubMessage(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AIRichResponseSubMessage messageType. + * @member {proto.AIRichResponseMessage.AIRichResponseSubMessageType|null|undefined} messageType + * @memberof proto.AIRichResponseMessage.AIRichResponseSubMessage + * @instance + */ + AIRichResponseSubMessage.prototype.messageType = null; + + /** + * AIRichResponseSubMessage gridImageMetadata. + * @member {proto.AIRichResponseMessage.IAIRichResponseGridImageMetadata|null|undefined} gridImageMetadata + * @memberof proto.AIRichResponseMessage.AIRichResponseSubMessage + * @instance + */ + AIRichResponseSubMessage.prototype.gridImageMetadata = null; + + /** + * AIRichResponseSubMessage messageText. + * @member {string|null|undefined} messageText + * @memberof proto.AIRichResponseMessage.AIRichResponseSubMessage + * @instance + */ + AIRichResponseSubMessage.prototype.messageText = null; + + /** + * AIRichResponseSubMessage imageMetadata. + * @member {proto.AIRichResponseMessage.IAIRichResponseInlineImageMetadata|null|undefined} imageMetadata + * @memberof proto.AIRichResponseMessage.AIRichResponseSubMessage + * @instance + */ + AIRichResponseSubMessage.prototype.imageMetadata = null; + + /** + * AIRichResponseSubMessage codeMetadata. + * @member {proto.AIRichResponseMessage.IAIRichResponseCodeMetadata|null|undefined} codeMetadata + * @memberof proto.AIRichResponseMessage.AIRichResponseSubMessage + * @instance + */ + AIRichResponseSubMessage.prototype.codeMetadata = null; + + /** + * AIRichResponseSubMessage tableMetadata. + * @member {proto.AIRichResponseMessage.IAIRichResponseTableMetadata|null|undefined} tableMetadata + * @memberof proto.AIRichResponseMessage.AIRichResponseSubMessage + * @instance + */ + AIRichResponseSubMessage.prototype.tableMetadata = null; + + /** + * AIRichResponseSubMessage dynamicMetadata. + * @member {proto.AIRichResponseMessage.IAIRichResponseDynamicMetadata|null|undefined} dynamicMetadata + * @memberof proto.AIRichResponseMessage.AIRichResponseSubMessage + * @instance + */ + AIRichResponseSubMessage.prototype.dynamicMetadata = null; + + /** + * AIRichResponseSubMessage latexMetadata. + * @member {proto.AIRichResponseMessage.IAIRichResponseLatexMetadata|null|undefined} latexMetadata + * @memberof proto.AIRichResponseMessage.AIRichResponseSubMessage + * @instance + */ + AIRichResponseSubMessage.prototype.latexMetadata = null; + + /** + * AIRichResponseSubMessage mapMetadata. + * @member {proto.AIRichResponseMessage.IAIRichResponseMapMetadata|null|undefined} mapMetadata + * @memberof proto.AIRichResponseMessage.AIRichResponseSubMessage + * @instance + */ + AIRichResponseSubMessage.prototype.mapMetadata = null; + + /** + * AIRichResponseSubMessage contentItemsMetadata. + * @member {proto.AIRichResponseMessage.IAIRichResponseContentItemsMetadata|null|undefined} contentItemsMetadata + * @memberof proto.AIRichResponseMessage.AIRichResponseSubMessage + * @instance + */ + AIRichResponseSubMessage.prototype.contentItemsMetadata = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AIRichResponseSubMessage.prototype, "_messageType", { + get: $util.oneOfGetter($oneOfFields = ["messageType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AIRichResponseSubMessage.prototype, "_gridImageMetadata", { + get: $util.oneOfGetter($oneOfFields = ["gridImageMetadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AIRichResponseSubMessage.prototype, "_messageText", { + get: $util.oneOfGetter($oneOfFields = ["messageText"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AIRichResponseSubMessage.prototype, "_imageMetadata", { + get: $util.oneOfGetter($oneOfFields = ["imageMetadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AIRichResponseSubMessage.prototype, "_codeMetadata", { + get: $util.oneOfGetter($oneOfFields = ["codeMetadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AIRichResponseSubMessage.prototype, "_tableMetadata", { + get: $util.oneOfGetter($oneOfFields = ["tableMetadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AIRichResponseSubMessage.prototype, "_dynamicMetadata", { + get: $util.oneOfGetter($oneOfFields = ["dynamicMetadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AIRichResponseSubMessage.prototype, "_latexMetadata", { + get: $util.oneOfGetter($oneOfFields = ["latexMetadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AIRichResponseSubMessage.prototype, "_mapMetadata", { + get: $util.oneOfGetter($oneOfFields = ["mapMetadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AIRichResponseSubMessage.prototype, "_contentItemsMetadata", { + get: $util.oneOfGetter($oneOfFields = ["contentItemsMetadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AIRichResponseSubMessage instance using the specified properties. + * @function create + * @memberof proto.AIRichResponseMessage.AIRichResponseSubMessage + * @static + * @param {proto.AIRichResponseMessage.IAIRichResponseSubMessage=} [properties] Properties to set + * @returns {proto.AIRichResponseMessage.AIRichResponseSubMessage} AIRichResponseSubMessage instance + */ + AIRichResponseSubMessage.create = function create(properties) { + return new AIRichResponseSubMessage(properties); + }; + + /** + * Encodes the specified AIRichResponseSubMessage message. Does not implicitly {@link proto.AIRichResponseMessage.AIRichResponseSubMessage.verify|verify} messages. + * @function encode + * @memberof proto.AIRichResponseMessage.AIRichResponseSubMessage + * @static + * @param {proto.AIRichResponseMessage.IAIRichResponseSubMessage} message AIRichResponseSubMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AIRichResponseSubMessage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.messageType != null && Object.hasOwnProperty.call(message, "messageType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.messageType); + if (message.gridImageMetadata != null && Object.hasOwnProperty.call(message, "gridImageMetadata")) + $root.proto.AIRichResponseMessage.AIRichResponseGridImageMetadata.encode(message.gridImageMetadata, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.messageText != null && Object.hasOwnProperty.call(message, "messageText")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.messageText); + if (message.imageMetadata != null && Object.hasOwnProperty.call(message, "imageMetadata")) + $root.proto.AIRichResponseMessage.AIRichResponseInlineImageMetadata.encode(message.imageMetadata, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.codeMetadata != null && Object.hasOwnProperty.call(message, "codeMetadata")) + $root.proto.AIRichResponseMessage.AIRichResponseCodeMetadata.encode(message.codeMetadata, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.tableMetadata != null && Object.hasOwnProperty.call(message, "tableMetadata")) + $root.proto.AIRichResponseMessage.AIRichResponseTableMetadata.encode(message.tableMetadata, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.dynamicMetadata != null && Object.hasOwnProperty.call(message, "dynamicMetadata")) + $root.proto.AIRichResponseMessage.AIRichResponseDynamicMetadata.encode(message.dynamicMetadata, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.latexMetadata != null && Object.hasOwnProperty.call(message, "latexMetadata")) + $root.proto.AIRichResponseMessage.AIRichResponseLatexMetadata.encode(message.latexMetadata, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.mapMetadata != null && Object.hasOwnProperty.call(message, "mapMetadata")) + $root.proto.AIRichResponseMessage.AIRichResponseMapMetadata.encode(message.mapMetadata, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.contentItemsMetadata != null && Object.hasOwnProperty.call(message, "contentItemsMetadata")) + $root.proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.encode(message.contentItemsMetadata, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AIRichResponseSubMessage message, length delimited. Does not implicitly {@link proto.AIRichResponseMessage.AIRichResponseSubMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.AIRichResponseMessage.AIRichResponseSubMessage + * @static + * @param {proto.AIRichResponseMessage.IAIRichResponseSubMessage} message AIRichResponseSubMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AIRichResponseSubMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a AIRichResponseSubMessage message from the specified reader or buffer. + * @function decode + * @memberof proto.AIRichResponseMessage.AIRichResponseSubMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.AIRichResponseMessage.AIRichResponseSubMessage} AIRichResponseSubMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AIRichResponseSubMessage.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.AIRichResponseMessage.AIRichResponseSubMessage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.messageType = reader.int32(); + break; + } + case 2: { + message.gridImageMetadata = $root.proto.AIRichResponseMessage.AIRichResponseGridImageMetadata.decode(reader, reader.uint32()); + break; + } + case 3: { + message.messageText = reader.string(); + break; + } + case 4: { + message.imageMetadata = $root.proto.AIRichResponseMessage.AIRichResponseInlineImageMetadata.decode(reader, reader.uint32()); + break; + } + case 5: { + message.codeMetadata = $root.proto.AIRichResponseMessage.AIRichResponseCodeMetadata.decode(reader, reader.uint32()); + break; + } + case 6: { + message.tableMetadata = $root.proto.AIRichResponseMessage.AIRichResponseTableMetadata.decode(reader, reader.uint32()); + break; + } + case 7: { + message.dynamicMetadata = $root.proto.AIRichResponseMessage.AIRichResponseDynamicMetadata.decode(reader, reader.uint32()); + break; + } + case 8: { + message.latexMetadata = $root.proto.AIRichResponseMessage.AIRichResponseLatexMetadata.decode(reader, reader.uint32()); + break; + } + case 9: { + message.mapMetadata = $root.proto.AIRichResponseMessage.AIRichResponseMapMetadata.decode(reader, reader.uint32()); + break; + } + case 10: { + message.contentItemsMetadata = $root.proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a AIRichResponseSubMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.AIRichResponseMessage.AIRichResponseSubMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.AIRichResponseMessage.AIRichResponseSubMessage} AIRichResponseSubMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AIRichResponseSubMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a AIRichResponseSubMessage message. + * @function verify + * @memberof proto.AIRichResponseMessage.AIRichResponseSubMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AIRichResponseSubMessage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.messageType != null && message.hasOwnProperty("messageType")) { + properties._messageType = 1; + switch (message.messageType) { + default: + return "messageType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + break; + } + } + if (message.gridImageMetadata != null && message.hasOwnProperty("gridImageMetadata")) { + properties._gridImageMetadata = 1; + { + var error = $root.proto.AIRichResponseMessage.AIRichResponseGridImageMetadata.verify(message.gridImageMetadata); + if (error) + return "gridImageMetadata." + error; + } + } + if (message.messageText != null && message.hasOwnProperty("messageText")) { + properties._messageText = 1; + if (!$util.isString(message.messageText)) + return "messageText: string expected"; + } + if (message.imageMetadata != null && message.hasOwnProperty("imageMetadata")) { + properties._imageMetadata = 1; + { + var error = $root.proto.AIRichResponseMessage.AIRichResponseInlineImageMetadata.verify(message.imageMetadata); + if (error) + return "imageMetadata." + error; + } + } + if (message.codeMetadata != null && message.hasOwnProperty("codeMetadata")) { + properties._codeMetadata = 1; + { + var error = $root.proto.AIRichResponseMessage.AIRichResponseCodeMetadata.verify(message.codeMetadata); + if (error) + return "codeMetadata." + error; + } + } + if (message.tableMetadata != null && message.hasOwnProperty("tableMetadata")) { + properties._tableMetadata = 1; + { + var error = $root.proto.AIRichResponseMessage.AIRichResponseTableMetadata.verify(message.tableMetadata); + if (error) + return "tableMetadata." + error; + } + } + if (message.dynamicMetadata != null && message.hasOwnProperty("dynamicMetadata")) { + properties._dynamicMetadata = 1; + { + var error = $root.proto.AIRichResponseMessage.AIRichResponseDynamicMetadata.verify(message.dynamicMetadata); + if (error) + return "dynamicMetadata." + error; + } + } + if (message.latexMetadata != null && message.hasOwnProperty("latexMetadata")) { + properties._latexMetadata = 1; + { + var error = $root.proto.AIRichResponseMessage.AIRichResponseLatexMetadata.verify(message.latexMetadata); + if (error) + return "latexMetadata." + error; + } + } + if (message.mapMetadata != null && message.hasOwnProperty("mapMetadata")) { + properties._mapMetadata = 1; + { + var error = $root.proto.AIRichResponseMessage.AIRichResponseMapMetadata.verify(message.mapMetadata); + if (error) + return "mapMetadata." + error; + } + } + if (message.contentItemsMetadata != null && message.hasOwnProperty("contentItemsMetadata")) { + properties._contentItemsMetadata = 1; + { + var error = $root.proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.verify(message.contentItemsMetadata); + if (error) + return "contentItemsMetadata." + error; + } + } + return null; + }; + + /** + * Creates a AIRichResponseSubMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.AIRichResponseMessage.AIRichResponseSubMessage + * @static + * @param {Object.} object Plain object + * @returns {proto.AIRichResponseMessage.AIRichResponseSubMessage} AIRichResponseSubMessage + */ + AIRichResponseSubMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.AIRichResponseMessage.AIRichResponseSubMessage) + return object; + var message = new $root.proto.AIRichResponseMessage.AIRichResponseSubMessage(); + switch (object.messageType) { + default: + if (typeof object.messageType === "number") { + message.messageType = object.messageType; + break; + } + break; + case "AI_RICH_RESPONSE_UNKNOWN": + case 0: + message.messageType = 0; + break; + case "AI_RICH_RESPONSE_GRID_IMAGE": + case 1: + message.messageType = 1; + break; + case "AI_RICH_RESPONSE_TEXT": + case 2: + message.messageType = 2; + break; + case "AI_RICH_RESPONSE_INLINE_IMAGE": + case 3: + message.messageType = 3; + break; + case "AI_RICH_RESPONSE_TABLE": + case 4: + message.messageType = 4; + break; + case "AI_RICH_RESPONSE_CODE": + case 5: + message.messageType = 5; + break; + case "AI_RICH_RESPONSE_DYNAMIC": + case 6: + message.messageType = 6; + break; + case "AI_RICH_RESPONSE_MAP": + case 7: + message.messageType = 7; + break; + case "AI_RICH_RESPONSE_LATEX": + case 8: + message.messageType = 8; + break; + case "AI_RICH_RESPONSE_CONTENT_ITEMS": + case 9: + message.messageType = 9; + break; + } + if (object.gridImageMetadata != null) { + if (typeof object.gridImageMetadata !== "object") + throw TypeError(".proto.AIRichResponseMessage.AIRichResponseSubMessage.gridImageMetadata: object expected"); + message.gridImageMetadata = $root.proto.AIRichResponseMessage.AIRichResponseGridImageMetadata.fromObject(object.gridImageMetadata); + } + if (object.messageText != null) + message.messageText = String(object.messageText); + if (object.imageMetadata != null) { + if (typeof object.imageMetadata !== "object") + throw TypeError(".proto.AIRichResponseMessage.AIRichResponseSubMessage.imageMetadata: object expected"); + message.imageMetadata = $root.proto.AIRichResponseMessage.AIRichResponseInlineImageMetadata.fromObject(object.imageMetadata); + } + if (object.codeMetadata != null) { + if (typeof object.codeMetadata !== "object") + throw TypeError(".proto.AIRichResponseMessage.AIRichResponseSubMessage.codeMetadata: object expected"); + message.codeMetadata = $root.proto.AIRichResponseMessage.AIRichResponseCodeMetadata.fromObject(object.codeMetadata); + } + if (object.tableMetadata != null) { + if (typeof object.tableMetadata !== "object") + throw TypeError(".proto.AIRichResponseMessage.AIRichResponseSubMessage.tableMetadata: object expected"); + message.tableMetadata = $root.proto.AIRichResponseMessage.AIRichResponseTableMetadata.fromObject(object.tableMetadata); + } + if (object.dynamicMetadata != null) { + if (typeof object.dynamicMetadata !== "object") + throw TypeError(".proto.AIRichResponseMessage.AIRichResponseSubMessage.dynamicMetadata: object expected"); + message.dynamicMetadata = $root.proto.AIRichResponseMessage.AIRichResponseDynamicMetadata.fromObject(object.dynamicMetadata); + } + if (object.latexMetadata != null) { + if (typeof object.latexMetadata !== "object") + throw TypeError(".proto.AIRichResponseMessage.AIRichResponseSubMessage.latexMetadata: object expected"); + message.latexMetadata = $root.proto.AIRichResponseMessage.AIRichResponseLatexMetadata.fromObject(object.latexMetadata); + } + if (object.mapMetadata != null) { + if (typeof object.mapMetadata !== "object") + throw TypeError(".proto.AIRichResponseMessage.AIRichResponseSubMessage.mapMetadata: object expected"); + message.mapMetadata = $root.proto.AIRichResponseMessage.AIRichResponseMapMetadata.fromObject(object.mapMetadata); + } + if (object.contentItemsMetadata != null) { + if (typeof object.contentItemsMetadata !== "object") + throw TypeError(".proto.AIRichResponseMessage.AIRichResponseSubMessage.contentItemsMetadata: object expected"); + message.contentItemsMetadata = $root.proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.fromObject(object.contentItemsMetadata); + } + return message; + }; + + /** + * Creates a plain object from a AIRichResponseSubMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.AIRichResponseMessage.AIRichResponseSubMessage + * @static + * @param {proto.AIRichResponseMessage.AIRichResponseSubMessage} message AIRichResponseSubMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AIRichResponseSubMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.messageType != null && message.hasOwnProperty("messageType")) { + object.messageType = options.enums === String ? $root.proto.AIRichResponseMessage.AIRichResponseSubMessageType[message.messageType] === undefined ? message.messageType : $root.proto.AIRichResponseMessage.AIRichResponseSubMessageType[message.messageType] : message.messageType; + if (options.oneofs) + object._messageType = "messageType"; + } + if (message.gridImageMetadata != null && message.hasOwnProperty("gridImageMetadata")) { + object.gridImageMetadata = $root.proto.AIRichResponseMessage.AIRichResponseGridImageMetadata.toObject(message.gridImageMetadata, options); + if (options.oneofs) + object._gridImageMetadata = "gridImageMetadata"; + } + if (message.messageText != null && message.hasOwnProperty("messageText")) { + object.messageText = message.messageText; + if (options.oneofs) + object._messageText = "messageText"; + } + if (message.imageMetadata != null && message.hasOwnProperty("imageMetadata")) { + object.imageMetadata = $root.proto.AIRichResponseMessage.AIRichResponseInlineImageMetadata.toObject(message.imageMetadata, options); + if (options.oneofs) + object._imageMetadata = "imageMetadata"; + } + if (message.codeMetadata != null && message.hasOwnProperty("codeMetadata")) { + object.codeMetadata = $root.proto.AIRichResponseMessage.AIRichResponseCodeMetadata.toObject(message.codeMetadata, options); + if (options.oneofs) + object._codeMetadata = "codeMetadata"; + } + if (message.tableMetadata != null && message.hasOwnProperty("tableMetadata")) { + object.tableMetadata = $root.proto.AIRichResponseMessage.AIRichResponseTableMetadata.toObject(message.tableMetadata, options); + if (options.oneofs) + object._tableMetadata = "tableMetadata"; + } + if (message.dynamicMetadata != null && message.hasOwnProperty("dynamicMetadata")) { + object.dynamicMetadata = $root.proto.AIRichResponseMessage.AIRichResponseDynamicMetadata.toObject(message.dynamicMetadata, options); + if (options.oneofs) + object._dynamicMetadata = "dynamicMetadata"; + } + if (message.latexMetadata != null && message.hasOwnProperty("latexMetadata")) { + object.latexMetadata = $root.proto.AIRichResponseMessage.AIRichResponseLatexMetadata.toObject(message.latexMetadata, options); + if (options.oneofs) + object._latexMetadata = "latexMetadata"; + } + if (message.mapMetadata != null && message.hasOwnProperty("mapMetadata")) { + object.mapMetadata = $root.proto.AIRichResponseMessage.AIRichResponseMapMetadata.toObject(message.mapMetadata, options); + if (options.oneofs) + object._mapMetadata = "mapMetadata"; + } + if (message.contentItemsMetadata != null && message.hasOwnProperty("contentItemsMetadata")) { + object.contentItemsMetadata = $root.proto.AIRichResponseMessage.AIRichResponseContentItemsMetadata.toObject(message.contentItemsMetadata, options); + if (options.oneofs) + object._contentItemsMetadata = "contentItemsMetadata"; + } + return object; + }; + + /** + * Converts this AIRichResponseSubMessage to JSON. + * @function toJSON + * @memberof proto.AIRichResponseMessage.AIRichResponseSubMessage + * @instance + * @returns {Object.} JSON object + */ + AIRichResponseSubMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AIRichResponseSubMessage + * @function getTypeUrl + * @memberof proto.AIRichResponseMessage.AIRichResponseSubMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AIRichResponseSubMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.AIRichResponseMessage.AIRichResponseSubMessage"; + }; + + return AIRichResponseSubMessage; + })(); + + /** + * AIRichResponseSubMessageType enum. + * @name proto.AIRichResponseMessage.AIRichResponseSubMessageType + * @enum {number} + * @property {number} AI_RICH_RESPONSE_UNKNOWN=0 AI_RICH_RESPONSE_UNKNOWN value + * @property {number} AI_RICH_RESPONSE_GRID_IMAGE=1 AI_RICH_RESPONSE_GRID_IMAGE value + * @property {number} AI_RICH_RESPONSE_TEXT=2 AI_RICH_RESPONSE_TEXT value + * @property {number} AI_RICH_RESPONSE_INLINE_IMAGE=3 AI_RICH_RESPONSE_INLINE_IMAGE value + * @property {number} AI_RICH_RESPONSE_TABLE=4 AI_RICH_RESPONSE_TABLE value + * @property {number} AI_RICH_RESPONSE_CODE=5 AI_RICH_RESPONSE_CODE value + * @property {number} AI_RICH_RESPONSE_DYNAMIC=6 AI_RICH_RESPONSE_DYNAMIC value + * @property {number} AI_RICH_RESPONSE_MAP=7 AI_RICH_RESPONSE_MAP value + * @property {number} AI_RICH_RESPONSE_LATEX=8 AI_RICH_RESPONSE_LATEX value + * @property {number} AI_RICH_RESPONSE_CONTENT_ITEMS=9 AI_RICH_RESPONSE_CONTENT_ITEMS value + */ + AIRichResponseMessage.AIRichResponseSubMessageType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "AI_RICH_RESPONSE_UNKNOWN"] = 0; + values[valuesById[1] = "AI_RICH_RESPONSE_GRID_IMAGE"] = 1; + values[valuesById[2] = "AI_RICH_RESPONSE_TEXT"] = 2; + values[valuesById[3] = "AI_RICH_RESPONSE_INLINE_IMAGE"] = 3; + values[valuesById[4] = "AI_RICH_RESPONSE_TABLE"] = 4; + values[valuesById[5] = "AI_RICH_RESPONSE_CODE"] = 5; + values[valuesById[6] = "AI_RICH_RESPONSE_DYNAMIC"] = 6; + values[valuesById[7] = "AI_RICH_RESPONSE_MAP"] = 7; + values[valuesById[8] = "AI_RICH_RESPONSE_LATEX"] = 8; + values[valuesById[9] = "AI_RICH_RESPONSE_CONTENT_ITEMS"] = 9; + return values; + })(); + + AIRichResponseMessage.AIRichResponseTableMetadata = (function() { + + /** + * Properties of a AIRichResponseTableMetadata. + * @memberof proto.AIRichResponseMessage + * @interface IAIRichResponseTableMetadata + * @property {Array.|null} [rows] AIRichResponseTableMetadata rows + */ + + /** + * Constructs a new AIRichResponseTableMetadata. + * @memberof proto.AIRichResponseMessage + * @classdesc Represents a AIRichResponseTableMetadata. + * @implements IAIRichResponseTableMetadata + * @constructor + * @param {proto.AIRichResponseMessage.IAIRichResponseTableMetadata=} [properties] Properties to set + */ + function AIRichResponseTableMetadata(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]]; + } + + /** + * AIRichResponseTableMetadata rows. + * @member {Array.} rows + * @memberof proto.AIRichResponseMessage.AIRichResponseTableMetadata + * @instance + */ + AIRichResponseTableMetadata.prototype.rows = $util.emptyArray; + + /** + * Creates a new AIRichResponseTableMetadata instance using the specified properties. + * @function create + * @memberof proto.AIRichResponseMessage.AIRichResponseTableMetadata + * @static + * @param {proto.AIRichResponseMessage.IAIRichResponseTableMetadata=} [properties] Properties to set + * @returns {proto.AIRichResponseMessage.AIRichResponseTableMetadata} AIRichResponseTableMetadata instance + */ + AIRichResponseTableMetadata.create = function create(properties) { + return new AIRichResponseTableMetadata(properties); + }; + + /** + * Encodes the specified AIRichResponseTableMetadata message. Does not implicitly {@link proto.AIRichResponseMessage.AIRichResponseTableMetadata.verify|verify} messages. + * @function encode + * @memberof proto.AIRichResponseMessage.AIRichResponseTableMetadata + * @static + * @param {proto.AIRichResponseMessage.IAIRichResponseTableMetadata} message AIRichResponseTableMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AIRichResponseTableMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rows != null && message.rows.length) + for (var i = 0; i < message.rows.length; ++i) + $root.proto.AIRichResponseMessage.AIRichResponseTableMetadata.AIRichResponseTableRow.encode(message.rows[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AIRichResponseTableMetadata message, length delimited. Does not implicitly {@link proto.AIRichResponseMessage.AIRichResponseTableMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.AIRichResponseMessage.AIRichResponseTableMetadata + * @static + * @param {proto.AIRichResponseMessage.IAIRichResponseTableMetadata} message AIRichResponseTableMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AIRichResponseTableMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a AIRichResponseTableMetadata message from the specified reader or buffer. + * @function decode + * @memberof proto.AIRichResponseMessage.AIRichResponseTableMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.AIRichResponseMessage.AIRichResponseTableMetadata} AIRichResponseTableMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AIRichResponseTableMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.AIRichResponseMessage.AIRichResponseTableMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.rows && message.rows.length)) + message.rows = []; + message.rows.push($root.proto.AIRichResponseMessage.AIRichResponseTableMetadata.AIRichResponseTableRow.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a AIRichResponseTableMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.AIRichResponseMessage.AIRichResponseTableMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.AIRichResponseMessage.AIRichResponseTableMetadata} AIRichResponseTableMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AIRichResponseTableMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a AIRichResponseTableMetadata message. + * @function verify + * @memberof proto.AIRichResponseMessage.AIRichResponseTableMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AIRichResponseTableMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object 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.AIRichResponseMessage.AIRichResponseTableMetadata.AIRichResponseTableRow.verify(message.rows[i]); + if (error) + return "rows." + error; + } + } + return null; + }; + + /** + * Creates a AIRichResponseTableMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.AIRichResponseMessage.AIRichResponseTableMetadata + * @static + * @param {Object.} object Plain object + * @returns {proto.AIRichResponseMessage.AIRichResponseTableMetadata} AIRichResponseTableMetadata + */ + AIRichResponseTableMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.proto.AIRichResponseMessage.AIRichResponseTableMetadata) + return object; + var message = new $root.proto.AIRichResponseMessage.AIRichResponseTableMetadata(); + if (object.rows) { + if (!Array.isArray(object.rows)) + throw TypeError(".proto.AIRichResponseMessage.AIRichResponseTableMetadata.rows: array expected"); + message.rows = []; + for (var i = 0; i < object.rows.length; ++i) { + if (typeof object.rows[i] !== "object") + throw TypeError(".proto.AIRichResponseMessage.AIRichResponseTableMetadata.rows: object expected"); + message.rows[i] = $root.proto.AIRichResponseMessage.AIRichResponseTableMetadata.AIRichResponseTableRow.fromObject(object.rows[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a AIRichResponseTableMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.AIRichResponseMessage.AIRichResponseTableMetadata + * @static + * @param {proto.AIRichResponseMessage.AIRichResponseTableMetadata} message AIRichResponseTableMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AIRichResponseTableMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.rows = []; + if (message.rows && message.rows.length) { + object.rows = []; + for (var j = 0; j < message.rows.length; ++j) + object.rows[j] = $root.proto.AIRichResponseMessage.AIRichResponseTableMetadata.AIRichResponseTableRow.toObject(message.rows[j], options); + } + return object; + }; + + /** + * Converts this AIRichResponseTableMetadata to JSON. + * @function toJSON + * @memberof proto.AIRichResponseMessage.AIRichResponseTableMetadata + * @instance + * @returns {Object.} JSON object + */ + AIRichResponseTableMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AIRichResponseTableMetadata + * @function getTypeUrl + * @memberof proto.AIRichResponseMessage.AIRichResponseTableMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AIRichResponseTableMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.AIRichResponseMessage.AIRichResponseTableMetadata"; + }; + + AIRichResponseTableMetadata.AIRichResponseTableRow = (function() { + + /** + * Properties of a AIRichResponseTableRow. + * @memberof proto.AIRichResponseMessage.AIRichResponseTableMetadata + * @interface IAIRichResponseTableRow + * @property {Array.|null} [items] AIRichResponseTableRow items + * @property {boolean|null} [isHeading] AIRichResponseTableRow isHeading + */ + + /** + * Constructs a new AIRichResponseTableRow. + * @memberof proto.AIRichResponseMessage.AIRichResponseTableMetadata + * @classdesc Represents a AIRichResponseTableRow. + * @implements IAIRichResponseTableRow + * @constructor + * @param {proto.AIRichResponseMessage.AIRichResponseTableMetadata.IAIRichResponseTableRow=} [properties] Properties to set + */ + function AIRichResponseTableRow(properties) { + this.items = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AIRichResponseTableRow items. + * @member {Array.} items + * @memberof proto.AIRichResponseMessage.AIRichResponseTableMetadata.AIRichResponseTableRow + * @instance + */ + AIRichResponseTableRow.prototype.items = $util.emptyArray; + + /** + * AIRichResponseTableRow isHeading. + * @member {boolean|null|undefined} isHeading + * @memberof proto.AIRichResponseMessage.AIRichResponseTableMetadata.AIRichResponseTableRow + * @instance + */ + AIRichResponseTableRow.prototype.isHeading = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AIRichResponseTableRow.prototype, "_isHeading", { + get: $util.oneOfGetter($oneOfFields = ["isHeading"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AIRichResponseTableRow instance using the specified properties. + * @function create + * @memberof proto.AIRichResponseMessage.AIRichResponseTableMetadata.AIRichResponseTableRow + * @static + * @param {proto.AIRichResponseMessage.AIRichResponseTableMetadata.IAIRichResponseTableRow=} [properties] Properties to set + * @returns {proto.AIRichResponseMessage.AIRichResponseTableMetadata.AIRichResponseTableRow} AIRichResponseTableRow instance + */ + AIRichResponseTableRow.create = function create(properties) { + return new AIRichResponseTableRow(properties); + }; + + /** + * Encodes the specified AIRichResponseTableRow message. Does not implicitly {@link proto.AIRichResponseMessage.AIRichResponseTableMetadata.AIRichResponseTableRow.verify|verify} messages. + * @function encode + * @memberof proto.AIRichResponseMessage.AIRichResponseTableMetadata.AIRichResponseTableRow + * @static + * @param {proto.AIRichResponseMessage.AIRichResponseTableMetadata.IAIRichResponseTableRow} message AIRichResponseTableRow message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AIRichResponseTableRow.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.items != null && message.items.length) + for (var i = 0; i < message.items.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.items[i]); + if (message.isHeading != null && Object.hasOwnProperty.call(message, "isHeading")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isHeading); + return writer; + }; + + /** + * Encodes the specified AIRichResponseTableRow message, length delimited. Does not implicitly {@link proto.AIRichResponseMessage.AIRichResponseTableMetadata.AIRichResponseTableRow.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.AIRichResponseMessage.AIRichResponseTableMetadata.AIRichResponseTableRow + * @static + * @param {proto.AIRichResponseMessage.AIRichResponseTableMetadata.IAIRichResponseTableRow} message AIRichResponseTableRow message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AIRichResponseTableRow.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a AIRichResponseTableRow message from the specified reader or buffer. + * @function decode + * @memberof proto.AIRichResponseMessage.AIRichResponseTableMetadata.AIRichResponseTableRow + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.AIRichResponseMessage.AIRichResponseTableMetadata.AIRichResponseTableRow} AIRichResponseTableRow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AIRichResponseTableRow.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.AIRichResponseMessage.AIRichResponseTableMetadata.AIRichResponseTableRow(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.items && message.items.length)) + message.items = []; + message.items.push(reader.string()); + break; + } + case 2: { + message.isHeading = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a AIRichResponseTableRow message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.AIRichResponseMessage.AIRichResponseTableMetadata.AIRichResponseTableRow + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.AIRichResponseMessage.AIRichResponseTableMetadata.AIRichResponseTableRow} AIRichResponseTableRow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AIRichResponseTableRow.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a AIRichResponseTableRow message. + * @function verify + * @memberof proto.AIRichResponseMessage.AIRichResponseTableMetadata.AIRichResponseTableRow + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AIRichResponseTableRow.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.items != null && message.hasOwnProperty("items")) { + if (!Array.isArray(message.items)) + return "items: array expected"; + for (var i = 0; i < message.items.length; ++i) + if (!$util.isString(message.items[i])) + return "items: string[] expected"; + } + if (message.isHeading != null && message.hasOwnProperty("isHeading")) { + properties._isHeading = 1; + if (typeof message.isHeading !== "boolean") + return "isHeading: boolean expected"; + } + return null; + }; + + /** + * Creates a AIRichResponseTableRow message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.AIRichResponseMessage.AIRichResponseTableMetadata.AIRichResponseTableRow + * @static + * @param {Object.} object Plain object + * @returns {proto.AIRichResponseMessage.AIRichResponseTableMetadata.AIRichResponseTableRow} AIRichResponseTableRow + */ + AIRichResponseTableRow.fromObject = function fromObject(object) { + if (object instanceof $root.proto.AIRichResponseMessage.AIRichResponseTableMetadata.AIRichResponseTableRow) + return object; + var message = new $root.proto.AIRichResponseMessage.AIRichResponseTableMetadata.AIRichResponseTableRow(); + if (object.items) { + if (!Array.isArray(object.items)) + throw TypeError(".proto.AIRichResponseMessage.AIRichResponseTableMetadata.AIRichResponseTableRow.items: array expected"); + message.items = []; + for (var i = 0; i < object.items.length; ++i) + message.items[i] = String(object.items[i]); + } + if (object.isHeading != null) + message.isHeading = Boolean(object.isHeading); + return message; + }; + + /** + * Creates a plain object from a AIRichResponseTableRow message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.AIRichResponseMessage.AIRichResponseTableMetadata.AIRichResponseTableRow + * @static + * @param {proto.AIRichResponseMessage.AIRichResponseTableMetadata.AIRichResponseTableRow} message AIRichResponseTableRow + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AIRichResponseTableRow.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.items = []; + if (message.items && message.items.length) { + object.items = []; + for (var j = 0; j < message.items.length; ++j) + object.items[j] = message.items[j]; + } + if (message.isHeading != null && message.hasOwnProperty("isHeading")) { + object.isHeading = message.isHeading; + if (options.oneofs) + object._isHeading = "isHeading"; + } + return object; + }; + + /** + * Converts this AIRichResponseTableRow to JSON. + * @function toJSON + * @memberof proto.AIRichResponseMessage.AIRichResponseTableMetadata.AIRichResponseTableRow + * @instance + * @returns {Object.} JSON object + */ + AIRichResponseTableRow.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AIRichResponseTableRow + * @function getTypeUrl + * @memberof proto.AIRichResponseMessage.AIRichResponseTableMetadata.AIRichResponseTableRow + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AIRichResponseTableRow.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.AIRichResponseMessage.AIRichResponseTableMetadata.AIRichResponseTableRow"; + }; + + return AIRichResponseTableRow; + })(); + + return AIRichResponseTableMetadata; + })(); + + return AIRichResponseMessage; + })(); + proto.ActionLink = (function() { /** @@ -1515,19 +7486,34 @@ $root.proto = (function() { /** * ActionLink url. - * @member {string} url + * @member {string|null|undefined} url * @memberof proto.ActionLink * @instance */ - ActionLink.prototype.url = ""; + ActionLink.prototype.url = null; /** * ActionLink buttonTitle. - * @member {string} buttonTitle + * @member {string|null|undefined} buttonTitle * @memberof proto.ActionLink * @instance */ - ActionLink.prototype.buttonTitle = ""; + ActionLink.prototype.buttonTitle = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ActionLink.prototype, "_url", { + get: $util.oneOfGetter($oneOfFields = ["url"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ActionLink.prototype, "_buttonTitle", { + get: $util.oneOfGetter($oneOfFields = ["buttonTitle"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new ActionLink instance using the specified properties. @@ -1591,12 +7577,14 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.url = reader.string(); - break; - case 2: - message.buttonTitle = reader.string(); - break; + case 1: { + message.url = reader.string(); + break; + } + case 2: { + message.buttonTitle = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -1632,12 +7620,17 @@ $root.proto = (function() { ActionLink.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.url != null && message.hasOwnProperty("url")) + var properties = {}; + if (message.url != null && message.hasOwnProperty("url")) { + properties._url = 1; if (!$util.isString(message.url)) return "url: string expected"; - if (message.buttonTitle != null && message.hasOwnProperty("buttonTitle")) + } + if (message.buttonTitle != null && message.hasOwnProperty("buttonTitle")) { + properties._buttonTitle = 1; if (!$util.isString(message.buttonTitle)) return "buttonTitle: string expected"; + } return null; }; @@ -1673,14 +7666,16 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.url = ""; - object.buttonTitle = ""; - } - if (message.url != null && message.hasOwnProperty("url")) + if (message.url != null && message.hasOwnProperty("url")) { object.url = message.url; - if (message.buttonTitle != null && message.hasOwnProperty("buttonTitle")) + if (options.oneofs) + object._url = "url"; + } + if (message.buttonTitle != null && message.hasOwnProperty("buttonTitle")) { object.buttonTitle = message.buttonTitle; + if (options.oneofs) + object._buttonTitle = "buttonTitle"; + } return object; }; @@ -1695,6 +7690,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ActionLink + * @function getTypeUrl + * @memberof proto.ActionLink + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ActionLink.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.ActionLink"; + }; + return ActionLink; })(); @@ -1727,35 +7737,62 @@ $root.proto = (function() { /** * AutoDownloadSettings downloadImages. - * @member {boolean} downloadImages + * @member {boolean|null|undefined} downloadImages * @memberof proto.AutoDownloadSettings * @instance */ - AutoDownloadSettings.prototype.downloadImages = false; + AutoDownloadSettings.prototype.downloadImages = null; /** * AutoDownloadSettings downloadAudio. - * @member {boolean} downloadAudio + * @member {boolean|null|undefined} downloadAudio * @memberof proto.AutoDownloadSettings * @instance */ - AutoDownloadSettings.prototype.downloadAudio = false; + AutoDownloadSettings.prototype.downloadAudio = null; /** * AutoDownloadSettings downloadVideo. - * @member {boolean} downloadVideo + * @member {boolean|null|undefined} downloadVideo * @memberof proto.AutoDownloadSettings * @instance */ - AutoDownloadSettings.prototype.downloadVideo = false; + AutoDownloadSettings.prototype.downloadVideo = null; /** * AutoDownloadSettings downloadDocuments. - * @member {boolean} downloadDocuments + * @member {boolean|null|undefined} downloadDocuments * @memberof proto.AutoDownloadSettings * @instance */ - AutoDownloadSettings.prototype.downloadDocuments = false; + AutoDownloadSettings.prototype.downloadDocuments = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AutoDownloadSettings.prototype, "_downloadImages", { + get: $util.oneOfGetter($oneOfFields = ["downloadImages"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AutoDownloadSettings.prototype, "_downloadAudio", { + get: $util.oneOfGetter($oneOfFields = ["downloadAudio"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AutoDownloadSettings.prototype, "_downloadVideo", { + get: $util.oneOfGetter($oneOfFields = ["downloadVideo"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AutoDownloadSettings.prototype, "_downloadDocuments", { + get: $util.oneOfGetter($oneOfFields = ["downloadDocuments"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new AutoDownloadSettings instance using the specified properties. @@ -1823,18 +7860,22 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.downloadImages = reader.bool(); - break; - case 2: - message.downloadAudio = reader.bool(); - break; - case 3: - message.downloadVideo = reader.bool(); - break; - case 4: - message.downloadDocuments = reader.bool(); - break; + case 1: { + message.downloadImages = reader.bool(); + break; + } + case 2: { + message.downloadAudio = reader.bool(); + break; + } + case 3: { + message.downloadVideo = reader.bool(); + break; + } + case 4: { + message.downloadDocuments = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -1870,18 +7911,27 @@ $root.proto = (function() { AutoDownloadSettings.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.downloadImages != null && message.hasOwnProperty("downloadImages")) + var properties = {}; + if (message.downloadImages != null && message.hasOwnProperty("downloadImages")) { + properties._downloadImages = 1; if (typeof message.downloadImages !== "boolean") return "downloadImages: boolean expected"; - if (message.downloadAudio != null && message.hasOwnProperty("downloadAudio")) + } + if (message.downloadAudio != null && message.hasOwnProperty("downloadAudio")) { + properties._downloadAudio = 1; if (typeof message.downloadAudio !== "boolean") return "downloadAudio: boolean expected"; - if (message.downloadVideo != null && message.hasOwnProperty("downloadVideo")) + } + if (message.downloadVideo != null && message.hasOwnProperty("downloadVideo")) { + properties._downloadVideo = 1; if (typeof message.downloadVideo !== "boolean") return "downloadVideo: boolean expected"; - if (message.downloadDocuments != null && message.hasOwnProperty("downloadDocuments")) + } + if (message.downloadDocuments != null && message.hasOwnProperty("downloadDocuments")) { + properties._downloadDocuments = 1; if (typeof message.downloadDocuments !== "boolean") return "downloadDocuments: boolean expected"; + } return null; }; @@ -1921,20 +7971,26 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.downloadImages = false; - object.downloadAudio = false; - object.downloadVideo = false; - object.downloadDocuments = false; - } - if (message.downloadImages != null && message.hasOwnProperty("downloadImages")) + if (message.downloadImages != null && message.hasOwnProperty("downloadImages")) { object.downloadImages = message.downloadImages; - if (message.downloadAudio != null && message.hasOwnProperty("downloadAudio")) + if (options.oneofs) + object._downloadImages = "downloadImages"; + } + if (message.downloadAudio != null && message.hasOwnProperty("downloadAudio")) { object.downloadAudio = message.downloadAudio; - if (message.downloadVideo != null && message.hasOwnProperty("downloadVideo")) + if (options.oneofs) + object._downloadAudio = "downloadAudio"; + } + if (message.downloadVideo != null && message.hasOwnProperty("downloadVideo")) { object.downloadVideo = message.downloadVideo; - if (message.downloadDocuments != null && message.hasOwnProperty("downloadDocuments")) + if (options.oneofs) + object._downloadVideo = "downloadVideo"; + } + if (message.downloadDocuments != null && message.hasOwnProperty("downloadDocuments")) { object.downloadDocuments = message.downloadDocuments; + if (options.oneofs) + object._downloadDocuments = "downloadDocuments"; + } return object; }; @@ -1949,6 +8005,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for AutoDownloadSettings + * @function getTypeUrl + * @memberof proto.AutoDownloadSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AutoDownloadSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.AutoDownloadSettings"; + }; + return AutoDownloadSettings; })(); @@ -1979,19 +8050,34 @@ $root.proto = (function() { /** * AvatarUserSettings fbid. - * @member {string} fbid + * @member {string|null|undefined} fbid * @memberof proto.AvatarUserSettings * @instance */ - AvatarUserSettings.prototype.fbid = ""; + AvatarUserSettings.prototype.fbid = null; /** * AvatarUserSettings password. - * @member {string} password + * @member {string|null|undefined} password * @memberof proto.AvatarUserSettings * @instance */ - AvatarUserSettings.prototype.password = ""; + AvatarUserSettings.prototype.password = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AvatarUserSettings.prototype, "_fbid", { + get: $util.oneOfGetter($oneOfFields = ["fbid"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AvatarUserSettings.prototype, "_password", { + get: $util.oneOfGetter($oneOfFields = ["password"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new AvatarUserSettings instance using the specified properties. @@ -2055,12 +8141,14 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.fbid = reader.string(); - break; - case 2: - message.password = reader.string(); - break; + case 1: { + message.fbid = reader.string(); + break; + } + case 2: { + message.password = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -2096,12 +8184,17 @@ $root.proto = (function() { AvatarUserSettings.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.fbid != null && message.hasOwnProperty("fbid")) + var properties = {}; + if (message.fbid != null && message.hasOwnProperty("fbid")) { + properties._fbid = 1; if (!$util.isString(message.fbid)) return "fbid: string expected"; - if (message.password != null && message.hasOwnProperty("password")) + } + if (message.password != null && message.hasOwnProperty("password")) { + properties._password = 1; if (!$util.isString(message.password)) return "password: string expected"; + } return null; }; @@ -2137,14 +8230,16 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.fbid = ""; - object.password = ""; - } - if (message.fbid != null && message.hasOwnProperty("fbid")) + if (message.fbid != null && message.hasOwnProperty("fbid")) { object.fbid = message.fbid; - if (message.password != null && message.hasOwnProperty("password")) + if (options.oneofs) + object._fbid = "fbid"; + } + if (message.password != null && message.hasOwnProperty("password")) { object.password = message.password; + if (options.oneofs) + object._password = "password"; + } return object; }; @@ -2159,6 +8254,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for AvatarUserSettings + * @function getTypeUrl + * @memberof proto.AvatarUserSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AvatarUserSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.AvatarUserSettings"; + }; + return AvatarUserSettings; })(); @@ -2192,43 +8302,76 @@ $root.proto = (function() { /** * BizAccountLinkInfo whatsappBizAcctFbid. - * @member {number|Long} whatsappBizAcctFbid + * @member {number|Long|null|undefined} whatsappBizAcctFbid * @memberof proto.BizAccountLinkInfo * @instance */ - BizAccountLinkInfo.prototype.whatsappBizAcctFbid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + BizAccountLinkInfo.prototype.whatsappBizAcctFbid = null; /** * BizAccountLinkInfo whatsappAcctNumber. - * @member {string} whatsappAcctNumber + * @member {string|null|undefined} whatsappAcctNumber * @memberof proto.BizAccountLinkInfo * @instance */ - BizAccountLinkInfo.prototype.whatsappAcctNumber = ""; + BizAccountLinkInfo.prototype.whatsappAcctNumber = null; /** * BizAccountLinkInfo issueTime. - * @member {number|Long} issueTime + * @member {number|Long|null|undefined} issueTime * @memberof proto.BizAccountLinkInfo * @instance */ - BizAccountLinkInfo.prototype.issueTime = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + BizAccountLinkInfo.prototype.issueTime = null; /** * BizAccountLinkInfo hostStorage. - * @member {proto.BizAccountLinkInfo.HostStorageType} hostStorage + * @member {proto.BizAccountLinkInfo.HostStorageType|null|undefined} hostStorage * @memberof proto.BizAccountLinkInfo * @instance */ - BizAccountLinkInfo.prototype.hostStorage = 0; + BizAccountLinkInfo.prototype.hostStorage = null; /** * BizAccountLinkInfo accountType. - * @member {proto.BizAccountLinkInfo.AccountType} accountType + * @member {proto.BizAccountLinkInfo.AccountType|null|undefined} accountType * @memberof proto.BizAccountLinkInfo * @instance */ - BizAccountLinkInfo.prototype.accountType = 0; + BizAccountLinkInfo.prototype.accountType = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BizAccountLinkInfo.prototype, "_whatsappBizAcctFbid", { + get: $util.oneOfGetter($oneOfFields = ["whatsappBizAcctFbid"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BizAccountLinkInfo.prototype, "_whatsappAcctNumber", { + get: $util.oneOfGetter($oneOfFields = ["whatsappAcctNumber"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BizAccountLinkInfo.prototype, "_issueTime", { + get: $util.oneOfGetter($oneOfFields = ["issueTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BizAccountLinkInfo.prototype, "_hostStorage", { + get: $util.oneOfGetter($oneOfFields = ["hostStorage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BizAccountLinkInfo.prototype, "_accountType", { + get: $util.oneOfGetter($oneOfFields = ["accountType"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new BizAccountLinkInfo instance using the specified properties. @@ -2298,21 +8441,26 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.whatsappBizAcctFbid = reader.uint64(); - break; - case 2: - message.whatsappAcctNumber = reader.string(); - break; - case 3: - message.issueTime = reader.uint64(); - break; - case 4: - message.hostStorage = reader.int32(); - break; - case 5: - message.accountType = reader.int32(); - break; + case 1: { + message.whatsappBizAcctFbid = reader.uint64(); + break; + } + case 2: { + message.whatsappAcctNumber = reader.string(); + break; + } + case 3: { + message.issueTime = reader.uint64(); + break; + } + case 4: { + message.hostStorage = reader.int32(); + break; + } + case 5: { + message.accountType = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -2348,16 +8496,24 @@ $root.proto = (function() { BizAccountLinkInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.whatsappBizAcctFbid != null && message.hasOwnProperty("whatsappBizAcctFbid")) + var properties = {}; + if (message.whatsappBizAcctFbid != null && message.hasOwnProperty("whatsappBizAcctFbid")) { + properties._whatsappBizAcctFbid = 1; if (!$util.isInteger(message.whatsappBizAcctFbid) && !(message.whatsappBizAcctFbid && $util.isInteger(message.whatsappBizAcctFbid.low) && $util.isInteger(message.whatsappBizAcctFbid.high))) return "whatsappBizAcctFbid: integer|Long expected"; - if (message.whatsappAcctNumber != null && message.hasOwnProperty("whatsappAcctNumber")) + } + if (message.whatsappAcctNumber != null && message.hasOwnProperty("whatsappAcctNumber")) { + properties._whatsappAcctNumber = 1; if (!$util.isString(message.whatsappAcctNumber)) return "whatsappAcctNumber: string expected"; - if (message.issueTime != null && message.hasOwnProperty("issueTime")) + } + if (message.issueTime != null && message.hasOwnProperty("issueTime")) { + properties._issueTime = 1; if (!$util.isInteger(message.issueTime) && !(message.issueTime && $util.isInteger(message.issueTime.low) && $util.isInteger(message.issueTime.high))) return "issueTime: integer|Long expected"; - if (message.hostStorage != null && message.hasOwnProperty("hostStorage")) + } + if (message.hostStorage != null && message.hasOwnProperty("hostStorage")) { + properties._hostStorage = 1; switch (message.hostStorage) { default: return "hostStorage: enum value expected"; @@ -2365,13 +8521,16 @@ $root.proto = (function() { case 1: break; } - if (message.accountType != null && message.hasOwnProperty("accountType")) + } + if (message.accountType != null && message.hasOwnProperty("accountType")) { + properties._accountType = 1; switch (message.accountType) { default: return "accountType: enum value expected"; case 0: break; } + } return null; }; @@ -2408,6 +8567,12 @@ $root.proto = (function() { else if (typeof object.issueTime === "object") message.issueTime = new $util.LongBits(object.issueTime.low >>> 0, object.issueTime.high >>> 0).toNumber(true); switch (object.hostStorage) { + default: + if (typeof object.hostStorage === "number") { + message.hostStorage = object.hostStorage; + break; + } + break; case "ON_PREMISE": case 0: message.hostStorage = 0; @@ -2418,6 +8583,12 @@ $root.proto = (function() { break; } switch (object.accountType) { + default: + if (typeof object.accountType === "number") { + message.accountType = object.accountType; + break; + } + break; case "ENTERPRISE": case 0: message.accountType = 0; @@ -2439,37 +8610,37 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.whatsappBizAcctFbid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.whatsappBizAcctFbid = options.longs === String ? "0" : 0; - object.whatsappAcctNumber = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.issueTime = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.issueTime = options.longs === String ? "0" : 0; - object.hostStorage = options.enums === String ? "ON_PREMISE" : 0; - object.accountType = options.enums === String ? "ENTERPRISE" : 0; - } - if (message.whatsappBizAcctFbid != null && message.hasOwnProperty("whatsappBizAcctFbid")) + if (message.whatsappBizAcctFbid != null && message.hasOwnProperty("whatsappBizAcctFbid")) { if (typeof message.whatsappBizAcctFbid === "number") object.whatsappBizAcctFbid = options.longs === String ? String(message.whatsappBizAcctFbid) : message.whatsappBizAcctFbid; else object.whatsappBizAcctFbid = options.longs === String ? $util.Long.prototype.toString.call(message.whatsappBizAcctFbid) : options.longs === Number ? new $util.LongBits(message.whatsappBizAcctFbid.low >>> 0, message.whatsappBizAcctFbid.high >>> 0).toNumber(true) : message.whatsappBizAcctFbid; - if (message.whatsappAcctNumber != null && message.hasOwnProperty("whatsappAcctNumber")) + if (options.oneofs) + object._whatsappBizAcctFbid = "whatsappBizAcctFbid"; + } + if (message.whatsappAcctNumber != null && message.hasOwnProperty("whatsappAcctNumber")) { object.whatsappAcctNumber = message.whatsappAcctNumber; - if (message.issueTime != null && message.hasOwnProperty("issueTime")) + if (options.oneofs) + object._whatsappAcctNumber = "whatsappAcctNumber"; + } + if (message.issueTime != null && message.hasOwnProperty("issueTime")) { if (typeof message.issueTime === "number") object.issueTime = options.longs === String ? String(message.issueTime) : message.issueTime; else object.issueTime = options.longs === String ? $util.Long.prototype.toString.call(message.issueTime) : options.longs === Number ? new $util.LongBits(message.issueTime.low >>> 0, message.issueTime.high >>> 0).toNumber(true) : message.issueTime; - if (message.hostStorage != null && message.hasOwnProperty("hostStorage")) - object.hostStorage = options.enums === String ? $root.proto.BizAccountLinkInfo.HostStorageType[message.hostStorage] : message.hostStorage; - if (message.accountType != null && message.hasOwnProperty("accountType")) - object.accountType = options.enums === String ? $root.proto.BizAccountLinkInfo.AccountType[message.accountType] : message.accountType; + if (options.oneofs) + object._issueTime = "issueTime"; + } + if (message.hostStorage != null && message.hasOwnProperty("hostStorage")) { + object.hostStorage = options.enums === String ? $root.proto.BizAccountLinkInfo.HostStorageType[message.hostStorage] === undefined ? message.hostStorage : $root.proto.BizAccountLinkInfo.HostStorageType[message.hostStorage] : message.hostStorage; + if (options.oneofs) + object._hostStorage = "hostStorage"; + } + if (message.accountType != null && message.hasOwnProperty("accountType")) { + object.accountType = options.enums === String ? $root.proto.BizAccountLinkInfo.AccountType[message.accountType] === undefined ? message.accountType : $root.proto.BizAccountLinkInfo.AccountType[message.accountType] : message.accountType; + if (options.oneofs) + object._accountType = "accountType"; + } return object; }; @@ -2484,6 +8655,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for BizAccountLinkInfo + * @function getTypeUrl + * @memberof proto.BizAccountLinkInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BizAccountLinkInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.BizAccountLinkInfo"; + }; + /** * AccountType enum. * @name proto.BizAccountLinkInfo.AccountType @@ -2548,11 +8734,26 @@ $root.proto = (function() { /** * BizAccountPayload bizAcctLinkInfo. - * @member {Uint8Array} bizAcctLinkInfo + * @member {Uint8Array|null|undefined} bizAcctLinkInfo * @memberof proto.BizAccountPayload * @instance */ - BizAccountPayload.prototype.bizAcctLinkInfo = $util.newBuffer([]); + BizAccountPayload.prototype.bizAcctLinkInfo = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BizAccountPayload.prototype, "_vnameCert", { + get: $util.oneOfGetter($oneOfFields = ["vnameCert"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BizAccountPayload.prototype, "_bizAcctLinkInfo", { + get: $util.oneOfGetter($oneOfFields = ["bizAcctLinkInfo"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new BizAccountPayload instance using the specified properties. @@ -2616,12 +8817,14 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.vnameCert = $root.proto.VerifiedNameCertificate.decode(reader, reader.uint32()); - break; - case 2: - message.bizAcctLinkInfo = reader.bytes(); - break; + case 1: { + message.vnameCert = $root.proto.VerifiedNameCertificate.decode(reader, reader.uint32()); + break; + } + case 2: { + message.bizAcctLinkInfo = reader.bytes(); + break; + } default: reader.skipType(tag & 7); break; @@ -2657,14 +8860,20 @@ $root.proto = (function() { BizAccountPayload.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; if (message.vnameCert != null && message.hasOwnProperty("vnameCert")) { - var error = $root.proto.VerifiedNameCertificate.verify(message.vnameCert); - if (error) - return "vnameCert." + error; + properties._vnameCert = 1; + { + var error = $root.proto.VerifiedNameCertificate.verify(message.vnameCert); + if (error) + return "vnameCert." + error; + } } - if (message.bizAcctLinkInfo != null && message.hasOwnProperty("bizAcctLinkInfo")) + if (message.bizAcctLinkInfo != null && message.hasOwnProperty("bizAcctLinkInfo")) { + properties._bizAcctLinkInfo = 1; if (!(message.bizAcctLinkInfo && typeof message.bizAcctLinkInfo.length === "number" || $util.isString(message.bizAcctLinkInfo))) return "bizAcctLinkInfo: buffer expected"; + } return null; }; @@ -2688,7 +8897,7 @@ $root.proto = (function() { if (object.bizAcctLinkInfo != null) if (typeof object.bizAcctLinkInfo === "string") $util.base64.decode(object.bizAcctLinkInfo, message.bizAcctLinkInfo = $util.newBuffer($util.base64.length(object.bizAcctLinkInfo)), 0); - else if (object.bizAcctLinkInfo.length) + else if (object.bizAcctLinkInfo.length >= 0) message.bizAcctLinkInfo = object.bizAcctLinkInfo; return message; }; @@ -2706,20 +8915,16 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.vnameCert = null; - if (options.bytes === String) - object.bizAcctLinkInfo = ""; - else { - object.bizAcctLinkInfo = []; - if (options.bytes !== Array) - object.bizAcctLinkInfo = $util.newBuffer(object.bizAcctLinkInfo); - } - } - if (message.vnameCert != null && message.hasOwnProperty("vnameCert")) + if (message.vnameCert != null && message.hasOwnProperty("vnameCert")) { object.vnameCert = $root.proto.VerifiedNameCertificate.toObject(message.vnameCert, options); - if (message.bizAcctLinkInfo != null && message.hasOwnProperty("bizAcctLinkInfo")) + if (options.oneofs) + object._vnameCert = "vnameCert"; + } + if (message.bizAcctLinkInfo != null && message.hasOwnProperty("bizAcctLinkInfo")) { object.bizAcctLinkInfo = options.bytes === String ? $util.base64.encode(message.bizAcctLinkInfo, 0, message.bizAcctLinkInfo.length) : options.bytes === Array ? Array.prototype.slice.call(message.bizAcctLinkInfo) : message.bizAcctLinkInfo; + if (options.oneofs) + object._bizAcctLinkInfo = "bizAcctLinkInfo"; + } return object; }; @@ -2734,6 +8939,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for BizAccountPayload + * @function getTypeUrl + * @memberof proto.BizAccountPayload + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BizAccountPayload.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.BizAccountPayload"; + }; + return BizAccountPayload; })(); @@ -2770,11 +8990,11 @@ $root.proto = (function() { /** * BizIdentityInfo vlevel. - * @member {proto.BizIdentityInfo.VerifiedLevelValue} vlevel + * @member {proto.BizIdentityInfo.VerifiedLevelValue|null|undefined} vlevel * @memberof proto.BizIdentityInfo * @instance */ - BizIdentityInfo.prototype.vlevel = 0; + BizIdentityInfo.prototype.vlevel = null; /** * BizIdentityInfo vnameCert. @@ -2786,51 +9006,102 @@ $root.proto = (function() { /** * BizIdentityInfo signed. - * @member {boolean} signed + * @member {boolean|null|undefined} signed * @memberof proto.BizIdentityInfo * @instance */ - BizIdentityInfo.prototype.signed = false; + BizIdentityInfo.prototype.signed = null; /** * BizIdentityInfo revoked. - * @member {boolean} revoked + * @member {boolean|null|undefined} revoked * @memberof proto.BizIdentityInfo * @instance */ - BizIdentityInfo.prototype.revoked = false; + BizIdentityInfo.prototype.revoked = null; /** * BizIdentityInfo hostStorage. - * @member {proto.BizIdentityInfo.HostStorageType} hostStorage + * @member {proto.BizIdentityInfo.HostStorageType|null|undefined} hostStorage * @memberof proto.BizIdentityInfo * @instance */ - BizIdentityInfo.prototype.hostStorage = 0; + BizIdentityInfo.prototype.hostStorage = null; /** * BizIdentityInfo actualActors. - * @member {proto.BizIdentityInfo.ActualActorsType} actualActors + * @member {proto.BizIdentityInfo.ActualActorsType|null|undefined} actualActors * @memberof proto.BizIdentityInfo * @instance */ - BizIdentityInfo.prototype.actualActors = 0; + BizIdentityInfo.prototype.actualActors = null; /** * BizIdentityInfo privacyModeTs. - * @member {number|Long} privacyModeTs + * @member {number|Long|null|undefined} privacyModeTs * @memberof proto.BizIdentityInfo * @instance */ - BizIdentityInfo.prototype.privacyModeTs = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + BizIdentityInfo.prototype.privacyModeTs = null; /** * BizIdentityInfo featureControls. - * @member {number|Long} featureControls + * @member {number|Long|null|undefined} featureControls * @memberof proto.BizIdentityInfo * @instance */ - BizIdentityInfo.prototype.featureControls = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + BizIdentityInfo.prototype.featureControls = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BizIdentityInfo.prototype, "_vlevel", { + get: $util.oneOfGetter($oneOfFields = ["vlevel"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BizIdentityInfo.prototype, "_vnameCert", { + get: $util.oneOfGetter($oneOfFields = ["vnameCert"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BizIdentityInfo.prototype, "_signed", { + get: $util.oneOfGetter($oneOfFields = ["signed"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BizIdentityInfo.prototype, "_revoked", { + get: $util.oneOfGetter($oneOfFields = ["revoked"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BizIdentityInfo.prototype, "_hostStorage", { + get: $util.oneOfGetter($oneOfFields = ["hostStorage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BizIdentityInfo.prototype, "_actualActors", { + get: $util.oneOfGetter($oneOfFields = ["actualActors"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BizIdentityInfo.prototype, "_privacyModeTs", { + get: $util.oneOfGetter($oneOfFields = ["privacyModeTs"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BizIdentityInfo.prototype, "_featureControls", { + get: $util.oneOfGetter($oneOfFields = ["featureControls"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new BizIdentityInfo instance using the specified properties. @@ -2906,30 +9177,38 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.vlevel = reader.int32(); - break; - case 2: - message.vnameCert = $root.proto.VerifiedNameCertificate.decode(reader, reader.uint32()); - break; - case 3: - message.signed = reader.bool(); - break; - case 4: - message.revoked = reader.bool(); - break; - case 5: - message.hostStorage = reader.int32(); - break; - case 6: - message.actualActors = reader.int32(); - break; - case 7: - message.privacyModeTs = reader.uint64(); - break; - case 8: - message.featureControls = reader.uint64(); - break; + case 1: { + message.vlevel = reader.int32(); + break; + } + case 2: { + message.vnameCert = $root.proto.VerifiedNameCertificate.decode(reader, reader.uint32()); + break; + } + case 3: { + message.signed = reader.bool(); + break; + } + case 4: { + message.revoked = reader.bool(); + break; + } + case 5: { + message.hostStorage = reader.int32(); + break; + } + case 6: { + message.actualActors = reader.int32(); + break; + } + case 7: { + message.privacyModeTs = reader.uint64(); + break; + } + case 8: { + message.featureControls = reader.uint64(); + break; + } default: reader.skipType(tag & 7); break; @@ -2965,7 +9244,9 @@ $root.proto = (function() { BizIdentityInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.vlevel != null && message.hasOwnProperty("vlevel")) + var properties = {}; + if (message.vlevel != null && message.hasOwnProperty("vlevel")) { + properties._vlevel = 1; switch (message.vlevel) { default: return "vlevel: enum value expected"; @@ -2974,18 +9255,27 @@ $root.proto = (function() { case 2: break; } - if (message.vnameCert != null && message.hasOwnProperty("vnameCert")) { - var error = $root.proto.VerifiedNameCertificate.verify(message.vnameCert); - if (error) - return "vnameCert." + error; } - if (message.signed != null && message.hasOwnProperty("signed")) + if (message.vnameCert != null && message.hasOwnProperty("vnameCert")) { + properties._vnameCert = 1; + { + var error = $root.proto.VerifiedNameCertificate.verify(message.vnameCert); + if (error) + return "vnameCert." + error; + } + } + if (message.signed != null && message.hasOwnProperty("signed")) { + properties._signed = 1; if (typeof message.signed !== "boolean") return "signed: boolean expected"; - if (message.revoked != null && message.hasOwnProperty("revoked")) + } + if (message.revoked != null && message.hasOwnProperty("revoked")) { + properties._revoked = 1; if (typeof message.revoked !== "boolean") return "revoked: boolean expected"; - if (message.hostStorage != null && message.hasOwnProperty("hostStorage")) + } + if (message.hostStorage != null && message.hasOwnProperty("hostStorage")) { + properties._hostStorage = 1; switch (message.hostStorage) { default: return "hostStorage: enum value expected"; @@ -2993,7 +9283,9 @@ $root.proto = (function() { case 1: break; } - if (message.actualActors != null && message.hasOwnProperty("actualActors")) + } + if (message.actualActors != null && message.hasOwnProperty("actualActors")) { + properties._actualActors = 1; switch (message.actualActors) { default: return "actualActors: enum value expected"; @@ -3001,12 +9293,17 @@ $root.proto = (function() { case 1: break; } - if (message.privacyModeTs != null && message.hasOwnProperty("privacyModeTs")) + } + if (message.privacyModeTs != null && message.hasOwnProperty("privacyModeTs")) { + properties._privacyModeTs = 1; if (!$util.isInteger(message.privacyModeTs) && !(message.privacyModeTs && $util.isInteger(message.privacyModeTs.low) && $util.isInteger(message.privacyModeTs.high))) return "privacyModeTs: integer|Long expected"; - if (message.featureControls != null && message.hasOwnProperty("featureControls")) + } + if (message.featureControls != null && message.hasOwnProperty("featureControls")) { + properties._featureControls = 1; if (!$util.isInteger(message.featureControls) && !(message.featureControls && $util.isInteger(message.featureControls.low) && $util.isInteger(message.featureControls.high))) return "featureControls: integer|Long expected"; + } return null; }; @@ -3023,6 +9320,12 @@ $root.proto = (function() { return object; var message = new $root.proto.BizIdentityInfo(); switch (object.vlevel) { + default: + if (typeof object.vlevel === "number") { + message.vlevel = object.vlevel; + break; + } + break; case "UNKNOWN": case 0: message.vlevel = 0; @@ -3046,6 +9349,12 @@ $root.proto = (function() { if (object.revoked != null) message.revoked = Boolean(object.revoked); switch (object.hostStorage) { + default: + if (typeof object.hostStorage === "number") { + message.hostStorage = object.hostStorage; + break; + } + break; case "ON_PREMISE": case 0: message.hostStorage = 0; @@ -3056,6 +9365,12 @@ $root.proto = (function() { break; } switch (object.actualActors) { + default: + if (typeof object.actualActors === "number") { + message.actualActors = object.actualActors; + break; + } + break; case "SELF": case 0: message.actualActors = 0; @@ -3099,46 +9414,52 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.vlevel = options.enums === String ? "UNKNOWN" : 0; - object.vnameCert = null; - object.signed = false; - object.revoked = false; - object.hostStorage = options.enums === String ? "ON_PREMISE" : 0; - object.actualActors = options.enums === String ? "SELF" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.privacyModeTs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.privacyModeTs = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.featureControls = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.featureControls = options.longs === String ? "0" : 0; + if (message.vlevel != null && message.hasOwnProperty("vlevel")) { + object.vlevel = options.enums === String ? $root.proto.BizIdentityInfo.VerifiedLevelValue[message.vlevel] === undefined ? message.vlevel : $root.proto.BizIdentityInfo.VerifiedLevelValue[message.vlevel] : message.vlevel; + if (options.oneofs) + object._vlevel = "vlevel"; } - if (message.vlevel != null && message.hasOwnProperty("vlevel")) - object.vlevel = options.enums === String ? $root.proto.BizIdentityInfo.VerifiedLevelValue[message.vlevel] : message.vlevel; - if (message.vnameCert != null && message.hasOwnProperty("vnameCert")) + if (message.vnameCert != null && message.hasOwnProperty("vnameCert")) { object.vnameCert = $root.proto.VerifiedNameCertificate.toObject(message.vnameCert, options); - if (message.signed != null && message.hasOwnProperty("signed")) + if (options.oneofs) + object._vnameCert = "vnameCert"; + } + if (message.signed != null && message.hasOwnProperty("signed")) { object.signed = message.signed; - if (message.revoked != null && message.hasOwnProperty("revoked")) + if (options.oneofs) + object._signed = "signed"; + } + if (message.revoked != null && message.hasOwnProperty("revoked")) { object.revoked = message.revoked; - if (message.hostStorage != null && message.hasOwnProperty("hostStorage")) - object.hostStorage = options.enums === String ? $root.proto.BizIdentityInfo.HostStorageType[message.hostStorage] : message.hostStorage; - if (message.actualActors != null && message.hasOwnProperty("actualActors")) - object.actualActors = options.enums === String ? $root.proto.BizIdentityInfo.ActualActorsType[message.actualActors] : message.actualActors; - if (message.privacyModeTs != null && message.hasOwnProperty("privacyModeTs")) + if (options.oneofs) + object._revoked = "revoked"; + } + if (message.hostStorage != null && message.hasOwnProperty("hostStorage")) { + object.hostStorage = options.enums === String ? $root.proto.BizIdentityInfo.HostStorageType[message.hostStorage] === undefined ? message.hostStorage : $root.proto.BizIdentityInfo.HostStorageType[message.hostStorage] : message.hostStorage; + if (options.oneofs) + object._hostStorage = "hostStorage"; + } + if (message.actualActors != null && message.hasOwnProperty("actualActors")) { + object.actualActors = options.enums === String ? $root.proto.BizIdentityInfo.ActualActorsType[message.actualActors] === undefined ? message.actualActors : $root.proto.BizIdentityInfo.ActualActorsType[message.actualActors] : message.actualActors; + if (options.oneofs) + object._actualActors = "actualActors"; + } + if (message.privacyModeTs != null && message.hasOwnProperty("privacyModeTs")) { if (typeof message.privacyModeTs === "number") object.privacyModeTs = options.longs === String ? String(message.privacyModeTs) : message.privacyModeTs; else object.privacyModeTs = options.longs === String ? $util.Long.prototype.toString.call(message.privacyModeTs) : options.longs === Number ? new $util.LongBits(message.privacyModeTs.low >>> 0, message.privacyModeTs.high >>> 0).toNumber(true) : message.privacyModeTs; - if (message.featureControls != null && message.hasOwnProperty("featureControls")) + if (options.oneofs) + object._privacyModeTs = "privacyModeTs"; + } + if (message.featureControls != null && message.hasOwnProperty("featureControls")) { if (typeof message.featureControls === "number") object.featureControls = options.longs === String ? String(message.featureControls) : message.featureControls; else object.featureControls = options.longs === String ? $util.Long.prototype.toString.call(message.featureControls) : options.longs === Number ? new $util.LongBits(message.featureControls.low >>> 0, message.featureControls.high >>> 0).toNumber(true) : message.featureControls; + if (options.oneofs) + object._featureControls = "featureControls"; + } return object; }; @@ -3153,6 +9474,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for BizIdentityInfo + * @function getTypeUrl + * @memberof proto.BizIdentityInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BizIdentityInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.BizIdentityInfo"; + }; + /** * ActualActorsType enum. * @name proto.BizIdentityInfo.ActualActorsType @@ -3230,43 +9566,76 @@ $root.proto = (function() { /** * BotAvatarMetadata sentiment. - * @member {number} sentiment + * @member {number|null|undefined} sentiment * @memberof proto.BotAvatarMetadata * @instance */ - BotAvatarMetadata.prototype.sentiment = 0; + BotAvatarMetadata.prototype.sentiment = null; /** * BotAvatarMetadata behaviorGraph. - * @member {string} behaviorGraph + * @member {string|null|undefined} behaviorGraph * @memberof proto.BotAvatarMetadata * @instance */ - BotAvatarMetadata.prototype.behaviorGraph = ""; + BotAvatarMetadata.prototype.behaviorGraph = null; /** * BotAvatarMetadata action. - * @member {number} action + * @member {number|null|undefined} action * @memberof proto.BotAvatarMetadata * @instance */ - BotAvatarMetadata.prototype.action = 0; + BotAvatarMetadata.prototype.action = null; /** * BotAvatarMetadata intensity. - * @member {number} intensity + * @member {number|null|undefined} intensity * @memberof proto.BotAvatarMetadata * @instance */ - BotAvatarMetadata.prototype.intensity = 0; + BotAvatarMetadata.prototype.intensity = null; /** * BotAvatarMetadata wordCount. - * @member {number} wordCount + * @member {number|null|undefined} wordCount * @memberof proto.BotAvatarMetadata * @instance */ - BotAvatarMetadata.prototype.wordCount = 0; + BotAvatarMetadata.prototype.wordCount = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotAvatarMetadata.prototype, "_sentiment", { + get: $util.oneOfGetter($oneOfFields = ["sentiment"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotAvatarMetadata.prototype, "_behaviorGraph", { + get: $util.oneOfGetter($oneOfFields = ["behaviorGraph"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotAvatarMetadata.prototype, "_action", { + get: $util.oneOfGetter($oneOfFields = ["action"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotAvatarMetadata.prototype, "_intensity", { + get: $util.oneOfGetter($oneOfFields = ["intensity"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotAvatarMetadata.prototype, "_wordCount", { + get: $util.oneOfGetter($oneOfFields = ["wordCount"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new BotAvatarMetadata instance using the specified properties. @@ -3336,21 +9705,26 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.sentiment = reader.uint32(); - break; - case 2: - message.behaviorGraph = reader.string(); - break; - case 3: - message.action = reader.uint32(); - break; - case 4: - message.intensity = reader.uint32(); - break; - case 5: - message.wordCount = reader.uint32(); - break; + case 1: { + message.sentiment = reader.uint32(); + break; + } + case 2: { + message.behaviorGraph = reader.string(); + break; + } + case 3: { + message.action = reader.uint32(); + break; + } + case 4: { + message.intensity = reader.uint32(); + break; + } + case 5: { + message.wordCount = reader.uint32(); + break; + } default: reader.skipType(tag & 7); break; @@ -3386,21 +9760,32 @@ $root.proto = (function() { BotAvatarMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.sentiment != null && message.hasOwnProperty("sentiment")) + var properties = {}; + if (message.sentiment != null && message.hasOwnProperty("sentiment")) { + properties._sentiment = 1; if (!$util.isInteger(message.sentiment)) return "sentiment: integer expected"; - if (message.behaviorGraph != null && message.hasOwnProperty("behaviorGraph")) + } + if (message.behaviorGraph != null && message.hasOwnProperty("behaviorGraph")) { + properties._behaviorGraph = 1; if (!$util.isString(message.behaviorGraph)) return "behaviorGraph: string expected"; - if (message.action != null && message.hasOwnProperty("action")) + } + if (message.action != null && message.hasOwnProperty("action")) { + properties._action = 1; if (!$util.isInteger(message.action)) return "action: integer expected"; - if (message.intensity != null && message.hasOwnProperty("intensity")) + } + if (message.intensity != null && message.hasOwnProperty("intensity")) { + properties._intensity = 1; if (!$util.isInteger(message.intensity)) return "intensity: integer expected"; - if (message.wordCount != null && message.hasOwnProperty("wordCount")) + } + if (message.wordCount != null && message.hasOwnProperty("wordCount")) { + properties._wordCount = 1; if (!$util.isInteger(message.wordCount)) return "wordCount: integer expected"; + } return null; }; @@ -3442,23 +9827,31 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.sentiment = 0; - object.behaviorGraph = ""; - object.action = 0; - object.intensity = 0; - object.wordCount = 0; - } - if (message.sentiment != null && message.hasOwnProperty("sentiment")) + if (message.sentiment != null && message.hasOwnProperty("sentiment")) { object.sentiment = message.sentiment; - if (message.behaviorGraph != null && message.hasOwnProperty("behaviorGraph")) + if (options.oneofs) + object._sentiment = "sentiment"; + } + if (message.behaviorGraph != null && message.hasOwnProperty("behaviorGraph")) { object.behaviorGraph = message.behaviorGraph; - if (message.action != null && message.hasOwnProperty("action")) + if (options.oneofs) + object._behaviorGraph = "behaviorGraph"; + } + if (message.action != null && message.hasOwnProperty("action")) { object.action = message.action; - if (message.intensity != null && message.hasOwnProperty("intensity")) + if (options.oneofs) + object._action = "action"; + } + if (message.intensity != null && message.hasOwnProperty("intensity")) { object.intensity = message.intensity; - if (message.wordCount != null && message.hasOwnProperty("wordCount")) + if (options.oneofs) + object._intensity = "intensity"; + } + if (message.wordCount != null && message.hasOwnProperty("wordCount")) { object.wordCount = message.wordCount; + if (options.oneofs) + object._wordCount = "wordCount"; + } return object; }; @@ -3473,9 +9866,2499 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for BotAvatarMetadata + * @function getTypeUrl + * @memberof proto.BotAvatarMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BotAvatarMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.BotAvatarMetadata"; + }; + return BotAvatarMetadata; })(); + proto.BotCapabilityMetadata = (function() { + + /** + * Properties of a BotCapabilityMetadata. + * @memberof proto + * @interface IBotCapabilityMetadata + * @property {Array.|null} [capabilities] BotCapabilityMetadata capabilities + */ + + /** + * Constructs a new BotCapabilityMetadata. + * @memberof proto + * @classdesc Represents a BotCapabilityMetadata. + * @implements IBotCapabilityMetadata + * @constructor + * @param {proto.IBotCapabilityMetadata=} [properties] Properties to set + */ + function BotCapabilityMetadata(properties) { + this.capabilities = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BotCapabilityMetadata capabilities. + * @member {Array.} capabilities + * @memberof proto.BotCapabilityMetadata + * @instance + */ + BotCapabilityMetadata.prototype.capabilities = $util.emptyArray; + + /** + * Creates a new BotCapabilityMetadata instance using the specified properties. + * @function create + * @memberof proto.BotCapabilityMetadata + * @static + * @param {proto.IBotCapabilityMetadata=} [properties] Properties to set + * @returns {proto.BotCapabilityMetadata} BotCapabilityMetadata instance + */ + BotCapabilityMetadata.create = function create(properties) { + return new BotCapabilityMetadata(properties); + }; + + /** + * Encodes the specified BotCapabilityMetadata message. Does not implicitly {@link proto.BotCapabilityMetadata.verify|verify} messages. + * @function encode + * @memberof proto.BotCapabilityMetadata + * @static + * @param {proto.IBotCapabilityMetadata} message BotCapabilityMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BotCapabilityMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.capabilities != null && message.capabilities.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.capabilities.length; ++i) + writer.int32(message.capabilities[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified BotCapabilityMetadata message, length delimited. Does not implicitly {@link proto.BotCapabilityMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.BotCapabilityMetadata + * @static + * @param {proto.IBotCapabilityMetadata} message BotCapabilityMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BotCapabilityMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BotCapabilityMetadata message from the specified reader or buffer. + * @function decode + * @memberof proto.BotCapabilityMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.BotCapabilityMetadata} BotCapabilityMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BotCapabilityMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.BotCapabilityMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.capabilities && message.capabilities.length)) + message.capabilities = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.capabilities.push(reader.int32()); + } else + message.capabilities.push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BotCapabilityMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.BotCapabilityMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.BotCapabilityMetadata} BotCapabilityMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BotCapabilityMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BotCapabilityMetadata message. + * @function verify + * @memberof proto.BotCapabilityMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BotCapabilityMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.capabilities != null && message.hasOwnProperty("capabilities")) { + if (!Array.isArray(message.capabilities)) + return "capabilities: array expected"; + for (var i = 0; i < message.capabilities.length; ++i) + switch (message.capabilities[i]) { + default: + return "capabilities: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + case 19: + case 20: + case 21: + case 22: + case 23: + case 24: + case 25: + case 26: + case 27: + case 28: + case 29: + break; + } + } + return null; + }; + + /** + * Creates a BotCapabilityMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.BotCapabilityMetadata + * @static + * @param {Object.} object Plain object + * @returns {proto.BotCapabilityMetadata} BotCapabilityMetadata + */ + BotCapabilityMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.proto.BotCapabilityMetadata) + return object; + var message = new $root.proto.BotCapabilityMetadata(); + if (object.capabilities) { + if (!Array.isArray(object.capabilities)) + throw TypeError(".proto.BotCapabilityMetadata.capabilities: array expected"); + message.capabilities = []; + for (var i = 0; i < object.capabilities.length; ++i) + switch (object.capabilities[i]) { + default: + if (typeof object.capabilities[i] === "number") { + message.capabilities[i] = object.capabilities[i]; + break; + } + case "UNKNOWN": + case 0: + message.capabilities[i] = 0; + break; + case "PROGRESS_INDICATOR": + case 1: + message.capabilities[i] = 1; + break; + case "RICH_RESPONSE_HEADING": + case 2: + message.capabilities[i] = 2; + break; + case "RICH_RESPONSE_NESTED_LIST": + case 3: + message.capabilities[i] = 3; + break; + case "AI_MEMORY": + case 4: + message.capabilities[i] = 4; + break; + case "RICH_RESPONSE_THREAD_SURFING": + case 5: + message.capabilities[i] = 5; + break; + case "RICH_RESPONSE_TABLE": + case 6: + message.capabilities[i] = 6; + break; + case "RICH_RESPONSE_CODE": + case 7: + message.capabilities[i] = 7; + break; + case "RICH_RESPONSE_STRUCTURED_RESPONSE": + case 8: + message.capabilities[i] = 8; + break; + case "RICH_RESPONSE_INLINE_IMAGE": + case 9: + message.capabilities[i] = 9; + break; + case "WA_IG_1P_PLUGIN_RANKING_CONTROL": + case 10: + message.capabilities[i] = 10; + break; + case "WA_IG_1P_PLUGIN_RANKING_UPDATE_1": + case 11: + message.capabilities[i] = 11; + break; + case "WA_IG_1P_PLUGIN_RANKING_UPDATE_2": + case 12: + message.capabilities[i] = 12; + break; + case "WA_IG_1P_PLUGIN_RANKING_UPDATE_3": + case 13: + message.capabilities[i] = 13; + break; + case "WA_IG_1P_PLUGIN_RANKING_UPDATE_4": + case 14: + message.capabilities[i] = 14; + break; + case "WA_IG_1P_PLUGIN_RANKING_UPDATE_5": + case 15: + message.capabilities[i] = 15; + break; + case "WA_IG_1P_PLUGIN_RANKING_UPDATE_6": + case 16: + message.capabilities[i] = 16; + break; + case "WA_IG_1P_PLUGIN_RANKING_UPDATE_7": + case 17: + message.capabilities[i] = 17; + break; + case "WA_IG_1P_PLUGIN_RANKING_UPDATE_8": + case 18: + message.capabilities[i] = 18; + break; + case "WA_IG_1P_PLUGIN_RANKING_UPDATE_9": + case 19: + message.capabilities[i] = 19; + break; + case "WA_IG_1P_PLUGIN_RANKING_UPDATE_10": + case 20: + message.capabilities[i] = 20; + break; + case "RICH_RESPONSE_SUB_HEADING": + case 21: + message.capabilities[i] = 21; + break; + case "RICH_RESPONSE_GRID_IMAGE": + case 22: + message.capabilities[i] = 22; + break; + case "AI_STUDIO_UGC_MEMORY": + case 23: + message.capabilities[i] = 23; + break; + case "RICH_RESPONSE_LATEX": + case 24: + message.capabilities[i] = 24; + break; + case "RICH_RESPONSE_MAPS": + case 25: + message.capabilities[i] = 25; + break; + case "RICH_RESPONSE_INLINE_REELS": + case 26: + message.capabilities[i] = 26; + break; + case "AGENTIC_PLANNING": + case 27: + message.capabilities[i] = 27; + break; + case "ACCOUNT_LINKING": + case 28: + message.capabilities[i] = 28; + break; + case "STREAMING_DISAGGREGATION": + case 29: + message.capabilities[i] = 29; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a BotCapabilityMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.BotCapabilityMetadata + * @static + * @param {proto.BotCapabilityMetadata} message BotCapabilityMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BotCapabilityMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.capabilities = []; + if (message.capabilities && message.capabilities.length) { + object.capabilities = []; + for (var j = 0; j < message.capabilities.length; ++j) + object.capabilities[j] = options.enums === String ? $root.proto.BotCapabilityMetadata.BotCapabilityType[message.capabilities[j]] === undefined ? message.capabilities[j] : $root.proto.BotCapabilityMetadata.BotCapabilityType[message.capabilities[j]] : message.capabilities[j]; + } + return object; + }; + + /** + * Converts this BotCapabilityMetadata to JSON. + * @function toJSON + * @memberof proto.BotCapabilityMetadata + * @instance + * @returns {Object.} JSON object + */ + BotCapabilityMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BotCapabilityMetadata + * @function getTypeUrl + * @memberof proto.BotCapabilityMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BotCapabilityMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.BotCapabilityMetadata"; + }; + + /** + * BotCapabilityType enum. + * @name proto.BotCapabilityMetadata.BotCapabilityType + * @enum {number} + * @property {number} UNKNOWN=0 UNKNOWN value + * @property {number} PROGRESS_INDICATOR=1 PROGRESS_INDICATOR value + * @property {number} RICH_RESPONSE_HEADING=2 RICH_RESPONSE_HEADING value + * @property {number} RICH_RESPONSE_NESTED_LIST=3 RICH_RESPONSE_NESTED_LIST value + * @property {number} AI_MEMORY=4 AI_MEMORY value + * @property {number} RICH_RESPONSE_THREAD_SURFING=5 RICH_RESPONSE_THREAD_SURFING value + * @property {number} RICH_RESPONSE_TABLE=6 RICH_RESPONSE_TABLE value + * @property {number} RICH_RESPONSE_CODE=7 RICH_RESPONSE_CODE value + * @property {number} RICH_RESPONSE_STRUCTURED_RESPONSE=8 RICH_RESPONSE_STRUCTURED_RESPONSE value + * @property {number} RICH_RESPONSE_INLINE_IMAGE=9 RICH_RESPONSE_INLINE_IMAGE value + * @property {number} WA_IG_1P_PLUGIN_RANKING_CONTROL=10 WA_IG_1P_PLUGIN_RANKING_CONTROL value + * @property {number} WA_IG_1P_PLUGIN_RANKING_UPDATE_1=11 WA_IG_1P_PLUGIN_RANKING_UPDATE_1 value + * @property {number} WA_IG_1P_PLUGIN_RANKING_UPDATE_2=12 WA_IG_1P_PLUGIN_RANKING_UPDATE_2 value + * @property {number} WA_IG_1P_PLUGIN_RANKING_UPDATE_3=13 WA_IG_1P_PLUGIN_RANKING_UPDATE_3 value + * @property {number} WA_IG_1P_PLUGIN_RANKING_UPDATE_4=14 WA_IG_1P_PLUGIN_RANKING_UPDATE_4 value + * @property {number} WA_IG_1P_PLUGIN_RANKING_UPDATE_5=15 WA_IG_1P_PLUGIN_RANKING_UPDATE_5 value + * @property {number} WA_IG_1P_PLUGIN_RANKING_UPDATE_6=16 WA_IG_1P_PLUGIN_RANKING_UPDATE_6 value + * @property {number} WA_IG_1P_PLUGIN_RANKING_UPDATE_7=17 WA_IG_1P_PLUGIN_RANKING_UPDATE_7 value + * @property {number} WA_IG_1P_PLUGIN_RANKING_UPDATE_8=18 WA_IG_1P_PLUGIN_RANKING_UPDATE_8 value + * @property {number} WA_IG_1P_PLUGIN_RANKING_UPDATE_9=19 WA_IG_1P_PLUGIN_RANKING_UPDATE_9 value + * @property {number} WA_IG_1P_PLUGIN_RANKING_UPDATE_10=20 WA_IG_1P_PLUGIN_RANKING_UPDATE_10 value + * @property {number} RICH_RESPONSE_SUB_HEADING=21 RICH_RESPONSE_SUB_HEADING value + * @property {number} RICH_RESPONSE_GRID_IMAGE=22 RICH_RESPONSE_GRID_IMAGE value + * @property {number} AI_STUDIO_UGC_MEMORY=23 AI_STUDIO_UGC_MEMORY value + * @property {number} RICH_RESPONSE_LATEX=24 RICH_RESPONSE_LATEX value + * @property {number} RICH_RESPONSE_MAPS=25 RICH_RESPONSE_MAPS value + * @property {number} RICH_RESPONSE_INLINE_REELS=26 RICH_RESPONSE_INLINE_REELS value + * @property {number} AGENTIC_PLANNING=27 AGENTIC_PLANNING value + * @property {number} ACCOUNT_LINKING=28 ACCOUNT_LINKING value + * @property {number} STREAMING_DISAGGREGATION=29 STREAMING_DISAGGREGATION value + */ + BotCapabilityMetadata.BotCapabilityType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNKNOWN"] = 0; + values[valuesById[1] = "PROGRESS_INDICATOR"] = 1; + values[valuesById[2] = "RICH_RESPONSE_HEADING"] = 2; + values[valuesById[3] = "RICH_RESPONSE_NESTED_LIST"] = 3; + values[valuesById[4] = "AI_MEMORY"] = 4; + values[valuesById[5] = "RICH_RESPONSE_THREAD_SURFING"] = 5; + values[valuesById[6] = "RICH_RESPONSE_TABLE"] = 6; + values[valuesById[7] = "RICH_RESPONSE_CODE"] = 7; + values[valuesById[8] = "RICH_RESPONSE_STRUCTURED_RESPONSE"] = 8; + values[valuesById[9] = "RICH_RESPONSE_INLINE_IMAGE"] = 9; + values[valuesById[10] = "WA_IG_1P_PLUGIN_RANKING_CONTROL"] = 10; + values[valuesById[11] = "WA_IG_1P_PLUGIN_RANKING_UPDATE_1"] = 11; + values[valuesById[12] = "WA_IG_1P_PLUGIN_RANKING_UPDATE_2"] = 12; + values[valuesById[13] = "WA_IG_1P_PLUGIN_RANKING_UPDATE_3"] = 13; + values[valuesById[14] = "WA_IG_1P_PLUGIN_RANKING_UPDATE_4"] = 14; + values[valuesById[15] = "WA_IG_1P_PLUGIN_RANKING_UPDATE_5"] = 15; + values[valuesById[16] = "WA_IG_1P_PLUGIN_RANKING_UPDATE_6"] = 16; + values[valuesById[17] = "WA_IG_1P_PLUGIN_RANKING_UPDATE_7"] = 17; + values[valuesById[18] = "WA_IG_1P_PLUGIN_RANKING_UPDATE_8"] = 18; + values[valuesById[19] = "WA_IG_1P_PLUGIN_RANKING_UPDATE_9"] = 19; + values[valuesById[20] = "WA_IG_1P_PLUGIN_RANKING_UPDATE_10"] = 20; + values[valuesById[21] = "RICH_RESPONSE_SUB_HEADING"] = 21; + values[valuesById[22] = "RICH_RESPONSE_GRID_IMAGE"] = 22; + values[valuesById[23] = "AI_STUDIO_UGC_MEMORY"] = 23; + values[valuesById[24] = "RICH_RESPONSE_LATEX"] = 24; + values[valuesById[25] = "RICH_RESPONSE_MAPS"] = 25; + values[valuesById[26] = "RICH_RESPONSE_INLINE_REELS"] = 26; + values[valuesById[27] = "AGENTIC_PLANNING"] = 27; + values[valuesById[28] = "ACCOUNT_LINKING"] = 28; + values[valuesById[29] = "STREAMING_DISAGGREGATION"] = 29; + return values; + })(); + + return BotCapabilityMetadata; + })(); + + proto.BotImagineMetadata = (function() { + + /** + * Properties of a BotImagineMetadata. + * @memberof proto + * @interface IBotImagineMetadata + * @property {proto.BotImagineMetadata.ImagineType|null} [imagineType] BotImagineMetadata imagineType + */ + + /** + * Constructs a new BotImagineMetadata. + * @memberof proto + * @classdesc Represents a BotImagineMetadata. + * @implements IBotImagineMetadata + * @constructor + * @param {proto.IBotImagineMetadata=} [properties] Properties to set + */ + function BotImagineMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BotImagineMetadata imagineType. + * @member {proto.BotImagineMetadata.ImagineType|null|undefined} imagineType + * @memberof proto.BotImagineMetadata + * @instance + */ + BotImagineMetadata.prototype.imagineType = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotImagineMetadata.prototype, "_imagineType", { + get: $util.oneOfGetter($oneOfFields = ["imagineType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new BotImagineMetadata instance using the specified properties. + * @function create + * @memberof proto.BotImagineMetadata + * @static + * @param {proto.IBotImagineMetadata=} [properties] Properties to set + * @returns {proto.BotImagineMetadata} BotImagineMetadata instance + */ + BotImagineMetadata.create = function create(properties) { + return new BotImagineMetadata(properties); + }; + + /** + * Encodes the specified BotImagineMetadata message. Does not implicitly {@link proto.BotImagineMetadata.verify|verify} messages. + * @function encode + * @memberof proto.BotImagineMetadata + * @static + * @param {proto.IBotImagineMetadata} message BotImagineMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BotImagineMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.imagineType != null && Object.hasOwnProperty.call(message, "imagineType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.imagineType); + return writer; + }; + + /** + * Encodes the specified BotImagineMetadata message, length delimited. Does not implicitly {@link proto.BotImagineMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.BotImagineMetadata + * @static + * @param {proto.IBotImagineMetadata} message BotImagineMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BotImagineMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BotImagineMetadata message from the specified reader or buffer. + * @function decode + * @memberof proto.BotImagineMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.BotImagineMetadata} BotImagineMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BotImagineMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.BotImagineMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.imagineType = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BotImagineMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.BotImagineMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.BotImagineMetadata} BotImagineMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BotImagineMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BotImagineMetadata message. + * @function verify + * @memberof proto.BotImagineMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BotImagineMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.imagineType != null && message.hasOwnProperty("imagineType")) { + properties._imagineType = 1; + switch (message.imagineType) { + default: + return "imagineType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + } + return null; + }; + + /** + * Creates a BotImagineMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.BotImagineMetadata + * @static + * @param {Object.} object Plain object + * @returns {proto.BotImagineMetadata} BotImagineMetadata + */ + BotImagineMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.proto.BotImagineMetadata) + return object; + var message = new $root.proto.BotImagineMetadata(); + switch (object.imagineType) { + default: + if (typeof object.imagineType === "number") { + message.imagineType = object.imagineType; + break; + } + break; + case "UNKNOWN": + case 0: + message.imagineType = 0; + break; + case "IMAGINE": + case 1: + message.imagineType = 1; + break; + case "MEMU": + case 2: + message.imagineType = 2; + break; + case "FLASH": + case 3: + message.imagineType = 3; + break; + case "EDIT": + case 4: + message.imagineType = 4; + break; + } + return message; + }; + + /** + * Creates a plain object from a BotImagineMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.BotImagineMetadata + * @static + * @param {proto.BotImagineMetadata} message BotImagineMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BotImagineMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.imagineType != null && message.hasOwnProperty("imagineType")) { + object.imagineType = options.enums === String ? $root.proto.BotImagineMetadata.ImagineType[message.imagineType] === undefined ? message.imagineType : $root.proto.BotImagineMetadata.ImagineType[message.imagineType] : message.imagineType; + if (options.oneofs) + object._imagineType = "imagineType"; + } + return object; + }; + + /** + * Converts this BotImagineMetadata to JSON. + * @function toJSON + * @memberof proto.BotImagineMetadata + * @instance + * @returns {Object.} JSON object + */ + BotImagineMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BotImagineMetadata + * @function getTypeUrl + * @memberof proto.BotImagineMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BotImagineMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.BotImagineMetadata"; + }; + + /** + * ImagineType enum. + * @name proto.BotImagineMetadata.ImagineType + * @enum {number} + * @property {number} UNKNOWN=0 UNKNOWN value + * @property {number} IMAGINE=1 IMAGINE value + * @property {number} MEMU=2 MEMU value + * @property {number} FLASH=3 FLASH value + * @property {number} EDIT=4 EDIT value + */ + BotImagineMetadata.ImagineType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNKNOWN"] = 0; + values[valuesById[1] = "IMAGINE"] = 1; + values[valuesById[2] = "MEMU"] = 2; + values[valuesById[3] = "FLASH"] = 3; + values[valuesById[4] = "EDIT"] = 4; + return values; + })(); + + return BotImagineMetadata; + })(); + + proto.BotLinkedAccount = (function() { + + /** + * Properties of a BotLinkedAccount. + * @memberof proto + * @interface IBotLinkedAccount + * @property {proto.BotLinkedAccount.BotLinkedAccountType|null} [type] BotLinkedAccount type + */ + + /** + * Constructs a new BotLinkedAccount. + * @memberof proto + * @classdesc Represents a BotLinkedAccount. + * @implements IBotLinkedAccount + * @constructor + * @param {proto.IBotLinkedAccount=} [properties] Properties to set + */ + function BotLinkedAccount(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BotLinkedAccount type. + * @member {proto.BotLinkedAccount.BotLinkedAccountType|null|undefined} type + * @memberof proto.BotLinkedAccount + * @instance + */ + BotLinkedAccount.prototype.type = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotLinkedAccount.prototype, "_type", { + get: $util.oneOfGetter($oneOfFields = ["type"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new BotLinkedAccount instance using the specified properties. + * @function create + * @memberof proto.BotLinkedAccount + * @static + * @param {proto.IBotLinkedAccount=} [properties] Properties to set + * @returns {proto.BotLinkedAccount} BotLinkedAccount instance + */ + BotLinkedAccount.create = function create(properties) { + return new BotLinkedAccount(properties); + }; + + /** + * Encodes the specified BotLinkedAccount message. Does not implicitly {@link proto.BotLinkedAccount.verify|verify} messages. + * @function encode + * @memberof proto.BotLinkedAccount + * @static + * @param {proto.IBotLinkedAccount} message BotLinkedAccount message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BotLinkedAccount.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); + return writer; + }; + + /** + * Encodes the specified BotLinkedAccount message, length delimited. Does not implicitly {@link proto.BotLinkedAccount.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.BotLinkedAccount + * @static + * @param {proto.IBotLinkedAccount} message BotLinkedAccount message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BotLinkedAccount.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BotLinkedAccount message from the specified reader or buffer. + * @function decode + * @memberof proto.BotLinkedAccount + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.BotLinkedAccount} BotLinkedAccount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BotLinkedAccount.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.BotLinkedAccount(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.type = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BotLinkedAccount message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.BotLinkedAccount + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.BotLinkedAccount} BotLinkedAccount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BotLinkedAccount.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BotLinkedAccount message. + * @function verify + * @memberof proto.BotLinkedAccount + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BotLinkedAccount.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.type != null && message.hasOwnProperty("type")) { + properties._type = 1; + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + break; + } + } + return null; + }; + + /** + * Creates a BotLinkedAccount message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.BotLinkedAccount + * @static + * @param {Object.} object Plain object + * @returns {proto.BotLinkedAccount} BotLinkedAccount + */ + BotLinkedAccount.fromObject = function fromObject(object) { + if (object instanceof $root.proto.BotLinkedAccount) + return object; + var message = new $root.proto.BotLinkedAccount(); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "BOT_LINKED_ACCOUNT_TYPE_1P": + case 0: + message.type = 0; + break; + } + return message; + }; + + /** + * Creates a plain object from a BotLinkedAccount message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.BotLinkedAccount + * @static + * @param {proto.BotLinkedAccount} message BotLinkedAccount + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BotLinkedAccount.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.type != null && message.hasOwnProperty("type")) { + object.type = options.enums === String ? $root.proto.BotLinkedAccount.BotLinkedAccountType[message.type] === undefined ? message.type : $root.proto.BotLinkedAccount.BotLinkedAccountType[message.type] : message.type; + if (options.oneofs) + object._type = "type"; + } + return object; + }; + + /** + * Converts this BotLinkedAccount to JSON. + * @function toJSON + * @memberof proto.BotLinkedAccount + * @instance + * @returns {Object.} JSON object + */ + BotLinkedAccount.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BotLinkedAccount + * @function getTypeUrl + * @memberof proto.BotLinkedAccount + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BotLinkedAccount.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.BotLinkedAccount"; + }; + + /** + * BotLinkedAccountType enum. + * @name proto.BotLinkedAccount.BotLinkedAccountType + * @enum {number} + * @property {number} BOT_LINKED_ACCOUNT_TYPE_1P=0 BOT_LINKED_ACCOUNT_TYPE_1P value + */ + BotLinkedAccount.BotLinkedAccountType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "BOT_LINKED_ACCOUNT_TYPE_1P"] = 0; + return values; + })(); + + return BotLinkedAccount; + })(); + + proto.BotLinkedAccountsMetadata = (function() { + + /** + * Properties of a BotLinkedAccountsMetadata. + * @memberof proto + * @interface IBotLinkedAccountsMetadata + * @property {Array.|null} [accounts] BotLinkedAccountsMetadata accounts + * @property {Uint8Array|null} [acAuthTokens] BotLinkedAccountsMetadata acAuthTokens + */ + + /** + * Constructs a new BotLinkedAccountsMetadata. + * @memberof proto + * @classdesc Represents a BotLinkedAccountsMetadata. + * @implements IBotLinkedAccountsMetadata + * @constructor + * @param {proto.IBotLinkedAccountsMetadata=} [properties] Properties to set + */ + function BotLinkedAccountsMetadata(properties) { + this.accounts = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BotLinkedAccountsMetadata accounts. + * @member {Array.} accounts + * @memberof proto.BotLinkedAccountsMetadata + * @instance + */ + BotLinkedAccountsMetadata.prototype.accounts = $util.emptyArray; + + /** + * BotLinkedAccountsMetadata acAuthTokens. + * @member {Uint8Array|null|undefined} acAuthTokens + * @memberof proto.BotLinkedAccountsMetadata + * @instance + */ + BotLinkedAccountsMetadata.prototype.acAuthTokens = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotLinkedAccountsMetadata.prototype, "_acAuthTokens", { + get: $util.oneOfGetter($oneOfFields = ["acAuthTokens"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new BotLinkedAccountsMetadata instance using the specified properties. + * @function create + * @memberof proto.BotLinkedAccountsMetadata + * @static + * @param {proto.IBotLinkedAccountsMetadata=} [properties] Properties to set + * @returns {proto.BotLinkedAccountsMetadata} BotLinkedAccountsMetadata instance + */ + BotLinkedAccountsMetadata.create = function create(properties) { + return new BotLinkedAccountsMetadata(properties); + }; + + /** + * Encodes the specified BotLinkedAccountsMetadata message. Does not implicitly {@link proto.BotLinkedAccountsMetadata.verify|verify} messages. + * @function encode + * @memberof proto.BotLinkedAccountsMetadata + * @static + * @param {proto.IBotLinkedAccountsMetadata} message BotLinkedAccountsMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BotLinkedAccountsMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.accounts != null && message.accounts.length) + for (var i = 0; i < message.accounts.length; ++i) + $root.proto.BotLinkedAccount.encode(message.accounts[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.acAuthTokens != null && Object.hasOwnProperty.call(message, "acAuthTokens")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.acAuthTokens); + return writer; + }; + + /** + * Encodes the specified BotLinkedAccountsMetadata message, length delimited. Does not implicitly {@link proto.BotLinkedAccountsMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.BotLinkedAccountsMetadata + * @static + * @param {proto.IBotLinkedAccountsMetadata} message BotLinkedAccountsMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BotLinkedAccountsMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BotLinkedAccountsMetadata message from the specified reader or buffer. + * @function decode + * @memberof proto.BotLinkedAccountsMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.BotLinkedAccountsMetadata} BotLinkedAccountsMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BotLinkedAccountsMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.BotLinkedAccountsMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.accounts && message.accounts.length)) + message.accounts = []; + message.accounts.push($root.proto.BotLinkedAccount.decode(reader, reader.uint32())); + break; + } + case 2: { + message.acAuthTokens = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BotLinkedAccountsMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.BotLinkedAccountsMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.BotLinkedAccountsMetadata} BotLinkedAccountsMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BotLinkedAccountsMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BotLinkedAccountsMetadata message. + * @function verify + * @memberof proto.BotLinkedAccountsMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BotLinkedAccountsMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.accounts != null && message.hasOwnProperty("accounts")) { + if (!Array.isArray(message.accounts)) + return "accounts: array expected"; + for (var i = 0; i < message.accounts.length; ++i) { + var error = $root.proto.BotLinkedAccount.verify(message.accounts[i]); + if (error) + return "accounts." + error; + } + } + if (message.acAuthTokens != null && message.hasOwnProperty("acAuthTokens")) { + properties._acAuthTokens = 1; + if (!(message.acAuthTokens && typeof message.acAuthTokens.length === "number" || $util.isString(message.acAuthTokens))) + return "acAuthTokens: buffer expected"; + } + return null; + }; + + /** + * Creates a BotLinkedAccountsMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.BotLinkedAccountsMetadata + * @static + * @param {Object.} object Plain object + * @returns {proto.BotLinkedAccountsMetadata} BotLinkedAccountsMetadata + */ + BotLinkedAccountsMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.proto.BotLinkedAccountsMetadata) + return object; + var message = new $root.proto.BotLinkedAccountsMetadata(); + if (object.accounts) { + if (!Array.isArray(object.accounts)) + throw TypeError(".proto.BotLinkedAccountsMetadata.accounts: array expected"); + message.accounts = []; + for (var i = 0; i < object.accounts.length; ++i) { + if (typeof object.accounts[i] !== "object") + throw TypeError(".proto.BotLinkedAccountsMetadata.accounts: object expected"); + message.accounts[i] = $root.proto.BotLinkedAccount.fromObject(object.accounts[i]); + } + } + if (object.acAuthTokens != null) + if (typeof object.acAuthTokens === "string") + $util.base64.decode(object.acAuthTokens, message.acAuthTokens = $util.newBuffer($util.base64.length(object.acAuthTokens)), 0); + else if (object.acAuthTokens.length >= 0) + message.acAuthTokens = object.acAuthTokens; + return message; + }; + + /** + * Creates a plain object from a BotLinkedAccountsMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.BotLinkedAccountsMetadata + * @static + * @param {proto.BotLinkedAccountsMetadata} message BotLinkedAccountsMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BotLinkedAccountsMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.accounts = []; + if (message.accounts && message.accounts.length) { + object.accounts = []; + for (var j = 0; j < message.accounts.length; ++j) + object.accounts[j] = $root.proto.BotLinkedAccount.toObject(message.accounts[j], options); + } + if (message.acAuthTokens != null && message.hasOwnProperty("acAuthTokens")) { + object.acAuthTokens = options.bytes === String ? $util.base64.encode(message.acAuthTokens, 0, message.acAuthTokens.length) : options.bytes === Array ? Array.prototype.slice.call(message.acAuthTokens) : message.acAuthTokens; + if (options.oneofs) + object._acAuthTokens = "acAuthTokens"; + } + return object; + }; + + /** + * Converts this BotLinkedAccountsMetadata to JSON. + * @function toJSON + * @memberof proto.BotLinkedAccountsMetadata + * @instance + * @returns {Object.} JSON object + */ + BotLinkedAccountsMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BotLinkedAccountsMetadata + * @function getTypeUrl + * @memberof proto.BotLinkedAccountsMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BotLinkedAccountsMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.BotLinkedAccountsMetadata"; + }; + + return BotLinkedAccountsMetadata; + })(); + + proto.BotMediaMetadata = (function() { + + /** + * Properties of a BotMediaMetadata. + * @memberof proto + * @interface IBotMediaMetadata + * @property {string|null} [fileSha256] BotMediaMetadata fileSha256 + * @property {string|null} [mediaKey] BotMediaMetadata mediaKey + * @property {string|null} [fileEncSha256] BotMediaMetadata fileEncSha256 + * @property {string|null} [directPath] BotMediaMetadata directPath + * @property {number|Long|null} [mediaKeyTimestamp] BotMediaMetadata mediaKeyTimestamp + * @property {string|null} [mimetype] BotMediaMetadata mimetype + * @property {proto.BotMediaMetadata.OrientationType|null} [orientationType] BotMediaMetadata orientationType + */ + + /** + * Constructs a new BotMediaMetadata. + * @memberof proto + * @classdesc Represents a BotMediaMetadata. + * @implements IBotMediaMetadata + * @constructor + * @param {proto.IBotMediaMetadata=} [properties] Properties to set + */ + function BotMediaMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BotMediaMetadata fileSha256. + * @member {string|null|undefined} fileSha256 + * @memberof proto.BotMediaMetadata + * @instance + */ + BotMediaMetadata.prototype.fileSha256 = null; + + /** + * BotMediaMetadata mediaKey. + * @member {string|null|undefined} mediaKey + * @memberof proto.BotMediaMetadata + * @instance + */ + BotMediaMetadata.prototype.mediaKey = null; + + /** + * BotMediaMetadata fileEncSha256. + * @member {string|null|undefined} fileEncSha256 + * @memberof proto.BotMediaMetadata + * @instance + */ + BotMediaMetadata.prototype.fileEncSha256 = null; + + /** + * BotMediaMetadata directPath. + * @member {string|null|undefined} directPath + * @memberof proto.BotMediaMetadata + * @instance + */ + BotMediaMetadata.prototype.directPath = null; + + /** + * BotMediaMetadata mediaKeyTimestamp. + * @member {number|Long|null|undefined} mediaKeyTimestamp + * @memberof proto.BotMediaMetadata + * @instance + */ + BotMediaMetadata.prototype.mediaKeyTimestamp = null; + + /** + * BotMediaMetadata mimetype. + * @member {string|null|undefined} mimetype + * @memberof proto.BotMediaMetadata + * @instance + */ + BotMediaMetadata.prototype.mimetype = null; + + /** + * BotMediaMetadata orientationType. + * @member {proto.BotMediaMetadata.OrientationType|null|undefined} orientationType + * @memberof proto.BotMediaMetadata + * @instance + */ + BotMediaMetadata.prototype.orientationType = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotMediaMetadata.prototype, "_fileSha256", { + get: $util.oneOfGetter($oneOfFields = ["fileSha256"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotMediaMetadata.prototype, "_mediaKey", { + get: $util.oneOfGetter($oneOfFields = ["mediaKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotMediaMetadata.prototype, "_fileEncSha256", { + get: $util.oneOfGetter($oneOfFields = ["fileEncSha256"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotMediaMetadata.prototype, "_directPath", { + get: $util.oneOfGetter($oneOfFields = ["directPath"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotMediaMetadata.prototype, "_mediaKeyTimestamp", { + get: $util.oneOfGetter($oneOfFields = ["mediaKeyTimestamp"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotMediaMetadata.prototype, "_mimetype", { + get: $util.oneOfGetter($oneOfFields = ["mimetype"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotMediaMetadata.prototype, "_orientationType", { + get: $util.oneOfGetter($oneOfFields = ["orientationType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new BotMediaMetadata instance using the specified properties. + * @function create + * @memberof proto.BotMediaMetadata + * @static + * @param {proto.IBotMediaMetadata=} [properties] Properties to set + * @returns {proto.BotMediaMetadata} BotMediaMetadata instance + */ + BotMediaMetadata.create = function create(properties) { + return new BotMediaMetadata(properties); + }; + + /** + * Encodes the specified BotMediaMetadata message. Does not implicitly {@link proto.BotMediaMetadata.verify|verify} messages. + * @function encode + * @memberof proto.BotMediaMetadata + * @static + * @param {proto.IBotMediaMetadata} message BotMediaMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BotMediaMetadata.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.mediaKey != null && Object.hasOwnProperty.call(message, "mediaKey")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.mediaKey); + if (message.fileEncSha256 != null && Object.hasOwnProperty.call(message, "fileEncSha256")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.fileEncSha256); + if (message.directPath != null && Object.hasOwnProperty.call(message, "directPath")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.directPath); + if (message.mediaKeyTimestamp != null && Object.hasOwnProperty.call(message, "mediaKeyTimestamp")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.mediaKeyTimestamp); + if (message.mimetype != null && Object.hasOwnProperty.call(message, "mimetype")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.mimetype); + if (message.orientationType != null && Object.hasOwnProperty.call(message, "orientationType")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.orientationType); + return writer; + }; + + /** + * Encodes the specified BotMediaMetadata message, length delimited. Does not implicitly {@link proto.BotMediaMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.BotMediaMetadata + * @static + * @param {proto.IBotMediaMetadata} message BotMediaMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BotMediaMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BotMediaMetadata message from the specified reader or buffer. + * @function decode + * @memberof proto.BotMediaMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.BotMediaMetadata} BotMediaMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BotMediaMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.BotMediaMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.fileSha256 = reader.string(); + break; + } + case 2: { + message.mediaKey = reader.string(); + break; + } + case 3: { + message.fileEncSha256 = reader.string(); + break; + } + case 4: { + message.directPath = reader.string(); + break; + } + case 5: { + message.mediaKeyTimestamp = reader.int64(); + break; + } + case 6: { + message.mimetype = reader.string(); + break; + } + case 7: { + message.orientationType = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BotMediaMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.BotMediaMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.BotMediaMetadata} BotMediaMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BotMediaMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BotMediaMetadata message. + * @function verify + * @memberof proto.BotMediaMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BotMediaMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) { + properties._fileSha256 = 1; + if (!$util.isString(message.fileSha256)) + return "fileSha256: string expected"; + } + if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) { + properties._mediaKey = 1; + if (!$util.isString(message.mediaKey)) + return "mediaKey: string expected"; + } + if (message.fileEncSha256 != null && message.hasOwnProperty("fileEncSha256")) { + properties._fileEncSha256 = 1; + if (!$util.isString(message.fileEncSha256)) + return "fileEncSha256: string expected"; + } + if (message.directPath != null && message.hasOwnProperty("directPath")) { + properties._directPath = 1; + if (!$util.isString(message.directPath)) + return "directPath: string expected"; + } + if (message.mediaKeyTimestamp != null && message.hasOwnProperty("mediaKeyTimestamp")) { + properties._mediaKeyTimestamp = 1; + if (!$util.isInteger(message.mediaKeyTimestamp) && !(message.mediaKeyTimestamp && $util.isInteger(message.mediaKeyTimestamp.low) && $util.isInteger(message.mediaKeyTimestamp.high))) + return "mediaKeyTimestamp: integer|Long expected"; + } + if (message.mimetype != null && message.hasOwnProperty("mimetype")) { + properties._mimetype = 1; + if (!$util.isString(message.mimetype)) + return "mimetype: string expected"; + } + if (message.orientationType != null && message.hasOwnProperty("orientationType")) { + properties._orientationType = 1; + switch (message.orientationType) { + default: + return "orientationType: enum value expected"; + case 1: + case 2: + case 3: + break; + } + } + return null; + }; + + /** + * Creates a BotMediaMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.BotMediaMetadata + * @static + * @param {Object.} object Plain object + * @returns {proto.BotMediaMetadata} BotMediaMetadata + */ + BotMediaMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.proto.BotMediaMetadata) + return object; + var message = new $root.proto.BotMediaMetadata(); + if (object.fileSha256 != null) + message.fileSha256 = String(object.fileSha256); + if (object.mediaKey != null) + message.mediaKey = String(object.mediaKey); + if (object.fileEncSha256 != null) + message.fileEncSha256 = String(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.mimetype != null) + message.mimetype = String(object.mimetype); + switch (object.orientationType) { + default: + if (typeof object.orientationType === "number") { + message.orientationType = object.orientationType; + break; + } + break; + case "CENTER": + case 1: + message.orientationType = 1; + break; + case "LEFT": + case 2: + message.orientationType = 2; + break; + case "RIGHT": + case 3: + message.orientationType = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from a BotMediaMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.BotMediaMetadata + * @static + * @param {proto.BotMediaMetadata} message BotMediaMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BotMediaMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) { + object.fileSha256 = message.fileSha256; + if (options.oneofs) + object._fileSha256 = "fileSha256"; + } + if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) { + object.mediaKey = message.mediaKey; + if (options.oneofs) + object._mediaKey = "mediaKey"; + } + if (message.fileEncSha256 != null && message.hasOwnProperty("fileEncSha256")) { + object.fileEncSha256 = message.fileEncSha256; + if (options.oneofs) + object._fileEncSha256 = "fileEncSha256"; + } + if (message.directPath != null && message.hasOwnProperty("directPath")) { + object.directPath = message.directPath; + if (options.oneofs) + object._directPath = "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 (options.oneofs) + object._mediaKeyTimestamp = "mediaKeyTimestamp"; + } + if (message.mimetype != null && message.hasOwnProperty("mimetype")) { + object.mimetype = message.mimetype; + if (options.oneofs) + object._mimetype = "mimetype"; + } + if (message.orientationType != null && message.hasOwnProperty("orientationType")) { + object.orientationType = options.enums === String ? $root.proto.BotMediaMetadata.OrientationType[message.orientationType] === undefined ? message.orientationType : $root.proto.BotMediaMetadata.OrientationType[message.orientationType] : message.orientationType; + if (options.oneofs) + object._orientationType = "orientationType"; + } + return object; + }; + + /** + * Converts this BotMediaMetadata to JSON. + * @function toJSON + * @memberof proto.BotMediaMetadata + * @instance + * @returns {Object.} JSON object + */ + BotMediaMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BotMediaMetadata + * @function getTypeUrl + * @memberof proto.BotMediaMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BotMediaMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.BotMediaMetadata"; + }; + + /** + * OrientationType enum. + * @name proto.BotMediaMetadata.OrientationType + * @enum {number} + * @property {number} CENTER=1 CENTER value + * @property {number} LEFT=2 LEFT value + * @property {number} RIGHT=3 RIGHT value + */ + BotMediaMetadata.OrientationType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "CENTER"] = 1; + values[valuesById[2] = "LEFT"] = 2; + values[valuesById[3] = "RIGHT"] = 3; + return values; + })(); + + return BotMediaMetadata; + })(); + + proto.BotMemoryFact = (function() { + + /** + * Properties of a BotMemoryFact. + * @memberof proto + * @interface IBotMemoryFact + * @property {string|null} [fact] BotMemoryFact fact + * @property {string|null} [factId] BotMemoryFact factId + */ + + /** + * Constructs a new BotMemoryFact. + * @memberof proto + * @classdesc Represents a BotMemoryFact. + * @implements IBotMemoryFact + * @constructor + * @param {proto.IBotMemoryFact=} [properties] Properties to set + */ + function BotMemoryFact(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BotMemoryFact fact. + * @member {string|null|undefined} fact + * @memberof proto.BotMemoryFact + * @instance + */ + BotMemoryFact.prototype.fact = null; + + /** + * BotMemoryFact factId. + * @member {string|null|undefined} factId + * @memberof proto.BotMemoryFact + * @instance + */ + BotMemoryFact.prototype.factId = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotMemoryFact.prototype, "_fact", { + get: $util.oneOfGetter($oneOfFields = ["fact"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotMemoryFact.prototype, "_factId", { + get: $util.oneOfGetter($oneOfFields = ["factId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new BotMemoryFact instance using the specified properties. + * @function create + * @memberof proto.BotMemoryFact + * @static + * @param {proto.IBotMemoryFact=} [properties] Properties to set + * @returns {proto.BotMemoryFact} BotMemoryFact instance + */ + BotMemoryFact.create = function create(properties) { + return new BotMemoryFact(properties); + }; + + /** + * Encodes the specified BotMemoryFact message. Does not implicitly {@link proto.BotMemoryFact.verify|verify} messages. + * @function encode + * @memberof proto.BotMemoryFact + * @static + * @param {proto.IBotMemoryFact} message BotMemoryFact message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BotMemoryFact.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fact != null && Object.hasOwnProperty.call(message, "fact")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.fact); + if (message.factId != null && Object.hasOwnProperty.call(message, "factId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.factId); + return writer; + }; + + /** + * Encodes the specified BotMemoryFact message, length delimited. Does not implicitly {@link proto.BotMemoryFact.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.BotMemoryFact + * @static + * @param {proto.IBotMemoryFact} message BotMemoryFact message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BotMemoryFact.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BotMemoryFact message from the specified reader or buffer. + * @function decode + * @memberof proto.BotMemoryFact + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.BotMemoryFact} BotMemoryFact + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BotMemoryFact.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.BotMemoryFact(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.fact = reader.string(); + break; + } + case 2: { + message.factId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BotMemoryFact message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.BotMemoryFact + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.BotMemoryFact} BotMemoryFact + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BotMemoryFact.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BotMemoryFact message. + * @function verify + * @memberof proto.BotMemoryFact + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BotMemoryFact.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.fact != null && message.hasOwnProperty("fact")) { + properties._fact = 1; + if (!$util.isString(message.fact)) + return "fact: string expected"; + } + if (message.factId != null && message.hasOwnProperty("factId")) { + properties._factId = 1; + if (!$util.isString(message.factId)) + return "factId: string expected"; + } + return null; + }; + + /** + * Creates a BotMemoryFact message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.BotMemoryFact + * @static + * @param {Object.} object Plain object + * @returns {proto.BotMemoryFact} BotMemoryFact + */ + BotMemoryFact.fromObject = function fromObject(object) { + if (object instanceof $root.proto.BotMemoryFact) + return object; + var message = new $root.proto.BotMemoryFact(); + if (object.fact != null) + message.fact = String(object.fact); + if (object.factId != null) + message.factId = String(object.factId); + return message; + }; + + /** + * Creates a plain object from a BotMemoryFact message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.BotMemoryFact + * @static + * @param {proto.BotMemoryFact} message BotMemoryFact + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BotMemoryFact.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.fact != null && message.hasOwnProperty("fact")) { + object.fact = message.fact; + if (options.oneofs) + object._fact = "fact"; + } + if (message.factId != null && message.hasOwnProperty("factId")) { + object.factId = message.factId; + if (options.oneofs) + object._factId = "factId"; + } + return object; + }; + + /** + * Converts this BotMemoryFact to JSON. + * @function toJSON + * @memberof proto.BotMemoryFact + * @instance + * @returns {Object.} JSON object + */ + BotMemoryFact.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BotMemoryFact + * @function getTypeUrl + * @memberof proto.BotMemoryFact + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BotMemoryFact.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.BotMemoryFact"; + }; + + return BotMemoryFact; + })(); + + proto.BotMemoryMetadata = (function() { + + /** + * Properties of a BotMemoryMetadata. + * @memberof proto + * @interface IBotMemoryMetadata + * @property {Array.|null} [addedFacts] BotMemoryMetadata addedFacts + * @property {Array.|null} [removedFacts] BotMemoryMetadata removedFacts + * @property {string|null} [disclaimer] BotMemoryMetadata disclaimer + */ + + /** + * Constructs a new BotMemoryMetadata. + * @memberof proto + * @classdesc Represents a BotMemoryMetadata. + * @implements IBotMemoryMetadata + * @constructor + * @param {proto.IBotMemoryMetadata=} [properties] Properties to set + */ + function BotMemoryMetadata(properties) { + this.addedFacts = []; + this.removedFacts = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BotMemoryMetadata addedFacts. + * @member {Array.} addedFacts + * @memberof proto.BotMemoryMetadata + * @instance + */ + BotMemoryMetadata.prototype.addedFacts = $util.emptyArray; + + /** + * BotMemoryMetadata removedFacts. + * @member {Array.} removedFacts + * @memberof proto.BotMemoryMetadata + * @instance + */ + BotMemoryMetadata.prototype.removedFacts = $util.emptyArray; + + /** + * BotMemoryMetadata disclaimer. + * @member {string|null|undefined} disclaimer + * @memberof proto.BotMemoryMetadata + * @instance + */ + BotMemoryMetadata.prototype.disclaimer = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotMemoryMetadata.prototype, "_disclaimer", { + get: $util.oneOfGetter($oneOfFields = ["disclaimer"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new BotMemoryMetadata instance using the specified properties. + * @function create + * @memberof proto.BotMemoryMetadata + * @static + * @param {proto.IBotMemoryMetadata=} [properties] Properties to set + * @returns {proto.BotMemoryMetadata} BotMemoryMetadata instance + */ + BotMemoryMetadata.create = function create(properties) { + return new BotMemoryMetadata(properties); + }; + + /** + * Encodes the specified BotMemoryMetadata message. Does not implicitly {@link proto.BotMemoryMetadata.verify|verify} messages. + * @function encode + * @memberof proto.BotMemoryMetadata + * @static + * @param {proto.IBotMemoryMetadata} message BotMemoryMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BotMemoryMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.addedFacts != null && message.addedFacts.length) + for (var i = 0; i < message.addedFacts.length; ++i) + $root.proto.BotMemoryFact.encode(message.addedFacts[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.removedFacts != null && message.removedFacts.length) + for (var i = 0; i < message.removedFacts.length; ++i) + $root.proto.BotMemoryFact.encode(message.removedFacts[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.disclaimer != null && Object.hasOwnProperty.call(message, "disclaimer")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.disclaimer); + return writer; + }; + + /** + * Encodes the specified BotMemoryMetadata message, length delimited. Does not implicitly {@link proto.BotMemoryMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.BotMemoryMetadata + * @static + * @param {proto.IBotMemoryMetadata} message BotMemoryMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BotMemoryMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BotMemoryMetadata message from the specified reader or buffer. + * @function decode + * @memberof proto.BotMemoryMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.BotMemoryMetadata} BotMemoryMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BotMemoryMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.BotMemoryMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.addedFacts && message.addedFacts.length)) + message.addedFacts = []; + message.addedFacts.push($root.proto.BotMemoryFact.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.removedFacts && message.removedFacts.length)) + message.removedFacts = []; + message.removedFacts.push($root.proto.BotMemoryFact.decode(reader, reader.uint32())); + break; + } + case 3: { + message.disclaimer = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BotMemoryMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.BotMemoryMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.BotMemoryMetadata} BotMemoryMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BotMemoryMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BotMemoryMetadata message. + * @function verify + * @memberof proto.BotMemoryMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BotMemoryMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.addedFacts != null && message.hasOwnProperty("addedFacts")) { + if (!Array.isArray(message.addedFacts)) + return "addedFacts: array expected"; + for (var i = 0; i < message.addedFacts.length; ++i) { + var error = $root.proto.BotMemoryFact.verify(message.addedFacts[i]); + if (error) + return "addedFacts." + error; + } + } + if (message.removedFacts != null && message.hasOwnProperty("removedFacts")) { + if (!Array.isArray(message.removedFacts)) + return "removedFacts: array expected"; + for (var i = 0; i < message.removedFacts.length; ++i) { + var error = $root.proto.BotMemoryFact.verify(message.removedFacts[i]); + if (error) + return "removedFacts." + error; + } + } + if (message.disclaimer != null && message.hasOwnProperty("disclaimer")) { + properties._disclaimer = 1; + if (!$util.isString(message.disclaimer)) + return "disclaimer: string expected"; + } + return null; + }; + + /** + * Creates a BotMemoryMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.BotMemoryMetadata + * @static + * @param {Object.} object Plain object + * @returns {proto.BotMemoryMetadata} BotMemoryMetadata + */ + BotMemoryMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.proto.BotMemoryMetadata) + return object; + var message = new $root.proto.BotMemoryMetadata(); + if (object.addedFacts) { + if (!Array.isArray(object.addedFacts)) + throw TypeError(".proto.BotMemoryMetadata.addedFacts: array expected"); + message.addedFacts = []; + for (var i = 0; i < object.addedFacts.length; ++i) { + if (typeof object.addedFacts[i] !== "object") + throw TypeError(".proto.BotMemoryMetadata.addedFacts: object expected"); + message.addedFacts[i] = $root.proto.BotMemoryFact.fromObject(object.addedFacts[i]); + } + } + if (object.removedFacts) { + if (!Array.isArray(object.removedFacts)) + throw TypeError(".proto.BotMemoryMetadata.removedFacts: array expected"); + message.removedFacts = []; + for (var i = 0; i < object.removedFacts.length; ++i) { + if (typeof object.removedFacts[i] !== "object") + throw TypeError(".proto.BotMemoryMetadata.removedFacts: object expected"); + message.removedFacts[i] = $root.proto.BotMemoryFact.fromObject(object.removedFacts[i]); + } + } + if (object.disclaimer != null) + message.disclaimer = String(object.disclaimer); + return message; + }; + + /** + * Creates a plain object from a BotMemoryMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.BotMemoryMetadata + * @static + * @param {proto.BotMemoryMetadata} message BotMemoryMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BotMemoryMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.addedFacts = []; + object.removedFacts = []; + } + if (message.addedFacts && message.addedFacts.length) { + object.addedFacts = []; + for (var j = 0; j < message.addedFacts.length; ++j) + object.addedFacts[j] = $root.proto.BotMemoryFact.toObject(message.addedFacts[j], options); + } + if (message.removedFacts && message.removedFacts.length) { + object.removedFacts = []; + for (var j = 0; j < message.removedFacts.length; ++j) + object.removedFacts[j] = $root.proto.BotMemoryFact.toObject(message.removedFacts[j], options); + } + if (message.disclaimer != null && message.hasOwnProperty("disclaimer")) { + object.disclaimer = message.disclaimer; + if (options.oneofs) + object._disclaimer = "disclaimer"; + } + return object; + }; + + /** + * Converts this BotMemoryMetadata to JSON. + * @function toJSON + * @memberof proto.BotMemoryMetadata + * @instance + * @returns {Object.} JSON object + */ + BotMemoryMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BotMemoryMetadata + * @function getTypeUrl + * @memberof proto.BotMemoryMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BotMemoryMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.BotMemoryMetadata"; + }; + + return BotMemoryMetadata; + })(); + + proto.BotMemuMetadata = (function() { + + /** + * Properties of a BotMemuMetadata. + * @memberof proto + * @interface IBotMemuMetadata + * @property {Array.|null} [faceImages] BotMemuMetadata faceImages + */ + + /** + * Constructs a new BotMemuMetadata. + * @memberof proto + * @classdesc Represents a BotMemuMetadata. + * @implements IBotMemuMetadata + * @constructor + * @param {proto.IBotMemuMetadata=} [properties] Properties to set + */ + function BotMemuMetadata(properties) { + this.faceImages = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BotMemuMetadata faceImages. + * @member {Array.} faceImages + * @memberof proto.BotMemuMetadata + * @instance + */ + BotMemuMetadata.prototype.faceImages = $util.emptyArray; + + /** + * Creates a new BotMemuMetadata instance using the specified properties. + * @function create + * @memberof proto.BotMemuMetadata + * @static + * @param {proto.IBotMemuMetadata=} [properties] Properties to set + * @returns {proto.BotMemuMetadata} BotMemuMetadata instance + */ + BotMemuMetadata.create = function create(properties) { + return new BotMemuMetadata(properties); + }; + + /** + * Encodes the specified BotMemuMetadata message. Does not implicitly {@link proto.BotMemuMetadata.verify|verify} messages. + * @function encode + * @memberof proto.BotMemuMetadata + * @static + * @param {proto.IBotMemuMetadata} message BotMemuMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BotMemuMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.faceImages != null && message.faceImages.length) + for (var i = 0; i < message.faceImages.length; ++i) + $root.proto.BotMediaMetadata.encode(message.faceImages[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BotMemuMetadata message, length delimited. Does not implicitly {@link proto.BotMemuMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.BotMemuMetadata + * @static + * @param {proto.IBotMemuMetadata} message BotMemuMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BotMemuMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BotMemuMetadata message from the specified reader or buffer. + * @function decode + * @memberof proto.BotMemuMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.BotMemuMetadata} BotMemuMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BotMemuMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.BotMemuMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.faceImages && message.faceImages.length)) + message.faceImages = []; + message.faceImages.push($root.proto.BotMediaMetadata.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BotMemuMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.BotMemuMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.BotMemuMetadata} BotMemuMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BotMemuMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BotMemuMetadata message. + * @function verify + * @memberof proto.BotMemuMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BotMemuMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.faceImages != null && message.hasOwnProperty("faceImages")) { + if (!Array.isArray(message.faceImages)) + return "faceImages: array expected"; + for (var i = 0; i < message.faceImages.length; ++i) { + var error = $root.proto.BotMediaMetadata.verify(message.faceImages[i]); + if (error) + return "faceImages." + error; + } + } + return null; + }; + + /** + * Creates a BotMemuMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.BotMemuMetadata + * @static + * @param {Object.} object Plain object + * @returns {proto.BotMemuMetadata} BotMemuMetadata + */ + BotMemuMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.proto.BotMemuMetadata) + return object; + var message = new $root.proto.BotMemuMetadata(); + if (object.faceImages) { + if (!Array.isArray(object.faceImages)) + throw TypeError(".proto.BotMemuMetadata.faceImages: array expected"); + message.faceImages = []; + for (var i = 0; i < object.faceImages.length; ++i) { + if (typeof object.faceImages[i] !== "object") + throw TypeError(".proto.BotMemuMetadata.faceImages: object expected"); + message.faceImages[i] = $root.proto.BotMediaMetadata.fromObject(object.faceImages[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a BotMemuMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.BotMemuMetadata + * @static + * @param {proto.BotMemuMetadata} message BotMemuMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BotMemuMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.faceImages = []; + if (message.faceImages && message.faceImages.length) { + object.faceImages = []; + for (var j = 0; j < message.faceImages.length; ++j) + object.faceImages[j] = $root.proto.BotMediaMetadata.toObject(message.faceImages[j], options); + } + return object; + }; + + /** + * Converts this BotMemuMetadata to JSON. + * @function toJSON + * @memberof proto.BotMemuMetadata + * @instance + * @returns {Object.} JSON object + */ + BotMemuMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BotMemuMetadata + * @function getTypeUrl + * @memberof proto.BotMemuMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BotMemuMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.BotMemuMetadata"; + }; + + return BotMemuMetadata; + })(); + proto.BotMetadata = (function() { /** @@ -3487,6 +12370,19 @@ $root.proto = (function() { * @property {proto.IBotPluginMetadata|null} [pluginMetadata] BotMetadata pluginMetadata * @property {proto.IBotSuggestedPromptMetadata|null} [suggestedPromptMetadata] BotMetadata suggestedPromptMetadata * @property {string|null} [invokerJid] BotMetadata invokerJid + * @property {proto.IBotSessionMetadata|null} [sessionMetadata] BotMetadata sessionMetadata + * @property {proto.IBotMemuMetadata|null} [memuMetadata] BotMetadata memuMetadata + * @property {string|null} [timezone] BotMetadata timezone + * @property {proto.IBotReminderMetadata|null} [reminderMetadata] BotMetadata reminderMetadata + * @property {proto.IBotModelMetadata|null} [modelMetadata] BotMetadata modelMetadata + * @property {string|null} [messageDisclaimerText] BotMetadata messageDisclaimerText + * @property {proto.IBotProgressIndicatorMetadata|null} [progressIndicatorMetadata] BotMetadata progressIndicatorMetadata + * @property {proto.IBotCapabilityMetadata|null} [capabilityMetadata] BotMetadata capabilityMetadata + * @property {proto.IBotImagineMetadata|null} [imagineMetadata] BotMetadata imagineMetadata + * @property {proto.IBotMemoryMetadata|null} [memoryMetadata] BotMetadata memoryMetadata + * @property {proto.IBotRenderingMetadata|null} [renderingMetadata] BotMetadata renderingMetadata + * @property {proto.IBotMetricsMetadata|null} [botMetricsMetadata] BotMetadata botMetricsMetadata + * @property {proto.IBotLinkedAccountsMetadata|null} [botLinkedAccountsMetadata] BotMetadata botLinkedAccountsMetadata */ /** @@ -3514,11 +12410,11 @@ $root.proto = (function() { /** * BotMetadata personaId. - * @member {string} personaId + * @member {string|null|undefined} personaId * @memberof proto.BotMetadata * @instance */ - BotMetadata.prototype.personaId = ""; + BotMetadata.prototype.personaId = null; /** * BotMetadata pluginMetadata. @@ -3538,11 +12434,226 @@ $root.proto = (function() { /** * BotMetadata invokerJid. - * @member {string} invokerJid + * @member {string|null|undefined} invokerJid * @memberof proto.BotMetadata * @instance */ - BotMetadata.prototype.invokerJid = ""; + BotMetadata.prototype.invokerJid = null; + + /** + * BotMetadata sessionMetadata. + * @member {proto.IBotSessionMetadata|null|undefined} sessionMetadata + * @memberof proto.BotMetadata + * @instance + */ + BotMetadata.prototype.sessionMetadata = null; + + /** + * BotMetadata memuMetadata. + * @member {proto.IBotMemuMetadata|null|undefined} memuMetadata + * @memberof proto.BotMetadata + * @instance + */ + BotMetadata.prototype.memuMetadata = null; + + /** + * BotMetadata timezone. + * @member {string|null|undefined} timezone + * @memberof proto.BotMetadata + * @instance + */ + BotMetadata.prototype.timezone = null; + + /** + * BotMetadata reminderMetadata. + * @member {proto.IBotReminderMetadata|null|undefined} reminderMetadata + * @memberof proto.BotMetadata + * @instance + */ + BotMetadata.prototype.reminderMetadata = null; + + /** + * BotMetadata modelMetadata. + * @member {proto.IBotModelMetadata|null|undefined} modelMetadata + * @memberof proto.BotMetadata + * @instance + */ + BotMetadata.prototype.modelMetadata = null; + + /** + * BotMetadata messageDisclaimerText. + * @member {string|null|undefined} messageDisclaimerText + * @memberof proto.BotMetadata + * @instance + */ + BotMetadata.prototype.messageDisclaimerText = null; + + /** + * BotMetadata progressIndicatorMetadata. + * @member {proto.IBotProgressIndicatorMetadata|null|undefined} progressIndicatorMetadata + * @memberof proto.BotMetadata + * @instance + */ + BotMetadata.prototype.progressIndicatorMetadata = null; + + /** + * BotMetadata capabilityMetadata. + * @member {proto.IBotCapabilityMetadata|null|undefined} capabilityMetadata + * @memberof proto.BotMetadata + * @instance + */ + BotMetadata.prototype.capabilityMetadata = null; + + /** + * BotMetadata imagineMetadata. + * @member {proto.IBotImagineMetadata|null|undefined} imagineMetadata + * @memberof proto.BotMetadata + * @instance + */ + BotMetadata.prototype.imagineMetadata = null; + + /** + * BotMetadata memoryMetadata. + * @member {proto.IBotMemoryMetadata|null|undefined} memoryMetadata + * @memberof proto.BotMetadata + * @instance + */ + BotMetadata.prototype.memoryMetadata = null; + + /** + * BotMetadata renderingMetadata. + * @member {proto.IBotRenderingMetadata|null|undefined} renderingMetadata + * @memberof proto.BotMetadata + * @instance + */ + BotMetadata.prototype.renderingMetadata = null; + + /** + * BotMetadata botMetricsMetadata. + * @member {proto.IBotMetricsMetadata|null|undefined} botMetricsMetadata + * @memberof proto.BotMetadata + * @instance + */ + BotMetadata.prototype.botMetricsMetadata = null; + + /** + * BotMetadata botLinkedAccountsMetadata. + * @member {proto.IBotLinkedAccountsMetadata|null|undefined} botLinkedAccountsMetadata + * @memberof proto.BotMetadata + * @instance + */ + BotMetadata.prototype.botLinkedAccountsMetadata = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotMetadata.prototype, "_avatarMetadata", { + get: $util.oneOfGetter($oneOfFields = ["avatarMetadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotMetadata.prototype, "_personaId", { + get: $util.oneOfGetter($oneOfFields = ["personaId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotMetadata.prototype, "_pluginMetadata", { + get: $util.oneOfGetter($oneOfFields = ["pluginMetadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotMetadata.prototype, "_suggestedPromptMetadata", { + get: $util.oneOfGetter($oneOfFields = ["suggestedPromptMetadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotMetadata.prototype, "_invokerJid", { + get: $util.oneOfGetter($oneOfFields = ["invokerJid"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotMetadata.prototype, "_sessionMetadata", { + get: $util.oneOfGetter($oneOfFields = ["sessionMetadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotMetadata.prototype, "_memuMetadata", { + get: $util.oneOfGetter($oneOfFields = ["memuMetadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotMetadata.prototype, "_timezone", { + get: $util.oneOfGetter($oneOfFields = ["timezone"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotMetadata.prototype, "_reminderMetadata", { + get: $util.oneOfGetter($oneOfFields = ["reminderMetadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotMetadata.prototype, "_modelMetadata", { + get: $util.oneOfGetter($oneOfFields = ["modelMetadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotMetadata.prototype, "_messageDisclaimerText", { + get: $util.oneOfGetter($oneOfFields = ["messageDisclaimerText"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotMetadata.prototype, "_progressIndicatorMetadata", { + get: $util.oneOfGetter($oneOfFields = ["progressIndicatorMetadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotMetadata.prototype, "_capabilityMetadata", { + get: $util.oneOfGetter($oneOfFields = ["capabilityMetadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotMetadata.prototype, "_imagineMetadata", { + get: $util.oneOfGetter($oneOfFields = ["imagineMetadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotMetadata.prototype, "_memoryMetadata", { + get: $util.oneOfGetter($oneOfFields = ["memoryMetadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotMetadata.prototype, "_renderingMetadata", { + get: $util.oneOfGetter($oneOfFields = ["renderingMetadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotMetadata.prototype, "_botMetricsMetadata", { + get: $util.oneOfGetter($oneOfFields = ["botMetricsMetadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotMetadata.prototype, "_botLinkedAccountsMetadata", { + get: $util.oneOfGetter($oneOfFields = ["botLinkedAccountsMetadata"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new BotMetadata instance using the specified properties. @@ -3578,6 +12689,32 @@ $root.proto = (function() { $root.proto.BotSuggestedPromptMetadata.encode(message.suggestedPromptMetadata, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); if (message.invokerJid != null && Object.hasOwnProperty.call(message, "invokerJid")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.invokerJid); + if (message.sessionMetadata != null && Object.hasOwnProperty.call(message, "sessionMetadata")) + $root.proto.BotSessionMetadata.encode(message.sessionMetadata, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.memuMetadata != null && Object.hasOwnProperty.call(message, "memuMetadata")) + $root.proto.BotMemuMetadata.encode(message.memuMetadata, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.timezone != null && Object.hasOwnProperty.call(message, "timezone")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.timezone); + if (message.reminderMetadata != null && Object.hasOwnProperty.call(message, "reminderMetadata")) + $root.proto.BotReminderMetadata.encode(message.reminderMetadata, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.modelMetadata != null && Object.hasOwnProperty.call(message, "modelMetadata")) + $root.proto.BotModelMetadata.encode(message.modelMetadata, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.messageDisclaimerText != null && Object.hasOwnProperty.call(message, "messageDisclaimerText")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.messageDisclaimerText); + if (message.progressIndicatorMetadata != null && Object.hasOwnProperty.call(message, "progressIndicatorMetadata")) + $root.proto.BotProgressIndicatorMetadata.encode(message.progressIndicatorMetadata, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.capabilityMetadata != null && Object.hasOwnProperty.call(message, "capabilityMetadata")) + $root.proto.BotCapabilityMetadata.encode(message.capabilityMetadata, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.imagineMetadata != null && Object.hasOwnProperty.call(message, "imagineMetadata")) + $root.proto.BotImagineMetadata.encode(message.imagineMetadata, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.memoryMetadata != null && Object.hasOwnProperty.call(message, "memoryMetadata")) + $root.proto.BotMemoryMetadata.encode(message.memoryMetadata, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.renderingMetadata != null && Object.hasOwnProperty.call(message, "renderingMetadata")) + $root.proto.BotRenderingMetadata.encode(message.renderingMetadata, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); + if (message.botMetricsMetadata != null && Object.hasOwnProperty.call(message, "botMetricsMetadata")) + $root.proto.BotMetricsMetadata.encode(message.botMetricsMetadata, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); + if (message.botLinkedAccountsMetadata != null && Object.hasOwnProperty.call(message, "botLinkedAccountsMetadata")) + $root.proto.BotLinkedAccountsMetadata.encode(message.botLinkedAccountsMetadata, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); return writer; }; @@ -3612,21 +12749,78 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.avatarMetadata = $root.proto.BotAvatarMetadata.decode(reader, reader.uint32()); - break; - case 2: - message.personaId = reader.string(); - break; - case 3: - message.pluginMetadata = $root.proto.BotPluginMetadata.decode(reader, reader.uint32()); - break; - case 4: - message.suggestedPromptMetadata = $root.proto.BotSuggestedPromptMetadata.decode(reader, reader.uint32()); - break; - case 5: - message.invokerJid = reader.string(); - break; + case 1: { + message.avatarMetadata = $root.proto.BotAvatarMetadata.decode(reader, reader.uint32()); + break; + } + case 2: { + message.personaId = reader.string(); + break; + } + case 3: { + message.pluginMetadata = $root.proto.BotPluginMetadata.decode(reader, reader.uint32()); + break; + } + case 4: { + message.suggestedPromptMetadata = $root.proto.BotSuggestedPromptMetadata.decode(reader, reader.uint32()); + break; + } + case 5: { + message.invokerJid = reader.string(); + break; + } + case 6: { + message.sessionMetadata = $root.proto.BotSessionMetadata.decode(reader, reader.uint32()); + break; + } + case 7: { + message.memuMetadata = $root.proto.BotMemuMetadata.decode(reader, reader.uint32()); + break; + } + case 8: { + message.timezone = reader.string(); + break; + } + case 9: { + message.reminderMetadata = $root.proto.BotReminderMetadata.decode(reader, reader.uint32()); + break; + } + case 10: { + message.modelMetadata = $root.proto.BotModelMetadata.decode(reader, reader.uint32()); + break; + } + case 11: { + message.messageDisclaimerText = reader.string(); + break; + } + case 12: { + message.progressIndicatorMetadata = $root.proto.BotProgressIndicatorMetadata.decode(reader, reader.uint32()); + break; + } + case 13: { + message.capabilityMetadata = $root.proto.BotCapabilityMetadata.decode(reader, reader.uint32()); + break; + } + case 14: { + message.imagineMetadata = $root.proto.BotImagineMetadata.decode(reader, reader.uint32()); + break; + } + case 15: { + message.memoryMetadata = $root.proto.BotMemoryMetadata.decode(reader, reader.uint32()); + break; + } + case 16: { + message.renderingMetadata = $root.proto.BotRenderingMetadata.decode(reader, reader.uint32()); + break; + } + case 17: { + message.botMetricsMetadata = $root.proto.BotMetricsMetadata.decode(reader, reader.uint32()); + break; + } + case 18: { + message.botLinkedAccountsMetadata = $root.proto.BotLinkedAccountsMetadata.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -3662,27 +12856,139 @@ $root.proto = (function() { BotMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; if (message.avatarMetadata != null && message.hasOwnProperty("avatarMetadata")) { - var error = $root.proto.BotAvatarMetadata.verify(message.avatarMetadata); - if (error) - return "avatarMetadata." + error; + properties._avatarMetadata = 1; + { + var error = $root.proto.BotAvatarMetadata.verify(message.avatarMetadata); + if (error) + return "avatarMetadata." + error; + } } - if (message.personaId != null && message.hasOwnProperty("personaId")) + if (message.personaId != null && message.hasOwnProperty("personaId")) { + properties._personaId = 1; if (!$util.isString(message.personaId)) return "personaId: string expected"; + } if (message.pluginMetadata != null && message.hasOwnProperty("pluginMetadata")) { - var error = $root.proto.BotPluginMetadata.verify(message.pluginMetadata); - if (error) - return "pluginMetadata." + error; + properties._pluginMetadata = 1; + { + var error = $root.proto.BotPluginMetadata.verify(message.pluginMetadata); + if (error) + return "pluginMetadata." + error; + } } if (message.suggestedPromptMetadata != null && message.hasOwnProperty("suggestedPromptMetadata")) { - var error = $root.proto.BotSuggestedPromptMetadata.verify(message.suggestedPromptMetadata); - if (error) - return "suggestedPromptMetadata." + error; + properties._suggestedPromptMetadata = 1; + { + var error = $root.proto.BotSuggestedPromptMetadata.verify(message.suggestedPromptMetadata); + if (error) + return "suggestedPromptMetadata." + error; + } } - if (message.invokerJid != null && message.hasOwnProperty("invokerJid")) + if (message.invokerJid != null && message.hasOwnProperty("invokerJid")) { + properties._invokerJid = 1; if (!$util.isString(message.invokerJid)) return "invokerJid: string expected"; + } + if (message.sessionMetadata != null && message.hasOwnProperty("sessionMetadata")) { + properties._sessionMetadata = 1; + { + var error = $root.proto.BotSessionMetadata.verify(message.sessionMetadata); + if (error) + return "sessionMetadata." + error; + } + } + if (message.memuMetadata != null && message.hasOwnProperty("memuMetadata")) { + properties._memuMetadata = 1; + { + var error = $root.proto.BotMemuMetadata.verify(message.memuMetadata); + if (error) + return "memuMetadata." + error; + } + } + if (message.timezone != null && message.hasOwnProperty("timezone")) { + properties._timezone = 1; + if (!$util.isString(message.timezone)) + return "timezone: string expected"; + } + if (message.reminderMetadata != null && message.hasOwnProperty("reminderMetadata")) { + properties._reminderMetadata = 1; + { + var error = $root.proto.BotReminderMetadata.verify(message.reminderMetadata); + if (error) + return "reminderMetadata." + error; + } + } + if (message.modelMetadata != null && message.hasOwnProperty("modelMetadata")) { + properties._modelMetadata = 1; + { + var error = $root.proto.BotModelMetadata.verify(message.modelMetadata); + if (error) + return "modelMetadata." + error; + } + } + if (message.messageDisclaimerText != null && message.hasOwnProperty("messageDisclaimerText")) { + properties._messageDisclaimerText = 1; + if (!$util.isString(message.messageDisclaimerText)) + return "messageDisclaimerText: string expected"; + } + if (message.progressIndicatorMetadata != null && message.hasOwnProperty("progressIndicatorMetadata")) { + properties._progressIndicatorMetadata = 1; + { + var error = $root.proto.BotProgressIndicatorMetadata.verify(message.progressIndicatorMetadata); + if (error) + return "progressIndicatorMetadata." + error; + } + } + if (message.capabilityMetadata != null && message.hasOwnProperty("capabilityMetadata")) { + properties._capabilityMetadata = 1; + { + var error = $root.proto.BotCapabilityMetadata.verify(message.capabilityMetadata); + if (error) + return "capabilityMetadata." + error; + } + } + if (message.imagineMetadata != null && message.hasOwnProperty("imagineMetadata")) { + properties._imagineMetadata = 1; + { + var error = $root.proto.BotImagineMetadata.verify(message.imagineMetadata); + if (error) + return "imagineMetadata." + error; + } + } + if (message.memoryMetadata != null && message.hasOwnProperty("memoryMetadata")) { + properties._memoryMetadata = 1; + { + var error = $root.proto.BotMemoryMetadata.verify(message.memoryMetadata); + if (error) + return "memoryMetadata." + error; + } + } + if (message.renderingMetadata != null && message.hasOwnProperty("renderingMetadata")) { + properties._renderingMetadata = 1; + { + var error = $root.proto.BotRenderingMetadata.verify(message.renderingMetadata); + if (error) + return "renderingMetadata." + error; + } + } + if (message.botMetricsMetadata != null && message.hasOwnProperty("botMetricsMetadata")) { + properties._botMetricsMetadata = 1; + { + var error = $root.proto.BotMetricsMetadata.verify(message.botMetricsMetadata); + if (error) + return "botMetricsMetadata." + error; + } + } + if (message.botLinkedAccountsMetadata != null && message.hasOwnProperty("botLinkedAccountsMetadata")) { + properties._botLinkedAccountsMetadata = 1; + { + var error = $root.proto.BotLinkedAccountsMetadata.verify(message.botLinkedAccountsMetadata); + if (error) + return "botLinkedAccountsMetadata." + error; + } + } return null; }; @@ -3717,6 +13023,65 @@ $root.proto = (function() { } if (object.invokerJid != null) message.invokerJid = String(object.invokerJid); + if (object.sessionMetadata != null) { + if (typeof object.sessionMetadata !== "object") + throw TypeError(".proto.BotMetadata.sessionMetadata: object expected"); + message.sessionMetadata = $root.proto.BotSessionMetadata.fromObject(object.sessionMetadata); + } + if (object.memuMetadata != null) { + if (typeof object.memuMetadata !== "object") + throw TypeError(".proto.BotMetadata.memuMetadata: object expected"); + message.memuMetadata = $root.proto.BotMemuMetadata.fromObject(object.memuMetadata); + } + if (object.timezone != null) + message.timezone = String(object.timezone); + if (object.reminderMetadata != null) { + if (typeof object.reminderMetadata !== "object") + throw TypeError(".proto.BotMetadata.reminderMetadata: object expected"); + message.reminderMetadata = $root.proto.BotReminderMetadata.fromObject(object.reminderMetadata); + } + if (object.modelMetadata != null) { + if (typeof object.modelMetadata !== "object") + throw TypeError(".proto.BotMetadata.modelMetadata: object expected"); + message.modelMetadata = $root.proto.BotModelMetadata.fromObject(object.modelMetadata); + } + if (object.messageDisclaimerText != null) + message.messageDisclaimerText = String(object.messageDisclaimerText); + if (object.progressIndicatorMetadata != null) { + if (typeof object.progressIndicatorMetadata !== "object") + throw TypeError(".proto.BotMetadata.progressIndicatorMetadata: object expected"); + message.progressIndicatorMetadata = $root.proto.BotProgressIndicatorMetadata.fromObject(object.progressIndicatorMetadata); + } + if (object.capabilityMetadata != null) { + if (typeof object.capabilityMetadata !== "object") + throw TypeError(".proto.BotMetadata.capabilityMetadata: object expected"); + message.capabilityMetadata = $root.proto.BotCapabilityMetadata.fromObject(object.capabilityMetadata); + } + if (object.imagineMetadata != null) { + if (typeof object.imagineMetadata !== "object") + throw TypeError(".proto.BotMetadata.imagineMetadata: object expected"); + message.imagineMetadata = $root.proto.BotImagineMetadata.fromObject(object.imagineMetadata); + } + if (object.memoryMetadata != null) { + if (typeof object.memoryMetadata !== "object") + throw TypeError(".proto.BotMetadata.memoryMetadata: object expected"); + message.memoryMetadata = $root.proto.BotMemoryMetadata.fromObject(object.memoryMetadata); + } + if (object.renderingMetadata != null) { + if (typeof object.renderingMetadata !== "object") + throw TypeError(".proto.BotMetadata.renderingMetadata: object expected"); + message.renderingMetadata = $root.proto.BotRenderingMetadata.fromObject(object.renderingMetadata); + } + if (object.botMetricsMetadata != null) { + if (typeof object.botMetricsMetadata !== "object") + throw TypeError(".proto.BotMetadata.botMetricsMetadata: object expected"); + message.botMetricsMetadata = $root.proto.BotMetricsMetadata.fromObject(object.botMetricsMetadata); + } + if (object.botLinkedAccountsMetadata != null) { + if (typeof object.botLinkedAccountsMetadata !== "object") + throw TypeError(".proto.BotMetadata.botLinkedAccountsMetadata: object expected"); + message.botLinkedAccountsMetadata = $root.proto.BotLinkedAccountsMetadata.fromObject(object.botLinkedAccountsMetadata); + } return message; }; @@ -3733,23 +13098,96 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.avatarMetadata = null; - object.personaId = ""; - object.pluginMetadata = null; - object.suggestedPromptMetadata = null; - object.invokerJid = ""; - } - if (message.avatarMetadata != null && message.hasOwnProperty("avatarMetadata")) + if (message.avatarMetadata != null && message.hasOwnProperty("avatarMetadata")) { object.avatarMetadata = $root.proto.BotAvatarMetadata.toObject(message.avatarMetadata, options); - if (message.personaId != null && message.hasOwnProperty("personaId")) + if (options.oneofs) + object._avatarMetadata = "avatarMetadata"; + } + if (message.personaId != null && message.hasOwnProperty("personaId")) { object.personaId = message.personaId; - if (message.pluginMetadata != null && message.hasOwnProperty("pluginMetadata")) + if (options.oneofs) + object._personaId = "personaId"; + } + if (message.pluginMetadata != null && message.hasOwnProperty("pluginMetadata")) { object.pluginMetadata = $root.proto.BotPluginMetadata.toObject(message.pluginMetadata, options); - if (message.suggestedPromptMetadata != null && message.hasOwnProperty("suggestedPromptMetadata")) + if (options.oneofs) + object._pluginMetadata = "pluginMetadata"; + } + if (message.suggestedPromptMetadata != null && message.hasOwnProperty("suggestedPromptMetadata")) { object.suggestedPromptMetadata = $root.proto.BotSuggestedPromptMetadata.toObject(message.suggestedPromptMetadata, options); - if (message.invokerJid != null && message.hasOwnProperty("invokerJid")) + if (options.oneofs) + object._suggestedPromptMetadata = "suggestedPromptMetadata"; + } + if (message.invokerJid != null && message.hasOwnProperty("invokerJid")) { object.invokerJid = message.invokerJid; + if (options.oneofs) + object._invokerJid = "invokerJid"; + } + if (message.sessionMetadata != null && message.hasOwnProperty("sessionMetadata")) { + object.sessionMetadata = $root.proto.BotSessionMetadata.toObject(message.sessionMetadata, options); + if (options.oneofs) + object._sessionMetadata = "sessionMetadata"; + } + if (message.memuMetadata != null && message.hasOwnProperty("memuMetadata")) { + object.memuMetadata = $root.proto.BotMemuMetadata.toObject(message.memuMetadata, options); + if (options.oneofs) + object._memuMetadata = "memuMetadata"; + } + if (message.timezone != null && message.hasOwnProperty("timezone")) { + object.timezone = message.timezone; + if (options.oneofs) + object._timezone = "timezone"; + } + if (message.reminderMetadata != null && message.hasOwnProperty("reminderMetadata")) { + object.reminderMetadata = $root.proto.BotReminderMetadata.toObject(message.reminderMetadata, options); + if (options.oneofs) + object._reminderMetadata = "reminderMetadata"; + } + if (message.modelMetadata != null && message.hasOwnProperty("modelMetadata")) { + object.modelMetadata = $root.proto.BotModelMetadata.toObject(message.modelMetadata, options); + if (options.oneofs) + object._modelMetadata = "modelMetadata"; + } + if (message.messageDisclaimerText != null && message.hasOwnProperty("messageDisclaimerText")) { + object.messageDisclaimerText = message.messageDisclaimerText; + if (options.oneofs) + object._messageDisclaimerText = "messageDisclaimerText"; + } + if (message.progressIndicatorMetadata != null && message.hasOwnProperty("progressIndicatorMetadata")) { + object.progressIndicatorMetadata = $root.proto.BotProgressIndicatorMetadata.toObject(message.progressIndicatorMetadata, options); + if (options.oneofs) + object._progressIndicatorMetadata = "progressIndicatorMetadata"; + } + if (message.capabilityMetadata != null && message.hasOwnProperty("capabilityMetadata")) { + object.capabilityMetadata = $root.proto.BotCapabilityMetadata.toObject(message.capabilityMetadata, options); + if (options.oneofs) + object._capabilityMetadata = "capabilityMetadata"; + } + if (message.imagineMetadata != null && message.hasOwnProperty("imagineMetadata")) { + object.imagineMetadata = $root.proto.BotImagineMetadata.toObject(message.imagineMetadata, options); + if (options.oneofs) + object._imagineMetadata = "imagineMetadata"; + } + if (message.memoryMetadata != null && message.hasOwnProperty("memoryMetadata")) { + object.memoryMetadata = $root.proto.BotMemoryMetadata.toObject(message.memoryMetadata, options); + if (options.oneofs) + object._memoryMetadata = "memoryMetadata"; + } + if (message.renderingMetadata != null && message.hasOwnProperty("renderingMetadata")) { + object.renderingMetadata = $root.proto.BotRenderingMetadata.toObject(message.renderingMetadata, options); + if (options.oneofs) + object._renderingMetadata = "renderingMetadata"; + } + if (message.botMetricsMetadata != null && message.hasOwnProperty("botMetricsMetadata")) { + object.botMetricsMetadata = $root.proto.BotMetricsMetadata.toObject(message.botMetricsMetadata, options); + if (options.oneofs) + object._botMetricsMetadata = "botMetricsMetadata"; + } + if (message.botLinkedAccountsMetadata != null && message.hasOwnProperty("botLinkedAccountsMetadata")) { + object.botLinkedAccountsMetadata = $root.proto.BotLinkedAccountsMetadata.toObject(message.botLinkedAccountsMetadata, options); + if (options.oneofs) + object._botLinkedAccountsMetadata = "botLinkedAccountsMetadata"; + } return object; }; @@ -3764,9 +13202,740 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for BotMetadata + * @function getTypeUrl + * @memberof proto.BotMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BotMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.BotMetadata"; + }; + return BotMetadata; })(); + /** + * BotMetricsEntryPoint enum. + * @name proto.BotMetricsEntryPoint + * @enum {number} + * @property {number} FAVICON=1 FAVICON value + * @property {number} CHATLIST=2 CHATLIST value + * @property {number} AISEARCH_NULL_STATE_PAPER_PLANE=3 AISEARCH_NULL_STATE_PAPER_PLANE value + * @property {number} AISEARCH_NULL_STATE_SUGGESTION=4 AISEARCH_NULL_STATE_SUGGESTION value + * @property {number} AISEARCH_TYPE_AHEAD_SUGGESTION=5 AISEARCH_TYPE_AHEAD_SUGGESTION value + * @property {number} AISEARCH_TYPE_AHEAD_PAPER_PLANE=6 AISEARCH_TYPE_AHEAD_PAPER_PLANE value + * @property {number} AISEARCH_TYPE_AHEAD_RESULT_CHATLIST=7 AISEARCH_TYPE_AHEAD_RESULT_CHATLIST value + * @property {number} AISEARCH_TYPE_AHEAD_RESULT_MESSAGES=8 AISEARCH_TYPE_AHEAD_RESULT_MESSAGES value + * @property {number} AIVOICE_SEARCH_BAR=9 AIVOICE_SEARCH_BAR value + * @property {number} AIVOICE_FAVICON=10 AIVOICE_FAVICON value + * @property {number} AISTUDIO=11 AISTUDIO value + * @property {number} DEEPLINK=12 DEEPLINK value + * @property {number} NOTIFICATION=13 NOTIFICATION value + * @property {number} PROFILE_MESSAGE_BUTTON=14 PROFILE_MESSAGE_BUTTON value + * @property {number} FORWARD=15 FORWARD value + * @property {number} APP_SHORTCUT=16 APP_SHORTCUT value + * @property {number} FF_FAMILY=17 FF_FAMILY value + */ + proto.BotMetricsEntryPoint = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "FAVICON"] = 1; + values[valuesById[2] = "CHATLIST"] = 2; + values[valuesById[3] = "AISEARCH_NULL_STATE_PAPER_PLANE"] = 3; + values[valuesById[4] = "AISEARCH_NULL_STATE_SUGGESTION"] = 4; + values[valuesById[5] = "AISEARCH_TYPE_AHEAD_SUGGESTION"] = 5; + values[valuesById[6] = "AISEARCH_TYPE_AHEAD_PAPER_PLANE"] = 6; + values[valuesById[7] = "AISEARCH_TYPE_AHEAD_RESULT_CHATLIST"] = 7; + values[valuesById[8] = "AISEARCH_TYPE_AHEAD_RESULT_MESSAGES"] = 8; + values[valuesById[9] = "AIVOICE_SEARCH_BAR"] = 9; + values[valuesById[10] = "AIVOICE_FAVICON"] = 10; + values[valuesById[11] = "AISTUDIO"] = 11; + values[valuesById[12] = "DEEPLINK"] = 12; + values[valuesById[13] = "NOTIFICATION"] = 13; + values[valuesById[14] = "PROFILE_MESSAGE_BUTTON"] = 14; + values[valuesById[15] = "FORWARD"] = 15; + values[valuesById[16] = "APP_SHORTCUT"] = 16; + values[valuesById[17] = "FF_FAMILY"] = 17; + return values; + })(); + + proto.BotMetricsMetadata = (function() { + + /** + * Properties of a BotMetricsMetadata. + * @memberof proto + * @interface IBotMetricsMetadata + * @property {string|null} [destinationId] BotMetricsMetadata destinationId + * @property {proto.BotMetricsEntryPoint|null} [destinationEntryPoint] BotMetricsMetadata destinationEntryPoint + */ + + /** + * Constructs a new BotMetricsMetadata. + * @memberof proto + * @classdesc Represents a BotMetricsMetadata. + * @implements IBotMetricsMetadata + * @constructor + * @param {proto.IBotMetricsMetadata=} [properties] Properties to set + */ + function BotMetricsMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BotMetricsMetadata destinationId. + * @member {string|null|undefined} destinationId + * @memberof proto.BotMetricsMetadata + * @instance + */ + BotMetricsMetadata.prototype.destinationId = null; + + /** + * BotMetricsMetadata destinationEntryPoint. + * @member {proto.BotMetricsEntryPoint|null|undefined} destinationEntryPoint + * @memberof proto.BotMetricsMetadata + * @instance + */ + BotMetricsMetadata.prototype.destinationEntryPoint = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotMetricsMetadata.prototype, "_destinationId", { + get: $util.oneOfGetter($oneOfFields = ["destinationId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotMetricsMetadata.prototype, "_destinationEntryPoint", { + get: $util.oneOfGetter($oneOfFields = ["destinationEntryPoint"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new BotMetricsMetadata instance using the specified properties. + * @function create + * @memberof proto.BotMetricsMetadata + * @static + * @param {proto.IBotMetricsMetadata=} [properties] Properties to set + * @returns {proto.BotMetricsMetadata} BotMetricsMetadata instance + */ + BotMetricsMetadata.create = function create(properties) { + return new BotMetricsMetadata(properties); + }; + + /** + * Encodes the specified BotMetricsMetadata message. Does not implicitly {@link proto.BotMetricsMetadata.verify|verify} messages. + * @function encode + * @memberof proto.BotMetricsMetadata + * @static + * @param {proto.IBotMetricsMetadata} message BotMetricsMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BotMetricsMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.destinationId != null && Object.hasOwnProperty.call(message, "destinationId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.destinationId); + if (message.destinationEntryPoint != null && Object.hasOwnProperty.call(message, "destinationEntryPoint")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.destinationEntryPoint); + return writer; + }; + + /** + * Encodes the specified BotMetricsMetadata message, length delimited. Does not implicitly {@link proto.BotMetricsMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.BotMetricsMetadata + * @static + * @param {proto.IBotMetricsMetadata} message BotMetricsMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BotMetricsMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BotMetricsMetadata message from the specified reader or buffer. + * @function decode + * @memberof proto.BotMetricsMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.BotMetricsMetadata} BotMetricsMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BotMetricsMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.BotMetricsMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.destinationId = reader.string(); + break; + } + case 2: { + message.destinationEntryPoint = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BotMetricsMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.BotMetricsMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.BotMetricsMetadata} BotMetricsMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BotMetricsMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BotMetricsMetadata message. + * @function verify + * @memberof proto.BotMetricsMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BotMetricsMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.destinationId != null && message.hasOwnProperty("destinationId")) { + properties._destinationId = 1; + if (!$util.isString(message.destinationId)) + return "destinationId: string expected"; + } + if (message.destinationEntryPoint != null && message.hasOwnProperty("destinationEntryPoint")) { + properties._destinationEntryPoint = 1; + switch (message.destinationEntryPoint) { + default: + return "destinationEntryPoint: enum value expected"; + 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: + break; + } + } + return null; + }; + + /** + * Creates a BotMetricsMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.BotMetricsMetadata + * @static + * @param {Object.} object Plain object + * @returns {proto.BotMetricsMetadata} BotMetricsMetadata + */ + BotMetricsMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.proto.BotMetricsMetadata) + return object; + var message = new $root.proto.BotMetricsMetadata(); + if (object.destinationId != null) + message.destinationId = String(object.destinationId); + switch (object.destinationEntryPoint) { + default: + if (typeof object.destinationEntryPoint === "number") { + message.destinationEntryPoint = object.destinationEntryPoint; + break; + } + break; + case "FAVICON": + case 1: + message.destinationEntryPoint = 1; + break; + case "CHATLIST": + case 2: + message.destinationEntryPoint = 2; + break; + case "AISEARCH_NULL_STATE_PAPER_PLANE": + case 3: + message.destinationEntryPoint = 3; + break; + case "AISEARCH_NULL_STATE_SUGGESTION": + case 4: + message.destinationEntryPoint = 4; + break; + case "AISEARCH_TYPE_AHEAD_SUGGESTION": + case 5: + message.destinationEntryPoint = 5; + break; + case "AISEARCH_TYPE_AHEAD_PAPER_PLANE": + case 6: + message.destinationEntryPoint = 6; + break; + case "AISEARCH_TYPE_AHEAD_RESULT_CHATLIST": + case 7: + message.destinationEntryPoint = 7; + break; + case "AISEARCH_TYPE_AHEAD_RESULT_MESSAGES": + case 8: + message.destinationEntryPoint = 8; + break; + case "AIVOICE_SEARCH_BAR": + case 9: + message.destinationEntryPoint = 9; + break; + case "AIVOICE_FAVICON": + case 10: + message.destinationEntryPoint = 10; + break; + case "AISTUDIO": + case 11: + message.destinationEntryPoint = 11; + break; + case "DEEPLINK": + case 12: + message.destinationEntryPoint = 12; + break; + case "NOTIFICATION": + case 13: + message.destinationEntryPoint = 13; + break; + case "PROFILE_MESSAGE_BUTTON": + case 14: + message.destinationEntryPoint = 14; + break; + case "FORWARD": + case 15: + message.destinationEntryPoint = 15; + break; + case "APP_SHORTCUT": + case 16: + message.destinationEntryPoint = 16; + break; + case "FF_FAMILY": + case 17: + message.destinationEntryPoint = 17; + break; + } + return message; + }; + + /** + * Creates a plain object from a BotMetricsMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.BotMetricsMetadata + * @static + * @param {proto.BotMetricsMetadata} message BotMetricsMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BotMetricsMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.destinationId != null && message.hasOwnProperty("destinationId")) { + object.destinationId = message.destinationId; + if (options.oneofs) + object._destinationId = "destinationId"; + } + if (message.destinationEntryPoint != null && message.hasOwnProperty("destinationEntryPoint")) { + object.destinationEntryPoint = options.enums === String ? $root.proto.BotMetricsEntryPoint[message.destinationEntryPoint] === undefined ? message.destinationEntryPoint : $root.proto.BotMetricsEntryPoint[message.destinationEntryPoint] : message.destinationEntryPoint; + if (options.oneofs) + object._destinationEntryPoint = "destinationEntryPoint"; + } + return object; + }; + + /** + * Converts this BotMetricsMetadata to JSON. + * @function toJSON + * @memberof proto.BotMetricsMetadata + * @instance + * @returns {Object.} JSON object + */ + BotMetricsMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BotMetricsMetadata + * @function getTypeUrl + * @memberof proto.BotMetricsMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BotMetricsMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.BotMetricsMetadata"; + }; + + return BotMetricsMetadata; + })(); + + proto.BotModelMetadata = (function() { + + /** + * Properties of a BotModelMetadata. + * @memberof proto + * @interface IBotModelMetadata + * @property {proto.BotModelMetadata.ModelType|null} [modelType] BotModelMetadata modelType + * @property {proto.BotModelMetadata.PremiumModelStatus|null} [premiumModelStatus] BotModelMetadata premiumModelStatus + */ + + /** + * Constructs a new BotModelMetadata. + * @memberof proto + * @classdesc Represents a BotModelMetadata. + * @implements IBotModelMetadata + * @constructor + * @param {proto.IBotModelMetadata=} [properties] Properties to set + */ + function BotModelMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BotModelMetadata modelType. + * @member {proto.BotModelMetadata.ModelType|null|undefined} modelType + * @memberof proto.BotModelMetadata + * @instance + */ + BotModelMetadata.prototype.modelType = null; + + /** + * BotModelMetadata premiumModelStatus. + * @member {proto.BotModelMetadata.PremiumModelStatus|null|undefined} premiumModelStatus + * @memberof proto.BotModelMetadata + * @instance + */ + BotModelMetadata.prototype.premiumModelStatus = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotModelMetadata.prototype, "_modelType", { + get: $util.oneOfGetter($oneOfFields = ["modelType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotModelMetadata.prototype, "_premiumModelStatus", { + get: $util.oneOfGetter($oneOfFields = ["premiumModelStatus"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new BotModelMetadata instance using the specified properties. + * @function create + * @memberof proto.BotModelMetadata + * @static + * @param {proto.IBotModelMetadata=} [properties] Properties to set + * @returns {proto.BotModelMetadata} BotModelMetadata instance + */ + BotModelMetadata.create = function create(properties) { + return new BotModelMetadata(properties); + }; + + /** + * Encodes the specified BotModelMetadata message. Does not implicitly {@link proto.BotModelMetadata.verify|verify} messages. + * @function encode + * @memberof proto.BotModelMetadata + * @static + * @param {proto.IBotModelMetadata} message BotModelMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BotModelMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.modelType != null && Object.hasOwnProperty.call(message, "modelType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.modelType); + if (message.premiumModelStatus != null && Object.hasOwnProperty.call(message, "premiumModelStatus")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.premiumModelStatus); + return writer; + }; + + /** + * Encodes the specified BotModelMetadata message, length delimited. Does not implicitly {@link proto.BotModelMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.BotModelMetadata + * @static + * @param {proto.IBotModelMetadata} message BotModelMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BotModelMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BotModelMetadata message from the specified reader or buffer. + * @function decode + * @memberof proto.BotModelMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.BotModelMetadata} BotModelMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BotModelMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.BotModelMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.modelType = reader.int32(); + break; + } + case 2: { + message.premiumModelStatus = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BotModelMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.BotModelMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.BotModelMetadata} BotModelMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BotModelMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BotModelMetadata message. + * @function verify + * @memberof proto.BotModelMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BotModelMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.modelType != null && message.hasOwnProperty("modelType")) { + properties._modelType = 1; + switch (message.modelType) { + default: + return "modelType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.premiumModelStatus != null && message.hasOwnProperty("premiumModelStatus")) { + properties._premiumModelStatus = 1; + switch (message.premiumModelStatus) { + default: + return "premiumModelStatus: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + return null; + }; + + /** + * Creates a BotModelMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.BotModelMetadata + * @static + * @param {Object.} object Plain object + * @returns {proto.BotModelMetadata} BotModelMetadata + */ + BotModelMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.proto.BotModelMetadata) + return object; + var message = new $root.proto.BotModelMetadata(); + switch (object.modelType) { + default: + if (typeof object.modelType === "number") { + message.modelType = object.modelType; + break; + } + break; + case "UNKNOWN_TYPE": + case 0: + message.modelType = 0; + break; + case "LLAMA_PROD": + case 1: + message.modelType = 1; + break; + case "LLAMA_PROD_PREMIUM": + case 2: + message.modelType = 2; + break; + } + switch (object.premiumModelStatus) { + default: + if (typeof object.premiumModelStatus === "number") { + message.premiumModelStatus = object.premiumModelStatus; + break; + } + break; + case "UNKNOWN_STATUS": + case 0: + message.premiumModelStatus = 0; + break; + case "AVAILABLE": + case 1: + message.premiumModelStatus = 1; + break; + case "QUOTA_EXCEED_LIMIT": + case 2: + message.premiumModelStatus = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a BotModelMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.BotModelMetadata + * @static + * @param {proto.BotModelMetadata} message BotModelMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BotModelMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.modelType != null && message.hasOwnProperty("modelType")) { + object.modelType = options.enums === String ? $root.proto.BotModelMetadata.ModelType[message.modelType] === undefined ? message.modelType : $root.proto.BotModelMetadata.ModelType[message.modelType] : message.modelType; + if (options.oneofs) + object._modelType = "modelType"; + } + if (message.premiumModelStatus != null && message.hasOwnProperty("premiumModelStatus")) { + object.premiumModelStatus = options.enums === String ? $root.proto.BotModelMetadata.PremiumModelStatus[message.premiumModelStatus] === undefined ? message.premiumModelStatus : $root.proto.BotModelMetadata.PremiumModelStatus[message.premiumModelStatus] : message.premiumModelStatus; + if (options.oneofs) + object._premiumModelStatus = "premiumModelStatus"; + } + return object; + }; + + /** + * Converts this BotModelMetadata to JSON. + * @function toJSON + * @memberof proto.BotModelMetadata + * @instance + * @returns {Object.} JSON object + */ + BotModelMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BotModelMetadata + * @function getTypeUrl + * @memberof proto.BotModelMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BotModelMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.BotModelMetadata"; + }; + + /** + * ModelType enum. + * @name proto.BotModelMetadata.ModelType + * @enum {number} + * @property {number} UNKNOWN_TYPE=0 UNKNOWN_TYPE value + * @property {number} LLAMA_PROD=1 LLAMA_PROD value + * @property {number} LLAMA_PROD_PREMIUM=2 LLAMA_PROD_PREMIUM value + */ + BotModelMetadata.ModelType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNKNOWN_TYPE"] = 0; + values[valuesById[1] = "LLAMA_PROD"] = 1; + values[valuesById[2] = "LLAMA_PROD_PREMIUM"] = 2; + return values; + })(); + + /** + * PremiumModelStatus enum. + * @name proto.BotModelMetadata.PremiumModelStatus + * @enum {number} + * @property {number} UNKNOWN_STATUS=0 UNKNOWN_STATUS value + * @property {number} AVAILABLE=1 AVAILABLE value + * @property {number} QUOTA_EXCEED_LIMIT=2 QUOTA_EXCEED_LIMIT value + */ + BotModelMetadata.PremiumModelStatus = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNKNOWN_STATUS"] = 0; + values[valuesById[1] = "AVAILABLE"] = 1; + values[valuesById[2] = "QUOTA_EXCEED_LIMIT"] = 2; + return values; + })(); + + return BotModelMetadata; + })(); + proto.BotPluginMetadata = (function() { /** @@ -3780,7 +13949,11 @@ $root.proto = (function() { * @property {string|null} [searchProviderUrl] BotPluginMetadata searchProviderUrl * @property {number|null} [referenceIndex] BotPluginMetadata referenceIndex * @property {number|null} [expectedLinksCount] BotPluginMetadata expectedLinksCount - * @property {number|null} [pluginVersion] BotPluginMetadata pluginVersion + * @property {string|null} [searchQuery] BotPluginMetadata searchQuery + * @property {proto.IMessageKey|null} [parentPluginMessageKey] BotPluginMetadata parentPluginMessageKey + * @property {proto.BotPluginMetadata.PluginType|null} [deprecatedField] BotPluginMetadata deprecatedField + * @property {proto.BotPluginMetadata.PluginType|null} [parentPluginType] BotPluginMetadata parentPluginType + * @property {string|null} [faviconCdnUrl] BotPluginMetadata faviconCdnUrl */ /** @@ -3800,67 +13973,174 @@ $root.proto = (function() { /** * BotPluginMetadata provider. - * @member {proto.BotPluginMetadata.SearchProvider} provider + * @member {proto.BotPluginMetadata.SearchProvider|null|undefined} provider * @memberof proto.BotPluginMetadata * @instance */ - BotPluginMetadata.prototype.provider = 1; + BotPluginMetadata.prototype.provider = null; /** * BotPluginMetadata pluginType. - * @member {proto.BotPluginMetadata.PluginType} pluginType + * @member {proto.BotPluginMetadata.PluginType|null|undefined} pluginType * @memberof proto.BotPluginMetadata * @instance */ - BotPluginMetadata.prototype.pluginType = 1; + BotPluginMetadata.prototype.pluginType = null; /** * BotPluginMetadata thumbnailCdnUrl. - * @member {string} thumbnailCdnUrl + * @member {string|null|undefined} thumbnailCdnUrl * @memberof proto.BotPluginMetadata * @instance */ - BotPluginMetadata.prototype.thumbnailCdnUrl = ""; + BotPluginMetadata.prototype.thumbnailCdnUrl = null; /** * BotPluginMetadata profilePhotoCdnUrl. - * @member {string} profilePhotoCdnUrl + * @member {string|null|undefined} profilePhotoCdnUrl * @memberof proto.BotPluginMetadata * @instance */ - BotPluginMetadata.prototype.profilePhotoCdnUrl = ""; + BotPluginMetadata.prototype.profilePhotoCdnUrl = null; /** * BotPluginMetadata searchProviderUrl. - * @member {string} searchProviderUrl + * @member {string|null|undefined} searchProviderUrl * @memberof proto.BotPluginMetadata * @instance */ - BotPluginMetadata.prototype.searchProviderUrl = ""; + BotPluginMetadata.prototype.searchProviderUrl = null; /** * BotPluginMetadata referenceIndex. - * @member {number} referenceIndex + * @member {number|null|undefined} referenceIndex * @memberof proto.BotPluginMetadata * @instance */ - BotPluginMetadata.prototype.referenceIndex = 0; + BotPluginMetadata.prototype.referenceIndex = null; /** * BotPluginMetadata expectedLinksCount. - * @member {number} expectedLinksCount + * @member {number|null|undefined} expectedLinksCount * @memberof proto.BotPluginMetadata * @instance */ - BotPluginMetadata.prototype.expectedLinksCount = 0; + BotPluginMetadata.prototype.expectedLinksCount = null; /** - * BotPluginMetadata pluginVersion. - * @member {number} pluginVersion + * BotPluginMetadata searchQuery. + * @member {string|null|undefined} searchQuery * @memberof proto.BotPluginMetadata * @instance */ - BotPluginMetadata.prototype.pluginVersion = 0; + BotPluginMetadata.prototype.searchQuery = null; + + /** + * BotPluginMetadata parentPluginMessageKey. + * @member {proto.IMessageKey|null|undefined} parentPluginMessageKey + * @memberof proto.BotPluginMetadata + * @instance + */ + BotPluginMetadata.prototype.parentPluginMessageKey = null; + + /** + * BotPluginMetadata deprecatedField. + * @member {proto.BotPluginMetadata.PluginType|null|undefined} deprecatedField + * @memberof proto.BotPluginMetadata + * @instance + */ + BotPluginMetadata.prototype.deprecatedField = null; + + /** + * BotPluginMetadata parentPluginType. + * @member {proto.BotPluginMetadata.PluginType|null|undefined} parentPluginType + * @memberof proto.BotPluginMetadata + * @instance + */ + BotPluginMetadata.prototype.parentPluginType = null; + + /** + * BotPluginMetadata faviconCdnUrl. + * @member {string|null|undefined} faviconCdnUrl + * @memberof proto.BotPluginMetadata + * @instance + */ + BotPluginMetadata.prototype.faviconCdnUrl = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotPluginMetadata.prototype, "_provider", { + get: $util.oneOfGetter($oneOfFields = ["provider"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotPluginMetadata.prototype, "_pluginType", { + get: $util.oneOfGetter($oneOfFields = ["pluginType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotPluginMetadata.prototype, "_thumbnailCdnUrl", { + get: $util.oneOfGetter($oneOfFields = ["thumbnailCdnUrl"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotPluginMetadata.prototype, "_profilePhotoCdnUrl", { + get: $util.oneOfGetter($oneOfFields = ["profilePhotoCdnUrl"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotPluginMetadata.prototype, "_searchProviderUrl", { + get: $util.oneOfGetter($oneOfFields = ["searchProviderUrl"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotPluginMetadata.prototype, "_referenceIndex", { + get: $util.oneOfGetter($oneOfFields = ["referenceIndex"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotPluginMetadata.prototype, "_expectedLinksCount", { + get: $util.oneOfGetter($oneOfFields = ["expectedLinksCount"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotPluginMetadata.prototype, "_searchQuery", { + get: $util.oneOfGetter($oneOfFields = ["searchQuery"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotPluginMetadata.prototype, "_parentPluginMessageKey", { + get: $util.oneOfGetter($oneOfFields = ["parentPluginMessageKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotPluginMetadata.prototype, "_deprecatedField", { + get: $util.oneOfGetter($oneOfFields = ["deprecatedField"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotPluginMetadata.prototype, "_parentPluginType", { + get: $util.oneOfGetter($oneOfFields = ["parentPluginType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotPluginMetadata.prototype, "_faviconCdnUrl", { + get: $util.oneOfGetter($oneOfFields = ["faviconCdnUrl"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new BotPluginMetadata instance using the specified properties. @@ -3900,8 +14180,16 @@ $root.proto = (function() { writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.referenceIndex); if (message.expectedLinksCount != null && Object.hasOwnProperty.call(message, "expectedLinksCount")) writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.expectedLinksCount); - if (message.pluginVersion != null && Object.hasOwnProperty.call(message, "pluginVersion")) - writer.uint32(/* id 8, wireType 0 =*/64).uint32(message.pluginVersion); + if (message.searchQuery != null && Object.hasOwnProperty.call(message, "searchQuery")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.searchQuery); + if (message.parentPluginMessageKey != null && Object.hasOwnProperty.call(message, "parentPluginMessageKey")) + $root.proto.MessageKey.encode(message.parentPluginMessageKey, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.deprecatedField != null && Object.hasOwnProperty.call(message, "deprecatedField")) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.deprecatedField); + if (message.parentPluginType != null && Object.hasOwnProperty.call(message, "parentPluginType")) + writer.uint32(/* id 12, wireType 0 =*/96).int32(message.parentPluginType); + if (message.faviconCdnUrl != null && Object.hasOwnProperty.call(message, "faviconCdnUrl")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.faviconCdnUrl); return writer; }; @@ -3936,30 +14224,54 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.provider = reader.int32(); - break; - case 2: - message.pluginType = reader.int32(); - break; - case 3: - message.thumbnailCdnUrl = reader.string(); - break; - case 4: - message.profilePhotoCdnUrl = reader.string(); - break; - case 5: - message.searchProviderUrl = reader.string(); - break; - case 6: - message.referenceIndex = reader.uint32(); - break; - case 7: - message.expectedLinksCount = reader.uint32(); - break; - case 8: - message.pluginVersion = reader.uint32(); - break; + case 1: { + message.provider = reader.int32(); + break; + } + case 2: { + message.pluginType = reader.int32(); + break; + } + case 3: { + message.thumbnailCdnUrl = reader.string(); + break; + } + case 4: { + message.profilePhotoCdnUrl = reader.string(); + break; + } + case 5: { + message.searchProviderUrl = reader.string(); + break; + } + case 6: { + message.referenceIndex = reader.uint32(); + break; + } + case 7: { + message.expectedLinksCount = reader.uint32(); + break; + } + case 9: { + message.searchQuery = reader.string(); + break; + } + case 10: { + message.parentPluginMessageKey = $root.proto.MessageKey.decode(reader, reader.uint32()); + break; + } + case 11: { + message.deprecatedField = reader.int32(); + break; + } + case 12: { + message.parentPluginType = reader.int32(); + break; + } + case 13: { + message.faviconCdnUrl = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -3995,40 +14307,95 @@ $root.proto = (function() { BotPluginMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.provider != null && message.hasOwnProperty("provider")) + var properties = {}; + if (message.provider != null && message.hasOwnProperty("provider")) { + properties._provider = 1; switch (message.provider) { default: return "provider: enum value expected"; + case 0: case 1: case 2: + case 3: break; } - if (message.pluginType != null && message.hasOwnProperty("pluginType")) + } + if (message.pluginType != null && message.hasOwnProperty("pluginType")) { + properties._pluginType = 1; switch (message.pluginType) { default: return "pluginType: enum value expected"; + case 0: case 1: case 2: break; } - if (message.thumbnailCdnUrl != null && message.hasOwnProperty("thumbnailCdnUrl")) + } + if (message.thumbnailCdnUrl != null && message.hasOwnProperty("thumbnailCdnUrl")) { + properties._thumbnailCdnUrl = 1; if (!$util.isString(message.thumbnailCdnUrl)) return "thumbnailCdnUrl: string expected"; - if (message.profilePhotoCdnUrl != null && message.hasOwnProperty("profilePhotoCdnUrl")) + } + if (message.profilePhotoCdnUrl != null && message.hasOwnProperty("profilePhotoCdnUrl")) { + properties._profilePhotoCdnUrl = 1; if (!$util.isString(message.profilePhotoCdnUrl)) return "profilePhotoCdnUrl: string expected"; - if (message.searchProviderUrl != null && message.hasOwnProperty("searchProviderUrl")) + } + if (message.searchProviderUrl != null && message.hasOwnProperty("searchProviderUrl")) { + properties._searchProviderUrl = 1; if (!$util.isString(message.searchProviderUrl)) return "searchProviderUrl: string expected"; - if (message.referenceIndex != null && message.hasOwnProperty("referenceIndex")) + } + if (message.referenceIndex != null && message.hasOwnProperty("referenceIndex")) { + properties._referenceIndex = 1; if (!$util.isInteger(message.referenceIndex)) return "referenceIndex: integer expected"; - if (message.expectedLinksCount != null && message.hasOwnProperty("expectedLinksCount")) + } + if (message.expectedLinksCount != null && message.hasOwnProperty("expectedLinksCount")) { + properties._expectedLinksCount = 1; if (!$util.isInteger(message.expectedLinksCount)) return "expectedLinksCount: integer expected"; - if (message.pluginVersion != null && message.hasOwnProperty("pluginVersion")) - if (!$util.isInteger(message.pluginVersion)) - return "pluginVersion: integer expected"; + } + if (message.searchQuery != null && message.hasOwnProperty("searchQuery")) { + properties._searchQuery = 1; + if (!$util.isString(message.searchQuery)) + return "searchQuery: string expected"; + } + if (message.parentPluginMessageKey != null && message.hasOwnProperty("parentPluginMessageKey")) { + properties._parentPluginMessageKey = 1; + { + var error = $root.proto.MessageKey.verify(message.parentPluginMessageKey); + if (error) + return "parentPluginMessageKey." + error; + } + } + if (message.deprecatedField != null && message.hasOwnProperty("deprecatedField")) { + properties._deprecatedField = 1; + switch (message.deprecatedField) { + default: + return "deprecatedField: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.parentPluginType != null && message.hasOwnProperty("parentPluginType")) { + properties._parentPluginType = 1; + switch (message.parentPluginType) { + default: + return "parentPluginType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.faviconCdnUrl != null && message.hasOwnProperty("faviconCdnUrl")) { + properties._faviconCdnUrl = 1; + if (!$util.isString(message.faviconCdnUrl)) + return "faviconCdnUrl: string expected"; + } return null; }; @@ -4045,6 +14412,16 @@ $root.proto = (function() { return object; var message = new $root.proto.BotPluginMetadata(); switch (object.provider) { + default: + if (typeof object.provider === "number") { + message.provider = object.provider; + break; + } + break; + case "UNKNOWN": + case 0: + message.provider = 0; + break; case "BING": case 1: message.provider = 1; @@ -4053,8 +14430,22 @@ $root.proto = (function() { case 2: message.provider = 2; break; + case "SUPPORT": + case 3: + message.provider = 3; + break; } switch (object.pluginType) { + default: + if (typeof object.pluginType === "number") { + message.pluginType = object.pluginType; + break; + } + break; + case "UNKNOWN_PLUGIN": + case 0: + message.pluginType = 0; + break; case "REELS": case 1: message.pluginType = 1; @@ -4074,8 +14465,55 @@ $root.proto = (function() { message.referenceIndex = object.referenceIndex >>> 0; if (object.expectedLinksCount != null) message.expectedLinksCount = object.expectedLinksCount >>> 0; - if (object.pluginVersion != null) - message.pluginVersion = object.pluginVersion >>> 0; + if (object.searchQuery != null) + message.searchQuery = String(object.searchQuery); + if (object.parentPluginMessageKey != null) { + if (typeof object.parentPluginMessageKey !== "object") + throw TypeError(".proto.BotPluginMetadata.parentPluginMessageKey: object expected"); + message.parentPluginMessageKey = $root.proto.MessageKey.fromObject(object.parentPluginMessageKey); + } + switch (object.deprecatedField) { + default: + if (typeof object.deprecatedField === "number") { + message.deprecatedField = object.deprecatedField; + break; + } + break; + case "UNKNOWN_PLUGIN": + case 0: + message.deprecatedField = 0; + break; + case "REELS": + case 1: + message.deprecatedField = 1; + break; + case "SEARCH": + case 2: + message.deprecatedField = 2; + break; + } + switch (object.parentPluginType) { + default: + if (typeof object.parentPluginType === "number") { + message.parentPluginType = object.parentPluginType; + break; + } + break; + case "UNKNOWN_PLUGIN": + case 0: + message.parentPluginType = 0; + break; + case "REELS": + case 1: + message.parentPluginType = 1; + break; + case "SEARCH": + case 2: + message.parentPluginType = 2; + break; + } + if (object.faviconCdnUrl != null) + message.faviconCdnUrl = String(object.faviconCdnUrl); return message; }; @@ -4092,32 +14530,66 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.provider = options.enums === String ? "BING" : 1; - object.pluginType = options.enums === String ? "REELS" : 1; - object.thumbnailCdnUrl = ""; - object.profilePhotoCdnUrl = ""; - object.searchProviderUrl = ""; - object.referenceIndex = 0; - object.expectedLinksCount = 0; - object.pluginVersion = 0; + if (message.provider != null && message.hasOwnProperty("provider")) { + object.provider = options.enums === String ? $root.proto.BotPluginMetadata.SearchProvider[message.provider] === undefined ? message.provider : $root.proto.BotPluginMetadata.SearchProvider[message.provider] : message.provider; + if (options.oneofs) + object._provider = "provider"; } - if (message.provider != null && message.hasOwnProperty("provider")) - object.provider = options.enums === String ? $root.proto.BotPluginMetadata.SearchProvider[message.provider] : message.provider; - if (message.pluginType != null && message.hasOwnProperty("pluginType")) - object.pluginType = options.enums === String ? $root.proto.BotPluginMetadata.PluginType[message.pluginType] : message.pluginType; - if (message.thumbnailCdnUrl != null && message.hasOwnProperty("thumbnailCdnUrl")) + if (message.pluginType != null && message.hasOwnProperty("pluginType")) { + object.pluginType = options.enums === String ? $root.proto.BotPluginMetadata.PluginType[message.pluginType] === undefined ? message.pluginType : $root.proto.BotPluginMetadata.PluginType[message.pluginType] : message.pluginType; + if (options.oneofs) + object._pluginType = "pluginType"; + } + if (message.thumbnailCdnUrl != null && message.hasOwnProperty("thumbnailCdnUrl")) { object.thumbnailCdnUrl = message.thumbnailCdnUrl; - if (message.profilePhotoCdnUrl != null && message.hasOwnProperty("profilePhotoCdnUrl")) + if (options.oneofs) + object._thumbnailCdnUrl = "thumbnailCdnUrl"; + } + if (message.profilePhotoCdnUrl != null && message.hasOwnProperty("profilePhotoCdnUrl")) { object.profilePhotoCdnUrl = message.profilePhotoCdnUrl; - if (message.searchProviderUrl != null && message.hasOwnProperty("searchProviderUrl")) + if (options.oneofs) + object._profilePhotoCdnUrl = "profilePhotoCdnUrl"; + } + if (message.searchProviderUrl != null && message.hasOwnProperty("searchProviderUrl")) { object.searchProviderUrl = message.searchProviderUrl; - if (message.referenceIndex != null && message.hasOwnProperty("referenceIndex")) + if (options.oneofs) + object._searchProviderUrl = "searchProviderUrl"; + } + if (message.referenceIndex != null && message.hasOwnProperty("referenceIndex")) { object.referenceIndex = message.referenceIndex; - if (message.expectedLinksCount != null && message.hasOwnProperty("expectedLinksCount")) + if (options.oneofs) + object._referenceIndex = "referenceIndex"; + } + if (message.expectedLinksCount != null && message.hasOwnProperty("expectedLinksCount")) { object.expectedLinksCount = message.expectedLinksCount; - if (message.pluginVersion != null && message.hasOwnProperty("pluginVersion")) - object.pluginVersion = message.pluginVersion; + if (options.oneofs) + object._expectedLinksCount = "expectedLinksCount"; + } + if (message.searchQuery != null && message.hasOwnProperty("searchQuery")) { + object.searchQuery = message.searchQuery; + if (options.oneofs) + object._searchQuery = "searchQuery"; + } + if (message.parentPluginMessageKey != null && message.hasOwnProperty("parentPluginMessageKey")) { + object.parentPluginMessageKey = $root.proto.MessageKey.toObject(message.parentPluginMessageKey, options); + if (options.oneofs) + object._parentPluginMessageKey = "parentPluginMessageKey"; + } + if (message.deprecatedField != null && message.hasOwnProperty("deprecatedField")) { + object.deprecatedField = options.enums === String ? $root.proto.BotPluginMetadata.PluginType[message.deprecatedField] === undefined ? message.deprecatedField : $root.proto.BotPluginMetadata.PluginType[message.deprecatedField] : message.deprecatedField; + if (options.oneofs) + object._deprecatedField = "deprecatedField"; + } + if (message.parentPluginType != null && message.hasOwnProperty("parentPluginType")) { + object.parentPluginType = options.enums === String ? $root.proto.BotPluginMetadata.PluginType[message.parentPluginType] === undefined ? message.parentPluginType : $root.proto.BotPluginMetadata.PluginType[message.parentPluginType] : message.parentPluginType; + if (options.oneofs) + object._parentPluginType = "parentPluginType"; + } + if (message.faviconCdnUrl != null && message.hasOwnProperty("faviconCdnUrl")) { + object.faviconCdnUrl = message.faviconCdnUrl; + if (options.oneofs) + object._faviconCdnUrl = "faviconCdnUrl"; + } return object; }; @@ -4132,15 +14604,32 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for BotPluginMetadata + * @function getTypeUrl + * @memberof proto.BotPluginMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BotPluginMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.BotPluginMetadata"; + }; + /** * PluginType enum. * @name proto.BotPluginMetadata.PluginType * @enum {number} + * @property {number} UNKNOWN_PLUGIN=0 UNKNOWN_PLUGIN value * @property {number} REELS=1 REELS value * @property {number} SEARCH=2 SEARCH value */ BotPluginMetadata.PluginType = (function() { var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNKNOWN_PLUGIN"] = 0; values[valuesById[1] = "REELS"] = 1; values[valuesById[2] = "SEARCH"] = 2; return values; @@ -4150,19 +14639,2788 @@ $root.proto = (function() { * SearchProvider enum. * @name proto.BotPluginMetadata.SearchProvider * @enum {number} + * @property {number} UNKNOWN=0 UNKNOWN value * @property {number} BING=1 BING value * @property {number} GOOGLE=2 GOOGLE value + * @property {number} SUPPORT=3 SUPPORT value */ BotPluginMetadata.SearchProvider = (function() { var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNKNOWN"] = 0; values[valuesById[1] = "BING"] = 1; values[valuesById[2] = "GOOGLE"] = 2; + values[valuesById[3] = "SUPPORT"] = 3; return values; })(); return BotPluginMetadata; })(); + proto.BotProgressIndicatorMetadata = (function() { + + /** + * Properties of a BotProgressIndicatorMetadata. + * @memberof proto + * @interface IBotProgressIndicatorMetadata + * @property {string|null} [progressDescription] BotProgressIndicatorMetadata progressDescription + * @property {Array.|null} [stepsMetadata] BotProgressIndicatorMetadata stepsMetadata + */ + + /** + * Constructs a new BotProgressIndicatorMetadata. + * @memberof proto + * @classdesc Represents a BotProgressIndicatorMetadata. + * @implements IBotProgressIndicatorMetadata + * @constructor + * @param {proto.IBotProgressIndicatorMetadata=} [properties] Properties to set + */ + function BotProgressIndicatorMetadata(properties) { + this.stepsMetadata = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BotProgressIndicatorMetadata progressDescription. + * @member {string|null|undefined} progressDescription + * @memberof proto.BotProgressIndicatorMetadata + * @instance + */ + BotProgressIndicatorMetadata.prototype.progressDescription = null; + + /** + * BotProgressIndicatorMetadata stepsMetadata. + * @member {Array.} stepsMetadata + * @memberof proto.BotProgressIndicatorMetadata + * @instance + */ + BotProgressIndicatorMetadata.prototype.stepsMetadata = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotProgressIndicatorMetadata.prototype, "_progressDescription", { + get: $util.oneOfGetter($oneOfFields = ["progressDescription"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new BotProgressIndicatorMetadata instance using the specified properties. + * @function create + * @memberof proto.BotProgressIndicatorMetadata + * @static + * @param {proto.IBotProgressIndicatorMetadata=} [properties] Properties to set + * @returns {proto.BotProgressIndicatorMetadata} BotProgressIndicatorMetadata instance + */ + BotProgressIndicatorMetadata.create = function create(properties) { + return new BotProgressIndicatorMetadata(properties); + }; + + /** + * Encodes the specified BotProgressIndicatorMetadata message. Does not implicitly {@link proto.BotProgressIndicatorMetadata.verify|verify} messages. + * @function encode + * @memberof proto.BotProgressIndicatorMetadata + * @static + * @param {proto.IBotProgressIndicatorMetadata} message BotProgressIndicatorMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BotProgressIndicatorMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.progressDescription != null && Object.hasOwnProperty.call(message, "progressDescription")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.progressDescription); + if (message.stepsMetadata != null && message.stepsMetadata.length) + for (var i = 0; i < message.stepsMetadata.length; ++i) + $root.proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.encode(message.stepsMetadata[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BotProgressIndicatorMetadata message, length delimited. Does not implicitly {@link proto.BotProgressIndicatorMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.BotProgressIndicatorMetadata + * @static + * @param {proto.IBotProgressIndicatorMetadata} message BotProgressIndicatorMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BotProgressIndicatorMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BotProgressIndicatorMetadata message from the specified reader or buffer. + * @function decode + * @memberof proto.BotProgressIndicatorMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.BotProgressIndicatorMetadata} BotProgressIndicatorMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BotProgressIndicatorMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.BotProgressIndicatorMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.progressDescription = reader.string(); + break; + } + case 2: { + if (!(message.stepsMetadata && message.stepsMetadata.length)) + message.stepsMetadata = []; + message.stepsMetadata.push($root.proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BotProgressIndicatorMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.BotProgressIndicatorMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.BotProgressIndicatorMetadata} BotProgressIndicatorMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BotProgressIndicatorMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BotProgressIndicatorMetadata message. + * @function verify + * @memberof proto.BotProgressIndicatorMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BotProgressIndicatorMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.progressDescription != null && message.hasOwnProperty("progressDescription")) { + properties._progressDescription = 1; + if (!$util.isString(message.progressDescription)) + return "progressDescription: string expected"; + } + if (message.stepsMetadata != null && message.hasOwnProperty("stepsMetadata")) { + if (!Array.isArray(message.stepsMetadata)) + return "stepsMetadata: array expected"; + for (var i = 0; i < message.stepsMetadata.length; ++i) { + var error = $root.proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.verify(message.stepsMetadata[i]); + if (error) + return "stepsMetadata." + error; + } + } + return null; + }; + + /** + * Creates a BotProgressIndicatorMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.BotProgressIndicatorMetadata + * @static + * @param {Object.} object Plain object + * @returns {proto.BotProgressIndicatorMetadata} BotProgressIndicatorMetadata + */ + BotProgressIndicatorMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.proto.BotProgressIndicatorMetadata) + return object; + var message = new $root.proto.BotProgressIndicatorMetadata(); + if (object.progressDescription != null) + message.progressDescription = String(object.progressDescription); + if (object.stepsMetadata) { + if (!Array.isArray(object.stepsMetadata)) + throw TypeError(".proto.BotProgressIndicatorMetadata.stepsMetadata: array expected"); + message.stepsMetadata = []; + for (var i = 0; i < object.stepsMetadata.length; ++i) { + if (typeof object.stepsMetadata[i] !== "object") + throw TypeError(".proto.BotProgressIndicatorMetadata.stepsMetadata: object expected"); + message.stepsMetadata[i] = $root.proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.fromObject(object.stepsMetadata[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a BotProgressIndicatorMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.BotProgressIndicatorMetadata + * @static + * @param {proto.BotProgressIndicatorMetadata} message BotProgressIndicatorMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BotProgressIndicatorMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.stepsMetadata = []; + if (message.progressDescription != null && message.hasOwnProperty("progressDescription")) { + object.progressDescription = message.progressDescription; + if (options.oneofs) + object._progressDescription = "progressDescription"; + } + if (message.stepsMetadata && message.stepsMetadata.length) { + object.stepsMetadata = []; + for (var j = 0; j < message.stepsMetadata.length; ++j) + object.stepsMetadata[j] = $root.proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.toObject(message.stepsMetadata[j], options); + } + return object; + }; + + /** + * Converts this BotProgressIndicatorMetadata to JSON. + * @function toJSON + * @memberof proto.BotProgressIndicatorMetadata + * @instance + * @returns {Object.} JSON object + */ + BotProgressIndicatorMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BotProgressIndicatorMetadata + * @function getTypeUrl + * @memberof proto.BotProgressIndicatorMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BotProgressIndicatorMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.BotProgressIndicatorMetadata"; + }; + + BotProgressIndicatorMetadata.BotPlanningStepMetadata = (function() { + + /** + * Properties of a BotPlanningStepMetadata. + * @memberof proto.BotProgressIndicatorMetadata + * @interface IBotPlanningStepMetadata + * @property {string|null} [statusTitle] BotPlanningStepMetadata statusTitle + * @property {string|null} [statusBody] BotPlanningStepMetadata statusBody + * @property {Array.|null} [sourcesMetadata] BotPlanningStepMetadata sourcesMetadata + * @property {proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.PlanningStepStatus|null} [status] BotPlanningStepMetadata status + * @property {boolean|null} [isReasoning] BotPlanningStepMetadata isReasoning + * @property {boolean|null} [isEnhancedSearch] BotPlanningStepMetadata isEnhancedSearch + */ + + /** + * Constructs a new BotPlanningStepMetadata. + * @memberof proto.BotProgressIndicatorMetadata + * @classdesc Represents a BotPlanningStepMetadata. + * @implements IBotPlanningStepMetadata + * @constructor + * @param {proto.BotProgressIndicatorMetadata.IBotPlanningStepMetadata=} [properties] Properties to set + */ + function BotPlanningStepMetadata(properties) { + this.sourcesMetadata = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BotPlanningStepMetadata statusTitle. + * @member {string|null|undefined} statusTitle + * @memberof proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata + * @instance + */ + BotPlanningStepMetadata.prototype.statusTitle = null; + + /** + * BotPlanningStepMetadata statusBody. + * @member {string|null|undefined} statusBody + * @memberof proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata + * @instance + */ + BotPlanningStepMetadata.prototype.statusBody = null; + + /** + * BotPlanningStepMetadata sourcesMetadata. + * @member {Array.} sourcesMetadata + * @memberof proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata + * @instance + */ + BotPlanningStepMetadata.prototype.sourcesMetadata = $util.emptyArray; + + /** + * BotPlanningStepMetadata status. + * @member {proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.PlanningStepStatus|null|undefined} status + * @memberof proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata + * @instance + */ + BotPlanningStepMetadata.prototype.status = null; + + /** + * BotPlanningStepMetadata isReasoning. + * @member {boolean|null|undefined} isReasoning + * @memberof proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata + * @instance + */ + BotPlanningStepMetadata.prototype.isReasoning = null; + + /** + * BotPlanningStepMetadata isEnhancedSearch. + * @member {boolean|null|undefined} isEnhancedSearch + * @memberof proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata + * @instance + */ + BotPlanningStepMetadata.prototype.isEnhancedSearch = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotPlanningStepMetadata.prototype, "_statusTitle", { + get: $util.oneOfGetter($oneOfFields = ["statusTitle"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotPlanningStepMetadata.prototype, "_statusBody", { + get: $util.oneOfGetter($oneOfFields = ["statusBody"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotPlanningStepMetadata.prototype, "_status", { + get: $util.oneOfGetter($oneOfFields = ["status"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotPlanningStepMetadata.prototype, "_isReasoning", { + get: $util.oneOfGetter($oneOfFields = ["isReasoning"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotPlanningStepMetadata.prototype, "_isEnhancedSearch", { + get: $util.oneOfGetter($oneOfFields = ["isEnhancedSearch"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new BotPlanningStepMetadata instance using the specified properties. + * @function create + * @memberof proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata + * @static + * @param {proto.BotProgressIndicatorMetadata.IBotPlanningStepMetadata=} [properties] Properties to set + * @returns {proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata} BotPlanningStepMetadata instance + */ + BotPlanningStepMetadata.create = function create(properties) { + return new BotPlanningStepMetadata(properties); + }; + + /** + * Encodes the specified BotPlanningStepMetadata message. Does not implicitly {@link proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.verify|verify} messages. + * @function encode + * @memberof proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata + * @static + * @param {proto.BotProgressIndicatorMetadata.IBotPlanningStepMetadata} message BotPlanningStepMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BotPlanningStepMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.statusTitle != null && Object.hasOwnProperty.call(message, "statusTitle")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.statusTitle); + if (message.statusBody != null && Object.hasOwnProperty.call(message, "statusBody")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.statusBody); + if (message.sourcesMetadata != null && message.sourcesMetadata.length) + for (var i = 0; i < message.sourcesMetadata.length; ++i) + $root.proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata.encode(message.sourcesMetadata[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.status); + if (message.isReasoning != null && Object.hasOwnProperty.call(message, "isReasoning")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.isReasoning); + if (message.isEnhancedSearch != null && Object.hasOwnProperty.call(message, "isEnhancedSearch")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.isEnhancedSearch); + return writer; + }; + + /** + * Encodes the specified BotPlanningStepMetadata message, length delimited. Does not implicitly {@link proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata + * @static + * @param {proto.BotProgressIndicatorMetadata.IBotPlanningStepMetadata} message BotPlanningStepMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BotPlanningStepMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BotPlanningStepMetadata message from the specified reader or buffer. + * @function decode + * @memberof proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata} BotPlanningStepMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BotPlanningStepMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.statusTitle = reader.string(); + break; + } + case 2: { + message.statusBody = reader.string(); + break; + } + case 3: { + if (!(message.sourcesMetadata && message.sourcesMetadata.length)) + message.sourcesMetadata = []; + message.sourcesMetadata.push($root.proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata.decode(reader, reader.uint32())); + break; + } + case 4: { + message.status = reader.int32(); + break; + } + case 5: { + message.isReasoning = reader.bool(); + break; + } + case 6: { + message.isEnhancedSearch = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BotPlanningStepMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata} BotPlanningStepMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BotPlanningStepMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BotPlanningStepMetadata message. + * @function verify + * @memberof proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BotPlanningStepMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.statusTitle != null && message.hasOwnProperty("statusTitle")) { + properties._statusTitle = 1; + if (!$util.isString(message.statusTitle)) + return "statusTitle: string expected"; + } + if (message.statusBody != null && message.hasOwnProperty("statusBody")) { + properties._statusBody = 1; + if (!$util.isString(message.statusBody)) + return "statusBody: string expected"; + } + if (message.sourcesMetadata != null && message.hasOwnProperty("sourcesMetadata")) { + if (!Array.isArray(message.sourcesMetadata)) + return "sourcesMetadata: array expected"; + for (var i = 0; i < message.sourcesMetadata.length; ++i) { + var error = $root.proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata.verify(message.sourcesMetadata[i]); + if (error) + return "sourcesMetadata." + error; + } + } + if (message.status != null && message.hasOwnProperty("status")) { + properties._status = 1; + switch (message.status) { + default: + return "status: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + } + if (message.isReasoning != null && message.hasOwnProperty("isReasoning")) { + properties._isReasoning = 1; + if (typeof message.isReasoning !== "boolean") + return "isReasoning: boolean expected"; + } + if (message.isEnhancedSearch != null && message.hasOwnProperty("isEnhancedSearch")) { + properties._isEnhancedSearch = 1; + if (typeof message.isEnhancedSearch !== "boolean") + return "isEnhancedSearch: boolean expected"; + } + return null; + }; + + /** + * Creates a BotPlanningStepMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata + * @static + * @param {Object.} object Plain object + * @returns {proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata} BotPlanningStepMetadata + */ + BotPlanningStepMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata) + return object; + var message = new $root.proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata(); + if (object.statusTitle != null) + message.statusTitle = String(object.statusTitle); + if (object.statusBody != null) + message.statusBody = String(object.statusBody); + if (object.sourcesMetadata) { + if (!Array.isArray(object.sourcesMetadata)) + throw TypeError(".proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.sourcesMetadata: array expected"); + message.sourcesMetadata = []; + for (var i = 0; i < object.sourcesMetadata.length; ++i) { + if (typeof object.sourcesMetadata[i] !== "object") + throw TypeError(".proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.sourcesMetadata: object expected"); + message.sourcesMetadata[i] = $root.proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata.fromObject(object.sourcesMetadata[i]); + } + } + switch (object.status) { + default: + if (typeof object.status === "number") { + message.status = object.status; + break; + } + break; + case "UNKNOWN": + case 0: + message.status = 0; + break; + case "PLANNED": + case 1: + message.status = 1; + break; + case "EXECUTING": + case 2: + message.status = 2; + break; + case "FINISHED": + case 3: + message.status = 3; + break; + } + if (object.isReasoning != null) + message.isReasoning = Boolean(object.isReasoning); + if (object.isEnhancedSearch != null) + message.isEnhancedSearch = Boolean(object.isEnhancedSearch); + return message; + }; + + /** + * Creates a plain object from a BotPlanningStepMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata + * @static + * @param {proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata} message BotPlanningStepMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BotPlanningStepMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.sourcesMetadata = []; + if (message.statusTitle != null && message.hasOwnProperty("statusTitle")) { + object.statusTitle = message.statusTitle; + if (options.oneofs) + object._statusTitle = "statusTitle"; + } + if (message.statusBody != null && message.hasOwnProperty("statusBody")) { + object.statusBody = message.statusBody; + if (options.oneofs) + object._statusBody = "statusBody"; + } + if (message.sourcesMetadata && message.sourcesMetadata.length) { + object.sourcesMetadata = []; + for (var j = 0; j < message.sourcesMetadata.length; ++j) + object.sourcesMetadata[j] = $root.proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata.toObject(message.sourcesMetadata[j], options); + } + if (message.status != null && message.hasOwnProperty("status")) { + object.status = options.enums === String ? $root.proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.PlanningStepStatus[message.status] === undefined ? message.status : $root.proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.PlanningStepStatus[message.status] : message.status; + if (options.oneofs) + object._status = "status"; + } + if (message.isReasoning != null && message.hasOwnProperty("isReasoning")) { + object.isReasoning = message.isReasoning; + if (options.oneofs) + object._isReasoning = "isReasoning"; + } + if (message.isEnhancedSearch != null && message.hasOwnProperty("isEnhancedSearch")) { + object.isEnhancedSearch = message.isEnhancedSearch; + if (options.oneofs) + object._isEnhancedSearch = "isEnhancedSearch"; + } + return object; + }; + + /** + * Converts this BotPlanningStepMetadata to JSON. + * @function toJSON + * @memberof proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata + * @instance + * @returns {Object.} JSON object + */ + BotPlanningStepMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BotPlanningStepMetadata + * @function getTypeUrl + * @memberof proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BotPlanningStepMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata"; + }; + + BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata = (function() { + + /** + * Properties of a BotPlanningSearchSourcesMetadata. + * @memberof proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata + * @interface IBotPlanningSearchSourcesMetadata + * @property {string|null} [sourceTitle] BotPlanningSearchSourcesMetadata sourceTitle + * @property {proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata.BotPlanningSearchSourceProvider|null} [provider] BotPlanningSearchSourcesMetadata provider + * @property {string|null} [sourceUrl] BotPlanningSearchSourcesMetadata sourceUrl + */ + + /** + * Constructs a new BotPlanningSearchSourcesMetadata. + * @memberof proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata + * @classdesc Represents a BotPlanningSearchSourcesMetadata. + * @implements IBotPlanningSearchSourcesMetadata + * @constructor + * @param {proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.IBotPlanningSearchSourcesMetadata=} [properties] Properties to set + */ + function BotPlanningSearchSourcesMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BotPlanningSearchSourcesMetadata sourceTitle. + * @member {string|null|undefined} sourceTitle + * @memberof proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata + * @instance + */ + BotPlanningSearchSourcesMetadata.prototype.sourceTitle = null; + + /** + * BotPlanningSearchSourcesMetadata provider. + * @member {proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata.BotPlanningSearchSourceProvider|null|undefined} provider + * @memberof proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata + * @instance + */ + BotPlanningSearchSourcesMetadata.prototype.provider = null; + + /** + * BotPlanningSearchSourcesMetadata sourceUrl. + * @member {string|null|undefined} sourceUrl + * @memberof proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata + * @instance + */ + BotPlanningSearchSourcesMetadata.prototype.sourceUrl = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotPlanningSearchSourcesMetadata.prototype, "_sourceTitle", { + get: $util.oneOfGetter($oneOfFields = ["sourceTitle"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotPlanningSearchSourcesMetadata.prototype, "_provider", { + get: $util.oneOfGetter($oneOfFields = ["provider"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotPlanningSearchSourcesMetadata.prototype, "_sourceUrl", { + get: $util.oneOfGetter($oneOfFields = ["sourceUrl"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new BotPlanningSearchSourcesMetadata instance using the specified properties. + * @function create + * @memberof proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata + * @static + * @param {proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.IBotPlanningSearchSourcesMetadata=} [properties] Properties to set + * @returns {proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata} BotPlanningSearchSourcesMetadata instance + */ + BotPlanningSearchSourcesMetadata.create = function create(properties) { + return new BotPlanningSearchSourcesMetadata(properties); + }; + + /** + * Encodes the specified BotPlanningSearchSourcesMetadata message. Does not implicitly {@link proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata.verify|verify} messages. + * @function encode + * @memberof proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata + * @static + * @param {proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.IBotPlanningSearchSourcesMetadata} message BotPlanningSearchSourcesMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BotPlanningSearchSourcesMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sourceTitle != null && Object.hasOwnProperty.call(message, "sourceTitle")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.sourceTitle); + if (message.provider != null && Object.hasOwnProperty.call(message, "provider")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.provider); + if (message.sourceUrl != null && Object.hasOwnProperty.call(message, "sourceUrl")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.sourceUrl); + return writer; + }; + + /** + * Encodes the specified BotPlanningSearchSourcesMetadata message, length delimited. Does not implicitly {@link proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata + * @static + * @param {proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.IBotPlanningSearchSourcesMetadata} message BotPlanningSearchSourcesMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BotPlanningSearchSourcesMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BotPlanningSearchSourcesMetadata message from the specified reader or buffer. + * @function decode + * @memberof proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata} BotPlanningSearchSourcesMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BotPlanningSearchSourcesMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.sourceTitle = reader.string(); + break; + } + case 2: { + message.provider = reader.int32(); + break; + } + case 3: { + message.sourceUrl = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BotPlanningSearchSourcesMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata} BotPlanningSearchSourcesMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BotPlanningSearchSourcesMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BotPlanningSearchSourcesMetadata message. + * @function verify + * @memberof proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BotPlanningSearchSourcesMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.sourceTitle != null && message.hasOwnProperty("sourceTitle")) { + properties._sourceTitle = 1; + if (!$util.isString(message.sourceTitle)) + return "sourceTitle: string expected"; + } + if (message.provider != null && message.hasOwnProperty("provider")) { + properties._provider = 1; + switch (message.provider) { + default: + return "provider: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + } + if (message.sourceUrl != null && message.hasOwnProperty("sourceUrl")) { + properties._sourceUrl = 1; + if (!$util.isString(message.sourceUrl)) + return "sourceUrl: string expected"; + } + return null; + }; + + /** + * Creates a BotPlanningSearchSourcesMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata + * @static + * @param {Object.} object Plain object + * @returns {proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata} BotPlanningSearchSourcesMetadata + */ + BotPlanningSearchSourcesMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata) + return object; + var message = new $root.proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata(); + if (object.sourceTitle != null) + message.sourceTitle = String(object.sourceTitle); + switch (object.provider) { + default: + if (typeof object.provider === "number") { + message.provider = object.provider; + break; + } + break; + case "UNKNOWN": + case 0: + message.provider = 0; + break; + case "OTHER": + case 1: + message.provider = 1; + break; + case "GOOGLE": + case 2: + message.provider = 2; + break; + case "BING": + case 3: + message.provider = 3; + break; + } + if (object.sourceUrl != null) + message.sourceUrl = String(object.sourceUrl); + return message; + }; + + /** + * Creates a plain object from a BotPlanningSearchSourcesMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata + * @static + * @param {proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata} message BotPlanningSearchSourcesMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BotPlanningSearchSourcesMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.sourceTitle != null && message.hasOwnProperty("sourceTitle")) { + object.sourceTitle = message.sourceTitle; + if (options.oneofs) + object._sourceTitle = "sourceTitle"; + } + if (message.provider != null && message.hasOwnProperty("provider")) { + object.provider = options.enums === String ? $root.proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata.BotPlanningSearchSourceProvider[message.provider] === undefined ? message.provider : $root.proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata.BotPlanningSearchSourceProvider[message.provider] : message.provider; + if (options.oneofs) + object._provider = "provider"; + } + if (message.sourceUrl != null && message.hasOwnProperty("sourceUrl")) { + object.sourceUrl = message.sourceUrl; + if (options.oneofs) + object._sourceUrl = "sourceUrl"; + } + return object; + }; + + /** + * Converts this BotPlanningSearchSourcesMetadata to JSON. + * @function toJSON + * @memberof proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata + * @instance + * @returns {Object.} JSON object + */ + BotPlanningSearchSourcesMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BotPlanningSearchSourcesMetadata + * @function getTypeUrl + * @memberof proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BotPlanningSearchSourcesMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata"; + }; + + /** + * BotPlanningSearchSourceProvider enum. + * @name proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata.BotPlanningSearchSourceProvider + * @enum {number} + * @property {number} UNKNOWN=0 UNKNOWN value + * @property {number} OTHER=1 OTHER value + * @property {number} GOOGLE=2 GOOGLE value + * @property {number} BING=3 BING value + */ + BotPlanningSearchSourcesMetadata.BotPlanningSearchSourceProvider = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNKNOWN"] = 0; + values[valuesById[1] = "OTHER"] = 1; + values[valuesById[2] = "GOOGLE"] = 2; + values[valuesById[3] = "BING"] = 3; + return values; + })(); + + return BotPlanningSearchSourcesMetadata; + })(); + + /** + * PlanningStepStatus enum. + * @name proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.PlanningStepStatus + * @enum {number} + * @property {number} UNKNOWN=0 UNKNOWN value + * @property {number} PLANNED=1 PLANNED value + * @property {number} EXECUTING=2 EXECUTING value + * @property {number} FINISHED=3 FINISHED value + */ + BotPlanningStepMetadata.PlanningStepStatus = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNKNOWN"] = 0; + values[valuesById[1] = "PLANNED"] = 1; + values[valuesById[2] = "EXECUTING"] = 2; + values[valuesById[3] = "FINISHED"] = 3; + return values; + })(); + + return BotPlanningStepMetadata; + })(); + + return BotProgressIndicatorMetadata; + })(); + + proto.BotPromptSuggestion = (function() { + + /** + * Properties of a BotPromptSuggestion. + * @memberof proto + * @interface IBotPromptSuggestion + * @property {string|null} [prompt] BotPromptSuggestion prompt + * @property {string|null} [promptId] BotPromptSuggestion promptId + */ + + /** + * Constructs a new BotPromptSuggestion. + * @memberof proto + * @classdesc Represents a BotPromptSuggestion. + * @implements IBotPromptSuggestion + * @constructor + * @param {proto.IBotPromptSuggestion=} [properties] Properties to set + */ + function BotPromptSuggestion(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BotPromptSuggestion prompt. + * @member {string|null|undefined} prompt + * @memberof proto.BotPromptSuggestion + * @instance + */ + BotPromptSuggestion.prototype.prompt = null; + + /** + * BotPromptSuggestion promptId. + * @member {string|null|undefined} promptId + * @memberof proto.BotPromptSuggestion + * @instance + */ + BotPromptSuggestion.prototype.promptId = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotPromptSuggestion.prototype, "_prompt", { + get: $util.oneOfGetter($oneOfFields = ["prompt"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotPromptSuggestion.prototype, "_promptId", { + get: $util.oneOfGetter($oneOfFields = ["promptId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new BotPromptSuggestion instance using the specified properties. + * @function create + * @memberof proto.BotPromptSuggestion + * @static + * @param {proto.IBotPromptSuggestion=} [properties] Properties to set + * @returns {proto.BotPromptSuggestion} BotPromptSuggestion instance + */ + BotPromptSuggestion.create = function create(properties) { + return new BotPromptSuggestion(properties); + }; + + /** + * Encodes the specified BotPromptSuggestion message. Does not implicitly {@link proto.BotPromptSuggestion.verify|verify} messages. + * @function encode + * @memberof proto.BotPromptSuggestion + * @static + * @param {proto.IBotPromptSuggestion} message BotPromptSuggestion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BotPromptSuggestion.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.prompt != null && Object.hasOwnProperty.call(message, "prompt")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.prompt); + if (message.promptId != null && Object.hasOwnProperty.call(message, "promptId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.promptId); + return writer; + }; + + /** + * Encodes the specified BotPromptSuggestion message, length delimited. Does not implicitly {@link proto.BotPromptSuggestion.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.BotPromptSuggestion + * @static + * @param {proto.IBotPromptSuggestion} message BotPromptSuggestion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BotPromptSuggestion.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BotPromptSuggestion message from the specified reader or buffer. + * @function decode + * @memberof proto.BotPromptSuggestion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.BotPromptSuggestion} BotPromptSuggestion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BotPromptSuggestion.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.BotPromptSuggestion(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.prompt = reader.string(); + break; + } + case 2: { + message.promptId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BotPromptSuggestion message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.BotPromptSuggestion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.BotPromptSuggestion} BotPromptSuggestion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BotPromptSuggestion.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BotPromptSuggestion message. + * @function verify + * @memberof proto.BotPromptSuggestion + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BotPromptSuggestion.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.prompt != null && message.hasOwnProperty("prompt")) { + properties._prompt = 1; + if (!$util.isString(message.prompt)) + return "prompt: string expected"; + } + if (message.promptId != null && message.hasOwnProperty("promptId")) { + properties._promptId = 1; + if (!$util.isString(message.promptId)) + return "promptId: string expected"; + } + return null; + }; + + /** + * Creates a BotPromptSuggestion message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.BotPromptSuggestion + * @static + * @param {Object.} object Plain object + * @returns {proto.BotPromptSuggestion} BotPromptSuggestion + */ + BotPromptSuggestion.fromObject = function fromObject(object) { + if (object instanceof $root.proto.BotPromptSuggestion) + return object; + var message = new $root.proto.BotPromptSuggestion(); + if (object.prompt != null) + message.prompt = String(object.prompt); + if (object.promptId != null) + message.promptId = String(object.promptId); + return message; + }; + + /** + * Creates a plain object from a BotPromptSuggestion message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.BotPromptSuggestion + * @static + * @param {proto.BotPromptSuggestion} message BotPromptSuggestion + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BotPromptSuggestion.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.prompt != null && message.hasOwnProperty("prompt")) { + object.prompt = message.prompt; + if (options.oneofs) + object._prompt = "prompt"; + } + if (message.promptId != null && message.hasOwnProperty("promptId")) { + object.promptId = message.promptId; + if (options.oneofs) + object._promptId = "promptId"; + } + return object; + }; + + /** + * Converts this BotPromptSuggestion to JSON. + * @function toJSON + * @memberof proto.BotPromptSuggestion + * @instance + * @returns {Object.} JSON object + */ + BotPromptSuggestion.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BotPromptSuggestion + * @function getTypeUrl + * @memberof proto.BotPromptSuggestion + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BotPromptSuggestion.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.BotPromptSuggestion"; + }; + + return BotPromptSuggestion; + })(); + + proto.BotPromptSuggestions = (function() { + + /** + * Properties of a BotPromptSuggestions. + * @memberof proto + * @interface IBotPromptSuggestions + * @property {Array.|null} [suggestions] BotPromptSuggestions suggestions + */ + + /** + * Constructs a new BotPromptSuggestions. + * @memberof proto + * @classdesc Represents a BotPromptSuggestions. + * @implements IBotPromptSuggestions + * @constructor + * @param {proto.IBotPromptSuggestions=} [properties] Properties to set + */ + function BotPromptSuggestions(properties) { + this.suggestions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BotPromptSuggestions suggestions. + * @member {Array.} suggestions + * @memberof proto.BotPromptSuggestions + * @instance + */ + BotPromptSuggestions.prototype.suggestions = $util.emptyArray; + + /** + * Creates a new BotPromptSuggestions instance using the specified properties. + * @function create + * @memberof proto.BotPromptSuggestions + * @static + * @param {proto.IBotPromptSuggestions=} [properties] Properties to set + * @returns {proto.BotPromptSuggestions} BotPromptSuggestions instance + */ + BotPromptSuggestions.create = function create(properties) { + return new BotPromptSuggestions(properties); + }; + + /** + * Encodes the specified BotPromptSuggestions message. Does not implicitly {@link proto.BotPromptSuggestions.verify|verify} messages. + * @function encode + * @memberof proto.BotPromptSuggestions + * @static + * @param {proto.IBotPromptSuggestions} message BotPromptSuggestions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BotPromptSuggestions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.suggestions != null && message.suggestions.length) + for (var i = 0; i < message.suggestions.length; ++i) + $root.proto.BotPromptSuggestion.encode(message.suggestions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BotPromptSuggestions message, length delimited. Does not implicitly {@link proto.BotPromptSuggestions.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.BotPromptSuggestions + * @static + * @param {proto.IBotPromptSuggestions} message BotPromptSuggestions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BotPromptSuggestions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BotPromptSuggestions message from the specified reader or buffer. + * @function decode + * @memberof proto.BotPromptSuggestions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.BotPromptSuggestions} BotPromptSuggestions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BotPromptSuggestions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.BotPromptSuggestions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.suggestions && message.suggestions.length)) + message.suggestions = []; + message.suggestions.push($root.proto.BotPromptSuggestion.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BotPromptSuggestions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.BotPromptSuggestions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.BotPromptSuggestions} BotPromptSuggestions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BotPromptSuggestions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BotPromptSuggestions message. + * @function verify + * @memberof proto.BotPromptSuggestions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BotPromptSuggestions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.suggestions != null && message.hasOwnProperty("suggestions")) { + if (!Array.isArray(message.suggestions)) + return "suggestions: array expected"; + for (var i = 0; i < message.suggestions.length; ++i) { + var error = $root.proto.BotPromptSuggestion.verify(message.suggestions[i]); + if (error) + return "suggestions." + error; + } + } + return null; + }; + + /** + * Creates a BotPromptSuggestions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.BotPromptSuggestions + * @static + * @param {Object.} object Plain object + * @returns {proto.BotPromptSuggestions} BotPromptSuggestions + */ + BotPromptSuggestions.fromObject = function fromObject(object) { + if (object instanceof $root.proto.BotPromptSuggestions) + return object; + var message = new $root.proto.BotPromptSuggestions(); + if (object.suggestions) { + if (!Array.isArray(object.suggestions)) + throw TypeError(".proto.BotPromptSuggestions.suggestions: array expected"); + message.suggestions = []; + for (var i = 0; i < object.suggestions.length; ++i) { + if (typeof object.suggestions[i] !== "object") + throw TypeError(".proto.BotPromptSuggestions.suggestions: object expected"); + message.suggestions[i] = $root.proto.BotPromptSuggestion.fromObject(object.suggestions[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a BotPromptSuggestions message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.BotPromptSuggestions + * @static + * @param {proto.BotPromptSuggestions} message BotPromptSuggestions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BotPromptSuggestions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.suggestions = []; + if (message.suggestions && message.suggestions.length) { + object.suggestions = []; + for (var j = 0; j < message.suggestions.length; ++j) + object.suggestions[j] = $root.proto.BotPromptSuggestion.toObject(message.suggestions[j], options); + } + return object; + }; + + /** + * Converts this BotPromptSuggestions to JSON. + * @function toJSON + * @memberof proto.BotPromptSuggestions + * @instance + * @returns {Object.} JSON object + */ + BotPromptSuggestions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BotPromptSuggestions + * @function getTypeUrl + * @memberof proto.BotPromptSuggestions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BotPromptSuggestions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.BotPromptSuggestions"; + }; + + return BotPromptSuggestions; + })(); + + proto.BotReminderMetadata = (function() { + + /** + * Properties of a BotReminderMetadata. + * @memberof proto + * @interface IBotReminderMetadata + * @property {proto.IMessageKey|null} [requestMessageKey] BotReminderMetadata requestMessageKey + * @property {proto.BotReminderMetadata.ReminderAction|null} [action] BotReminderMetadata action + * @property {string|null} [name] BotReminderMetadata name + * @property {number|Long|null} [nextTriggerTimestamp] BotReminderMetadata nextTriggerTimestamp + * @property {proto.BotReminderMetadata.ReminderFrequency|null} [frequency] BotReminderMetadata frequency + */ + + /** + * Constructs a new BotReminderMetadata. + * @memberof proto + * @classdesc Represents a BotReminderMetadata. + * @implements IBotReminderMetadata + * @constructor + * @param {proto.IBotReminderMetadata=} [properties] Properties to set + */ + function BotReminderMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BotReminderMetadata requestMessageKey. + * @member {proto.IMessageKey|null|undefined} requestMessageKey + * @memberof proto.BotReminderMetadata + * @instance + */ + BotReminderMetadata.prototype.requestMessageKey = null; + + /** + * BotReminderMetadata action. + * @member {proto.BotReminderMetadata.ReminderAction|null|undefined} action + * @memberof proto.BotReminderMetadata + * @instance + */ + BotReminderMetadata.prototype.action = null; + + /** + * BotReminderMetadata name. + * @member {string|null|undefined} name + * @memberof proto.BotReminderMetadata + * @instance + */ + BotReminderMetadata.prototype.name = null; + + /** + * BotReminderMetadata nextTriggerTimestamp. + * @member {number|Long|null|undefined} nextTriggerTimestamp + * @memberof proto.BotReminderMetadata + * @instance + */ + BotReminderMetadata.prototype.nextTriggerTimestamp = null; + + /** + * BotReminderMetadata frequency. + * @member {proto.BotReminderMetadata.ReminderFrequency|null|undefined} frequency + * @memberof proto.BotReminderMetadata + * @instance + */ + BotReminderMetadata.prototype.frequency = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotReminderMetadata.prototype, "_requestMessageKey", { + get: $util.oneOfGetter($oneOfFields = ["requestMessageKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotReminderMetadata.prototype, "_action", { + get: $util.oneOfGetter($oneOfFields = ["action"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotReminderMetadata.prototype, "_name", { + get: $util.oneOfGetter($oneOfFields = ["name"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotReminderMetadata.prototype, "_nextTriggerTimestamp", { + get: $util.oneOfGetter($oneOfFields = ["nextTriggerTimestamp"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotReminderMetadata.prototype, "_frequency", { + get: $util.oneOfGetter($oneOfFields = ["frequency"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new BotReminderMetadata instance using the specified properties. + * @function create + * @memberof proto.BotReminderMetadata + * @static + * @param {proto.IBotReminderMetadata=} [properties] Properties to set + * @returns {proto.BotReminderMetadata} BotReminderMetadata instance + */ + BotReminderMetadata.create = function create(properties) { + return new BotReminderMetadata(properties); + }; + + /** + * Encodes the specified BotReminderMetadata message. Does not implicitly {@link proto.BotReminderMetadata.verify|verify} messages. + * @function encode + * @memberof proto.BotReminderMetadata + * @static + * @param {proto.IBotReminderMetadata} message BotReminderMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BotReminderMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.requestMessageKey != null && Object.hasOwnProperty.call(message, "requestMessageKey")) + $root.proto.MessageKey.encode(message.requestMessageKey, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.action != null && Object.hasOwnProperty.call(message, "action")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.action); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); + if (message.nextTriggerTimestamp != null && Object.hasOwnProperty.call(message, "nextTriggerTimestamp")) + writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.nextTriggerTimestamp); + if (message.frequency != null && Object.hasOwnProperty.call(message, "frequency")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.frequency); + return writer; + }; + + /** + * Encodes the specified BotReminderMetadata message, length delimited. Does not implicitly {@link proto.BotReminderMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.BotReminderMetadata + * @static + * @param {proto.IBotReminderMetadata} message BotReminderMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BotReminderMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BotReminderMetadata message from the specified reader or buffer. + * @function decode + * @memberof proto.BotReminderMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.BotReminderMetadata} BotReminderMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BotReminderMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.BotReminderMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.requestMessageKey = $root.proto.MessageKey.decode(reader, reader.uint32()); + break; + } + case 2: { + message.action = reader.int32(); + break; + } + case 3: { + message.name = reader.string(); + break; + } + case 4: { + message.nextTriggerTimestamp = reader.uint64(); + break; + } + case 5: { + message.frequency = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BotReminderMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.BotReminderMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.BotReminderMetadata} BotReminderMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BotReminderMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BotReminderMetadata message. + * @function verify + * @memberof proto.BotReminderMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BotReminderMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.requestMessageKey != null && message.hasOwnProperty("requestMessageKey")) { + properties._requestMessageKey = 1; + { + var error = $root.proto.MessageKey.verify(message.requestMessageKey); + if (error) + return "requestMessageKey." + error; + } + } + if (message.action != null && message.hasOwnProperty("action")) { + properties._action = 1; + switch (message.action) { + default: + return "action: enum value expected"; + case 1: + case 2: + case 3: + case 4: + break; + } + } + if (message.name != null && message.hasOwnProperty("name")) { + properties._name = 1; + if (!$util.isString(message.name)) + return "name: string expected"; + } + if (message.nextTriggerTimestamp != null && message.hasOwnProperty("nextTriggerTimestamp")) { + properties._nextTriggerTimestamp = 1; + if (!$util.isInteger(message.nextTriggerTimestamp) && !(message.nextTriggerTimestamp && $util.isInteger(message.nextTriggerTimestamp.low) && $util.isInteger(message.nextTriggerTimestamp.high))) + return "nextTriggerTimestamp: integer|Long expected"; + } + if (message.frequency != null && message.hasOwnProperty("frequency")) { + properties._frequency = 1; + switch (message.frequency) { + default: + return "frequency: enum value expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + } + return null; + }; + + /** + * Creates a BotReminderMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.BotReminderMetadata + * @static + * @param {Object.} object Plain object + * @returns {proto.BotReminderMetadata} BotReminderMetadata + */ + BotReminderMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.proto.BotReminderMetadata) + return object; + var message = new $root.proto.BotReminderMetadata(); + if (object.requestMessageKey != null) { + if (typeof object.requestMessageKey !== "object") + throw TypeError(".proto.BotReminderMetadata.requestMessageKey: object expected"); + message.requestMessageKey = $root.proto.MessageKey.fromObject(object.requestMessageKey); + } + switch (object.action) { + default: + if (typeof object.action === "number") { + message.action = object.action; + break; + } + break; + case "NOTIFY": + case 1: + message.action = 1; + break; + case "CREATE": + case 2: + message.action = 2; + break; + case "DELETE": + case 3: + message.action = 3; + break; + case "UPDATE": + case 4: + message.action = 4; + break; + } + if (object.name != null) + message.name = String(object.name); + if (object.nextTriggerTimestamp != null) + if ($util.Long) + (message.nextTriggerTimestamp = $util.Long.fromValue(object.nextTriggerTimestamp)).unsigned = true; + else if (typeof object.nextTriggerTimestamp === "string") + message.nextTriggerTimestamp = parseInt(object.nextTriggerTimestamp, 10); + else if (typeof object.nextTriggerTimestamp === "number") + message.nextTriggerTimestamp = object.nextTriggerTimestamp; + else if (typeof object.nextTriggerTimestamp === "object") + message.nextTriggerTimestamp = new $util.LongBits(object.nextTriggerTimestamp.low >>> 0, object.nextTriggerTimestamp.high >>> 0).toNumber(true); + switch (object.frequency) { + default: + if (typeof object.frequency === "number") { + message.frequency = object.frequency; + break; + } + break; + case "ONCE": + case 1: + message.frequency = 1; + break; + case "DAILY": + case 2: + message.frequency = 2; + break; + case "WEEKLY": + case 3: + message.frequency = 3; + break; + case "BIWEEKLY": + case 4: + message.frequency = 4; + break; + case "MONTHLY": + case 5: + message.frequency = 5; + break; + } + return message; + }; + + /** + * Creates a plain object from a BotReminderMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.BotReminderMetadata + * @static + * @param {proto.BotReminderMetadata} message BotReminderMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BotReminderMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.requestMessageKey != null && message.hasOwnProperty("requestMessageKey")) { + object.requestMessageKey = $root.proto.MessageKey.toObject(message.requestMessageKey, options); + if (options.oneofs) + object._requestMessageKey = "requestMessageKey"; + } + if (message.action != null && message.hasOwnProperty("action")) { + object.action = options.enums === String ? $root.proto.BotReminderMetadata.ReminderAction[message.action] === undefined ? message.action : $root.proto.BotReminderMetadata.ReminderAction[message.action] : message.action; + if (options.oneofs) + object._action = "action"; + } + if (message.name != null && message.hasOwnProperty("name")) { + object.name = message.name; + if (options.oneofs) + object._name = "name"; + } + if (message.nextTriggerTimestamp != null && message.hasOwnProperty("nextTriggerTimestamp")) { + if (typeof message.nextTriggerTimestamp === "number") + object.nextTriggerTimestamp = options.longs === String ? String(message.nextTriggerTimestamp) : message.nextTriggerTimestamp; + else + object.nextTriggerTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.nextTriggerTimestamp) : options.longs === Number ? new $util.LongBits(message.nextTriggerTimestamp.low >>> 0, message.nextTriggerTimestamp.high >>> 0).toNumber(true) : message.nextTriggerTimestamp; + if (options.oneofs) + object._nextTriggerTimestamp = "nextTriggerTimestamp"; + } + if (message.frequency != null && message.hasOwnProperty("frequency")) { + object.frequency = options.enums === String ? $root.proto.BotReminderMetadata.ReminderFrequency[message.frequency] === undefined ? message.frequency : $root.proto.BotReminderMetadata.ReminderFrequency[message.frequency] : message.frequency; + if (options.oneofs) + object._frequency = "frequency"; + } + return object; + }; + + /** + * Converts this BotReminderMetadata to JSON. + * @function toJSON + * @memberof proto.BotReminderMetadata + * @instance + * @returns {Object.} JSON object + */ + BotReminderMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BotReminderMetadata + * @function getTypeUrl + * @memberof proto.BotReminderMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BotReminderMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.BotReminderMetadata"; + }; + + /** + * ReminderAction enum. + * @name proto.BotReminderMetadata.ReminderAction + * @enum {number} + * @property {number} NOTIFY=1 NOTIFY value + * @property {number} CREATE=2 CREATE value + * @property {number} DELETE=3 DELETE value + * @property {number} UPDATE=4 UPDATE value + */ + BotReminderMetadata.ReminderAction = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "NOTIFY"] = 1; + values[valuesById[2] = "CREATE"] = 2; + values[valuesById[3] = "DELETE"] = 3; + values[valuesById[4] = "UPDATE"] = 4; + return values; + })(); + + /** + * ReminderFrequency enum. + * @name proto.BotReminderMetadata.ReminderFrequency + * @enum {number} + * @property {number} ONCE=1 ONCE value + * @property {number} DAILY=2 DAILY value + * @property {number} WEEKLY=3 WEEKLY value + * @property {number} BIWEEKLY=4 BIWEEKLY value + * @property {number} MONTHLY=5 MONTHLY value + */ + BotReminderMetadata.ReminderFrequency = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "ONCE"] = 1; + values[valuesById[2] = "DAILY"] = 2; + values[valuesById[3] = "WEEKLY"] = 3; + values[valuesById[4] = "BIWEEKLY"] = 4; + values[valuesById[5] = "MONTHLY"] = 5; + return values; + })(); + + return BotReminderMetadata; + })(); + + proto.BotRenderingMetadata = (function() { + + /** + * Properties of a BotRenderingMetadata. + * @memberof proto + * @interface IBotRenderingMetadata + * @property {Array.|null} [keywords] BotRenderingMetadata keywords + */ + + /** + * Constructs a new BotRenderingMetadata. + * @memberof proto + * @classdesc Represents a BotRenderingMetadata. + * @implements IBotRenderingMetadata + * @constructor + * @param {proto.IBotRenderingMetadata=} [properties] Properties to set + */ + function BotRenderingMetadata(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]]; + } + + /** + * BotRenderingMetadata keywords. + * @member {Array.} keywords + * @memberof proto.BotRenderingMetadata + * @instance + */ + BotRenderingMetadata.prototype.keywords = $util.emptyArray; + + /** + * Creates a new BotRenderingMetadata instance using the specified properties. + * @function create + * @memberof proto.BotRenderingMetadata + * @static + * @param {proto.IBotRenderingMetadata=} [properties] Properties to set + * @returns {proto.BotRenderingMetadata} BotRenderingMetadata instance + */ + BotRenderingMetadata.create = function create(properties) { + return new BotRenderingMetadata(properties); + }; + + /** + * Encodes the specified BotRenderingMetadata message. Does not implicitly {@link proto.BotRenderingMetadata.verify|verify} messages. + * @function encode + * @memberof proto.BotRenderingMetadata + * @static + * @param {proto.IBotRenderingMetadata} message BotRenderingMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BotRenderingMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.keywords != null && message.keywords.length) + for (var i = 0; i < message.keywords.length; ++i) + $root.proto.BotRenderingMetadata.Keyword.encode(message.keywords[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BotRenderingMetadata message, length delimited. Does not implicitly {@link proto.BotRenderingMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.BotRenderingMetadata + * @static + * @param {proto.IBotRenderingMetadata} message BotRenderingMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BotRenderingMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BotRenderingMetadata message from the specified reader or buffer. + * @function decode + * @memberof proto.BotRenderingMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.BotRenderingMetadata} BotRenderingMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BotRenderingMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.BotRenderingMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.keywords && message.keywords.length)) + message.keywords = []; + message.keywords.push($root.proto.BotRenderingMetadata.Keyword.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BotRenderingMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.BotRenderingMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.BotRenderingMetadata} BotRenderingMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BotRenderingMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BotRenderingMetadata message. + * @function verify + * @memberof proto.BotRenderingMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BotRenderingMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object 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) { + var error = $root.proto.BotRenderingMetadata.Keyword.verify(message.keywords[i]); + if (error) + return "keywords." + error; + } + } + return null; + }; + + /** + * Creates a BotRenderingMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.BotRenderingMetadata + * @static + * @param {Object.} object Plain object + * @returns {proto.BotRenderingMetadata} BotRenderingMetadata + */ + BotRenderingMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.proto.BotRenderingMetadata) + return object; + var message = new $root.proto.BotRenderingMetadata(); + if (object.keywords) { + if (!Array.isArray(object.keywords)) + throw TypeError(".proto.BotRenderingMetadata.keywords: array expected"); + message.keywords = []; + for (var i = 0; i < object.keywords.length; ++i) { + if (typeof object.keywords[i] !== "object") + throw TypeError(".proto.BotRenderingMetadata.keywords: object expected"); + message.keywords[i] = $root.proto.BotRenderingMetadata.Keyword.fromObject(object.keywords[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a BotRenderingMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.BotRenderingMetadata + * @static + * @param {proto.BotRenderingMetadata} message BotRenderingMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BotRenderingMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.keywords = []; + if (message.keywords && message.keywords.length) { + object.keywords = []; + for (var j = 0; j < message.keywords.length; ++j) + object.keywords[j] = $root.proto.BotRenderingMetadata.Keyword.toObject(message.keywords[j], options); + } + return object; + }; + + /** + * Converts this BotRenderingMetadata to JSON. + * @function toJSON + * @memberof proto.BotRenderingMetadata + * @instance + * @returns {Object.} JSON object + */ + BotRenderingMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BotRenderingMetadata + * @function getTypeUrl + * @memberof proto.BotRenderingMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BotRenderingMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.BotRenderingMetadata"; + }; + + BotRenderingMetadata.Keyword = (function() { + + /** + * Properties of a Keyword. + * @memberof proto.BotRenderingMetadata + * @interface IKeyword + * @property {string|null} [value] Keyword value + * @property {Array.|null} [associatedPrompts] Keyword associatedPrompts + */ + + /** + * Constructs a new Keyword. + * @memberof proto.BotRenderingMetadata + * @classdesc Represents a Keyword. + * @implements IKeyword + * @constructor + * @param {proto.BotRenderingMetadata.IKeyword=} [properties] Properties to set + */ + function Keyword(properties) { + this.associatedPrompts = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Keyword value. + * @member {string|null|undefined} value + * @memberof proto.BotRenderingMetadata.Keyword + * @instance + */ + Keyword.prototype.value = null; + + /** + * Keyword associatedPrompts. + * @member {Array.} associatedPrompts + * @memberof proto.BotRenderingMetadata.Keyword + * @instance + */ + Keyword.prototype.associatedPrompts = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Keyword.prototype, "_value", { + get: $util.oneOfGetter($oneOfFields = ["value"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Keyword instance using the specified properties. + * @function create + * @memberof proto.BotRenderingMetadata.Keyword + * @static + * @param {proto.BotRenderingMetadata.IKeyword=} [properties] Properties to set + * @returns {proto.BotRenderingMetadata.Keyword} Keyword instance + */ + Keyword.create = function create(properties) { + return new Keyword(properties); + }; + + /** + * Encodes the specified Keyword message. Does not implicitly {@link proto.BotRenderingMetadata.Keyword.verify|verify} messages. + * @function encode + * @memberof proto.BotRenderingMetadata.Keyword + * @static + * @param {proto.BotRenderingMetadata.IKeyword} message Keyword message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Keyword.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); + if (message.associatedPrompts != null && message.associatedPrompts.length) + for (var i = 0; i < message.associatedPrompts.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.associatedPrompts[i]); + return writer; + }; + + /** + * Encodes the specified Keyword message, length delimited. Does not implicitly {@link proto.BotRenderingMetadata.Keyword.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.BotRenderingMetadata.Keyword + * @static + * @param {proto.BotRenderingMetadata.IKeyword} message Keyword message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Keyword.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Keyword message from the specified reader or buffer. + * @function decode + * @memberof proto.BotRenderingMetadata.Keyword + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.BotRenderingMetadata.Keyword} Keyword + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Keyword.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.BotRenderingMetadata.Keyword(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.value = reader.string(); + break; + } + case 2: { + if (!(message.associatedPrompts && message.associatedPrompts.length)) + message.associatedPrompts = []; + message.associatedPrompts.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Keyword message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.BotRenderingMetadata.Keyword + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.BotRenderingMetadata.Keyword} Keyword + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Keyword.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Keyword message. + * @function verify + * @memberof proto.BotRenderingMetadata.Keyword + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Keyword.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.value != null && message.hasOwnProperty("value")) { + properties._value = 1; + if (!$util.isString(message.value)) + return "value: string expected"; + } + if (message.associatedPrompts != null && message.hasOwnProperty("associatedPrompts")) { + if (!Array.isArray(message.associatedPrompts)) + return "associatedPrompts: array expected"; + for (var i = 0; i < message.associatedPrompts.length; ++i) + if (!$util.isString(message.associatedPrompts[i])) + return "associatedPrompts: string[] expected"; + } + return null; + }; + + /** + * Creates a Keyword message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.BotRenderingMetadata.Keyword + * @static + * @param {Object.} object Plain object + * @returns {proto.BotRenderingMetadata.Keyword} Keyword + */ + Keyword.fromObject = function fromObject(object) { + if (object instanceof $root.proto.BotRenderingMetadata.Keyword) + return object; + var message = new $root.proto.BotRenderingMetadata.Keyword(); + if (object.value != null) + message.value = String(object.value); + if (object.associatedPrompts) { + if (!Array.isArray(object.associatedPrompts)) + throw TypeError(".proto.BotRenderingMetadata.Keyword.associatedPrompts: array expected"); + message.associatedPrompts = []; + for (var i = 0; i < object.associatedPrompts.length; ++i) + message.associatedPrompts[i] = String(object.associatedPrompts[i]); + } + return message; + }; + + /** + * Creates a plain object from a Keyword message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.BotRenderingMetadata.Keyword + * @static + * @param {proto.BotRenderingMetadata.Keyword} message Keyword + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Keyword.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.associatedPrompts = []; + if (message.value != null && message.hasOwnProperty("value")) { + object.value = message.value; + if (options.oneofs) + object._value = "value"; + } + if (message.associatedPrompts && message.associatedPrompts.length) { + object.associatedPrompts = []; + for (var j = 0; j < message.associatedPrompts.length; ++j) + object.associatedPrompts[j] = message.associatedPrompts[j]; + } + return object; + }; + + /** + * Converts this Keyword to JSON. + * @function toJSON + * @memberof proto.BotRenderingMetadata.Keyword + * @instance + * @returns {Object.} JSON object + */ + Keyword.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Keyword + * @function getTypeUrl + * @memberof proto.BotRenderingMetadata.Keyword + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Keyword.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.BotRenderingMetadata.Keyword"; + }; + + return Keyword; + })(); + + return BotRenderingMetadata; + })(); + + proto.BotSessionMetadata = (function() { + + /** + * Properties of a BotSessionMetadata. + * @memberof proto + * @interface IBotSessionMetadata + * @property {string|null} [sessionId] BotSessionMetadata sessionId + * @property {proto.BotSessionSource|null} [sessionSource] BotSessionMetadata sessionSource + */ + + /** + * Constructs a new BotSessionMetadata. + * @memberof proto + * @classdesc Represents a BotSessionMetadata. + * @implements IBotSessionMetadata + * @constructor + * @param {proto.IBotSessionMetadata=} [properties] Properties to set + */ + function BotSessionMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BotSessionMetadata sessionId. + * @member {string|null|undefined} sessionId + * @memberof proto.BotSessionMetadata + * @instance + */ + BotSessionMetadata.prototype.sessionId = null; + + /** + * BotSessionMetadata sessionSource. + * @member {proto.BotSessionSource|null|undefined} sessionSource + * @memberof proto.BotSessionMetadata + * @instance + */ + BotSessionMetadata.prototype.sessionSource = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotSessionMetadata.prototype, "_sessionId", { + get: $util.oneOfGetter($oneOfFields = ["sessionId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotSessionMetadata.prototype, "_sessionSource", { + get: $util.oneOfGetter($oneOfFields = ["sessionSource"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new BotSessionMetadata instance using the specified properties. + * @function create + * @memberof proto.BotSessionMetadata + * @static + * @param {proto.IBotSessionMetadata=} [properties] Properties to set + * @returns {proto.BotSessionMetadata} BotSessionMetadata instance + */ + BotSessionMetadata.create = function create(properties) { + return new BotSessionMetadata(properties); + }; + + /** + * Encodes the specified BotSessionMetadata message. Does not implicitly {@link proto.BotSessionMetadata.verify|verify} messages. + * @function encode + * @memberof proto.BotSessionMetadata + * @static + * @param {proto.IBotSessionMetadata} message BotSessionMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BotSessionMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sessionId != null && Object.hasOwnProperty.call(message, "sessionId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.sessionId); + if (message.sessionSource != null && Object.hasOwnProperty.call(message, "sessionSource")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.sessionSource); + return writer; + }; + + /** + * Encodes the specified BotSessionMetadata message, length delimited. Does not implicitly {@link proto.BotSessionMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.BotSessionMetadata + * @static + * @param {proto.IBotSessionMetadata} message BotSessionMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BotSessionMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BotSessionMetadata message from the specified reader or buffer. + * @function decode + * @memberof proto.BotSessionMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.BotSessionMetadata} BotSessionMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BotSessionMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.BotSessionMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.sessionId = reader.string(); + break; + } + case 2: { + message.sessionSource = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BotSessionMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.BotSessionMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.BotSessionMetadata} BotSessionMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BotSessionMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BotSessionMetadata message. + * @function verify + * @memberof proto.BotSessionMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BotSessionMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.sessionId != null && message.hasOwnProperty("sessionId")) { + properties._sessionId = 1; + if (!$util.isString(message.sessionId)) + return "sessionId: string expected"; + } + if (message.sessionSource != null && message.hasOwnProperty("sessionSource")) { + properties._sessionSource = 1; + switch (message.sessionSource) { + default: + return "sessionSource: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + } + return null; + }; + + /** + * Creates a BotSessionMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.BotSessionMetadata + * @static + * @param {Object.} object Plain object + * @returns {proto.BotSessionMetadata} BotSessionMetadata + */ + BotSessionMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.proto.BotSessionMetadata) + return object; + var message = new $root.proto.BotSessionMetadata(); + if (object.sessionId != null) + message.sessionId = String(object.sessionId); + switch (object.sessionSource) { + default: + if (typeof object.sessionSource === "number") { + message.sessionSource = object.sessionSource; + break; + } + break; + case "NONE": + case 0: + message.sessionSource = 0; + break; + case "NULL_STATE": + case 1: + message.sessionSource = 1; + break; + case "TYPEAHEAD": + case 2: + message.sessionSource = 2; + break; + case "USER_INPUT": + case 3: + message.sessionSource = 3; + break; + case "EMU_FLASH": + case 4: + message.sessionSource = 4; + break; + case "EMU_FLASH_FOLLOWUP": + case 5: + message.sessionSource = 5; + break; + case "VOICE": + case 6: + message.sessionSource = 6; + break; + } + return message; + }; + + /** + * Creates a plain object from a BotSessionMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.BotSessionMetadata + * @static + * @param {proto.BotSessionMetadata} message BotSessionMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BotSessionMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.sessionId != null && message.hasOwnProperty("sessionId")) { + object.sessionId = message.sessionId; + if (options.oneofs) + object._sessionId = "sessionId"; + } + if (message.sessionSource != null && message.hasOwnProperty("sessionSource")) { + object.sessionSource = options.enums === String ? $root.proto.BotSessionSource[message.sessionSource] === undefined ? message.sessionSource : $root.proto.BotSessionSource[message.sessionSource] : message.sessionSource; + if (options.oneofs) + object._sessionSource = "sessionSource"; + } + return object; + }; + + /** + * Converts this BotSessionMetadata to JSON. + * @function toJSON + * @memberof proto.BotSessionMetadata + * @instance + * @returns {Object.} JSON object + */ + BotSessionMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BotSessionMetadata + * @function getTypeUrl + * @memberof proto.BotSessionMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BotSessionMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.BotSessionMetadata"; + }; + + return BotSessionMetadata; + })(); + + /** + * BotSessionSource enum. + * @name proto.BotSessionSource + * @enum {number} + * @property {number} NONE=0 NONE value + * @property {number} NULL_STATE=1 NULL_STATE value + * @property {number} TYPEAHEAD=2 TYPEAHEAD value + * @property {number} USER_INPUT=3 USER_INPUT value + * @property {number} EMU_FLASH=4 EMU_FLASH value + * @property {number} EMU_FLASH_FOLLOWUP=5 EMU_FLASH_FOLLOWUP value + * @property {number} VOICE=6 VOICE value + */ + proto.BotSessionSource = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NONE"] = 0; + values[valuesById[1] = "NULL_STATE"] = 1; + values[valuesById[2] = "TYPEAHEAD"] = 2; + values[valuesById[3] = "USER_INPUT"] = 3; + values[valuesById[4] = "EMU_FLASH"] = 4; + values[valuesById[5] = "EMU_FLASH_FOLLOWUP"] = 5; + values[valuesById[6] = "VOICE"] = 6; + return values; + })(); + proto.BotSuggestedPromptMetadata = (function() { /** @@ -4171,6 +17429,8 @@ $root.proto = (function() { * @interface IBotSuggestedPromptMetadata * @property {Array.|null} [suggestedPrompts] BotSuggestedPromptMetadata suggestedPrompts * @property {number|null} [selectedPromptIndex] BotSuggestedPromptMetadata selectedPromptIndex + * @property {proto.IBotPromptSuggestions|null} [promptSuggestions] BotSuggestedPromptMetadata promptSuggestions + * @property {string|null} [selectedPromptId] BotSuggestedPromptMetadata selectedPromptId */ /** @@ -4199,11 +17459,48 @@ $root.proto = (function() { /** * BotSuggestedPromptMetadata selectedPromptIndex. - * @member {number} selectedPromptIndex + * @member {number|null|undefined} selectedPromptIndex * @memberof proto.BotSuggestedPromptMetadata * @instance */ - BotSuggestedPromptMetadata.prototype.selectedPromptIndex = 0; + BotSuggestedPromptMetadata.prototype.selectedPromptIndex = null; + + /** + * BotSuggestedPromptMetadata promptSuggestions. + * @member {proto.IBotPromptSuggestions|null|undefined} promptSuggestions + * @memberof proto.BotSuggestedPromptMetadata + * @instance + */ + BotSuggestedPromptMetadata.prototype.promptSuggestions = null; + + /** + * BotSuggestedPromptMetadata selectedPromptId. + * @member {string|null|undefined} selectedPromptId + * @memberof proto.BotSuggestedPromptMetadata + * @instance + */ + BotSuggestedPromptMetadata.prototype.selectedPromptId = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotSuggestedPromptMetadata.prototype, "_selectedPromptIndex", { + get: $util.oneOfGetter($oneOfFields = ["selectedPromptIndex"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotSuggestedPromptMetadata.prototype, "_promptSuggestions", { + get: $util.oneOfGetter($oneOfFields = ["promptSuggestions"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotSuggestedPromptMetadata.prototype, "_selectedPromptId", { + get: $util.oneOfGetter($oneOfFields = ["selectedPromptId"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new BotSuggestedPromptMetadata instance using the specified properties. @@ -4234,6 +17531,10 @@ $root.proto = (function() { writer.uint32(/* id 1, wireType 2 =*/10).string(message.suggestedPrompts[i]); if (message.selectedPromptIndex != null && Object.hasOwnProperty.call(message, "selectedPromptIndex")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.selectedPromptIndex); + if (message.promptSuggestions != null && Object.hasOwnProperty.call(message, "promptSuggestions")) + $root.proto.BotPromptSuggestions.encode(message.promptSuggestions, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.selectedPromptId != null && Object.hasOwnProperty.call(message, "selectedPromptId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.selectedPromptId); return writer; }; @@ -4268,14 +17569,24 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.suggestedPrompts && message.suggestedPrompts.length)) - message.suggestedPrompts = []; - message.suggestedPrompts.push(reader.string()); - break; - case 2: - message.selectedPromptIndex = reader.uint32(); - break; + case 1: { + if (!(message.suggestedPrompts && message.suggestedPrompts.length)) + message.suggestedPrompts = []; + message.suggestedPrompts.push(reader.string()); + break; + } + case 2: { + message.selectedPromptIndex = reader.uint32(); + break; + } + case 3: { + message.promptSuggestions = $root.proto.BotPromptSuggestions.decode(reader, reader.uint32()); + break; + } + case 4: { + message.selectedPromptId = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -4311,6 +17622,7 @@ $root.proto = (function() { BotSuggestedPromptMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; if (message.suggestedPrompts != null && message.hasOwnProperty("suggestedPrompts")) { if (!Array.isArray(message.suggestedPrompts)) return "suggestedPrompts: array expected"; @@ -4318,9 +17630,24 @@ $root.proto = (function() { if (!$util.isString(message.suggestedPrompts[i])) return "suggestedPrompts: string[] expected"; } - if (message.selectedPromptIndex != null && message.hasOwnProperty("selectedPromptIndex")) + if (message.selectedPromptIndex != null && message.hasOwnProperty("selectedPromptIndex")) { + properties._selectedPromptIndex = 1; if (!$util.isInteger(message.selectedPromptIndex)) return "selectedPromptIndex: integer expected"; + } + if (message.promptSuggestions != null && message.hasOwnProperty("promptSuggestions")) { + properties._promptSuggestions = 1; + { + var error = $root.proto.BotPromptSuggestions.verify(message.promptSuggestions); + if (error) + return "promptSuggestions." + error; + } + } + if (message.selectedPromptId != null && message.hasOwnProperty("selectedPromptId")) { + properties._selectedPromptId = 1; + if (!$util.isString(message.selectedPromptId)) + return "selectedPromptId: string expected"; + } return null; }; @@ -4345,6 +17672,13 @@ $root.proto = (function() { } if (object.selectedPromptIndex != null) message.selectedPromptIndex = object.selectedPromptIndex >>> 0; + if (object.promptSuggestions != null) { + if (typeof object.promptSuggestions !== "object") + throw TypeError(".proto.BotSuggestedPromptMetadata.promptSuggestions: object expected"); + message.promptSuggestions = $root.proto.BotPromptSuggestions.fromObject(object.promptSuggestions); + } + if (object.selectedPromptId != null) + message.selectedPromptId = String(object.selectedPromptId); return message; }; @@ -4363,15 +17697,26 @@ $root.proto = (function() { var object = {}; if (options.arrays || options.defaults) object.suggestedPrompts = []; - if (options.defaults) - object.selectedPromptIndex = 0; if (message.suggestedPrompts && message.suggestedPrompts.length) { object.suggestedPrompts = []; for (var j = 0; j < message.suggestedPrompts.length; ++j) object.suggestedPrompts[j] = message.suggestedPrompts[j]; } - if (message.selectedPromptIndex != null && message.hasOwnProperty("selectedPromptIndex")) + if (message.selectedPromptIndex != null && message.hasOwnProperty("selectedPromptIndex")) { object.selectedPromptIndex = message.selectedPromptIndex; + if (options.oneofs) + object._selectedPromptIndex = "selectedPromptIndex"; + } + if (message.promptSuggestions != null && message.hasOwnProperty("promptSuggestions")) { + object.promptSuggestions = $root.proto.BotPromptSuggestions.toObject(message.promptSuggestions, options); + if (options.oneofs) + object._promptSuggestions = "promptSuggestions"; + } + if (message.selectedPromptId != null && message.hasOwnProperty("selectedPromptId")) { + object.selectedPromptId = message.selectedPromptId; + if (options.oneofs) + object._selectedPromptId = "selectedPromptId"; + } return object; }; @@ -4386,6 +17731,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for BotSuggestedPromptMetadata + * @function getTypeUrl + * @memberof proto.BotSuggestedPromptMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BotSuggestedPromptMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.BotSuggestedPromptMetadata"; + }; + return BotSuggestedPromptMetadata; })(); @@ -4430,107 +17790,107 @@ $root.proto = (function() { /** * CallLogRecord callResult. - * @member {proto.CallLogRecord.CallResult} callResult + * @member {proto.CallLogRecord.CallResult|null|undefined} callResult * @memberof proto.CallLogRecord * @instance */ - CallLogRecord.prototype.callResult = 0; + CallLogRecord.prototype.callResult = null; /** * CallLogRecord isDndMode. - * @member {boolean} isDndMode + * @member {boolean|null|undefined} isDndMode * @memberof proto.CallLogRecord * @instance */ - CallLogRecord.prototype.isDndMode = false; + CallLogRecord.prototype.isDndMode = null; /** * CallLogRecord silenceReason. - * @member {proto.CallLogRecord.SilenceReason} silenceReason + * @member {proto.CallLogRecord.SilenceReason|null|undefined} silenceReason * @memberof proto.CallLogRecord * @instance */ - CallLogRecord.prototype.silenceReason = 0; + CallLogRecord.prototype.silenceReason = null; /** * CallLogRecord duration. - * @member {number|Long} duration + * @member {number|Long|null|undefined} duration * @memberof proto.CallLogRecord * @instance */ - CallLogRecord.prototype.duration = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CallLogRecord.prototype.duration = null; /** * CallLogRecord startTime. - * @member {number|Long} startTime + * @member {number|Long|null|undefined} startTime * @memberof proto.CallLogRecord * @instance */ - CallLogRecord.prototype.startTime = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CallLogRecord.prototype.startTime = null; /** * CallLogRecord isIncoming. - * @member {boolean} isIncoming + * @member {boolean|null|undefined} isIncoming * @memberof proto.CallLogRecord * @instance */ - CallLogRecord.prototype.isIncoming = false; + CallLogRecord.prototype.isIncoming = null; /** * CallLogRecord isVideo. - * @member {boolean} isVideo + * @member {boolean|null|undefined} isVideo * @memberof proto.CallLogRecord * @instance */ - CallLogRecord.prototype.isVideo = false; + CallLogRecord.prototype.isVideo = null; /** * CallLogRecord isCallLink. - * @member {boolean} isCallLink + * @member {boolean|null|undefined} isCallLink * @memberof proto.CallLogRecord * @instance */ - CallLogRecord.prototype.isCallLink = false; + CallLogRecord.prototype.isCallLink = null; /** * CallLogRecord callLinkToken. - * @member {string} callLinkToken + * @member {string|null|undefined} callLinkToken * @memberof proto.CallLogRecord * @instance */ - CallLogRecord.prototype.callLinkToken = ""; + CallLogRecord.prototype.callLinkToken = null; /** * CallLogRecord scheduledCallId. - * @member {string} scheduledCallId + * @member {string|null|undefined} scheduledCallId * @memberof proto.CallLogRecord * @instance */ - CallLogRecord.prototype.scheduledCallId = ""; + CallLogRecord.prototype.scheduledCallId = null; /** * CallLogRecord callId. - * @member {string} callId + * @member {string|null|undefined} callId * @memberof proto.CallLogRecord * @instance */ - CallLogRecord.prototype.callId = ""; + CallLogRecord.prototype.callId = null; /** * CallLogRecord callCreatorJid. - * @member {string} callCreatorJid + * @member {string|null|undefined} callCreatorJid * @memberof proto.CallLogRecord * @instance */ - CallLogRecord.prototype.callCreatorJid = ""; + CallLogRecord.prototype.callCreatorJid = null; /** * CallLogRecord groupJid. - * @member {string} groupJid + * @member {string|null|undefined} groupJid * @memberof proto.CallLogRecord * @instance */ - CallLogRecord.prototype.groupJid = ""; + CallLogRecord.prototype.groupJid = null; /** * CallLogRecord participants. @@ -4542,11 +17902,98 @@ $root.proto = (function() { /** * CallLogRecord callType. - * @member {proto.CallLogRecord.CallType} callType + * @member {proto.CallLogRecord.CallType|null|undefined} callType * @memberof proto.CallLogRecord * @instance */ - CallLogRecord.prototype.callType = 0; + CallLogRecord.prototype.callType = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CallLogRecord.prototype, "_callResult", { + get: $util.oneOfGetter($oneOfFields = ["callResult"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CallLogRecord.prototype, "_isDndMode", { + get: $util.oneOfGetter($oneOfFields = ["isDndMode"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CallLogRecord.prototype, "_silenceReason", { + get: $util.oneOfGetter($oneOfFields = ["silenceReason"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CallLogRecord.prototype, "_duration", { + get: $util.oneOfGetter($oneOfFields = ["duration"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CallLogRecord.prototype, "_startTime", { + get: $util.oneOfGetter($oneOfFields = ["startTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CallLogRecord.prototype, "_isIncoming", { + get: $util.oneOfGetter($oneOfFields = ["isIncoming"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CallLogRecord.prototype, "_isVideo", { + get: $util.oneOfGetter($oneOfFields = ["isVideo"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CallLogRecord.prototype, "_isCallLink", { + get: $util.oneOfGetter($oneOfFields = ["isCallLink"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CallLogRecord.prototype, "_callLinkToken", { + get: $util.oneOfGetter($oneOfFields = ["callLinkToken"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CallLogRecord.prototype, "_scheduledCallId", { + get: $util.oneOfGetter($oneOfFields = ["scheduledCallId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CallLogRecord.prototype, "_callId", { + get: $util.oneOfGetter($oneOfFields = ["callId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CallLogRecord.prototype, "_callCreatorJid", { + get: $util.oneOfGetter($oneOfFields = ["callCreatorJid"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CallLogRecord.prototype, "_groupJid", { + get: $util.oneOfGetter($oneOfFields = ["groupJid"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CallLogRecord.prototype, "_callType", { + get: $util.oneOfGetter($oneOfFields = ["callType"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new CallLogRecord instance using the specified properties. @@ -4637,53 +18084,68 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.callResult = reader.int32(); - break; - case 2: - message.isDndMode = reader.bool(); - break; - case 3: - message.silenceReason = reader.int32(); - break; - case 4: - message.duration = reader.int64(); - break; - case 5: - message.startTime = reader.int64(); - break; - case 6: - message.isIncoming = reader.bool(); - break; - case 7: - message.isVideo = reader.bool(); - break; - case 8: - message.isCallLink = reader.bool(); - break; - case 9: - message.callLinkToken = reader.string(); - break; - case 10: - message.scheduledCallId = reader.string(); - break; - case 11: - message.callId = reader.string(); - break; - case 12: - message.callCreatorJid = reader.string(); - break; - case 13: - message.groupJid = reader.string(); - break; - case 14: - if (!(message.participants && message.participants.length)) - message.participants = []; - message.participants.push($root.proto.CallLogRecord.ParticipantInfo.decode(reader, reader.uint32())); - break; - case 15: - message.callType = reader.int32(); - break; + case 1: { + message.callResult = reader.int32(); + break; + } + case 2: { + message.isDndMode = reader.bool(); + break; + } + case 3: { + message.silenceReason = reader.int32(); + break; + } + case 4: { + message.duration = reader.int64(); + break; + } + case 5: { + message.startTime = reader.int64(); + break; + } + case 6: { + message.isIncoming = reader.bool(); + break; + } + case 7: { + message.isVideo = reader.bool(); + break; + } + case 8: { + message.isCallLink = reader.bool(); + break; + } + case 9: { + message.callLinkToken = reader.string(); + break; + } + case 10: { + message.scheduledCallId = reader.string(); + break; + } + case 11: { + message.callId = reader.string(); + break; + } + case 12: { + message.callCreatorJid = reader.string(); + break; + } + case 13: { + message.groupJid = reader.string(); + break; + } + case 14: { + if (!(message.participants && message.participants.length)) + message.participants = []; + message.participants.push($root.proto.CallLogRecord.ParticipantInfo.decode(reader, reader.uint32())); + break; + } + case 15: { + message.callType = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -4719,7 +18181,9 @@ $root.proto = (function() { CallLogRecord.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.callResult != null && message.hasOwnProperty("callResult")) + var properties = {}; + if (message.callResult != null && message.hasOwnProperty("callResult")) { + properties._callResult = 1; switch (message.callResult) { default: return "callResult: enum value expected"; @@ -4736,10 +18200,14 @@ $root.proto = (function() { case 10: break; } - if (message.isDndMode != null && message.hasOwnProperty("isDndMode")) + } + if (message.isDndMode != null && message.hasOwnProperty("isDndMode")) { + properties._isDndMode = 1; if (typeof message.isDndMode !== "boolean") return "isDndMode: boolean expected"; - if (message.silenceReason != null && message.hasOwnProperty("silenceReason")) + } + if (message.silenceReason != null && message.hasOwnProperty("silenceReason")) { + properties._silenceReason = 1; switch (message.silenceReason) { default: return "silenceReason: enum value expected"; @@ -4749,36 +18217,57 @@ $root.proto = (function() { case 3: break; } - if (message.duration != null && message.hasOwnProperty("duration")) + } + if (message.duration != null && message.hasOwnProperty("duration")) { + properties._duration = 1; if (!$util.isInteger(message.duration) && !(message.duration && $util.isInteger(message.duration.low) && $util.isInteger(message.duration.high))) return "duration: integer|Long expected"; - if (message.startTime != null && message.hasOwnProperty("startTime")) + } + if (message.startTime != null && message.hasOwnProperty("startTime")) { + properties._startTime = 1; if (!$util.isInteger(message.startTime) && !(message.startTime && $util.isInteger(message.startTime.low) && $util.isInteger(message.startTime.high))) return "startTime: integer|Long expected"; - if (message.isIncoming != null && message.hasOwnProperty("isIncoming")) + } + if (message.isIncoming != null && message.hasOwnProperty("isIncoming")) { + properties._isIncoming = 1; if (typeof message.isIncoming !== "boolean") return "isIncoming: boolean expected"; - if (message.isVideo != null && message.hasOwnProperty("isVideo")) + } + if (message.isVideo != null && message.hasOwnProperty("isVideo")) { + properties._isVideo = 1; if (typeof message.isVideo !== "boolean") return "isVideo: boolean expected"; - if (message.isCallLink != null && message.hasOwnProperty("isCallLink")) + } + if (message.isCallLink != null && message.hasOwnProperty("isCallLink")) { + properties._isCallLink = 1; if (typeof message.isCallLink !== "boolean") return "isCallLink: boolean expected"; - if (message.callLinkToken != null && message.hasOwnProperty("callLinkToken")) + } + if (message.callLinkToken != null && message.hasOwnProperty("callLinkToken")) { + properties._callLinkToken = 1; if (!$util.isString(message.callLinkToken)) return "callLinkToken: string expected"; - if (message.scheduledCallId != null && message.hasOwnProperty("scheduledCallId")) + } + if (message.scheduledCallId != null && message.hasOwnProperty("scheduledCallId")) { + properties._scheduledCallId = 1; if (!$util.isString(message.scheduledCallId)) return "scheduledCallId: string expected"; - if (message.callId != null && message.hasOwnProperty("callId")) + } + if (message.callId != null && message.hasOwnProperty("callId")) { + properties._callId = 1; if (!$util.isString(message.callId)) return "callId: string expected"; - if (message.callCreatorJid != null && message.hasOwnProperty("callCreatorJid")) + } + if (message.callCreatorJid != null && message.hasOwnProperty("callCreatorJid")) { + properties._callCreatorJid = 1; if (!$util.isString(message.callCreatorJid)) return "callCreatorJid: string expected"; - if (message.groupJid != null && message.hasOwnProperty("groupJid")) + } + if (message.groupJid != null && message.hasOwnProperty("groupJid")) { + properties._groupJid = 1; if (!$util.isString(message.groupJid)) return "groupJid: string expected"; + } if (message.participants != null && message.hasOwnProperty("participants")) { if (!Array.isArray(message.participants)) return "participants: array expected"; @@ -4788,7 +18277,8 @@ $root.proto = (function() { return "participants." + error; } } - if (message.callType != null && message.hasOwnProperty("callType")) + if (message.callType != null && message.hasOwnProperty("callType")) { + properties._callType = 1; switch (message.callType) { default: return "callType: enum value expected"; @@ -4797,6 +18287,7 @@ $root.proto = (function() { case 2: break; } + } return null; }; @@ -4813,6 +18304,12 @@ $root.proto = (function() { return object; var message = new $root.proto.CallLogRecord(); switch (object.callResult) { + default: + if (typeof object.callResult === "number") { + message.callResult = object.callResult; + break; + } + break; case "CONNECTED": case 0: message.callResult = 0; @@ -4861,6 +18358,12 @@ $root.proto = (function() { if (object.isDndMode != null) message.isDndMode = Boolean(object.isDndMode); switch (object.silenceReason) { + default: + if (typeof object.silenceReason === "number") { + message.silenceReason = object.silenceReason; + break; + } + break; case "NONE": case 0: message.silenceReason = 0; @@ -4923,6 +18426,12 @@ $root.proto = (function() { } } switch (object.callType) { + default: + if (typeof object.callType === "number") { + message.callType = object.callType; + break; + } + break; case "REGULAR": case 0: message.callType = 0; @@ -4954,69 +18463,87 @@ $root.proto = (function() { var object = {}; if (options.arrays || options.defaults) object.participants = []; - if (options.defaults) { - object.callResult = options.enums === String ? "CONNECTED" : 0; - object.isDndMode = false; - object.silenceReason = options.enums === String ? "NONE" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.duration = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.duration = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.startTime = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.startTime = options.longs === String ? "0" : 0; - object.isIncoming = false; - object.isVideo = false; - object.isCallLink = false; - object.callLinkToken = ""; - object.scheduledCallId = ""; - object.callId = ""; - object.callCreatorJid = ""; - object.groupJid = ""; - object.callType = options.enums === String ? "REGULAR" : 0; + if (message.callResult != null && message.hasOwnProperty("callResult")) { + object.callResult = options.enums === String ? $root.proto.CallLogRecord.CallResult[message.callResult] === undefined ? message.callResult : $root.proto.CallLogRecord.CallResult[message.callResult] : message.callResult; + if (options.oneofs) + object._callResult = "callResult"; } - if (message.callResult != null && message.hasOwnProperty("callResult")) - object.callResult = options.enums === String ? $root.proto.CallLogRecord.CallResult[message.callResult] : message.callResult; - if (message.isDndMode != null && message.hasOwnProperty("isDndMode")) + if (message.isDndMode != null && message.hasOwnProperty("isDndMode")) { object.isDndMode = message.isDndMode; - if (message.silenceReason != null && message.hasOwnProperty("silenceReason")) - object.silenceReason = options.enums === String ? $root.proto.CallLogRecord.SilenceReason[message.silenceReason] : message.silenceReason; - if (message.duration != null && message.hasOwnProperty("duration")) + if (options.oneofs) + object._isDndMode = "isDndMode"; + } + if (message.silenceReason != null && message.hasOwnProperty("silenceReason")) { + object.silenceReason = options.enums === String ? $root.proto.CallLogRecord.SilenceReason[message.silenceReason] === undefined ? message.silenceReason : $root.proto.CallLogRecord.SilenceReason[message.silenceReason] : message.silenceReason; + if (options.oneofs) + object._silenceReason = "silenceReason"; + } + if (message.duration != null && message.hasOwnProperty("duration")) { if (typeof message.duration === "number") object.duration = options.longs === String ? String(message.duration) : message.duration; else object.duration = options.longs === String ? $util.Long.prototype.toString.call(message.duration) : options.longs === Number ? new $util.LongBits(message.duration.low >>> 0, message.duration.high >>> 0).toNumber() : message.duration; - if (message.startTime != null && message.hasOwnProperty("startTime")) + if (options.oneofs) + object._duration = "duration"; + } + if (message.startTime != null && message.hasOwnProperty("startTime")) { if (typeof message.startTime === "number") object.startTime = options.longs === String ? String(message.startTime) : message.startTime; else object.startTime = options.longs === String ? $util.Long.prototype.toString.call(message.startTime) : options.longs === Number ? new $util.LongBits(message.startTime.low >>> 0, message.startTime.high >>> 0).toNumber() : message.startTime; - if (message.isIncoming != null && message.hasOwnProperty("isIncoming")) + if (options.oneofs) + object._startTime = "startTime"; + } + if (message.isIncoming != null && message.hasOwnProperty("isIncoming")) { object.isIncoming = message.isIncoming; - if (message.isVideo != null && message.hasOwnProperty("isVideo")) + if (options.oneofs) + object._isIncoming = "isIncoming"; + } + if (message.isVideo != null && message.hasOwnProperty("isVideo")) { object.isVideo = message.isVideo; - if (message.isCallLink != null && message.hasOwnProperty("isCallLink")) + if (options.oneofs) + object._isVideo = "isVideo"; + } + if (message.isCallLink != null && message.hasOwnProperty("isCallLink")) { object.isCallLink = message.isCallLink; - if (message.callLinkToken != null && message.hasOwnProperty("callLinkToken")) + if (options.oneofs) + object._isCallLink = "isCallLink"; + } + if (message.callLinkToken != null && message.hasOwnProperty("callLinkToken")) { object.callLinkToken = message.callLinkToken; - if (message.scheduledCallId != null && message.hasOwnProperty("scheduledCallId")) + if (options.oneofs) + object._callLinkToken = "callLinkToken"; + } + if (message.scheduledCallId != null && message.hasOwnProperty("scheduledCallId")) { object.scheduledCallId = message.scheduledCallId; - if (message.callId != null && message.hasOwnProperty("callId")) + if (options.oneofs) + object._scheduledCallId = "scheduledCallId"; + } + if (message.callId != null && message.hasOwnProperty("callId")) { object.callId = message.callId; - if (message.callCreatorJid != null && message.hasOwnProperty("callCreatorJid")) + if (options.oneofs) + object._callId = "callId"; + } + if (message.callCreatorJid != null && message.hasOwnProperty("callCreatorJid")) { object.callCreatorJid = message.callCreatorJid; - if (message.groupJid != null && message.hasOwnProperty("groupJid")) + if (options.oneofs) + object._callCreatorJid = "callCreatorJid"; + } + if (message.groupJid != null && message.hasOwnProperty("groupJid")) { object.groupJid = message.groupJid; + if (options.oneofs) + object._groupJid = "groupJid"; + } if (message.participants && message.participants.length) { object.participants = []; for (var j = 0; j < message.participants.length; ++j) object.participants[j] = $root.proto.CallLogRecord.ParticipantInfo.toObject(message.participants[j], options); } - if (message.callType != null && message.hasOwnProperty("callType")) - object.callType = options.enums === String ? $root.proto.CallLogRecord.CallType[message.callType] : message.callType; + if (message.callType != null && message.hasOwnProperty("callType")) { + object.callType = options.enums === String ? $root.proto.CallLogRecord.CallType[message.callType] === undefined ? message.callType : $root.proto.CallLogRecord.CallType[message.callType] : message.callType; + if (options.oneofs) + object._callType = "callType"; + } return object; }; @@ -5031,6 +18558,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CallLogRecord + * @function getTypeUrl + * @memberof proto.CallLogRecord + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CallLogRecord.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.CallLogRecord"; + }; + /** * CallResult enum. * @name proto.CallLogRecord.CallResult @@ -5106,19 +18648,34 @@ $root.proto = (function() { /** * ParticipantInfo userJid. - * @member {string} userJid + * @member {string|null|undefined} userJid * @memberof proto.CallLogRecord.ParticipantInfo * @instance */ - ParticipantInfo.prototype.userJid = ""; + ParticipantInfo.prototype.userJid = null; /** * ParticipantInfo callResult. - * @member {proto.CallLogRecord.CallResult} callResult + * @member {proto.CallLogRecord.CallResult|null|undefined} callResult * @memberof proto.CallLogRecord.ParticipantInfo * @instance */ - ParticipantInfo.prototype.callResult = 0; + ParticipantInfo.prototype.callResult = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ParticipantInfo.prototype, "_userJid", { + get: $util.oneOfGetter($oneOfFields = ["userJid"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ParticipantInfo.prototype, "_callResult", { + get: $util.oneOfGetter($oneOfFields = ["callResult"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new ParticipantInfo instance using the specified properties. @@ -5182,12 +18739,14 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.userJid = reader.string(); - break; - case 2: - message.callResult = reader.int32(); - break; + case 1: { + message.userJid = reader.string(); + break; + } + case 2: { + message.callResult = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -5223,10 +18782,14 @@ $root.proto = (function() { ParticipantInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.userJid != null && message.hasOwnProperty("userJid")) + var properties = {}; + if (message.userJid != null && message.hasOwnProperty("userJid")) { + properties._userJid = 1; if (!$util.isString(message.userJid)) return "userJid: string expected"; - if (message.callResult != null && message.hasOwnProperty("callResult")) + } + if (message.callResult != null && message.hasOwnProperty("callResult")) { + properties._callResult = 1; switch (message.callResult) { default: return "callResult: enum value expected"; @@ -5243,6 +18806,7 @@ $root.proto = (function() { case 10: break; } + } return null; }; @@ -5261,6 +18825,12 @@ $root.proto = (function() { if (object.userJid != null) message.userJid = String(object.userJid); switch (object.callResult) { + default: + if (typeof object.callResult === "number") { + message.callResult = object.callResult; + break; + } + break; case "CONNECTED": case 0: message.callResult = 0; @@ -5322,14 +18892,16 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.userJid = ""; - object.callResult = options.enums === String ? "CONNECTED" : 0; - } - if (message.userJid != null && message.hasOwnProperty("userJid")) + if (message.userJid != null && message.hasOwnProperty("userJid")) { object.userJid = message.userJid; - if (message.callResult != null && message.hasOwnProperty("callResult")) - object.callResult = options.enums === String ? $root.proto.CallLogRecord.CallResult[message.callResult] : message.callResult; + if (options.oneofs) + object._userJid = "userJid"; + } + if (message.callResult != null && message.hasOwnProperty("callResult")) { + object.callResult = options.enums === String ? $root.proto.CallLogRecord.CallResult[message.callResult] === undefined ? message.callResult : $root.proto.CallLogRecord.CallResult[message.callResult] : message.callResult; + if (options.oneofs) + object._callResult = "callResult"; + } return object; }; @@ -5344,6 +18916,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ParticipantInfo + * @function getTypeUrl + * @memberof proto.CallLogRecord.ParticipantInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ParticipantInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.CallLogRecord.ParticipantInfo"; + }; + return ParticipantInfo; })(); @@ -5409,6 +18996,21 @@ $root.proto = (function() { */ CertChain.prototype.intermediate = null; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CertChain.prototype, "_leaf", { + get: $util.oneOfGetter($oneOfFields = ["leaf"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CertChain.prototype, "_intermediate", { + get: $util.oneOfGetter($oneOfFields = ["intermediate"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new CertChain instance using the specified properties. * @function create @@ -5471,12 +19073,14 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.leaf = $root.proto.CertChain.NoiseCertificate.decode(reader, reader.uint32()); - break; - case 2: - message.intermediate = $root.proto.CertChain.NoiseCertificate.decode(reader, reader.uint32()); - break; + case 1: { + message.leaf = $root.proto.CertChain.NoiseCertificate.decode(reader, reader.uint32()); + break; + } + case 2: { + message.intermediate = $root.proto.CertChain.NoiseCertificate.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -5512,15 +19116,22 @@ $root.proto = (function() { CertChain.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; if (message.leaf != null && message.hasOwnProperty("leaf")) { - var error = $root.proto.CertChain.NoiseCertificate.verify(message.leaf); - if (error) - return "leaf." + error; + properties._leaf = 1; + { + 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.CertChain.NoiseCertificate.verify(message.intermediate); - if (error) - return "intermediate." + error; + properties._intermediate = 1; + { + var error = $root.proto.CertChain.NoiseCertificate.verify(message.intermediate); + if (error) + return "intermediate." + error; + } } return null; }; @@ -5563,14 +19174,16 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.leaf = null; - object.intermediate = null; - } - if (message.leaf != null && message.hasOwnProperty("leaf")) + if (message.leaf != null && message.hasOwnProperty("leaf")) { object.leaf = $root.proto.CertChain.NoiseCertificate.toObject(message.leaf, options); - if (message.intermediate != null && message.hasOwnProperty("intermediate")) + if (options.oneofs) + object._leaf = "leaf"; + } + if (message.intermediate != null && message.hasOwnProperty("intermediate")) { object.intermediate = $root.proto.CertChain.NoiseCertificate.toObject(message.intermediate, options); + if (options.oneofs) + object._intermediate = "intermediate"; + } return object; }; @@ -5585,6 +19198,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CertChain + * @function getTypeUrl + * @memberof proto.CertChain + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CertChain.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.CertChain"; + }; + CertChain.NoiseCertificate = (function() { /** @@ -5612,19 +19240,34 @@ $root.proto = (function() { /** * NoiseCertificate details. - * @member {Uint8Array} details + * @member {Uint8Array|null|undefined} details * @memberof proto.CertChain.NoiseCertificate * @instance */ - NoiseCertificate.prototype.details = $util.newBuffer([]); + NoiseCertificate.prototype.details = null; /** * NoiseCertificate signature. - * @member {Uint8Array} signature + * @member {Uint8Array|null|undefined} signature * @memberof proto.CertChain.NoiseCertificate * @instance */ - NoiseCertificate.prototype.signature = $util.newBuffer([]); + NoiseCertificate.prototype.signature = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(NoiseCertificate.prototype, "_details", { + get: $util.oneOfGetter($oneOfFields = ["details"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(NoiseCertificate.prototype, "_signature", { + get: $util.oneOfGetter($oneOfFields = ["signature"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new NoiseCertificate instance using the specified properties. @@ -5688,12 +19331,14 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.details = reader.bytes(); - break; - case 2: - message.signature = reader.bytes(); - break; + case 1: { + message.details = reader.bytes(); + break; + } + case 2: { + message.signature = reader.bytes(); + break; + } default: reader.skipType(tag & 7); break; @@ -5729,12 +19374,17 @@ $root.proto = (function() { NoiseCertificate.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.details != null && message.hasOwnProperty("details")) + var properties = {}; + if (message.details != null && message.hasOwnProperty("details")) { + properties._details = 1; 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 != null && message.hasOwnProperty("signature")) { + properties._signature = 1; if (!(message.signature && typeof message.signature.length === "number" || $util.isString(message.signature))) return "signature: buffer expected"; + } return null; }; @@ -5753,12 +19403,12 @@ $root.proto = (function() { 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) + else if (object.details.length >= 0) 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) + else if (object.signature.length >= 0) message.signature = object.signature; return message; }; @@ -5776,26 +19426,16 @@ $root.proto = (function() { 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")) + 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")) + if (options.oneofs) + object._details = "details"; + } + if (message.signature != null && message.hasOwnProperty("signature")) { object.signature = options.bytes === String ? $util.base64.encode(message.signature, 0, message.signature.length) : options.bytes === Array ? Array.prototype.slice.call(message.signature) : message.signature; + if (options.oneofs) + object._signature = "signature"; + } return object; }; @@ -5810,6 +19450,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for NoiseCertificate + * @function getTypeUrl + * @memberof proto.CertChain.NoiseCertificate + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NoiseCertificate.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.CertChain.NoiseCertificate"; + }; + NoiseCertificate.Details = (function() { /** @@ -5840,43 +19495,76 @@ $root.proto = (function() { /** * Details serial. - * @member {number} serial + * @member {number|null|undefined} serial * @memberof proto.CertChain.NoiseCertificate.Details * @instance */ - Details.prototype.serial = 0; + Details.prototype.serial = null; /** * Details issuerSerial. - * @member {number} issuerSerial + * @member {number|null|undefined} issuerSerial * @memberof proto.CertChain.NoiseCertificate.Details * @instance */ - Details.prototype.issuerSerial = 0; + Details.prototype.issuerSerial = null; /** * Details key. - * @member {Uint8Array} key + * @member {Uint8Array|null|undefined} key * @memberof proto.CertChain.NoiseCertificate.Details * @instance */ - Details.prototype.key = $util.newBuffer([]); + Details.prototype.key = null; /** * Details notBefore. - * @member {number|Long} notBefore + * @member {number|Long|null|undefined} notBefore * @memberof proto.CertChain.NoiseCertificate.Details * @instance */ - Details.prototype.notBefore = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + Details.prototype.notBefore = null; /** * Details notAfter. - * @member {number|Long} notAfter + * @member {number|Long|null|undefined} notAfter * @memberof proto.CertChain.NoiseCertificate.Details * @instance */ - Details.prototype.notAfter = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + Details.prototype.notAfter = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Details.prototype, "_serial", { + get: $util.oneOfGetter($oneOfFields = ["serial"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Details.prototype, "_issuerSerial", { + get: $util.oneOfGetter($oneOfFields = ["issuerSerial"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Details.prototype, "_key", { + get: $util.oneOfGetter($oneOfFields = ["key"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Details.prototype, "_notBefore", { + get: $util.oneOfGetter($oneOfFields = ["notBefore"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Details.prototype, "_notAfter", { + get: $util.oneOfGetter($oneOfFields = ["notAfter"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new Details instance using the specified properties. @@ -5946,21 +19634,26 @@ $root.proto = (function() { 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; + 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; @@ -5996,21 +19689,32 @@ $root.proto = (function() { Details.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.serial != null && message.hasOwnProperty("serial")) + var properties = {}; + if (message.serial != null && message.hasOwnProperty("serial")) { + properties._serial = 1; if (!$util.isInteger(message.serial)) return "serial: integer expected"; - if (message.issuerSerial != null && message.hasOwnProperty("issuerSerial")) + } + if (message.issuerSerial != null && message.hasOwnProperty("issuerSerial")) { + properties._issuerSerial = 1; if (!$util.isInteger(message.issuerSerial)) return "issuerSerial: integer expected"; - if (message.key != null && message.hasOwnProperty("key")) + } + if (message.key != null && message.hasOwnProperty("key")) { + properties._key = 1; if (!(message.key && typeof message.key.length === "number" || $util.isString(message.key))) return "key: buffer expected"; - if (message.notBefore != null && message.hasOwnProperty("notBefore")) + } + if (message.notBefore != null && message.hasOwnProperty("notBefore")) { + properties._notBefore = 1; 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 (message.notAfter != null && message.hasOwnProperty("notAfter")) { + properties._notAfter = 1; if (!$util.isInteger(message.notAfter) && !(message.notAfter && $util.isInteger(message.notAfter.low) && $util.isInteger(message.notAfter.high))) return "notAfter: integer|Long expected"; + } return null; }; @@ -6033,7 +19737,7 @@ $root.proto = (function() { 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) + else if (object.key.length >= 0) message.key = object.key; if (object.notBefore != null) if ($util.Long) @@ -6069,43 +19773,37 @@ $root.proto = (function() { 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")) + if (message.serial != null && message.hasOwnProperty("serial")) { object.serial = message.serial; - if (message.issuerSerial != null && message.hasOwnProperty("issuerSerial")) + if (options.oneofs) + object._serial = "serial"; + } + if (message.issuerSerial != null && message.hasOwnProperty("issuerSerial")) { object.issuerSerial = message.issuerSerial; - if (message.key != null && message.hasOwnProperty("key")) + if (options.oneofs) + object._issuerSerial = "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 (options.oneofs) + object._key = "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 (options.oneofs) + object._notBefore = "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; + if (options.oneofs) + object._notAfter = "notAfter"; + } return object; }; @@ -6120,6 +19818,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Details + * @function getTypeUrl + * @memberof proto.CertChain.NoiseCertificate.Details + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Details.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.CertChain.NoiseCertificate.Details"; + }; + return Details; })(); @@ -6129,6 +19842,261 @@ $root.proto = (function() { return CertChain; })(); + proto.ChatLockSettings = (function() { + + /** + * Properties of a ChatLockSettings. + * @memberof proto + * @interface IChatLockSettings + * @property {boolean|null} [hideLockedChats] ChatLockSettings hideLockedChats + * @property {proto.IUserPassword|null} [secretCode] ChatLockSettings secretCode + */ + + /** + * Constructs a new ChatLockSettings. + * @memberof proto + * @classdesc Represents a ChatLockSettings. + * @implements IChatLockSettings + * @constructor + * @param {proto.IChatLockSettings=} [properties] Properties to set + */ + function ChatLockSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ChatLockSettings hideLockedChats. + * @member {boolean|null|undefined} hideLockedChats + * @memberof proto.ChatLockSettings + * @instance + */ + ChatLockSettings.prototype.hideLockedChats = null; + + /** + * ChatLockSettings secretCode. + * @member {proto.IUserPassword|null|undefined} secretCode + * @memberof proto.ChatLockSettings + * @instance + */ + ChatLockSettings.prototype.secretCode = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ChatLockSettings.prototype, "_hideLockedChats", { + get: $util.oneOfGetter($oneOfFields = ["hideLockedChats"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ChatLockSettings.prototype, "_secretCode", { + get: $util.oneOfGetter($oneOfFields = ["secretCode"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ChatLockSettings instance using the specified properties. + * @function create + * @memberof proto.ChatLockSettings + * @static + * @param {proto.IChatLockSettings=} [properties] Properties to set + * @returns {proto.ChatLockSettings} ChatLockSettings instance + */ + ChatLockSettings.create = function create(properties) { + return new ChatLockSettings(properties); + }; + + /** + * Encodes the specified ChatLockSettings message. Does not implicitly {@link proto.ChatLockSettings.verify|verify} messages. + * @function encode + * @memberof proto.ChatLockSettings + * @static + * @param {proto.IChatLockSettings} message ChatLockSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChatLockSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.hideLockedChats != null && Object.hasOwnProperty.call(message, "hideLockedChats")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.hideLockedChats); + if (message.secretCode != null && Object.hasOwnProperty.call(message, "secretCode")) + $root.proto.UserPassword.encode(message.secretCode, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ChatLockSettings message, length delimited. Does not implicitly {@link proto.ChatLockSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.ChatLockSettings + * @static + * @param {proto.IChatLockSettings} message ChatLockSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChatLockSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ChatLockSettings message from the specified reader or buffer. + * @function decode + * @memberof proto.ChatLockSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.ChatLockSettings} ChatLockSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChatLockSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.ChatLockSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.hideLockedChats = reader.bool(); + break; + } + case 2: { + message.secretCode = $root.proto.UserPassword.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ChatLockSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.ChatLockSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.ChatLockSettings} ChatLockSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChatLockSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ChatLockSettings message. + * @function verify + * @memberof proto.ChatLockSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ChatLockSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.hideLockedChats != null && message.hasOwnProperty("hideLockedChats")) { + properties._hideLockedChats = 1; + if (typeof message.hideLockedChats !== "boolean") + return "hideLockedChats: boolean expected"; + } + if (message.secretCode != null && message.hasOwnProperty("secretCode")) { + properties._secretCode = 1; + { + var error = $root.proto.UserPassword.verify(message.secretCode); + if (error) + return "secretCode." + error; + } + } + return null; + }; + + /** + * Creates a ChatLockSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.ChatLockSettings + * @static + * @param {Object.} object Plain object + * @returns {proto.ChatLockSettings} ChatLockSettings + */ + ChatLockSettings.fromObject = function fromObject(object) { + if (object instanceof $root.proto.ChatLockSettings) + return object; + var message = new $root.proto.ChatLockSettings(); + if (object.hideLockedChats != null) + message.hideLockedChats = Boolean(object.hideLockedChats); + if (object.secretCode != null) { + if (typeof object.secretCode !== "object") + throw TypeError(".proto.ChatLockSettings.secretCode: object expected"); + message.secretCode = $root.proto.UserPassword.fromObject(object.secretCode); + } + return message; + }; + + /** + * Creates a plain object from a ChatLockSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.ChatLockSettings + * @static + * @param {proto.ChatLockSettings} message ChatLockSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ChatLockSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.hideLockedChats != null && message.hasOwnProperty("hideLockedChats")) { + object.hideLockedChats = message.hideLockedChats; + if (options.oneofs) + object._hideLockedChats = "hideLockedChats"; + } + if (message.secretCode != null && message.hasOwnProperty("secretCode")) { + object.secretCode = $root.proto.UserPassword.toObject(message.secretCode, options); + if (options.oneofs) + object._secretCode = "secretCode"; + } + return object; + }; + + /** + * Converts this ChatLockSettings to JSON. + * @function toJSON + * @memberof proto.ChatLockSettings + * @instance + * @returns {Object.} JSON object + */ + ChatLockSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ChatLockSettings + * @function getTypeUrl + * @memberof proto.ChatLockSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ChatLockSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.ChatLockSettings"; + }; + + return ChatLockSettings; + })(); + proto.ChatRowOpaqueData = (function() { /** @@ -6161,6 +20129,15 @@ $root.proto = (function() { */ ChatRowOpaqueData.prototype.draftMessage = null; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ChatRowOpaqueData.prototype, "_draftMessage", { + get: $util.oneOfGetter($oneOfFields = ["draftMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new ChatRowOpaqueData instance using the specified properties. * @function create @@ -6221,9 +20198,10 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.draftMessage = $root.proto.ChatRowOpaqueData.DraftMessage.decode(reader, reader.uint32()); - break; + case 1: { + message.draftMessage = $root.proto.ChatRowOpaqueData.DraftMessage.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -6259,10 +20237,14 @@ $root.proto = (function() { ChatRowOpaqueData.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; if (message.draftMessage != null && message.hasOwnProperty("draftMessage")) { - var error = $root.proto.ChatRowOpaqueData.DraftMessage.verify(message.draftMessage); - if (error) - return "draftMessage." + error; + properties._draftMessage = 1; + { + var error = $root.proto.ChatRowOpaqueData.DraftMessage.verify(message.draftMessage); + if (error) + return "draftMessage." + error; + } } return null; }; @@ -6300,10 +20282,11 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) - object.draftMessage = null; - if (message.draftMessage != null && message.hasOwnProperty("draftMessage")) + if (message.draftMessage != null && message.hasOwnProperty("draftMessage")) { object.draftMessage = $root.proto.ChatRowOpaqueData.DraftMessage.toObject(message.draftMessage, options); + if (options.oneofs) + object._draftMessage = "draftMessage"; + } return object; }; @@ -6318,6 +20301,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ChatRowOpaqueData + * @function getTypeUrl + * @memberof proto.ChatRowOpaqueData + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ChatRowOpaqueData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.ChatRowOpaqueData"; + }; + ChatRowOpaqueData.DraftMessage = (function() { /** @@ -6348,19 +20346,19 @@ $root.proto = (function() { /** * DraftMessage text. - * @member {string} text + * @member {string|null|undefined} text * @memberof proto.ChatRowOpaqueData.DraftMessage * @instance */ - DraftMessage.prototype.text = ""; + DraftMessage.prototype.text = null; /** * DraftMessage omittedUrl. - * @member {string} omittedUrl + * @member {string|null|undefined} omittedUrl * @memberof proto.ChatRowOpaqueData.DraftMessage * @instance */ - DraftMessage.prototype.omittedUrl = ""; + DraftMessage.prototype.omittedUrl = null; /** * DraftMessage ctwaContextLinkData. @@ -6380,11 +20378,44 @@ $root.proto = (function() { /** * DraftMessage timestamp. - * @member {number|Long} timestamp + * @member {number|Long|null|undefined} timestamp * @memberof proto.ChatRowOpaqueData.DraftMessage * @instance */ - DraftMessage.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + DraftMessage.prototype.timestamp = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DraftMessage.prototype, "_text", { + get: $util.oneOfGetter($oneOfFields = ["text"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DraftMessage.prototype, "_omittedUrl", { + get: $util.oneOfGetter($oneOfFields = ["omittedUrl"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DraftMessage.prototype, "_ctwaContextLinkData", { + get: $util.oneOfGetter($oneOfFields = ["ctwaContextLinkData"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DraftMessage.prototype, "_ctwaContext", { + get: $util.oneOfGetter($oneOfFields = ["ctwaContext"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DraftMessage.prototype, "_timestamp", { + get: $util.oneOfGetter($oneOfFields = ["timestamp"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new DraftMessage instance using the specified properties. @@ -6454,21 +20485,26 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.text = reader.string(); - break; - case 2: - message.omittedUrl = reader.string(); - break; - case 3: - message.ctwaContextLinkData = $root.proto.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData.decode(reader, reader.uint32()); - break; - case 4: - message.ctwaContext = $root.proto.ChatRowOpaqueData.DraftMessage.CtwaContextData.decode(reader, reader.uint32()); - break; - case 5: - message.timestamp = reader.int64(); - break; + case 1: { + message.text = reader.string(); + break; + } + case 2: { + message.omittedUrl = reader.string(); + break; + } + case 3: { + message.ctwaContextLinkData = $root.proto.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData.decode(reader, reader.uint32()); + break; + } + case 4: { + message.ctwaContext = $root.proto.ChatRowOpaqueData.DraftMessage.CtwaContextData.decode(reader, reader.uint32()); + break; + } + case 5: { + message.timestamp = reader.int64(); + break; + } default: reader.skipType(tag & 7); break; @@ -6504,25 +20540,38 @@ $root.proto = (function() { DraftMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.text != null && message.hasOwnProperty("text")) + var properties = {}; + if (message.text != null && message.hasOwnProperty("text")) { + properties._text = 1; if (!$util.isString(message.text)) return "text: string expected"; - if (message.omittedUrl != null && message.hasOwnProperty("omittedUrl")) + } + if (message.omittedUrl != null && message.hasOwnProperty("omittedUrl")) { + properties._omittedUrl = 1; if (!$util.isString(message.omittedUrl)) return "omittedUrl: string expected"; + } if (message.ctwaContextLinkData != null && message.hasOwnProperty("ctwaContextLinkData")) { - var error = $root.proto.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData.verify(message.ctwaContextLinkData); - if (error) - return "ctwaContextLinkData." + error; + properties._ctwaContextLinkData = 1; + { + var error = $root.proto.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData.verify(message.ctwaContextLinkData); + if (error) + return "ctwaContextLinkData." + error; + } } if (message.ctwaContext != null && message.hasOwnProperty("ctwaContext")) { - var error = $root.proto.ChatRowOpaqueData.DraftMessage.CtwaContextData.verify(message.ctwaContext); - if (error) - return "ctwaContext." + error; + properties._ctwaContext = 1; + { + var error = $root.proto.ChatRowOpaqueData.DraftMessage.CtwaContextData.verify(message.ctwaContext); + if (error) + return "ctwaContext." + error; + } } - if (message.timestamp != null && message.hasOwnProperty("timestamp")) + if (message.timestamp != null && message.hasOwnProperty("timestamp")) { + properties._timestamp = 1; if (!$util.isInteger(message.timestamp) && !(message.timestamp && $util.isInteger(message.timestamp.low) && $util.isInteger(message.timestamp.high))) return "timestamp: integer|Long expected"; + } return null; }; @@ -6577,30 +20626,34 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.text = ""; - object.omittedUrl = ""; - object.ctwaContextLinkData = null; - object.ctwaContext = 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.text != null && message.hasOwnProperty("text")) + if (message.text != null && message.hasOwnProperty("text")) { object.text = message.text; - if (message.omittedUrl != null && message.hasOwnProperty("omittedUrl")) + if (options.oneofs) + object._text = "text"; + } + if (message.omittedUrl != null && message.hasOwnProperty("omittedUrl")) { object.omittedUrl = message.omittedUrl; - if (message.ctwaContextLinkData != null && message.hasOwnProperty("ctwaContextLinkData")) + if (options.oneofs) + object._omittedUrl = "omittedUrl"; + } + if (message.ctwaContextLinkData != null && message.hasOwnProperty("ctwaContextLinkData")) { object.ctwaContextLinkData = $root.proto.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData.toObject(message.ctwaContextLinkData, options); - if (message.ctwaContext != null && message.hasOwnProperty("ctwaContext")) + if (options.oneofs) + object._ctwaContextLinkData = "ctwaContextLinkData"; + } + if (message.ctwaContext != null && message.hasOwnProperty("ctwaContext")) { object.ctwaContext = $root.proto.ChatRowOpaqueData.DraftMessage.CtwaContextData.toObject(message.ctwaContext, options); - if (message.timestamp != null && message.hasOwnProperty("timestamp")) + if (options.oneofs) + object._ctwaContext = "ctwaContext"; + } + if (message.timestamp != null && message.hasOwnProperty("timestamp")) { if (typeof message.timestamp === "number") object.timestamp = options.longs === String ? String(message.timestamp) : message.timestamp; else object.timestamp = options.longs === String ? $util.Long.prototype.toString.call(message.timestamp) : options.longs === Number ? new $util.LongBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0).toNumber() : message.timestamp; + if (options.oneofs) + object._timestamp = "timestamp"; + } return object; }; @@ -6615,6 +20668,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DraftMessage + * @function getTypeUrl + * @memberof proto.ChatRowOpaqueData.DraftMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DraftMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.ChatRowOpaqueData.DraftMessage"; + }; + DraftMessage.CtwaContextData = (function() { /** @@ -6652,99 +20720,174 @@ $root.proto = (function() { /** * CtwaContextData conversionSource. - * @member {string} conversionSource + * @member {string|null|undefined} conversionSource * @memberof proto.ChatRowOpaqueData.DraftMessage.CtwaContextData * @instance */ - CtwaContextData.prototype.conversionSource = ""; + CtwaContextData.prototype.conversionSource = null; /** * CtwaContextData conversionData. - * @member {Uint8Array} conversionData + * @member {Uint8Array|null|undefined} conversionData * @memberof proto.ChatRowOpaqueData.DraftMessage.CtwaContextData * @instance */ - CtwaContextData.prototype.conversionData = $util.newBuffer([]); + CtwaContextData.prototype.conversionData = null; /** * CtwaContextData sourceUrl. - * @member {string} sourceUrl + * @member {string|null|undefined} sourceUrl * @memberof proto.ChatRowOpaqueData.DraftMessage.CtwaContextData * @instance */ - CtwaContextData.prototype.sourceUrl = ""; + CtwaContextData.prototype.sourceUrl = null; /** * CtwaContextData sourceId. - * @member {string} sourceId + * @member {string|null|undefined} sourceId * @memberof proto.ChatRowOpaqueData.DraftMessage.CtwaContextData * @instance */ - CtwaContextData.prototype.sourceId = ""; + CtwaContextData.prototype.sourceId = null; /** * CtwaContextData sourceType. - * @member {string} sourceType + * @member {string|null|undefined} sourceType * @memberof proto.ChatRowOpaqueData.DraftMessage.CtwaContextData * @instance */ - CtwaContextData.prototype.sourceType = ""; + CtwaContextData.prototype.sourceType = null; /** * CtwaContextData title. - * @member {string} title + * @member {string|null|undefined} title * @memberof proto.ChatRowOpaqueData.DraftMessage.CtwaContextData * @instance */ - CtwaContextData.prototype.title = ""; + CtwaContextData.prototype.title = null; /** * CtwaContextData description. - * @member {string} description + * @member {string|null|undefined} description * @memberof proto.ChatRowOpaqueData.DraftMessage.CtwaContextData * @instance */ - CtwaContextData.prototype.description = ""; + CtwaContextData.prototype.description = null; /** * CtwaContextData thumbnail. - * @member {string} thumbnail + * @member {string|null|undefined} thumbnail * @memberof proto.ChatRowOpaqueData.DraftMessage.CtwaContextData * @instance */ - CtwaContextData.prototype.thumbnail = ""; + CtwaContextData.prototype.thumbnail = null; /** * CtwaContextData thumbnailUrl. - * @member {string} thumbnailUrl + * @member {string|null|undefined} thumbnailUrl * @memberof proto.ChatRowOpaqueData.DraftMessage.CtwaContextData * @instance */ - CtwaContextData.prototype.thumbnailUrl = ""; + CtwaContextData.prototype.thumbnailUrl = null; /** * CtwaContextData mediaType. - * @member {proto.ChatRowOpaqueData.DraftMessage.CtwaContextData.ContextInfoExternalAdReplyInfoMediaType} mediaType + * @member {proto.ChatRowOpaqueData.DraftMessage.CtwaContextData.ContextInfoExternalAdReplyInfoMediaType|null|undefined} mediaType * @memberof proto.ChatRowOpaqueData.DraftMessage.CtwaContextData * @instance */ - CtwaContextData.prototype.mediaType = 0; + CtwaContextData.prototype.mediaType = null; /** * CtwaContextData mediaUrl. - * @member {string} mediaUrl + * @member {string|null|undefined} mediaUrl * @memberof proto.ChatRowOpaqueData.DraftMessage.CtwaContextData * @instance */ - CtwaContextData.prototype.mediaUrl = ""; + CtwaContextData.prototype.mediaUrl = null; /** * CtwaContextData isSuspiciousLink. - * @member {boolean} isSuspiciousLink + * @member {boolean|null|undefined} isSuspiciousLink * @memberof proto.ChatRowOpaqueData.DraftMessage.CtwaContextData * @instance */ - CtwaContextData.prototype.isSuspiciousLink = false; + CtwaContextData.prototype.isSuspiciousLink = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CtwaContextData.prototype, "_conversionSource", { + get: $util.oneOfGetter($oneOfFields = ["conversionSource"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CtwaContextData.prototype, "_conversionData", { + get: $util.oneOfGetter($oneOfFields = ["conversionData"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CtwaContextData.prototype, "_sourceUrl", { + get: $util.oneOfGetter($oneOfFields = ["sourceUrl"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CtwaContextData.prototype, "_sourceId", { + get: $util.oneOfGetter($oneOfFields = ["sourceId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CtwaContextData.prototype, "_sourceType", { + get: $util.oneOfGetter($oneOfFields = ["sourceType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CtwaContextData.prototype, "_title", { + get: $util.oneOfGetter($oneOfFields = ["title"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CtwaContextData.prototype, "_description", { + get: $util.oneOfGetter($oneOfFields = ["description"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CtwaContextData.prototype, "_thumbnail", { + get: $util.oneOfGetter($oneOfFields = ["thumbnail"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CtwaContextData.prototype, "_thumbnailUrl", { + get: $util.oneOfGetter($oneOfFields = ["thumbnailUrl"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CtwaContextData.prototype, "_mediaType", { + get: $util.oneOfGetter($oneOfFields = ["mediaType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CtwaContextData.prototype, "_mediaUrl", { + get: $util.oneOfGetter($oneOfFields = ["mediaUrl"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CtwaContextData.prototype, "_isSuspiciousLink", { + get: $util.oneOfGetter($oneOfFields = ["isSuspiciousLink"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new CtwaContextData instance using the specified properties. @@ -6828,42 +20971,54 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.conversionSource = reader.string(); - break; - case 2: - message.conversionData = reader.bytes(); - break; - case 3: - message.sourceUrl = reader.string(); - break; - case 4: - message.sourceId = reader.string(); - break; - case 5: - message.sourceType = reader.string(); - break; - case 6: - message.title = reader.string(); - break; - case 7: - message.description = reader.string(); - break; - case 8: - message.thumbnail = reader.string(); - break; - case 9: - message.thumbnailUrl = reader.string(); - break; - case 10: - message.mediaType = reader.int32(); - break; - case 11: - message.mediaUrl = reader.string(); - break; - case 12: - message.isSuspiciousLink = reader.bool(); - break; + case 1: { + message.conversionSource = reader.string(); + break; + } + case 2: { + message.conversionData = reader.bytes(); + break; + } + case 3: { + message.sourceUrl = reader.string(); + break; + } + case 4: { + message.sourceId = reader.string(); + break; + } + case 5: { + message.sourceType = reader.string(); + break; + } + case 6: { + message.title = reader.string(); + break; + } + case 7: { + message.description = reader.string(); + break; + } + case 8: { + message.thumbnail = reader.string(); + break; + } + case 9: { + message.thumbnailUrl = reader.string(); + break; + } + case 10: { + message.mediaType = reader.int32(); + break; + } + case 11: { + message.mediaUrl = reader.string(); + break; + } + case 12: { + message.isSuspiciousLink = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -6899,34 +21054,54 @@ $root.proto = (function() { CtwaContextData.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.conversionSource != null && message.hasOwnProperty("conversionSource")) + var properties = {}; + if (message.conversionSource != null && message.hasOwnProperty("conversionSource")) { + properties._conversionSource = 1; if (!$util.isString(message.conversionSource)) return "conversionSource: string expected"; - if (message.conversionData != null && message.hasOwnProperty("conversionData")) + } + if (message.conversionData != null && message.hasOwnProperty("conversionData")) { + properties._conversionData = 1; if (!(message.conversionData && typeof message.conversionData.length === "number" || $util.isString(message.conversionData))) return "conversionData: buffer expected"; - if (message.sourceUrl != null && message.hasOwnProperty("sourceUrl")) + } + if (message.sourceUrl != null && message.hasOwnProperty("sourceUrl")) { + properties._sourceUrl = 1; if (!$util.isString(message.sourceUrl)) return "sourceUrl: string expected"; - if (message.sourceId != null && message.hasOwnProperty("sourceId")) + } + if (message.sourceId != null && message.hasOwnProperty("sourceId")) { + properties._sourceId = 1; if (!$util.isString(message.sourceId)) return "sourceId: string expected"; - if (message.sourceType != null && message.hasOwnProperty("sourceType")) + } + if (message.sourceType != null && message.hasOwnProperty("sourceType")) { + properties._sourceType = 1; if (!$util.isString(message.sourceType)) return "sourceType: string expected"; - if (message.title != null && message.hasOwnProperty("title")) + } + if (message.title != null && message.hasOwnProperty("title")) { + properties._title = 1; if (!$util.isString(message.title)) return "title: string expected"; - if (message.description != null && message.hasOwnProperty("description")) + } + if (message.description != null && message.hasOwnProperty("description")) { + properties._description = 1; if (!$util.isString(message.description)) return "description: string expected"; - if (message.thumbnail != null && message.hasOwnProperty("thumbnail")) + } + if (message.thumbnail != null && message.hasOwnProperty("thumbnail")) { + properties._thumbnail = 1; if (!$util.isString(message.thumbnail)) return "thumbnail: string expected"; - if (message.thumbnailUrl != null && message.hasOwnProperty("thumbnailUrl")) + } + if (message.thumbnailUrl != null && message.hasOwnProperty("thumbnailUrl")) { + properties._thumbnailUrl = 1; if (!$util.isString(message.thumbnailUrl)) return "thumbnailUrl: string expected"; - if (message.mediaType != null && message.hasOwnProperty("mediaType")) + } + if (message.mediaType != null && message.hasOwnProperty("mediaType")) { + properties._mediaType = 1; switch (message.mediaType) { default: return "mediaType: enum value expected"; @@ -6935,12 +21110,17 @@ $root.proto = (function() { case 2: break; } - if (message.mediaUrl != null && message.hasOwnProperty("mediaUrl")) + } + if (message.mediaUrl != null && message.hasOwnProperty("mediaUrl")) { + properties._mediaUrl = 1; if (!$util.isString(message.mediaUrl)) return "mediaUrl: string expected"; - if (message.isSuspiciousLink != null && message.hasOwnProperty("isSuspiciousLink")) + } + if (message.isSuspiciousLink != null && message.hasOwnProperty("isSuspiciousLink")) { + properties._isSuspiciousLink = 1; if (typeof message.isSuspiciousLink !== "boolean") return "isSuspiciousLink: boolean expected"; + } return null; }; @@ -6961,7 +21141,7 @@ $root.proto = (function() { 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) + else if (object.conversionData.length >= 0) message.conversionData = object.conversionData; if (object.sourceUrl != null) message.sourceUrl = String(object.sourceUrl); @@ -6978,6 +21158,12 @@ $root.proto = (function() { if (object.thumbnailUrl != null) message.thumbnailUrl = String(object.thumbnailUrl); switch (object.mediaType) { + default: + if (typeof object.mediaType === "number") { + message.mediaType = object.mediaType; + break; + } + break; case "NONE": case 0: message.mediaType = 0; @@ -7011,50 +21197,66 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.conversionSource = ""; - if (options.bytes === String) - object.conversionData = ""; - else { - object.conversionData = []; - if (options.bytes !== Array) - object.conversionData = $util.newBuffer(object.conversionData); - } - object.sourceUrl = ""; - object.sourceId = ""; - object.sourceType = ""; - object.title = ""; - object.description = ""; - object.thumbnail = ""; - object.thumbnailUrl = ""; - object.mediaType = options.enums === String ? "NONE" : 0; - object.mediaUrl = ""; - object.isSuspiciousLink = false; - } - if (message.conversionSource != null && message.hasOwnProperty("conversionSource")) + if (message.conversionSource != null && message.hasOwnProperty("conversionSource")) { object.conversionSource = message.conversionSource; - if (message.conversionData != null && message.hasOwnProperty("conversionData")) + if (options.oneofs) + object._conversionSource = "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.sourceUrl != null && message.hasOwnProperty("sourceUrl")) + if (options.oneofs) + object._conversionData = "conversionData"; + } + if (message.sourceUrl != null && message.hasOwnProperty("sourceUrl")) { object.sourceUrl = message.sourceUrl; - if (message.sourceId != null && message.hasOwnProperty("sourceId")) + if (options.oneofs) + object._sourceUrl = "sourceUrl"; + } + if (message.sourceId != null && message.hasOwnProperty("sourceId")) { object.sourceId = message.sourceId; - if (message.sourceType != null && message.hasOwnProperty("sourceType")) + if (options.oneofs) + object._sourceId = "sourceId"; + } + if (message.sourceType != null && message.hasOwnProperty("sourceType")) { object.sourceType = message.sourceType; - if (message.title != null && message.hasOwnProperty("title")) + if (options.oneofs) + object._sourceType = "sourceType"; + } + if (message.title != null && message.hasOwnProperty("title")) { object.title = message.title; - if (message.description != null && message.hasOwnProperty("description")) + if (options.oneofs) + object._title = "title"; + } + if (message.description != null && message.hasOwnProperty("description")) { object.description = message.description; - if (message.thumbnail != null && message.hasOwnProperty("thumbnail")) + if (options.oneofs) + object._description = "description"; + } + if (message.thumbnail != null && message.hasOwnProperty("thumbnail")) { object.thumbnail = message.thumbnail; - if (message.thumbnailUrl != null && message.hasOwnProperty("thumbnailUrl")) + if (options.oneofs) + object._thumbnail = "thumbnail"; + } + if (message.thumbnailUrl != null && message.hasOwnProperty("thumbnailUrl")) { object.thumbnailUrl = message.thumbnailUrl; - if (message.mediaType != null && message.hasOwnProperty("mediaType")) - object.mediaType = options.enums === String ? $root.proto.ChatRowOpaqueData.DraftMessage.CtwaContextData.ContextInfoExternalAdReplyInfoMediaType[message.mediaType] : message.mediaType; - if (message.mediaUrl != null && message.hasOwnProperty("mediaUrl")) + if (options.oneofs) + object._thumbnailUrl = "thumbnailUrl"; + } + if (message.mediaType != null && message.hasOwnProperty("mediaType")) { + object.mediaType = options.enums === String ? $root.proto.ChatRowOpaqueData.DraftMessage.CtwaContextData.ContextInfoExternalAdReplyInfoMediaType[message.mediaType] === undefined ? message.mediaType : $root.proto.ChatRowOpaqueData.DraftMessage.CtwaContextData.ContextInfoExternalAdReplyInfoMediaType[message.mediaType] : message.mediaType; + if (options.oneofs) + object._mediaType = "mediaType"; + } + if (message.mediaUrl != null && message.hasOwnProperty("mediaUrl")) { object.mediaUrl = message.mediaUrl; - if (message.isSuspiciousLink != null && message.hasOwnProperty("isSuspiciousLink")) + if (options.oneofs) + object._mediaUrl = "mediaUrl"; + } + if (message.isSuspiciousLink != null && message.hasOwnProperty("isSuspiciousLink")) { object.isSuspiciousLink = message.isSuspiciousLink; + if (options.oneofs) + object._isSuspiciousLink = "isSuspiciousLink"; + } return object; }; @@ -7069,6 +21271,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CtwaContextData + * @function getTypeUrl + * @memberof proto.ChatRowOpaqueData.DraftMessage.CtwaContextData + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CtwaContextData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.ChatRowOpaqueData.DraftMessage.CtwaContextData"; + }; + /** * ContextInfoExternalAdReplyInfoMediaType enum. * @name proto.ChatRowOpaqueData.DraftMessage.CtwaContextData.ContextInfoExternalAdReplyInfoMediaType @@ -7117,35 +21334,62 @@ $root.proto = (function() { /** * CtwaContextLinkData context. - * @member {string} context + * @member {string|null|undefined} context * @memberof proto.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData * @instance */ - CtwaContextLinkData.prototype.context = ""; + CtwaContextLinkData.prototype.context = null; /** * CtwaContextLinkData sourceUrl. - * @member {string} sourceUrl + * @member {string|null|undefined} sourceUrl * @memberof proto.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData * @instance */ - CtwaContextLinkData.prototype.sourceUrl = ""; + CtwaContextLinkData.prototype.sourceUrl = null; /** * CtwaContextLinkData icebreaker. - * @member {string} icebreaker + * @member {string|null|undefined} icebreaker * @memberof proto.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData * @instance */ - CtwaContextLinkData.prototype.icebreaker = ""; + CtwaContextLinkData.prototype.icebreaker = null; /** * CtwaContextLinkData phone. - * @member {string} phone + * @member {string|null|undefined} phone * @memberof proto.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData * @instance */ - CtwaContextLinkData.prototype.phone = ""; + CtwaContextLinkData.prototype.phone = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CtwaContextLinkData.prototype, "_context", { + get: $util.oneOfGetter($oneOfFields = ["context"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CtwaContextLinkData.prototype, "_sourceUrl", { + get: $util.oneOfGetter($oneOfFields = ["sourceUrl"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CtwaContextLinkData.prototype, "_icebreaker", { + get: $util.oneOfGetter($oneOfFields = ["icebreaker"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CtwaContextLinkData.prototype, "_phone", { + get: $util.oneOfGetter($oneOfFields = ["phone"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new CtwaContextLinkData instance using the specified properties. @@ -7213,18 +21457,22 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.context = reader.string(); - break; - case 2: - message.sourceUrl = reader.string(); - break; - case 3: - message.icebreaker = reader.string(); - break; - case 4: - message.phone = reader.string(); - break; + case 1: { + message.context = reader.string(); + break; + } + case 2: { + message.sourceUrl = reader.string(); + break; + } + case 3: { + message.icebreaker = reader.string(); + break; + } + case 4: { + message.phone = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -7260,18 +21508,27 @@ $root.proto = (function() { CtwaContextLinkData.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.context != null && message.hasOwnProperty("context")) + var properties = {}; + if (message.context != null && message.hasOwnProperty("context")) { + properties._context = 1; if (!$util.isString(message.context)) return "context: string expected"; - if (message.sourceUrl != null && message.hasOwnProperty("sourceUrl")) + } + if (message.sourceUrl != null && message.hasOwnProperty("sourceUrl")) { + properties._sourceUrl = 1; if (!$util.isString(message.sourceUrl)) return "sourceUrl: string expected"; - if (message.icebreaker != null && message.hasOwnProperty("icebreaker")) + } + if (message.icebreaker != null && message.hasOwnProperty("icebreaker")) { + properties._icebreaker = 1; if (!$util.isString(message.icebreaker)) return "icebreaker: string expected"; - if (message.phone != null && message.hasOwnProperty("phone")) + } + if (message.phone != null && message.hasOwnProperty("phone")) { + properties._phone = 1; if (!$util.isString(message.phone)) return "phone: string expected"; + } return null; }; @@ -7311,20 +21568,26 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.context = ""; - object.sourceUrl = ""; - object.icebreaker = ""; - object.phone = ""; - } - if (message.context != null && message.hasOwnProperty("context")) + if (message.context != null && message.hasOwnProperty("context")) { object.context = message.context; - if (message.sourceUrl != null && message.hasOwnProperty("sourceUrl")) + if (options.oneofs) + object._context = "context"; + } + if (message.sourceUrl != null && message.hasOwnProperty("sourceUrl")) { object.sourceUrl = message.sourceUrl; - if (message.icebreaker != null && message.hasOwnProperty("icebreaker")) + if (options.oneofs) + object._sourceUrl = "sourceUrl"; + } + if (message.icebreaker != null && message.hasOwnProperty("icebreaker")) { object.icebreaker = message.icebreaker; - if (message.phone != null && message.hasOwnProperty("phone")) + if (options.oneofs) + object._icebreaker = "icebreaker"; + } + if (message.phone != null && message.hasOwnProperty("phone")) { object.phone = message.phone; + if (options.oneofs) + object._phone = "phone"; + } return object; }; @@ -7339,6 +21602,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CtwaContextLinkData + * @function getTypeUrl + * @memberof proto.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CtwaContextLinkData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData"; + }; + return CtwaContextLinkData; })(); @@ -7348,6 +21626,528 @@ $root.proto = (function() { return ChatRowOpaqueData; })(); + proto.Citation = (function() { + + /** + * Properties of a Citation. + * @memberof proto + * @interface ICitation + * @property {string} title Citation title + * @property {string} subtitle Citation subtitle + * @property {string} cmsId Citation cmsId + * @property {string} imageUrl Citation imageUrl + */ + + /** + * Constructs a new Citation. + * @memberof proto + * @classdesc Represents a Citation. + * @implements ICitation + * @constructor + * @param {proto.ICitation=} [properties] Properties to set + */ + function Citation(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Citation title. + * @member {string} title + * @memberof proto.Citation + * @instance + */ + Citation.prototype.title = ""; + + /** + * Citation subtitle. + * @member {string} subtitle + * @memberof proto.Citation + * @instance + */ + Citation.prototype.subtitle = ""; + + /** + * Citation cmsId. + * @member {string} cmsId + * @memberof proto.Citation + * @instance + */ + Citation.prototype.cmsId = ""; + + /** + * Citation imageUrl. + * @member {string} imageUrl + * @memberof proto.Citation + * @instance + */ + Citation.prototype.imageUrl = ""; + + /** + * Creates a new Citation instance using the specified properties. + * @function create + * @memberof proto.Citation + * @static + * @param {proto.ICitation=} [properties] Properties to set + * @returns {proto.Citation} Citation instance + */ + Citation.create = function create(properties) { + return new Citation(properties); + }; + + /** + * Encodes the specified Citation message. Does not implicitly {@link proto.Citation.verify|verify} messages. + * @function encode + * @memberof proto.Citation + * @static + * @param {proto.ICitation} message Citation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Citation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.title); + writer.uint32(/* id 2, wireType 2 =*/18).string(message.subtitle); + writer.uint32(/* id 3, wireType 2 =*/26).string(message.cmsId); + writer.uint32(/* id 4, wireType 2 =*/34).string(message.imageUrl); + return writer; + }; + + /** + * Encodes the specified Citation message, length delimited. Does not implicitly {@link proto.Citation.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Citation + * @static + * @param {proto.ICitation} message Citation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Citation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Citation message from the specified reader or buffer. + * @function decode + * @memberof proto.Citation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Citation} Citation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Citation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.Citation(); + 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 3: { + message.cmsId = reader.string(); + break; + } + case 4: { + message.imageUrl = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("title")) + throw $util.ProtocolError("missing required 'title'", { instance: message }); + if (!message.hasOwnProperty("subtitle")) + throw $util.ProtocolError("missing required 'subtitle'", { instance: message }); + if (!message.hasOwnProperty("cmsId")) + throw $util.ProtocolError("missing required 'cmsId'", { instance: message }); + if (!message.hasOwnProperty("imageUrl")) + throw $util.ProtocolError("missing required 'imageUrl'", { instance: message }); + return message; + }; + + /** + * Decodes a Citation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Citation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Citation} Citation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Citation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Citation message. + * @function verify + * @memberof proto.Citation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Citation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isString(message.title)) + return "title: string expected"; + if (!$util.isString(message.subtitle)) + return "subtitle: string expected"; + if (!$util.isString(message.cmsId)) + return "cmsId: string expected"; + if (!$util.isString(message.imageUrl)) + return "imageUrl: string expected"; + return null; + }; + + /** + * Creates a Citation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Citation + * @static + * @param {Object.} object Plain object + * @returns {proto.Citation} Citation + */ + Citation.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Citation) + return object; + var message = new $root.proto.Citation(); + if (object.title != null) + message.title = String(object.title); + if (object.subtitle != null) + message.subtitle = String(object.subtitle); + if (object.cmsId != null) + message.cmsId = String(object.cmsId); + if (object.imageUrl != null) + message.imageUrl = String(object.imageUrl); + return message; + }; + + /** + * Creates a plain object from a Citation message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Citation + * @static + * @param {proto.Citation} message Citation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Citation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.title = ""; + object.subtitle = ""; + object.cmsId = ""; + object.imageUrl = ""; + } + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; + if (message.subtitle != null && message.hasOwnProperty("subtitle")) + object.subtitle = message.subtitle; + if (message.cmsId != null && message.hasOwnProperty("cmsId")) + object.cmsId = message.cmsId; + if (message.imageUrl != null && message.hasOwnProperty("imageUrl")) + object.imageUrl = message.imageUrl; + return object; + }; + + /** + * Converts this Citation to JSON. + * @function toJSON + * @memberof proto.Citation + * @instance + * @returns {Object.} JSON object + */ + Citation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Citation + * @function getTypeUrl + * @memberof proto.Citation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Citation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Citation"; + }; + + return Citation; + })(); + + proto.ClientPairingProps = (function() { + + /** + * Properties of a ClientPairingProps. + * @memberof proto + * @interface IClientPairingProps + * @property {boolean|null} [isChatDbLidMigrated] ClientPairingProps isChatDbLidMigrated + * @property {boolean|null} [isSyncdPureLidSession] ClientPairingProps isSyncdPureLidSession + */ + + /** + * Constructs a new ClientPairingProps. + * @memberof proto + * @classdesc Represents a ClientPairingProps. + * @implements IClientPairingProps + * @constructor + * @param {proto.IClientPairingProps=} [properties] Properties to set + */ + function ClientPairingProps(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ClientPairingProps isChatDbLidMigrated. + * @member {boolean|null|undefined} isChatDbLidMigrated + * @memberof proto.ClientPairingProps + * @instance + */ + ClientPairingProps.prototype.isChatDbLidMigrated = null; + + /** + * ClientPairingProps isSyncdPureLidSession. + * @member {boolean|null|undefined} isSyncdPureLidSession + * @memberof proto.ClientPairingProps + * @instance + */ + ClientPairingProps.prototype.isSyncdPureLidSession = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ClientPairingProps.prototype, "_isChatDbLidMigrated", { + get: $util.oneOfGetter($oneOfFields = ["isChatDbLidMigrated"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ClientPairingProps.prototype, "_isSyncdPureLidSession", { + get: $util.oneOfGetter($oneOfFields = ["isSyncdPureLidSession"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ClientPairingProps instance using the specified properties. + * @function create + * @memberof proto.ClientPairingProps + * @static + * @param {proto.IClientPairingProps=} [properties] Properties to set + * @returns {proto.ClientPairingProps} ClientPairingProps instance + */ + ClientPairingProps.create = function create(properties) { + return new ClientPairingProps(properties); + }; + + /** + * Encodes the specified ClientPairingProps message. Does not implicitly {@link proto.ClientPairingProps.verify|verify} messages. + * @function encode + * @memberof proto.ClientPairingProps + * @static + * @param {proto.IClientPairingProps} message ClientPairingProps message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClientPairingProps.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.isChatDbLidMigrated != null && Object.hasOwnProperty.call(message, "isChatDbLidMigrated")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.isChatDbLidMigrated); + if (message.isSyncdPureLidSession != null && Object.hasOwnProperty.call(message, "isSyncdPureLidSession")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isSyncdPureLidSession); + return writer; + }; + + /** + * Encodes the specified ClientPairingProps message, length delimited. Does not implicitly {@link proto.ClientPairingProps.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.ClientPairingProps + * @static + * @param {proto.IClientPairingProps} message ClientPairingProps message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClientPairingProps.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ClientPairingProps message from the specified reader or buffer. + * @function decode + * @memberof proto.ClientPairingProps + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.ClientPairingProps} ClientPairingProps + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClientPairingProps.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.ClientPairingProps(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.isChatDbLidMigrated = reader.bool(); + break; + } + case 2: { + message.isSyncdPureLidSession = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ClientPairingProps message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.ClientPairingProps + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.ClientPairingProps} ClientPairingProps + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClientPairingProps.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ClientPairingProps message. + * @function verify + * @memberof proto.ClientPairingProps + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ClientPairingProps.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.isChatDbLidMigrated != null && message.hasOwnProperty("isChatDbLidMigrated")) { + properties._isChatDbLidMigrated = 1; + if (typeof message.isChatDbLidMigrated !== "boolean") + return "isChatDbLidMigrated: boolean expected"; + } + if (message.isSyncdPureLidSession != null && message.hasOwnProperty("isSyncdPureLidSession")) { + properties._isSyncdPureLidSession = 1; + if (typeof message.isSyncdPureLidSession !== "boolean") + return "isSyncdPureLidSession: boolean expected"; + } + return null; + }; + + /** + * Creates a ClientPairingProps message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.ClientPairingProps + * @static + * @param {Object.} object Plain object + * @returns {proto.ClientPairingProps} ClientPairingProps + */ + ClientPairingProps.fromObject = function fromObject(object) { + if (object instanceof $root.proto.ClientPairingProps) + return object; + var message = new $root.proto.ClientPairingProps(); + if (object.isChatDbLidMigrated != null) + message.isChatDbLidMigrated = Boolean(object.isChatDbLidMigrated); + if (object.isSyncdPureLidSession != null) + message.isSyncdPureLidSession = Boolean(object.isSyncdPureLidSession); + return message; + }; + + /** + * Creates a plain object from a ClientPairingProps message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.ClientPairingProps + * @static + * @param {proto.ClientPairingProps} message ClientPairingProps + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ClientPairingProps.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.isChatDbLidMigrated != null && message.hasOwnProperty("isChatDbLidMigrated")) { + object.isChatDbLidMigrated = message.isChatDbLidMigrated; + if (options.oneofs) + object._isChatDbLidMigrated = "isChatDbLidMigrated"; + } + if (message.isSyncdPureLidSession != null && message.hasOwnProperty("isSyncdPureLidSession")) { + object.isSyncdPureLidSession = message.isSyncdPureLidSession; + if (options.oneofs) + object._isSyncdPureLidSession = "isSyncdPureLidSession"; + } + return object; + }; + + /** + * Converts this ClientPairingProps to JSON. + * @function toJSON + * @memberof proto.ClientPairingProps + * @instance + * @returns {Object.} JSON object + */ + ClientPairingProps.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ClientPairingProps + * @function getTypeUrl + * @memberof proto.ClientPairingProps + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ClientPairingProps.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.ClientPairingProps"; + }; + + return ClientPairingProps; + })(); + proto.ClientPayload = (function() { /** @@ -7381,6 +22181,7 @@ $root.proto = (function() { * @property {number|null} [yearClass] ClientPayload yearClass * @property {number|null} [memClass] ClientPayload memClass * @property {proto.ClientPayload.IInteropData|null} [interopData] ClientPayload interopData + * @property {proto.ClientPayload.TrafficAnonymization|null} [trafficAnonymization] ClientPayload trafficAnonymization */ /** @@ -7401,19 +22202,19 @@ $root.proto = (function() { /** * ClientPayload username. - * @member {number|Long} username + * @member {number|Long|null|undefined} username * @memberof proto.ClientPayload * @instance */ - ClientPayload.prototype.username = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + ClientPayload.prototype.username = null; /** * ClientPayload passive. - * @member {boolean} passive + * @member {boolean|null|undefined} passive * @memberof proto.ClientPayload * @instance */ - ClientPayload.prototype.passive = false; + ClientPayload.prototype.passive = null; /** * ClientPayload userAgent. @@ -7433,43 +22234,43 @@ $root.proto = (function() { /** * ClientPayload pushName. - * @member {string} pushName + * @member {string|null|undefined} pushName * @memberof proto.ClientPayload * @instance */ - ClientPayload.prototype.pushName = ""; + ClientPayload.prototype.pushName = null; /** * ClientPayload sessionId. - * @member {number} sessionId + * @member {number|null|undefined} sessionId * @memberof proto.ClientPayload * @instance */ - ClientPayload.prototype.sessionId = 0; + ClientPayload.prototype.sessionId = null; /** * ClientPayload shortConnect. - * @member {boolean} shortConnect + * @member {boolean|null|undefined} shortConnect * @memberof proto.ClientPayload * @instance */ - ClientPayload.prototype.shortConnect = false; + ClientPayload.prototype.shortConnect = null; /** * ClientPayload connectType. - * @member {proto.ClientPayload.ConnectType} connectType + * @member {proto.ClientPayload.ConnectType|null|undefined} connectType * @memberof proto.ClientPayload * @instance */ - ClientPayload.prototype.connectType = 0; + ClientPayload.prototype.connectType = null; /** * ClientPayload connectReason. - * @member {proto.ClientPayload.ConnectReason} connectReason + * @member {proto.ClientPayload.ConnectReason|null|undefined} connectReason * @memberof proto.ClientPayload * @instance */ - ClientPayload.prototype.connectReason = 0; + ClientPayload.prototype.connectReason = null; /** * ClientPayload shards. @@ -7489,19 +22290,19 @@ $root.proto = (function() { /** * ClientPayload connectAttemptCount. - * @member {number} connectAttemptCount + * @member {number|null|undefined} connectAttemptCount * @memberof proto.ClientPayload * @instance */ - ClientPayload.prototype.connectAttemptCount = 0; + ClientPayload.prototype.connectAttemptCount = null; /** * ClientPayload device. - * @member {number} device + * @member {number|null|undefined} device * @memberof proto.ClientPayload * @instance */ - ClientPayload.prototype.device = 0; + ClientPayload.prototype.device = null; /** * ClientPayload devicePairingData. @@ -7513,99 +22314,99 @@ $root.proto = (function() { /** * ClientPayload product. - * @member {proto.ClientPayload.Product} product + * @member {proto.ClientPayload.Product|null|undefined} product * @memberof proto.ClientPayload * @instance */ - ClientPayload.prototype.product = 0; + ClientPayload.prototype.product = null; /** * ClientPayload fbCat. - * @member {Uint8Array} fbCat + * @member {Uint8Array|null|undefined} fbCat * @memberof proto.ClientPayload * @instance */ - ClientPayload.prototype.fbCat = $util.newBuffer([]); + ClientPayload.prototype.fbCat = null; /** * ClientPayload fbUserAgent. - * @member {Uint8Array} fbUserAgent + * @member {Uint8Array|null|undefined} fbUserAgent * @memberof proto.ClientPayload * @instance */ - ClientPayload.prototype.fbUserAgent = $util.newBuffer([]); + ClientPayload.prototype.fbUserAgent = null; /** * ClientPayload oc. - * @member {boolean} oc + * @member {boolean|null|undefined} oc * @memberof proto.ClientPayload * @instance */ - ClientPayload.prototype.oc = false; + ClientPayload.prototype.oc = null; /** * ClientPayload lc. - * @member {number} lc + * @member {number|null|undefined} lc * @memberof proto.ClientPayload * @instance */ - ClientPayload.prototype.lc = 0; + ClientPayload.prototype.lc = null; /** * ClientPayload iosAppExtension. - * @member {proto.ClientPayload.IOSAppExtension} iosAppExtension + * @member {proto.ClientPayload.IOSAppExtension|null|undefined} iosAppExtension * @memberof proto.ClientPayload * @instance */ - ClientPayload.prototype.iosAppExtension = 0; + ClientPayload.prototype.iosAppExtension = null; /** * ClientPayload fbAppId. - * @member {number|Long} fbAppId + * @member {number|Long|null|undefined} fbAppId * @memberof proto.ClientPayload * @instance */ - ClientPayload.prototype.fbAppId = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + ClientPayload.prototype.fbAppId = null; /** * ClientPayload fbDeviceId. - * @member {Uint8Array} fbDeviceId + * @member {Uint8Array|null|undefined} fbDeviceId * @memberof proto.ClientPayload * @instance */ - ClientPayload.prototype.fbDeviceId = $util.newBuffer([]); + ClientPayload.prototype.fbDeviceId = null; /** * ClientPayload pull. - * @member {boolean} pull + * @member {boolean|null|undefined} pull * @memberof proto.ClientPayload * @instance */ - ClientPayload.prototype.pull = false; + ClientPayload.prototype.pull = null; /** * ClientPayload paddingBytes. - * @member {Uint8Array} paddingBytes + * @member {Uint8Array|null|undefined} paddingBytes * @memberof proto.ClientPayload * @instance */ - ClientPayload.prototype.paddingBytes = $util.newBuffer([]); + ClientPayload.prototype.paddingBytes = null; /** * ClientPayload yearClass. - * @member {number} yearClass + * @member {number|null|undefined} yearClass * @memberof proto.ClientPayload * @instance */ - ClientPayload.prototype.yearClass = 0; + ClientPayload.prototype.yearClass = null; /** * ClientPayload memClass. - * @member {number} memClass + * @member {number|null|undefined} memClass * @memberof proto.ClientPayload * @instance */ - ClientPayload.prototype.memClass = 0; + ClientPayload.prototype.memClass = null; /** * ClientPayload interopData. @@ -7615,6 +22416,179 @@ $root.proto = (function() { */ ClientPayload.prototype.interopData = null; + /** + * ClientPayload trafficAnonymization. + * @member {proto.ClientPayload.TrafficAnonymization|null|undefined} trafficAnonymization + * @memberof proto.ClientPayload + * @instance + */ + ClientPayload.prototype.trafficAnonymization = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ClientPayload.prototype, "_username", { + get: $util.oneOfGetter($oneOfFields = ["username"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ClientPayload.prototype, "_passive", { + get: $util.oneOfGetter($oneOfFields = ["passive"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ClientPayload.prototype, "_userAgent", { + get: $util.oneOfGetter($oneOfFields = ["userAgent"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ClientPayload.prototype, "_webInfo", { + get: $util.oneOfGetter($oneOfFields = ["webInfo"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ClientPayload.prototype, "_pushName", { + get: $util.oneOfGetter($oneOfFields = ["pushName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ClientPayload.prototype, "_sessionId", { + get: $util.oneOfGetter($oneOfFields = ["sessionId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ClientPayload.prototype, "_shortConnect", { + get: $util.oneOfGetter($oneOfFields = ["shortConnect"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ClientPayload.prototype, "_connectType", { + get: $util.oneOfGetter($oneOfFields = ["connectType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ClientPayload.prototype, "_connectReason", { + get: $util.oneOfGetter($oneOfFields = ["connectReason"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ClientPayload.prototype, "_dnsSource", { + get: $util.oneOfGetter($oneOfFields = ["dnsSource"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ClientPayload.prototype, "_connectAttemptCount", { + get: $util.oneOfGetter($oneOfFields = ["connectAttemptCount"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ClientPayload.prototype, "_device", { + get: $util.oneOfGetter($oneOfFields = ["device"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ClientPayload.prototype, "_devicePairingData", { + get: $util.oneOfGetter($oneOfFields = ["devicePairingData"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ClientPayload.prototype, "_product", { + get: $util.oneOfGetter($oneOfFields = ["product"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ClientPayload.prototype, "_fbCat", { + get: $util.oneOfGetter($oneOfFields = ["fbCat"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ClientPayload.prototype, "_fbUserAgent", { + get: $util.oneOfGetter($oneOfFields = ["fbUserAgent"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ClientPayload.prototype, "_oc", { + get: $util.oneOfGetter($oneOfFields = ["oc"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ClientPayload.prototype, "_lc", { + get: $util.oneOfGetter($oneOfFields = ["lc"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ClientPayload.prototype, "_iosAppExtension", { + get: $util.oneOfGetter($oneOfFields = ["iosAppExtension"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ClientPayload.prototype, "_fbAppId", { + get: $util.oneOfGetter($oneOfFields = ["fbAppId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ClientPayload.prototype, "_fbDeviceId", { + get: $util.oneOfGetter($oneOfFields = ["fbDeviceId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ClientPayload.prototype, "_pull", { + get: $util.oneOfGetter($oneOfFields = ["pull"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ClientPayload.prototype, "_paddingBytes", { + get: $util.oneOfGetter($oneOfFields = ["paddingBytes"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ClientPayload.prototype, "_yearClass", { + get: $util.oneOfGetter($oneOfFields = ["yearClass"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ClientPayload.prototype, "_memClass", { + get: $util.oneOfGetter($oneOfFields = ["memClass"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ClientPayload.prototype, "_interopData", { + get: $util.oneOfGetter($oneOfFields = ["interopData"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ClientPayload.prototype, "_trafficAnonymization", { + get: $util.oneOfGetter($oneOfFields = ["trafficAnonymization"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new ClientPayload instance using the specified properties. * @function create @@ -7657,9 +22631,12 @@ $root.proto = (function() { writer.uint32(/* id 12, wireType 0 =*/96).int32(message.connectType); if (message.connectReason != null && Object.hasOwnProperty.call(message, "connectReason")) writer.uint32(/* id 13, wireType 0 =*/104).int32(message.connectReason); - if (message.shards != null && message.shards.length) + if (message.shards != null && message.shards.length) { + writer.uint32(/* id 14, wireType 2 =*/114).fork(); for (var i = 0; i < message.shards.length; ++i) - writer.uint32(/* id 14, wireType 0 =*/112).int32(message.shards[i]); + writer.int32(message.shards[i]); + writer.ldelim(); + } if (message.dnsSource != null && Object.hasOwnProperty.call(message, "dnsSource")) $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")) @@ -7694,6 +22671,8 @@ $root.proto = (function() { writer.uint32(/* id 37, wireType 0 =*/296).int32(message.memClass); if (message.interopData != null && Object.hasOwnProperty.call(message, "interopData")) $root.proto.ClientPayload.InteropData.encode(message.interopData, writer.uint32(/* id 38, wireType 2 =*/306).fork()).ldelim(); + if (message.trafficAnonymization != null && Object.hasOwnProperty.call(message, "trafficAnonymization")) + writer.uint32(/* id 40, wireType 0 =*/320).int32(message.trafficAnonymization); return writer; }; @@ -7728,94 +22707,125 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.username = reader.uint64(); - break; - case 3: - message.passive = reader.bool(); - break; - case 5: - message.userAgent = $root.proto.ClientPayload.UserAgent.decode(reader, reader.uint32()); - break; - case 6: - message.webInfo = $root.proto.ClientPayload.WebInfo.decode(reader, reader.uint32()); - break; - case 7: - message.pushName = reader.string(); - break; - case 9: - message.sessionId = reader.sfixed32(); - break; - case 10: - message.shortConnect = reader.bool(); - break; - case 12: - message.connectType = reader.int32(); - break; - case 13: - message.connectReason = reader.int32(); - break; - case 14: - if (!(message.shards && message.shards.length)) - message.shards = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) + case 1: { + message.username = reader.uint64(); + break; + } + case 3: { + message.passive = reader.bool(); + break; + } + case 5: { + message.userAgent = $root.proto.ClientPayload.UserAgent.decode(reader, reader.uint32()); + break; + } + case 6: { + message.webInfo = $root.proto.ClientPayload.WebInfo.decode(reader, reader.uint32()); + break; + } + case 7: { + message.pushName = reader.string(); + break; + } + case 9: { + message.sessionId = reader.sfixed32(); + break; + } + case 10: { + message.shortConnect = reader.bool(); + break; + } + case 12: { + message.connectType = reader.int32(); + break; + } + case 13: { + message.connectReason = reader.int32(); + break; + } + case 14: { + if (!(message.shards && message.shards.length)) + message.shards = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.shards.push(reader.int32()); + } else message.shards.push(reader.int32()); - } else - message.shards.push(reader.int32()); - break; - case 15: - message.dnsSource = $root.proto.ClientPayload.DNSSource.decode(reader, reader.uint32()); - break; - case 16: - message.connectAttemptCount = reader.uint32(); - break; - case 18: - message.device = reader.uint32(); - break; - case 19: - message.devicePairingData = $root.proto.ClientPayload.DevicePairingRegistrationData.decode(reader, reader.uint32()); - break; - case 20: - message.product = reader.int32(); - break; - case 21: - message.fbCat = reader.bytes(); - break; - case 22: - message.fbUserAgent = reader.bytes(); - break; - case 23: - message.oc = reader.bool(); - break; - case 24: - message.lc = reader.int32(); - break; - case 30: - message.iosAppExtension = reader.int32(); - break; - case 31: - message.fbAppId = reader.uint64(); - break; - case 32: - message.fbDeviceId = reader.bytes(); - break; - case 33: - message.pull = reader.bool(); - break; - case 34: - message.paddingBytes = reader.bytes(); - break; - case 36: - message.yearClass = reader.int32(); - break; - case 37: - message.memClass = reader.int32(); - break; - case 38: - message.interopData = $root.proto.ClientPayload.InteropData.decode(reader, reader.uint32()); - break; + break; + } + case 15: { + message.dnsSource = $root.proto.ClientPayload.DNSSource.decode(reader, reader.uint32()); + break; + } + case 16: { + message.connectAttemptCount = reader.uint32(); + break; + } + case 18: { + message.device = reader.uint32(); + break; + } + case 19: { + message.devicePairingData = $root.proto.ClientPayload.DevicePairingRegistrationData.decode(reader, reader.uint32()); + break; + } + case 20: { + message.product = reader.int32(); + break; + } + case 21: { + message.fbCat = reader.bytes(); + break; + } + case 22: { + message.fbUserAgent = reader.bytes(); + break; + } + case 23: { + message.oc = reader.bool(); + break; + } + case 24: { + message.lc = reader.int32(); + break; + } + case 30: { + message.iosAppExtension = reader.int32(); + break; + } + case 31: { + message.fbAppId = reader.uint64(); + break; + } + case 32: { + message.fbDeviceId = reader.bytes(); + break; + } + case 33: { + message.pull = reader.bool(); + break; + } + case 34: { + message.paddingBytes = reader.bytes(); + break; + } + case 36: { + message.yearClass = reader.int32(); + break; + } + case 37: { + message.memClass = reader.int32(); + break; + } + case 38: { + message.interopData = $root.proto.ClientPayload.InteropData.decode(reader, reader.uint32()); + break; + } + case 40: { + message.trafficAnonymization = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -7851,32 +22861,50 @@ $root.proto = (function() { ClientPayload.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.username != null && message.hasOwnProperty("username")) + var properties = {}; + if (message.username != null && message.hasOwnProperty("username")) { + properties._username = 1; if (!$util.isInteger(message.username) && !(message.username && $util.isInteger(message.username.low) && $util.isInteger(message.username.high))) return "username: integer|Long expected"; - if (message.passive != null && message.hasOwnProperty("passive")) + } + if (message.passive != null && message.hasOwnProperty("passive")) { + properties._passive = 1; if (typeof message.passive !== "boolean") return "passive: boolean expected"; + } if (message.userAgent != null && message.hasOwnProperty("userAgent")) { - var error = $root.proto.ClientPayload.UserAgent.verify(message.userAgent); - if (error) - return "userAgent." + error; + properties._userAgent = 1; + { + 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.ClientPayload.WebInfo.verify(message.webInfo); - if (error) - return "webInfo." + error; + properties._webInfo = 1; + { + var error = $root.proto.ClientPayload.WebInfo.verify(message.webInfo); + if (error) + return "webInfo." + error; + } } - if (message.pushName != null && message.hasOwnProperty("pushName")) + if (message.pushName != null && message.hasOwnProperty("pushName")) { + properties._pushName = 1; if (!$util.isString(message.pushName)) return "pushName: string expected"; - if (message.sessionId != null && message.hasOwnProperty("sessionId")) + } + if (message.sessionId != null && message.hasOwnProperty("sessionId")) { + properties._sessionId = 1; if (!$util.isInteger(message.sessionId)) return "sessionId: integer expected"; - if (message.shortConnect != null && message.hasOwnProperty("shortConnect")) + } + if (message.shortConnect != null && message.hasOwnProperty("shortConnect")) { + properties._shortConnect = 1; if (typeof message.shortConnect !== "boolean") return "shortConnect: boolean expected"; - if (message.connectType != null && message.hasOwnProperty("connectType")) + } + if (message.connectType != null && message.hasOwnProperty("connectType")) { + properties._connectType = 1; switch (message.connectType) { default: return "connectType: enum value expected"; @@ -7897,7 +22925,9 @@ $root.proto = (function() { case 112: break; } - if (message.connectReason != null && message.hasOwnProperty("connectReason")) + } + if (message.connectReason != null && message.hasOwnProperty("connectReason")) { + properties._connectReason = 1; switch (message.connectReason) { default: return "connectReason: enum value expected"; @@ -7910,6 +22940,7 @@ $root.proto = (function() { case 6: break; } + } if (message.shards != null && message.hasOwnProperty("shards")) { if (!Array.isArray(message.shards)) return "shards: array expected"; @@ -7918,22 +22949,33 @@ $root.proto = (function() { return "shards: integer[] expected"; } if (message.dnsSource != null && message.hasOwnProperty("dnsSource")) { - var error = $root.proto.ClientPayload.DNSSource.verify(message.dnsSource); - if (error) - return "dnsSource." + error; + properties._dnsSource = 1; + { + var error = $root.proto.ClientPayload.DNSSource.verify(message.dnsSource); + if (error) + return "dnsSource." + error; + } } - if (message.connectAttemptCount != null && message.hasOwnProperty("connectAttemptCount")) + if (message.connectAttemptCount != null && message.hasOwnProperty("connectAttemptCount")) { + properties._connectAttemptCount = 1; if (!$util.isInteger(message.connectAttemptCount)) return "connectAttemptCount: integer expected"; - if (message.device != null && message.hasOwnProperty("device")) + } + if (message.device != null && message.hasOwnProperty("device")) { + properties._device = 1; if (!$util.isInteger(message.device)) return "device: integer expected"; - if (message.devicePairingData != null && message.hasOwnProperty("devicePairingData")) { - var error = $root.proto.ClientPayload.DevicePairingRegistrationData.verify(message.devicePairingData); - if (error) - return "devicePairingData." + error; } - if (message.product != null && message.hasOwnProperty("product")) + if (message.devicePairingData != null && message.hasOwnProperty("devicePairingData")) { + properties._devicePairingData = 1; + { + var error = $root.proto.ClientPayload.DevicePairingRegistrationData.verify(message.devicePairingData); + if (error) + return "devicePairingData." + error; + } + } + if (message.product != null && message.hasOwnProperty("product")) { + properties._product = 1; switch (message.product) { default: return "product: enum value expected"; @@ -7943,19 +22985,29 @@ $root.proto = (function() { case 3: break; } - if (message.fbCat != null && message.hasOwnProperty("fbCat")) + } + if (message.fbCat != null && message.hasOwnProperty("fbCat")) { + properties._fbCat = 1; if (!(message.fbCat && typeof message.fbCat.length === "number" || $util.isString(message.fbCat))) return "fbCat: buffer expected"; - if (message.fbUserAgent != null && message.hasOwnProperty("fbUserAgent")) + } + if (message.fbUserAgent != null && message.hasOwnProperty("fbUserAgent")) { + properties._fbUserAgent = 1; if (!(message.fbUserAgent && typeof message.fbUserAgent.length === "number" || $util.isString(message.fbUserAgent))) return "fbUserAgent: buffer expected"; - if (message.oc != null && message.hasOwnProperty("oc")) + } + if (message.oc != null && message.hasOwnProperty("oc")) { + properties._oc = 1; if (typeof message.oc !== "boolean") return "oc: boolean expected"; - if (message.lc != null && message.hasOwnProperty("lc")) + } + if (message.lc != null && message.hasOwnProperty("lc")) { + properties._lc = 1; if (!$util.isInteger(message.lc)) return "lc: integer expected"; - if (message.iosAppExtension != null && message.hasOwnProperty("iosAppExtension")) + } + if (message.iosAppExtension != null && message.hasOwnProperty("iosAppExtension")) { + properties._iosAppExtension = 1; switch (message.iosAppExtension) { default: return "iosAppExtension: enum value expected"; @@ -7964,28 +23016,54 @@ $root.proto = (function() { case 2: break; } - if (message.fbAppId != null && message.hasOwnProperty("fbAppId")) + } + if (message.fbAppId != null && message.hasOwnProperty("fbAppId")) { + properties._fbAppId = 1; if (!$util.isInteger(message.fbAppId) && !(message.fbAppId && $util.isInteger(message.fbAppId.low) && $util.isInteger(message.fbAppId.high))) return "fbAppId: integer|Long expected"; - if (message.fbDeviceId != null && message.hasOwnProperty("fbDeviceId")) + } + if (message.fbDeviceId != null && message.hasOwnProperty("fbDeviceId")) { + properties._fbDeviceId = 1; if (!(message.fbDeviceId && typeof message.fbDeviceId.length === "number" || $util.isString(message.fbDeviceId))) return "fbDeviceId: buffer expected"; - if (message.pull != null && message.hasOwnProperty("pull")) + } + if (message.pull != null && message.hasOwnProperty("pull")) { + properties._pull = 1; if (typeof message.pull !== "boolean") return "pull: boolean expected"; - if (message.paddingBytes != null && message.hasOwnProperty("paddingBytes")) + } + if (message.paddingBytes != null && message.hasOwnProperty("paddingBytes")) { + properties._paddingBytes = 1; if (!(message.paddingBytes && typeof message.paddingBytes.length === "number" || $util.isString(message.paddingBytes))) return "paddingBytes: buffer expected"; - if (message.yearClass != null && message.hasOwnProperty("yearClass")) + } + if (message.yearClass != null && message.hasOwnProperty("yearClass")) { + properties._yearClass = 1; if (!$util.isInteger(message.yearClass)) return "yearClass: integer expected"; - if (message.memClass != null && message.hasOwnProperty("memClass")) + } + if (message.memClass != null && message.hasOwnProperty("memClass")) { + properties._memClass = 1; if (!$util.isInteger(message.memClass)) return "memClass: integer expected"; + } if (message.interopData != null && message.hasOwnProperty("interopData")) { - var error = $root.proto.ClientPayload.InteropData.verify(message.interopData); - if (error) - return "interopData." + error; + properties._interopData = 1; + { + var error = $root.proto.ClientPayload.InteropData.verify(message.interopData); + if (error) + return "interopData." + error; + } + } + if (message.trafficAnonymization != null && message.hasOwnProperty("trafficAnonymization")) { + properties._trafficAnonymization = 1; + switch (message.trafficAnonymization) { + default: + return "trafficAnonymization: enum value expected"; + case 0: + case 1: + break; + } } return null; }; @@ -8030,6 +23108,12 @@ $root.proto = (function() { if (object.shortConnect != null) message.shortConnect = Boolean(object.shortConnect); switch (object.connectType) { + default: + if (typeof object.connectType === "number") { + message.connectType = object.connectType; + break; + } + break; case "CELLULAR_UNKNOWN": case 0: message.connectType = 0; @@ -8092,6 +23176,12 @@ $root.proto = (function() { break; } switch (object.connectReason) { + default: + if (typeof object.connectReason === "number") { + message.connectReason = object.connectReason; + break; + } + break; case "PUSH": case 0: message.connectReason = 0; @@ -8143,6 +23233,12 @@ $root.proto = (function() { message.devicePairingData = $root.proto.ClientPayload.DevicePairingRegistrationData.fromObject(object.devicePairingData); } switch (object.product) { + default: + if (typeof object.product === "number") { + message.product = object.product; + break; + } + break; case "WHATSAPP": case 0: message.product = 0; @@ -8163,18 +23259,24 @@ $root.proto = (function() { if (object.fbCat != null) if (typeof object.fbCat === "string") $util.base64.decode(object.fbCat, message.fbCat = $util.newBuffer($util.base64.length(object.fbCat)), 0); - else if (object.fbCat.length) + else if (object.fbCat.length >= 0) message.fbCat = object.fbCat; if (object.fbUserAgent != null) if (typeof object.fbUserAgent === "string") $util.base64.decode(object.fbUserAgent, message.fbUserAgent = $util.newBuffer($util.base64.length(object.fbUserAgent)), 0); - else if (object.fbUserAgent.length) + else if (object.fbUserAgent.length >= 0) message.fbUserAgent = object.fbUserAgent; if (object.oc != null) message.oc = Boolean(object.oc); if (object.lc != null) message.lc = object.lc | 0; switch (object.iosAppExtension) { + default: + if (typeof object.iosAppExtension === "number") { + message.iosAppExtension = object.iosAppExtension; + break; + } + break; case "SHARE_EXTENSION": case 0: message.iosAppExtension = 0; @@ -8200,14 +23302,14 @@ $root.proto = (function() { if (object.fbDeviceId != null) if (typeof object.fbDeviceId === "string") $util.base64.decode(object.fbDeviceId, message.fbDeviceId = $util.newBuffer($util.base64.length(object.fbDeviceId)), 0); - else if (object.fbDeviceId.length) + else if (object.fbDeviceId.length >= 0) message.fbDeviceId = object.fbDeviceId; if (object.pull != null) message.pull = Boolean(object.pull); if (object.paddingBytes != null) if (typeof object.paddingBytes === "string") $util.base64.decode(object.paddingBytes, message.paddingBytes = $util.newBuffer($util.base64.length(object.paddingBytes)), 0); - else if (object.paddingBytes.length) + else if (object.paddingBytes.length >= 0) message.paddingBytes = object.paddingBytes; if (object.yearClass != null) message.yearClass = object.yearClass | 0; @@ -8218,6 +23320,22 @@ $root.proto = (function() { throw TypeError(".proto.ClientPayload.interopData: object expected"); message.interopData = $root.proto.ClientPayload.InteropData.fromObject(object.interopData); } + switch (object.trafficAnonymization) { + default: + if (typeof object.trafficAnonymization === "number") { + message.trafficAnonymization = object.trafficAnonymization; + break; + } + break; + case "OFF": + case 0: + message.trafficAnonymization = 0; + break; + case "STANDARD": + case 1: + message.trafficAnonymization = 1; + break; + } return message; }; @@ -8236,129 +23354,152 @@ $root.proto = (function() { var object = {}; if (options.arrays || options.defaults) object.shards = []; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.username = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.username = options.longs === String ? "0" : 0; - object.passive = false; - object.userAgent = null; - object.webInfo = null; - object.pushName = ""; - object.sessionId = 0; - object.shortConnect = false; - object.connectType = options.enums === String ? "CELLULAR_UNKNOWN" : 0; - object.connectReason = options.enums === String ? "PUSH" : 0; - object.dnsSource = null; - object.connectAttemptCount = 0; - object.device = 0; - object.devicePairingData = null; - object.product = options.enums === String ? "WHATSAPP" : 0; - if (options.bytes === String) - object.fbCat = ""; - else { - object.fbCat = []; - if (options.bytes !== Array) - object.fbCat = $util.newBuffer(object.fbCat); - } - if (options.bytes === String) - object.fbUserAgent = ""; - else { - object.fbUserAgent = []; - if (options.bytes !== Array) - object.fbUserAgent = $util.newBuffer(object.fbUserAgent); - } - object.oc = false; - object.lc = 0; - object.iosAppExtension = options.enums === String ? "SHARE_EXTENSION" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.fbAppId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.fbAppId = options.longs === String ? "0" : 0; - if (options.bytes === String) - object.fbDeviceId = ""; - else { - object.fbDeviceId = []; - if (options.bytes !== Array) - object.fbDeviceId = $util.newBuffer(object.fbDeviceId); - } - object.pull = false; - if (options.bytes === String) - object.paddingBytes = ""; - else { - object.paddingBytes = []; - if (options.bytes !== Array) - object.paddingBytes = $util.newBuffer(object.paddingBytes); - } - object.yearClass = 0; - object.memClass = 0; - object.interopData = null; - } - if (message.username != null && message.hasOwnProperty("username")) + if (message.username != null && message.hasOwnProperty("username")) { if (typeof message.username === "number") object.username = options.longs === String ? String(message.username) : message.username; else object.username = options.longs === String ? $util.Long.prototype.toString.call(message.username) : options.longs === Number ? new $util.LongBits(message.username.low >>> 0, message.username.high >>> 0).toNumber(true) : message.username; - if (message.passive != null && message.hasOwnProperty("passive")) + if (options.oneofs) + object._username = "username"; + } + if (message.passive != null && message.hasOwnProperty("passive")) { object.passive = message.passive; - if (message.userAgent != null && message.hasOwnProperty("userAgent")) + if (options.oneofs) + object._passive = "passive"; + } + if (message.userAgent != null && message.hasOwnProperty("userAgent")) { object.userAgent = $root.proto.ClientPayload.UserAgent.toObject(message.userAgent, options); - if (message.webInfo != null && message.hasOwnProperty("webInfo")) + if (options.oneofs) + object._userAgent = "userAgent"; + } + if (message.webInfo != null && message.hasOwnProperty("webInfo")) { object.webInfo = $root.proto.ClientPayload.WebInfo.toObject(message.webInfo, options); - if (message.pushName != null && message.hasOwnProperty("pushName")) + if (options.oneofs) + object._webInfo = "webInfo"; + } + if (message.pushName != null && message.hasOwnProperty("pushName")) { object.pushName = message.pushName; - if (message.sessionId != null && message.hasOwnProperty("sessionId")) + if (options.oneofs) + object._pushName = "pushName"; + } + if (message.sessionId != null && message.hasOwnProperty("sessionId")) { object.sessionId = message.sessionId; - if (message.shortConnect != null && message.hasOwnProperty("shortConnect")) + if (options.oneofs) + object._sessionId = "sessionId"; + } + if (message.shortConnect != null && message.hasOwnProperty("shortConnect")) { object.shortConnect = message.shortConnect; - if (message.connectType != null && message.hasOwnProperty("connectType")) - object.connectType = options.enums === String ? $root.proto.ClientPayload.ConnectType[message.connectType] : message.connectType; - if (message.connectReason != null && message.hasOwnProperty("connectReason")) - object.connectReason = options.enums === String ? $root.proto.ClientPayload.ConnectReason[message.connectReason] : message.connectReason; + if (options.oneofs) + object._shortConnect = "shortConnect"; + } + if (message.connectType != null && message.hasOwnProperty("connectType")) { + object.connectType = options.enums === String ? $root.proto.ClientPayload.ConnectType[message.connectType] === undefined ? message.connectType : $root.proto.ClientPayload.ConnectType[message.connectType] : message.connectType; + if (options.oneofs) + object._connectType = "connectType"; + } + if (message.connectReason != null && message.hasOwnProperty("connectReason")) { + object.connectReason = options.enums === String ? $root.proto.ClientPayload.ConnectReason[message.connectReason] === undefined ? message.connectReason : $root.proto.ClientPayload.ConnectReason[message.connectReason] : message.connectReason; + if (options.oneofs) + object._connectReason = "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")) + if (message.dnsSource != null && message.hasOwnProperty("dnsSource")) { object.dnsSource = $root.proto.ClientPayload.DNSSource.toObject(message.dnsSource, options); - if (message.connectAttemptCount != null && message.hasOwnProperty("connectAttemptCount")) + if (options.oneofs) + object._dnsSource = "dnsSource"; + } + if (message.connectAttemptCount != null && message.hasOwnProperty("connectAttemptCount")) { object.connectAttemptCount = message.connectAttemptCount; - if (message.device != null && message.hasOwnProperty("device")) + if (options.oneofs) + object._connectAttemptCount = "connectAttemptCount"; + } + if (message.device != null && message.hasOwnProperty("device")) { object.device = message.device; - if (message.devicePairingData != null && message.hasOwnProperty("devicePairingData")) + if (options.oneofs) + object._device = "device"; + } + if (message.devicePairingData != null && message.hasOwnProperty("devicePairingData")) { 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.Product[message.product] : message.product; - if (message.fbCat != null && message.hasOwnProperty("fbCat")) + if (options.oneofs) + object._devicePairingData = "devicePairingData"; + } + if (message.product != null && message.hasOwnProperty("product")) { + object.product = options.enums === String ? $root.proto.ClientPayload.Product[message.product] === undefined ? message.product : $root.proto.ClientPayload.Product[message.product] : message.product; + if (options.oneofs) + object._product = "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")) + if (options.oneofs) + object._fbCat = "fbCat"; + } + if (message.fbUserAgent != null && message.hasOwnProperty("fbUserAgent")) { object.fbUserAgent = options.bytes === String ? $util.base64.encode(message.fbUserAgent, 0, message.fbUserAgent.length) : options.bytes === Array ? Array.prototype.slice.call(message.fbUserAgent) : message.fbUserAgent; - if (message.oc != null && message.hasOwnProperty("oc")) + if (options.oneofs) + object._fbUserAgent = "fbUserAgent"; + } + if (message.oc != null && message.hasOwnProperty("oc")) { object.oc = message.oc; - if (message.lc != null && message.hasOwnProperty("lc")) + if (options.oneofs) + object._oc = "oc"; + } + if (message.lc != null && message.hasOwnProperty("lc")) { object.lc = message.lc; - if (message.iosAppExtension != null && message.hasOwnProperty("iosAppExtension")) - object.iosAppExtension = options.enums === String ? $root.proto.ClientPayload.IOSAppExtension[message.iosAppExtension] : message.iosAppExtension; - if (message.fbAppId != null && message.hasOwnProperty("fbAppId")) + if (options.oneofs) + object._lc = "lc"; + } + if (message.iosAppExtension != null && message.hasOwnProperty("iosAppExtension")) { + object.iosAppExtension = options.enums === String ? $root.proto.ClientPayload.IOSAppExtension[message.iosAppExtension] === undefined ? message.iosAppExtension : $root.proto.ClientPayload.IOSAppExtension[message.iosAppExtension] : message.iosAppExtension; + if (options.oneofs) + object._iosAppExtension = "iosAppExtension"; + } + if (message.fbAppId != null && message.hasOwnProperty("fbAppId")) { if (typeof message.fbAppId === "number") object.fbAppId = options.longs === String ? String(message.fbAppId) : message.fbAppId; else object.fbAppId = options.longs === String ? $util.Long.prototype.toString.call(message.fbAppId) : options.longs === Number ? new $util.LongBits(message.fbAppId.low >>> 0, message.fbAppId.high >>> 0).toNumber(true) : message.fbAppId; - if (message.fbDeviceId != null && message.hasOwnProperty("fbDeviceId")) + if (options.oneofs) + object._fbAppId = "fbAppId"; + } + if (message.fbDeviceId != null && message.hasOwnProperty("fbDeviceId")) { object.fbDeviceId = options.bytes === String ? $util.base64.encode(message.fbDeviceId, 0, message.fbDeviceId.length) : options.bytes === Array ? Array.prototype.slice.call(message.fbDeviceId) : message.fbDeviceId; - if (message.pull != null && message.hasOwnProperty("pull")) + if (options.oneofs) + object._fbDeviceId = "fbDeviceId"; + } + if (message.pull != null && message.hasOwnProperty("pull")) { object.pull = message.pull; - if (message.paddingBytes != null && message.hasOwnProperty("paddingBytes")) + if (options.oneofs) + object._pull = "pull"; + } + if (message.paddingBytes != null && message.hasOwnProperty("paddingBytes")) { object.paddingBytes = options.bytes === String ? $util.base64.encode(message.paddingBytes, 0, message.paddingBytes.length) : options.bytes === Array ? Array.prototype.slice.call(message.paddingBytes) : message.paddingBytes; - if (message.yearClass != null && message.hasOwnProperty("yearClass")) + if (options.oneofs) + object._paddingBytes = "paddingBytes"; + } + if (message.yearClass != null && message.hasOwnProperty("yearClass")) { object.yearClass = message.yearClass; - if (message.memClass != null && message.hasOwnProperty("memClass")) + if (options.oneofs) + object._yearClass = "yearClass"; + } + if (message.memClass != null && message.hasOwnProperty("memClass")) { object.memClass = message.memClass; - if (message.interopData != null && message.hasOwnProperty("interopData")) + if (options.oneofs) + object._memClass = "memClass"; + } + if (message.interopData != null && message.hasOwnProperty("interopData")) { object.interopData = $root.proto.ClientPayload.InteropData.toObject(message.interopData, options); + if (options.oneofs) + object._interopData = "interopData"; + } + if (message.trafficAnonymization != null && message.hasOwnProperty("trafficAnonymization")) { + object.trafficAnonymization = options.enums === String ? $root.proto.ClientPayload.TrafficAnonymization[message.trafficAnonymization] === undefined ? message.trafficAnonymization : $root.proto.ClientPayload.TrafficAnonymization[message.trafficAnonymization] : message.trafficAnonymization; + if (options.oneofs) + object._trafficAnonymization = "trafficAnonymization"; + } return object; }; @@ -8373,6 +23514,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ClientPayload + * @function getTypeUrl + * @memberof proto.ClientPayload + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ClientPayload.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.ClientPayload"; + }; + /** * ConnectReason enum. * @name proto.ClientPayload.ConnectReason @@ -8464,19 +23620,34 @@ $root.proto = (function() { /** * DNSSource dnsMethod. - * @member {proto.ClientPayload.DNSSource.DNSResolutionMethod} dnsMethod + * @member {proto.ClientPayload.DNSSource.DNSResolutionMethod|null|undefined} dnsMethod * @memberof proto.ClientPayload.DNSSource * @instance */ - DNSSource.prototype.dnsMethod = 0; + DNSSource.prototype.dnsMethod = null; /** * DNSSource appCached. - * @member {boolean} appCached + * @member {boolean|null|undefined} appCached * @memberof proto.ClientPayload.DNSSource * @instance */ - DNSSource.prototype.appCached = false; + DNSSource.prototype.appCached = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DNSSource.prototype, "_dnsMethod", { + get: $util.oneOfGetter($oneOfFields = ["dnsMethod"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DNSSource.prototype, "_appCached", { + get: $util.oneOfGetter($oneOfFields = ["appCached"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new DNSSource instance using the specified properties. @@ -8540,12 +23711,14 @@ $root.proto = (function() { 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; + case 15: { + message.dnsMethod = reader.int32(); + break; + } + case 16: { + message.appCached = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -8581,7 +23754,9 @@ $root.proto = (function() { DNSSource.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.dnsMethod != null && message.hasOwnProperty("dnsMethod")) + var properties = {}; + if (message.dnsMethod != null && message.hasOwnProperty("dnsMethod")) { + properties._dnsMethod = 1; switch (message.dnsMethod) { default: return "dnsMethod: enum value expected"; @@ -8590,11 +23765,15 @@ $root.proto = (function() { case 2: case 3: case 4: + case 5: break; } - if (message.appCached != null && message.hasOwnProperty("appCached")) + } + if (message.appCached != null && message.hasOwnProperty("appCached")) { + properties._appCached = 1; if (typeof message.appCached !== "boolean") return "appCached: boolean expected"; + } return null; }; @@ -8611,6 +23790,12 @@ $root.proto = (function() { return object; var message = new $root.proto.ClientPayload.DNSSource(); switch (object.dnsMethod) { + default: + if (typeof object.dnsMethod === "number") { + message.dnsMethod = object.dnsMethod; + break; + } + break; case "SYSTEM": case 0: message.dnsMethod = 0; @@ -8631,6 +23816,10 @@ $root.proto = (function() { case 4: message.dnsMethod = 4; break; + case "MNS": + case 5: + message.dnsMethod = 5; + break; } if (object.appCached != null) message.appCached = Boolean(object.appCached); @@ -8650,14 +23839,16 @@ $root.proto = (function() { 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] === undefined ? message.dnsMethod : $root.proto.ClientPayload.DNSSource.DNSResolutionMethod[message.dnsMethod] : message.dnsMethod; + if (options.oneofs) + object._dnsMethod = "dnsMethod"; } - 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")) + if (message.appCached != null && message.hasOwnProperty("appCached")) { object.appCached = message.appCached; + if (options.oneofs) + object._appCached = "appCached"; + } return object; }; @@ -8672,6 +23863,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DNSSource + * @function getTypeUrl + * @memberof proto.ClientPayload.DNSSource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DNSSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.ClientPayload.DNSSource"; + }; + /** * DNSResolutionMethod enum. * @name proto.ClientPayload.DNSSource.DNSResolutionMethod @@ -8681,6 +23887,7 @@ $root.proto = (function() { * @property {number} HARDCODED=2 HARDCODED value * @property {number} OVERRIDE=3 OVERRIDE value * @property {number} FALLBACK=4 FALLBACK value + * @property {number} MNS=5 MNS value */ DNSSource.DNSResolutionMethod = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -8689,6 +23896,7 @@ $root.proto = (function() { values[valuesById[2] = "HARDCODED"] = 2; values[valuesById[3] = "OVERRIDE"] = 3; values[valuesById[4] = "FALLBACK"] = 4; + values[valuesById[5] = "MNS"] = 5; return values; })(); @@ -8728,67 +23936,118 @@ $root.proto = (function() { /** * DevicePairingRegistrationData eRegid. - * @member {Uint8Array} eRegid + * @member {Uint8Array|null|undefined} eRegid * @memberof proto.ClientPayload.DevicePairingRegistrationData * @instance */ - DevicePairingRegistrationData.prototype.eRegid = $util.newBuffer([]); + DevicePairingRegistrationData.prototype.eRegid = null; /** * DevicePairingRegistrationData eKeytype. - * @member {Uint8Array} eKeytype + * @member {Uint8Array|null|undefined} eKeytype * @memberof proto.ClientPayload.DevicePairingRegistrationData * @instance */ - DevicePairingRegistrationData.prototype.eKeytype = $util.newBuffer([]); + DevicePairingRegistrationData.prototype.eKeytype = null; /** * DevicePairingRegistrationData eIdent. - * @member {Uint8Array} eIdent + * @member {Uint8Array|null|undefined} eIdent * @memberof proto.ClientPayload.DevicePairingRegistrationData * @instance */ - DevicePairingRegistrationData.prototype.eIdent = $util.newBuffer([]); + DevicePairingRegistrationData.prototype.eIdent = null; /** * DevicePairingRegistrationData eSkeyId. - * @member {Uint8Array} eSkeyId + * @member {Uint8Array|null|undefined} eSkeyId * @memberof proto.ClientPayload.DevicePairingRegistrationData * @instance */ - DevicePairingRegistrationData.prototype.eSkeyId = $util.newBuffer([]); + DevicePairingRegistrationData.prototype.eSkeyId = null; /** * DevicePairingRegistrationData eSkeyVal. - * @member {Uint8Array} eSkeyVal + * @member {Uint8Array|null|undefined} eSkeyVal * @memberof proto.ClientPayload.DevicePairingRegistrationData * @instance */ - DevicePairingRegistrationData.prototype.eSkeyVal = $util.newBuffer([]); + DevicePairingRegistrationData.prototype.eSkeyVal = null; /** * DevicePairingRegistrationData eSkeySig. - * @member {Uint8Array} eSkeySig + * @member {Uint8Array|null|undefined} eSkeySig * @memberof proto.ClientPayload.DevicePairingRegistrationData * @instance */ - DevicePairingRegistrationData.prototype.eSkeySig = $util.newBuffer([]); + DevicePairingRegistrationData.prototype.eSkeySig = null; /** * DevicePairingRegistrationData buildHash. - * @member {Uint8Array} buildHash + * @member {Uint8Array|null|undefined} buildHash * @memberof proto.ClientPayload.DevicePairingRegistrationData * @instance */ - DevicePairingRegistrationData.prototype.buildHash = $util.newBuffer([]); + DevicePairingRegistrationData.prototype.buildHash = null; /** * DevicePairingRegistrationData deviceProps. - * @member {Uint8Array} deviceProps + * @member {Uint8Array|null|undefined} deviceProps * @memberof proto.ClientPayload.DevicePairingRegistrationData * @instance */ - DevicePairingRegistrationData.prototype.deviceProps = $util.newBuffer([]); + DevicePairingRegistrationData.prototype.deviceProps = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DevicePairingRegistrationData.prototype, "_eRegid", { + get: $util.oneOfGetter($oneOfFields = ["eRegid"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DevicePairingRegistrationData.prototype, "_eKeytype", { + get: $util.oneOfGetter($oneOfFields = ["eKeytype"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DevicePairingRegistrationData.prototype, "_eIdent", { + get: $util.oneOfGetter($oneOfFields = ["eIdent"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DevicePairingRegistrationData.prototype, "_eSkeyId", { + get: $util.oneOfGetter($oneOfFields = ["eSkeyId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DevicePairingRegistrationData.prototype, "_eSkeyVal", { + get: $util.oneOfGetter($oneOfFields = ["eSkeyVal"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DevicePairingRegistrationData.prototype, "_eSkeySig", { + get: $util.oneOfGetter($oneOfFields = ["eSkeySig"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DevicePairingRegistrationData.prototype, "_buildHash", { + get: $util.oneOfGetter($oneOfFields = ["buildHash"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DevicePairingRegistrationData.prototype, "_deviceProps", { + get: $util.oneOfGetter($oneOfFields = ["deviceProps"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new DevicePairingRegistrationData instance using the specified properties. @@ -8864,30 +24123,38 @@ $root.proto = (function() { 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; + 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; @@ -8923,30 +24190,47 @@ $root.proto = (function() { DevicePairingRegistrationData.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.eRegid != null && message.hasOwnProperty("eRegid")) + var properties = {}; + if (message.eRegid != null && message.hasOwnProperty("eRegid")) { + properties._eRegid = 1; 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 != null && message.hasOwnProperty("eKeytype")) { + properties._eKeytype = 1; 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 != null && message.hasOwnProperty("eIdent")) { + properties._eIdent = 1; 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 != null && message.hasOwnProperty("eSkeyId")) { + properties._eSkeyId = 1; 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 != null && message.hasOwnProperty("eSkeyVal")) { + properties._eSkeyVal = 1; 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 != null && message.hasOwnProperty("eSkeySig")) { + properties._eSkeySig = 1; 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 != null && message.hasOwnProperty("buildHash")) { + properties._buildHash = 1; 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 != null && message.hasOwnProperty("deviceProps")) { + properties._deviceProps = 1; if (!(message.deviceProps && typeof message.deviceProps.length === "number" || $util.isString(message.deviceProps))) return "deviceProps: buffer expected"; + } return null; }; @@ -8965,42 +24249,42 @@ $root.proto = (function() { 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) + else if (object.eRegid.length >= 0) 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) + else if (object.eKeytype.length >= 0) 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) + else if (object.eIdent.length >= 0) 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) + else if (object.eSkeyId.length >= 0) 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) + else if (object.eSkeyVal.length >= 0) 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) + else if (object.eSkeySig.length >= 0) 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) + else if (object.buildHash.length >= 0) 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) + else if (object.deviceProps.length >= 0) message.deviceProps = object.deviceProps; return message; }; @@ -9018,80 +24302,46 @@ $root.proto = (function() { 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")) + 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")) + if (options.oneofs) + object._eRegid = "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")) + if (options.oneofs) + object._eKeytype = "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")) + if (options.oneofs) + object._eIdent = "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")) + if (options.oneofs) + object._eSkeyId = "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")) + if (options.oneofs) + object._eSkeyVal = "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")) + if (options.oneofs) + object._eSkeySig = "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")) + if (options.oneofs) + object._buildHash = "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; + if (options.oneofs) + object._deviceProps = "deviceProps"; + } return object; }; @@ -9106,6 +24356,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DevicePairingRegistrationData + * @function getTypeUrl + * @memberof proto.ClientPayload.DevicePairingRegistrationData + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DevicePairingRegistrationData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.ClientPayload.DevicePairingRegistrationData"; + }; + return DevicePairingRegistrationData; })(); @@ -9133,6 +24398,7 @@ $root.proto = (function() { * @interface IInteropData * @property {number|Long|null} [accountId] InteropData accountId * @property {Uint8Array|null} [token] InteropData token + * @property {boolean|null} [enableReadReceipts] InteropData enableReadReceipts */ /** @@ -9152,19 +24418,48 @@ $root.proto = (function() { /** * InteropData accountId. - * @member {number|Long} accountId + * @member {number|Long|null|undefined} accountId * @memberof proto.ClientPayload.InteropData * @instance */ - InteropData.prototype.accountId = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + InteropData.prototype.accountId = null; /** * InteropData token. - * @member {Uint8Array} token + * @member {Uint8Array|null|undefined} token * @memberof proto.ClientPayload.InteropData * @instance */ - InteropData.prototype.token = $util.newBuffer([]); + InteropData.prototype.token = null; + + /** + * InteropData enableReadReceipts. + * @member {boolean|null|undefined} enableReadReceipts + * @memberof proto.ClientPayload.InteropData + * @instance + */ + InteropData.prototype.enableReadReceipts = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(InteropData.prototype, "_accountId", { + get: $util.oneOfGetter($oneOfFields = ["accountId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(InteropData.prototype, "_token", { + get: $util.oneOfGetter($oneOfFields = ["token"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(InteropData.prototype, "_enableReadReceipts", { + get: $util.oneOfGetter($oneOfFields = ["enableReadReceipts"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new InteropData instance using the specified properties. @@ -9194,6 +24489,8 @@ $root.proto = (function() { writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.accountId); if (message.token != null && Object.hasOwnProperty.call(message, "token")) writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.token); + if (message.enableReadReceipts != null && Object.hasOwnProperty.call(message, "enableReadReceipts")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.enableReadReceipts); return writer; }; @@ -9228,12 +24525,18 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.accountId = reader.uint64(); - break; - case 2: - message.token = reader.bytes(); - break; + case 1: { + message.accountId = reader.uint64(); + break; + } + case 2: { + message.token = reader.bytes(); + break; + } + case 3: { + message.enableReadReceipts = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -9269,12 +24572,22 @@ $root.proto = (function() { InteropData.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.accountId != null && message.hasOwnProperty("accountId")) + var properties = {}; + if (message.accountId != null && message.hasOwnProperty("accountId")) { + properties._accountId = 1; if (!$util.isInteger(message.accountId) && !(message.accountId && $util.isInteger(message.accountId.low) && $util.isInteger(message.accountId.high))) return "accountId: integer|Long expected"; - if (message.token != null && message.hasOwnProperty("token")) + } + if (message.token != null && message.hasOwnProperty("token")) { + properties._token = 1; if (!(message.token && typeof message.token.length === "number" || $util.isString(message.token))) return "token: buffer expected"; + } + if (message.enableReadReceipts != null && message.hasOwnProperty("enableReadReceipts")) { + properties._enableReadReceipts = 1; + if (typeof message.enableReadReceipts !== "boolean") + return "enableReadReceipts: boolean expected"; + } return null; }; @@ -9302,8 +24615,10 @@ $root.proto = (function() { if (object.token != null) if (typeof object.token === "string") $util.base64.decode(object.token, message.token = $util.newBuffer($util.base64.length(object.token)), 0); - else if (object.token.length) + else if (object.token.length >= 0) message.token = object.token; + if (object.enableReadReceipts != null) + message.enableReadReceipts = Boolean(object.enableReadReceipts); return message; }; @@ -9320,27 +24635,24 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.accountId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.accountId = options.longs === String ? "0" : 0; - if (options.bytes === String) - object.token = ""; - else { - object.token = []; - if (options.bytes !== Array) - object.token = $util.newBuffer(object.token); - } - } - if (message.accountId != null && message.hasOwnProperty("accountId")) + if (message.accountId != null && message.hasOwnProperty("accountId")) { if (typeof message.accountId === "number") object.accountId = options.longs === String ? String(message.accountId) : message.accountId; else object.accountId = options.longs === String ? $util.Long.prototype.toString.call(message.accountId) : options.longs === Number ? new $util.LongBits(message.accountId.low >>> 0, message.accountId.high >>> 0).toNumber(true) : message.accountId; - if (message.token != null && message.hasOwnProperty("token")) + if (options.oneofs) + object._accountId = "accountId"; + } + if (message.token != null && message.hasOwnProperty("token")) { object.token = options.bytes === String ? $util.base64.encode(message.token, 0, message.token.length) : options.bytes === Array ? Array.prototype.slice.call(message.token) : message.token; + if (options.oneofs) + object._token = "token"; + } + if (message.enableReadReceipts != null && message.hasOwnProperty("enableReadReceipts")) { + object.enableReadReceipts = message.enableReadReceipts; + if (options.oneofs) + object._enableReadReceipts = "enableReadReceipts"; + } return object; }; @@ -9355,6 +24667,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for InteropData + * @function getTypeUrl + * @memberof proto.ClientPayload.InteropData + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InteropData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.ClientPayload.InteropData"; + }; + return InteropData; })(); @@ -9376,6 +24703,20 @@ $root.proto = (function() { return values; })(); + /** + * TrafficAnonymization enum. + * @name proto.ClientPayload.TrafficAnonymization + * @enum {number} + * @property {number} OFF=0 OFF value + * @property {number} STANDARD=1 STANDARD value + */ + ClientPayload.TrafficAnonymization = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "OFF"] = 0; + values[valuesById[1] = "STANDARD"] = 1; + return values; + })(); + ClientPayload.UserAgent = (function() { /** @@ -9397,6 +24738,7 @@ $root.proto = (function() { * @property {string|null} [deviceBoard] UserAgent deviceBoard * @property {string|null} [deviceExpId] UserAgent deviceExpId * @property {proto.ClientPayload.UserAgent.DeviceType|null} [deviceType] UserAgent deviceType + * @property {string|null} [deviceModelType] UserAgent deviceModelType */ /** @@ -9416,11 +24758,11 @@ $root.proto = (function() { /** * UserAgent platform. - * @member {proto.ClientPayload.UserAgent.Platform} platform + * @member {proto.ClientPayload.UserAgent.Platform|null|undefined} platform * @memberof proto.ClientPayload.UserAgent * @instance */ - UserAgent.prototype.platform = 0; + UserAgent.prototype.platform = null; /** * UserAgent appVersion. @@ -9432,107 +24774,214 @@ $root.proto = (function() { /** * UserAgent mcc. - * @member {string} mcc + * @member {string|null|undefined} mcc * @memberof proto.ClientPayload.UserAgent * @instance */ - UserAgent.prototype.mcc = ""; + UserAgent.prototype.mcc = null; /** * UserAgent mnc. - * @member {string} mnc + * @member {string|null|undefined} mnc * @memberof proto.ClientPayload.UserAgent * @instance */ - UserAgent.prototype.mnc = ""; + UserAgent.prototype.mnc = null; /** * UserAgent osVersion. - * @member {string} osVersion + * @member {string|null|undefined} osVersion * @memberof proto.ClientPayload.UserAgent * @instance */ - UserAgent.prototype.osVersion = ""; + UserAgent.prototype.osVersion = null; /** * UserAgent manufacturer. - * @member {string} manufacturer + * @member {string|null|undefined} manufacturer * @memberof proto.ClientPayload.UserAgent * @instance */ - UserAgent.prototype.manufacturer = ""; + UserAgent.prototype.manufacturer = null; /** * UserAgent device. - * @member {string} device + * @member {string|null|undefined} device * @memberof proto.ClientPayload.UserAgent * @instance */ - UserAgent.prototype.device = ""; + UserAgent.prototype.device = null; /** * UserAgent osBuildNumber. - * @member {string} osBuildNumber + * @member {string|null|undefined} osBuildNumber * @memberof proto.ClientPayload.UserAgent * @instance */ - UserAgent.prototype.osBuildNumber = ""; + UserAgent.prototype.osBuildNumber = null; /** * UserAgent phoneId. - * @member {string} phoneId + * @member {string|null|undefined} phoneId * @memberof proto.ClientPayload.UserAgent * @instance */ - UserAgent.prototype.phoneId = ""; + UserAgent.prototype.phoneId = null; /** * UserAgent releaseChannel. - * @member {proto.ClientPayload.UserAgent.ReleaseChannel} releaseChannel + * @member {proto.ClientPayload.UserAgent.ReleaseChannel|null|undefined} releaseChannel * @memberof proto.ClientPayload.UserAgent * @instance */ - UserAgent.prototype.releaseChannel = 0; + UserAgent.prototype.releaseChannel = null; /** * UserAgent localeLanguageIso6391. - * @member {string} localeLanguageIso6391 + * @member {string|null|undefined} localeLanguageIso6391 * @memberof proto.ClientPayload.UserAgent * @instance */ - UserAgent.prototype.localeLanguageIso6391 = ""; + UserAgent.prototype.localeLanguageIso6391 = null; /** * UserAgent localeCountryIso31661Alpha2. - * @member {string} localeCountryIso31661Alpha2 + * @member {string|null|undefined} localeCountryIso31661Alpha2 * @memberof proto.ClientPayload.UserAgent * @instance */ - UserAgent.prototype.localeCountryIso31661Alpha2 = ""; + UserAgent.prototype.localeCountryIso31661Alpha2 = null; /** * UserAgent deviceBoard. - * @member {string} deviceBoard + * @member {string|null|undefined} deviceBoard * @memberof proto.ClientPayload.UserAgent * @instance */ - UserAgent.prototype.deviceBoard = ""; + UserAgent.prototype.deviceBoard = null; /** * UserAgent deviceExpId. - * @member {string} deviceExpId + * @member {string|null|undefined} deviceExpId * @memberof proto.ClientPayload.UserAgent * @instance */ - UserAgent.prototype.deviceExpId = ""; + UserAgent.prototype.deviceExpId = null; /** * UserAgent deviceType. - * @member {proto.ClientPayload.UserAgent.DeviceType} deviceType + * @member {proto.ClientPayload.UserAgent.DeviceType|null|undefined} deviceType * @memberof proto.ClientPayload.UserAgent * @instance */ - UserAgent.prototype.deviceType = 0; + UserAgent.prototype.deviceType = null; + + /** + * UserAgent deviceModelType. + * @member {string|null|undefined} deviceModelType + * @memberof proto.ClientPayload.UserAgent + * @instance + */ + UserAgent.prototype.deviceModelType = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(UserAgent.prototype, "_platform", { + get: $util.oneOfGetter($oneOfFields = ["platform"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(UserAgent.prototype, "_appVersion", { + get: $util.oneOfGetter($oneOfFields = ["appVersion"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(UserAgent.prototype, "_mcc", { + get: $util.oneOfGetter($oneOfFields = ["mcc"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(UserAgent.prototype, "_mnc", { + get: $util.oneOfGetter($oneOfFields = ["mnc"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(UserAgent.prototype, "_osVersion", { + get: $util.oneOfGetter($oneOfFields = ["osVersion"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(UserAgent.prototype, "_manufacturer", { + get: $util.oneOfGetter($oneOfFields = ["manufacturer"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(UserAgent.prototype, "_device", { + get: $util.oneOfGetter($oneOfFields = ["device"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(UserAgent.prototype, "_osBuildNumber", { + get: $util.oneOfGetter($oneOfFields = ["osBuildNumber"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(UserAgent.prototype, "_phoneId", { + get: $util.oneOfGetter($oneOfFields = ["phoneId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(UserAgent.prototype, "_releaseChannel", { + get: $util.oneOfGetter($oneOfFields = ["releaseChannel"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(UserAgent.prototype, "_localeLanguageIso6391", { + get: $util.oneOfGetter($oneOfFields = ["localeLanguageIso6391"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(UserAgent.prototype, "_localeCountryIso31661Alpha2", { + get: $util.oneOfGetter($oneOfFields = ["localeCountryIso31661Alpha2"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(UserAgent.prototype, "_deviceBoard", { + get: $util.oneOfGetter($oneOfFields = ["deviceBoard"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(UserAgent.prototype, "_deviceExpId", { + get: $util.oneOfGetter($oneOfFields = ["deviceExpId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(UserAgent.prototype, "_deviceType", { + get: $util.oneOfGetter($oneOfFields = ["deviceType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(UserAgent.prototype, "_deviceModelType", { + get: $util.oneOfGetter($oneOfFields = ["deviceModelType"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new UserAgent instance using the specified properties. @@ -9588,6 +25037,8 @@ $root.proto = (function() { writer.uint32(/* id 14, wireType 2 =*/114).string(message.deviceExpId); if (message.deviceType != null && Object.hasOwnProperty.call(message, "deviceType")) writer.uint32(/* id 15, wireType 0 =*/120).int32(message.deviceType); + if (message.deviceModelType != null && Object.hasOwnProperty.call(message, "deviceModelType")) + writer.uint32(/* id 16, wireType 2 =*/130).string(message.deviceModelType); return writer; }; @@ -9622,51 +25073,70 @@ $root.proto = (function() { 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; - case 14: - message.deviceExpId = reader.string(); - break; - case 15: - message.deviceType = reader.int32(); - break; + 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; + } + case 14: { + message.deviceExpId = reader.string(); + break; + } + case 15: { + message.deviceType = reader.int32(); + break; + } + case 16: { + message.deviceModelType = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -9702,7 +25172,9 @@ $root.proto = (function() { UserAgent.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.platform != null && message.hasOwnProperty("platform")) + var properties = {}; + if (message.platform != null && message.hasOwnProperty("platform")) { + properties._platform = 1; switch (message.platform) { default: return "platform: enum value expected"; @@ -9744,33 +25216,52 @@ $root.proto = (function() { case 35: break; } - if (message.appVersion != null && message.hasOwnProperty("appVersion")) { - var error = $root.proto.ClientPayload.UserAgent.AppVersion.verify(message.appVersion); - if (error) - return "appVersion." + error; } - if (message.mcc != null && message.hasOwnProperty("mcc")) + if (message.appVersion != null && message.hasOwnProperty("appVersion")) { + properties._appVersion = 1; + { + var error = $root.proto.ClientPayload.UserAgent.AppVersion.verify(message.appVersion); + if (error) + return "appVersion." + error; + } + } + if (message.mcc != null && message.hasOwnProperty("mcc")) { + properties._mcc = 1; if (!$util.isString(message.mcc)) return "mcc: string expected"; - if (message.mnc != null && message.hasOwnProperty("mnc")) + } + if (message.mnc != null && message.hasOwnProperty("mnc")) { + properties._mnc = 1; if (!$util.isString(message.mnc)) return "mnc: string expected"; - if (message.osVersion != null && message.hasOwnProperty("osVersion")) + } + if (message.osVersion != null && message.hasOwnProperty("osVersion")) { + properties._osVersion = 1; if (!$util.isString(message.osVersion)) return "osVersion: string expected"; - if (message.manufacturer != null && message.hasOwnProperty("manufacturer")) + } + if (message.manufacturer != null && message.hasOwnProperty("manufacturer")) { + properties._manufacturer = 1; if (!$util.isString(message.manufacturer)) return "manufacturer: string expected"; - if (message.device != null && message.hasOwnProperty("device")) + } + if (message.device != null && message.hasOwnProperty("device")) { + properties._device = 1; if (!$util.isString(message.device)) return "device: string expected"; - if (message.osBuildNumber != null && message.hasOwnProperty("osBuildNumber")) + } + if (message.osBuildNumber != null && message.hasOwnProperty("osBuildNumber")) { + properties._osBuildNumber = 1; if (!$util.isString(message.osBuildNumber)) return "osBuildNumber: string expected"; - if (message.phoneId != null && message.hasOwnProperty("phoneId")) + } + if (message.phoneId != null && message.hasOwnProperty("phoneId")) { + properties._phoneId = 1; if (!$util.isString(message.phoneId)) return "phoneId: string expected"; - if (message.releaseChannel != null && message.hasOwnProperty("releaseChannel")) + } + if (message.releaseChannel != null && message.hasOwnProperty("releaseChannel")) { + properties._releaseChannel = 1; switch (message.releaseChannel) { default: return "releaseChannel: enum value expected"; @@ -9780,19 +25271,29 @@ $root.proto = (function() { case 3: break; } - if (message.localeLanguageIso6391 != null && message.hasOwnProperty("localeLanguageIso6391")) + } + if (message.localeLanguageIso6391 != null && message.hasOwnProperty("localeLanguageIso6391")) { + properties._localeLanguageIso6391 = 1; if (!$util.isString(message.localeLanguageIso6391)) return "localeLanguageIso6391: string expected"; - if (message.localeCountryIso31661Alpha2 != null && message.hasOwnProperty("localeCountryIso31661Alpha2")) + } + if (message.localeCountryIso31661Alpha2 != null && message.hasOwnProperty("localeCountryIso31661Alpha2")) { + properties._localeCountryIso31661Alpha2 = 1; if (!$util.isString(message.localeCountryIso31661Alpha2)) return "localeCountryIso31661Alpha2: string expected"; - if (message.deviceBoard != null && message.hasOwnProperty("deviceBoard")) + } + if (message.deviceBoard != null && message.hasOwnProperty("deviceBoard")) { + properties._deviceBoard = 1; if (!$util.isString(message.deviceBoard)) return "deviceBoard: string expected"; - if (message.deviceExpId != null && message.hasOwnProperty("deviceExpId")) + } + if (message.deviceExpId != null && message.hasOwnProperty("deviceExpId")) { + properties._deviceExpId = 1; if (!$util.isString(message.deviceExpId)) return "deviceExpId: string expected"; - if (message.deviceType != null && message.hasOwnProperty("deviceType")) + } + if (message.deviceType != null && message.hasOwnProperty("deviceType")) { + properties._deviceType = 1; switch (message.deviceType) { default: return "deviceType: enum value expected"; @@ -9803,6 +25304,12 @@ $root.proto = (function() { case 4: break; } + } + if (message.deviceModelType != null && message.hasOwnProperty("deviceModelType")) { + properties._deviceModelType = 1; + if (!$util.isString(message.deviceModelType)) + return "deviceModelType: string expected"; + } return null; }; @@ -9819,6 +25326,12 @@ $root.proto = (function() { return object; var message = new $root.proto.ClientPayload.UserAgent(); switch (object.platform) { + default: + if (typeof object.platform === "number") { + message.platform = object.platform; + break; + } + break; case "ANDROID": case 0: message.platform = 0; @@ -9984,6 +25497,12 @@ $root.proto = (function() { if (object.phoneId != null) message.phoneId = String(object.phoneId); switch (object.releaseChannel) { + default: + if (typeof object.releaseChannel === "number") { + message.releaseChannel = object.releaseChannel; + break; + } + break; case "RELEASE": case 0: message.releaseChannel = 0; @@ -10010,6 +25529,12 @@ $root.proto = (function() { if (object.deviceExpId != null) message.deviceExpId = String(object.deviceExpId); switch (object.deviceType) { + default: + if (typeof object.deviceType === "number") { + message.deviceType = object.deviceType; + break; + } + break; case "PHONE": case 0: message.deviceType = 0; @@ -10031,6 +25556,8 @@ $root.proto = (function() { message.deviceType = 4; break; } + if (object.deviceModelType != null) + message.deviceModelType = String(object.deviceModelType); return message; }; @@ -10047,53 +25574,86 @@ $root.proto = (function() { 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 = ""; - object.deviceExpId = ""; - object.deviceType = options.enums === String ? "PHONE" : 0; + if (message.platform != null && message.hasOwnProperty("platform")) { + object.platform = options.enums === String ? $root.proto.ClientPayload.UserAgent.Platform[message.platform] === undefined ? message.platform : $root.proto.ClientPayload.UserAgent.Platform[message.platform] : message.platform; + if (options.oneofs) + object._platform = "platform"; } - 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")) + 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")) + if (options.oneofs) + object._appVersion = "appVersion"; + } + if (message.mcc != null && message.hasOwnProperty("mcc")) { object.mcc = message.mcc; - if (message.mnc != null && message.hasOwnProperty("mnc")) + if (options.oneofs) + object._mcc = "mcc"; + } + if (message.mnc != null && message.hasOwnProperty("mnc")) { object.mnc = message.mnc; - if (message.osVersion != null && message.hasOwnProperty("osVersion")) + if (options.oneofs) + object._mnc = "mnc"; + } + if (message.osVersion != null && message.hasOwnProperty("osVersion")) { object.osVersion = message.osVersion; - if (message.manufacturer != null && message.hasOwnProperty("manufacturer")) + if (options.oneofs) + object._osVersion = "osVersion"; + } + if (message.manufacturer != null && message.hasOwnProperty("manufacturer")) { object.manufacturer = message.manufacturer; - if (message.device != null && message.hasOwnProperty("device")) + if (options.oneofs) + object._manufacturer = "manufacturer"; + } + if (message.device != null && message.hasOwnProperty("device")) { object.device = message.device; - if (message.osBuildNumber != null && message.hasOwnProperty("osBuildNumber")) + if (options.oneofs) + object._device = "device"; + } + if (message.osBuildNumber != null && message.hasOwnProperty("osBuildNumber")) { object.osBuildNumber = message.osBuildNumber; - if (message.phoneId != null && message.hasOwnProperty("phoneId")) + if (options.oneofs) + object._osBuildNumber = "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")) + if (options.oneofs) + object._phoneId = "phoneId"; + } + if (message.releaseChannel != null && message.hasOwnProperty("releaseChannel")) { + object.releaseChannel = options.enums === String ? $root.proto.ClientPayload.UserAgent.ReleaseChannel[message.releaseChannel] === undefined ? message.releaseChannel : $root.proto.ClientPayload.UserAgent.ReleaseChannel[message.releaseChannel] : message.releaseChannel; + if (options.oneofs) + object._releaseChannel = "releaseChannel"; + } + if (message.localeLanguageIso6391 != null && message.hasOwnProperty("localeLanguageIso6391")) { object.localeLanguageIso6391 = message.localeLanguageIso6391; - if (message.localeCountryIso31661Alpha2 != null && message.hasOwnProperty("localeCountryIso31661Alpha2")) + if (options.oneofs) + object._localeLanguageIso6391 = "localeLanguageIso6391"; + } + if (message.localeCountryIso31661Alpha2 != null && message.hasOwnProperty("localeCountryIso31661Alpha2")) { object.localeCountryIso31661Alpha2 = message.localeCountryIso31661Alpha2; - if (message.deviceBoard != null && message.hasOwnProperty("deviceBoard")) + if (options.oneofs) + object._localeCountryIso31661Alpha2 = "localeCountryIso31661Alpha2"; + } + if (message.deviceBoard != null && message.hasOwnProperty("deviceBoard")) { object.deviceBoard = message.deviceBoard; - if (message.deviceExpId != null && message.hasOwnProperty("deviceExpId")) + if (options.oneofs) + object._deviceBoard = "deviceBoard"; + } + if (message.deviceExpId != null && message.hasOwnProperty("deviceExpId")) { object.deviceExpId = message.deviceExpId; - if (message.deviceType != null && message.hasOwnProperty("deviceType")) - object.deviceType = options.enums === String ? $root.proto.ClientPayload.UserAgent.DeviceType[message.deviceType] : message.deviceType; + if (options.oneofs) + object._deviceExpId = "deviceExpId"; + } + if (message.deviceType != null && message.hasOwnProperty("deviceType")) { + object.deviceType = options.enums === String ? $root.proto.ClientPayload.UserAgent.DeviceType[message.deviceType] === undefined ? message.deviceType : $root.proto.ClientPayload.UserAgent.DeviceType[message.deviceType] : message.deviceType; + if (options.oneofs) + object._deviceType = "deviceType"; + } + if (message.deviceModelType != null && message.hasOwnProperty("deviceModelType")) { + object.deviceModelType = message.deviceModelType; + if (options.oneofs) + object._deviceModelType = "deviceModelType"; + } return object; }; @@ -10108,6 +25668,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for UserAgent + * @function getTypeUrl + * @memberof proto.ClientPayload.UserAgent + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UserAgent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.ClientPayload.UserAgent"; + }; + UserAgent.AppVersion = (function() { /** @@ -10138,43 +25713,76 @@ $root.proto = (function() { /** * AppVersion primary. - * @member {number} primary + * @member {number|null|undefined} primary * @memberof proto.ClientPayload.UserAgent.AppVersion * @instance */ - AppVersion.prototype.primary = 0; + AppVersion.prototype.primary = null; /** * AppVersion secondary. - * @member {number} secondary + * @member {number|null|undefined} secondary * @memberof proto.ClientPayload.UserAgent.AppVersion * @instance */ - AppVersion.prototype.secondary = 0; + AppVersion.prototype.secondary = null; /** * AppVersion tertiary. - * @member {number} tertiary + * @member {number|null|undefined} tertiary * @memberof proto.ClientPayload.UserAgent.AppVersion * @instance */ - AppVersion.prototype.tertiary = 0; + AppVersion.prototype.tertiary = null; /** * AppVersion quaternary. - * @member {number} quaternary + * @member {number|null|undefined} quaternary * @memberof proto.ClientPayload.UserAgent.AppVersion * @instance */ - AppVersion.prototype.quaternary = 0; + AppVersion.prototype.quaternary = null; /** * AppVersion quinary. - * @member {number} quinary + * @member {number|null|undefined} quinary * @memberof proto.ClientPayload.UserAgent.AppVersion * @instance */ - AppVersion.prototype.quinary = 0; + AppVersion.prototype.quinary = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AppVersion.prototype, "_primary", { + get: $util.oneOfGetter($oneOfFields = ["primary"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AppVersion.prototype, "_secondary", { + get: $util.oneOfGetter($oneOfFields = ["secondary"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AppVersion.prototype, "_tertiary", { + get: $util.oneOfGetter($oneOfFields = ["tertiary"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AppVersion.prototype, "_quaternary", { + get: $util.oneOfGetter($oneOfFields = ["quaternary"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AppVersion.prototype, "_quinary", { + get: $util.oneOfGetter($oneOfFields = ["quinary"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new AppVersion instance using the specified properties. @@ -10244,21 +25852,26 @@ $root.proto = (function() { 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; + 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; @@ -10294,21 +25907,32 @@ $root.proto = (function() { AppVersion.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.primary != null && message.hasOwnProperty("primary")) + var properties = {}; + if (message.primary != null && message.hasOwnProperty("primary")) { + properties._primary = 1; if (!$util.isInteger(message.primary)) return "primary: integer expected"; - if (message.secondary != null && message.hasOwnProperty("secondary")) + } + if (message.secondary != null && message.hasOwnProperty("secondary")) { + properties._secondary = 1; if (!$util.isInteger(message.secondary)) return "secondary: integer expected"; - if (message.tertiary != null && message.hasOwnProperty("tertiary")) + } + if (message.tertiary != null && message.hasOwnProperty("tertiary")) { + properties._tertiary = 1; if (!$util.isInteger(message.tertiary)) return "tertiary: integer expected"; - if (message.quaternary != null && message.hasOwnProperty("quaternary")) + } + if (message.quaternary != null && message.hasOwnProperty("quaternary")) { + properties._quaternary = 1; if (!$util.isInteger(message.quaternary)) return "quaternary: integer expected"; - if (message.quinary != null && message.hasOwnProperty("quinary")) + } + if (message.quinary != null && message.hasOwnProperty("quinary")) { + properties._quinary = 1; if (!$util.isInteger(message.quinary)) return "quinary: integer expected"; + } return null; }; @@ -10350,23 +25974,31 @@ $root.proto = (function() { 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")) + if (message.primary != null && message.hasOwnProperty("primary")) { object.primary = message.primary; - if (message.secondary != null && message.hasOwnProperty("secondary")) + if (options.oneofs) + object._primary = "primary"; + } + if (message.secondary != null && message.hasOwnProperty("secondary")) { object.secondary = message.secondary; - if (message.tertiary != null && message.hasOwnProperty("tertiary")) + if (options.oneofs) + object._secondary = "secondary"; + } + if (message.tertiary != null && message.hasOwnProperty("tertiary")) { object.tertiary = message.tertiary; - if (message.quaternary != null && message.hasOwnProperty("quaternary")) + if (options.oneofs) + object._tertiary = "tertiary"; + } + if (message.quaternary != null && message.hasOwnProperty("quaternary")) { object.quaternary = message.quaternary; - if (message.quinary != null && message.hasOwnProperty("quinary")) + if (options.oneofs) + object._quaternary = "quaternary"; + } + if (message.quinary != null && message.hasOwnProperty("quinary")) { object.quinary = message.quinary; + if (options.oneofs) + object._quinary = "quinary"; + } return object; }; @@ -10381,6 +26013,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for AppVersion + * @function getTypeUrl + * @memberof proto.ClientPayload.UserAgent.AppVersion + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AppVersion.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.ClientPayload.UserAgent.AppVersion"; + }; + return AppVersion; })(); @@ -10536,19 +26183,19 @@ $root.proto = (function() { /** * WebInfo refToken. - * @member {string} refToken + * @member {string|null|undefined} refToken * @memberof proto.ClientPayload.WebInfo * @instance */ - WebInfo.prototype.refToken = ""; + WebInfo.prototype.refToken = null; /** * WebInfo version. - * @member {string} version + * @member {string|null|undefined} version * @memberof proto.ClientPayload.WebInfo * @instance */ - WebInfo.prototype.version = ""; + WebInfo.prototype.version = null; /** * WebInfo webdPayload. @@ -10560,11 +26207,38 @@ $root.proto = (function() { /** * WebInfo webSubPlatform. - * @member {proto.ClientPayload.WebInfo.WebSubPlatform} webSubPlatform + * @member {proto.ClientPayload.WebInfo.WebSubPlatform|null|undefined} webSubPlatform * @memberof proto.ClientPayload.WebInfo * @instance */ - WebInfo.prototype.webSubPlatform = 0; + WebInfo.prototype.webSubPlatform = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebInfo.prototype, "_refToken", { + get: $util.oneOfGetter($oneOfFields = ["refToken"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebInfo.prototype, "_version", { + get: $util.oneOfGetter($oneOfFields = ["version"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebInfo.prototype, "_webdPayload", { + get: $util.oneOfGetter($oneOfFields = ["webdPayload"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebInfo.prototype, "_webSubPlatform", { + get: $util.oneOfGetter($oneOfFields = ["webSubPlatform"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new WebInfo instance using the specified properties. @@ -10632,18 +26306,22 @@ $root.proto = (function() { 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; + 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; @@ -10679,18 +26357,27 @@ $root.proto = (function() { WebInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.refToken != null && message.hasOwnProperty("refToken")) + var properties = {}; + if (message.refToken != null && message.hasOwnProperty("refToken")) { + properties._refToken = 1; if (!$util.isString(message.refToken)) return "refToken: string expected"; - if (message.version != null && message.hasOwnProperty("version")) + } + if (message.version != null && message.hasOwnProperty("version")) { + properties._version = 1; 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")) + if (message.webdPayload != null && message.hasOwnProperty("webdPayload")) { + properties._webdPayload = 1; + { + var error = $root.proto.ClientPayload.WebInfo.WebdPayload.verify(message.webdPayload); + if (error) + return "webdPayload." + error; + } + } + if (message.webSubPlatform != null && message.hasOwnProperty("webSubPlatform")) { + properties._webSubPlatform = 1; switch (message.webSubPlatform) { default: return "webSubPlatform: enum value expected"; @@ -10699,8 +26386,10 @@ $root.proto = (function() { case 2: case 3: case 4: + case 5: break; } + } return null; }; @@ -10726,6 +26415,12 @@ $root.proto = (function() { message.webdPayload = $root.proto.ClientPayload.WebInfo.WebdPayload.fromObject(object.webdPayload); } switch (object.webSubPlatform) { + default: + if (typeof object.webSubPlatform === "number") { + message.webSubPlatform = object.webSubPlatform; + break; + } + break; case "WEB_BROWSER": case 0: message.webSubPlatform = 0; @@ -10746,6 +26441,10 @@ $root.proto = (function() { case 4: message.webSubPlatform = 4; break; + case "WIN_HYBRID": + case 5: + message.webSubPlatform = 5; + break; } return message; }; @@ -10763,20 +26462,26 @@ $root.proto = (function() { 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")) + if (message.refToken != null && message.hasOwnProperty("refToken")) { object.refToken = message.refToken; - if (message.version != null && message.hasOwnProperty("version")) + if (options.oneofs) + object._refToken = "refToken"; + } + if (message.version != null && message.hasOwnProperty("version")) { object.version = message.version; - if (message.webdPayload != null && message.hasOwnProperty("webdPayload")) + if (options.oneofs) + object._version = "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; + if (options.oneofs) + object._webdPayload = "webdPayload"; + } + if (message.webSubPlatform != null && message.hasOwnProperty("webSubPlatform")) { + object.webSubPlatform = options.enums === String ? $root.proto.ClientPayload.WebInfo.WebSubPlatform[message.webSubPlatform] === undefined ? message.webSubPlatform : $root.proto.ClientPayload.WebInfo.WebSubPlatform[message.webSubPlatform] : message.webSubPlatform; + if (options.oneofs) + object._webSubPlatform = "webSubPlatform"; + } return object; }; @@ -10791,6 +26496,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for WebInfo + * @function getTypeUrl + * @memberof proto.ClientPayload.WebInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WebInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.ClientPayload.WebInfo"; + }; + /** * WebSubPlatform enum. * @name proto.ClientPayload.WebInfo.WebSubPlatform @@ -10800,6 +26520,7 @@ $root.proto = (function() { * @property {number} WIN_STORE=2 WIN_STORE value * @property {number} DARWIN=3 DARWIN value * @property {number} WIN32=4 WIN32 value + * @property {number} WIN_HYBRID=5 WIN_HYBRID value */ WebInfo.WebSubPlatform = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -10808,6 +26529,7 @@ $root.proto = (function() { values[valuesById[2] = "WIN_STORE"] = 2; values[valuesById[3] = "DARWIN"] = 3; values[valuesById[4] = "WIN32"] = 4; + values[valuesById[5] = "WIN_HYBRID"] = 5; return values; })(); @@ -10847,91 +26569,160 @@ $root.proto = (function() { /** * WebdPayload usesParticipantInKey. - * @member {boolean} usesParticipantInKey + * @member {boolean|null|undefined} usesParticipantInKey * @memberof proto.ClientPayload.WebInfo.WebdPayload * @instance */ - WebdPayload.prototype.usesParticipantInKey = false; + WebdPayload.prototype.usesParticipantInKey = null; /** * WebdPayload supportsStarredMessages. - * @member {boolean} supportsStarredMessages + * @member {boolean|null|undefined} supportsStarredMessages * @memberof proto.ClientPayload.WebInfo.WebdPayload * @instance */ - WebdPayload.prototype.supportsStarredMessages = false; + WebdPayload.prototype.supportsStarredMessages = null; /** * WebdPayload supportsDocumentMessages. - * @member {boolean} supportsDocumentMessages + * @member {boolean|null|undefined} supportsDocumentMessages * @memberof proto.ClientPayload.WebInfo.WebdPayload * @instance */ - WebdPayload.prototype.supportsDocumentMessages = false; + WebdPayload.prototype.supportsDocumentMessages = null; /** * WebdPayload supportsUrlMessages. - * @member {boolean} supportsUrlMessages + * @member {boolean|null|undefined} supportsUrlMessages * @memberof proto.ClientPayload.WebInfo.WebdPayload * @instance */ - WebdPayload.prototype.supportsUrlMessages = false; + WebdPayload.prototype.supportsUrlMessages = null; /** * WebdPayload supportsMediaRetry. - * @member {boolean} supportsMediaRetry + * @member {boolean|null|undefined} supportsMediaRetry * @memberof proto.ClientPayload.WebInfo.WebdPayload * @instance */ - WebdPayload.prototype.supportsMediaRetry = false; + WebdPayload.prototype.supportsMediaRetry = null; /** * WebdPayload supportsE2EImage. - * @member {boolean} supportsE2EImage + * @member {boolean|null|undefined} supportsE2EImage * @memberof proto.ClientPayload.WebInfo.WebdPayload * @instance */ - WebdPayload.prototype.supportsE2EImage = false; + WebdPayload.prototype.supportsE2EImage = null; /** * WebdPayload supportsE2EVideo. - * @member {boolean} supportsE2EVideo + * @member {boolean|null|undefined} supportsE2EVideo * @memberof proto.ClientPayload.WebInfo.WebdPayload * @instance */ - WebdPayload.prototype.supportsE2EVideo = false; + WebdPayload.prototype.supportsE2EVideo = null; /** * WebdPayload supportsE2EAudio. - * @member {boolean} supportsE2EAudio + * @member {boolean|null|undefined} supportsE2EAudio * @memberof proto.ClientPayload.WebInfo.WebdPayload * @instance */ - WebdPayload.prototype.supportsE2EAudio = false; + WebdPayload.prototype.supportsE2EAudio = null; /** * WebdPayload supportsE2EDocument. - * @member {boolean} supportsE2EDocument + * @member {boolean|null|undefined} supportsE2EDocument * @memberof proto.ClientPayload.WebInfo.WebdPayload * @instance */ - WebdPayload.prototype.supportsE2EDocument = false; + WebdPayload.prototype.supportsE2EDocument = null; /** * WebdPayload documentTypes. - * @member {string} documentTypes + * @member {string|null|undefined} documentTypes * @memberof proto.ClientPayload.WebInfo.WebdPayload * @instance */ - WebdPayload.prototype.documentTypes = ""; + WebdPayload.prototype.documentTypes = null; /** * WebdPayload features. - * @member {Uint8Array} features + * @member {Uint8Array|null|undefined} features * @memberof proto.ClientPayload.WebInfo.WebdPayload * @instance */ - WebdPayload.prototype.features = $util.newBuffer([]); + WebdPayload.prototype.features = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebdPayload.prototype, "_usesParticipantInKey", { + get: $util.oneOfGetter($oneOfFields = ["usesParticipantInKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebdPayload.prototype, "_supportsStarredMessages", { + get: $util.oneOfGetter($oneOfFields = ["supportsStarredMessages"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebdPayload.prototype, "_supportsDocumentMessages", { + get: $util.oneOfGetter($oneOfFields = ["supportsDocumentMessages"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebdPayload.prototype, "_supportsUrlMessages", { + get: $util.oneOfGetter($oneOfFields = ["supportsUrlMessages"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebdPayload.prototype, "_supportsMediaRetry", { + get: $util.oneOfGetter($oneOfFields = ["supportsMediaRetry"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebdPayload.prototype, "_supportsE2EImage", { + get: $util.oneOfGetter($oneOfFields = ["supportsE2EImage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebdPayload.prototype, "_supportsE2EVideo", { + get: $util.oneOfGetter($oneOfFields = ["supportsE2EVideo"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebdPayload.prototype, "_supportsE2EAudio", { + get: $util.oneOfGetter($oneOfFields = ["supportsE2EAudio"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebdPayload.prototype, "_supportsE2EDocument", { + get: $util.oneOfGetter($oneOfFields = ["supportsE2EDocument"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebdPayload.prototype, "_documentTypes", { + get: $util.oneOfGetter($oneOfFields = ["documentTypes"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebdPayload.prototype, "_features", { + get: $util.oneOfGetter($oneOfFields = ["features"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new WebdPayload instance using the specified properties. @@ -11013,39 +26804,50 @@ $root.proto = (function() { 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; + 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; @@ -11081,39 +26883,62 @@ $root.proto = (function() { WebdPayload.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.usesParticipantInKey != null && message.hasOwnProperty("usesParticipantInKey")) + var properties = {}; + if (message.usesParticipantInKey != null && message.hasOwnProperty("usesParticipantInKey")) { + properties._usesParticipantInKey = 1; if (typeof message.usesParticipantInKey !== "boolean") return "usesParticipantInKey: boolean expected"; - if (message.supportsStarredMessages != null && message.hasOwnProperty("supportsStarredMessages")) + } + if (message.supportsStarredMessages != null && message.hasOwnProperty("supportsStarredMessages")) { + properties._supportsStarredMessages = 1; if (typeof message.supportsStarredMessages !== "boolean") return "supportsStarredMessages: boolean expected"; - if (message.supportsDocumentMessages != null && message.hasOwnProperty("supportsDocumentMessages")) + } + if (message.supportsDocumentMessages != null && message.hasOwnProperty("supportsDocumentMessages")) { + properties._supportsDocumentMessages = 1; if (typeof message.supportsDocumentMessages !== "boolean") return "supportsDocumentMessages: boolean expected"; - if (message.supportsUrlMessages != null && message.hasOwnProperty("supportsUrlMessages")) + } + if (message.supportsUrlMessages != null && message.hasOwnProperty("supportsUrlMessages")) { + properties._supportsUrlMessages = 1; if (typeof message.supportsUrlMessages !== "boolean") return "supportsUrlMessages: boolean expected"; - if (message.supportsMediaRetry != null && message.hasOwnProperty("supportsMediaRetry")) + } + if (message.supportsMediaRetry != null && message.hasOwnProperty("supportsMediaRetry")) { + properties._supportsMediaRetry = 1; if (typeof message.supportsMediaRetry !== "boolean") return "supportsMediaRetry: boolean expected"; - if (message.supportsE2EImage != null && message.hasOwnProperty("supportsE2EImage")) + } + if (message.supportsE2EImage != null && message.hasOwnProperty("supportsE2EImage")) { + properties._supportsE2EImage = 1; if (typeof message.supportsE2EImage !== "boolean") return "supportsE2EImage: boolean expected"; - if (message.supportsE2EVideo != null && message.hasOwnProperty("supportsE2EVideo")) + } + if (message.supportsE2EVideo != null && message.hasOwnProperty("supportsE2EVideo")) { + properties._supportsE2EVideo = 1; if (typeof message.supportsE2EVideo !== "boolean") return "supportsE2EVideo: boolean expected"; - if (message.supportsE2EAudio != null && message.hasOwnProperty("supportsE2EAudio")) + } + if (message.supportsE2EAudio != null && message.hasOwnProperty("supportsE2EAudio")) { + properties._supportsE2EAudio = 1; if (typeof message.supportsE2EAudio !== "boolean") return "supportsE2EAudio: boolean expected"; - if (message.supportsE2EDocument != null && message.hasOwnProperty("supportsE2EDocument")) + } + if (message.supportsE2EDocument != null && message.hasOwnProperty("supportsE2EDocument")) { + properties._supportsE2EDocument = 1; if (typeof message.supportsE2EDocument !== "boolean") return "supportsE2EDocument: boolean expected"; - if (message.documentTypes != null && message.hasOwnProperty("documentTypes")) + } + if (message.documentTypes != null && message.hasOwnProperty("documentTypes")) { + properties._documentTypes = 1; if (!$util.isString(message.documentTypes)) return "documentTypes: string expected"; - if (message.features != null && message.hasOwnProperty("features")) + } + if (message.features != null && message.hasOwnProperty("features")) { + properties._features = 1; if (!(message.features && typeof message.features.length === "number" || $util.isString(message.features))) return "features: buffer expected"; + } return null; }; @@ -11152,7 +26977,7 @@ $root.proto = (function() { 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) + else if (object.features.length >= 0) message.features = object.features; return message; }; @@ -11170,47 +26995,61 @@ $root.proto = (function() { 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")) + if (message.usesParticipantInKey != null && message.hasOwnProperty("usesParticipantInKey")) { object.usesParticipantInKey = message.usesParticipantInKey; - if (message.supportsStarredMessages != null && message.hasOwnProperty("supportsStarredMessages")) + if (options.oneofs) + object._usesParticipantInKey = "usesParticipantInKey"; + } + if (message.supportsStarredMessages != null && message.hasOwnProperty("supportsStarredMessages")) { object.supportsStarredMessages = message.supportsStarredMessages; - if (message.supportsDocumentMessages != null && message.hasOwnProperty("supportsDocumentMessages")) + if (options.oneofs) + object._supportsStarredMessages = "supportsStarredMessages"; + } + if (message.supportsDocumentMessages != null && message.hasOwnProperty("supportsDocumentMessages")) { object.supportsDocumentMessages = message.supportsDocumentMessages; - if (message.supportsUrlMessages != null && message.hasOwnProperty("supportsUrlMessages")) + if (options.oneofs) + object._supportsDocumentMessages = "supportsDocumentMessages"; + } + if (message.supportsUrlMessages != null && message.hasOwnProperty("supportsUrlMessages")) { object.supportsUrlMessages = message.supportsUrlMessages; - if (message.supportsMediaRetry != null && message.hasOwnProperty("supportsMediaRetry")) + if (options.oneofs) + object._supportsUrlMessages = "supportsUrlMessages"; + } + if (message.supportsMediaRetry != null && message.hasOwnProperty("supportsMediaRetry")) { object.supportsMediaRetry = message.supportsMediaRetry; - if (message.supportsE2EImage != null && message.hasOwnProperty("supportsE2EImage")) + if (options.oneofs) + object._supportsMediaRetry = "supportsMediaRetry"; + } + if (message.supportsE2EImage != null && message.hasOwnProperty("supportsE2EImage")) { object.supportsE2EImage = message.supportsE2EImage; - if (message.supportsE2EVideo != null && message.hasOwnProperty("supportsE2EVideo")) + if (options.oneofs) + object._supportsE2EImage = "supportsE2EImage"; + } + if (message.supportsE2EVideo != null && message.hasOwnProperty("supportsE2EVideo")) { object.supportsE2EVideo = message.supportsE2EVideo; - if (message.supportsE2EAudio != null && message.hasOwnProperty("supportsE2EAudio")) + if (options.oneofs) + object._supportsE2EVideo = "supportsE2EVideo"; + } + if (message.supportsE2EAudio != null && message.hasOwnProperty("supportsE2EAudio")) { object.supportsE2EAudio = message.supportsE2EAudio; - if (message.supportsE2EDocument != null && message.hasOwnProperty("supportsE2EDocument")) + if (options.oneofs) + object._supportsE2EAudio = "supportsE2EAudio"; + } + if (message.supportsE2EDocument != null && message.hasOwnProperty("supportsE2EDocument")) { object.supportsE2EDocument = message.supportsE2EDocument; - if (message.documentTypes != null && message.hasOwnProperty("documentTypes")) + if (options.oneofs) + object._supportsE2EDocument = "supportsE2EDocument"; + } + if (message.documentTypes != null && message.hasOwnProperty("documentTypes")) { object.documentTypes = message.documentTypes; - if (message.features != null && message.hasOwnProperty("features")) + if (options.oneofs) + object._documentTypes = "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; + if (options.oneofs) + object._features = "features"; + } return object; }; @@ -11225,6 +27064,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for WebdPayload + * @function getTypeUrl + * @memberof proto.ClientPayload.WebInfo.WebdPayload + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WebdPayload.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.ClientPayload.WebInfo.WebdPayload"; + }; + return WebdPayload; })(); @@ -11269,11 +27123,26 @@ $root.proto = (function() { /** * CommentMetadata replyCount. - * @member {number} replyCount + * @member {number|null|undefined} replyCount * @memberof proto.CommentMetadata * @instance */ - CommentMetadata.prototype.replyCount = 0; + CommentMetadata.prototype.replyCount = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CommentMetadata.prototype, "_commentParentKey", { + get: $util.oneOfGetter($oneOfFields = ["commentParentKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CommentMetadata.prototype, "_replyCount", { + get: $util.oneOfGetter($oneOfFields = ["replyCount"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new CommentMetadata instance using the specified properties. @@ -11337,12 +27206,14 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.commentParentKey = $root.proto.MessageKey.decode(reader, reader.uint32()); - break; - case 2: - message.replyCount = reader.uint32(); - break; + case 1: { + message.commentParentKey = $root.proto.MessageKey.decode(reader, reader.uint32()); + break; + } + case 2: { + message.replyCount = reader.uint32(); + break; + } default: reader.skipType(tag & 7); break; @@ -11378,14 +27249,20 @@ $root.proto = (function() { CommentMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; if (message.commentParentKey != null && message.hasOwnProperty("commentParentKey")) { - var error = $root.proto.MessageKey.verify(message.commentParentKey); - if (error) - return "commentParentKey." + error; + properties._commentParentKey = 1; + { + var error = $root.proto.MessageKey.verify(message.commentParentKey); + if (error) + return "commentParentKey." + error; + } } - if (message.replyCount != null && message.hasOwnProperty("replyCount")) + if (message.replyCount != null && message.hasOwnProperty("replyCount")) { + properties._replyCount = 1; if (!$util.isInteger(message.replyCount)) return "replyCount: integer expected"; + } return null; }; @@ -11424,14 +27301,16 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.commentParentKey = null; - object.replyCount = 0; - } - if (message.commentParentKey != null && message.hasOwnProperty("commentParentKey")) + if (message.commentParentKey != null && message.hasOwnProperty("commentParentKey")) { object.commentParentKey = $root.proto.MessageKey.toObject(message.commentParentKey, options); - if (message.replyCount != null && message.hasOwnProperty("replyCount")) + if (options.oneofs) + object._commentParentKey = "commentParentKey"; + } + if (message.replyCount != null && message.hasOwnProperty("replyCount")) { object.replyCount = message.replyCount; + if (options.oneofs) + object._replyCount = "replyCount"; + } return object; }; @@ -11446,9 +27325,948 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CommentMetadata + * @function getTypeUrl + * @memberof proto.CommentMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CommentMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.CommentMetadata"; + }; + return CommentMetadata; })(); + proto.CompanionCommitment = (function() { + + /** + * Properties of a CompanionCommitment. + * @memberof proto + * @interface ICompanionCommitment + * @property {Uint8Array|null} [hash] CompanionCommitment hash + */ + + /** + * Constructs a new CompanionCommitment. + * @memberof proto + * @classdesc Represents a CompanionCommitment. + * @implements ICompanionCommitment + * @constructor + * @param {proto.ICompanionCommitment=} [properties] Properties to set + */ + function CompanionCommitment(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CompanionCommitment hash. + * @member {Uint8Array|null|undefined} hash + * @memberof proto.CompanionCommitment + * @instance + */ + CompanionCommitment.prototype.hash = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CompanionCommitment.prototype, "_hash", { + get: $util.oneOfGetter($oneOfFields = ["hash"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new CompanionCommitment instance using the specified properties. + * @function create + * @memberof proto.CompanionCommitment + * @static + * @param {proto.ICompanionCommitment=} [properties] Properties to set + * @returns {proto.CompanionCommitment} CompanionCommitment instance + */ + CompanionCommitment.create = function create(properties) { + return new CompanionCommitment(properties); + }; + + /** + * Encodes the specified CompanionCommitment message. Does not implicitly {@link proto.CompanionCommitment.verify|verify} messages. + * @function encode + * @memberof proto.CompanionCommitment + * @static + * @param {proto.ICompanionCommitment} message CompanionCommitment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompanionCommitment.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.hash != null && Object.hasOwnProperty.call(message, "hash")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.hash); + return writer; + }; + + /** + * Encodes the specified CompanionCommitment message, length delimited. Does not implicitly {@link proto.CompanionCommitment.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.CompanionCommitment + * @static + * @param {proto.ICompanionCommitment} message CompanionCommitment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompanionCommitment.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CompanionCommitment message from the specified reader or buffer. + * @function decode + * @memberof proto.CompanionCommitment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.CompanionCommitment} CompanionCommitment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompanionCommitment.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.CompanionCommitment(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.hash = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CompanionCommitment message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.CompanionCommitment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.CompanionCommitment} CompanionCommitment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompanionCommitment.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CompanionCommitment message. + * @function verify + * @memberof proto.CompanionCommitment + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CompanionCommitment.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.hash != null && message.hasOwnProperty("hash")) { + properties._hash = 1; + if (!(message.hash && typeof message.hash.length === "number" || $util.isString(message.hash))) + return "hash: buffer expected"; + } + return null; + }; + + /** + * Creates a CompanionCommitment message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.CompanionCommitment + * @static + * @param {Object.} object Plain object + * @returns {proto.CompanionCommitment} CompanionCommitment + */ + CompanionCommitment.fromObject = function fromObject(object) { + if (object instanceof $root.proto.CompanionCommitment) + return object; + var message = new $root.proto.CompanionCommitment(); + if (object.hash != null) + if (typeof object.hash === "string") + $util.base64.decode(object.hash, message.hash = $util.newBuffer($util.base64.length(object.hash)), 0); + else if (object.hash.length >= 0) + message.hash = object.hash; + return message; + }; + + /** + * Creates a plain object from a CompanionCommitment message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.CompanionCommitment + * @static + * @param {proto.CompanionCommitment} message CompanionCommitment + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CompanionCommitment.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.hash != null && message.hasOwnProperty("hash")) { + object.hash = options.bytes === String ? $util.base64.encode(message.hash, 0, message.hash.length) : options.bytes === Array ? Array.prototype.slice.call(message.hash) : message.hash; + if (options.oneofs) + object._hash = "hash"; + } + return object; + }; + + /** + * Converts this CompanionCommitment to JSON. + * @function toJSON + * @memberof proto.CompanionCommitment + * @instance + * @returns {Object.} JSON object + */ + CompanionCommitment.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CompanionCommitment + * @function getTypeUrl + * @memberof proto.CompanionCommitment + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CompanionCommitment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.CompanionCommitment"; + }; + + return CompanionCommitment; + })(); + + proto.CompanionEphemeralIdentity = (function() { + + /** + * Properties of a CompanionEphemeralIdentity. + * @memberof proto + * @interface ICompanionEphemeralIdentity + * @property {Uint8Array|null} [publicKey] CompanionEphemeralIdentity publicKey + * @property {proto.DeviceProps.PlatformType|null} [deviceType] CompanionEphemeralIdentity deviceType + * @property {string|null} [ref] CompanionEphemeralIdentity ref + */ + + /** + * Constructs a new CompanionEphemeralIdentity. + * @memberof proto + * @classdesc Represents a CompanionEphemeralIdentity. + * @implements ICompanionEphemeralIdentity + * @constructor + * @param {proto.ICompanionEphemeralIdentity=} [properties] Properties to set + */ + function CompanionEphemeralIdentity(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CompanionEphemeralIdentity publicKey. + * @member {Uint8Array|null|undefined} publicKey + * @memberof proto.CompanionEphemeralIdentity + * @instance + */ + CompanionEphemeralIdentity.prototype.publicKey = null; + + /** + * CompanionEphemeralIdentity deviceType. + * @member {proto.DeviceProps.PlatformType|null|undefined} deviceType + * @memberof proto.CompanionEphemeralIdentity + * @instance + */ + CompanionEphemeralIdentity.prototype.deviceType = null; + + /** + * CompanionEphemeralIdentity ref. + * @member {string|null|undefined} ref + * @memberof proto.CompanionEphemeralIdentity + * @instance + */ + CompanionEphemeralIdentity.prototype.ref = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CompanionEphemeralIdentity.prototype, "_publicKey", { + get: $util.oneOfGetter($oneOfFields = ["publicKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CompanionEphemeralIdentity.prototype, "_deviceType", { + get: $util.oneOfGetter($oneOfFields = ["deviceType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CompanionEphemeralIdentity.prototype, "_ref", { + get: $util.oneOfGetter($oneOfFields = ["ref"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new CompanionEphemeralIdentity instance using the specified properties. + * @function create + * @memberof proto.CompanionEphemeralIdentity + * @static + * @param {proto.ICompanionEphemeralIdentity=} [properties] Properties to set + * @returns {proto.CompanionEphemeralIdentity} CompanionEphemeralIdentity instance + */ + CompanionEphemeralIdentity.create = function create(properties) { + return new CompanionEphemeralIdentity(properties); + }; + + /** + * Encodes the specified CompanionEphemeralIdentity message. Does not implicitly {@link proto.CompanionEphemeralIdentity.verify|verify} messages. + * @function encode + * @memberof proto.CompanionEphemeralIdentity + * @static + * @param {proto.ICompanionEphemeralIdentity} message CompanionEphemeralIdentity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompanionEphemeralIdentity.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.publicKey != null && Object.hasOwnProperty.call(message, "publicKey")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.publicKey); + if (message.deviceType != null && Object.hasOwnProperty.call(message, "deviceType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.deviceType); + if (message.ref != null && Object.hasOwnProperty.call(message, "ref")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.ref); + return writer; + }; + + /** + * Encodes the specified CompanionEphemeralIdentity message, length delimited. Does not implicitly {@link proto.CompanionEphemeralIdentity.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.CompanionEphemeralIdentity + * @static + * @param {proto.ICompanionEphemeralIdentity} message CompanionEphemeralIdentity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompanionEphemeralIdentity.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CompanionEphemeralIdentity message from the specified reader or buffer. + * @function decode + * @memberof proto.CompanionEphemeralIdentity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.CompanionEphemeralIdentity} CompanionEphemeralIdentity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompanionEphemeralIdentity.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.CompanionEphemeralIdentity(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.publicKey = reader.bytes(); + break; + } + case 2: { + message.deviceType = reader.int32(); + break; + } + case 3: { + message.ref = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CompanionEphemeralIdentity message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.CompanionEphemeralIdentity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.CompanionEphemeralIdentity} CompanionEphemeralIdentity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompanionEphemeralIdentity.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CompanionEphemeralIdentity message. + * @function verify + * @memberof proto.CompanionEphemeralIdentity + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CompanionEphemeralIdentity.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.publicKey != null && message.hasOwnProperty("publicKey")) { + properties._publicKey = 1; + if (!(message.publicKey && typeof message.publicKey.length === "number" || $util.isString(message.publicKey))) + return "publicKey: buffer expected"; + } + if (message.deviceType != null && message.hasOwnProperty("deviceType")) { + properties._deviceType = 1; + switch (message.deviceType) { + default: + return "deviceType: 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: + break; + } + } + if (message.ref != null && message.hasOwnProperty("ref")) { + properties._ref = 1; + if (!$util.isString(message.ref)) + return "ref: string expected"; + } + return null; + }; + + /** + * Creates a CompanionEphemeralIdentity message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.CompanionEphemeralIdentity + * @static + * @param {Object.} object Plain object + * @returns {proto.CompanionEphemeralIdentity} CompanionEphemeralIdentity + */ + CompanionEphemeralIdentity.fromObject = function fromObject(object) { + if (object instanceof $root.proto.CompanionEphemeralIdentity) + return object; + var message = new $root.proto.CompanionEphemeralIdentity(); + if (object.publicKey != null) + if (typeof object.publicKey === "string") + $util.base64.decode(object.publicKey, message.publicKey = $util.newBuffer($util.base64.length(object.publicKey)), 0); + else if (object.publicKey.length >= 0) + message.publicKey = object.publicKey; + switch (object.deviceType) { + default: + if (typeof object.deviceType === "number") { + message.deviceType = object.deviceType; + break; + } + break; + case "UNKNOWN": + case 0: + message.deviceType = 0; + break; + case "CHROME": + case 1: + message.deviceType = 1; + break; + case "FIREFOX": + case 2: + message.deviceType = 2; + break; + case "IE": + case 3: + message.deviceType = 3; + break; + case "OPERA": + case 4: + message.deviceType = 4; + break; + case "SAFARI": + case 5: + message.deviceType = 5; + break; + case "EDGE": + case 6: + message.deviceType = 6; + break; + case "DESKTOP": + case 7: + message.deviceType = 7; + break; + case "IPAD": + case 8: + message.deviceType = 8; + break; + case "ANDROID_TABLET": + case 9: + message.deviceType = 9; + break; + case "OHANA": + case 10: + message.deviceType = 10; + break; + case "ALOHA": + case 11: + message.deviceType = 11; + break; + case "CATALINA": + case 12: + message.deviceType = 12; + break; + case "TCL_TV": + case 13: + message.deviceType = 13; + break; + case "IOS_PHONE": + case 14: + message.deviceType = 14; + break; + case "IOS_CATALYST": + case 15: + message.deviceType = 15; + break; + case "ANDROID_PHONE": + case 16: + message.deviceType = 16; + break; + case "ANDROID_AMBIGUOUS": + case 17: + message.deviceType = 17; + break; + case "WEAR_OS": + case 18: + message.deviceType = 18; + break; + case "AR_WRIST": + case 19: + message.deviceType = 19; + break; + case "AR_DEVICE": + case 20: + message.deviceType = 20; + break; + case "UWP": + case 21: + message.deviceType = 21; + break; + case "VR": + case 22: + message.deviceType = 22; + break; + case "CLOUD_API": + case 23: + message.deviceType = 23; + break; + case "SMARTGLASSES": + case 24: + message.deviceType = 24; + break; + } + if (object.ref != null) + message.ref = String(object.ref); + return message; + }; + + /** + * Creates a plain object from a CompanionEphemeralIdentity message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.CompanionEphemeralIdentity + * @static + * @param {proto.CompanionEphemeralIdentity} message CompanionEphemeralIdentity + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CompanionEphemeralIdentity.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.publicKey != null && message.hasOwnProperty("publicKey")) { + object.publicKey = options.bytes === String ? $util.base64.encode(message.publicKey, 0, message.publicKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.publicKey) : message.publicKey; + if (options.oneofs) + object._publicKey = "publicKey"; + } + if (message.deviceType != null && message.hasOwnProperty("deviceType")) { + object.deviceType = options.enums === String ? $root.proto.DeviceProps.PlatformType[message.deviceType] === undefined ? message.deviceType : $root.proto.DeviceProps.PlatformType[message.deviceType] : message.deviceType; + if (options.oneofs) + object._deviceType = "deviceType"; + } + if (message.ref != null && message.hasOwnProperty("ref")) { + object.ref = message.ref; + if (options.oneofs) + object._ref = "ref"; + } + return object; + }; + + /** + * Converts this CompanionEphemeralIdentity to JSON. + * @function toJSON + * @memberof proto.CompanionEphemeralIdentity + * @instance + * @returns {Object.} JSON object + */ + CompanionEphemeralIdentity.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CompanionEphemeralIdentity + * @function getTypeUrl + * @memberof proto.CompanionEphemeralIdentity + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CompanionEphemeralIdentity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.CompanionEphemeralIdentity"; + }; + + return CompanionEphemeralIdentity; + })(); + + proto.Config = (function() { + + /** + * Properties of a Config. + * @memberof proto + * @interface IConfig + * @property {Object.|null} [field] Config field + * @property {number|null} [version] Config version + */ + + /** + * Constructs a new Config. + * @memberof proto + * @classdesc Represents a Config. + * @implements IConfig + * @constructor + * @param {proto.IConfig=} [properties] Properties to set + */ + function Config(properties) { + this.field = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Config field. + * @member {Object.} field + * @memberof proto.Config + * @instance + */ + Config.prototype.field = $util.emptyObject; + + /** + * Config version. + * @member {number|null|undefined} version + * @memberof proto.Config + * @instance + */ + Config.prototype.version = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Config.prototype, "_version", { + get: $util.oneOfGetter($oneOfFields = ["version"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Config instance using the specified properties. + * @function create + * @memberof proto.Config + * @static + * @param {proto.IConfig=} [properties] Properties to set + * @returns {proto.Config} Config instance + */ + Config.create = function create(properties) { + return new Config(properties); + }; + + /** + * Encodes the specified Config message. Does not implicitly {@link proto.Config.verify|verify} messages. + * @function encode + * @memberof proto.Config + * @static + * @param {proto.IConfig} message Config message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Config.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.field != null && Object.hasOwnProperty.call(message, "field")) + for (var keys = Object.keys(message.field), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 0 =*/8).uint32(keys[i]); + $root.proto.Field.encode(message.field[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.version); + return writer; + }; + + /** + * Encodes the specified Config message, length delimited. Does not implicitly {@link proto.Config.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Config + * @static + * @param {proto.IConfig} message Config message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Config.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Config message from the specified reader or buffer. + * @function decode + * @memberof proto.Config + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Config} Config + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Config.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.Config(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (message.field === $util.emptyObject) + message.field = {}; + var end2 = reader.uint32() + reader.pos; + key = 0; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.uint32(); + break; + case 2: + value = $root.proto.Field.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.field[key] = value; + break; + } + case 2: { + message.version = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Config message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Config + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Config} Config + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Config.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Config message. + * @function verify + * @memberof proto.Config + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Config.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.field != null && message.hasOwnProperty("field")) { + if (!$util.isObject(message.field)) + return "field: object expected"; + var key = Object.keys(message.field); + for (var i = 0; i < key.length; ++i) { + if (!$util.key32Re.test(key[i])) + return "field: integer key{k:uint32} expected"; + { + var error = $root.proto.Field.verify(message.field[key[i]]); + if (error) + return "field." + error; + } + } + } + if (message.version != null && message.hasOwnProperty("version")) { + properties._version = 1; + if (!$util.isInteger(message.version)) + return "version: integer expected"; + } + return null; + }; + + /** + * Creates a Config message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Config + * @static + * @param {Object.} object Plain object + * @returns {proto.Config} Config + */ + Config.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Config) + return object; + var message = new $root.proto.Config(); + if (object.field) { + if (typeof object.field !== "object") + throw TypeError(".proto.Config.field: object expected"); + message.field = {}; + for (var keys = Object.keys(object.field), i = 0; i < keys.length; ++i) { + if (typeof object.field[keys[i]] !== "object") + throw TypeError(".proto.Config.field: object expected"); + message.field[keys[i]] = $root.proto.Field.fromObject(object.field[keys[i]]); + } + } + if (object.version != null) + message.version = object.version >>> 0; + return message; + }; + + /** + * Creates a plain object from a Config message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Config + * @static + * @param {proto.Config} message Config + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Config.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.field = {}; + var keys2; + if (message.field && (keys2 = Object.keys(message.field)).length) { + object.field = {}; + for (var j = 0; j < keys2.length; ++j) + object.field[keys2[j]] = $root.proto.Field.toObject(message.field[keys2[j]], options); + } + if (message.version != null && message.hasOwnProperty("version")) { + object.version = message.version; + if (options.oneofs) + object._version = "version"; + } + return object; + }; + + /** + * Converts this Config to JSON. + * @function toJSON + * @memberof proto.Config + * @instance + * @returns {Object.} JSON object + */ + Config.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Config + * @function getTypeUrl + * @memberof proto.Config + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Config.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Config"; + }; + + return Config; + })(); + proto.ContextInfo = (function() { /** @@ -11488,6 +28306,17 @@ $root.proto = (function() { * @property {string|null} [smbClientCampaignId] ContextInfo smbClientCampaignId * @property {string|null} [smbServerCampaignId] ContextInfo smbServerCampaignId * @property {proto.ContextInfo.IDataSharingContext|null} [dataSharingContext] ContextInfo dataSharingContext + * @property {boolean|null} [alwaysShowAdAttribution] ContextInfo alwaysShowAdAttribution + * @property {proto.ContextInfo.IFeatureEligibilities|null} [featureEligibilities] ContextInfo featureEligibilities + * @property {string|null} [entryPointConversionExternalSource] ContextInfo entryPointConversionExternalSource + * @property {string|null} [entryPointConversionExternalMedium] ContextInfo entryPointConversionExternalMedium + * @property {string|null} [ctwaSignals] ContextInfo ctwaSignals + * @property {Uint8Array|null} [ctwaPayload] ContextInfo ctwaPayload + * @property {proto.ContextInfo.IForwardedAIBotMessageInfo|null} [forwardedAiBotMessageInfo] ContextInfo forwardedAiBotMessageInfo + * @property {proto.ContextInfo.StatusAttributionType|null} [statusAttributionType] ContextInfo statusAttributionType + * @property {proto.IUrlTrackingMap|null} [urlTrackingMap] ContextInfo urlTrackingMap + * @property {proto.ContextInfo.PairedMediaType|null} [pairedMediaType] ContextInfo pairedMediaType + * @property {number|null} [rankingVersion] ContextInfo rankingVersion */ /** @@ -11509,19 +28338,19 @@ $root.proto = (function() { /** * ContextInfo stanzaId. - * @member {string} stanzaId + * @member {string|null|undefined} stanzaId * @memberof proto.ContextInfo * @instance */ - ContextInfo.prototype.stanzaId = ""; + ContextInfo.prototype.stanzaId = null; /** * ContextInfo participant. - * @member {string} participant + * @member {string|null|undefined} participant * @memberof proto.ContextInfo * @instance */ - ContextInfo.prototype.participant = ""; + ContextInfo.prototype.participant = null; /** * ContextInfo quotedMessage. @@ -11533,11 +28362,11 @@ $root.proto = (function() { /** * ContextInfo remoteJid. - * @member {string} remoteJid + * @member {string|null|undefined} remoteJid * @memberof proto.ContextInfo * @instance */ - ContextInfo.prototype.remoteJid = ""; + ContextInfo.prototype.remoteJid = null; /** * ContextInfo mentionedJid. @@ -11549,43 +28378,43 @@ $root.proto = (function() { /** * ContextInfo conversionSource. - * @member {string} conversionSource + * @member {string|null|undefined} conversionSource * @memberof proto.ContextInfo * @instance */ - ContextInfo.prototype.conversionSource = ""; + ContextInfo.prototype.conversionSource = null; /** * ContextInfo conversionData. - * @member {Uint8Array} conversionData + * @member {Uint8Array|null|undefined} conversionData * @memberof proto.ContextInfo * @instance */ - ContextInfo.prototype.conversionData = $util.newBuffer([]); + ContextInfo.prototype.conversionData = null; /** * ContextInfo conversionDelaySeconds. - * @member {number} conversionDelaySeconds + * @member {number|null|undefined} conversionDelaySeconds * @memberof proto.ContextInfo * @instance */ - ContextInfo.prototype.conversionDelaySeconds = 0; + ContextInfo.prototype.conversionDelaySeconds = null; /** * ContextInfo forwardingScore. - * @member {number} forwardingScore + * @member {number|null|undefined} forwardingScore * @memberof proto.ContextInfo * @instance */ - ContextInfo.prototype.forwardingScore = 0; + ContextInfo.prototype.forwardingScore = null; /** * ContextInfo isForwarded. - * @member {boolean} isForwarded + * @member {boolean|null|undefined} isForwarded * @memberof proto.ContextInfo * @instance */ - ContextInfo.prototype.isForwarded = false; + ContextInfo.prototype.isForwarded = null; /** * ContextInfo quotedAd. @@ -11605,27 +28434,27 @@ $root.proto = (function() { /** * ContextInfo expiration. - * @member {number} expiration + * @member {number|null|undefined} expiration * @memberof proto.ContextInfo * @instance */ - ContextInfo.prototype.expiration = 0; + ContextInfo.prototype.expiration = null; /** * ContextInfo ephemeralSettingTimestamp. - * @member {number|Long} ephemeralSettingTimestamp + * @member {number|Long|null|undefined} ephemeralSettingTimestamp * @memberof proto.ContextInfo * @instance */ - ContextInfo.prototype.ephemeralSettingTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + ContextInfo.prototype.ephemeralSettingTimestamp = null; /** * ContextInfo ephemeralSharedSecret. - * @member {Uint8Array} ephemeralSharedSecret + * @member {Uint8Array|null|undefined} ephemeralSharedSecret * @memberof proto.ContextInfo * @instance */ - ContextInfo.prototype.ephemeralSharedSecret = $util.newBuffer([]); + ContextInfo.prototype.ephemeralSharedSecret = null; /** * ContextInfo externalAdReply. @@ -11637,27 +28466,27 @@ $root.proto = (function() { /** * ContextInfo entryPointConversionSource. - * @member {string} entryPointConversionSource + * @member {string|null|undefined} entryPointConversionSource * @memberof proto.ContextInfo * @instance */ - ContextInfo.prototype.entryPointConversionSource = ""; + ContextInfo.prototype.entryPointConversionSource = null; /** * ContextInfo entryPointConversionApp. - * @member {string} entryPointConversionApp + * @member {string|null|undefined} entryPointConversionApp * @memberof proto.ContextInfo * @instance */ - ContextInfo.prototype.entryPointConversionApp = ""; + ContextInfo.prototype.entryPointConversionApp = null; /** * ContextInfo entryPointConversionDelaySeconds. - * @member {number} entryPointConversionDelaySeconds + * @member {number|null|undefined} entryPointConversionDelaySeconds * @memberof proto.ContextInfo * @instance */ - ContextInfo.prototype.entryPointConversionDelaySeconds = 0; + ContextInfo.prototype.entryPointConversionDelaySeconds = null; /** * ContextInfo disappearingMode. @@ -11677,43 +28506,43 @@ $root.proto = (function() { /** * ContextInfo groupSubject. - * @member {string} groupSubject + * @member {string|null|undefined} groupSubject * @memberof proto.ContextInfo * @instance */ - ContextInfo.prototype.groupSubject = ""; + ContextInfo.prototype.groupSubject = null; /** * ContextInfo parentGroupJid. - * @member {string} parentGroupJid + * @member {string|null|undefined} parentGroupJid * @memberof proto.ContextInfo * @instance */ - ContextInfo.prototype.parentGroupJid = ""; + ContextInfo.prototype.parentGroupJid = null; /** * ContextInfo trustBannerType. - * @member {string} trustBannerType + * @member {string|null|undefined} trustBannerType * @memberof proto.ContextInfo * @instance */ - ContextInfo.prototype.trustBannerType = ""; + ContextInfo.prototype.trustBannerType = null; /** * ContextInfo trustBannerAction. - * @member {number} trustBannerAction + * @member {number|null|undefined} trustBannerAction * @memberof proto.ContextInfo * @instance */ - ContextInfo.prototype.trustBannerAction = 0; + ContextInfo.prototype.trustBannerAction = null; /** * ContextInfo isSampled. - * @member {boolean} isSampled + * @member {boolean|null|undefined} isSampled * @memberof proto.ContextInfo * @instance */ - ContextInfo.prototype.isSampled = false; + ContextInfo.prototype.isSampled = null; /** * ContextInfo groupMentions. @@ -11749,19 +28578,19 @@ $root.proto = (function() { /** * ContextInfo smbClientCampaignId. - * @member {string} smbClientCampaignId + * @member {string|null|undefined} smbClientCampaignId * @memberof proto.ContextInfo * @instance */ - ContextInfo.prototype.smbClientCampaignId = ""; + ContextInfo.prototype.smbClientCampaignId = null; /** * ContextInfo smbServerCampaignId. - * @member {string} smbServerCampaignId + * @member {string|null|undefined} smbServerCampaignId * @memberof proto.ContextInfo * @instance */ - ContextInfo.prototype.smbServerCampaignId = ""; + ContextInfo.prototype.smbServerCampaignId = null; /** * ContextInfo dataSharingContext. @@ -11771,6 +28600,349 @@ $root.proto = (function() { */ ContextInfo.prototype.dataSharingContext = null; + /** + * ContextInfo alwaysShowAdAttribution. + * @member {boolean|null|undefined} alwaysShowAdAttribution + * @memberof proto.ContextInfo + * @instance + */ + ContextInfo.prototype.alwaysShowAdAttribution = null; + + /** + * ContextInfo featureEligibilities. + * @member {proto.ContextInfo.IFeatureEligibilities|null|undefined} featureEligibilities + * @memberof proto.ContextInfo + * @instance + */ + ContextInfo.prototype.featureEligibilities = null; + + /** + * ContextInfo entryPointConversionExternalSource. + * @member {string|null|undefined} entryPointConversionExternalSource + * @memberof proto.ContextInfo + * @instance + */ + ContextInfo.prototype.entryPointConversionExternalSource = null; + + /** + * ContextInfo entryPointConversionExternalMedium. + * @member {string|null|undefined} entryPointConversionExternalMedium + * @memberof proto.ContextInfo + * @instance + */ + ContextInfo.prototype.entryPointConversionExternalMedium = null; + + /** + * ContextInfo ctwaSignals. + * @member {string|null|undefined} ctwaSignals + * @memberof proto.ContextInfo + * @instance + */ + ContextInfo.prototype.ctwaSignals = null; + + /** + * ContextInfo ctwaPayload. + * @member {Uint8Array|null|undefined} ctwaPayload + * @memberof proto.ContextInfo + * @instance + */ + ContextInfo.prototype.ctwaPayload = null; + + /** + * ContextInfo forwardedAiBotMessageInfo. + * @member {proto.ContextInfo.IForwardedAIBotMessageInfo|null|undefined} forwardedAiBotMessageInfo + * @memberof proto.ContextInfo + * @instance + */ + ContextInfo.prototype.forwardedAiBotMessageInfo = null; + + /** + * ContextInfo statusAttributionType. + * @member {proto.ContextInfo.StatusAttributionType|null|undefined} statusAttributionType + * @memberof proto.ContextInfo + * @instance + */ + ContextInfo.prototype.statusAttributionType = null; + + /** + * ContextInfo urlTrackingMap. + * @member {proto.IUrlTrackingMap|null|undefined} urlTrackingMap + * @memberof proto.ContextInfo + * @instance + */ + ContextInfo.prototype.urlTrackingMap = null; + + /** + * ContextInfo pairedMediaType. + * @member {proto.ContextInfo.PairedMediaType|null|undefined} pairedMediaType + * @memberof proto.ContextInfo + * @instance + */ + ContextInfo.prototype.pairedMediaType = null; + + /** + * ContextInfo rankingVersion. + * @member {number|null|undefined} rankingVersion + * @memberof proto.ContextInfo + * @instance + */ + ContextInfo.prototype.rankingVersion = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ContextInfo.prototype, "_stanzaId", { + get: $util.oneOfGetter($oneOfFields = ["stanzaId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ContextInfo.prototype, "_participant", { + get: $util.oneOfGetter($oneOfFields = ["participant"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ContextInfo.prototype, "_quotedMessage", { + get: $util.oneOfGetter($oneOfFields = ["quotedMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ContextInfo.prototype, "_remoteJid", { + get: $util.oneOfGetter($oneOfFields = ["remoteJid"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ContextInfo.prototype, "_conversionSource", { + get: $util.oneOfGetter($oneOfFields = ["conversionSource"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ContextInfo.prototype, "_conversionData", { + get: $util.oneOfGetter($oneOfFields = ["conversionData"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ContextInfo.prototype, "_conversionDelaySeconds", { + get: $util.oneOfGetter($oneOfFields = ["conversionDelaySeconds"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ContextInfo.prototype, "_forwardingScore", { + get: $util.oneOfGetter($oneOfFields = ["forwardingScore"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ContextInfo.prototype, "_isForwarded", { + get: $util.oneOfGetter($oneOfFields = ["isForwarded"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ContextInfo.prototype, "_quotedAd", { + get: $util.oneOfGetter($oneOfFields = ["quotedAd"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ContextInfo.prototype, "_placeholderKey", { + get: $util.oneOfGetter($oneOfFields = ["placeholderKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ContextInfo.prototype, "_expiration", { + get: $util.oneOfGetter($oneOfFields = ["expiration"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ContextInfo.prototype, "_ephemeralSettingTimestamp", { + get: $util.oneOfGetter($oneOfFields = ["ephemeralSettingTimestamp"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ContextInfo.prototype, "_ephemeralSharedSecret", { + get: $util.oneOfGetter($oneOfFields = ["ephemeralSharedSecret"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ContextInfo.prototype, "_externalAdReply", { + get: $util.oneOfGetter($oneOfFields = ["externalAdReply"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ContextInfo.prototype, "_entryPointConversionSource", { + get: $util.oneOfGetter($oneOfFields = ["entryPointConversionSource"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ContextInfo.prototype, "_entryPointConversionApp", { + get: $util.oneOfGetter($oneOfFields = ["entryPointConversionApp"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ContextInfo.prototype, "_entryPointConversionDelaySeconds", { + get: $util.oneOfGetter($oneOfFields = ["entryPointConversionDelaySeconds"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ContextInfo.prototype, "_disappearingMode", { + get: $util.oneOfGetter($oneOfFields = ["disappearingMode"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ContextInfo.prototype, "_actionLink", { + get: $util.oneOfGetter($oneOfFields = ["actionLink"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ContextInfo.prototype, "_groupSubject", { + get: $util.oneOfGetter($oneOfFields = ["groupSubject"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ContextInfo.prototype, "_parentGroupJid", { + get: $util.oneOfGetter($oneOfFields = ["parentGroupJid"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ContextInfo.prototype, "_trustBannerType", { + get: $util.oneOfGetter($oneOfFields = ["trustBannerType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ContextInfo.prototype, "_trustBannerAction", { + get: $util.oneOfGetter($oneOfFields = ["trustBannerAction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ContextInfo.prototype, "_isSampled", { + get: $util.oneOfGetter($oneOfFields = ["isSampled"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ContextInfo.prototype, "_utm", { + get: $util.oneOfGetter($oneOfFields = ["utm"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ContextInfo.prototype, "_forwardedNewsletterMessageInfo", { + get: $util.oneOfGetter($oneOfFields = ["forwardedNewsletterMessageInfo"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ContextInfo.prototype, "_businessMessageForwardInfo", { + get: $util.oneOfGetter($oneOfFields = ["businessMessageForwardInfo"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ContextInfo.prototype, "_smbClientCampaignId", { + get: $util.oneOfGetter($oneOfFields = ["smbClientCampaignId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ContextInfo.prototype, "_smbServerCampaignId", { + get: $util.oneOfGetter($oneOfFields = ["smbServerCampaignId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ContextInfo.prototype, "_dataSharingContext", { + get: $util.oneOfGetter($oneOfFields = ["dataSharingContext"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ContextInfo.prototype, "_alwaysShowAdAttribution", { + get: $util.oneOfGetter($oneOfFields = ["alwaysShowAdAttribution"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ContextInfo.prototype, "_featureEligibilities", { + get: $util.oneOfGetter($oneOfFields = ["featureEligibilities"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ContextInfo.prototype, "_entryPointConversionExternalSource", { + get: $util.oneOfGetter($oneOfFields = ["entryPointConversionExternalSource"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ContextInfo.prototype, "_entryPointConversionExternalMedium", { + get: $util.oneOfGetter($oneOfFields = ["entryPointConversionExternalMedium"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ContextInfo.prototype, "_ctwaSignals", { + get: $util.oneOfGetter($oneOfFields = ["ctwaSignals"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ContextInfo.prototype, "_ctwaPayload", { + get: $util.oneOfGetter($oneOfFields = ["ctwaPayload"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ContextInfo.prototype, "_forwardedAiBotMessageInfo", { + get: $util.oneOfGetter($oneOfFields = ["forwardedAiBotMessageInfo"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ContextInfo.prototype, "_statusAttributionType", { + get: $util.oneOfGetter($oneOfFields = ["statusAttributionType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ContextInfo.prototype, "_urlTrackingMap", { + get: $util.oneOfGetter($oneOfFields = ["urlTrackingMap"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ContextInfo.prototype, "_pairedMediaType", { + get: $util.oneOfGetter($oneOfFields = ["pairedMediaType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ContextInfo.prototype, "_rankingVersion", { + get: $util.oneOfGetter($oneOfFields = ["rankingVersion"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new ContextInfo instance using the specified properties. * @function create @@ -11863,6 +29035,28 @@ $root.proto = (function() { writer.uint32(/* id 46, wireType 2 =*/370).string(message.smbServerCampaignId); if (message.dataSharingContext != null && Object.hasOwnProperty.call(message, "dataSharingContext")) $root.proto.ContextInfo.DataSharingContext.encode(message.dataSharingContext, writer.uint32(/* id 47, wireType 2 =*/378).fork()).ldelim(); + if (message.alwaysShowAdAttribution != null && Object.hasOwnProperty.call(message, "alwaysShowAdAttribution")) + writer.uint32(/* id 48, wireType 0 =*/384).bool(message.alwaysShowAdAttribution); + if (message.featureEligibilities != null && Object.hasOwnProperty.call(message, "featureEligibilities")) + $root.proto.ContextInfo.FeatureEligibilities.encode(message.featureEligibilities, writer.uint32(/* id 49, wireType 2 =*/394).fork()).ldelim(); + if (message.entryPointConversionExternalSource != null && Object.hasOwnProperty.call(message, "entryPointConversionExternalSource")) + writer.uint32(/* id 50, wireType 2 =*/402).string(message.entryPointConversionExternalSource); + if (message.entryPointConversionExternalMedium != null && Object.hasOwnProperty.call(message, "entryPointConversionExternalMedium")) + writer.uint32(/* id 51, wireType 2 =*/410).string(message.entryPointConversionExternalMedium); + if (message.ctwaSignals != null && Object.hasOwnProperty.call(message, "ctwaSignals")) + writer.uint32(/* id 54, wireType 2 =*/434).string(message.ctwaSignals); + if (message.ctwaPayload != null && Object.hasOwnProperty.call(message, "ctwaPayload")) + writer.uint32(/* id 55, wireType 2 =*/442).bytes(message.ctwaPayload); + if (message.forwardedAiBotMessageInfo != null && Object.hasOwnProperty.call(message, "forwardedAiBotMessageInfo")) + $root.proto.ContextInfo.ForwardedAIBotMessageInfo.encode(message.forwardedAiBotMessageInfo, writer.uint32(/* id 56, wireType 2 =*/450).fork()).ldelim(); + if (message.statusAttributionType != null && Object.hasOwnProperty.call(message, "statusAttributionType")) + writer.uint32(/* id 57, wireType 0 =*/456).int32(message.statusAttributionType); + if (message.urlTrackingMap != null && Object.hasOwnProperty.call(message, "urlTrackingMap")) + $root.proto.UrlTrackingMap.encode(message.urlTrackingMap, writer.uint32(/* id 58, wireType 2 =*/466).fork()).ldelim(); + if (message.pairedMediaType != null && Object.hasOwnProperty.call(message, "pairedMediaType")) + writer.uint32(/* id 59, wireType 0 =*/472).int32(message.pairedMediaType); + if (message.rankingVersion != null && Object.hasOwnProperty.call(message, "rankingVersion")) + writer.uint32(/* id 60, wireType 0 =*/480).uint32(message.rankingVersion); return writer; }; @@ -11897,109 +29091,186 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.stanzaId = reader.string(); - break; - case 2: - message.participant = reader.string(); - break; - case 3: - message.quotedMessage = $root.proto.Message.decode(reader, reader.uint32()); - break; - case 4: - message.remoteJid = reader.string(); - break; - case 15: - if (!(message.mentionedJid && message.mentionedJid.length)) - message.mentionedJid = []; - message.mentionedJid.push(reader.string()); - break; - case 18: - message.conversionSource = reader.string(); - break; - case 19: - message.conversionData = reader.bytes(); - break; - case 20: - message.conversionDelaySeconds = reader.uint32(); - break; - case 21: - message.forwardingScore = reader.uint32(); - break; - case 22: - message.isForwarded = reader.bool(); - break; - case 23: - message.quotedAd = $root.proto.ContextInfo.AdReplyInfo.decode(reader, reader.uint32()); - break; - case 24: - message.placeholderKey = $root.proto.MessageKey.decode(reader, reader.uint32()); - break; - case 25: - message.expiration = reader.uint32(); - break; - case 26: - message.ephemeralSettingTimestamp = reader.int64(); - break; - case 27: - message.ephemeralSharedSecret = reader.bytes(); - break; - case 28: - message.externalAdReply = $root.proto.ContextInfo.ExternalAdReplyInfo.decode(reader, reader.uint32()); - break; - case 29: - message.entryPointConversionSource = reader.string(); - break; - case 30: - message.entryPointConversionApp = reader.string(); - break; - case 31: - message.entryPointConversionDelaySeconds = reader.uint32(); - break; - case 32: - message.disappearingMode = $root.proto.DisappearingMode.decode(reader, reader.uint32()); - break; - case 33: - message.actionLink = $root.proto.ActionLink.decode(reader, reader.uint32()); - break; - case 34: - message.groupSubject = reader.string(); - break; - case 35: - message.parentGroupJid = reader.string(); - break; - case 37: - message.trustBannerType = reader.string(); - break; - case 38: - message.trustBannerAction = reader.uint32(); - break; - case 39: - message.isSampled = reader.bool(); - break; - case 40: - if (!(message.groupMentions && message.groupMentions.length)) - message.groupMentions = []; - message.groupMentions.push($root.proto.GroupMention.decode(reader, reader.uint32())); - break; - case 41: - message.utm = $root.proto.ContextInfo.UTMInfo.decode(reader, reader.uint32()); - break; - case 43: - message.forwardedNewsletterMessageInfo = $root.proto.ContextInfo.ForwardedNewsletterMessageInfo.decode(reader, reader.uint32()); - break; - case 44: - message.businessMessageForwardInfo = $root.proto.ContextInfo.BusinessMessageForwardInfo.decode(reader, reader.uint32()); - break; - case 45: - message.smbClientCampaignId = reader.string(); - break; - case 46: - message.smbServerCampaignId = reader.string(); - break; - case 47: - message.dataSharingContext = $root.proto.ContextInfo.DataSharingContext.decode(reader, reader.uint32()); - break; + case 1: { + message.stanzaId = reader.string(); + break; + } + case 2: { + message.participant = reader.string(); + break; + } + case 3: { + message.quotedMessage = $root.proto.Message.decode(reader, reader.uint32()); + break; + } + case 4: { + message.remoteJid = reader.string(); + break; + } + case 15: { + if (!(message.mentionedJid && message.mentionedJid.length)) + message.mentionedJid = []; + message.mentionedJid.push(reader.string()); + break; + } + case 18: { + message.conversionSource = reader.string(); + break; + } + case 19: { + message.conversionData = reader.bytes(); + break; + } + case 20: { + message.conversionDelaySeconds = reader.uint32(); + break; + } + case 21: { + message.forwardingScore = reader.uint32(); + break; + } + case 22: { + message.isForwarded = reader.bool(); + break; + } + case 23: { + message.quotedAd = $root.proto.ContextInfo.AdReplyInfo.decode(reader, reader.uint32()); + break; + } + case 24: { + message.placeholderKey = $root.proto.MessageKey.decode(reader, reader.uint32()); + break; + } + case 25: { + message.expiration = reader.uint32(); + break; + } + case 26: { + message.ephemeralSettingTimestamp = reader.int64(); + break; + } + case 27: { + message.ephemeralSharedSecret = reader.bytes(); + break; + } + case 28: { + message.externalAdReply = $root.proto.ContextInfo.ExternalAdReplyInfo.decode(reader, reader.uint32()); + break; + } + case 29: { + message.entryPointConversionSource = reader.string(); + break; + } + case 30: { + message.entryPointConversionApp = reader.string(); + break; + } + case 31: { + message.entryPointConversionDelaySeconds = reader.uint32(); + break; + } + case 32: { + message.disappearingMode = $root.proto.DisappearingMode.decode(reader, reader.uint32()); + break; + } + case 33: { + message.actionLink = $root.proto.ActionLink.decode(reader, reader.uint32()); + break; + } + case 34: { + message.groupSubject = reader.string(); + break; + } + case 35: { + message.parentGroupJid = reader.string(); + break; + } + case 37: { + message.trustBannerType = reader.string(); + break; + } + case 38: { + message.trustBannerAction = reader.uint32(); + break; + } + case 39: { + message.isSampled = reader.bool(); + break; + } + case 40: { + if (!(message.groupMentions && message.groupMentions.length)) + message.groupMentions = []; + message.groupMentions.push($root.proto.GroupMention.decode(reader, reader.uint32())); + break; + } + case 41: { + message.utm = $root.proto.ContextInfo.UTMInfo.decode(reader, reader.uint32()); + break; + } + case 43: { + message.forwardedNewsletterMessageInfo = $root.proto.ContextInfo.ForwardedNewsletterMessageInfo.decode(reader, reader.uint32()); + break; + } + case 44: { + message.businessMessageForwardInfo = $root.proto.ContextInfo.BusinessMessageForwardInfo.decode(reader, reader.uint32()); + break; + } + case 45: { + message.smbClientCampaignId = reader.string(); + break; + } + case 46: { + message.smbServerCampaignId = reader.string(); + break; + } + case 47: { + message.dataSharingContext = $root.proto.ContextInfo.DataSharingContext.decode(reader, reader.uint32()); + break; + } + case 48: { + message.alwaysShowAdAttribution = reader.bool(); + break; + } + case 49: { + message.featureEligibilities = $root.proto.ContextInfo.FeatureEligibilities.decode(reader, reader.uint32()); + break; + } + case 50: { + message.entryPointConversionExternalSource = reader.string(); + break; + } + case 51: { + message.entryPointConversionExternalMedium = reader.string(); + break; + } + case 54: { + message.ctwaSignals = reader.string(); + break; + } + case 55: { + message.ctwaPayload = reader.bytes(); + break; + } + case 56: { + message.forwardedAiBotMessageInfo = $root.proto.ContextInfo.ForwardedAIBotMessageInfo.decode(reader, reader.uint32()); + break; + } + case 57: { + message.statusAttributionType = reader.int32(); + break; + } + case 58: { + message.urlTrackingMap = $root.proto.UrlTrackingMap.decode(reader, reader.uint32()); + break; + } + case 59: { + message.pairedMediaType = reader.int32(); + break; + } + case 60: { + message.rankingVersion = reader.uint32(); + break; + } default: reader.skipType(tag & 7); break; @@ -12035,20 +29306,30 @@ $root.proto = (function() { ContextInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.stanzaId != null && message.hasOwnProperty("stanzaId")) + var properties = {}; + if (message.stanzaId != null && message.hasOwnProperty("stanzaId")) { + properties._stanzaId = 1; if (!$util.isString(message.stanzaId)) return "stanzaId: string expected"; - if (message.participant != null && message.hasOwnProperty("participant")) + } + if (message.participant != null && message.hasOwnProperty("participant")) { + properties._participant = 1; if (!$util.isString(message.participant)) return "participant: string expected"; - if (message.quotedMessage != null && message.hasOwnProperty("quotedMessage")) { - var error = $root.proto.Message.verify(message.quotedMessage); - if (error) - return "quotedMessage." + error; } - if (message.remoteJid != null && message.hasOwnProperty("remoteJid")) + if (message.quotedMessage != null && message.hasOwnProperty("quotedMessage")) { + properties._quotedMessage = 1; + { + var error = $root.proto.Message.verify(message.quotedMessage); + if (error) + return "quotedMessage." + error; + } + } + if (message.remoteJid != null && message.hasOwnProperty("remoteJid")) { + properties._remoteJid = 1; if (!$util.isString(message.remoteJid)) return "remoteJid: string expected"; + } if (message.mentionedJid != null && message.hasOwnProperty("mentionedJid")) { if (!Array.isArray(message.mentionedJid)) return "mentionedJid: array expected"; @@ -12056,79 +29337,126 @@ $root.proto = (function() { if (!$util.isString(message.mentionedJid[i])) return "mentionedJid: string[] expected"; } - if (message.conversionSource != null && message.hasOwnProperty("conversionSource")) + if (message.conversionSource != null && message.hasOwnProperty("conversionSource")) { + properties._conversionSource = 1; if (!$util.isString(message.conversionSource)) return "conversionSource: string expected"; - if (message.conversionData != null && message.hasOwnProperty("conversionData")) + } + if (message.conversionData != null && message.hasOwnProperty("conversionData")) { + properties._conversionData = 1; if (!(message.conversionData && typeof message.conversionData.length === "number" || $util.isString(message.conversionData))) return "conversionData: buffer expected"; - if (message.conversionDelaySeconds != null && message.hasOwnProperty("conversionDelaySeconds")) + } + if (message.conversionDelaySeconds != null && message.hasOwnProperty("conversionDelaySeconds")) { + properties._conversionDelaySeconds = 1; if (!$util.isInteger(message.conversionDelaySeconds)) return "conversionDelaySeconds: integer expected"; - if (message.forwardingScore != null && message.hasOwnProperty("forwardingScore")) + } + if (message.forwardingScore != null && message.hasOwnProperty("forwardingScore")) { + properties._forwardingScore = 1; if (!$util.isInteger(message.forwardingScore)) return "forwardingScore: integer expected"; - if (message.isForwarded != null && message.hasOwnProperty("isForwarded")) + } + if (message.isForwarded != null && message.hasOwnProperty("isForwarded")) { + properties._isForwarded = 1; if (typeof message.isForwarded !== "boolean") return "isForwarded: boolean expected"; + } if (message.quotedAd != null && message.hasOwnProperty("quotedAd")) { - var error = $root.proto.ContextInfo.AdReplyInfo.verify(message.quotedAd); - if (error) - return "quotedAd." + error; + properties._quotedAd = 1; + { + var error = $root.proto.ContextInfo.AdReplyInfo.verify(message.quotedAd); + if (error) + return "quotedAd." + error; + } } if (message.placeholderKey != null && message.hasOwnProperty("placeholderKey")) { - var error = $root.proto.MessageKey.verify(message.placeholderKey); - if (error) - return "placeholderKey." + error; + properties._placeholderKey = 1; + { + var error = $root.proto.MessageKey.verify(message.placeholderKey); + if (error) + return "placeholderKey." + error; + } } - if (message.expiration != null && message.hasOwnProperty("expiration")) + if (message.expiration != null && message.hasOwnProperty("expiration")) { + properties._expiration = 1; if (!$util.isInteger(message.expiration)) return "expiration: integer expected"; - if (message.ephemeralSettingTimestamp != null && message.hasOwnProperty("ephemeralSettingTimestamp")) + } + if (message.ephemeralSettingTimestamp != null && message.hasOwnProperty("ephemeralSettingTimestamp")) { + properties._ephemeralSettingTimestamp = 1; if (!$util.isInteger(message.ephemeralSettingTimestamp) && !(message.ephemeralSettingTimestamp && $util.isInteger(message.ephemeralSettingTimestamp.low) && $util.isInteger(message.ephemeralSettingTimestamp.high))) return "ephemeralSettingTimestamp: integer|Long expected"; - if (message.ephemeralSharedSecret != null && message.hasOwnProperty("ephemeralSharedSecret")) + } + if (message.ephemeralSharedSecret != null && message.hasOwnProperty("ephemeralSharedSecret")) { + properties._ephemeralSharedSecret = 1; 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.ContextInfo.ExternalAdReplyInfo.verify(message.externalAdReply); - if (error) - return "externalAdReply." + error; } - if (message.entryPointConversionSource != null && message.hasOwnProperty("entryPointConversionSource")) + if (message.externalAdReply != null && message.hasOwnProperty("externalAdReply")) { + properties._externalAdReply = 1; + { + var error = $root.proto.ContextInfo.ExternalAdReplyInfo.verify(message.externalAdReply); + if (error) + return "externalAdReply." + error; + } + } + if (message.entryPointConversionSource != null && message.hasOwnProperty("entryPointConversionSource")) { + properties._entryPointConversionSource = 1; if (!$util.isString(message.entryPointConversionSource)) return "entryPointConversionSource: string expected"; - if (message.entryPointConversionApp != null && message.hasOwnProperty("entryPointConversionApp")) + } + if (message.entryPointConversionApp != null && message.hasOwnProperty("entryPointConversionApp")) { + properties._entryPointConversionApp = 1; if (!$util.isString(message.entryPointConversionApp)) return "entryPointConversionApp: string expected"; - if (message.entryPointConversionDelaySeconds != null && message.hasOwnProperty("entryPointConversionDelaySeconds")) + } + if (message.entryPointConversionDelaySeconds != null && message.hasOwnProperty("entryPointConversionDelaySeconds")) { + properties._entryPointConversionDelaySeconds = 1; if (!$util.isInteger(message.entryPointConversionDelaySeconds)) return "entryPointConversionDelaySeconds: integer expected"; + } if (message.disappearingMode != null && message.hasOwnProperty("disappearingMode")) { - var error = $root.proto.DisappearingMode.verify(message.disappearingMode); - if (error) - return "disappearingMode." + error; + properties._disappearingMode = 1; + { + var error = $root.proto.DisappearingMode.verify(message.disappearingMode); + if (error) + return "disappearingMode." + error; + } } if (message.actionLink != null && message.hasOwnProperty("actionLink")) { - var error = $root.proto.ActionLink.verify(message.actionLink); - if (error) - return "actionLink." + error; + properties._actionLink = 1; + { + var error = $root.proto.ActionLink.verify(message.actionLink); + if (error) + return "actionLink." + error; + } } - if (message.groupSubject != null && message.hasOwnProperty("groupSubject")) + if (message.groupSubject != null && message.hasOwnProperty("groupSubject")) { + properties._groupSubject = 1; if (!$util.isString(message.groupSubject)) return "groupSubject: string expected"; - if (message.parentGroupJid != null && message.hasOwnProperty("parentGroupJid")) + } + if (message.parentGroupJid != null && message.hasOwnProperty("parentGroupJid")) { + properties._parentGroupJid = 1; if (!$util.isString(message.parentGroupJid)) return "parentGroupJid: string expected"; - if (message.trustBannerType != null && message.hasOwnProperty("trustBannerType")) + } + if (message.trustBannerType != null && message.hasOwnProperty("trustBannerType")) { + properties._trustBannerType = 1; if (!$util.isString(message.trustBannerType)) return "trustBannerType: string expected"; - if (message.trustBannerAction != null && message.hasOwnProperty("trustBannerAction")) + } + if (message.trustBannerAction != null && message.hasOwnProperty("trustBannerAction")) { + properties._trustBannerAction = 1; if (!$util.isInteger(message.trustBannerAction)) return "trustBannerAction: integer expected"; - if (message.isSampled != null && message.hasOwnProperty("isSampled")) + } + if (message.isSampled != null && message.hasOwnProperty("isSampled")) { + properties._isSampled = 1; if (typeof message.isSampled !== "boolean") return "isSampled: boolean expected"; + } if (message.groupMentions != null && message.hasOwnProperty("groupMentions")) { if (!Array.isArray(message.groupMentions)) return "groupMentions: array expected"; @@ -12139,30 +29467,124 @@ $root.proto = (function() { } } if (message.utm != null && message.hasOwnProperty("utm")) { - var error = $root.proto.ContextInfo.UTMInfo.verify(message.utm); - if (error) - return "utm." + error; + properties._utm = 1; + { + var error = $root.proto.ContextInfo.UTMInfo.verify(message.utm); + if (error) + return "utm." + error; + } } if (message.forwardedNewsletterMessageInfo != null && message.hasOwnProperty("forwardedNewsletterMessageInfo")) { - var error = $root.proto.ContextInfo.ForwardedNewsletterMessageInfo.verify(message.forwardedNewsletterMessageInfo); - if (error) - return "forwardedNewsletterMessageInfo." + error; + properties._forwardedNewsletterMessageInfo = 1; + { + var error = $root.proto.ContextInfo.ForwardedNewsletterMessageInfo.verify(message.forwardedNewsletterMessageInfo); + if (error) + return "forwardedNewsletterMessageInfo." + error; + } } if (message.businessMessageForwardInfo != null && message.hasOwnProperty("businessMessageForwardInfo")) { - var error = $root.proto.ContextInfo.BusinessMessageForwardInfo.verify(message.businessMessageForwardInfo); - if (error) - return "businessMessageForwardInfo." + error; + properties._businessMessageForwardInfo = 1; + { + var error = $root.proto.ContextInfo.BusinessMessageForwardInfo.verify(message.businessMessageForwardInfo); + if (error) + return "businessMessageForwardInfo." + error; + } } - if (message.smbClientCampaignId != null && message.hasOwnProperty("smbClientCampaignId")) + if (message.smbClientCampaignId != null && message.hasOwnProperty("smbClientCampaignId")) { + properties._smbClientCampaignId = 1; if (!$util.isString(message.smbClientCampaignId)) return "smbClientCampaignId: string expected"; - if (message.smbServerCampaignId != null && message.hasOwnProperty("smbServerCampaignId")) + } + if (message.smbServerCampaignId != null && message.hasOwnProperty("smbServerCampaignId")) { + properties._smbServerCampaignId = 1; if (!$util.isString(message.smbServerCampaignId)) return "smbServerCampaignId: string expected"; + } if (message.dataSharingContext != null && message.hasOwnProperty("dataSharingContext")) { - var error = $root.proto.ContextInfo.DataSharingContext.verify(message.dataSharingContext); - if (error) - return "dataSharingContext." + error; + properties._dataSharingContext = 1; + { + var error = $root.proto.ContextInfo.DataSharingContext.verify(message.dataSharingContext); + if (error) + return "dataSharingContext." + error; + } + } + if (message.alwaysShowAdAttribution != null && message.hasOwnProperty("alwaysShowAdAttribution")) { + properties._alwaysShowAdAttribution = 1; + if (typeof message.alwaysShowAdAttribution !== "boolean") + return "alwaysShowAdAttribution: boolean expected"; + } + if (message.featureEligibilities != null && message.hasOwnProperty("featureEligibilities")) { + properties._featureEligibilities = 1; + { + var error = $root.proto.ContextInfo.FeatureEligibilities.verify(message.featureEligibilities); + if (error) + return "featureEligibilities." + error; + } + } + if (message.entryPointConversionExternalSource != null && message.hasOwnProperty("entryPointConversionExternalSource")) { + properties._entryPointConversionExternalSource = 1; + if (!$util.isString(message.entryPointConversionExternalSource)) + return "entryPointConversionExternalSource: string expected"; + } + if (message.entryPointConversionExternalMedium != null && message.hasOwnProperty("entryPointConversionExternalMedium")) { + properties._entryPointConversionExternalMedium = 1; + if (!$util.isString(message.entryPointConversionExternalMedium)) + return "entryPointConversionExternalMedium: string expected"; + } + if (message.ctwaSignals != null && message.hasOwnProperty("ctwaSignals")) { + properties._ctwaSignals = 1; + if (!$util.isString(message.ctwaSignals)) + return "ctwaSignals: string expected"; + } + if (message.ctwaPayload != null && message.hasOwnProperty("ctwaPayload")) { + properties._ctwaPayload = 1; + if (!(message.ctwaPayload && typeof message.ctwaPayload.length === "number" || $util.isString(message.ctwaPayload))) + return "ctwaPayload: buffer expected"; + } + if (message.forwardedAiBotMessageInfo != null && message.hasOwnProperty("forwardedAiBotMessageInfo")) { + properties._forwardedAiBotMessageInfo = 1; + { + var error = $root.proto.ContextInfo.ForwardedAIBotMessageInfo.verify(message.forwardedAiBotMessageInfo); + if (error) + return "forwardedAiBotMessageInfo." + error; + } + } + if (message.statusAttributionType != null && message.hasOwnProperty("statusAttributionType")) { + properties._statusAttributionType = 1; + switch (message.statusAttributionType) { + default: + return "statusAttributionType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.urlTrackingMap != null && message.hasOwnProperty("urlTrackingMap")) { + properties._urlTrackingMap = 1; + { + var error = $root.proto.UrlTrackingMap.verify(message.urlTrackingMap); + if (error) + return "urlTrackingMap." + error; + } + } + if (message.pairedMediaType != null && message.hasOwnProperty("pairedMediaType")) { + properties._pairedMediaType = 1; + switch (message.pairedMediaType) { + default: + return "pairedMediaType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + } + if (message.rankingVersion != null && message.hasOwnProperty("rankingVersion")) { + properties._rankingVersion = 1; + if (!$util.isInteger(message.rankingVersion)) + return "rankingVersion: integer expected"; } return null; }; @@ -12202,7 +29624,7 @@ $root.proto = (function() { 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) + else if (object.conversionData.length >= 0) message.conversionData = object.conversionData; if (object.conversionDelaySeconds != null) message.conversionDelaySeconds = object.conversionDelaySeconds >>> 0; @@ -12234,7 +29656,7 @@ $root.proto = (function() { if (object.ephemeralSharedSecret != null) if (typeof object.ephemeralSharedSecret === "string") $util.base64.decode(object.ephemeralSharedSecret, message.ephemeralSharedSecret = $util.newBuffer($util.base64.length(object.ephemeralSharedSecret)), 0); - else if (object.ephemeralSharedSecret.length) + else if (object.ephemeralSharedSecret.length >= 0) message.ephemeralSharedSecret = object.ephemeralSharedSecret; if (object.externalAdReply != null) { if (typeof object.externalAdReply !== "object") @@ -12301,6 +29723,84 @@ $root.proto = (function() { throw TypeError(".proto.ContextInfo.dataSharingContext: object expected"); message.dataSharingContext = $root.proto.ContextInfo.DataSharingContext.fromObject(object.dataSharingContext); } + if (object.alwaysShowAdAttribution != null) + message.alwaysShowAdAttribution = Boolean(object.alwaysShowAdAttribution); + if (object.featureEligibilities != null) { + if (typeof object.featureEligibilities !== "object") + throw TypeError(".proto.ContextInfo.featureEligibilities: object expected"); + message.featureEligibilities = $root.proto.ContextInfo.FeatureEligibilities.fromObject(object.featureEligibilities); + } + if (object.entryPointConversionExternalSource != null) + message.entryPointConversionExternalSource = String(object.entryPointConversionExternalSource); + if (object.entryPointConversionExternalMedium != null) + message.entryPointConversionExternalMedium = String(object.entryPointConversionExternalMedium); + if (object.ctwaSignals != null) + message.ctwaSignals = String(object.ctwaSignals); + if (object.ctwaPayload != null) + if (typeof object.ctwaPayload === "string") + $util.base64.decode(object.ctwaPayload, message.ctwaPayload = $util.newBuffer($util.base64.length(object.ctwaPayload)), 0); + else if (object.ctwaPayload.length >= 0) + message.ctwaPayload = object.ctwaPayload; + if (object.forwardedAiBotMessageInfo != null) { + if (typeof object.forwardedAiBotMessageInfo !== "object") + throw TypeError(".proto.ContextInfo.forwardedAiBotMessageInfo: object expected"); + message.forwardedAiBotMessageInfo = $root.proto.ContextInfo.ForwardedAIBotMessageInfo.fromObject(object.forwardedAiBotMessageInfo); + } + switch (object.statusAttributionType) { + default: + if (typeof object.statusAttributionType === "number") { + message.statusAttributionType = object.statusAttributionType; + break; + } + break; + case "NONE": + case 0: + message.statusAttributionType = 0; + break; + case "RESHARED_FROM_MENTION": + case 1: + message.statusAttributionType = 1; + break; + case "RESHARED_FROM_POST": + case 2: + message.statusAttributionType = 2; + break; + } + if (object.urlTrackingMap != null) { + if (typeof object.urlTrackingMap !== "object") + throw TypeError(".proto.ContextInfo.urlTrackingMap: object expected"); + message.urlTrackingMap = $root.proto.UrlTrackingMap.fromObject(object.urlTrackingMap); + } + switch (object.pairedMediaType) { + default: + if (typeof object.pairedMediaType === "number") { + message.pairedMediaType = object.pairedMediaType; + break; + } + break; + case "NOT_PAIRED_MEDIA": + case 0: + message.pairedMediaType = 0; + break; + case "SD_VIDEO_PARENT": + case 1: + message.pairedMediaType = 1; + break; + case "HD_VIDEO_CHILD": + case 2: + message.pairedMediaType = 2; + break; + case "SD_IMAGE_PARENT": + case 3: + message.pairedMediaType = 3; + break; + case "HD_IMAGE_CHILD": + case 4: + message.pairedMediaType = 4; + break; + } + if (object.rankingVersion != null) + message.rankingVersion = object.rankingVersion >>> 0; return message; }; @@ -12321,130 +29821,229 @@ $root.proto = (function() { object.mentionedJid = []; object.groupMentions = []; } - if (options.defaults) { - object.stanzaId = ""; - object.participant = ""; - object.quotedMessage = null; - object.remoteJid = ""; - object.conversionSource = ""; - if (options.bytes === String) - object.conversionData = ""; - else { - object.conversionData = []; - if (options.bytes !== Array) - object.conversionData = $util.newBuffer(object.conversionData); - } - object.conversionDelaySeconds = 0; - object.forwardingScore = 0; - object.isForwarded = false; - object.quotedAd = null; - object.placeholderKey = null; - object.expiration = 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; - if (options.bytes === String) - object.ephemeralSharedSecret = ""; - else { - object.ephemeralSharedSecret = []; - if (options.bytes !== Array) - object.ephemeralSharedSecret = $util.newBuffer(object.ephemeralSharedSecret); - } - object.externalAdReply = null; - object.entryPointConversionSource = ""; - object.entryPointConversionApp = ""; - object.entryPointConversionDelaySeconds = 0; - object.disappearingMode = null; - object.actionLink = null; - object.groupSubject = ""; - object.parentGroupJid = ""; - object.trustBannerType = ""; - object.trustBannerAction = 0; - object.isSampled = false; - object.utm = null; - object.forwardedNewsletterMessageInfo = null; - object.businessMessageForwardInfo = null; - object.smbClientCampaignId = ""; - object.smbServerCampaignId = ""; - object.dataSharingContext = null; - } - if (message.stanzaId != null && message.hasOwnProperty("stanzaId")) + if (message.stanzaId != null && message.hasOwnProperty("stanzaId")) { object.stanzaId = message.stanzaId; - if (message.participant != null && message.hasOwnProperty("participant")) + if (options.oneofs) + object._stanzaId = "stanzaId"; + } + if (message.participant != null && message.hasOwnProperty("participant")) { object.participant = message.participant; - if (message.quotedMessage != null && message.hasOwnProperty("quotedMessage")) + if (options.oneofs) + object._participant = "participant"; + } + if (message.quotedMessage != null && message.hasOwnProperty("quotedMessage")) { object.quotedMessage = $root.proto.Message.toObject(message.quotedMessage, options); - if (message.remoteJid != null && message.hasOwnProperty("remoteJid")) + if (options.oneofs) + object._quotedMessage = "quotedMessage"; + } + if (message.remoteJid != null && message.hasOwnProperty("remoteJid")) { object.remoteJid = message.remoteJid; + if (options.oneofs) + object._remoteJid = "remoteJid"; + } if (message.mentionedJid && message.mentionedJid.length) { object.mentionedJid = []; for (var j = 0; j < message.mentionedJid.length; ++j) object.mentionedJid[j] = message.mentionedJid[j]; } - if (message.conversionSource != null && message.hasOwnProperty("conversionSource")) + if (message.conversionSource != null && message.hasOwnProperty("conversionSource")) { object.conversionSource = message.conversionSource; - if (message.conversionData != null && message.hasOwnProperty("conversionData")) + if (options.oneofs) + object._conversionSource = "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")) + if (options.oneofs) + object._conversionData = "conversionData"; + } + if (message.conversionDelaySeconds != null && message.hasOwnProperty("conversionDelaySeconds")) { object.conversionDelaySeconds = message.conversionDelaySeconds; - if (message.forwardingScore != null && message.hasOwnProperty("forwardingScore")) + if (options.oneofs) + object._conversionDelaySeconds = "conversionDelaySeconds"; + } + if (message.forwardingScore != null && message.hasOwnProperty("forwardingScore")) { object.forwardingScore = message.forwardingScore; - if (message.isForwarded != null && message.hasOwnProperty("isForwarded")) + if (options.oneofs) + object._forwardingScore = "forwardingScore"; + } + if (message.isForwarded != null && message.hasOwnProperty("isForwarded")) { object.isForwarded = message.isForwarded; - if (message.quotedAd != null && message.hasOwnProperty("quotedAd")) + if (options.oneofs) + object._isForwarded = "isForwarded"; + } + if (message.quotedAd != null && message.hasOwnProperty("quotedAd")) { object.quotedAd = $root.proto.ContextInfo.AdReplyInfo.toObject(message.quotedAd, options); - if (message.placeholderKey != null && message.hasOwnProperty("placeholderKey")) + if (options.oneofs) + object._quotedAd = "quotedAd"; + } + if (message.placeholderKey != null && message.hasOwnProperty("placeholderKey")) { object.placeholderKey = $root.proto.MessageKey.toObject(message.placeholderKey, options); - if (message.expiration != null && message.hasOwnProperty("expiration")) + if (options.oneofs) + object._placeholderKey = "placeholderKey"; + } + if (message.expiration != null && message.hasOwnProperty("expiration")) { object.expiration = message.expiration; - if (message.ephemeralSettingTimestamp != null && message.hasOwnProperty("ephemeralSettingTimestamp")) + if (options.oneofs) + object._expiration = "expiration"; + } + 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.ephemeralSharedSecret != null && message.hasOwnProperty("ephemeralSharedSecret")) + if (options.oneofs) + object._ephemeralSettingTimestamp = "ephemeralSettingTimestamp"; + } + 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")) + if (options.oneofs) + object._ephemeralSharedSecret = "ephemeralSharedSecret"; + } + if (message.externalAdReply != null && message.hasOwnProperty("externalAdReply")) { object.externalAdReply = $root.proto.ContextInfo.ExternalAdReplyInfo.toObject(message.externalAdReply, options); - if (message.entryPointConversionSource != null && message.hasOwnProperty("entryPointConversionSource")) + if (options.oneofs) + object._externalAdReply = "externalAdReply"; + } + if (message.entryPointConversionSource != null && message.hasOwnProperty("entryPointConversionSource")) { object.entryPointConversionSource = message.entryPointConversionSource; - if (message.entryPointConversionApp != null && message.hasOwnProperty("entryPointConversionApp")) + if (options.oneofs) + object._entryPointConversionSource = "entryPointConversionSource"; + } + if (message.entryPointConversionApp != null && message.hasOwnProperty("entryPointConversionApp")) { object.entryPointConversionApp = message.entryPointConversionApp; - if (message.entryPointConversionDelaySeconds != null && message.hasOwnProperty("entryPointConversionDelaySeconds")) + if (options.oneofs) + object._entryPointConversionApp = "entryPointConversionApp"; + } + if (message.entryPointConversionDelaySeconds != null && message.hasOwnProperty("entryPointConversionDelaySeconds")) { object.entryPointConversionDelaySeconds = message.entryPointConversionDelaySeconds; - if (message.disappearingMode != null && message.hasOwnProperty("disappearingMode")) + if (options.oneofs) + object._entryPointConversionDelaySeconds = "entryPointConversionDelaySeconds"; + } + if (message.disappearingMode != null && message.hasOwnProperty("disappearingMode")) { object.disappearingMode = $root.proto.DisappearingMode.toObject(message.disappearingMode, options); - if (message.actionLink != null && message.hasOwnProperty("actionLink")) + if (options.oneofs) + object._disappearingMode = "disappearingMode"; + } + if (message.actionLink != null && message.hasOwnProperty("actionLink")) { object.actionLink = $root.proto.ActionLink.toObject(message.actionLink, options); - if (message.groupSubject != null && message.hasOwnProperty("groupSubject")) + if (options.oneofs) + object._actionLink = "actionLink"; + } + if (message.groupSubject != null && message.hasOwnProperty("groupSubject")) { object.groupSubject = message.groupSubject; - if (message.parentGroupJid != null && message.hasOwnProperty("parentGroupJid")) + if (options.oneofs) + object._groupSubject = "groupSubject"; + } + if (message.parentGroupJid != null && message.hasOwnProperty("parentGroupJid")) { object.parentGroupJid = message.parentGroupJid; - if (message.trustBannerType != null && message.hasOwnProperty("trustBannerType")) + if (options.oneofs) + object._parentGroupJid = "parentGroupJid"; + } + if (message.trustBannerType != null && message.hasOwnProperty("trustBannerType")) { object.trustBannerType = message.trustBannerType; - if (message.trustBannerAction != null && message.hasOwnProperty("trustBannerAction")) + if (options.oneofs) + object._trustBannerType = "trustBannerType"; + } + if (message.trustBannerAction != null && message.hasOwnProperty("trustBannerAction")) { object.trustBannerAction = message.trustBannerAction; - if (message.isSampled != null && message.hasOwnProperty("isSampled")) + if (options.oneofs) + object._trustBannerAction = "trustBannerAction"; + } + if (message.isSampled != null && message.hasOwnProperty("isSampled")) { object.isSampled = message.isSampled; + if (options.oneofs) + object._isSampled = "isSampled"; + } if (message.groupMentions && message.groupMentions.length) { object.groupMentions = []; for (var j = 0; j < message.groupMentions.length; ++j) object.groupMentions[j] = $root.proto.GroupMention.toObject(message.groupMentions[j], options); } - if (message.utm != null && message.hasOwnProperty("utm")) + if (message.utm != null && message.hasOwnProperty("utm")) { object.utm = $root.proto.ContextInfo.UTMInfo.toObject(message.utm, options); - if (message.forwardedNewsletterMessageInfo != null && message.hasOwnProperty("forwardedNewsletterMessageInfo")) + if (options.oneofs) + object._utm = "utm"; + } + if (message.forwardedNewsletterMessageInfo != null && message.hasOwnProperty("forwardedNewsletterMessageInfo")) { object.forwardedNewsletterMessageInfo = $root.proto.ContextInfo.ForwardedNewsletterMessageInfo.toObject(message.forwardedNewsletterMessageInfo, options); - if (message.businessMessageForwardInfo != null && message.hasOwnProperty("businessMessageForwardInfo")) + if (options.oneofs) + object._forwardedNewsletterMessageInfo = "forwardedNewsletterMessageInfo"; + } + if (message.businessMessageForwardInfo != null && message.hasOwnProperty("businessMessageForwardInfo")) { object.businessMessageForwardInfo = $root.proto.ContextInfo.BusinessMessageForwardInfo.toObject(message.businessMessageForwardInfo, options); - if (message.smbClientCampaignId != null && message.hasOwnProperty("smbClientCampaignId")) + if (options.oneofs) + object._businessMessageForwardInfo = "businessMessageForwardInfo"; + } + if (message.smbClientCampaignId != null && message.hasOwnProperty("smbClientCampaignId")) { object.smbClientCampaignId = message.smbClientCampaignId; - if (message.smbServerCampaignId != null && message.hasOwnProperty("smbServerCampaignId")) + if (options.oneofs) + object._smbClientCampaignId = "smbClientCampaignId"; + } + if (message.smbServerCampaignId != null && message.hasOwnProperty("smbServerCampaignId")) { object.smbServerCampaignId = message.smbServerCampaignId; - if (message.dataSharingContext != null && message.hasOwnProperty("dataSharingContext")) + if (options.oneofs) + object._smbServerCampaignId = "smbServerCampaignId"; + } + if (message.dataSharingContext != null && message.hasOwnProperty("dataSharingContext")) { object.dataSharingContext = $root.proto.ContextInfo.DataSharingContext.toObject(message.dataSharingContext, options); + if (options.oneofs) + object._dataSharingContext = "dataSharingContext"; + } + if (message.alwaysShowAdAttribution != null && message.hasOwnProperty("alwaysShowAdAttribution")) { + object.alwaysShowAdAttribution = message.alwaysShowAdAttribution; + if (options.oneofs) + object._alwaysShowAdAttribution = "alwaysShowAdAttribution"; + } + if (message.featureEligibilities != null && message.hasOwnProperty("featureEligibilities")) { + object.featureEligibilities = $root.proto.ContextInfo.FeatureEligibilities.toObject(message.featureEligibilities, options); + if (options.oneofs) + object._featureEligibilities = "featureEligibilities"; + } + if (message.entryPointConversionExternalSource != null && message.hasOwnProperty("entryPointConversionExternalSource")) { + object.entryPointConversionExternalSource = message.entryPointConversionExternalSource; + if (options.oneofs) + object._entryPointConversionExternalSource = "entryPointConversionExternalSource"; + } + if (message.entryPointConversionExternalMedium != null && message.hasOwnProperty("entryPointConversionExternalMedium")) { + object.entryPointConversionExternalMedium = message.entryPointConversionExternalMedium; + if (options.oneofs) + object._entryPointConversionExternalMedium = "entryPointConversionExternalMedium"; + } + if (message.ctwaSignals != null && message.hasOwnProperty("ctwaSignals")) { + object.ctwaSignals = message.ctwaSignals; + if (options.oneofs) + object._ctwaSignals = "ctwaSignals"; + } + if (message.ctwaPayload != null && message.hasOwnProperty("ctwaPayload")) { + object.ctwaPayload = options.bytes === String ? $util.base64.encode(message.ctwaPayload, 0, message.ctwaPayload.length) : options.bytes === Array ? Array.prototype.slice.call(message.ctwaPayload) : message.ctwaPayload; + if (options.oneofs) + object._ctwaPayload = "ctwaPayload"; + } + if (message.forwardedAiBotMessageInfo != null && message.hasOwnProperty("forwardedAiBotMessageInfo")) { + object.forwardedAiBotMessageInfo = $root.proto.ContextInfo.ForwardedAIBotMessageInfo.toObject(message.forwardedAiBotMessageInfo, options); + if (options.oneofs) + object._forwardedAiBotMessageInfo = "forwardedAiBotMessageInfo"; + } + if (message.statusAttributionType != null && message.hasOwnProperty("statusAttributionType")) { + object.statusAttributionType = options.enums === String ? $root.proto.ContextInfo.StatusAttributionType[message.statusAttributionType] === undefined ? message.statusAttributionType : $root.proto.ContextInfo.StatusAttributionType[message.statusAttributionType] : message.statusAttributionType; + if (options.oneofs) + object._statusAttributionType = "statusAttributionType"; + } + if (message.urlTrackingMap != null && message.hasOwnProperty("urlTrackingMap")) { + object.urlTrackingMap = $root.proto.UrlTrackingMap.toObject(message.urlTrackingMap, options); + if (options.oneofs) + object._urlTrackingMap = "urlTrackingMap"; + } + if (message.pairedMediaType != null && message.hasOwnProperty("pairedMediaType")) { + object.pairedMediaType = options.enums === String ? $root.proto.ContextInfo.PairedMediaType[message.pairedMediaType] === undefined ? message.pairedMediaType : $root.proto.ContextInfo.PairedMediaType[message.pairedMediaType] : message.pairedMediaType; + if (options.oneofs) + object._pairedMediaType = "pairedMediaType"; + } + if (message.rankingVersion != null && message.hasOwnProperty("rankingVersion")) { + object.rankingVersion = message.rankingVersion; + if (options.oneofs) + object._rankingVersion = "rankingVersion"; + } return object; }; @@ -12459,6 +30058,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ContextInfo + * @function getTypeUrl + * @memberof proto.ContextInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ContextInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.ContextInfo"; + }; + ContextInfo.AdReplyInfo = (function() { /** @@ -12488,35 +30102,62 @@ $root.proto = (function() { /** * AdReplyInfo advertiserName. - * @member {string} advertiserName + * @member {string|null|undefined} advertiserName * @memberof proto.ContextInfo.AdReplyInfo * @instance */ - AdReplyInfo.prototype.advertiserName = ""; + AdReplyInfo.prototype.advertiserName = null; /** * AdReplyInfo mediaType. - * @member {proto.ContextInfo.AdReplyInfo.MediaType} mediaType + * @member {proto.ContextInfo.AdReplyInfo.MediaType|null|undefined} mediaType * @memberof proto.ContextInfo.AdReplyInfo * @instance */ - AdReplyInfo.prototype.mediaType = 0; + AdReplyInfo.prototype.mediaType = null; /** * AdReplyInfo jpegThumbnail. - * @member {Uint8Array} jpegThumbnail + * @member {Uint8Array|null|undefined} jpegThumbnail * @memberof proto.ContextInfo.AdReplyInfo * @instance */ - AdReplyInfo.prototype.jpegThumbnail = $util.newBuffer([]); + AdReplyInfo.prototype.jpegThumbnail = null; /** * AdReplyInfo caption. - * @member {string} caption + * @member {string|null|undefined} caption * @memberof proto.ContextInfo.AdReplyInfo * @instance */ - AdReplyInfo.prototype.caption = ""; + AdReplyInfo.prototype.caption = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AdReplyInfo.prototype, "_advertiserName", { + get: $util.oneOfGetter($oneOfFields = ["advertiserName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AdReplyInfo.prototype, "_mediaType", { + get: $util.oneOfGetter($oneOfFields = ["mediaType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AdReplyInfo.prototype, "_jpegThumbnail", { + get: $util.oneOfGetter($oneOfFields = ["jpegThumbnail"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AdReplyInfo.prototype, "_caption", { + get: $util.oneOfGetter($oneOfFields = ["caption"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new AdReplyInfo instance using the specified properties. @@ -12584,18 +30225,22 @@ $root.proto = (function() { 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; + 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; @@ -12631,10 +30276,14 @@ $root.proto = (function() { AdReplyInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.advertiserName != null && message.hasOwnProperty("advertiserName")) + var properties = {}; + if (message.advertiserName != null && message.hasOwnProperty("advertiserName")) { + properties._advertiserName = 1; if (!$util.isString(message.advertiserName)) return "advertiserName: string expected"; - if (message.mediaType != null && message.hasOwnProperty("mediaType")) + } + if (message.mediaType != null && message.hasOwnProperty("mediaType")) { + properties._mediaType = 1; switch (message.mediaType) { default: return "mediaType: enum value expected"; @@ -12643,12 +30292,17 @@ $root.proto = (function() { case 2: break; } - if (message.jpegThumbnail != null && message.hasOwnProperty("jpegThumbnail")) + } + if (message.jpegThumbnail != null && message.hasOwnProperty("jpegThumbnail")) { + properties._jpegThumbnail = 1; if (!(message.jpegThumbnail && typeof message.jpegThumbnail.length === "number" || $util.isString(message.jpegThumbnail))) return "jpegThumbnail: buffer expected"; - if (message.caption != null && message.hasOwnProperty("caption")) + } + if (message.caption != null && message.hasOwnProperty("caption")) { + properties._caption = 1; if (!$util.isString(message.caption)) return "caption: string expected"; + } return null; }; @@ -12667,6 +30321,12 @@ $root.proto = (function() { if (object.advertiserName != null) message.advertiserName = String(object.advertiserName); switch (object.mediaType) { + default: + if (typeof object.mediaType === "number") { + message.mediaType = object.mediaType; + break; + } + break; case "NONE": case 0: message.mediaType = 0; @@ -12683,7 +30343,7 @@ $root.proto = (function() { 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) + else if (object.jpegThumbnail.length >= 0) message.jpegThumbnail = object.jpegThumbnail; if (object.caption != null) message.caption = String(object.caption); @@ -12703,26 +30363,26 @@ $root.proto = (function() { 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")) + 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")) + if (options.oneofs) + object._advertiserName = "advertiserName"; + } + if (message.mediaType != null && message.hasOwnProperty("mediaType")) { + object.mediaType = options.enums === String ? $root.proto.ContextInfo.AdReplyInfo.MediaType[message.mediaType] === undefined ? message.mediaType : $root.proto.ContextInfo.AdReplyInfo.MediaType[message.mediaType] : message.mediaType; + if (options.oneofs) + object._mediaType = "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")) + if (options.oneofs) + object._jpegThumbnail = "jpegThumbnail"; + } + if (message.caption != null && message.hasOwnProperty("caption")) { object.caption = message.caption; + if (options.oneofs) + object._caption = "caption"; + } return object; }; @@ -12737,6 +30397,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for AdReplyInfo + * @function getTypeUrl + * @memberof proto.ContextInfo.AdReplyInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AdReplyInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.ContextInfo.AdReplyInfo"; + }; + /** * MediaType enum. * @name proto.ContextInfo.AdReplyInfo.MediaType @@ -12782,11 +30457,20 @@ $root.proto = (function() { /** * BusinessMessageForwardInfo businessOwnerJid. - * @member {string} businessOwnerJid + * @member {string|null|undefined} businessOwnerJid * @memberof proto.ContextInfo.BusinessMessageForwardInfo * @instance */ - BusinessMessageForwardInfo.prototype.businessOwnerJid = ""; + BusinessMessageForwardInfo.prototype.businessOwnerJid = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BusinessMessageForwardInfo.prototype, "_businessOwnerJid", { + get: $util.oneOfGetter($oneOfFields = ["businessOwnerJid"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new BusinessMessageForwardInfo instance using the specified properties. @@ -12848,9 +30532,10 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.businessOwnerJid = reader.string(); - break; + case 1: { + message.businessOwnerJid = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -12886,9 +30571,12 @@ $root.proto = (function() { BusinessMessageForwardInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.businessOwnerJid != null && message.hasOwnProperty("businessOwnerJid")) + var properties = {}; + if (message.businessOwnerJid != null && message.hasOwnProperty("businessOwnerJid")) { + properties._businessOwnerJid = 1; if (!$util.isString(message.businessOwnerJid)) return "businessOwnerJid: string expected"; + } return null; }; @@ -12922,10 +30610,11 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) - object.businessOwnerJid = ""; - if (message.businessOwnerJid != null && message.hasOwnProperty("businessOwnerJid")) + if (message.businessOwnerJid != null && message.hasOwnProperty("businessOwnerJid")) { object.businessOwnerJid = message.businessOwnerJid; + if (options.oneofs) + object._businessOwnerJid = "businessOwnerJid"; + } return object; }; @@ -12940,6 +30629,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for BusinessMessageForwardInfo + * @function getTypeUrl + * @memberof proto.ContextInfo.BusinessMessageForwardInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BusinessMessageForwardInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.ContextInfo.BusinessMessageForwardInfo"; + }; + return BusinessMessageForwardInfo; })(); @@ -12950,6 +30654,8 @@ $root.proto = (function() { * @memberof proto.ContextInfo * @interface IDataSharingContext * @property {boolean|null} [showMmDisclosure] DataSharingContext showMmDisclosure + * @property {string|null} [encryptedSignalTokenConsented] DataSharingContext encryptedSignalTokenConsented + * @property {Array.|null} [parameters] DataSharingContext parameters */ /** @@ -12961,6 +30667,7 @@ $root.proto = (function() { * @param {proto.ContextInfo.IDataSharingContext=} [properties] Properties to set */ function DataSharingContext(properties) { + this.parameters = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -12969,11 +30676,42 @@ $root.proto = (function() { /** * DataSharingContext showMmDisclosure. - * @member {boolean} showMmDisclosure + * @member {boolean|null|undefined} showMmDisclosure * @memberof proto.ContextInfo.DataSharingContext * @instance */ - DataSharingContext.prototype.showMmDisclosure = false; + DataSharingContext.prototype.showMmDisclosure = null; + + /** + * DataSharingContext encryptedSignalTokenConsented. + * @member {string|null|undefined} encryptedSignalTokenConsented + * @memberof proto.ContextInfo.DataSharingContext + * @instance + */ + DataSharingContext.prototype.encryptedSignalTokenConsented = null; + + /** + * DataSharingContext parameters. + * @member {Array.} parameters + * @memberof proto.ContextInfo.DataSharingContext + * @instance + */ + DataSharingContext.prototype.parameters = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DataSharingContext.prototype, "_showMmDisclosure", { + get: $util.oneOfGetter($oneOfFields = ["showMmDisclosure"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DataSharingContext.prototype, "_encryptedSignalTokenConsented", { + get: $util.oneOfGetter($oneOfFields = ["encryptedSignalTokenConsented"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new DataSharingContext instance using the specified properties. @@ -13001,6 +30739,11 @@ $root.proto = (function() { writer = $Writer.create(); if (message.showMmDisclosure != null && Object.hasOwnProperty.call(message, "showMmDisclosure")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.showMmDisclosure); + if (message.encryptedSignalTokenConsented != null && Object.hasOwnProperty.call(message, "encryptedSignalTokenConsented")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.encryptedSignalTokenConsented); + if (message.parameters != null && message.parameters.length) + for (var i = 0; i < message.parameters.length; ++i) + $root.proto.ContextInfo.DataSharingContext.Parameters.encode(message.parameters[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -13035,9 +30778,20 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.showMmDisclosure = reader.bool(); - break; + case 1: { + message.showMmDisclosure = reader.bool(); + break; + } + case 2: { + message.encryptedSignalTokenConsented = reader.string(); + break; + } + case 3: { + if (!(message.parameters && message.parameters.length)) + message.parameters = []; + message.parameters.push($root.proto.ContextInfo.DataSharingContext.Parameters.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -13073,9 +30827,26 @@ $root.proto = (function() { DataSharingContext.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.showMmDisclosure != null && message.hasOwnProperty("showMmDisclosure")) + var properties = {}; + if (message.showMmDisclosure != null && message.hasOwnProperty("showMmDisclosure")) { + properties._showMmDisclosure = 1; if (typeof message.showMmDisclosure !== "boolean") return "showMmDisclosure: boolean expected"; + } + if (message.encryptedSignalTokenConsented != null && message.hasOwnProperty("encryptedSignalTokenConsented")) { + properties._encryptedSignalTokenConsented = 1; + if (!$util.isString(message.encryptedSignalTokenConsented)) + return "encryptedSignalTokenConsented: string expected"; + } + if (message.parameters != null && message.hasOwnProperty("parameters")) { + if (!Array.isArray(message.parameters)) + return "parameters: array expected"; + for (var i = 0; i < message.parameters.length; ++i) { + var error = $root.proto.ContextInfo.DataSharingContext.Parameters.verify(message.parameters[i]); + if (error) + return "parameters." + error; + } + } return null; }; @@ -13093,6 +30864,18 @@ $root.proto = (function() { var message = new $root.proto.ContextInfo.DataSharingContext(); if (object.showMmDisclosure != null) message.showMmDisclosure = Boolean(object.showMmDisclosure); + if (object.encryptedSignalTokenConsented != null) + message.encryptedSignalTokenConsented = String(object.encryptedSignalTokenConsented); + if (object.parameters) { + if (!Array.isArray(object.parameters)) + throw TypeError(".proto.ContextInfo.DataSharingContext.parameters: array expected"); + message.parameters = []; + for (var i = 0; i < object.parameters.length; ++i) { + if (typeof object.parameters[i] !== "object") + throw TypeError(".proto.ContextInfo.DataSharingContext.parameters: object expected"); + message.parameters[i] = $root.proto.ContextInfo.DataSharingContext.Parameters.fromObject(object.parameters[i]); + } + } return message; }; @@ -13109,10 +30892,23 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) - object.showMmDisclosure = false; - if (message.showMmDisclosure != null && message.hasOwnProperty("showMmDisclosure")) + if (options.arrays || options.defaults) + object.parameters = []; + if (message.showMmDisclosure != null && message.hasOwnProperty("showMmDisclosure")) { object.showMmDisclosure = message.showMmDisclosure; + if (options.oneofs) + object._showMmDisclosure = "showMmDisclosure"; + } + if (message.encryptedSignalTokenConsented != null && message.hasOwnProperty("encryptedSignalTokenConsented")) { + object.encryptedSignalTokenConsented = message.encryptedSignalTokenConsented; + if (options.oneofs) + object._encryptedSignalTokenConsented = "encryptedSignalTokenConsented"; + } + if (message.parameters && message.parameters.length) { + object.parameters = []; + for (var j = 0; j < message.parameters.length; ++j) + object.parameters[j] = $root.proto.ContextInfo.DataSharingContext.Parameters.toObject(message.parameters[j], options); + } return object; }; @@ -13127,6 +30923,385 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DataSharingContext + * @function getTypeUrl + * @memberof proto.ContextInfo.DataSharingContext + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataSharingContext.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.ContextInfo.DataSharingContext"; + }; + + DataSharingContext.Parameters = (function() { + + /** + * Properties of a Parameters. + * @memberof proto.ContextInfo.DataSharingContext + * @interface IParameters + * @property {string|null} [key] Parameters key + * @property {string|null} [stringData] Parameters stringData + * @property {number|Long|null} [intData] Parameters intData + * @property {number|null} [floatData] Parameters floatData + * @property {proto.ContextInfo.DataSharingContext.IParameters|null} [contents] Parameters contents + */ + + /** + * Constructs a new Parameters. + * @memberof proto.ContextInfo.DataSharingContext + * @classdesc Represents a Parameters. + * @implements IParameters + * @constructor + * @param {proto.ContextInfo.DataSharingContext.IParameters=} [properties] Properties to set + */ + function Parameters(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Parameters key. + * @member {string|null|undefined} key + * @memberof proto.ContextInfo.DataSharingContext.Parameters + * @instance + */ + Parameters.prototype.key = null; + + /** + * Parameters stringData. + * @member {string|null|undefined} stringData + * @memberof proto.ContextInfo.DataSharingContext.Parameters + * @instance + */ + Parameters.prototype.stringData = null; + + /** + * Parameters intData. + * @member {number|Long|null|undefined} intData + * @memberof proto.ContextInfo.DataSharingContext.Parameters + * @instance + */ + Parameters.prototype.intData = null; + + /** + * Parameters floatData. + * @member {number|null|undefined} floatData + * @memberof proto.ContextInfo.DataSharingContext.Parameters + * @instance + */ + Parameters.prototype.floatData = null; + + /** + * Parameters contents. + * @member {proto.ContextInfo.DataSharingContext.IParameters|null|undefined} contents + * @memberof proto.ContextInfo.DataSharingContext.Parameters + * @instance + */ + Parameters.prototype.contents = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Parameters.prototype, "_key", { + get: $util.oneOfGetter($oneOfFields = ["key"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Parameters.prototype, "_stringData", { + get: $util.oneOfGetter($oneOfFields = ["stringData"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Parameters.prototype, "_intData", { + get: $util.oneOfGetter($oneOfFields = ["intData"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Parameters.prototype, "_floatData", { + get: $util.oneOfGetter($oneOfFields = ["floatData"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Parameters.prototype, "_contents", { + get: $util.oneOfGetter($oneOfFields = ["contents"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Parameters instance using the specified properties. + * @function create + * @memberof proto.ContextInfo.DataSharingContext.Parameters + * @static + * @param {proto.ContextInfo.DataSharingContext.IParameters=} [properties] Properties to set + * @returns {proto.ContextInfo.DataSharingContext.Parameters} Parameters instance + */ + Parameters.create = function create(properties) { + return new Parameters(properties); + }; + + /** + * Encodes the specified Parameters message. Does not implicitly {@link proto.ContextInfo.DataSharingContext.Parameters.verify|verify} messages. + * @function encode + * @memberof proto.ContextInfo.DataSharingContext.Parameters + * @static + * @param {proto.ContextInfo.DataSharingContext.IParameters} message Parameters message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Parameters.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); + if (message.stringData != null && Object.hasOwnProperty.call(message, "stringData")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.stringData); + if (message.intData != null && Object.hasOwnProperty.call(message, "intData")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.intData); + if (message.floatData != null && Object.hasOwnProperty.call(message, "floatData")) + writer.uint32(/* id 4, wireType 5 =*/37).float(message.floatData); + if (message.contents != null && Object.hasOwnProperty.call(message, "contents")) + $root.proto.ContextInfo.DataSharingContext.Parameters.encode(message.contents, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Parameters message, length delimited. Does not implicitly {@link proto.ContextInfo.DataSharingContext.Parameters.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.ContextInfo.DataSharingContext.Parameters + * @static + * @param {proto.ContextInfo.DataSharingContext.IParameters} message Parameters message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Parameters.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Parameters message from the specified reader or buffer. + * @function decode + * @memberof proto.ContextInfo.DataSharingContext.Parameters + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.ContextInfo.DataSharingContext.Parameters} Parameters + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Parameters.decode = function 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.DataSharingContext.Parameters(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.key = reader.string(); + break; + } + case 2: { + message.stringData = reader.string(); + break; + } + case 3: { + message.intData = reader.int64(); + break; + } + case 4: { + message.floatData = reader.float(); + break; + } + case 5: { + message.contents = $root.proto.ContextInfo.DataSharingContext.Parameters.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Parameters message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.ContextInfo.DataSharingContext.Parameters + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.ContextInfo.DataSharingContext.Parameters} Parameters + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Parameters.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Parameters message. + * @function verify + * @memberof proto.ContextInfo.DataSharingContext.Parameters + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Parameters.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.key != null && message.hasOwnProperty("key")) { + properties._key = 1; + if (!$util.isString(message.key)) + return "key: string expected"; + } + if (message.stringData != null && message.hasOwnProperty("stringData")) { + properties._stringData = 1; + if (!$util.isString(message.stringData)) + return "stringData: string expected"; + } + if (message.intData != null && message.hasOwnProperty("intData")) { + properties._intData = 1; + if (!$util.isInteger(message.intData) && !(message.intData && $util.isInteger(message.intData.low) && $util.isInteger(message.intData.high))) + return "intData: integer|Long expected"; + } + if (message.floatData != null && message.hasOwnProperty("floatData")) { + properties._floatData = 1; + if (typeof message.floatData !== "number") + return "floatData: number expected"; + } + if (message.contents != null && message.hasOwnProperty("contents")) { + properties._contents = 1; + { + var error = $root.proto.ContextInfo.DataSharingContext.Parameters.verify(message.contents); + if (error) + return "contents." + error; + } + } + return null; + }; + + /** + * Creates a Parameters message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.ContextInfo.DataSharingContext.Parameters + * @static + * @param {Object.} object Plain object + * @returns {proto.ContextInfo.DataSharingContext.Parameters} Parameters + */ + Parameters.fromObject = function fromObject(object) { + if (object instanceof $root.proto.ContextInfo.DataSharingContext.Parameters) + return object; + var message = new $root.proto.ContextInfo.DataSharingContext.Parameters(); + if (object.key != null) + message.key = String(object.key); + if (object.stringData != null) + message.stringData = String(object.stringData); + if (object.intData != null) + if ($util.Long) + (message.intData = $util.Long.fromValue(object.intData)).unsigned = false; + else if (typeof object.intData === "string") + message.intData = parseInt(object.intData, 10); + else if (typeof object.intData === "number") + message.intData = object.intData; + else if (typeof object.intData === "object") + message.intData = new $util.LongBits(object.intData.low >>> 0, object.intData.high >>> 0).toNumber(); + if (object.floatData != null) + message.floatData = Number(object.floatData); + if (object.contents != null) { + if (typeof object.contents !== "object") + throw TypeError(".proto.ContextInfo.DataSharingContext.Parameters.contents: object expected"); + message.contents = $root.proto.ContextInfo.DataSharingContext.Parameters.fromObject(object.contents); + } + return message; + }; + + /** + * Creates a plain object from a Parameters message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.ContextInfo.DataSharingContext.Parameters + * @static + * @param {proto.ContextInfo.DataSharingContext.Parameters} message Parameters + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Parameters.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.key != null && message.hasOwnProperty("key")) { + object.key = message.key; + if (options.oneofs) + object._key = "key"; + } + if (message.stringData != null && message.hasOwnProperty("stringData")) { + object.stringData = message.stringData; + if (options.oneofs) + object._stringData = "stringData"; + } + if (message.intData != null && message.hasOwnProperty("intData")) { + if (typeof message.intData === "number") + object.intData = options.longs === String ? String(message.intData) : message.intData; + else + object.intData = options.longs === String ? $util.Long.prototype.toString.call(message.intData) : options.longs === Number ? new $util.LongBits(message.intData.low >>> 0, message.intData.high >>> 0).toNumber() : message.intData; + if (options.oneofs) + object._intData = "intData"; + } + if (message.floatData != null && message.hasOwnProperty("floatData")) { + object.floatData = options.json && !isFinite(message.floatData) ? String(message.floatData) : message.floatData; + if (options.oneofs) + object._floatData = "floatData"; + } + if (message.contents != null && message.hasOwnProperty("contents")) { + object.contents = $root.proto.ContextInfo.DataSharingContext.Parameters.toObject(message.contents, options); + if (options.oneofs) + object._contents = "contents"; + } + return object; + }; + + /** + * Converts this Parameters to JSON. + * @function toJSON + * @memberof proto.ContextInfo.DataSharingContext.Parameters + * @instance + * @returns {Object.} JSON object + */ + Parameters.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Parameters + * @function getTypeUrl + * @memberof proto.ContextInfo.DataSharingContext.Parameters + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Parameters.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.ContextInfo.DataSharingContext.Parameters"; + }; + + return Parameters; + })(); + return DataSharingContext; })(); @@ -13150,6 +31325,14 @@ $root.proto = (function() { * @property {boolean|null} [showAdAttribution] ExternalAdReplyInfo showAdAttribution * @property {string|null} [ctwaClid] ExternalAdReplyInfo ctwaClid * @property {string|null} [ref] ExternalAdReplyInfo ref + * @property {boolean|null} [clickToWhatsappCall] ExternalAdReplyInfo clickToWhatsappCall + * @property {boolean|null} [adContextPreviewDismissed] ExternalAdReplyInfo adContextPreviewDismissed + * @property {string|null} [sourceApp] ExternalAdReplyInfo sourceApp + * @property {boolean|null} [automatedGreetingMessageShown] ExternalAdReplyInfo automatedGreetingMessageShown + * @property {string|null} [greetingMessageBody] ExternalAdReplyInfo greetingMessageBody + * @property {string|null} [ctaPayload] ExternalAdReplyInfo ctaPayload + * @property {boolean|null} [disableNudge] ExternalAdReplyInfo disableNudge + * @property {string|null} [originalImageUrl] ExternalAdReplyInfo originalImageUrl */ /** @@ -13169,115 +31352,314 @@ $root.proto = (function() { /** * ExternalAdReplyInfo title. - * @member {string} title + * @member {string|null|undefined} title * @memberof proto.ContextInfo.ExternalAdReplyInfo * @instance */ - ExternalAdReplyInfo.prototype.title = ""; + ExternalAdReplyInfo.prototype.title = null; /** * ExternalAdReplyInfo body. - * @member {string} body + * @member {string|null|undefined} body * @memberof proto.ContextInfo.ExternalAdReplyInfo * @instance */ - ExternalAdReplyInfo.prototype.body = ""; + ExternalAdReplyInfo.prototype.body = null; /** * ExternalAdReplyInfo mediaType. - * @member {proto.ContextInfo.ExternalAdReplyInfo.MediaType} mediaType + * @member {proto.ContextInfo.ExternalAdReplyInfo.MediaType|null|undefined} mediaType * @memberof proto.ContextInfo.ExternalAdReplyInfo * @instance */ - ExternalAdReplyInfo.prototype.mediaType = 0; + ExternalAdReplyInfo.prototype.mediaType = null; /** * ExternalAdReplyInfo thumbnailUrl. - * @member {string} thumbnailUrl + * @member {string|null|undefined} thumbnailUrl * @memberof proto.ContextInfo.ExternalAdReplyInfo * @instance */ - ExternalAdReplyInfo.prototype.thumbnailUrl = ""; + ExternalAdReplyInfo.prototype.thumbnailUrl = null; /** * ExternalAdReplyInfo mediaUrl. - * @member {string} mediaUrl + * @member {string|null|undefined} mediaUrl * @memberof proto.ContextInfo.ExternalAdReplyInfo * @instance */ - ExternalAdReplyInfo.prototype.mediaUrl = ""; + ExternalAdReplyInfo.prototype.mediaUrl = null; /** * ExternalAdReplyInfo thumbnail. - * @member {Uint8Array} thumbnail + * @member {Uint8Array|null|undefined} thumbnail * @memberof proto.ContextInfo.ExternalAdReplyInfo * @instance */ - ExternalAdReplyInfo.prototype.thumbnail = $util.newBuffer([]); + ExternalAdReplyInfo.prototype.thumbnail = null; /** * ExternalAdReplyInfo sourceType. - * @member {string} sourceType + * @member {string|null|undefined} sourceType * @memberof proto.ContextInfo.ExternalAdReplyInfo * @instance */ - ExternalAdReplyInfo.prototype.sourceType = ""; + ExternalAdReplyInfo.prototype.sourceType = null; /** * ExternalAdReplyInfo sourceId. - * @member {string} sourceId + * @member {string|null|undefined} sourceId * @memberof proto.ContextInfo.ExternalAdReplyInfo * @instance */ - ExternalAdReplyInfo.prototype.sourceId = ""; + ExternalAdReplyInfo.prototype.sourceId = null; /** * ExternalAdReplyInfo sourceUrl. - * @member {string} sourceUrl + * @member {string|null|undefined} sourceUrl * @memberof proto.ContextInfo.ExternalAdReplyInfo * @instance */ - ExternalAdReplyInfo.prototype.sourceUrl = ""; + ExternalAdReplyInfo.prototype.sourceUrl = null; /** * ExternalAdReplyInfo containsAutoReply. - * @member {boolean} containsAutoReply + * @member {boolean|null|undefined} containsAutoReply * @memberof proto.ContextInfo.ExternalAdReplyInfo * @instance */ - ExternalAdReplyInfo.prototype.containsAutoReply = false; + ExternalAdReplyInfo.prototype.containsAutoReply = null; /** * ExternalAdReplyInfo renderLargerThumbnail. - * @member {boolean} renderLargerThumbnail + * @member {boolean|null|undefined} renderLargerThumbnail * @memberof proto.ContextInfo.ExternalAdReplyInfo * @instance */ - ExternalAdReplyInfo.prototype.renderLargerThumbnail = false; + ExternalAdReplyInfo.prototype.renderLargerThumbnail = null; /** * ExternalAdReplyInfo showAdAttribution. - * @member {boolean} showAdAttribution + * @member {boolean|null|undefined} showAdAttribution * @memberof proto.ContextInfo.ExternalAdReplyInfo * @instance */ - ExternalAdReplyInfo.prototype.showAdAttribution = false; + ExternalAdReplyInfo.prototype.showAdAttribution = null; /** * ExternalAdReplyInfo ctwaClid. - * @member {string} ctwaClid + * @member {string|null|undefined} ctwaClid * @memberof proto.ContextInfo.ExternalAdReplyInfo * @instance */ - ExternalAdReplyInfo.prototype.ctwaClid = ""; + ExternalAdReplyInfo.prototype.ctwaClid = null; /** * ExternalAdReplyInfo ref. - * @member {string} ref + * @member {string|null|undefined} ref * @memberof proto.ContextInfo.ExternalAdReplyInfo * @instance */ - ExternalAdReplyInfo.prototype.ref = ""; + ExternalAdReplyInfo.prototype.ref = null; + + /** + * ExternalAdReplyInfo clickToWhatsappCall. + * @member {boolean|null|undefined} clickToWhatsappCall + * @memberof proto.ContextInfo.ExternalAdReplyInfo + * @instance + */ + ExternalAdReplyInfo.prototype.clickToWhatsappCall = null; + + /** + * ExternalAdReplyInfo adContextPreviewDismissed. + * @member {boolean|null|undefined} adContextPreviewDismissed + * @memberof proto.ContextInfo.ExternalAdReplyInfo + * @instance + */ + ExternalAdReplyInfo.prototype.adContextPreviewDismissed = null; + + /** + * ExternalAdReplyInfo sourceApp. + * @member {string|null|undefined} sourceApp + * @memberof proto.ContextInfo.ExternalAdReplyInfo + * @instance + */ + ExternalAdReplyInfo.prototype.sourceApp = null; + + /** + * ExternalAdReplyInfo automatedGreetingMessageShown. + * @member {boolean|null|undefined} automatedGreetingMessageShown + * @memberof proto.ContextInfo.ExternalAdReplyInfo + * @instance + */ + ExternalAdReplyInfo.prototype.automatedGreetingMessageShown = null; + + /** + * ExternalAdReplyInfo greetingMessageBody. + * @member {string|null|undefined} greetingMessageBody + * @memberof proto.ContextInfo.ExternalAdReplyInfo + * @instance + */ + ExternalAdReplyInfo.prototype.greetingMessageBody = null; + + /** + * ExternalAdReplyInfo ctaPayload. + * @member {string|null|undefined} ctaPayload + * @memberof proto.ContextInfo.ExternalAdReplyInfo + * @instance + */ + ExternalAdReplyInfo.prototype.ctaPayload = null; + + /** + * ExternalAdReplyInfo disableNudge. + * @member {boolean|null|undefined} disableNudge + * @memberof proto.ContextInfo.ExternalAdReplyInfo + * @instance + */ + ExternalAdReplyInfo.prototype.disableNudge = null; + + /** + * ExternalAdReplyInfo originalImageUrl. + * @member {string|null|undefined} originalImageUrl + * @memberof proto.ContextInfo.ExternalAdReplyInfo + * @instance + */ + ExternalAdReplyInfo.prototype.originalImageUrl = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ExternalAdReplyInfo.prototype, "_title", { + get: $util.oneOfGetter($oneOfFields = ["title"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ExternalAdReplyInfo.prototype, "_body", { + get: $util.oneOfGetter($oneOfFields = ["body"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ExternalAdReplyInfo.prototype, "_mediaType", { + get: $util.oneOfGetter($oneOfFields = ["mediaType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ExternalAdReplyInfo.prototype, "_thumbnailUrl", { + get: $util.oneOfGetter($oneOfFields = ["thumbnailUrl"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ExternalAdReplyInfo.prototype, "_mediaUrl", { + get: $util.oneOfGetter($oneOfFields = ["mediaUrl"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ExternalAdReplyInfo.prototype, "_thumbnail", { + get: $util.oneOfGetter($oneOfFields = ["thumbnail"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ExternalAdReplyInfo.prototype, "_sourceType", { + get: $util.oneOfGetter($oneOfFields = ["sourceType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ExternalAdReplyInfo.prototype, "_sourceId", { + get: $util.oneOfGetter($oneOfFields = ["sourceId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ExternalAdReplyInfo.prototype, "_sourceUrl", { + get: $util.oneOfGetter($oneOfFields = ["sourceUrl"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ExternalAdReplyInfo.prototype, "_containsAutoReply", { + get: $util.oneOfGetter($oneOfFields = ["containsAutoReply"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ExternalAdReplyInfo.prototype, "_renderLargerThumbnail", { + get: $util.oneOfGetter($oneOfFields = ["renderLargerThumbnail"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ExternalAdReplyInfo.prototype, "_showAdAttribution", { + get: $util.oneOfGetter($oneOfFields = ["showAdAttribution"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ExternalAdReplyInfo.prototype, "_ctwaClid", { + get: $util.oneOfGetter($oneOfFields = ["ctwaClid"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ExternalAdReplyInfo.prototype, "_ref", { + get: $util.oneOfGetter($oneOfFields = ["ref"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ExternalAdReplyInfo.prototype, "_clickToWhatsappCall", { + get: $util.oneOfGetter($oneOfFields = ["clickToWhatsappCall"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ExternalAdReplyInfo.prototype, "_adContextPreviewDismissed", { + get: $util.oneOfGetter($oneOfFields = ["adContextPreviewDismissed"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ExternalAdReplyInfo.prototype, "_sourceApp", { + get: $util.oneOfGetter($oneOfFields = ["sourceApp"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ExternalAdReplyInfo.prototype, "_automatedGreetingMessageShown", { + get: $util.oneOfGetter($oneOfFields = ["automatedGreetingMessageShown"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ExternalAdReplyInfo.prototype, "_greetingMessageBody", { + get: $util.oneOfGetter($oneOfFields = ["greetingMessageBody"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ExternalAdReplyInfo.prototype, "_ctaPayload", { + get: $util.oneOfGetter($oneOfFields = ["ctaPayload"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ExternalAdReplyInfo.prototype, "_disableNudge", { + get: $util.oneOfGetter($oneOfFields = ["disableNudge"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ExternalAdReplyInfo.prototype, "_originalImageUrl", { + get: $util.oneOfGetter($oneOfFields = ["originalImageUrl"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new ExternalAdReplyInfo instance using the specified properties. @@ -13331,6 +31713,22 @@ $root.proto = (function() { writer.uint32(/* id 13, wireType 2 =*/106).string(message.ctwaClid); if (message.ref != null && Object.hasOwnProperty.call(message, "ref")) writer.uint32(/* id 14, wireType 2 =*/114).string(message.ref); + if (message.clickToWhatsappCall != null && Object.hasOwnProperty.call(message, "clickToWhatsappCall")) + writer.uint32(/* id 15, wireType 0 =*/120).bool(message.clickToWhatsappCall); + if (message.adContextPreviewDismissed != null && Object.hasOwnProperty.call(message, "adContextPreviewDismissed")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.adContextPreviewDismissed); + if (message.sourceApp != null && Object.hasOwnProperty.call(message, "sourceApp")) + writer.uint32(/* id 17, wireType 2 =*/138).string(message.sourceApp); + if (message.automatedGreetingMessageShown != null && Object.hasOwnProperty.call(message, "automatedGreetingMessageShown")) + writer.uint32(/* id 18, wireType 0 =*/144).bool(message.automatedGreetingMessageShown); + if (message.greetingMessageBody != null && Object.hasOwnProperty.call(message, "greetingMessageBody")) + writer.uint32(/* id 19, wireType 2 =*/154).string(message.greetingMessageBody); + if (message.ctaPayload != null && Object.hasOwnProperty.call(message, "ctaPayload")) + writer.uint32(/* id 20, wireType 2 =*/162).string(message.ctaPayload); + if (message.disableNudge != null && Object.hasOwnProperty.call(message, "disableNudge")) + writer.uint32(/* id 21, wireType 0 =*/168).bool(message.disableNudge); + if (message.originalImageUrl != null && Object.hasOwnProperty.call(message, "originalImageUrl")) + writer.uint32(/* id 22, wireType 2 =*/178).string(message.originalImageUrl); return writer; }; @@ -13365,48 +31763,94 @@ $root.proto = (function() { 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; - case 13: - message.ctwaClid = reader.string(); - break; - case 14: - message.ref = reader.string(); - break; + 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; + } + case 13: { + message.ctwaClid = reader.string(); + break; + } + case 14: { + message.ref = reader.string(); + break; + } + case 15: { + message.clickToWhatsappCall = reader.bool(); + break; + } + case 16: { + message.adContextPreviewDismissed = reader.bool(); + break; + } + case 17: { + message.sourceApp = reader.string(); + break; + } + case 18: { + message.automatedGreetingMessageShown = reader.bool(); + break; + } + case 19: { + message.greetingMessageBody = reader.string(); + break; + } + case 20: { + message.ctaPayload = reader.string(); + break; + } + case 21: { + message.disableNudge = reader.bool(); + break; + } + case 22: { + message.originalImageUrl = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -13442,13 +31886,19 @@ $root.proto = (function() { ExternalAdReplyInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.title != null && message.hasOwnProperty("title")) + var properties = {}; + if (message.title != null && message.hasOwnProperty("title")) { + properties._title = 1; if (!$util.isString(message.title)) return "title: string expected"; - if (message.body != null && message.hasOwnProperty("body")) + } + if (message.body != null && message.hasOwnProperty("body")) { + properties._body = 1; if (!$util.isString(message.body)) return "body: string expected"; - if (message.mediaType != null && message.hasOwnProperty("mediaType")) + } + if (message.mediaType != null && message.hasOwnProperty("mediaType")) { + properties._mediaType = 1; switch (message.mediaType) { default: return "mediaType: enum value expected"; @@ -13457,39 +31907,102 @@ $root.proto = (function() { case 2: break; } - if (message.thumbnailUrl != null && message.hasOwnProperty("thumbnailUrl")) + } + if (message.thumbnailUrl != null && message.hasOwnProperty("thumbnailUrl")) { + properties._thumbnailUrl = 1; if (!$util.isString(message.thumbnailUrl)) return "thumbnailUrl: string expected"; - if (message.mediaUrl != null && message.hasOwnProperty("mediaUrl")) + } + if (message.mediaUrl != null && message.hasOwnProperty("mediaUrl")) { + properties._mediaUrl = 1; if (!$util.isString(message.mediaUrl)) return "mediaUrl: string expected"; - if (message.thumbnail != null && message.hasOwnProperty("thumbnail")) + } + if (message.thumbnail != null && message.hasOwnProperty("thumbnail")) { + properties._thumbnail = 1; if (!(message.thumbnail && typeof message.thumbnail.length === "number" || $util.isString(message.thumbnail))) return "thumbnail: buffer expected"; - if (message.sourceType != null && message.hasOwnProperty("sourceType")) + } + if (message.sourceType != null && message.hasOwnProperty("sourceType")) { + properties._sourceType = 1; if (!$util.isString(message.sourceType)) return "sourceType: string expected"; - if (message.sourceId != null && message.hasOwnProperty("sourceId")) + } + if (message.sourceId != null && message.hasOwnProperty("sourceId")) { + properties._sourceId = 1; if (!$util.isString(message.sourceId)) return "sourceId: string expected"; - if (message.sourceUrl != null && message.hasOwnProperty("sourceUrl")) + } + if (message.sourceUrl != null && message.hasOwnProperty("sourceUrl")) { + properties._sourceUrl = 1; if (!$util.isString(message.sourceUrl)) return "sourceUrl: string expected"; - if (message.containsAutoReply != null && message.hasOwnProperty("containsAutoReply")) + } + if (message.containsAutoReply != null && message.hasOwnProperty("containsAutoReply")) { + properties._containsAutoReply = 1; if (typeof message.containsAutoReply !== "boolean") return "containsAutoReply: boolean expected"; - if (message.renderLargerThumbnail != null && message.hasOwnProperty("renderLargerThumbnail")) + } + if (message.renderLargerThumbnail != null && message.hasOwnProperty("renderLargerThumbnail")) { + properties._renderLargerThumbnail = 1; if (typeof message.renderLargerThumbnail !== "boolean") return "renderLargerThumbnail: boolean expected"; - if (message.showAdAttribution != null && message.hasOwnProperty("showAdAttribution")) + } + if (message.showAdAttribution != null && message.hasOwnProperty("showAdAttribution")) { + properties._showAdAttribution = 1; if (typeof message.showAdAttribution !== "boolean") return "showAdAttribution: boolean expected"; - if (message.ctwaClid != null && message.hasOwnProperty("ctwaClid")) + } + if (message.ctwaClid != null && message.hasOwnProperty("ctwaClid")) { + properties._ctwaClid = 1; if (!$util.isString(message.ctwaClid)) return "ctwaClid: string expected"; - if (message.ref != null && message.hasOwnProperty("ref")) + } + if (message.ref != null && message.hasOwnProperty("ref")) { + properties._ref = 1; if (!$util.isString(message.ref)) return "ref: string expected"; + } + if (message.clickToWhatsappCall != null && message.hasOwnProperty("clickToWhatsappCall")) { + properties._clickToWhatsappCall = 1; + if (typeof message.clickToWhatsappCall !== "boolean") + return "clickToWhatsappCall: boolean expected"; + } + if (message.adContextPreviewDismissed != null && message.hasOwnProperty("adContextPreviewDismissed")) { + properties._adContextPreviewDismissed = 1; + if (typeof message.adContextPreviewDismissed !== "boolean") + return "adContextPreviewDismissed: boolean expected"; + } + if (message.sourceApp != null && message.hasOwnProperty("sourceApp")) { + properties._sourceApp = 1; + if (!$util.isString(message.sourceApp)) + return "sourceApp: string expected"; + } + if (message.automatedGreetingMessageShown != null && message.hasOwnProperty("automatedGreetingMessageShown")) { + properties._automatedGreetingMessageShown = 1; + if (typeof message.automatedGreetingMessageShown !== "boolean") + return "automatedGreetingMessageShown: boolean expected"; + } + if (message.greetingMessageBody != null && message.hasOwnProperty("greetingMessageBody")) { + properties._greetingMessageBody = 1; + if (!$util.isString(message.greetingMessageBody)) + return "greetingMessageBody: string expected"; + } + if (message.ctaPayload != null && message.hasOwnProperty("ctaPayload")) { + properties._ctaPayload = 1; + if (!$util.isString(message.ctaPayload)) + return "ctaPayload: string expected"; + } + if (message.disableNudge != null && message.hasOwnProperty("disableNudge")) { + properties._disableNudge = 1; + if (typeof message.disableNudge !== "boolean") + return "disableNudge: boolean expected"; + } + if (message.originalImageUrl != null && message.hasOwnProperty("originalImageUrl")) { + properties._originalImageUrl = 1; + if (!$util.isString(message.originalImageUrl)) + return "originalImageUrl: string expected"; + } return null; }; @@ -13510,6 +32023,12 @@ $root.proto = (function() { if (object.body != null) message.body = String(object.body); switch (object.mediaType) { + default: + if (typeof object.mediaType === "number") { + message.mediaType = object.mediaType; + break; + } + break; case "NONE": case 0: message.mediaType = 0; @@ -13530,7 +32049,7 @@ $root.proto = (function() { 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) + else if (object.thumbnail.length >= 0) message.thumbnail = object.thumbnail; if (object.sourceType != null) message.sourceType = String(object.sourceType); @@ -13548,6 +32067,22 @@ $root.proto = (function() { message.ctwaClid = String(object.ctwaClid); if (object.ref != null) message.ref = String(object.ref); + if (object.clickToWhatsappCall != null) + message.clickToWhatsappCall = Boolean(object.clickToWhatsappCall); + if (object.adContextPreviewDismissed != null) + message.adContextPreviewDismissed = Boolean(object.adContextPreviewDismissed); + if (object.sourceApp != null) + message.sourceApp = String(object.sourceApp); + if (object.automatedGreetingMessageShown != null) + message.automatedGreetingMessageShown = Boolean(object.automatedGreetingMessageShown); + if (object.greetingMessageBody != null) + message.greetingMessageBody = String(object.greetingMessageBody); + if (object.ctaPayload != null) + message.ctaPayload = String(object.ctaPayload); + if (object.disableNudge != null) + message.disableNudge = Boolean(object.disableNudge); + if (object.originalImageUrl != null) + message.originalImageUrl = String(object.originalImageUrl); return message; }; @@ -13564,56 +32099,116 @@ $root.proto = (function() { 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; - object.ctwaClid = ""; - object.ref = ""; - } - if (message.title != null && message.hasOwnProperty("title")) + if (message.title != null && message.hasOwnProperty("title")) { object.title = message.title; - if (message.body != null && message.hasOwnProperty("body")) + if (options.oneofs) + object._title = "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")) + if (options.oneofs) + object._body = "body"; + } + if (message.mediaType != null && message.hasOwnProperty("mediaType")) { + object.mediaType = options.enums === String ? $root.proto.ContextInfo.ExternalAdReplyInfo.MediaType[message.mediaType] === undefined ? message.mediaType : $root.proto.ContextInfo.ExternalAdReplyInfo.MediaType[message.mediaType] : message.mediaType; + if (options.oneofs) + object._mediaType = "mediaType"; + } + if (message.thumbnailUrl != null && message.hasOwnProperty("thumbnailUrl")) { object.thumbnailUrl = message.thumbnailUrl; - if (message.mediaUrl != null && message.hasOwnProperty("mediaUrl")) + if (options.oneofs) + object._thumbnailUrl = "thumbnailUrl"; + } + if (message.mediaUrl != null && message.hasOwnProperty("mediaUrl")) { object.mediaUrl = message.mediaUrl; - if (message.thumbnail != null && message.hasOwnProperty("thumbnail")) + if (options.oneofs) + object._mediaUrl = "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")) + if (options.oneofs) + object._thumbnail = "thumbnail"; + } + if (message.sourceType != null && message.hasOwnProperty("sourceType")) { object.sourceType = message.sourceType; - if (message.sourceId != null && message.hasOwnProperty("sourceId")) + if (options.oneofs) + object._sourceType = "sourceType"; + } + if (message.sourceId != null && message.hasOwnProperty("sourceId")) { object.sourceId = message.sourceId; - if (message.sourceUrl != null && message.hasOwnProperty("sourceUrl")) + if (options.oneofs) + object._sourceId = "sourceId"; + } + if (message.sourceUrl != null && message.hasOwnProperty("sourceUrl")) { object.sourceUrl = message.sourceUrl; - if (message.containsAutoReply != null && message.hasOwnProperty("containsAutoReply")) + if (options.oneofs) + object._sourceUrl = "sourceUrl"; + } + if (message.containsAutoReply != null && message.hasOwnProperty("containsAutoReply")) { object.containsAutoReply = message.containsAutoReply; - if (message.renderLargerThumbnail != null && message.hasOwnProperty("renderLargerThumbnail")) + if (options.oneofs) + object._containsAutoReply = "containsAutoReply"; + } + if (message.renderLargerThumbnail != null && message.hasOwnProperty("renderLargerThumbnail")) { object.renderLargerThumbnail = message.renderLargerThumbnail; - if (message.showAdAttribution != null && message.hasOwnProperty("showAdAttribution")) + if (options.oneofs) + object._renderLargerThumbnail = "renderLargerThumbnail"; + } + if (message.showAdAttribution != null && message.hasOwnProperty("showAdAttribution")) { object.showAdAttribution = message.showAdAttribution; - if (message.ctwaClid != null && message.hasOwnProperty("ctwaClid")) + if (options.oneofs) + object._showAdAttribution = "showAdAttribution"; + } + if (message.ctwaClid != null && message.hasOwnProperty("ctwaClid")) { object.ctwaClid = message.ctwaClid; - if (message.ref != null && message.hasOwnProperty("ref")) + if (options.oneofs) + object._ctwaClid = "ctwaClid"; + } + if (message.ref != null && message.hasOwnProperty("ref")) { object.ref = message.ref; + if (options.oneofs) + object._ref = "ref"; + } + if (message.clickToWhatsappCall != null && message.hasOwnProperty("clickToWhatsappCall")) { + object.clickToWhatsappCall = message.clickToWhatsappCall; + if (options.oneofs) + object._clickToWhatsappCall = "clickToWhatsappCall"; + } + if (message.adContextPreviewDismissed != null && message.hasOwnProperty("adContextPreviewDismissed")) { + object.adContextPreviewDismissed = message.adContextPreviewDismissed; + if (options.oneofs) + object._adContextPreviewDismissed = "adContextPreviewDismissed"; + } + if (message.sourceApp != null && message.hasOwnProperty("sourceApp")) { + object.sourceApp = message.sourceApp; + if (options.oneofs) + object._sourceApp = "sourceApp"; + } + if (message.automatedGreetingMessageShown != null && message.hasOwnProperty("automatedGreetingMessageShown")) { + object.automatedGreetingMessageShown = message.automatedGreetingMessageShown; + if (options.oneofs) + object._automatedGreetingMessageShown = "automatedGreetingMessageShown"; + } + if (message.greetingMessageBody != null && message.hasOwnProperty("greetingMessageBody")) { + object.greetingMessageBody = message.greetingMessageBody; + if (options.oneofs) + object._greetingMessageBody = "greetingMessageBody"; + } + if (message.ctaPayload != null && message.hasOwnProperty("ctaPayload")) { + object.ctaPayload = message.ctaPayload; + if (options.oneofs) + object._ctaPayload = "ctaPayload"; + } + if (message.disableNudge != null && message.hasOwnProperty("disableNudge")) { + object.disableNudge = message.disableNudge; + if (options.oneofs) + object._disableNudge = "disableNudge"; + } + if (message.originalImageUrl != null && message.hasOwnProperty("originalImageUrl")) { + object.originalImageUrl = message.originalImageUrl; + if (options.oneofs) + object._originalImageUrl = "originalImageUrl"; + } return object; }; @@ -13628,6 +32223,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ExternalAdReplyInfo + * @function getTypeUrl + * @memberof proto.ContextInfo.ExternalAdReplyInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExternalAdReplyInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.ContextInfo.ExternalAdReplyInfo"; + }; + /** * MediaType enum. * @name proto.ContextInfo.ExternalAdReplyInfo.MediaType @@ -13647,6 +32257,603 @@ $root.proto = (function() { return ExternalAdReplyInfo; })(); + ContextInfo.FeatureEligibilities = (function() { + + /** + * Properties of a FeatureEligibilities. + * @memberof proto.ContextInfo + * @interface IFeatureEligibilities + * @property {boolean|null} [cannotBeReactedTo] FeatureEligibilities cannotBeReactedTo + * @property {boolean|null} [cannotBeRanked] FeatureEligibilities cannotBeRanked + * @property {boolean|null} [canRequestFeedback] FeatureEligibilities canRequestFeedback + * @property {boolean|null} [canBeReshared] FeatureEligibilities canBeReshared + */ + + /** + * Constructs a new FeatureEligibilities. + * @memberof proto.ContextInfo + * @classdesc Represents a FeatureEligibilities. + * @implements IFeatureEligibilities + * @constructor + * @param {proto.ContextInfo.IFeatureEligibilities=} [properties] Properties to set + */ + function FeatureEligibilities(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FeatureEligibilities cannotBeReactedTo. + * @member {boolean|null|undefined} cannotBeReactedTo + * @memberof proto.ContextInfo.FeatureEligibilities + * @instance + */ + FeatureEligibilities.prototype.cannotBeReactedTo = null; + + /** + * FeatureEligibilities cannotBeRanked. + * @member {boolean|null|undefined} cannotBeRanked + * @memberof proto.ContextInfo.FeatureEligibilities + * @instance + */ + FeatureEligibilities.prototype.cannotBeRanked = null; + + /** + * FeatureEligibilities canRequestFeedback. + * @member {boolean|null|undefined} canRequestFeedback + * @memberof proto.ContextInfo.FeatureEligibilities + * @instance + */ + FeatureEligibilities.prototype.canRequestFeedback = null; + + /** + * FeatureEligibilities canBeReshared. + * @member {boolean|null|undefined} canBeReshared + * @memberof proto.ContextInfo.FeatureEligibilities + * @instance + */ + FeatureEligibilities.prototype.canBeReshared = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(FeatureEligibilities.prototype, "_cannotBeReactedTo", { + get: $util.oneOfGetter($oneOfFields = ["cannotBeReactedTo"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(FeatureEligibilities.prototype, "_cannotBeRanked", { + get: $util.oneOfGetter($oneOfFields = ["cannotBeRanked"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(FeatureEligibilities.prototype, "_canRequestFeedback", { + get: $util.oneOfGetter($oneOfFields = ["canRequestFeedback"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(FeatureEligibilities.prototype, "_canBeReshared", { + get: $util.oneOfGetter($oneOfFields = ["canBeReshared"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new FeatureEligibilities instance using the specified properties. + * @function create + * @memberof proto.ContextInfo.FeatureEligibilities + * @static + * @param {proto.ContextInfo.IFeatureEligibilities=} [properties] Properties to set + * @returns {proto.ContextInfo.FeatureEligibilities} FeatureEligibilities instance + */ + FeatureEligibilities.create = function create(properties) { + return new FeatureEligibilities(properties); + }; + + /** + * Encodes the specified FeatureEligibilities message. Does not implicitly {@link proto.ContextInfo.FeatureEligibilities.verify|verify} messages. + * @function encode + * @memberof proto.ContextInfo.FeatureEligibilities + * @static + * @param {proto.ContextInfo.IFeatureEligibilities} message FeatureEligibilities message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureEligibilities.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.cannotBeReactedTo != null && Object.hasOwnProperty.call(message, "cannotBeReactedTo")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.cannotBeReactedTo); + if (message.cannotBeRanked != null && Object.hasOwnProperty.call(message, "cannotBeRanked")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.cannotBeRanked); + if (message.canRequestFeedback != null && Object.hasOwnProperty.call(message, "canRequestFeedback")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.canRequestFeedback); + if (message.canBeReshared != null && Object.hasOwnProperty.call(message, "canBeReshared")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.canBeReshared); + return writer; + }; + + /** + * Encodes the specified FeatureEligibilities message, length delimited. Does not implicitly {@link proto.ContextInfo.FeatureEligibilities.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.ContextInfo.FeatureEligibilities + * @static + * @param {proto.ContextInfo.IFeatureEligibilities} message FeatureEligibilities message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureEligibilities.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeatureEligibilities message from the specified reader or buffer. + * @function decode + * @memberof proto.ContextInfo.FeatureEligibilities + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.ContextInfo.FeatureEligibilities} FeatureEligibilities + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureEligibilities.decode = function 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.FeatureEligibilities(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.cannotBeReactedTo = reader.bool(); + break; + } + case 2: { + message.cannotBeRanked = reader.bool(); + break; + } + case 3: { + message.canRequestFeedback = reader.bool(); + break; + } + case 4: { + message.canBeReshared = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FeatureEligibilities message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.ContextInfo.FeatureEligibilities + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.ContextInfo.FeatureEligibilities} FeatureEligibilities + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureEligibilities.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeatureEligibilities message. + * @function verify + * @memberof proto.ContextInfo.FeatureEligibilities + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeatureEligibilities.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.cannotBeReactedTo != null && message.hasOwnProperty("cannotBeReactedTo")) { + properties._cannotBeReactedTo = 1; + if (typeof message.cannotBeReactedTo !== "boolean") + return "cannotBeReactedTo: boolean expected"; + } + if (message.cannotBeRanked != null && message.hasOwnProperty("cannotBeRanked")) { + properties._cannotBeRanked = 1; + if (typeof message.cannotBeRanked !== "boolean") + return "cannotBeRanked: boolean expected"; + } + if (message.canRequestFeedback != null && message.hasOwnProperty("canRequestFeedback")) { + properties._canRequestFeedback = 1; + if (typeof message.canRequestFeedback !== "boolean") + return "canRequestFeedback: boolean expected"; + } + if (message.canBeReshared != null && message.hasOwnProperty("canBeReshared")) { + properties._canBeReshared = 1; + if (typeof message.canBeReshared !== "boolean") + return "canBeReshared: boolean expected"; + } + return null; + }; + + /** + * Creates a FeatureEligibilities message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.ContextInfo.FeatureEligibilities + * @static + * @param {Object.} object Plain object + * @returns {proto.ContextInfo.FeatureEligibilities} FeatureEligibilities + */ + FeatureEligibilities.fromObject = function fromObject(object) { + if (object instanceof $root.proto.ContextInfo.FeatureEligibilities) + return object; + var message = new $root.proto.ContextInfo.FeatureEligibilities(); + if (object.cannotBeReactedTo != null) + message.cannotBeReactedTo = Boolean(object.cannotBeReactedTo); + if (object.cannotBeRanked != null) + message.cannotBeRanked = Boolean(object.cannotBeRanked); + if (object.canRequestFeedback != null) + message.canRequestFeedback = Boolean(object.canRequestFeedback); + if (object.canBeReshared != null) + message.canBeReshared = Boolean(object.canBeReshared); + return message; + }; + + /** + * Creates a plain object from a FeatureEligibilities message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.ContextInfo.FeatureEligibilities + * @static + * @param {proto.ContextInfo.FeatureEligibilities} message FeatureEligibilities + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeatureEligibilities.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.cannotBeReactedTo != null && message.hasOwnProperty("cannotBeReactedTo")) { + object.cannotBeReactedTo = message.cannotBeReactedTo; + if (options.oneofs) + object._cannotBeReactedTo = "cannotBeReactedTo"; + } + if (message.cannotBeRanked != null && message.hasOwnProperty("cannotBeRanked")) { + object.cannotBeRanked = message.cannotBeRanked; + if (options.oneofs) + object._cannotBeRanked = "cannotBeRanked"; + } + if (message.canRequestFeedback != null && message.hasOwnProperty("canRequestFeedback")) { + object.canRequestFeedback = message.canRequestFeedback; + if (options.oneofs) + object._canRequestFeedback = "canRequestFeedback"; + } + if (message.canBeReshared != null && message.hasOwnProperty("canBeReshared")) { + object.canBeReshared = message.canBeReshared; + if (options.oneofs) + object._canBeReshared = "canBeReshared"; + } + return object; + }; + + /** + * Converts this FeatureEligibilities to JSON. + * @function toJSON + * @memberof proto.ContextInfo.FeatureEligibilities + * @instance + * @returns {Object.} JSON object + */ + FeatureEligibilities.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeatureEligibilities + * @function getTypeUrl + * @memberof proto.ContextInfo.FeatureEligibilities + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeatureEligibilities.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.ContextInfo.FeatureEligibilities"; + }; + + return FeatureEligibilities; + })(); + + ContextInfo.ForwardedAIBotMessageInfo = (function() { + + /** + * Properties of a ForwardedAIBotMessageInfo. + * @memberof proto.ContextInfo + * @interface IForwardedAIBotMessageInfo + * @property {string|null} [botName] ForwardedAIBotMessageInfo botName + * @property {string|null} [botJid] ForwardedAIBotMessageInfo botJid + * @property {string|null} [creatorName] ForwardedAIBotMessageInfo creatorName + */ + + /** + * Constructs a new ForwardedAIBotMessageInfo. + * @memberof proto.ContextInfo + * @classdesc Represents a ForwardedAIBotMessageInfo. + * @implements IForwardedAIBotMessageInfo + * @constructor + * @param {proto.ContextInfo.IForwardedAIBotMessageInfo=} [properties] Properties to set + */ + function ForwardedAIBotMessageInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ForwardedAIBotMessageInfo botName. + * @member {string|null|undefined} botName + * @memberof proto.ContextInfo.ForwardedAIBotMessageInfo + * @instance + */ + ForwardedAIBotMessageInfo.prototype.botName = null; + + /** + * ForwardedAIBotMessageInfo botJid. + * @member {string|null|undefined} botJid + * @memberof proto.ContextInfo.ForwardedAIBotMessageInfo + * @instance + */ + ForwardedAIBotMessageInfo.prototype.botJid = null; + + /** + * ForwardedAIBotMessageInfo creatorName. + * @member {string|null|undefined} creatorName + * @memberof proto.ContextInfo.ForwardedAIBotMessageInfo + * @instance + */ + ForwardedAIBotMessageInfo.prototype.creatorName = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ForwardedAIBotMessageInfo.prototype, "_botName", { + get: $util.oneOfGetter($oneOfFields = ["botName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ForwardedAIBotMessageInfo.prototype, "_botJid", { + get: $util.oneOfGetter($oneOfFields = ["botJid"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ForwardedAIBotMessageInfo.prototype, "_creatorName", { + get: $util.oneOfGetter($oneOfFields = ["creatorName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ForwardedAIBotMessageInfo instance using the specified properties. + * @function create + * @memberof proto.ContextInfo.ForwardedAIBotMessageInfo + * @static + * @param {proto.ContextInfo.IForwardedAIBotMessageInfo=} [properties] Properties to set + * @returns {proto.ContextInfo.ForwardedAIBotMessageInfo} ForwardedAIBotMessageInfo instance + */ + ForwardedAIBotMessageInfo.create = function create(properties) { + return new ForwardedAIBotMessageInfo(properties); + }; + + /** + * Encodes the specified ForwardedAIBotMessageInfo message. Does not implicitly {@link proto.ContextInfo.ForwardedAIBotMessageInfo.verify|verify} messages. + * @function encode + * @memberof proto.ContextInfo.ForwardedAIBotMessageInfo + * @static + * @param {proto.ContextInfo.IForwardedAIBotMessageInfo} message ForwardedAIBotMessageInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ForwardedAIBotMessageInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.botName != null && Object.hasOwnProperty.call(message, "botName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.botName); + if (message.botJid != null && Object.hasOwnProperty.call(message, "botJid")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.botJid); + if (message.creatorName != null && Object.hasOwnProperty.call(message, "creatorName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.creatorName); + return writer; + }; + + /** + * Encodes the specified ForwardedAIBotMessageInfo message, length delimited. Does not implicitly {@link proto.ContextInfo.ForwardedAIBotMessageInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.ContextInfo.ForwardedAIBotMessageInfo + * @static + * @param {proto.ContextInfo.IForwardedAIBotMessageInfo} message ForwardedAIBotMessageInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ForwardedAIBotMessageInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ForwardedAIBotMessageInfo message from the specified reader or buffer. + * @function decode + * @memberof proto.ContextInfo.ForwardedAIBotMessageInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.ContextInfo.ForwardedAIBotMessageInfo} ForwardedAIBotMessageInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ForwardedAIBotMessageInfo.decode = function 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.ForwardedAIBotMessageInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.botName = reader.string(); + break; + } + case 2: { + message.botJid = reader.string(); + break; + } + case 3: { + message.creatorName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ForwardedAIBotMessageInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.ContextInfo.ForwardedAIBotMessageInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.ContextInfo.ForwardedAIBotMessageInfo} ForwardedAIBotMessageInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ForwardedAIBotMessageInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ForwardedAIBotMessageInfo message. + * @function verify + * @memberof proto.ContextInfo.ForwardedAIBotMessageInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ForwardedAIBotMessageInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.botName != null && message.hasOwnProperty("botName")) { + properties._botName = 1; + if (!$util.isString(message.botName)) + return "botName: string expected"; + } + if (message.botJid != null && message.hasOwnProperty("botJid")) { + properties._botJid = 1; + if (!$util.isString(message.botJid)) + return "botJid: string expected"; + } + if (message.creatorName != null && message.hasOwnProperty("creatorName")) { + properties._creatorName = 1; + if (!$util.isString(message.creatorName)) + return "creatorName: string expected"; + } + return null; + }; + + /** + * Creates a ForwardedAIBotMessageInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.ContextInfo.ForwardedAIBotMessageInfo + * @static + * @param {Object.} object Plain object + * @returns {proto.ContextInfo.ForwardedAIBotMessageInfo} ForwardedAIBotMessageInfo + */ + ForwardedAIBotMessageInfo.fromObject = function fromObject(object) { + if (object instanceof $root.proto.ContextInfo.ForwardedAIBotMessageInfo) + return object; + var message = new $root.proto.ContextInfo.ForwardedAIBotMessageInfo(); + if (object.botName != null) + message.botName = String(object.botName); + if (object.botJid != null) + message.botJid = String(object.botJid); + if (object.creatorName != null) + message.creatorName = String(object.creatorName); + return message; + }; + + /** + * Creates a plain object from a ForwardedAIBotMessageInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.ContextInfo.ForwardedAIBotMessageInfo + * @static + * @param {proto.ContextInfo.ForwardedAIBotMessageInfo} message ForwardedAIBotMessageInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ForwardedAIBotMessageInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.botName != null && message.hasOwnProperty("botName")) { + object.botName = message.botName; + if (options.oneofs) + object._botName = "botName"; + } + if (message.botJid != null && message.hasOwnProperty("botJid")) { + object.botJid = message.botJid; + if (options.oneofs) + object._botJid = "botJid"; + } + if (message.creatorName != null && message.hasOwnProperty("creatorName")) { + object.creatorName = message.creatorName; + if (options.oneofs) + object._creatorName = "creatorName"; + } + return object; + }; + + /** + * Converts this ForwardedAIBotMessageInfo to JSON. + * @function toJSON + * @memberof proto.ContextInfo.ForwardedAIBotMessageInfo + * @instance + * @returns {Object.} JSON object + */ + ForwardedAIBotMessageInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ForwardedAIBotMessageInfo + * @function getTypeUrl + * @memberof proto.ContextInfo.ForwardedAIBotMessageInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ForwardedAIBotMessageInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.ContextInfo.ForwardedAIBotMessageInfo"; + }; + + return ForwardedAIBotMessageInfo; + })(); + ContextInfo.ForwardedNewsletterMessageInfo = (function() { /** @@ -13677,43 +32884,76 @@ $root.proto = (function() { /** * ForwardedNewsletterMessageInfo newsletterJid. - * @member {string} newsletterJid + * @member {string|null|undefined} newsletterJid * @memberof proto.ContextInfo.ForwardedNewsletterMessageInfo * @instance */ - ForwardedNewsletterMessageInfo.prototype.newsletterJid = ""; + ForwardedNewsletterMessageInfo.prototype.newsletterJid = null; /** * ForwardedNewsletterMessageInfo serverMessageId. - * @member {number} serverMessageId + * @member {number|null|undefined} serverMessageId * @memberof proto.ContextInfo.ForwardedNewsletterMessageInfo * @instance */ - ForwardedNewsletterMessageInfo.prototype.serverMessageId = 0; + ForwardedNewsletterMessageInfo.prototype.serverMessageId = null; /** * ForwardedNewsletterMessageInfo newsletterName. - * @member {string} newsletterName + * @member {string|null|undefined} newsletterName * @memberof proto.ContextInfo.ForwardedNewsletterMessageInfo * @instance */ - ForwardedNewsletterMessageInfo.prototype.newsletterName = ""; + ForwardedNewsletterMessageInfo.prototype.newsletterName = null; /** * ForwardedNewsletterMessageInfo contentType. - * @member {proto.ContextInfo.ForwardedNewsletterMessageInfo.ContentType} contentType + * @member {proto.ContextInfo.ForwardedNewsletterMessageInfo.ContentType|null|undefined} contentType * @memberof proto.ContextInfo.ForwardedNewsletterMessageInfo * @instance */ - ForwardedNewsletterMessageInfo.prototype.contentType = 1; + ForwardedNewsletterMessageInfo.prototype.contentType = null; /** * ForwardedNewsletterMessageInfo accessibilityText. - * @member {string} accessibilityText + * @member {string|null|undefined} accessibilityText * @memberof proto.ContextInfo.ForwardedNewsletterMessageInfo * @instance */ - ForwardedNewsletterMessageInfo.prototype.accessibilityText = ""; + ForwardedNewsletterMessageInfo.prototype.accessibilityText = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ForwardedNewsletterMessageInfo.prototype, "_newsletterJid", { + get: $util.oneOfGetter($oneOfFields = ["newsletterJid"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ForwardedNewsletterMessageInfo.prototype, "_serverMessageId", { + get: $util.oneOfGetter($oneOfFields = ["serverMessageId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ForwardedNewsletterMessageInfo.prototype, "_newsletterName", { + get: $util.oneOfGetter($oneOfFields = ["newsletterName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ForwardedNewsletterMessageInfo.prototype, "_contentType", { + get: $util.oneOfGetter($oneOfFields = ["contentType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ForwardedNewsletterMessageInfo.prototype, "_accessibilityText", { + get: $util.oneOfGetter($oneOfFields = ["accessibilityText"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new ForwardedNewsletterMessageInfo instance using the specified properties. @@ -13783,21 +33023,26 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.newsletterJid = reader.string(); - break; - case 2: - message.serverMessageId = reader.int32(); - break; - case 3: - message.newsletterName = reader.string(); - break; - case 4: - message.contentType = reader.int32(); - break; - case 5: - message.accessibilityText = reader.string(); - break; + case 1: { + message.newsletterJid = reader.string(); + break; + } + case 2: { + message.serverMessageId = reader.int32(); + break; + } + case 3: { + message.newsletterName = reader.string(); + break; + } + case 4: { + message.contentType = reader.int32(); + break; + } + case 5: { + message.accessibilityText = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -13833,16 +33078,24 @@ $root.proto = (function() { ForwardedNewsletterMessageInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.newsletterJid != null && message.hasOwnProperty("newsletterJid")) + var properties = {}; + if (message.newsletterJid != null && message.hasOwnProperty("newsletterJid")) { + properties._newsletterJid = 1; if (!$util.isString(message.newsletterJid)) return "newsletterJid: string expected"; - if (message.serverMessageId != null && message.hasOwnProperty("serverMessageId")) + } + if (message.serverMessageId != null && message.hasOwnProperty("serverMessageId")) { + properties._serverMessageId = 1; if (!$util.isInteger(message.serverMessageId)) return "serverMessageId: integer expected"; - if (message.newsletterName != null && message.hasOwnProperty("newsletterName")) + } + if (message.newsletterName != null && message.hasOwnProperty("newsletterName")) { + properties._newsletterName = 1; if (!$util.isString(message.newsletterName)) return "newsletterName: string expected"; - if (message.contentType != null && message.hasOwnProperty("contentType")) + } + if (message.contentType != null && message.hasOwnProperty("contentType")) { + properties._contentType = 1; switch (message.contentType) { default: return "contentType: enum value expected"; @@ -13851,9 +33104,12 @@ $root.proto = (function() { case 3: break; } - if (message.accessibilityText != null && message.hasOwnProperty("accessibilityText")) + } + if (message.accessibilityText != null && message.hasOwnProperty("accessibilityText")) { + properties._accessibilityText = 1; if (!$util.isString(message.accessibilityText)) return "accessibilityText: string expected"; + } return null; }; @@ -13876,6 +33132,12 @@ $root.proto = (function() { if (object.newsletterName != null) message.newsletterName = String(object.newsletterName); switch (object.contentType) { + default: + if (typeof object.contentType === "number") { + message.contentType = object.contentType; + break; + } + break; case "UPDATE": case 1: message.contentType = 1; @@ -13907,23 +33169,31 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.newsletterJid = ""; - object.serverMessageId = 0; - object.newsletterName = ""; - object.contentType = options.enums === String ? "UPDATE" : 1; - object.accessibilityText = ""; - } - if (message.newsletterJid != null && message.hasOwnProperty("newsletterJid")) + if (message.newsletterJid != null && message.hasOwnProperty("newsletterJid")) { object.newsletterJid = message.newsletterJid; - if (message.serverMessageId != null && message.hasOwnProperty("serverMessageId")) + if (options.oneofs) + object._newsletterJid = "newsletterJid"; + } + if (message.serverMessageId != null && message.hasOwnProperty("serverMessageId")) { object.serverMessageId = message.serverMessageId; - if (message.newsletterName != null && message.hasOwnProperty("newsletterName")) + if (options.oneofs) + object._serverMessageId = "serverMessageId"; + } + if (message.newsletterName != null && message.hasOwnProperty("newsletterName")) { object.newsletterName = message.newsletterName; - if (message.contentType != null && message.hasOwnProperty("contentType")) - object.contentType = options.enums === String ? $root.proto.ContextInfo.ForwardedNewsletterMessageInfo.ContentType[message.contentType] : message.contentType; - if (message.accessibilityText != null && message.hasOwnProperty("accessibilityText")) + if (options.oneofs) + object._newsletterName = "newsletterName"; + } + if (message.contentType != null && message.hasOwnProperty("contentType")) { + object.contentType = options.enums === String ? $root.proto.ContextInfo.ForwardedNewsletterMessageInfo.ContentType[message.contentType] === undefined ? message.contentType : $root.proto.ContextInfo.ForwardedNewsletterMessageInfo.ContentType[message.contentType] : message.contentType; + if (options.oneofs) + object._contentType = "contentType"; + } + if (message.accessibilityText != null && message.hasOwnProperty("accessibilityText")) { object.accessibilityText = message.accessibilityText; + if (options.oneofs) + object._accessibilityText = "accessibilityText"; + } return object; }; @@ -13938,6 +33208,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ForwardedNewsletterMessageInfo + * @function getTypeUrl + * @memberof proto.ContextInfo.ForwardedNewsletterMessageInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ForwardedNewsletterMessageInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.ContextInfo.ForwardedNewsletterMessageInfo"; + }; + /** * ContentType enum. * @name proto.ContextInfo.ForwardedNewsletterMessageInfo.ContentType @@ -13957,6 +33242,42 @@ $root.proto = (function() { return ForwardedNewsletterMessageInfo; })(); + /** + * PairedMediaType enum. + * @name proto.ContextInfo.PairedMediaType + * @enum {number} + * @property {number} NOT_PAIRED_MEDIA=0 NOT_PAIRED_MEDIA value + * @property {number} SD_VIDEO_PARENT=1 SD_VIDEO_PARENT value + * @property {number} HD_VIDEO_CHILD=2 HD_VIDEO_CHILD value + * @property {number} SD_IMAGE_PARENT=3 SD_IMAGE_PARENT value + * @property {number} HD_IMAGE_CHILD=4 HD_IMAGE_CHILD value + */ + ContextInfo.PairedMediaType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NOT_PAIRED_MEDIA"] = 0; + values[valuesById[1] = "SD_VIDEO_PARENT"] = 1; + values[valuesById[2] = "HD_VIDEO_CHILD"] = 2; + values[valuesById[3] = "SD_IMAGE_PARENT"] = 3; + values[valuesById[4] = "HD_IMAGE_CHILD"] = 4; + return values; + })(); + + /** + * StatusAttributionType enum. + * @name proto.ContextInfo.StatusAttributionType + * @enum {number} + * @property {number} NONE=0 NONE value + * @property {number} RESHARED_FROM_MENTION=1 RESHARED_FROM_MENTION value + * @property {number} RESHARED_FROM_POST=2 RESHARED_FROM_POST value + */ + ContextInfo.StatusAttributionType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NONE"] = 0; + values[valuesById[1] = "RESHARED_FROM_MENTION"] = 1; + values[valuesById[2] = "RESHARED_FROM_POST"] = 2; + return values; + })(); + ContextInfo.UTMInfo = (function() { /** @@ -13984,19 +33305,34 @@ $root.proto = (function() { /** * UTMInfo utmSource. - * @member {string} utmSource + * @member {string|null|undefined} utmSource * @memberof proto.ContextInfo.UTMInfo * @instance */ - UTMInfo.prototype.utmSource = ""; + UTMInfo.prototype.utmSource = null; /** * UTMInfo utmCampaign. - * @member {string} utmCampaign + * @member {string|null|undefined} utmCampaign * @memberof proto.ContextInfo.UTMInfo * @instance */ - UTMInfo.prototype.utmCampaign = ""; + UTMInfo.prototype.utmCampaign = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(UTMInfo.prototype, "_utmSource", { + get: $util.oneOfGetter($oneOfFields = ["utmSource"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(UTMInfo.prototype, "_utmCampaign", { + get: $util.oneOfGetter($oneOfFields = ["utmCampaign"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new UTMInfo instance using the specified properties. @@ -14060,12 +33396,14 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.utmSource = reader.string(); - break; - case 2: - message.utmCampaign = reader.string(); - break; + case 1: { + message.utmSource = reader.string(); + break; + } + case 2: { + message.utmCampaign = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -14101,12 +33439,17 @@ $root.proto = (function() { UTMInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.utmSource != null && message.hasOwnProperty("utmSource")) + var properties = {}; + if (message.utmSource != null && message.hasOwnProperty("utmSource")) { + properties._utmSource = 1; if (!$util.isString(message.utmSource)) return "utmSource: string expected"; - if (message.utmCampaign != null && message.hasOwnProperty("utmCampaign")) + } + if (message.utmCampaign != null && message.hasOwnProperty("utmCampaign")) { + properties._utmCampaign = 1; if (!$util.isString(message.utmCampaign)) return "utmCampaign: string expected"; + } return null; }; @@ -14142,14 +33485,16 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.utmSource = ""; - object.utmCampaign = ""; - } - if (message.utmSource != null && message.hasOwnProperty("utmSource")) + if (message.utmSource != null && message.hasOwnProperty("utmSource")) { object.utmSource = message.utmSource; - if (message.utmCampaign != null && message.hasOwnProperty("utmCampaign")) + if (options.oneofs) + object._utmSource = "utmSource"; + } + if (message.utmCampaign != null && message.hasOwnProperty("utmCampaign")) { object.utmCampaign = message.utmCampaign; + if (options.oneofs) + object._utmCampaign = "utmCampaign"; + } return object; }; @@ -14164,6 +33509,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for UTMInfo + * @function getTypeUrl + * @memberof proto.ContextInfo.UTMInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UTMInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.ContextInfo.UTMInfo"; + }; + return UTMInfo; })(); @@ -14221,6 +33581,11 @@ $root.proto = (function() { * @property {string|null} [username] Conversation username * @property {string|null} [lidOriginType] Conversation lidOriginType * @property {number|null} [commentsCount] Conversation commentsCount + * @property {boolean|null} [locked] Conversation locked + * @property {proto.PrivacySystemMessage|null} [systemMessageToInsert] Conversation systemMessageToInsert + * @property {boolean|null} [capiCreatedGroup] Conversation capiCreatedGroup + * @property {string|null} [accountLid] Conversation accountLid + * @property {boolean|null} [limitSharing] Conversation limitSharing */ /** @@ -14258,115 +33623,115 @@ $root.proto = (function() { /** * Conversation newJid. - * @member {string} newJid + * @member {string|null|undefined} newJid * @memberof proto.Conversation * @instance */ - Conversation.prototype.newJid = ""; + Conversation.prototype.newJid = null; /** * Conversation oldJid. - * @member {string} oldJid + * @member {string|null|undefined} oldJid * @memberof proto.Conversation * @instance */ - Conversation.prototype.oldJid = ""; + Conversation.prototype.oldJid = null; /** * Conversation lastMsgTimestamp. - * @member {number|Long} lastMsgTimestamp + * @member {number|Long|null|undefined} lastMsgTimestamp * @memberof proto.Conversation * @instance */ - Conversation.prototype.lastMsgTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + Conversation.prototype.lastMsgTimestamp = null; /** * Conversation unreadCount. - * @member {number} unreadCount + * @member {number|null|undefined} unreadCount * @memberof proto.Conversation * @instance */ - Conversation.prototype.unreadCount = 0; + Conversation.prototype.unreadCount = null; /** * Conversation readOnly. - * @member {boolean} readOnly + * @member {boolean|null|undefined} readOnly * @memberof proto.Conversation * @instance */ - Conversation.prototype.readOnly = false; + Conversation.prototype.readOnly = null; /** * Conversation endOfHistoryTransfer. - * @member {boolean} endOfHistoryTransfer + * @member {boolean|null|undefined} endOfHistoryTransfer * @memberof proto.Conversation * @instance */ - Conversation.prototype.endOfHistoryTransfer = false; + Conversation.prototype.endOfHistoryTransfer = null; /** * Conversation ephemeralExpiration. - * @member {number} ephemeralExpiration + * @member {number|null|undefined} ephemeralExpiration * @memberof proto.Conversation * @instance */ - Conversation.prototype.ephemeralExpiration = 0; + Conversation.prototype.ephemeralExpiration = null; /** * Conversation ephemeralSettingTimestamp. - * @member {number|Long} ephemeralSettingTimestamp + * @member {number|Long|null|undefined} ephemeralSettingTimestamp * @memberof proto.Conversation * @instance */ - Conversation.prototype.ephemeralSettingTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + Conversation.prototype.ephemeralSettingTimestamp = null; /** * Conversation endOfHistoryTransferType. - * @member {proto.Conversation.EndOfHistoryTransferType} endOfHistoryTransferType + * @member {proto.Conversation.EndOfHistoryTransferType|null|undefined} endOfHistoryTransferType * @memberof proto.Conversation * @instance */ - Conversation.prototype.endOfHistoryTransferType = 0; + Conversation.prototype.endOfHistoryTransferType = null; /** * Conversation conversationTimestamp. - * @member {number|Long} conversationTimestamp + * @member {number|Long|null|undefined} conversationTimestamp * @memberof proto.Conversation * @instance */ - Conversation.prototype.conversationTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + Conversation.prototype.conversationTimestamp = null; /** * Conversation name. - * @member {string} name + * @member {string|null|undefined} name * @memberof proto.Conversation * @instance */ - Conversation.prototype.name = ""; + Conversation.prototype.name = null; /** * Conversation pHash. - * @member {string} pHash + * @member {string|null|undefined} pHash * @memberof proto.Conversation * @instance */ - Conversation.prototype.pHash = ""; + Conversation.prototype.pHash = null; /** * Conversation notSpam. - * @member {boolean} notSpam + * @member {boolean|null|undefined} notSpam * @memberof proto.Conversation * @instance */ - Conversation.prototype.notSpam = false; + Conversation.prototype.notSpam = null; /** * Conversation archived. - * @member {boolean} archived + * @member {boolean|null|undefined} archived * @memberof proto.Conversation * @instance */ - Conversation.prototype.archived = false; + Conversation.prototype.archived = null; /** * Conversation disappearingMode. @@ -14378,19 +33743,19 @@ $root.proto = (function() { /** * Conversation unreadMentionCount. - * @member {number} unreadMentionCount + * @member {number|null|undefined} unreadMentionCount * @memberof proto.Conversation * @instance */ - Conversation.prototype.unreadMentionCount = 0; + Conversation.prototype.unreadMentionCount = null; /** * Conversation markedAsUnread. - * @member {boolean} markedAsUnread + * @member {boolean|null|undefined} markedAsUnread * @memberof proto.Conversation * @instance */ - Conversation.prototype.markedAsUnread = false; + Conversation.prototype.markedAsUnread = null; /** * Conversation participant. @@ -14402,43 +33767,43 @@ $root.proto = (function() { /** * Conversation tcToken. - * @member {Uint8Array} tcToken + * @member {Uint8Array|null|undefined} tcToken * @memberof proto.Conversation * @instance */ - Conversation.prototype.tcToken = $util.newBuffer([]); + Conversation.prototype.tcToken = null; /** * Conversation tcTokenTimestamp. - * @member {number|Long} tcTokenTimestamp + * @member {number|Long|null|undefined} tcTokenTimestamp * @memberof proto.Conversation * @instance */ - Conversation.prototype.tcTokenTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + Conversation.prototype.tcTokenTimestamp = null; /** * Conversation contactPrimaryIdentityKey. - * @member {Uint8Array} contactPrimaryIdentityKey + * @member {Uint8Array|null|undefined} contactPrimaryIdentityKey * @memberof proto.Conversation * @instance */ - Conversation.prototype.contactPrimaryIdentityKey = $util.newBuffer([]); + Conversation.prototype.contactPrimaryIdentityKey = null; /** * Conversation pinned. - * @member {number} pinned + * @member {number|null|undefined} pinned * @memberof proto.Conversation * @instance */ - Conversation.prototype.pinned = 0; + Conversation.prototype.pinned = null; /** * Conversation muteEndTime. - * @member {number|Long} muteEndTime + * @member {number|Long|null|undefined} muteEndTime * @memberof proto.Conversation * @instance */ - Conversation.prototype.muteEndTime = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + Conversation.prototype.muteEndTime = null; /** * Conversation wallpaper. @@ -14450,155 +33815,480 @@ $root.proto = (function() { /** * Conversation mediaVisibility. - * @member {proto.MediaVisibility} mediaVisibility + * @member {proto.MediaVisibility|null|undefined} mediaVisibility * @memberof proto.Conversation * @instance */ - Conversation.prototype.mediaVisibility = 0; + Conversation.prototype.mediaVisibility = null; /** * Conversation tcTokenSenderTimestamp. - * @member {number|Long} tcTokenSenderTimestamp + * @member {number|Long|null|undefined} tcTokenSenderTimestamp * @memberof proto.Conversation * @instance */ - Conversation.prototype.tcTokenSenderTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + Conversation.prototype.tcTokenSenderTimestamp = null; /** * Conversation suspended. - * @member {boolean} suspended + * @member {boolean|null|undefined} suspended * @memberof proto.Conversation * @instance */ - Conversation.prototype.suspended = false; + Conversation.prototype.suspended = null; /** * Conversation terminated. - * @member {boolean} terminated + * @member {boolean|null|undefined} terminated * @memberof proto.Conversation * @instance */ - Conversation.prototype.terminated = false; + Conversation.prototype.terminated = null; /** * Conversation createdAt. - * @member {number|Long} createdAt + * @member {number|Long|null|undefined} createdAt * @memberof proto.Conversation * @instance */ - Conversation.prototype.createdAt = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + Conversation.prototype.createdAt = null; /** * Conversation createdBy. - * @member {string} createdBy + * @member {string|null|undefined} createdBy * @memberof proto.Conversation * @instance */ - Conversation.prototype.createdBy = ""; + Conversation.prototype.createdBy = null; /** * Conversation description. - * @member {string} description + * @member {string|null|undefined} description * @memberof proto.Conversation * @instance */ - Conversation.prototype.description = ""; + Conversation.prototype.description = null; /** * Conversation support. - * @member {boolean} support + * @member {boolean|null|undefined} support * @memberof proto.Conversation * @instance */ - Conversation.prototype.support = false; + Conversation.prototype.support = null; /** * Conversation isParentGroup. - * @member {boolean} isParentGroup + * @member {boolean|null|undefined} isParentGroup * @memberof proto.Conversation * @instance */ - Conversation.prototype.isParentGroup = false; + Conversation.prototype.isParentGroup = null; /** * Conversation parentGroupId. - * @member {string} parentGroupId + * @member {string|null|undefined} parentGroupId * @memberof proto.Conversation * @instance */ - Conversation.prototype.parentGroupId = ""; + Conversation.prototype.parentGroupId = null; /** * Conversation isDefaultSubgroup. - * @member {boolean} isDefaultSubgroup + * @member {boolean|null|undefined} isDefaultSubgroup * @memberof proto.Conversation * @instance */ - Conversation.prototype.isDefaultSubgroup = false; + Conversation.prototype.isDefaultSubgroup = null; /** * Conversation displayName. - * @member {string} displayName + * @member {string|null|undefined} displayName * @memberof proto.Conversation * @instance */ - Conversation.prototype.displayName = ""; + Conversation.prototype.displayName = null; /** * Conversation pnJid. - * @member {string} pnJid + * @member {string|null|undefined} pnJid * @memberof proto.Conversation * @instance */ - Conversation.prototype.pnJid = ""; + Conversation.prototype.pnJid = null; /** * Conversation shareOwnPn. - * @member {boolean} shareOwnPn + * @member {boolean|null|undefined} shareOwnPn * @memberof proto.Conversation * @instance */ - Conversation.prototype.shareOwnPn = false; + Conversation.prototype.shareOwnPn = null; /** * Conversation pnhDuplicateLidThread. - * @member {boolean} pnhDuplicateLidThread + * @member {boolean|null|undefined} pnhDuplicateLidThread * @memberof proto.Conversation * @instance */ - Conversation.prototype.pnhDuplicateLidThread = false; + Conversation.prototype.pnhDuplicateLidThread = null; /** * Conversation lidJid. - * @member {string} lidJid + * @member {string|null|undefined} lidJid * @memberof proto.Conversation * @instance */ - Conversation.prototype.lidJid = ""; + Conversation.prototype.lidJid = null; /** * Conversation username. - * @member {string} username + * @member {string|null|undefined} username * @memberof proto.Conversation * @instance */ - Conversation.prototype.username = ""; + Conversation.prototype.username = null; /** * Conversation lidOriginType. - * @member {string} lidOriginType + * @member {string|null|undefined} lidOriginType * @memberof proto.Conversation * @instance */ - Conversation.prototype.lidOriginType = ""; + Conversation.prototype.lidOriginType = null; /** * Conversation commentsCount. - * @member {number} commentsCount + * @member {number|null|undefined} commentsCount * @memberof proto.Conversation * @instance */ - Conversation.prototype.commentsCount = 0; + Conversation.prototype.commentsCount = null; + + /** + * Conversation locked. + * @member {boolean|null|undefined} locked + * @memberof proto.Conversation + * @instance + */ + Conversation.prototype.locked = null; + + /** + * Conversation systemMessageToInsert. + * @member {proto.PrivacySystemMessage|null|undefined} systemMessageToInsert + * @memberof proto.Conversation + * @instance + */ + Conversation.prototype.systemMessageToInsert = null; + + /** + * Conversation capiCreatedGroup. + * @member {boolean|null|undefined} capiCreatedGroup + * @memberof proto.Conversation + * @instance + */ + Conversation.prototype.capiCreatedGroup = null; + + /** + * Conversation accountLid. + * @member {string|null|undefined} accountLid + * @memberof proto.Conversation + * @instance + */ + Conversation.prototype.accountLid = null; + + /** + * Conversation limitSharing. + * @member {boolean|null|undefined} limitSharing + * @memberof proto.Conversation + * @instance + */ + Conversation.prototype.limitSharing = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Conversation.prototype, "_newJid", { + get: $util.oneOfGetter($oneOfFields = ["newJid"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Conversation.prototype, "_oldJid", { + get: $util.oneOfGetter($oneOfFields = ["oldJid"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Conversation.prototype, "_lastMsgTimestamp", { + get: $util.oneOfGetter($oneOfFields = ["lastMsgTimestamp"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Conversation.prototype, "_unreadCount", { + get: $util.oneOfGetter($oneOfFields = ["unreadCount"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Conversation.prototype, "_readOnly", { + get: $util.oneOfGetter($oneOfFields = ["readOnly"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Conversation.prototype, "_endOfHistoryTransfer", { + get: $util.oneOfGetter($oneOfFields = ["endOfHistoryTransfer"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Conversation.prototype, "_ephemeralExpiration", { + get: $util.oneOfGetter($oneOfFields = ["ephemeralExpiration"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Conversation.prototype, "_ephemeralSettingTimestamp", { + get: $util.oneOfGetter($oneOfFields = ["ephemeralSettingTimestamp"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Conversation.prototype, "_endOfHistoryTransferType", { + get: $util.oneOfGetter($oneOfFields = ["endOfHistoryTransferType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Conversation.prototype, "_conversationTimestamp", { + get: $util.oneOfGetter($oneOfFields = ["conversationTimestamp"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Conversation.prototype, "_name", { + get: $util.oneOfGetter($oneOfFields = ["name"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Conversation.prototype, "_pHash", { + get: $util.oneOfGetter($oneOfFields = ["pHash"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Conversation.prototype, "_notSpam", { + get: $util.oneOfGetter($oneOfFields = ["notSpam"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Conversation.prototype, "_archived", { + get: $util.oneOfGetter($oneOfFields = ["archived"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Conversation.prototype, "_disappearingMode", { + get: $util.oneOfGetter($oneOfFields = ["disappearingMode"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Conversation.prototype, "_unreadMentionCount", { + get: $util.oneOfGetter($oneOfFields = ["unreadMentionCount"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Conversation.prototype, "_markedAsUnread", { + get: $util.oneOfGetter($oneOfFields = ["markedAsUnread"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Conversation.prototype, "_tcToken", { + get: $util.oneOfGetter($oneOfFields = ["tcToken"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Conversation.prototype, "_tcTokenTimestamp", { + get: $util.oneOfGetter($oneOfFields = ["tcTokenTimestamp"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Conversation.prototype, "_contactPrimaryIdentityKey", { + get: $util.oneOfGetter($oneOfFields = ["contactPrimaryIdentityKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Conversation.prototype, "_pinned", { + get: $util.oneOfGetter($oneOfFields = ["pinned"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Conversation.prototype, "_muteEndTime", { + get: $util.oneOfGetter($oneOfFields = ["muteEndTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Conversation.prototype, "_wallpaper", { + get: $util.oneOfGetter($oneOfFields = ["wallpaper"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Conversation.prototype, "_mediaVisibility", { + get: $util.oneOfGetter($oneOfFields = ["mediaVisibility"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Conversation.prototype, "_tcTokenSenderTimestamp", { + get: $util.oneOfGetter($oneOfFields = ["tcTokenSenderTimestamp"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Conversation.prototype, "_suspended", { + get: $util.oneOfGetter($oneOfFields = ["suspended"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Conversation.prototype, "_terminated", { + get: $util.oneOfGetter($oneOfFields = ["terminated"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Conversation.prototype, "_createdAt", { + get: $util.oneOfGetter($oneOfFields = ["createdAt"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Conversation.prototype, "_createdBy", { + get: $util.oneOfGetter($oneOfFields = ["createdBy"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Conversation.prototype, "_description", { + get: $util.oneOfGetter($oneOfFields = ["description"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Conversation.prototype, "_support", { + get: $util.oneOfGetter($oneOfFields = ["support"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Conversation.prototype, "_isParentGroup", { + get: $util.oneOfGetter($oneOfFields = ["isParentGroup"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Conversation.prototype, "_parentGroupId", { + get: $util.oneOfGetter($oneOfFields = ["parentGroupId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Conversation.prototype, "_isDefaultSubgroup", { + get: $util.oneOfGetter($oneOfFields = ["isDefaultSubgroup"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Conversation.prototype, "_displayName", { + get: $util.oneOfGetter($oneOfFields = ["displayName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Conversation.prototype, "_pnJid", { + get: $util.oneOfGetter($oneOfFields = ["pnJid"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Conversation.prototype, "_shareOwnPn", { + get: $util.oneOfGetter($oneOfFields = ["shareOwnPn"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Conversation.prototype, "_pnhDuplicateLidThread", { + get: $util.oneOfGetter($oneOfFields = ["pnhDuplicateLidThread"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Conversation.prototype, "_lidJid", { + get: $util.oneOfGetter($oneOfFields = ["lidJid"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Conversation.prototype, "_username", { + get: $util.oneOfGetter($oneOfFields = ["username"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Conversation.prototype, "_lidOriginType", { + get: $util.oneOfGetter($oneOfFields = ["lidOriginType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Conversation.prototype, "_commentsCount", { + get: $util.oneOfGetter($oneOfFields = ["commentsCount"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Conversation.prototype, "_locked", { + get: $util.oneOfGetter($oneOfFields = ["locked"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Conversation.prototype, "_systemMessageToInsert", { + get: $util.oneOfGetter($oneOfFields = ["systemMessageToInsert"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Conversation.prototype, "_capiCreatedGroup", { + get: $util.oneOfGetter($oneOfFields = ["capiCreatedGroup"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Conversation.prototype, "_accountLid", { + get: $util.oneOfGetter($oneOfFields = ["accountLid"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Conversation.prototype, "_limitSharing", { + get: $util.oneOfGetter($oneOfFields = ["limitSharing"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new Conversation instance using the specified properties. @@ -14715,6 +34405,16 @@ $root.proto = (function() { writer.uint32(/* id 44, wireType 2 =*/354).string(message.lidOriginType); if (message.commentsCount != null && Object.hasOwnProperty.call(message, "commentsCount")) writer.uint32(/* id 45, wireType 0 =*/360).uint32(message.commentsCount); + if (message.locked != null && Object.hasOwnProperty.call(message, "locked")) + writer.uint32(/* id 46, wireType 0 =*/368).bool(message.locked); + if (message.systemMessageToInsert != null && Object.hasOwnProperty.call(message, "systemMessageToInsert")) + writer.uint32(/* id 47, wireType 0 =*/376).int32(message.systemMessageToInsert); + if (message.capiCreatedGroup != null && Object.hasOwnProperty.call(message, "capiCreatedGroup")) + writer.uint32(/* id 48, wireType 0 =*/384).bool(message.capiCreatedGroup); + if (message.accountLid != null && Object.hasOwnProperty.call(message, "accountLid")) + writer.uint32(/* id 49, wireType 2 =*/394).string(message.accountLid); + if (message.limitSharing != null && Object.hasOwnProperty.call(message, "limitSharing")) + writer.uint32(/* id 50, wireType 0 =*/400).bool(message.limitSharing); return writer; }; @@ -14749,145 +34449,210 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.id = reader.string(); - break; - case 2: - if (!(message.messages && message.messages.length)) - message.messages = []; - message.messages.push($root.proto.HistorySyncMsg.decode(reader, reader.uint32())); - break; - case 3: - message.newJid = reader.string(); - break; - case 4: - message.oldJid = reader.string(); - break; - case 5: - message.lastMsgTimestamp = reader.uint64(); - break; - case 6: - message.unreadCount = reader.uint32(); - break; - case 7: - message.readOnly = reader.bool(); - break; - case 8: - message.endOfHistoryTransfer = reader.bool(); - break; - case 9: - message.ephemeralExpiration = reader.uint32(); - break; - case 10: - message.ephemeralSettingTimestamp = reader.int64(); - break; - case 11: - message.endOfHistoryTransferType = reader.int32(); - break; - case 12: - message.conversationTimestamp = reader.uint64(); - break; - case 13: - message.name = reader.string(); - break; - case 14: - message.pHash = reader.string(); - break; - case 15: - message.notSpam = reader.bool(); - break; - case 16: - message.archived = reader.bool(); - break; - case 17: - message.disappearingMode = $root.proto.DisappearingMode.decode(reader, reader.uint32()); - break; - case 18: - message.unreadMentionCount = reader.uint32(); - break; - case 19: - message.markedAsUnread = reader.bool(); - break; - case 20: - if (!(message.participant && message.participant.length)) - message.participant = []; - message.participant.push($root.proto.GroupParticipant.decode(reader, reader.uint32())); - break; - case 21: - message.tcToken = reader.bytes(); - break; - case 22: - message.tcTokenTimestamp = reader.uint64(); - break; - case 23: - message.contactPrimaryIdentityKey = reader.bytes(); - break; - case 24: - message.pinned = reader.uint32(); - break; - case 25: - message.muteEndTime = reader.uint64(); - break; - case 26: - message.wallpaper = $root.proto.WallpaperSettings.decode(reader, reader.uint32()); - break; - case 27: - message.mediaVisibility = reader.int32(); - break; - case 28: - message.tcTokenSenderTimestamp = reader.uint64(); - break; - case 29: - message.suspended = reader.bool(); - break; - case 30: - message.terminated = reader.bool(); - break; - case 31: - message.createdAt = reader.uint64(); - break; - case 32: - message.createdBy = reader.string(); - break; - case 33: - message.description = reader.string(); - break; - case 34: - message.support = reader.bool(); - break; - case 35: - message.isParentGroup = reader.bool(); - break; - case 37: - message.parentGroupId = reader.string(); - break; - case 36: - message.isDefaultSubgroup = reader.bool(); - break; - case 38: - message.displayName = reader.string(); - break; - case 39: - message.pnJid = reader.string(); - break; - case 40: - message.shareOwnPn = reader.bool(); - break; - case 41: - message.pnhDuplicateLidThread = reader.bool(); - break; - case 42: - message.lidJid = reader.string(); - break; - case 43: - message.username = reader.string(); - break; - case 44: - message.lidOriginType = reader.string(); - break; - case 45: - message.commentsCount = reader.uint32(); - break; + case 1: { + message.id = reader.string(); + break; + } + case 2: { + if (!(message.messages && message.messages.length)) + message.messages = []; + message.messages.push($root.proto.HistorySyncMsg.decode(reader, reader.uint32())); + break; + } + case 3: { + message.newJid = reader.string(); + break; + } + case 4: { + message.oldJid = reader.string(); + break; + } + case 5: { + message.lastMsgTimestamp = reader.uint64(); + break; + } + case 6: { + message.unreadCount = reader.uint32(); + break; + } + case 7: { + message.readOnly = reader.bool(); + break; + } + case 8: { + message.endOfHistoryTransfer = reader.bool(); + break; + } + case 9: { + message.ephemeralExpiration = reader.uint32(); + break; + } + case 10: { + message.ephemeralSettingTimestamp = reader.int64(); + break; + } + case 11: { + message.endOfHistoryTransferType = reader.int32(); + break; + } + case 12: { + message.conversationTimestamp = reader.uint64(); + break; + } + case 13: { + message.name = reader.string(); + break; + } + case 14: { + message.pHash = reader.string(); + break; + } + case 15: { + message.notSpam = reader.bool(); + break; + } + case 16: { + message.archived = reader.bool(); + break; + } + case 17: { + message.disappearingMode = $root.proto.DisappearingMode.decode(reader, reader.uint32()); + break; + } + case 18: { + message.unreadMentionCount = reader.uint32(); + break; + } + case 19: { + message.markedAsUnread = reader.bool(); + break; + } + case 20: { + if (!(message.participant && message.participant.length)) + message.participant = []; + message.participant.push($root.proto.GroupParticipant.decode(reader, reader.uint32())); + break; + } + case 21: { + message.tcToken = reader.bytes(); + break; + } + case 22: { + message.tcTokenTimestamp = reader.uint64(); + break; + } + case 23: { + message.contactPrimaryIdentityKey = reader.bytes(); + break; + } + case 24: { + message.pinned = reader.uint32(); + break; + } + case 25: { + message.muteEndTime = reader.uint64(); + break; + } + case 26: { + message.wallpaper = $root.proto.WallpaperSettings.decode(reader, reader.uint32()); + break; + } + case 27: { + message.mediaVisibility = reader.int32(); + break; + } + case 28: { + message.tcTokenSenderTimestamp = reader.uint64(); + break; + } + case 29: { + message.suspended = reader.bool(); + break; + } + case 30: { + message.terminated = reader.bool(); + break; + } + case 31: { + message.createdAt = reader.uint64(); + break; + } + case 32: { + message.createdBy = reader.string(); + break; + } + case 33: { + message.description = reader.string(); + break; + } + case 34: { + message.support = reader.bool(); + break; + } + case 35: { + message.isParentGroup = reader.bool(); + break; + } + case 37: { + message.parentGroupId = reader.string(); + break; + } + case 36: { + message.isDefaultSubgroup = reader.bool(); + break; + } + case 38: { + message.displayName = reader.string(); + break; + } + case 39: { + message.pnJid = reader.string(); + break; + } + case 40: { + message.shareOwnPn = reader.bool(); + break; + } + case 41: { + message.pnhDuplicateLidThread = reader.bool(); + break; + } + case 42: { + message.lidJid = reader.string(); + break; + } + case 43: { + message.username = reader.string(); + break; + } + case 44: { + message.lidOriginType = reader.string(); + break; + } + case 45: { + message.commentsCount = reader.uint32(); + break; + } + case 46: { + message.locked = reader.bool(); + break; + } + case 47: { + message.systemMessageToInsert = reader.int32(); + break; + } + case 48: { + message.capiCreatedGroup = reader.bool(); + break; + } + case 49: { + message.accountLid = reader.string(); + break; + } + case 50: { + message.limitSharing = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -14925,6 +34690,7 @@ $root.proto = (function() { Conversation.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; if (!$util.isString(message.id)) return "id: string expected"; if (message.messages != null && message.hasOwnProperty("messages")) { @@ -14936,31 +34702,48 @@ $root.proto = (function() { return "messages." + error; } } - if (message.newJid != null && message.hasOwnProperty("newJid")) + if (message.newJid != null && message.hasOwnProperty("newJid")) { + properties._newJid = 1; if (!$util.isString(message.newJid)) return "newJid: string expected"; - if (message.oldJid != null && message.hasOwnProperty("oldJid")) + } + if (message.oldJid != null && message.hasOwnProperty("oldJid")) { + properties._oldJid = 1; if (!$util.isString(message.oldJid)) return "oldJid: string expected"; - if (message.lastMsgTimestamp != null && message.hasOwnProperty("lastMsgTimestamp")) + } + if (message.lastMsgTimestamp != null && message.hasOwnProperty("lastMsgTimestamp")) { + properties._lastMsgTimestamp = 1; if (!$util.isInteger(message.lastMsgTimestamp) && !(message.lastMsgTimestamp && $util.isInteger(message.lastMsgTimestamp.low) && $util.isInteger(message.lastMsgTimestamp.high))) return "lastMsgTimestamp: integer|Long expected"; - if (message.unreadCount != null && message.hasOwnProperty("unreadCount")) + } + if (message.unreadCount != null && message.hasOwnProperty("unreadCount")) { + properties._unreadCount = 1; if (!$util.isInteger(message.unreadCount)) return "unreadCount: integer expected"; - if (message.readOnly != null && message.hasOwnProperty("readOnly")) + } + if (message.readOnly != null && message.hasOwnProperty("readOnly")) { + properties._readOnly = 1; if (typeof message.readOnly !== "boolean") return "readOnly: boolean expected"; - if (message.endOfHistoryTransfer != null && message.hasOwnProperty("endOfHistoryTransfer")) + } + if (message.endOfHistoryTransfer != null && message.hasOwnProperty("endOfHistoryTransfer")) { + properties._endOfHistoryTransfer = 1; if (typeof message.endOfHistoryTransfer !== "boolean") return "endOfHistoryTransfer: boolean expected"; - if (message.ephemeralExpiration != null && message.hasOwnProperty("ephemeralExpiration")) + } + if (message.ephemeralExpiration != null && message.hasOwnProperty("ephemeralExpiration")) { + properties._ephemeralExpiration = 1; if (!$util.isInteger(message.ephemeralExpiration)) return "ephemeralExpiration: integer expected"; - if (message.ephemeralSettingTimestamp != null && message.hasOwnProperty("ephemeralSettingTimestamp")) + } + if (message.ephemeralSettingTimestamp != null && message.hasOwnProperty("ephemeralSettingTimestamp")) { + properties._ephemeralSettingTimestamp = 1; if (!$util.isInteger(message.ephemeralSettingTimestamp) && !(message.ephemeralSettingTimestamp && $util.isInteger(message.ephemeralSettingTimestamp.low) && $util.isInteger(message.ephemeralSettingTimestamp.high))) return "ephemeralSettingTimestamp: integer|Long expected"; - if (message.endOfHistoryTransferType != null && message.hasOwnProperty("endOfHistoryTransferType")) + } + if (message.endOfHistoryTransferType != null && message.hasOwnProperty("endOfHistoryTransferType")) { + properties._endOfHistoryTransferType = 1; switch (message.endOfHistoryTransferType) { default: return "endOfHistoryTransferType: enum value expected"; @@ -14969,32 +34752,50 @@ $root.proto = (function() { case 2: break; } - if (message.conversationTimestamp != null && message.hasOwnProperty("conversationTimestamp")) + } + if (message.conversationTimestamp != null && message.hasOwnProperty("conversationTimestamp")) { + properties._conversationTimestamp = 1; if (!$util.isInteger(message.conversationTimestamp) && !(message.conversationTimestamp && $util.isInteger(message.conversationTimestamp.low) && $util.isInteger(message.conversationTimestamp.high))) return "conversationTimestamp: integer|Long expected"; - if (message.name != null && message.hasOwnProperty("name")) + } + if (message.name != null && message.hasOwnProperty("name")) { + properties._name = 1; if (!$util.isString(message.name)) return "name: string expected"; - if (message.pHash != null && message.hasOwnProperty("pHash")) + } + if (message.pHash != null && message.hasOwnProperty("pHash")) { + properties._pHash = 1; if (!$util.isString(message.pHash)) return "pHash: string expected"; - if (message.notSpam != null && message.hasOwnProperty("notSpam")) + } + if (message.notSpam != null && message.hasOwnProperty("notSpam")) { + properties._notSpam = 1; if (typeof message.notSpam !== "boolean") return "notSpam: boolean expected"; - if (message.archived != null && message.hasOwnProperty("archived")) + } + if (message.archived != null && message.hasOwnProperty("archived")) { + properties._archived = 1; if (typeof message.archived !== "boolean") return "archived: boolean expected"; - if (message.disappearingMode != null && message.hasOwnProperty("disappearingMode")) { - var error = $root.proto.DisappearingMode.verify(message.disappearingMode); - if (error) - return "disappearingMode." + error; } - if (message.unreadMentionCount != null && message.hasOwnProperty("unreadMentionCount")) + if (message.disappearingMode != null && message.hasOwnProperty("disappearingMode")) { + properties._disappearingMode = 1; + { + var error = $root.proto.DisappearingMode.verify(message.disappearingMode); + if (error) + return "disappearingMode." + error; + } + } + if (message.unreadMentionCount != null && message.hasOwnProperty("unreadMentionCount")) { + properties._unreadMentionCount = 1; if (!$util.isInteger(message.unreadMentionCount)) return "unreadMentionCount: integer expected"; - if (message.markedAsUnread != null && message.hasOwnProperty("markedAsUnread")) + } + if (message.markedAsUnread != null && message.hasOwnProperty("markedAsUnread")) { + properties._markedAsUnread = 1; if (typeof message.markedAsUnread !== "boolean") return "markedAsUnread: boolean expected"; + } if (message.participant != null && message.hasOwnProperty("participant")) { if (!Array.isArray(message.participant)) return "participant: array expected"; @@ -15004,27 +34805,41 @@ $root.proto = (function() { return "participant." + error; } } - if (message.tcToken != null && message.hasOwnProperty("tcToken")) + if (message.tcToken != null && message.hasOwnProperty("tcToken")) { + properties._tcToken = 1; if (!(message.tcToken && typeof message.tcToken.length === "number" || $util.isString(message.tcToken))) return "tcToken: buffer expected"; - if (message.tcTokenTimestamp != null && message.hasOwnProperty("tcTokenTimestamp")) + } + if (message.tcTokenTimestamp != null && message.hasOwnProperty("tcTokenTimestamp")) { + properties._tcTokenTimestamp = 1; if (!$util.isInteger(message.tcTokenTimestamp) && !(message.tcTokenTimestamp && $util.isInteger(message.tcTokenTimestamp.low) && $util.isInteger(message.tcTokenTimestamp.high))) return "tcTokenTimestamp: integer|Long expected"; - if (message.contactPrimaryIdentityKey != null && message.hasOwnProperty("contactPrimaryIdentityKey")) + } + if (message.contactPrimaryIdentityKey != null && message.hasOwnProperty("contactPrimaryIdentityKey")) { + properties._contactPrimaryIdentityKey = 1; if (!(message.contactPrimaryIdentityKey && typeof message.contactPrimaryIdentityKey.length === "number" || $util.isString(message.contactPrimaryIdentityKey))) return "contactPrimaryIdentityKey: buffer expected"; - if (message.pinned != null && message.hasOwnProperty("pinned")) + } + if (message.pinned != null && message.hasOwnProperty("pinned")) { + properties._pinned = 1; if (!$util.isInteger(message.pinned)) return "pinned: integer expected"; - if (message.muteEndTime != null && message.hasOwnProperty("muteEndTime")) + } + if (message.muteEndTime != null && message.hasOwnProperty("muteEndTime")) { + properties._muteEndTime = 1; if (!$util.isInteger(message.muteEndTime) && !(message.muteEndTime && $util.isInteger(message.muteEndTime.low) && $util.isInteger(message.muteEndTime.high))) return "muteEndTime: integer|Long expected"; - if (message.wallpaper != null && message.hasOwnProperty("wallpaper")) { - var error = $root.proto.WallpaperSettings.verify(message.wallpaper); - if (error) - return "wallpaper." + error; } - if (message.mediaVisibility != null && message.hasOwnProperty("mediaVisibility")) + if (message.wallpaper != null && message.hasOwnProperty("wallpaper")) { + properties._wallpaper = 1; + { + var error = $root.proto.WallpaperSettings.verify(message.wallpaper); + if (error) + return "wallpaper." + error; + } + } + if (message.mediaVisibility != null && message.hasOwnProperty("mediaVisibility")) { + properties._mediaVisibility = 1; switch (message.mediaVisibility) { default: return "mediaVisibility: enum value expected"; @@ -15033,60 +34848,128 @@ $root.proto = (function() { case 2: break; } - if (message.tcTokenSenderTimestamp != null && message.hasOwnProperty("tcTokenSenderTimestamp")) + } + if (message.tcTokenSenderTimestamp != null && message.hasOwnProperty("tcTokenSenderTimestamp")) { + properties._tcTokenSenderTimestamp = 1; if (!$util.isInteger(message.tcTokenSenderTimestamp) && !(message.tcTokenSenderTimestamp && $util.isInteger(message.tcTokenSenderTimestamp.low) && $util.isInteger(message.tcTokenSenderTimestamp.high))) return "tcTokenSenderTimestamp: integer|Long expected"; - if (message.suspended != null && message.hasOwnProperty("suspended")) + } + if (message.suspended != null && message.hasOwnProperty("suspended")) { + properties._suspended = 1; if (typeof message.suspended !== "boolean") return "suspended: boolean expected"; - if (message.terminated != null && message.hasOwnProperty("terminated")) + } + if (message.terminated != null && message.hasOwnProperty("terminated")) { + properties._terminated = 1; if (typeof message.terminated !== "boolean") return "terminated: boolean expected"; - if (message.createdAt != null && message.hasOwnProperty("createdAt")) + } + if (message.createdAt != null && message.hasOwnProperty("createdAt")) { + properties._createdAt = 1; if (!$util.isInteger(message.createdAt) && !(message.createdAt && $util.isInteger(message.createdAt.low) && $util.isInteger(message.createdAt.high))) return "createdAt: integer|Long expected"; - if (message.createdBy != null && message.hasOwnProperty("createdBy")) + } + if (message.createdBy != null && message.hasOwnProperty("createdBy")) { + properties._createdBy = 1; if (!$util.isString(message.createdBy)) return "createdBy: string expected"; - if (message.description != null && message.hasOwnProperty("description")) + } + if (message.description != null && message.hasOwnProperty("description")) { + properties._description = 1; if (!$util.isString(message.description)) return "description: string expected"; - if (message.support != null && message.hasOwnProperty("support")) + } + if (message.support != null && message.hasOwnProperty("support")) { + properties._support = 1; if (typeof message.support !== "boolean") return "support: boolean expected"; - if (message.isParentGroup != null && message.hasOwnProperty("isParentGroup")) + } + if (message.isParentGroup != null && message.hasOwnProperty("isParentGroup")) { + properties._isParentGroup = 1; if (typeof message.isParentGroup !== "boolean") return "isParentGroup: boolean expected"; - if (message.parentGroupId != null && message.hasOwnProperty("parentGroupId")) + } + if (message.parentGroupId != null && message.hasOwnProperty("parentGroupId")) { + properties._parentGroupId = 1; if (!$util.isString(message.parentGroupId)) return "parentGroupId: string expected"; - if (message.isDefaultSubgroup != null && message.hasOwnProperty("isDefaultSubgroup")) + } + if (message.isDefaultSubgroup != null && message.hasOwnProperty("isDefaultSubgroup")) { + properties._isDefaultSubgroup = 1; if (typeof message.isDefaultSubgroup !== "boolean") return "isDefaultSubgroup: boolean expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) + } + if (message.displayName != null && message.hasOwnProperty("displayName")) { + properties._displayName = 1; if (!$util.isString(message.displayName)) return "displayName: string expected"; - if (message.pnJid != null && message.hasOwnProperty("pnJid")) + } + if (message.pnJid != null && message.hasOwnProperty("pnJid")) { + properties._pnJid = 1; if (!$util.isString(message.pnJid)) return "pnJid: string expected"; - if (message.shareOwnPn != null && message.hasOwnProperty("shareOwnPn")) + } + if (message.shareOwnPn != null && message.hasOwnProperty("shareOwnPn")) { + properties._shareOwnPn = 1; if (typeof message.shareOwnPn !== "boolean") return "shareOwnPn: boolean expected"; - if (message.pnhDuplicateLidThread != null && message.hasOwnProperty("pnhDuplicateLidThread")) + } + if (message.pnhDuplicateLidThread != null && message.hasOwnProperty("pnhDuplicateLidThread")) { + properties._pnhDuplicateLidThread = 1; if (typeof message.pnhDuplicateLidThread !== "boolean") return "pnhDuplicateLidThread: boolean expected"; - if (message.lidJid != null && message.hasOwnProperty("lidJid")) + } + if (message.lidJid != null && message.hasOwnProperty("lidJid")) { + properties._lidJid = 1; if (!$util.isString(message.lidJid)) return "lidJid: string expected"; - if (message.username != null && message.hasOwnProperty("username")) + } + if (message.username != null && message.hasOwnProperty("username")) { + properties._username = 1; if (!$util.isString(message.username)) return "username: string expected"; - if (message.lidOriginType != null && message.hasOwnProperty("lidOriginType")) + } + if (message.lidOriginType != null && message.hasOwnProperty("lidOriginType")) { + properties._lidOriginType = 1; if (!$util.isString(message.lidOriginType)) return "lidOriginType: string expected"; - if (message.commentsCount != null && message.hasOwnProperty("commentsCount")) + } + if (message.commentsCount != null && message.hasOwnProperty("commentsCount")) { + properties._commentsCount = 1; if (!$util.isInteger(message.commentsCount)) return "commentsCount: integer expected"; + } + if (message.locked != null && message.hasOwnProperty("locked")) { + properties._locked = 1; + if (typeof message.locked !== "boolean") + return "locked: boolean expected"; + } + if (message.systemMessageToInsert != null && message.hasOwnProperty("systemMessageToInsert")) { + properties._systemMessageToInsert = 1; + switch (message.systemMessageToInsert) { + default: + return "systemMessageToInsert: enum value expected"; + case 1: + case 2: + case 3: + break; + } + } + if (message.capiCreatedGroup != null && message.hasOwnProperty("capiCreatedGroup")) { + properties._capiCreatedGroup = 1; + if (typeof message.capiCreatedGroup !== "boolean") + return "capiCreatedGroup: boolean expected"; + } + if (message.accountLid != null && message.hasOwnProperty("accountLid")) { + properties._accountLid = 1; + if (!$util.isString(message.accountLid)) + return "accountLid: string expected"; + } + if (message.limitSharing != null && message.hasOwnProperty("limitSharing")) { + properties._limitSharing = 1; + if (typeof message.limitSharing !== "boolean") + return "limitSharing: boolean expected"; + } return null; }; @@ -15145,6 +35028,12 @@ $root.proto = (function() { else if (typeof object.ephemeralSettingTimestamp === "object") message.ephemeralSettingTimestamp = new $util.LongBits(object.ephemeralSettingTimestamp.low >>> 0, object.ephemeralSettingTimestamp.high >>> 0).toNumber(); switch (object.endOfHistoryTransferType) { + default: + if (typeof object.endOfHistoryTransferType === "number") { + message.endOfHistoryTransferType = object.endOfHistoryTransferType; + break; + } + break; case "COMPLETE_BUT_MORE_MESSAGES_REMAIN_ON_PRIMARY": case 0: message.endOfHistoryTransferType = 0; @@ -15197,7 +35086,7 @@ $root.proto = (function() { if (object.tcToken != null) if (typeof object.tcToken === "string") $util.base64.decode(object.tcToken, message.tcToken = $util.newBuffer($util.base64.length(object.tcToken)), 0); - else if (object.tcToken.length) + else if (object.tcToken.length >= 0) message.tcToken = object.tcToken; if (object.tcTokenTimestamp != null) if ($util.Long) @@ -15211,7 +35100,7 @@ $root.proto = (function() { if (object.contactPrimaryIdentityKey != null) if (typeof object.contactPrimaryIdentityKey === "string") $util.base64.decode(object.contactPrimaryIdentityKey, message.contactPrimaryIdentityKey = $util.newBuffer($util.base64.length(object.contactPrimaryIdentityKey)), 0); - else if (object.contactPrimaryIdentityKey.length) + else if (object.contactPrimaryIdentityKey.length >= 0) message.contactPrimaryIdentityKey = object.contactPrimaryIdentityKey; if (object.pinned != null) message.pinned = object.pinned >>> 0; @@ -15230,6 +35119,12 @@ $root.proto = (function() { message.wallpaper = $root.proto.WallpaperSettings.fromObject(object.wallpaper); } switch (object.mediaVisibility) { + default: + if (typeof object.mediaVisibility === "number") { + message.mediaVisibility = object.mediaVisibility; + break; + } + break; case "DEFAULT": case 0: message.mediaVisibility = 0; @@ -15293,6 +35188,34 @@ $root.proto = (function() { message.lidOriginType = String(object.lidOriginType); if (object.commentsCount != null) message.commentsCount = object.commentsCount >>> 0; + if (object.locked != null) + message.locked = Boolean(object.locked); + switch (object.systemMessageToInsert) { + default: + if (typeof object.systemMessageToInsert === "number") { + message.systemMessageToInsert = object.systemMessageToInsert; + break; + } + break; + case "E2EE_MSG": + case 1: + message.systemMessageToInsert = 1; + break; + case "NE2EE_SELF": + case 2: + message.systemMessageToInsert = 2; + break; + case "NE2EE_OTHER": + case 3: + message.systemMessageToInsert = 3; + break; + } + if (object.capiCreatedGroup != null) + message.capiCreatedGroup = Boolean(object.capiCreatedGroup); + if (object.accountLid != null) + message.accountLid = String(object.accountLid); + if (object.limitSharing != null) + message.limitSharing = Boolean(object.limitSharing); return message; }; @@ -15313,91 +35236,8 @@ $root.proto = (function() { object.messages = []; object.participant = []; } - if (options.defaults) { + if (options.defaults) object.id = ""; - object.newJid = ""; - object.oldJid = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.lastMsgTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.lastMsgTimestamp = options.longs === String ? "0" : 0; - object.unreadCount = 0; - object.readOnly = false; - object.endOfHistoryTransfer = false; - object.ephemeralExpiration = 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.ephemeralSettingTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.ephemeralSettingTimestamp = options.longs === String ? "0" : 0; - object.endOfHistoryTransferType = options.enums === String ? "COMPLETE_BUT_MORE_MESSAGES_REMAIN_ON_PRIMARY" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.conversationTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.conversationTimestamp = options.longs === String ? "0" : 0; - object.name = ""; - object.pHash = ""; - object.notSpam = false; - object.archived = false; - object.disappearingMode = null; - object.unreadMentionCount = 0; - object.markedAsUnread = false; - if (options.bytes === String) - object.tcToken = ""; - else { - object.tcToken = []; - if (options.bytes !== Array) - object.tcToken = $util.newBuffer(object.tcToken); - } - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.tcTokenTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.tcTokenTimestamp = options.longs === String ? "0" : 0; - if (options.bytes === String) - object.contactPrimaryIdentityKey = ""; - else { - object.contactPrimaryIdentityKey = []; - if (options.bytes !== Array) - object.contactPrimaryIdentityKey = $util.newBuffer(object.contactPrimaryIdentityKey); - } - object.pinned = 0; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.muteEndTime = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.muteEndTime = options.longs === String ? "0" : 0; - object.wallpaper = null; - object.mediaVisibility = options.enums === String ? "DEFAULT" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.tcTokenSenderTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.tcTokenSenderTimestamp = options.longs === String ? "0" : 0; - object.suspended = false; - object.terminated = false; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.createdAt = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.createdAt = options.longs === String ? "0" : 0; - object.createdBy = ""; - object.description = ""; - object.support = false; - object.isParentGroup = false; - object.isDefaultSubgroup = false; - object.parentGroupId = ""; - object.displayName = ""; - object.pnJid = ""; - object.shareOwnPn = false; - object.pnhDuplicateLidThread = false; - object.lidJid = ""; - object.username = ""; - object.lidOriginType = ""; - object.commentsCount = 0; - } if (message.id != null && message.hasOwnProperty("id")) object.id = message.id; if (message.messages && message.messages.length) { @@ -15405,116 +35245,267 @@ $root.proto = (function() { for (var j = 0; j < message.messages.length; ++j) object.messages[j] = $root.proto.HistorySyncMsg.toObject(message.messages[j], options); } - if (message.newJid != null && message.hasOwnProperty("newJid")) + if (message.newJid != null && message.hasOwnProperty("newJid")) { object.newJid = message.newJid; - if (message.oldJid != null && message.hasOwnProperty("oldJid")) + if (options.oneofs) + object._newJid = "newJid"; + } + if (message.oldJid != null && message.hasOwnProperty("oldJid")) { object.oldJid = message.oldJid; - if (message.lastMsgTimestamp != null && message.hasOwnProperty("lastMsgTimestamp")) + if (options.oneofs) + object._oldJid = "oldJid"; + } + if (message.lastMsgTimestamp != null && message.hasOwnProperty("lastMsgTimestamp")) { if (typeof message.lastMsgTimestamp === "number") object.lastMsgTimestamp = options.longs === String ? String(message.lastMsgTimestamp) : message.lastMsgTimestamp; else object.lastMsgTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.lastMsgTimestamp) : options.longs === Number ? new $util.LongBits(message.lastMsgTimestamp.low >>> 0, message.lastMsgTimestamp.high >>> 0).toNumber(true) : message.lastMsgTimestamp; - if (message.unreadCount != null && message.hasOwnProperty("unreadCount")) + if (options.oneofs) + object._lastMsgTimestamp = "lastMsgTimestamp"; + } + if (message.unreadCount != null && message.hasOwnProperty("unreadCount")) { object.unreadCount = message.unreadCount; - if (message.readOnly != null && message.hasOwnProperty("readOnly")) + if (options.oneofs) + object._unreadCount = "unreadCount"; + } + if (message.readOnly != null && message.hasOwnProperty("readOnly")) { object.readOnly = message.readOnly; - if (message.endOfHistoryTransfer != null && message.hasOwnProperty("endOfHistoryTransfer")) + if (options.oneofs) + object._readOnly = "readOnly"; + } + if (message.endOfHistoryTransfer != null && message.hasOwnProperty("endOfHistoryTransfer")) { object.endOfHistoryTransfer = message.endOfHistoryTransfer; - if (message.ephemeralExpiration != null && message.hasOwnProperty("ephemeralExpiration")) + if (options.oneofs) + object._endOfHistoryTransfer = "endOfHistoryTransfer"; + } + if (message.ephemeralExpiration != null && message.hasOwnProperty("ephemeralExpiration")) { object.ephemeralExpiration = message.ephemeralExpiration; - if (message.ephemeralSettingTimestamp != null && message.hasOwnProperty("ephemeralSettingTimestamp")) + if (options.oneofs) + object._ephemeralExpiration = "ephemeralExpiration"; + } + if (message.ephemeralSettingTimestamp != null && message.hasOwnProperty("ephemeralSettingTimestamp")) { if (typeof message.ephemeralSettingTimestamp === "number") object.ephemeralSettingTimestamp = options.longs === String ? String(message.ephemeralSettingTimestamp) : message.ephemeralSettingTimestamp; else object.ephemeralSettingTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.ephemeralSettingTimestamp) : options.longs === Number ? new $util.LongBits(message.ephemeralSettingTimestamp.low >>> 0, message.ephemeralSettingTimestamp.high >>> 0).toNumber() : message.ephemeralSettingTimestamp; - if (message.endOfHistoryTransferType != null && message.hasOwnProperty("endOfHistoryTransferType")) - object.endOfHistoryTransferType = options.enums === String ? $root.proto.Conversation.EndOfHistoryTransferType[message.endOfHistoryTransferType] : message.endOfHistoryTransferType; - if (message.conversationTimestamp != null && message.hasOwnProperty("conversationTimestamp")) + if (options.oneofs) + object._ephemeralSettingTimestamp = "ephemeralSettingTimestamp"; + } + if (message.endOfHistoryTransferType != null && message.hasOwnProperty("endOfHistoryTransferType")) { + object.endOfHistoryTransferType = options.enums === String ? $root.proto.Conversation.EndOfHistoryTransferType[message.endOfHistoryTransferType] === undefined ? message.endOfHistoryTransferType : $root.proto.Conversation.EndOfHistoryTransferType[message.endOfHistoryTransferType] : message.endOfHistoryTransferType; + if (options.oneofs) + object._endOfHistoryTransferType = "endOfHistoryTransferType"; + } + if (message.conversationTimestamp != null && message.hasOwnProperty("conversationTimestamp")) { if (typeof message.conversationTimestamp === "number") object.conversationTimestamp = options.longs === String ? String(message.conversationTimestamp) : message.conversationTimestamp; else object.conversationTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.conversationTimestamp) : options.longs === Number ? new $util.LongBits(message.conversationTimestamp.low >>> 0, message.conversationTimestamp.high >>> 0).toNumber(true) : message.conversationTimestamp; - if (message.name != null && message.hasOwnProperty("name")) + if (options.oneofs) + object._conversationTimestamp = "conversationTimestamp"; + } + if (message.name != null && message.hasOwnProperty("name")) { object.name = message.name; - if (message.pHash != null && message.hasOwnProperty("pHash")) + if (options.oneofs) + object._name = "name"; + } + if (message.pHash != null && message.hasOwnProperty("pHash")) { object.pHash = message.pHash; - if (message.notSpam != null && message.hasOwnProperty("notSpam")) + if (options.oneofs) + object._pHash = "pHash"; + } + if (message.notSpam != null && message.hasOwnProperty("notSpam")) { object.notSpam = message.notSpam; - if (message.archived != null && message.hasOwnProperty("archived")) + if (options.oneofs) + object._notSpam = "notSpam"; + } + if (message.archived != null && message.hasOwnProperty("archived")) { object.archived = message.archived; - if (message.disappearingMode != null && message.hasOwnProperty("disappearingMode")) + if (options.oneofs) + object._archived = "archived"; + } + if (message.disappearingMode != null && message.hasOwnProperty("disappearingMode")) { object.disappearingMode = $root.proto.DisappearingMode.toObject(message.disappearingMode, options); - if (message.unreadMentionCount != null && message.hasOwnProperty("unreadMentionCount")) + if (options.oneofs) + object._disappearingMode = "disappearingMode"; + } + if (message.unreadMentionCount != null && message.hasOwnProperty("unreadMentionCount")) { object.unreadMentionCount = message.unreadMentionCount; - if (message.markedAsUnread != null && message.hasOwnProperty("markedAsUnread")) + if (options.oneofs) + object._unreadMentionCount = "unreadMentionCount"; + } + if (message.markedAsUnread != null && message.hasOwnProperty("markedAsUnread")) { object.markedAsUnread = message.markedAsUnread; + if (options.oneofs) + object._markedAsUnread = "markedAsUnread"; + } if (message.participant && message.participant.length) { object.participant = []; for (var j = 0; j < message.participant.length; ++j) object.participant[j] = $root.proto.GroupParticipant.toObject(message.participant[j], options); } - if (message.tcToken != null && message.hasOwnProperty("tcToken")) + if (message.tcToken != null && message.hasOwnProperty("tcToken")) { object.tcToken = options.bytes === String ? $util.base64.encode(message.tcToken, 0, message.tcToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.tcToken) : message.tcToken; - if (message.tcTokenTimestamp != null && message.hasOwnProperty("tcTokenTimestamp")) + if (options.oneofs) + object._tcToken = "tcToken"; + } + if (message.tcTokenTimestamp != null && message.hasOwnProperty("tcTokenTimestamp")) { if (typeof message.tcTokenTimestamp === "number") object.tcTokenTimestamp = options.longs === String ? String(message.tcTokenTimestamp) : message.tcTokenTimestamp; else object.tcTokenTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.tcTokenTimestamp) : options.longs === Number ? new $util.LongBits(message.tcTokenTimestamp.low >>> 0, message.tcTokenTimestamp.high >>> 0).toNumber(true) : message.tcTokenTimestamp; - if (message.contactPrimaryIdentityKey != null && message.hasOwnProperty("contactPrimaryIdentityKey")) + if (options.oneofs) + object._tcTokenTimestamp = "tcTokenTimestamp"; + } + if (message.contactPrimaryIdentityKey != null && message.hasOwnProperty("contactPrimaryIdentityKey")) { object.contactPrimaryIdentityKey = options.bytes === String ? $util.base64.encode(message.contactPrimaryIdentityKey, 0, message.contactPrimaryIdentityKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.contactPrimaryIdentityKey) : message.contactPrimaryIdentityKey; - if (message.pinned != null && message.hasOwnProperty("pinned")) + if (options.oneofs) + object._contactPrimaryIdentityKey = "contactPrimaryIdentityKey"; + } + if (message.pinned != null && message.hasOwnProperty("pinned")) { object.pinned = message.pinned; - if (message.muteEndTime != null && message.hasOwnProperty("muteEndTime")) + if (options.oneofs) + object._pinned = "pinned"; + } + if (message.muteEndTime != null && message.hasOwnProperty("muteEndTime")) { if (typeof message.muteEndTime === "number") object.muteEndTime = options.longs === String ? String(message.muteEndTime) : message.muteEndTime; else object.muteEndTime = options.longs === String ? $util.Long.prototype.toString.call(message.muteEndTime) : options.longs === Number ? new $util.LongBits(message.muteEndTime.low >>> 0, message.muteEndTime.high >>> 0).toNumber(true) : message.muteEndTime; - if (message.wallpaper != null && message.hasOwnProperty("wallpaper")) + if (options.oneofs) + object._muteEndTime = "muteEndTime"; + } + if (message.wallpaper != null && message.hasOwnProperty("wallpaper")) { object.wallpaper = $root.proto.WallpaperSettings.toObject(message.wallpaper, options); - if (message.mediaVisibility != null && message.hasOwnProperty("mediaVisibility")) - object.mediaVisibility = options.enums === String ? $root.proto.MediaVisibility[message.mediaVisibility] : message.mediaVisibility; - if (message.tcTokenSenderTimestamp != null && message.hasOwnProperty("tcTokenSenderTimestamp")) + if (options.oneofs) + object._wallpaper = "wallpaper"; + } + if (message.mediaVisibility != null && message.hasOwnProperty("mediaVisibility")) { + object.mediaVisibility = options.enums === String ? $root.proto.MediaVisibility[message.mediaVisibility] === undefined ? message.mediaVisibility : $root.proto.MediaVisibility[message.mediaVisibility] : message.mediaVisibility; + if (options.oneofs) + object._mediaVisibility = "mediaVisibility"; + } + if (message.tcTokenSenderTimestamp != null && message.hasOwnProperty("tcTokenSenderTimestamp")) { if (typeof message.tcTokenSenderTimestamp === "number") object.tcTokenSenderTimestamp = options.longs === String ? String(message.tcTokenSenderTimestamp) : message.tcTokenSenderTimestamp; else object.tcTokenSenderTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.tcTokenSenderTimestamp) : options.longs === Number ? new $util.LongBits(message.tcTokenSenderTimestamp.low >>> 0, message.tcTokenSenderTimestamp.high >>> 0).toNumber(true) : message.tcTokenSenderTimestamp; - if (message.suspended != null && message.hasOwnProperty("suspended")) + if (options.oneofs) + object._tcTokenSenderTimestamp = "tcTokenSenderTimestamp"; + } + if (message.suspended != null && message.hasOwnProperty("suspended")) { object.suspended = message.suspended; - if (message.terminated != null && message.hasOwnProperty("terminated")) + if (options.oneofs) + object._suspended = "suspended"; + } + if (message.terminated != null && message.hasOwnProperty("terminated")) { object.terminated = message.terminated; - if (message.createdAt != null && message.hasOwnProperty("createdAt")) + if (options.oneofs) + object._terminated = "terminated"; + } + if (message.createdAt != null && message.hasOwnProperty("createdAt")) { if (typeof message.createdAt === "number") object.createdAt = options.longs === String ? String(message.createdAt) : message.createdAt; else object.createdAt = options.longs === String ? $util.Long.prototype.toString.call(message.createdAt) : options.longs === Number ? new $util.LongBits(message.createdAt.low >>> 0, message.createdAt.high >>> 0).toNumber(true) : message.createdAt; - if (message.createdBy != null && message.hasOwnProperty("createdBy")) + if (options.oneofs) + object._createdAt = "createdAt"; + } + if (message.createdBy != null && message.hasOwnProperty("createdBy")) { object.createdBy = message.createdBy; - if (message.description != null && message.hasOwnProperty("description")) + if (options.oneofs) + object._createdBy = "createdBy"; + } + if (message.description != null && message.hasOwnProperty("description")) { object.description = message.description; - if (message.support != null && message.hasOwnProperty("support")) + if (options.oneofs) + object._description = "description"; + } + if (message.support != null && message.hasOwnProperty("support")) { object.support = message.support; - if (message.isParentGroup != null && message.hasOwnProperty("isParentGroup")) + if (options.oneofs) + object._support = "support"; + } + if (message.isParentGroup != null && message.hasOwnProperty("isParentGroup")) { object.isParentGroup = message.isParentGroup; - if (message.isDefaultSubgroup != null && message.hasOwnProperty("isDefaultSubgroup")) + if (options.oneofs) + object._isParentGroup = "isParentGroup"; + } + if (message.isDefaultSubgroup != null && message.hasOwnProperty("isDefaultSubgroup")) { object.isDefaultSubgroup = message.isDefaultSubgroup; - if (message.parentGroupId != null && message.hasOwnProperty("parentGroupId")) + if (options.oneofs) + object._isDefaultSubgroup = "isDefaultSubgroup"; + } + if (message.parentGroupId != null && message.hasOwnProperty("parentGroupId")) { object.parentGroupId = message.parentGroupId; - if (message.displayName != null && message.hasOwnProperty("displayName")) + if (options.oneofs) + object._parentGroupId = "parentGroupId"; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) { object.displayName = message.displayName; - if (message.pnJid != null && message.hasOwnProperty("pnJid")) + if (options.oneofs) + object._displayName = "displayName"; + } + if (message.pnJid != null && message.hasOwnProperty("pnJid")) { object.pnJid = message.pnJid; - if (message.shareOwnPn != null && message.hasOwnProperty("shareOwnPn")) + if (options.oneofs) + object._pnJid = "pnJid"; + } + if (message.shareOwnPn != null && message.hasOwnProperty("shareOwnPn")) { object.shareOwnPn = message.shareOwnPn; - if (message.pnhDuplicateLidThread != null && message.hasOwnProperty("pnhDuplicateLidThread")) + if (options.oneofs) + object._shareOwnPn = "shareOwnPn"; + } + if (message.pnhDuplicateLidThread != null && message.hasOwnProperty("pnhDuplicateLidThread")) { object.pnhDuplicateLidThread = message.pnhDuplicateLidThread; - if (message.lidJid != null && message.hasOwnProperty("lidJid")) + if (options.oneofs) + object._pnhDuplicateLidThread = "pnhDuplicateLidThread"; + } + if (message.lidJid != null && message.hasOwnProperty("lidJid")) { object.lidJid = message.lidJid; - if (message.username != null && message.hasOwnProperty("username")) + if (options.oneofs) + object._lidJid = "lidJid"; + } + if (message.username != null && message.hasOwnProperty("username")) { object.username = message.username; - if (message.lidOriginType != null && message.hasOwnProperty("lidOriginType")) + if (options.oneofs) + object._username = "username"; + } + if (message.lidOriginType != null && message.hasOwnProperty("lidOriginType")) { object.lidOriginType = message.lidOriginType; - if (message.commentsCount != null && message.hasOwnProperty("commentsCount")) + if (options.oneofs) + object._lidOriginType = "lidOriginType"; + } + if (message.commentsCount != null && message.hasOwnProperty("commentsCount")) { object.commentsCount = message.commentsCount; + if (options.oneofs) + object._commentsCount = "commentsCount"; + } + if (message.locked != null && message.hasOwnProperty("locked")) { + object.locked = message.locked; + if (options.oneofs) + object._locked = "locked"; + } + if (message.systemMessageToInsert != null && message.hasOwnProperty("systemMessageToInsert")) { + object.systemMessageToInsert = options.enums === String ? $root.proto.PrivacySystemMessage[message.systemMessageToInsert] === undefined ? message.systemMessageToInsert : $root.proto.PrivacySystemMessage[message.systemMessageToInsert] : message.systemMessageToInsert; + if (options.oneofs) + object._systemMessageToInsert = "systemMessageToInsert"; + } + if (message.capiCreatedGroup != null && message.hasOwnProperty("capiCreatedGroup")) { + object.capiCreatedGroup = message.capiCreatedGroup; + if (options.oneofs) + object._capiCreatedGroup = "capiCreatedGroup"; + } + if (message.accountLid != null && message.hasOwnProperty("accountLid")) { + object.accountLid = message.accountLid; + if (options.oneofs) + object._accountLid = "accountLid"; + } + if (message.limitSharing != null && message.hasOwnProperty("limitSharing")) { + object.limitSharing = message.limitSharing; + if (options.oneofs) + object._limitSharing = "limitSharing"; + } return object; }; @@ -15529,6 +35520,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Conversation + * @function getTypeUrl + * @memberof proto.Conversation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Conversation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Conversation"; + }; + /** * EndOfHistoryTransferType enum. * @name proto.Conversation.EndOfHistoryTransferType @@ -15548,6 +35554,527 @@ $root.proto = (function() { return Conversation; })(); + proto.DeviceCapabilities = (function() { + + /** + * Properties of a DeviceCapabilities. + * @memberof proto + * @interface IDeviceCapabilities + * @property {proto.DeviceCapabilities.ChatLockSupportLevel|null} [chatLockSupportLevel] DeviceCapabilities chatLockSupportLevel + * @property {proto.DeviceCapabilities.ILIDMigration|null} [lidMigration] DeviceCapabilities lidMigration + */ + + /** + * Constructs a new DeviceCapabilities. + * @memberof proto + * @classdesc Represents a DeviceCapabilities. + * @implements IDeviceCapabilities + * @constructor + * @param {proto.IDeviceCapabilities=} [properties] Properties to set + */ + function DeviceCapabilities(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeviceCapabilities chatLockSupportLevel. + * @member {proto.DeviceCapabilities.ChatLockSupportLevel|null|undefined} chatLockSupportLevel + * @memberof proto.DeviceCapabilities + * @instance + */ + DeviceCapabilities.prototype.chatLockSupportLevel = null; + + /** + * DeviceCapabilities lidMigration. + * @member {proto.DeviceCapabilities.ILIDMigration|null|undefined} lidMigration + * @memberof proto.DeviceCapabilities + * @instance + */ + DeviceCapabilities.prototype.lidMigration = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DeviceCapabilities.prototype, "_chatLockSupportLevel", { + get: $util.oneOfGetter($oneOfFields = ["chatLockSupportLevel"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DeviceCapabilities.prototype, "_lidMigration", { + get: $util.oneOfGetter($oneOfFields = ["lidMigration"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DeviceCapabilities instance using the specified properties. + * @function create + * @memberof proto.DeviceCapabilities + * @static + * @param {proto.IDeviceCapabilities=} [properties] Properties to set + * @returns {proto.DeviceCapabilities} DeviceCapabilities instance + */ + DeviceCapabilities.create = function create(properties) { + return new DeviceCapabilities(properties); + }; + + /** + * Encodes the specified DeviceCapabilities message. Does not implicitly {@link proto.DeviceCapabilities.verify|verify} messages. + * @function encode + * @memberof proto.DeviceCapabilities + * @static + * @param {proto.IDeviceCapabilities} message DeviceCapabilities message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeviceCapabilities.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.chatLockSupportLevel != null && Object.hasOwnProperty.call(message, "chatLockSupportLevel")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.chatLockSupportLevel); + if (message.lidMigration != null && Object.hasOwnProperty.call(message, "lidMigration")) + $root.proto.DeviceCapabilities.LIDMigration.encode(message.lidMigration, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DeviceCapabilities message, length delimited. Does not implicitly {@link proto.DeviceCapabilities.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.DeviceCapabilities + * @static + * @param {proto.IDeviceCapabilities} message DeviceCapabilities message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeviceCapabilities.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeviceCapabilities message from the specified reader or buffer. + * @function decode + * @memberof proto.DeviceCapabilities + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.DeviceCapabilities} DeviceCapabilities + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeviceCapabilities.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.DeviceCapabilities(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.chatLockSupportLevel = reader.int32(); + break; + } + case 2: { + message.lidMigration = $root.proto.DeviceCapabilities.LIDMigration.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeviceCapabilities message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.DeviceCapabilities + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.DeviceCapabilities} DeviceCapabilities + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeviceCapabilities.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeviceCapabilities message. + * @function verify + * @memberof proto.DeviceCapabilities + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeviceCapabilities.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.chatLockSupportLevel != null && message.hasOwnProperty("chatLockSupportLevel")) { + properties._chatLockSupportLevel = 1; + switch (message.chatLockSupportLevel) { + default: + return "chatLockSupportLevel: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.lidMigration != null && message.hasOwnProperty("lidMigration")) { + properties._lidMigration = 1; + { + var error = $root.proto.DeviceCapabilities.LIDMigration.verify(message.lidMigration); + if (error) + return "lidMigration." + error; + } + } + return null; + }; + + /** + * Creates a DeviceCapabilities message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.DeviceCapabilities + * @static + * @param {Object.} object Plain object + * @returns {proto.DeviceCapabilities} DeviceCapabilities + */ + DeviceCapabilities.fromObject = function fromObject(object) { + if (object instanceof $root.proto.DeviceCapabilities) + return object; + var message = new $root.proto.DeviceCapabilities(); + switch (object.chatLockSupportLevel) { + default: + if (typeof object.chatLockSupportLevel === "number") { + message.chatLockSupportLevel = object.chatLockSupportLevel; + break; + } + break; + case "NONE": + case 0: + message.chatLockSupportLevel = 0; + break; + case "MINIMAL": + case 1: + message.chatLockSupportLevel = 1; + break; + case "FULL": + case 2: + message.chatLockSupportLevel = 2; + break; + } + if (object.lidMigration != null) { + if (typeof object.lidMigration !== "object") + throw TypeError(".proto.DeviceCapabilities.lidMigration: object expected"); + message.lidMigration = $root.proto.DeviceCapabilities.LIDMigration.fromObject(object.lidMigration); + } + return message; + }; + + /** + * Creates a plain object from a DeviceCapabilities message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.DeviceCapabilities + * @static + * @param {proto.DeviceCapabilities} message DeviceCapabilities + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeviceCapabilities.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.chatLockSupportLevel != null && message.hasOwnProperty("chatLockSupportLevel")) { + object.chatLockSupportLevel = options.enums === String ? $root.proto.DeviceCapabilities.ChatLockSupportLevel[message.chatLockSupportLevel] === undefined ? message.chatLockSupportLevel : $root.proto.DeviceCapabilities.ChatLockSupportLevel[message.chatLockSupportLevel] : message.chatLockSupportLevel; + if (options.oneofs) + object._chatLockSupportLevel = "chatLockSupportLevel"; + } + if (message.lidMigration != null && message.hasOwnProperty("lidMigration")) { + object.lidMigration = $root.proto.DeviceCapabilities.LIDMigration.toObject(message.lidMigration, options); + if (options.oneofs) + object._lidMigration = "lidMigration"; + } + return object; + }; + + /** + * Converts this DeviceCapabilities to JSON. + * @function toJSON + * @memberof proto.DeviceCapabilities + * @instance + * @returns {Object.} JSON object + */ + DeviceCapabilities.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeviceCapabilities + * @function getTypeUrl + * @memberof proto.DeviceCapabilities + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeviceCapabilities.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.DeviceCapabilities"; + }; + + /** + * ChatLockSupportLevel enum. + * @name proto.DeviceCapabilities.ChatLockSupportLevel + * @enum {number} + * @property {number} NONE=0 NONE value + * @property {number} MINIMAL=1 MINIMAL value + * @property {number} FULL=2 FULL value + */ + DeviceCapabilities.ChatLockSupportLevel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NONE"] = 0; + values[valuesById[1] = "MINIMAL"] = 1; + values[valuesById[2] = "FULL"] = 2; + return values; + })(); + + DeviceCapabilities.LIDMigration = (function() { + + /** + * Properties of a LIDMigration. + * @memberof proto.DeviceCapabilities + * @interface ILIDMigration + * @property {number|Long|null} [chatDbMigrationTimestamp] LIDMigration chatDbMigrationTimestamp + */ + + /** + * Constructs a new LIDMigration. + * @memberof proto.DeviceCapabilities + * @classdesc Represents a LIDMigration. + * @implements ILIDMigration + * @constructor + * @param {proto.DeviceCapabilities.ILIDMigration=} [properties] Properties to set + */ + function LIDMigration(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LIDMigration chatDbMigrationTimestamp. + * @member {number|Long|null|undefined} chatDbMigrationTimestamp + * @memberof proto.DeviceCapabilities.LIDMigration + * @instance + */ + LIDMigration.prototype.chatDbMigrationTimestamp = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(LIDMigration.prototype, "_chatDbMigrationTimestamp", { + get: $util.oneOfGetter($oneOfFields = ["chatDbMigrationTimestamp"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new LIDMigration instance using the specified properties. + * @function create + * @memberof proto.DeviceCapabilities.LIDMigration + * @static + * @param {proto.DeviceCapabilities.ILIDMigration=} [properties] Properties to set + * @returns {proto.DeviceCapabilities.LIDMigration} LIDMigration instance + */ + LIDMigration.create = function create(properties) { + return new LIDMigration(properties); + }; + + /** + * Encodes the specified LIDMigration message. Does not implicitly {@link proto.DeviceCapabilities.LIDMigration.verify|verify} messages. + * @function encode + * @memberof proto.DeviceCapabilities.LIDMigration + * @static + * @param {proto.DeviceCapabilities.ILIDMigration} message LIDMigration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LIDMigration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.chatDbMigrationTimestamp != null && Object.hasOwnProperty.call(message, "chatDbMigrationTimestamp")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.chatDbMigrationTimestamp); + return writer; + }; + + /** + * Encodes the specified LIDMigration message, length delimited. Does not implicitly {@link proto.DeviceCapabilities.LIDMigration.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.DeviceCapabilities.LIDMigration + * @static + * @param {proto.DeviceCapabilities.ILIDMigration} message LIDMigration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LIDMigration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LIDMigration message from the specified reader or buffer. + * @function decode + * @memberof proto.DeviceCapabilities.LIDMigration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.DeviceCapabilities.LIDMigration} LIDMigration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LIDMigration.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.DeviceCapabilities.LIDMigration(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.chatDbMigrationTimestamp = reader.uint64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LIDMigration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.DeviceCapabilities.LIDMigration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.DeviceCapabilities.LIDMigration} LIDMigration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LIDMigration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LIDMigration message. + * @function verify + * @memberof proto.DeviceCapabilities.LIDMigration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LIDMigration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.chatDbMigrationTimestamp != null && message.hasOwnProperty("chatDbMigrationTimestamp")) { + properties._chatDbMigrationTimestamp = 1; + if (!$util.isInteger(message.chatDbMigrationTimestamp) && !(message.chatDbMigrationTimestamp && $util.isInteger(message.chatDbMigrationTimestamp.low) && $util.isInteger(message.chatDbMigrationTimestamp.high))) + return "chatDbMigrationTimestamp: integer|Long expected"; + } + return null; + }; + + /** + * Creates a LIDMigration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.DeviceCapabilities.LIDMigration + * @static + * @param {Object.} object Plain object + * @returns {proto.DeviceCapabilities.LIDMigration} LIDMigration + */ + LIDMigration.fromObject = function fromObject(object) { + if (object instanceof $root.proto.DeviceCapabilities.LIDMigration) + return object; + var message = new $root.proto.DeviceCapabilities.LIDMigration(); + if (object.chatDbMigrationTimestamp != null) + if ($util.Long) + (message.chatDbMigrationTimestamp = $util.Long.fromValue(object.chatDbMigrationTimestamp)).unsigned = true; + else if (typeof object.chatDbMigrationTimestamp === "string") + message.chatDbMigrationTimestamp = parseInt(object.chatDbMigrationTimestamp, 10); + else if (typeof object.chatDbMigrationTimestamp === "number") + message.chatDbMigrationTimestamp = object.chatDbMigrationTimestamp; + else if (typeof object.chatDbMigrationTimestamp === "object") + message.chatDbMigrationTimestamp = new $util.LongBits(object.chatDbMigrationTimestamp.low >>> 0, object.chatDbMigrationTimestamp.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a LIDMigration message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.DeviceCapabilities.LIDMigration + * @static + * @param {proto.DeviceCapabilities.LIDMigration} message LIDMigration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LIDMigration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.chatDbMigrationTimestamp != null && message.hasOwnProperty("chatDbMigrationTimestamp")) { + if (typeof message.chatDbMigrationTimestamp === "number") + object.chatDbMigrationTimestamp = options.longs === String ? String(message.chatDbMigrationTimestamp) : message.chatDbMigrationTimestamp; + else + object.chatDbMigrationTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.chatDbMigrationTimestamp) : options.longs === Number ? new $util.LongBits(message.chatDbMigrationTimestamp.low >>> 0, message.chatDbMigrationTimestamp.high >>> 0).toNumber(true) : message.chatDbMigrationTimestamp; + if (options.oneofs) + object._chatDbMigrationTimestamp = "chatDbMigrationTimestamp"; + } + return object; + }; + + /** + * Converts this LIDMigration to JSON. + * @function toJSON + * @memberof proto.DeviceCapabilities.LIDMigration + * @instance + * @returns {Object.} JSON object + */ + LIDMigration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LIDMigration + * @function getTypeUrl + * @memberof proto.DeviceCapabilities.LIDMigration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LIDMigration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.DeviceCapabilities.LIDMigration"; + }; + + return LIDMigration; + })(); + + return DeviceCapabilities; + })(); + proto.DeviceConsistencyCodeMessage = (function() { /** @@ -15575,19 +36102,34 @@ $root.proto = (function() { /** * DeviceConsistencyCodeMessage generation. - * @member {number} generation + * @member {number|null|undefined} generation * @memberof proto.DeviceConsistencyCodeMessage * @instance */ - DeviceConsistencyCodeMessage.prototype.generation = 0; + DeviceConsistencyCodeMessage.prototype.generation = null; /** * DeviceConsistencyCodeMessage signature. - * @member {Uint8Array} signature + * @member {Uint8Array|null|undefined} signature * @memberof proto.DeviceConsistencyCodeMessage * @instance */ - DeviceConsistencyCodeMessage.prototype.signature = $util.newBuffer([]); + DeviceConsistencyCodeMessage.prototype.signature = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DeviceConsistencyCodeMessage.prototype, "_generation", { + get: $util.oneOfGetter($oneOfFields = ["generation"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DeviceConsistencyCodeMessage.prototype, "_signature", { + get: $util.oneOfGetter($oneOfFields = ["signature"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new DeviceConsistencyCodeMessage instance using the specified properties. @@ -15651,12 +36193,14 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.generation = reader.uint32(); - break; - case 2: - message.signature = reader.bytes(); - break; + case 1: { + message.generation = reader.uint32(); + break; + } + case 2: { + message.signature = reader.bytes(); + break; + } default: reader.skipType(tag & 7); break; @@ -15692,12 +36236,17 @@ $root.proto = (function() { DeviceConsistencyCodeMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.generation != null && message.hasOwnProperty("generation")) + var properties = {}; + if (message.generation != null && message.hasOwnProperty("generation")) { + properties._generation = 1; if (!$util.isInteger(message.generation)) return "generation: integer expected"; - if (message.signature != null && message.hasOwnProperty("signature")) + } + if (message.signature != null && message.hasOwnProperty("signature")) { + properties._signature = 1; if (!(message.signature && typeof message.signature.length === "number" || $util.isString(message.signature))) return "signature: buffer expected"; + } return null; }; @@ -15718,7 +36267,7 @@ $root.proto = (function() { 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) + else if (object.signature.length >= 0) message.signature = object.signature; return message; }; @@ -15736,20 +36285,16 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.generation = 0; - if (options.bytes === String) - object.signature = ""; - else { - object.signature = []; - if (options.bytes !== Array) - object.signature = $util.newBuffer(object.signature); - } - } - if (message.generation != null && message.hasOwnProperty("generation")) + if (message.generation != null && message.hasOwnProperty("generation")) { object.generation = message.generation; - if (message.signature != null && message.hasOwnProperty("signature")) + if (options.oneofs) + object._generation = "generation"; + } + if (message.signature != null && message.hasOwnProperty("signature")) { object.signature = options.bytes === String ? $util.base64.encode(message.signature, 0, message.signature.length) : options.bytes === Array ? Array.prototype.slice.call(message.signature) : message.signature; + if (options.oneofs) + object._signature = "signature"; + } return object; }; @@ -15764,6 +36309,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DeviceConsistencyCodeMessage + * @function getTypeUrl + * @memberof proto.DeviceConsistencyCodeMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeviceConsistencyCodeMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.DeviceConsistencyCodeMessage"; + }; + return DeviceConsistencyCodeMessage; })(); @@ -15802,19 +36362,19 @@ $root.proto = (function() { /** * DeviceListMetadata senderKeyHash. - * @member {Uint8Array} senderKeyHash + * @member {Uint8Array|null|undefined} senderKeyHash * @memberof proto.DeviceListMetadata * @instance */ - DeviceListMetadata.prototype.senderKeyHash = $util.newBuffer([]); + DeviceListMetadata.prototype.senderKeyHash = null; /** * DeviceListMetadata senderTimestamp. - * @member {number|Long} senderTimestamp + * @member {number|Long|null|undefined} senderTimestamp * @memberof proto.DeviceListMetadata * @instance */ - DeviceListMetadata.prototype.senderTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + DeviceListMetadata.prototype.senderTimestamp = null; /** * DeviceListMetadata senderKeyIndexes. @@ -15826,35 +36386,35 @@ $root.proto = (function() { /** * DeviceListMetadata senderAccountType. - * @member {proto.ADVEncryptionType} senderAccountType + * @member {proto.ADVEncryptionType|null|undefined} senderAccountType * @memberof proto.DeviceListMetadata * @instance */ - DeviceListMetadata.prototype.senderAccountType = 0; + DeviceListMetadata.prototype.senderAccountType = null; /** * DeviceListMetadata receiverAccountType. - * @member {proto.ADVEncryptionType} receiverAccountType + * @member {proto.ADVEncryptionType|null|undefined} receiverAccountType * @memberof proto.DeviceListMetadata * @instance */ - DeviceListMetadata.prototype.receiverAccountType = 0; + DeviceListMetadata.prototype.receiverAccountType = null; /** * DeviceListMetadata recipientKeyHash. - * @member {Uint8Array} recipientKeyHash + * @member {Uint8Array|null|undefined} recipientKeyHash * @memberof proto.DeviceListMetadata * @instance */ - DeviceListMetadata.prototype.recipientKeyHash = $util.newBuffer([]); + DeviceListMetadata.prototype.recipientKeyHash = null; /** * DeviceListMetadata recipientTimestamp. - * @member {number|Long} recipientTimestamp + * @member {number|Long|null|undefined} recipientTimestamp * @memberof proto.DeviceListMetadata * @instance */ - DeviceListMetadata.prototype.recipientTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + DeviceListMetadata.prototype.recipientTimestamp = null; /** * DeviceListMetadata recipientKeyIndexes. @@ -15864,6 +36424,45 @@ $root.proto = (function() { */ DeviceListMetadata.prototype.recipientKeyIndexes = $util.emptyArray; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DeviceListMetadata.prototype, "_senderKeyHash", { + get: $util.oneOfGetter($oneOfFields = ["senderKeyHash"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DeviceListMetadata.prototype, "_senderTimestamp", { + get: $util.oneOfGetter($oneOfFields = ["senderTimestamp"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DeviceListMetadata.prototype, "_senderAccountType", { + get: $util.oneOfGetter($oneOfFields = ["senderAccountType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DeviceListMetadata.prototype, "_receiverAccountType", { + get: $util.oneOfGetter($oneOfFields = ["receiverAccountType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DeviceListMetadata.prototype, "_recipientKeyHash", { + get: $util.oneOfGetter($oneOfFields = ["recipientKeyHash"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DeviceListMetadata.prototype, "_recipientTimestamp", { + get: $util.oneOfGetter($oneOfFields = ["recipientTimestamp"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new DeviceListMetadata instance using the specified properties. * @function create @@ -15946,44 +36545,52 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.senderKeyHash = reader.bytes(); - break; - case 2: - message.senderTimestamp = reader.uint64(); - break; - case 3: - if (!(message.senderKeyIndexes && message.senderKeyIndexes.length)) - message.senderKeyIndexes = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) + case 1: { + message.senderKeyHash = reader.bytes(); + break; + } + case 2: { + message.senderTimestamp = reader.uint64(); + break; + } + case 3: { + if (!(message.senderKeyIndexes && message.senderKeyIndexes.length)) + message.senderKeyIndexes = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.senderKeyIndexes.push(reader.uint32()); + } else message.senderKeyIndexes.push(reader.uint32()); - } else - message.senderKeyIndexes.push(reader.uint32()); - break; - case 4: - message.senderAccountType = reader.int32(); - break; - case 5: - message.receiverAccountType = reader.int32(); - break; - case 8: - message.recipientKeyHash = reader.bytes(); - break; - case 9: - message.recipientTimestamp = reader.uint64(); - break; - case 10: - if (!(message.recipientKeyIndexes && message.recipientKeyIndexes.length)) - message.recipientKeyIndexes = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) + break; + } + case 4: { + message.senderAccountType = reader.int32(); + break; + } + case 5: { + message.receiverAccountType = reader.int32(); + break; + } + case 8: { + message.recipientKeyHash = reader.bytes(); + break; + } + case 9: { + message.recipientTimestamp = reader.uint64(); + break; + } + case 10: { + if (!(message.recipientKeyIndexes && message.recipientKeyIndexes.length)) + message.recipientKeyIndexes = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.recipientKeyIndexes.push(reader.uint32()); + } else message.recipientKeyIndexes.push(reader.uint32()); - } else - message.recipientKeyIndexes.push(reader.uint32()); - break; + break; + } default: reader.skipType(tag & 7); break; @@ -16019,12 +36626,17 @@ $root.proto = (function() { DeviceListMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.senderKeyHash != null && message.hasOwnProperty("senderKeyHash")) + var properties = {}; + if (message.senderKeyHash != null && message.hasOwnProperty("senderKeyHash")) { + properties._senderKeyHash = 1; if (!(message.senderKeyHash && typeof message.senderKeyHash.length === "number" || $util.isString(message.senderKeyHash))) return "senderKeyHash: buffer expected"; - if (message.senderTimestamp != null && message.hasOwnProperty("senderTimestamp")) + } + if (message.senderTimestamp != null && message.hasOwnProperty("senderTimestamp")) { + properties._senderTimestamp = 1; if (!$util.isInteger(message.senderTimestamp) && !(message.senderTimestamp && $util.isInteger(message.senderTimestamp.low) && $util.isInteger(message.senderTimestamp.high))) return "senderTimestamp: integer|Long expected"; + } if (message.senderKeyIndexes != null && message.hasOwnProperty("senderKeyIndexes")) { if (!Array.isArray(message.senderKeyIndexes)) return "senderKeyIndexes: array expected"; @@ -16032,7 +36644,8 @@ $root.proto = (function() { if (!$util.isInteger(message.senderKeyIndexes[i])) return "senderKeyIndexes: integer[] expected"; } - if (message.senderAccountType != null && message.hasOwnProperty("senderAccountType")) + if (message.senderAccountType != null && message.hasOwnProperty("senderAccountType")) { + properties._senderAccountType = 1; switch (message.senderAccountType) { default: return "senderAccountType: enum value expected"; @@ -16040,7 +36653,9 @@ $root.proto = (function() { case 1: break; } - if (message.receiverAccountType != null && message.hasOwnProperty("receiverAccountType")) + } + if (message.receiverAccountType != null && message.hasOwnProperty("receiverAccountType")) { + properties._receiverAccountType = 1; switch (message.receiverAccountType) { default: return "receiverAccountType: enum value expected"; @@ -16048,12 +36663,17 @@ $root.proto = (function() { case 1: break; } - if (message.recipientKeyHash != null && message.hasOwnProperty("recipientKeyHash")) + } + if (message.recipientKeyHash != null && message.hasOwnProperty("recipientKeyHash")) { + properties._recipientKeyHash = 1; if (!(message.recipientKeyHash && typeof message.recipientKeyHash.length === "number" || $util.isString(message.recipientKeyHash))) return "recipientKeyHash: buffer expected"; - if (message.recipientTimestamp != null && message.hasOwnProperty("recipientTimestamp")) + } + if (message.recipientTimestamp != null && message.hasOwnProperty("recipientTimestamp")) { + properties._recipientTimestamp = 1; if (!$util.isInteger(message.recipientTimestamp) && !(message.recipientTimestamp && $util.isInteger(message.recipientTimestamp.low) && $util.isInteger(message.recipientTimestamp.high))) return "recipientTimestamp: integer|Long expected"; + } if (message.recipientKeyIndexes != null && message.hasOwnProperty("recipientKeyIndexes")) { if (!Array.isArray(message.recipientKeyIndexes)) return "recipientKeyIndexes: array expected"; @@ -16079,7 +36699,7 @@ $root.proto = (function() { if (object.senderKeyHash != null) if (typeof object.senderKeyHash === "string") $util.base64.decode(object.senderKeyHash, message.senderKeyHash = $util.newBuffer($util.base64.length(object.senderKeyHash)), 0); - else if (object.senderKeyHash.length) + else if (object.senderKeyHash.length >= 0) message.senderKeyHash = object.senderKeyHash; if (object.senderTimestamp != null) if ($util.Long) @@ -16098,6 +36718,12 @@ $root.proto = (function() { message.senderKeyIndexes[i] = object.senderKeyIndexes[i] >>> 0; } switch (object.senderAccountType) { + default: + if (typeof object.senderAccountType === "number") { + message.senderAccountType = object.senderAccountType; + break; + } + break; case "E2EE": case 0: message.senderAccountType = 0; @@ -16108,6 +36734,12 @@ $root.proto = (function() { break; } switch (object.receiverAccountType) { + default: + if (typeof object.receiverAccountType === "number") { + message.receiverAccountType = object.receiverAccountType; + break; + } + break; case "E2EE": case 0: message.receiverAccountType = 0; @@ -16120,7 +36752,7 @@ $root.proto = (function() { if (object.recipientKeyHash != null) if (typeof object.recipientKeyHash === "string") $util.base64.decode(object.recipientKeyHash, message.recipientKeyHash = $util.newBuffer($util.base64.length(object.recipientKeyHash)), 0); - else if (object.recipientKeyHash.length) + else if (object.recipientKeyHash.length >= 0) message.recipientKeyHash = object.recipientKeyHash; if (object.recipientTimestamp != null) if ($util.Long) @@ -16158,57 +36790,47 @@ $root.proto = (function() { object.senderKeyIndexes = []; object.recipientKeyIndexes = []; } - if (options.defaults) { - if (options.bytes === String) - object.senderKeyHash = ""; - else { - object.senderKeyHash = []; - if (options.bytes !== Array) - object.senderKeyHash = $util.newBuffer(object.senderKeyHash); - } - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.senderTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.senderTimestamp = options.longs === String ? "0" : 0; - object.senderAccountType = options.enums === String ? "E2EE" : 0; - object.receiverAccountType = options.enums === String ? "E2EE" : 0; - if (options.bytes === String) - object.recipientKeyHash = ""; - else { - object.recipientKeyHash = []; - if (options.bytes !== Array) - object.recipientKeyHash = $util.newBuffer(object.recipientKeyHash); - } - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.recipientTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.recipientTimestamp = options.longs === String ? "0" : 0; - } - if (message.senderKeyHash != null && message.hasOwnProperty("senderKeyHash")) + if (message.senderKeyHash != null && message.hasOwnProperty("senderKeyHash")) { object.senderKeyHash = options.bytes === String ? $util.base64.encode(message.senderKeyHash, 0, message.senderKeyHash.length) : options.bytes === Array ? Array.prototype.slice.call(message.senderKeyHash) : message.senderKeyHash; - if (message.senderTimestamp != null && message.hasOwnProperty("senderTimestamp")) + if (options.oneofs) + object._senderKeyHash = "senderKeyHash"; + } + if (message.senderTimestamp != null && message.hasOwnProperty("senderTimestamp")) { if (typeof message.senderTimestamp === "number") object.senderTimestamp = options.longs === String ? String(message.senderTimestamp) : message.senderTimestamp; else object.senderTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.senderTimestamp) : options.longs === Number ? new $util.LongBits(message.senderTimestamp.low >>> 0, message.senderTimestamp.high >>> 0).toNumber(true) : message.senderTimestamp; + if (options.oneofs) + object._senderTimestamp = "senderTimestamp"; + } if (message.senderKeyIndexes && message.senderKeyIndexes.length) { object.senderKeyIndexes = []; for (var j = 0; j < message.senderKeyIndexes.length; ++j) object.senderKeyIndexes[j] = message.senderKeyIndexes[j]; } - if (message.senderAccountType != null && message.hasOwnProperty("senderAccountType")) - object.senderAccountType = options.enums === String ? $root.proto.ADVEncryptionType[message.senderAccountType] : message.senderAccountType; - if (message.receiverAccountType != null && message.hasOwnProperty("receiverAccountType")) - object.receiverAccountType = options.enums === String ? $root.proto.ADVEncryptionType[message.receiverAccountType] : message.receiverAccountType; - if (message.recipientKeyHash != null && message.hasOwnProperty("recipientKeyHash")) + if (message.senderAccountType != null && message.hasOwnProperty("senderAccountType")) { + object.senderAccountType = options.enums === String ? $root.proto.ADVEncryptionType[message.senderAccountType] === undefined ? message.senderAccountType : $root.proto.ADVEncryptionType[message.senderAccountType] : message.senderAccountType; + if (options.oneofs) + object._senderAccountType = "senderAccountType"; + } + if (message.receiverAccountType != null && message.hasOwnProperty("receiverAccountType")) { + object.receiverAccountType = options.enums === String ? $root.proto.ADVEncryptionType[message.receiverAccountType] === undefined ? message.receiverAccountType : $root.proto.ADVEncryptionType[message.receiverAccountType] : message.receiverAccountType; + if (options.oneofs) + object._receiverAccountType = "receiverAccountType"; + } + if (message.recipientKeyHash != null && message.hasOwnProperty("recipientKeyHash")) { object.recipientKeyHash = options.bytes === String ? $util.base64.encode(message.recipientKeyHash, 0, message.recipientKeyHash.length) : options.bytes === Array ? Array.prototype.slice.call(message.recipientKeyHash) : message.recipientKeyHash; - if (message.recipientTimestamp != null && message.hasOwnProperty("recipientTimestamp")) + if (options.oneofs) + object._recipientKeyHash = "recipientKeyHash"; + } + if (message.recipientTimestamp != null && message.hasOwnProperty("recipientTimestamp")) { if (typeof message.recipientTimestamp === "number") object.recipientTimestamp = options.longs === String ? String(message.recipientTimestamp) : message.recipientTimestamp; else object.recipientTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.recipientTimestamp) : options.longs === Number ? new $util.LongBits(message.recipientTimestamp.low >>> 0, message.recipientTimestamp.high >>> 0).toNumber(true) : message.recipientTimestamp; + if (options.oneofs) + object._recipientTimestamp = "recipientTimestamp"; + } if (message.recipientKeyIndexes && message.recipientKeyIndexes.length) { object.recipientKeyIndexes = []; for (var j = 0; j < message.recipientKeyIndexes.length; ++j) @@ -16228,6 +36850,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DeviceListMetadata + * @function getTypeUrl + * @memberof proto.DeviceListMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeviceListMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.DeviceListMetadata"; + }; + return DeviceListMetadata; })(); @@ -16261,11 +36898,11 @@ $root.proto = (function() { /** * DeviceProps os. - * @member {string} os + * @member {string|null|undefined} os * @memberof proto.DeviceProps * @instance */ - DeviceProps.prototype.os = ""; + DeviceProps.prototype.os = null; /** * DeviceProps version. @@ -16277,19 +36914,19 @@ $root.proto = (function() { /** * DeviceProps platformType. - * @member {proto.DeviceProps.PlatformType} platformType + * @member {proto.DeviceProps.PlatformType|null|undefined} platformType * @memberof proto.DeviceProps * @instance */ - DeviceProps.prototype.platformType = 0; + DeviceProps.prototype.platformType = null; /** * DeviceProps requireFullSync. - * @member {boolean} requireFullSync + * @member {boolean|null|undefined} requireFullSync * @memberof proto.DeviceProps * @instance */ - DeviceProps.prototype.requireFullSync = false; + DeviceProps.prototype.requireFullSync = null; /** * DeviceProps historySyncConfig. @@ -16299,6 +36936,39 @@ $root.proto = (function() { */ DeviceProps.prototype.historySyncConfig = null; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DeviceProps.prototype, "_os", { + get: $util.oneOfGetter($oneOfFields = ["os"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DeviceProps.prototype, "_version", { + get: $util.oneOfGetter($oneOfFields = ["version"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DeviceProps.prototype, "_platformType", { + get: $util.oneOfGetter($oneOfFields = ["platformType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DeviceProps.prototype, "_requireFullSync", { + get: $util.oneOfGetter($oneOfFields = ["requireFullSync"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DeviceProps.prototype, "_historySyncConfig", { + get: $util.oneOfGetter($oneOfFields = ["historySyncConfig"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new DeviceProps instance using the specified properties. * @function create @@ -16367,21 +37037,26 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.os = reader.string(); - break; - case 2: - message.version = $root.proto.DeviceProps.AppVersion.decode(reader, reader.uint32()); - break; - case 3: - message.platformType = reader.int32(); - break; - case 4: - message.requireFullSync = reader.bool(); - break; - case 5: - message.historySyncConfig = $root.proto.DeviceProps.HistorySyncConfig.decode(reader, reader.uint32()); - break; + case 1: { + message.os = reader.string(); + break; + } + case 2: { + message.version = $root.proto.DeviceProps.AppVersion.decode(reader, reader.uint32()); + break; + } + case 3: { + message.platformType = reader.int32(); + break; + } + case 4: { + message.requireFullSync = reader.bool(); + break; + } + case 5: { + message.historySyncConfig = $root.proto.DeviceProps.HistorySyncConfig.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -16417,15 +37092,22 @@ $root.proto = (function() { DeviceProps.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.os != null && message.hasOwnProperty("os")) + var properties = {}; + if (message.os != null && message.hasOwnProperty("os")) { + properties._os = 1; if (!$util.isString(message.os)) return "os: string expected"; - if (message.version != null && message.hasOwnProperty("version")) { - var error = $root.proto.DeviceProps.AppVersion.verify(message.version); - if (error) - return "version." + error; } - if (message.platformType != null && message.hasOwnProperty("platformType")) + if (message.version != null && message.hasOwnProperty("version")) { + properties._version = 1; + { + var error = $root.proto.DeviceProps.AppVersion.verify(message.version); + if (error) + return "version." + error; + } + } + if (message.platformType != null && message.hasOwnProperty("platformType")) { + properties._platformType = 1; switch (message.platformType) { default: return "platformType: enum value expected"; @@ -16452,15 +37134,23 @@ $root.proto = (function() { case 20: case 21: case 22: + case 23: + case 24: break; } - if (message.requireFullSync != null && message.hasOwnProperty("requireFullSync")) + } + if (message.requireFullSync != null && message.hasOwnProperty("requireFullSync")) { + properties._requireFullSync = 1; if (typeof message.requireFullSync !== "boolean") return "requireFullSync: boolean expected"; + } if (message.historySyncConfig != null && message.hasOwnProperty("historySyncConfig")) { - var error = $root.proto.DeviceProps.HistorySyncConfig.verify(message.historySyncConfig); - if (error) - return "historySyncConfig." + error; + properties._historySyncConfig = 1; + { + var error = $root.proto.DeviceProps.HistorySyncConfig.verify(message.historySyncConfig); + if (error) + return "historySyncConfig." + error; + } } return null; }; @@ -16485,6 +37175,12 @@ $root.proto = (function() { message.version = $root.proto.DeviceProps.AppVersion.fromObject(object.version); } switch (object.platformType) { + default: + if (typeof object.platformType === "number") { + message.platformType = object.platformType; + break; + } + break; case "UNKNOWN": case 0: message.platformType = 0; @@ -16577,6 +37273,14 @@ $root.proto = (function() { case 22: message.platformType = 22; break; + case "CLOUD_API": + case 23: + message.platformType = 23; + break; + case "SMARTGLASSES": + case 24: + message.platformType = 24; + break; } if (object.requireFullSync != null) message.requireFullSync = Boolean(object.requireFullSync); @@ -16601,23 +37305,31 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.os = ""; - object.version = null; - object.platformType = options.enums === String ? "UNKNOWN" : 0; - object.requireFullSync = false; - object.historySyncConfig = null; - } - if (message.os != null && message.hasOwnProperty("os")) + if (message.os != null && message.hasOwnProperty("os")) { object.os = message.os; - if (message.version != null && message.hasOwnProperty("version")) + if (options.oneofs) + object._os = "os"; + } + if (message.version != null && message.hasOwnProperty("version")) { 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.PlatformType[message.platformType] : message.platformType; - if (message.requireFullSync != null && message.hasOwnProperty("requireFullSync")) + if (options.oneofs) + object._version = "version"; + } + if (message.platformType != null && message.hasOwnProperty("platformType")) { + object.platformType = options.enums === String ? $root.proto.DeviceProps.PlatformType[message.platformType] === undefined ? message.platformType : $root.proto.DeviceProps.PlatformType[message.platformType] : message.platformType; + if (options.oneofs) + object._platformType = "platformType"; + } + if (message.requireFullSync != null && message.hasOwnProperty("requireFullSync")) { object.requireFullSync = message.requireFullSync; - if (message.historySyncConfig != null && message.hasOwnProperty("historySyncConfig")) + if (options.oneofs) + object._requireFullSync = "requireFullSync"; + } + if (message.historySyncConfig != null && message.hasOwnProperty("historySyncConfig")) { object.historySyncConfig = $root.proto.DeviceProps.HistorySyncConfig.toObject(message.historySyncConfig, options); + if (options.oneofs) + object._historySyncConfig = "historySyncConfig"; + } return object; }; @@ -16632,6 +37344,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DeviceProps + * @function getTypeUrl + * @memberof proto.DeviceProps + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeviceProps.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.DeviceProps"; + }; + DeviceProps.AppVersion = (function() { /** @@ -16662,43 +37389,76 @@ $root.proto = (function() { /** * AppVersion primary. - * @member {number} primary + * @member {number|null|undefined} primary * @memberof proto.DeviceProps.AppVersion * @instance */ - AppVersion.prototype.primary = 0; + AppVersion.prototype.primary = null; /** * AppVersion secondary. - * @member {number} secondary + * @member {number|null|undefined} secondary * @memberof proto.DeviceProps.AppVersion * @instance */ - AppVersion.prototype.secondary = 0; + AppVersion.prototype.secondary = null; /** * AppVersion tertiary. - * @member {number} tertiary + * @member {number|null|undefined} tertiary * @memberof proto.DeviceProps.AppVersion * @instance */ - AppVersion.prototype.tertiary = 0; + AppVersion.prototype.tertiary = null; /** * AppVersion quaternary. - * @member {number} quaternary + * @member {number|null|undefined} quaternary * @memberof proto.DeviceProps.AppVersion * @instance */ - AppVersion.prototype.quaternary = 0; + AppVersion.prototype.quaternary = null; /** * AppVersion quinary. - * @member {number} quinary + * @member {number|null|undefined} quinary * @memberof proto.DeviceProps.AppVersion * @instance */ - AppVersion.prototype.quinary = 0; + AppVersion.prototype.quinary = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AppVersion.prototype, "_primary", { + get: $util.oneOfGetter($oneOfFields = ["primary"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AppVersion.prototype, "_secondary", { + get: $util.oneOfGetter($oneOfFields = ["secondary"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AppVersion.prototype, "_tertiary", { + get: $util.oneOfGetter($oneOfFields = ["tertiary"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AppVersion.prototype, "_quaternary", { + get: $util.oneOfGetter($oneOfFields = ["quaternary"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AppVersion.prototype, "_quinary", { + get: $util.oneOfGetter($oneOfFields = ["quinary"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new AppVersion instance using the specified properties. @@ -16768,21 +37528,26 @@ $root.proto = (function() { 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; + 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; @@ -16818,21 +37583,32 @@ $root.proto = (function() { AppVersion.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.primary != null && message.hasOwnProperty("primary")) + var properties = {}; + if (message.primary != null && message.hasOwnProperty("primary")) { + properties._primary = 1; if (!$util.isInteger(message.primary)) return "primary: integer expected"; - if (message.secondary != null && message.hasOwnProperty("secondary")) + } + if (message.secondary != null && message.hasOwnProperty("secondary")) { + properties._secondary = 1; if (!$util.isInteger(message.secondary)) return "secondary: integer expected"; - if (message.tertiary != null && message.hasOwnProperty("tertiary")) + } + if (message.tertiary != null && message.hasOwnProperty("tertiary")) { + properties._tertiary = 1; if (!$util.isInteger(message.tertiary)) return "tertiary: integer expected"; - if (message.quaternary != null && message.hasOwnProperty("quaternary")) + } + if (message.quaternary != null && message.hasOwnProperty("quaternary")) { + properties._quaternary = 1; if (!$util.isInteger(message.quaternary)) return "quaternary: integer expected"; - if (message.quinary != null && message.hasOwnProperty("quinary")) + } + if (message.quinary != null && message.hasOwnProperty("quinary")) { + properties._quinary = 1; if (!$util.isInteger(message.quinary)) return "quinary: integer expected"; + } return null; }; @@ -16874,23 +37650,31 @@ $root.proto = (function() { 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")) + if (message.primary != null && message.hasOwnProperty("primary")) { object.primary = message.primary; - if (message.secondary != null && message.hasOwnProperty("secondary")) + if (options.oneofs) + object._primary = "primary"; + } + if (message.secondary != null && message.hasOwnProperty("secondary")) { object.secondary = message.secondary; - if (message.tertiary != null && message.hasOwnProperty("tertiary")) + if (options.oneofs) + object._secondary = "secondary"; + } + if (message.tertiary != null && message.hasOwnProperty("tertiary")) { object.tertiary = message.tertiary; - if (message.quaternary != null && message.hasOwnProperty("quaternary")) + if (options.oneofs) + object._tertiary = "tertiary"; + } + if (message.quaternary != null && message.hasOwnProperty("quaternary")) { object.quaternary = message.quaternary; - if (message.quinary != null && message.hasOwnProperty("quinary")) + if (options.oneofs) + object._quaternary = "quaternary"; + } + if (message.quinary != null && message.hasOwnProperty("quinary")) { object.quinary = message.quinary; + if (options.oneofs) + object._quinary = "quinary"; + } return object; }; @@ -16905,6 +37689,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for AppVersion + * @function getTypeUrl + * @memberof proto.DeviceProps.AppVersion + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AppVersion.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.DeviceProps.AppVersion"; + }; + return AppVersion; })(); @@ -16922,6 +37721,12 @@ $root.proto = (function() { * @property {boolean|null} [supportCallLogHistory] HistorySyncConfig supportCallLogHistory * @property {boolean|null} [supportBotUserAgentChatHistory] HistorySyncConfig supportBotUserAgentChatHistory * @property {boolean|null} [supportCagReactionsAndPolls] HistorySyncConfig supportCagReactionsAndPolls + * @property {boolean|null} [supportBizHostedMsg] HistorySyncConfig supportBizHostedMsg + * @property {boolean|null} [supportRecentSyncChunkMessageCountTuning] HistorySyncConfig supportRecentSyncChunkMessageCountTuning + * @property {boolean|null} [supportHostedGroupMsg] HistorySyncConfig supportHostedGroupMsg + * @property {boolean|null} [supportFbidBotChatHistory] HistorySyncConfig supportFbidBotChatHistory + * @property {boolean|null} [supportAddOnHistorySyncMigration] HistorySyncConfig supportAddOnHistorySyncMigration + * @property {boolean|null} [supportMessageAssociation] HistorySyncConfig supportMessageAssociation */ /** @@ -16941,67 +37746,202 @@ $root.proto = (function() { /** * HistorySyncConfig fullSyncDaysLimit. - * @member {number} fullSyncDaysLimit + * @member {number|null|undefined} fullSyncDaysLimit * @memberof proto.DeviceProps.HistorySyncConfig * @instance */ - HistorySyncConfig.prototype.fullSyncDaysLimit = 0; + HistorySyncConfig.prototype.fullSyncDaysLimit = null; /** * HistorySyncConfig fullSyncSizeMbLimit. - * @member {number} fullSyncSizeMbLimit + * @member {number|null|undefined} fullSyncSizeMbLimit * @memberof proto.DeviceProps.HistorySyncConfig * @instance */ - HistorySyncConfig.prototype.fullSyncSizeMbLimit = 0; + HistorySyncConfig.prototype.fullSyncSizeMbLimit = null; /** * HistorySyncConfig storageQuotaMb. - * @member {number} storageQuotaMb + * @member {number|null|undefined} storageQuotaMb * @memberof proto.DeviceProps.HistorySyncConfig * @instance */ - HistorySyncConfig.prototype.storageQuotaMb = 0; + HistorySyncConfig.prototype.storageQuotaMb = null; /** * HistorySyncConfig inlineInitialPayloadInE2EeMsg. - * @member {boolean} inlineInitialPayloadInE2EeMsg + * @member {boolean|null|undefined} inlineInitialPayloadInE2EeMsg * @memberof proto.DeviceProps.HistorySyncConfig * @instance */ - HistorySyncConfig.prototype.inlineInitialPayloadInE2EeMsg = false; + HistorySyncConfig.prototype.inlineInitialPayloadInE2EeMsg = null; /** * HistorySyncConfig recentSyncDaysLimit. - * @member {number} recentSyncDaysLimit + * @member {number|null|undefined} recentSyncDaysLimit * @memberof proto.DeviceProps.HistorySyncConfig * @instance */ - HistorySyncConfig.prototype.recentSyncDaysLimit = 0; + HistorySyncConfig.prototype.recentSyncDaysLimit = null; /** * HistorySyncConfig supportCallLogHistory. - * @member {boolean} supportCallLogHistory + * @member {boolean|null|undefined} supportCallLogHistory * @memberof proto.DeviceProps.HistorySyncConfig * @instance */ - HistorySyncConfig.prototype.supportCallLogHistory = false; + HistorySyncConfig.prototype.supportCallLogHistory = null; /** * HistorySyncConfig supportBotUserAgentChatHistory. - * @member {boolean} supportBotUserAgentChatHistory + * @member {boolean|null|undefined} supportBotUserAgentChatHistory * @memberof proto.DeviceProps.HistorySyncConfig * @instance */ - HistorySyncConfig.prototype.supportBotUserAgentChatHistory = false; + HistorySyncConfig.prototype.supportBotUserAgentChatHistory = null; /** * HistorySyncConfig supportCagReactionsAndPolls. - * @member {boolean} supportCagReactionsAndPolls + * @member {boolean|null|undefined} supportCagReactionsAndPolls * @memberof proto.DeviceProps.HistorySyncConfig * @instance */ - HistorySyncConfig.prototype.supportCagReactionsAndPolls = false; + HistorySyncConfig.prototype.supportCagReactionsAndPolls = null; + + /** + * HistorySyncConfig supportBizHostedMsg. + * @member {boolean|null|undefined} supportBizHostedMsg + * @memberof proto.DeviceProps.HistorySyncConfig + * @instance + */ + HistorySyncConfig.prototype.supportBizHostedMsg = null; + + /** + * HistorySyncConfig supportRecentSyncChunkMessageCountTuning. + * @member {boolean|null|undefined} supportRecentSyncChunkMessageCountTuning + * @memberof proto.DeviceProps.HistorySyncConfig + * @instance + */ + HistorySyncConfig.prototype.supportRecentSyncChunkMessageCountTuning = null; + + /** + * HistorySyncConfig supportHostedGroupMsg. + * @member {boolean|null|undefined} supportHostedGroupMsg + * @memberof proto.DeviceProps.HistorySyncConfig + * @instance + */ + HistorySyncConfig.prototype.supportHostedGroupMsg = null; + + /** + * HistorySyncConfig supportFbidBotChatHistory. + * @member {boolean|null|undefined} supportFbidBotChatHistory + * @memberof proto.DeviceProps.HistorySyncConfig + * @instance + */ + HistorySyncConfig.prototype.supportFbidBotChatHistory = null; + + /** + * HistorySyncConfig supportAddOnHistorySyncMigration. + * @member {boolean|null|undefined} supportAddOnHistorySyncMigration + * @memberof proto.DeviceProps.HistorySyncConfig + * @instance + */ + HistorySyncConfig.prototype.supportAddOnHistorySyncMigration = null; + + /** + * HistorySyncConfig supportMessageAssociation. + * @member {boolean|null|undefined} supportMessageAssociation + * @memberof proto.DeviceProps.HistorySyncConfig + * @instance + */ + HistorySyncConfig.prototype.supportMessageAssociation = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HistorySyncConfig.prototype, "_fullSyncDaysLimit", { + get: $util.oneOfGetter($oneOfFields = ["fullSyncDaysLimit"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HistorySyncConfig.prototype, "_fullSyncSizeMbLimit", { + get: $util.oneOfGetter($oneOfFields = ["fullSyncSizeMbLimit"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HistorySyncConfig.prototype, "_storageQuotaMb", { + get: $util.oneOfGetter($oneOfFields = ["storageQuotaMb"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HistorySyncConfig.prototype, "_inlineInitialPayloadInE2EeMsg", { + get: $util.oneOfGetter($oneOfFields = ["inlineInitialPayloadInE2EeMsg"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HistorySyncConfig.prototype, "_recentSyncDaysLimit", { + get: $util.oneOfGetter($oneOfFields = ["recentSyncDaysLimit"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HistorySyncConfig.prototype, "_supportCallLogHistory", { + get: $util.oneOfGetter($oneOfFields = ["supportCallLogHistory"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HistorySyncConfig.prototype, "_supportBotUserAgentChatHistory", { + get: $util.oneOfGetter($oneOfFields = ["supportBotUserAgentChatHistory"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HistorySyncConfig.prototype, "_supportCagReactionsAndPolls", { + get: $util.oneOfGetter($oneOfFields = ["supportCagReactionsAndPolls"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HistorySyncConfig.prototype, "_supportBizHostedMsg", { + get: $util.oneOfGetter($oneOfFields = ["supportBizHostedMsg"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HistorySyncConfig.prototype, "_supportRecentSyncChunkMessageCountTuning", { + get: $util.oneOfGetter($oneOfFields = ["supportRecentSyncChunkMessageCountTuning"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HistorySyncConfig.prototype, "_supportHostedGroupMsg", { + get: $util.oneOfGetter($oneOfFields = ["supportHostedGroupMsg"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HistorySyncConfig.prototype, "_supportFbidBotChatHistory", { + get: $util.oneOfGetter($oneOfFields = ["supportFbidBotChatHistory"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HistorySyncConfig.prototype, "_supportAddOnHistorySyncMigration", { + get: $util.oneOfGetter($oneOfFields = ["supportAddOnHistorySyncMigration"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HistorySyncConfig.prototype, "_supportMessageAssociation", { + get: $util.oneOfGetter($oneOfFields = ["supportMessageAssociation"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new HistorySyncConfig instance using the specified properties. @@ -17043,6 +37983,18 @@ $root.proto = (function() { writer.uint32(/* id 7, wireType 0 =*/56).bool(message.supportBotUserAgentChatHistory); if (message.supportCagReactionsAndPolls != null && Object.hasOwnProperty.call(message, "supportCagReactionsAndPolls")) writer.uint32(/* id 8, wireType 0 =*/64).bool(message.supportCagReactionsAndPolls); + if (message.supportBizHostedMsg != null && Object.hasOwnProperty.call(message, "supportBizHostedMsg")) + writer.uint32(/* id 9, wireType 0 =*/72).bool(message.supportBizHostedMsg); + if (message.supportRecentSyncChunkMessageCountTuning != null && Object.hasOwnProperty.call(message, "supportRecentSyncChunkMessageCountTuning")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.supportRecentSyncChunkMessageCountTuning); + if (message.supportHostedGroupMsg != null && Object.hasOwnProperty.call(message, "supportHostedGroupMsg")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.supportHostedGroupMsg); + if (message.supportFbidBotChatHistory != null && Object.hasOwnProperty.call(message, "supportFbidBotChatHistory")) + writer.uint32(/* id 12, wireType 0 =*/96).bool(message.supportFbidBotChatHistory); + if (message.supportAddOnHistorySyncMigration != null && Object.hasOwnProperty.call(message, "supportAddOnHistorySyncMigration")) + writer.uint32(/* id 13, wireType 0 =*/104).bool(message.supportAddOnHistorySyncMigration); + if (message.supportMessageAssociation != null && Object.hasOwnProperty.call(message, "supportMessageAssociation")) + writer.uint32(/* id 14, wireType 0 =*/112).bool(message.supportMessageAssociation); return writer; }; @@ -17077,30 +38029,62 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.fullSyncDaysLimit = reader.uint32(); - break; - case 2: - message.fullSyncSizeMbLimit = reader.uint32(); - break; - case 3: - message.storageQuotaMb = reader.uint32(); - break; - case 4: - message.inlineInitialPayloadInE2EeMsg = reader.bool(); - break; - case 5: - message.recentSyncDaysLimit = reader.uint32(); - break; - case 6: - message.supportCallLogHistory = reader.bool(); - break; - case 7: - message.supportBotUserAgentChatHistory = reader.bool(); - break; - case 8: - message.supportCagReactionsAndPolls = reader.bool(); - break; + case 1: { + message.fullSyncDaysLimit = reader.uint32(); + break; + } + case 2: { + message.fullSyncSizeMbLimit = reader.uint32(); + break; + } + case 3: { + message.storageQuotaMb = reader.uint32(); + break; + } + case 4: { + message.inlineInitialPayloadInE2EeMsg = reader.bool(); + break; + } + case 5: { + message.recentSyncDaysLimit = reader.uint32(); + break; + } + case 6: { + message.supportCallLogHistory = reader.bool(); + break; + } + case 7: { + message.supportBotUserAgentChatHistory = reader.bool(); + break; + } + case 8: { + message.supportCagReactionsAndPolls = reader.bool(); + break; + } + case 9: { + message.supportBizHostedMsg = reader.bool(); + break; + } + case 10: { + message.supportRecentSyncChunkMessageCountTuning = reader.bool(); + break; + } + case 11: { + message.supportHostedGroupMsg = reader.bool(); + break; + } + case 12: { + message.supportFbidBotChatHistory = reader.bool(); + break; + } + case 13: { + message.supportAddOnHistorySyncMigration = reader.bool(); + break; + } + case 14: { + message.supportMessageAssociation = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -17136,30 +38120,77 @@ $root.proto = (function() { HistorySyncConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.fullSyncDaysLimit != null && message.hasOwnProperty("fullSyncDaysLimit")) + var properties = {}; + if (message.fullSyncDaysLimit != null && message.hasOwnProperty("fullSyncDaysLimit")) { + properties._fullSyncDaysLimit = 1; if (!$util.isInteger(message.fullSyncDaysLimit)) return "fullSyncDaysLimit: integer expected"; - if (message.fullSyncSizeMbLimit != null && message.hasOwnProperty("fullSyncSizeMbLimit")) + } + if (message.fullSyncSizeMbLimit != null && message.hasOwnProperty("fullSyncSizeMbLimit")) { + properties._fullSyncSizeMbLimit = 1; if (!$util.isInteger(message.fullSyncSizeMbLimit)) return "fullSyncSizeMbLimit: integer expected"; - if (message.storageQuotaMb != null && message.hasOwnProperty("storageQuotaMb")) + } + if (message.storageQuotaMb != null && message.hasOwnProperty("storageQuotaMb")) { + properties._storageQuotaMb = 1; if (!$util.isInteger(message.storageQuotaMb)) return "storageQuotaMb: integer expected"; - if (message.inlineInitialPayloadInE2EeMsg != null && message.hasOwnProperty("inlineInitialPayloadInE2EeMsg")) + } + if (message.inlineInitialPayloadInE2EeMsg != null && message.hasOwnProperty("inlineInitialPayloadInE2EeMsg")) { + properties._inlineInitialPayloadInE2EeMsg = 1; if (typeof message.inlineInitialPayloadInE2EeMsg !== "boolean") return "inlineInitialPayloadInE2EeMsg: boolean expected"; - if (message.recentSyncDaysLimit != null && message.hasOwnProperty("recentSyncDaysLimit")) + } + if (message.recentSyncDaysLimit != null && message.hasOwnProperty("recentSyncDaysLimit")) { + properties._recentSyncDaysLimit = 1; if (!$util.isInteger(message.recentSyncDaysLimit)) return "recentSyncDaysLimit: integer expected"; - if (message.supportCallLogHistory != null && message.hasOwnProperty("supportCallLogHistory")) + } + if (message.supportCallLogHistory != null && message.hasOwnProperty("supportCallLogHistory")) { + properties._supportCallLogHistory = 1; if (typeof message.supportCallLogHistory !== "boolean") return "supportCallLogHistory: boolean expected"; - if (message.supportBotUserAgentChatHistory != null && message.hasOwnProperty("supportBotUserAgentChatHistory")) + } + if (message.supportBotUserAgentChatHistory != null && message.hasOwnProperty("supportBotUserAgentChatHistory")) { + properties._supportBotUserAgentChatHistory = 1; if (typeof message.supportBotUserAgentChatHistory !== "boolean") return "supportBotUserAgentChatHistory: boolean expected"; - if (message.supportCagReactionsAndPolls != null && message.hasOwnProperty("supportCagReactionsAndPolls")) + } + if (message.supportCagReactionsAndPolls != null && message.hasOwnProperty("supportCagReactionsAndPolls")) { + properties._supportCagReactionsAndPolls = 1; if (typeof message.supportCagReactionsAndPolls !== "boolean") return "supportCagReactionsAndPolls: boolean expected"; + } + if (message.supportBizHostedMsg != null && message.hasOwnProperty("supportBizHostedMsg")) { + properties._supportBizHostedMsg = 1; + if (typeof message.supportBizHostedMsg !== "boolean") + return "supportBizHostedMsg: boolean expected"; + } + if (message.supportRecentSyncChunkMessageCountTuning != null && message.hasOwnProperty("supportRecentSyncChunkMessageCountTuning")) { + properties._supportRecentSyncChunkMessageCountTuning = 1; + if (typeof message.supportRecentSyncChunkMessageCountTuning !== "boolean") + return "supportRecentSyncChunkMessageCountTuning: boolean expected"; + } + if (message.supportHostedGroupMsg != null && message.hasOwnProperty("supportHostedGroupMsg")) { + properties._supportHostedGroupMsg = 1; + if (typeof message.supportHostedGroupMsg !== "boolean") + return "supportHostedGroupMsg: boolean expected"; + } + if (message.supportFbidBotChatHistory != null && message.hasOwnProperty("supportFbidBotChatHistory")) { + properties._supportFbidBotChatHistory = 1; + if (typeof message.supportFbidBotChatHistory !== "boolean") + return "supportFbidBotChatHistory: boolean expected"; + } + if (message.supportAddOnHistorySyncMigration != null && message.hasOwnProperty("supportAddOnHistorySyncMigration")) { + properties._supportAddOnHistorySyncMigration = 1; + if (typeof message.supportAddOnHistorySyncMigration !== "boolean") + return "supportAddOnHistorySyncMigration: boolean expected"; + } + if (message.supportMessageAssociation != null && message.hasOwnProperty("supportMessageAssociation")) { + properties._supportMessageAssociation = 1; + if (typeof message.supportMessageAssociation !== "boolean") + return "supportMessageAssociation: boolean expected"; + } return null; }; @@ -17191,6 +38222,18 @@ $root.proto = (function() { message.supportBotUserAgentChatHistory = Boolean(object.supportBotUserAgentChatHistory); if (object.supportCagReactionsAndPolls != null) message.supportCagReactionsAndPolls = Boolean(object.supportCagReactionsAndPolls); + if (object.supportBizHostedMsg != null) + message.supportBizHostedMsg = Boolean(object.supportBizHostedMsg); + if (object.supportRecentSyncChunkMessageCountTuning != null) + message.supportRecentSyncChunkMessageCountTuning = Boolean(object.supportRecentSyncChunkMessageCountTuning); + if (object.supportHostedGroupMsg != null) + message.supportHostedGroupMsg = Boolean(object.supportHostedGroupMsg); + if (object.supportFbidBotChatHistory != null) + message.supportFbidBotChatHistory = Boolean(object.supportFbidBotChatHistory); + if (object.supportAddOnHistorySyncMigration != null) + message.supportAddOnHistorySyncMigration = Boolean(object.supportAddOnHistorySyncMigration); + if (object.supportMessageAssociation != null) + message.supportMessageAssociation = Boolean(object.supportMessageAssociation); return message; }; @@ -17207,32 +38250,76 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.fullSyncDaysLimit = 0; - object.fullSyncSizeMbLimit = 0; - object.storageQuotaMb = 0; - object.inlineInitialPayloadInE2EeMsg = false; - object.recentSyncDaysLimit = 0; - object.supportCallLogHistory = false; - object.supportBotUserAgentChatHistory = false; - object.supportCagReactionsAndPolls = false; - } - if (message.fullSyncDaysLimit != null && message.hasOwnProperty("fullSyncDaysLimit")) + if (message.fullSyncDaysLimit != null && message.hasOwnProperty("fullSyncDaysLimit")) { object.fullSyncDaysLimit = message.fullSyncDaysLimit; - if (message.fullSyncSizeMbLimit != null && message.hasOwnProperty("fullSyncSizeMbLimit")) + if (options.oneofs) + object._fullSyncDaysLimit = "fullSyncDaysLimit"; + } + if (message.fullSyncSizeMbLimit != null && message.hasOwnProperty("fullSyncSizeMbLimit")) { object.fullSyncSizeMbLimit = message.fullSyncSizeMbLimit; - if (message.storageQuotaMb != null && message.hasOwnProperty("storageQuotaMb")) + if (options.oneofs) + object._fullSyncSizeMbLimit = "fullSyncSizeMbLimit"; + } + if (message.storageQuotaMb != null && message.hasOwnProperty("storageQuotaMb")) { object.storageQuotaMb = message.storageQuotaMb; - if (message.inlineInitialPayloadInE2EeMsg != null && message.hasOwnProperty("inlineInitialPayloadInE2EeMsg")) + if (options.oneofs) + object._storageQuotaMb = "storageQuotaMb"; + } + if (message.inlineInitialPayloadInE2EeMsg != null && message.hasOwnProperty("inlineInitialPayloadInE2EeMsg")) { object.inlineInitialPayloadInE2EeMsg = message.inlineInitialPayloadInE2EeMsg; - if (message.recentSyncDaysLimit != null && message.hasOwnProperty("recentSyncDaysLimit")) + if (options.oneofs) + object._inlineInitialPayloadInE2EeMsg = "inlineInitialPayloadInE2EeMsg"; + } + if (message.recentSyncDaysLimit != null && message.hasOwnProperty("recentSyncDaysLimit")) { object.recentSyncDaysLimit = message.recentSyncDaysLimit; - if (message.supportCallLogHistory != null && message.hasOwnProperty("supportCallLogHistory")) + if (options.oneofs) + object._recentSyncDaysLimit = "recentSyncDaysLimit"; + } + if (message.supportCallLogHistory != null && message.hasOwnProperty("supportCallLogHistory")) { object.supportCallLogHistory = message.supportCallLogHistory; - if (message.supportBotUserAgentChatHistory != null && message.hasOwnProperty("supportBotUserAgentChatHistory")) + if (options.oneofs) + object._supportCallLogHistory = "supportCallLogHistory"; + } + if (message.supportBotUserAgentChatHistory != null && message.hasOwnProperty("supportBotUserAgentChatHistory")) { object.supportBotUserAgentChatHistory = message.supportBotUserAgentChatHistory; - if (message.supportCagReactionsAndPolls != null && message.hasOwnProperty("supportCagReactionsAndPolls")) + if (options.oneofs) + object._supportBotUserAgentChatHistory = "supportBotUserAgentChatHistory"; + } + if (message.supportCagReactionsAndPolls != null && message.hasOwnProperty("supportCagReactionsAndPolls")) { object.supportCagReactionsAndPolls = message.supportCagReactionsAndPolls; + if (options.oneofs) + object._supportCagReactionsAndPolls = "supportCagReactionsAndPolls"; + } + if (message.supportBizHostedMsg != null && message.hasOwnProperty("supportBizHostedMsg")) { + object.supportBizHostedMsg = message.supportBizHostedMsg; + if (options.oneofs) + object._supportBizHostedMsg = "supportBizHostedMsg"; + } + if (message.supportRecentSyncChunkMessageCountTuning != null && message.hasOwnProperty("supportRecentSyncChunkMessageCountTuning")) { + object.supportRecentSyncChunkMessageCountTuning = message.supportRecentSyncChunkMessageCountTuning; + if (options.oneofs) + object._supportRecentSyncChunkMessageCountTuning = "supportRecentSyncChunkMessageCountTuning"; + } + if (message.supportHostedGroupMsg != null && message.hasOwnProperty("supportHostedGroupMsg")) { + object.supportHostedGroupMsg = message.supportHostedGroupMsg; + if (options.oneofs) + object._supportHostedGroupMsg = "supportHostedGroupMsg"; + } + if (message.supportFbidBotChatHistory != null && message.hasOwnProperty("supportFbidBotChatHistory")) { + object.supportFbidBotChatHistory = message.supportFbidBotChatHistory; + if (options.oneofs) + object._supportFbidBotChatHistory = "supportFbidBotChatHistory"; + } + if (message.supportAddOnHistorySyncMigration != null && message.hasOwnProperty("supportAddOnHistorySyncMigration")) { + object.supportAddOnHistorySyncMigration = message.supportAddOnHistorySyncMigration; + if (options.oneofs) + object._supportAddOnHistorySyncMigration = "supportAddOnHistorySyncMigration"; + } + if (message.supportMessageAssociation != null && message.hasOwnProperty("supportMessageAssociation")) { + object.supportMessageAssociation = message.supportMessageAssociation; + if (options.oneofs) + object._supportMessageAssociation = "supportMessageAssociation"; + } return object; }; @@ -17247,6 +38334,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for HistorySyncConfig + * @function getTypeUrl + * @memberof proto.DeviceProps.HistorySyncConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HistorySyncConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.DeviceProps.HistorySyncConfig"; + }; + return HistorySyncConfig; })(); @@ -17277,6 +38379,8 @@ $root.proto = (function() { * @property {number} AR_DEVICE=20 AR_DEVICE value * @property {number} UWP=21 UWP value * @property {number} VR=22 VR value + * @property {number} CLOUD_API=23 CLOUD_API value + * @property {number} SMARTGLASSES=24 SMARTGLASSES value */ DeviceProps.PlatformType = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -17303,6 +38407,8 @@ $root.proto = (function() { values[valuesById[20] = "AR_DEVICE"] = 20; values[valuesById[21] = "UWP"] = 21; values[valuesById[22] = "VR"] = 22; + values[valuesById[23] = "CLOUD_API"] = 23; + values[valuesById[24] = "SMARTGLASSES"] = 24; return values; })(); @@ -17338,35 +38444,62 @@ $root.proto = (function() { /** * DisappearingMode initiator. - * @member {proto.DisappearingMode.Initiator} initiator + * @member {proto.DisappearingMode.Initiator|null|undefined} initiator * @memberof proto.DisappearingMode * @instance */ - DisappearingMode.prototype.initiator = 0; + DisappearingMode.prototype.initiator = null; /** * DisappearingMode trigger. - * @member {proto.DisappearingMode.Trigger} trigger + * @member {proto.DisappearingMode.Trigger|null|undefined} trigger * @memberof proto.DisappearingMode * @instance */ - DisappearingMode.prototype.trigger = 0; + DisappearingMode.prototype.trigger = null; /** * DisappearingMode initiatorDeviceJid. - * @member {string} initiatorDeviceJid + * @member {string|null|undefined} initiatorDeviceJid * @memberof proto.DisappearingMode * @instance */ - DisappearingMode.prototype.initiatorDeviceJid = ""; + DisappearingMode.prototype.initiatorDeviceJid = null; /** * DisappearingMode initiatedByMe. - * @member {boolean} initiatedByMe + * @member {boolean|null|undefined} initiatedByMe * @memberof proto.DisappearingMode * @instance */ - DisappearingMode.prototype.initiatedByMe = false; + DisappearingMode.prototype.initiatedByMe = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DisappearingMode.prototype, "_initiator", { + get: $util.oneOfGetter($oneOfFields = ["initiator"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DisappearingMode.prototype, "_trigger", { + get: $util.oneOfGetter($oneOfFields = ["trigger"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DisappearingMode.prototype, "_initiatorDeviceJid", { + get: $util.oneOfGetter($oneOfFields = ["initiatorDeviceJid"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DisappearingMode.prototype, "_initiatedByMe", { + get: $util.oneOfGetter($oneOfFields = ["initiatedByMe"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new DisappearingMode instance using the specified properties. @@ -17434,18 +38567,22 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.initiator = reader.int32(); - break; - case 2: - message.trigger = reader.int32(); - break; - case 3: - message.initiatorDeviceJid = reader.string(); - break; - case 4: - message.initiatedByMe = reader.bool(); - break; + case 1: { + message.initiator = reader.int32(); + break; + } + case 2: { + message.trigger = reader.int32(); + break; + } + case 3: { + message.initiatorDeviceJid = reader.string(); + break; + } + case 4: { + message.initiatedByMe = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -17481,7 +38618,9 @@ $root.proto = (function() { DisappearingMode.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.initiator != null && message.hasOwnProperty("initiator")) + var properties = {}; + if (message.initiator != null && message.hasOwnProperty("initiator")) { + properties._initiator = 1; switch (message.initiator) { default: return "initiator: enum value expected"; @@ -17491,7 +38630,9 @@ $root.proto = (function() { case 3: break; } - if (message.trigger != null && message.hasOwnProperty("trigger")) + } + if (message.trigger != null && message.hasOwnProperty("trigger")) { + properties._trigger = 1; switch (message.trigger) { default: return "trigger: enum value expected"; @@ -17500,14 +38641,20 @@ $root.proto = (function() { case 2: case 3: case 4: + case 5: break; } - if (message.initiatorDeviceJid != null && message.hasOwnProperty("initiatorDeviceJid")) + } + if (message.initiatorDeviceJid != null && message.hasOwnProperty("initiatorDeviceJid")) { + properties._initiatorDeviceJid = 1; if (!$util.isString(message.initiatorDeviceJid)) return "initiatorDeviceJid: string expected"; - if (message.initiatedByMe != null && message.hasOwnProperty("initiatedByMe")) + } + if (message.initiatedByMe != null && message.hasOwnProperty("initiatedByMe")) { + properties._initiatedByMe = 1; if (typeof message.initiatedByMe !== "boolean") return "initiatedByMe: boolean expected"; + } return null; }; @@ -17524,6 +38671,12 @@ $root.proto = (function() { return object; var message = new $root.proto.DisappearingMode(); switch (object.initiator) { + default: + if (typeof object.initiator === "number") { + message.initiator = object.initiator; + break; + } + break; case "CHANGED_IN_CHAT": case 0: message.initiator = 0; @@ -17542,6 +38695,12 @@ $root.proto = (function() { break; } switch (object.trigger) { + default: + if (typeof object.trigger === "number") { + message.trigger = object.trigger; + break; + } + break; case "UNKNOWN": case 0: message.trigger = 0; @@ -17562,6 +38721,10 @@ $root.proto = (function() { case 4: message.trigger = 4; break; + case "UNKNOWN_GROUPS": + case 5: + message.trigger = 5; + break; } if (object.initiatorDeviceJid != null) message.initiatorDeviceJid = String(object.initiatorDeviceJid); @@ -17583,20 +38746,26 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.initiator = options.enums === String ? "CHANGED_IN_CHAT" : 0; - object.trigger = options.enums === String ? "UNKNOWN" : 0; - object.initiatorDeviceJid = ""; - object.initiatedByMe = false; + if (message.initiator != null && message.hasOwnProperty("initiator")) { + object.initiator = options.enums === String ? $root.proto.DisappearingMode.Initiator[message.initiator] === undefined ? message.initiator : $root.proto.DisappearingMode.Initiator[message.initiator] : message.initiator; + if (options.oneofs) + object._initiator = "initiator"; } - if (message.initiator != null && message.hasOwnProperty("initiator")) - object.initiator = options.enums === String ? $root.proto.DisappearingMode.Initiator[message.initiator] : message.initiator; - if (message.trigger != null && message.hasOwnProperty("trigger")) - object.trigger = options.enums === String ? $root.proto.DisappearingMode.Trigger[message.trigger] : message.trigger; - if (message.initiatorDeviceJid != null && message.hasOwnProperty("initiatorDeviceJid")) + if (message.trigger != null && message.hasOwnProperty("trigger")) { + object.trigger = options.enums === String ? $root.proto.DisappearingMode.Trigger[message.trigger] === undefined ? message.trigger : $root.proto.DisappearingMode.Trigger[message.trigger] : message.trigger; + if (options.oneofs) + object._trigger = "trigger"; + } + if (message.initiatorDeviceJid != null && message.hasOwnProperty("initiatorDeviceJid")) { object.initiatorDeviceJid = message.initiatorDeviceJid; - if (message.initiatedByMe != null && message.hasOwnProperty("initiatedByMe")) + if (options.oneofs) + object._initiatorDeviceJid = "initiatorDeviceJid"; + } + if (message.initiatedByMe != null && message.hasOwnProperty("initiatedByMe")) { object.initiatedByMe = message.initiatedByMe; + if (options.oneofs) + object._initiatedByMe = "initiatedByMe"; + } return object; }; @@ -17611,6 +38780,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DisappearingMode + * @function getTypeUrl + * @memberof proto.DisappearingMode + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DisappearingMode.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.DisappearingMode"; + }; + /** * Initiator enum. * @name proto.DisappearingMode.Initiator @@ -17638,6 +38822,7 @@ $root.proto = (function() { * @property {number} ACCOUNT_SETTING=2 ACCOUNT_SETTING value * @property {number} BULK_CHANGE=3 BULK_CHANGE value * @property {number} BIZ_SUPPORTS_FB_HOSTING=4 BIZ_SUPPORTS_FB_HOSTING value + * @property {number} UNKNOWN_GROUPS=5 UNKNOWN_GROUPS value */ DisappearingMode.Trigger = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -17646,12 +38831,1343 @@ $root.proto = (function() { values[valuesById[2] = "ACCOUNT_SETTING"] = 2; values[valuesById[3] = "BULK_CHANGE"] = 3; values[valuesById[4] = "BIZ_SUPPORTS_FB_HOSTING"] = 4; + values[valuesById[5] = "UNKNOWN_GROUPS"] = 5; return values; })(); return DisappearingMode; })(); + proto.EmbeddedContent = (function() { + + /** + * Properties of an EmbeddedContent. + * @memberof proto + * @interface IEmbeddedContent + * @property {proto.IEmbeddedMessage|null} [embeddedMessage] EmbeddedContent embeddedMessage + * @property {proto.IEmbeddedMusic|null} [embeddedMusic] EmbeddedContent embeddedMusic + */ + + /** + * Constructs a new EmbeddedContent. + * @memberof proto + * @classdesc Represents an EmbeddedContent. + * @implements IEmbeddedContent + * @constructor + * @param {proto.IEmbeddedContent=} [properties] Properties to set + */ + function EmbeddedContent(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EmbeddedContent embeddedMessage. + * @member {proto.IEmbeddedMessage|null|undefined} embeddedMessage + * @memberof proto.EmbeddedContent + * @instance + */ + EmbeddedContent.prototype.embeddedMessage = null; + + /** + * EmbeddedContent embeddedMusic. + * @member {proto.IEmbeddedMusic|null|undefined} embeddedMusic + * @memberof proto.EmbeddedContent + * @instance + */ + EmbeddedContent.prototype.embeddedMusic = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * EmbeddedContent content. + * @member {"embeddedMessage"|"embeddedMusic"|undefined} content + * @memberof proto.EmbeddedContent + * @instance + */ + Object.defineProperty(EmbeddedContent.prototype, "content", { + get: $util.oneOfGetter($oneOfFields = ["embeddedMessage", "embeddedMusic"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new EmbeddedContent instance using the specified properties. + * @function create + * @memberof proto.EmbeddedContent + * @static + * @param {proto.IEmbeddedContent=} [properties] Properties to set + * @returns {proto.EmbeddedContent} EmbeddedContent instance + */ + EmbeddedContent.create = function create(properties) { + return new EmbeddedContent(properties); + }; + + /** + * Encodes the specified EmbeddedContent message. Does not implicitly {@link proto.EmbeddedContent.verify|verify} messages. + * @function encode + * @memberof proto.EmbeddedContent + * @static + * @param {proto.IEmbeddedContent} message EmbeddedContent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EmbeddedContent.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.embeddedMessage != null && Object.hasOwnProperty.call(message, "embeddedMessage")) + $root.proto.EmbeddedMessage.encode(message.embeddedMessage, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.embeddedMusic != null && Object.hasOwnProperty.call(message, "embeddedMusic")) + $root.proto.EmbeddedMusic.encode(message.embeddedMusic, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EmbeddedContent message, length delimited. Does not implicitly {@link proto.EmbeddedContent.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.EmbeddedContent + * @static + * @param {proto.IEmbeddedContent} message EmbeddedContent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EmbeddedContent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EmbeddedContent message from the specified reader or buffer. + * @function decode + * @memberof proto.EmbeddedContent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.EmbeddedContent} EmbeddedContent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EmbeddedContent.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.EmbeddedContent(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.embeddedMessage = $root.proto.EmbeddedMessage.decode(reader, reader.uint32()); + break; + } + case 2: { + message.embeddedMusic = $root.proto.EmbeddedMusic.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EmbeddedContent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.EmbeddedContent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.EmbeddedContent} EmbeddedContent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EmbeddedContent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EmbeddedContent message. + * @function verify + * @memberof proto.EmbeddedContent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EmbeddedContent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.embeddedMessage != null && message.hasOwnProperty("embeddedMessage")) { + properties.content = 1; + { + var error = $root.proto.EmbeddedMessage.verify(message.embeddedMessage); + if (error) + return "embeddedMessage." + error; + } + } + if (message.embeddedMusic != null && message.hasOwnProperty("embeddedMusic")) { + if (properties.content === 1) + return "content: multiple values"; + properties.content = 1; + { + var error = $root.proto.EmbeddedMusic.verify(message.embeddedMusic); + if (error) + return "embeddedMusic." + error; + } + } + return null; + }; + + /** + * Creates an EmbeddedContent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.EmbeddedContent + * @static + * @param {Object.} object Plain object + * @returns {proto.EmbeddedContent} EmbeddedContent + */ + EmbeddedContent.fromObject = function fromObject(object) { + if (object instanceof $root.proto.EmbeddedContent) + return object; + var message = new $root.proto.EmbeddedContent(); + if (object.embeddedMessage != null) { + if (typeof object.embeddedMessage !== "object") + throw TypeError(".proto.EmbeddedContent.embeddedMessage: object expected"); + message.embeddedMessage = $root.proto.EmbeddedMessage.fromObject(object.embeddedMessage); + } + if (object.embeddedMusic != null) { + if (typeof object.embeddedMusic !== "object") + throw TypeError(".proto.EmbeddedContent.embeddedMusic: object expected"); + message.embeddedMusic = $root.proto.EmbeddedMusic.fromObject(object.embeddedMusic); + } + return message; + }; + + /** + * Creates a plain object from an EmbeddedContent message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.EmbeddedContent + * @static + * @param {proto.EmbeddedContent} message EmbeddedContent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EmbeddedContent.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.embeddedMessage != null && message.hasOwnProperty("embeddedMessage")) { + object.embeddedMessage = $root.proto.EmbeddedMessage.toObject(message.embeddedMessage, options); + if (options.oneofs) + object.content = "embeddedMessage"; + } + if (message.embeddedMusic != null && message.hasOwnProperty("embeddedMusic")) { + object.embeddedMusic = $root.proto.EmbeddedMusic.toObject(message.embeddedMusic, options); + if (options.oneofs) + object.content = "embeddedMusic"; + } + return object; + }; + + /** + * Converts this EmbeddedContent to JSON. + * @function toJSON + * @memberof proto.EmbeddedContent + * @instance + * @returns {Object.} JSON object + */ + EmbeddedContent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EmbeddedContent + * @function getTypeUrl + * @memberof proto.EmbeddedContent + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EmbeddedContent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.EmbeddedContent"; + }; + + return EmbeddedContent; + })(); + + proto.EmbeddedMessage = (function() { + + /** + * Properties of an EmbeddedMessage. + * @memberof proto + * @interface IEmbeddedMessage + * @property {string|null} [stanzaId] EmbeddedMessage stanzaId + * @property {proto.IMessage|null} [message] EmbeddedMessage message + */ + + /** + * Constructs a new EmbeddedMessage. + * @memberof proto + * @classdesc Represents an EmbeddedMessage. + * @implements IEmbeddedMessage + * @constructor + * @param {proto.IEmbeddedMessage=} [properties] Properties to set + */ + function EmbeddedMessage(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EmbeddedMessage stanzaId. + * @member {string|null|undefined} stanzaId + * @memberof proto.EmbeddedMessage + * @instance + */ + EmbeddedMessage.prototype.stanzaId = null; + + /** + * EmbeddedMessage message. + * @member {proto.IMessage|null|undefined} message + * @memberof proto.EmbeddedMessage + * @instance + */ + EmbeddedMessage.prototype.message = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(EmbeddedMessage.prototype, "_stanzaId", { + get: $util.oneOfGetter($oneOfFields = ["stanzaId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(EmbeddedMessage.prototype, "_message", { + get: $util.oneOfGetter($oneOfFields = ["message"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new EmbeddedMessage instance using the specified properties. + * @function create + * @memberof proto.EmbeddedMessage + * @static + * @param {proto.IEmbeddedMessage=} [properties] Properties to set + * @returns {proto.EmbeddedMessage} EmbeddedMessage instance + */ + EmbeddedMessage.create = function create(properties) { + return new EmbeddedMessage(properties); + }; + + /** + * Encodes the specified EmbeddedMessage message. Does not implicitly {@link proto.EmbeddedMessage.verify|verify} messages. + * @function encode + * @memberof proto.EmbeddedMessage + * @static + * @param {proto.IEmbeddedMessage} message EmbeddedMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EmbeddedMessage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.stanzaId != null && Object.hasOwnProperty.call(message, "stanzaId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.stanzaId); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + $root.proto.Message.encode(message.message, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EmbeddedMessage message, length delimited. Does not implicitly {@link proto.EmbeddedMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.EmbeddedMessage + * @static + * @param {proto.IEmbeddedMessage} message EmbeddedMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EmbeddedMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EmbeddedMessage message from the specified reader or buffer. + * @function decode + * @memberof proto.EmbeddedMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.EmbeddedMessage} EmbeddedMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EmbeddedMessage.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.EmbeddedMessage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.stanzaId = reader.string(); + break; + } + case 2: { + message.message = $root.proto.Message.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EmbeddedMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.EmbeddedMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.EmbeddedMessage} EmbeddedMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EmbeddedMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EmbeddedMessage message. + * @function verify + * @memberof proto.EmbeddedMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EmbeddedMessage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.stanzaId != null && message.hasOwnProperty("stanzaId")) { + properties._stanzaId = 1; + if (!$util.isString(message.stanzaId)) + return "stanzaId: string expected"; + } + if (message.message != null && message.hasOwnProperty("message")) { + properties._message = 1; + { + var error = $root.proto.Message.verify(message.message); + if (error) + return "message." + error; + } + } + return null; + }; + + /** + * Creates an EmbeddedMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.EmbeddedMessage + * @static + * @param {Object.} object Plain object + * @returns {proto.EmbeddedMessage} EmbeddedMessage + */ + EmbeddedMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.EmbeddedMessage) + return object; + var message = new $root.proto.EmbeddedMessage(); + if (object.stanzaId != null) + message.stanzaId = String(object.stanzaId); + if (object.message != null) { + if (typeof object.message !== "object") + throw TypeError(".proto.EmbeddedMessage.message: object expected"); + message.message = $root.proto.Message.fromObject(object.message); + } + return message; + }; + + /** + * Creates a plain object from an EmbeddedMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.EmbeddedMessage + * @static + * @param {proto.EmbeddedMessage} message EmbeddedMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EmbeddedMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.stanzaId != null && message.hasOwnProperty("stanzaId")) { + object.stanzaId = message.stanzaId; + if (options.oneofs) + object._stanzaId = "stanzaId"; + } + if (message.message != null && message.hasOwnProperty("message")) { + object.message = $root.proto.Message.toObject(message.message, options); + if (options.oneofs) + object._message = "message"; + } + return object; + }; + + /** + * Converts this EmbeddedMessage to JSON. + * @function toJSON + * @memberof proto.EmbeddedMessage + * @instance + * @returns {Object.} JSON object + */ + EmbeddedMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EmbeddedMessage + * @function getTypeUrl + * @memberof proto.EmbeddedMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EmbeddedMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.EmbeddedMessage"; + }; + + return EmbeddedMessage; + })(); + + proto.EmbeddedMusic = (function() { + + /** + * Properties of an EmbeddedMusic. + * @memberof proto + * @interface IEmbeddedMusic + * @property {string|null} [musicContentMediaId] EmbeddedMusic musicContentMediaId + * @property {string|null} [songId] EmbeddedMusic songId + * @property {string|null} [author] EmbeddedMusic author + * @property {string|null} [title] EmbeddedMusic title + * @property {string|null} [artworkDirectPath] EmbeddedMusic artworkDirectPath + * @property {Uint8Array|null} [artworkSha256] EmbeddedMusic artworkSha256 + * @property {Uint8Array|null} [artworkEncSha256] EmbeddedMusic artworkEncSha256 + * @property {Uint8Array|null} [artworkMediaKey] EmbeddedMusic artworkMediaKey + * @property {string|null} [artistAttribution] EmbeddedMusic artistAttribution + * @property {Uint8Array|null} [countryBlocklist] EmbeddedMusic countryBlocklist + * @property {boolean|null} [isExplicit] EmbeddedMusic isExplicit + */ + + /** + * Constructs a new EmbeddedMusic. + * @memberof proto + * @classdesc Represents an EmbeddedMusic. + * @implements IEmbeddedMusic + * @constructor + * @param {proto.IEmbeddedMusic=} [properties] Properties to set + */ + function EmbeddedMusic(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EmbeddedMusic musicContentMediaId. + * @member {string|null|undefined} musicContentMediaId + * @memberof proto.EmbeddedMusic + * @instance + */ + EmbeddedMusic.prototype.musicContentMediaId = null; + + /** + * EmbeddedMusic songId. + * @member {string|null|undefined} songId + * @memberof proto.EmbeddedMusic + * @instance + */ + EmbeddedMusic.prototype.songId = null; + + /** + * EmbeddedMusic author. + * @member {string|null|undefined} author + * @memberof proto.EmbeddedMusic + * @instance + */ + EmbeddedMusic.prototype.author = null; + + /** + * EmbeddedMusic title. + * @member {string|null|undefined} title + * @memberof proto.EmbeddedMusic + * @instance + */ + EmbeddedMusic.prototype.title = null; + + /** + * EmbeddedMusic artworkDirectPath. + * @member {string|null|undefined} artworkDirectPath + * @memberof proto.EmbeddedMusic + * @instance + */ + EmbeddedMusic.prototype.artworkDirectPath = null; + + /** + * EmbeddedMusic artworkSha256. + * @member {Uint8Array|null|undefined} artworkSha256 + * @memberof proto.EmbeddedMusic + * @instance + */ + EmbeddedMusic.prototype.artworkSha256 = null; + + /** + * EmbeddedMusic artworkEncSha256. + * @member {Uint8Array|null|undefined} artworkEncSha256 + * @memberof proto.EmbeddedMusic + * @instance + */ + EmbeddedMusic.prototype.artworkEncSha256 = null; + + /** + * EmbeddedMusic artworkMediaKey. + * @member {Uint8Array|null|undefined} artworkMediaKey + * @memberof proto.EmbeddedMusic + * @instance + */ + EmbeddedMusic.prototype.artworkMediaKey = null; + + /** + * EmbeddedMusic artistAttribution. + * @member {string|null|undefined} artistAttribution + * @memberof proto.EmbeddedMusic + * @instance + */ + EmbeddedMusic.prototype.artistAttribution = null; + + /** + * EmbeddedMusic countryBlocklist. + * @member {Uint8Array|null|undefined} countryBlocklist + * @memberof proto.EmbeddedMusic + * @instance + */ + EmbeddedMusic.prototype.countryBlocklist = null; + + /** + * EmbeddedMusic isExplicit. + * @member {boolean|null|undefined} isExplicit + * @memberof proto.EmbeddedMusic + * @instance + */ + EmbeddedMusic.prototype.isExplicit = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(EmbeddedMusic.prototype, "_musicContentMediaId", { + get: $util.oneOfGetter($oneOfFields = ["musicContentMediaId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(EmbeddedMusic.prototype, "_songId", { + get: $util.oneOfGetter($oneOfFields = ["songId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(EmbeddedMusic.prototype, "_author", { + get: $util.oneOfGetter($oneOfFields = ["author"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(EmbeddedMusic.prototype, "_title", { + get: $util.oneOfGetter($oneOfFields = ["title"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(EmbeddedMusic.prototype, "_artworkDirectPath", { + get: $util.oneOfGetter($oneOfFields = ["artworkDirectPath"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(EmbeddedMusic.prototype, "_artworkSha256", { + get: $util.oneOfGetter($oneOfFields = ["artworkSha256"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(EmbeddedMusic.prototype, "_artworkEncSha256", { + get: $util.oneOfGetter($oneOfFields = ["artworkEncSha256"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(EmbeddedMusic.prototype, "_artworkMediaKey", { + get: $util.oneOfGetter($oneOfFields = ["artworkMediaKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(EmbeddedMusic.prototype, "_artistAttribution", { + get: $util.oneOfGetter($oneOfFields = ["artistAttribution"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(EmbeddedMusic.prototype, "_countryBlocklist", { + get: $util.oneOfGetter($oneOfFields = ["countryBlocklist"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(EmbeddedMusic.prototype, "_isExplicit", { + get: $util.oneOfGetter($oneOfFields = ["isExplicit"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new EmbeddedMusic instance using the specified properties. + * @function create + * @memberof proto.EmbeddedMusic + * @static + * @param {proto.IEmbeddedMusic=} [properties] Properties to set + * @returns {proto.EmbeddedMusic} EmbeddedMusic instance + */ + EmbeddedMusic.create = function create(properties) { + return new EmbeddedMusic(properties); + }; + + /** + * Encodes the specified EmbeddedMusic message. Does not implicitly {@link proto.EmbeddedMusic.verify|verify} messages. + * @function encode + * @memberof proto.EmbeddedMusic + * @static + * @param {proto.IEmbeddedMusic} message EmbeddedMusic message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EmbeddedMusic.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.musicContentMediaId != null && Object.hasOwnProperty.call(message, "musicContentMediaId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.musicContentMediaId); + if (message.songId != null && Object.hasOwnProperty.call(message, "songId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.songId); + if (message.author != null && Object.hasOwnProperty.call(message, "author")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.author); + if (message.title != null && Object.hasOwnProperty.call(message, "title")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.title); + if (message.artworkDirectPath != null && Object.hasOwnProperty.call(message, "artworkDirectPath")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.artworkDirectPath); + if (message.artworkSha256 != null && Object.hasOwnProperty.call(message, "artworkSha256")) + writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.artworkSha256); + if (message.artworkEncSha256 != null && Object.hasOwnProperty.call(message, "artworkEncSha256")) + writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.artworkEncSha256); + if (message.artistAttribution != null && Object.hasOwnProperty.call(message, "artistAttribution")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.artistAttribution); + if (message.countryBlocklist != null && Object.hasOwnProperty.call(message, "countryBlocklist")) + writer.uint32(/* id 9, wireType 2 =*/74).bytes(message.countryBlocklist); + if (message.isExplicit != null && Object.hasOwnProperty.call(message, "isExplicit")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.isExplicit); + if (message.artworkMediaKey != null && Object.hasOwnProperty.call(message, "artworkMediaKey")) + writer.uint32(/* id 11, wireType 2 =*/90).bytes(message.artworkMediaKey); + return writer; + }; + + /** + * Encodes the specified EmbeddedMusic message, length delimited. Does not implicitly {@link proto.EmbeddedMusic.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.EmbeddedMusic + * @static + * @param {proto.IEmbeddedMusic} message EmbeddedMusic message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EmbeddedMusic.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EmbeddedMusic message from the specified reader or buffer. + * @function decode + * @memberof proto.EmbeddedMusic + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.EmbeddedMusic} EmbeddedMusic + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EmbeddedMusic.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.EmbeddedMusic(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.musicContentMediaId = reader.string(); + break; + } + case 2: { + message.songId = reader.string(); + break; + } + case 3: { + message.author = reader.string(); + break; + } + case 4: { + message.title = reader.string(); + break; + } + case 5: { + message.artworkDirectPath = reader.string(); + break; + } + case 6: { + message.artworkSha256 = reader.bytes(); + break; + } + case 7: { + message.artworkEncSha256 = reader.bytes(); + break; + } + case 11: { + message.artworkMediaKey = reader.bytes(); + break; + } + case 8: { + message.artistAttribution = reader.string(); + break; + } + case 9: { + message.countryBlocklist = reader.bytes(); + break; + } + case 10: { + message.isExplicit = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EmbeddedMusic message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.EmbeddedMusic + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.EmbeddedMusic} EmbeddedMusic + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EmbeddedMusic.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EmbeddedMusic message. + * @function verify + * @memberof proto.EmbeddedMusic + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EmbeddedMusic.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.musicContentMediaId != null && message.hasOwnProperty("musicContentMediaId")) { + properties._musicContentMediaId = 1; + if (!$util.isString(message.musicContentMediaId)) + return "musicContentMediaId: string expected"; + } + if (message.songId != null && message.hasOwnProperty("songId")) { + properties._songId = 1; + if (!$util.isString(message.songId)) + return "songId: string expected"; + } + if (message.author != null && message.hasOwnProperty("author")) { + properties._author = 1; + if (!$util.isString(message.author)) + return "author: string expected"; + } + if (message.title != null && message.hasOwnProperty("title")) { + properties._title = 1; + if (!$util.isString(message.title)) + return "title: string expected"; + } + if (message.artworkDirectPath != null && message.hasOwnProperty("artworkDirectPath")) { + properties._artworkDirectPath = 1; + if (!$util.isString(message.artworkDirectPath)) + return "artworkDirectPath: string expected"; + } + if (message.artworkSha256 != null && message.hasOwnProperty("artworkSha256")) { + properties._artworkSha256 = 1; + if (!(message.artworkSha256 && typeof message.artworkSha256.length === "number" || $util.isString(message.artworkSha256))) + return "artworkSha256: buffer expected"; + } + if (message.artworkEncSha256 != null && message.hasOwnProperty("artworkEncSha256")) { + properties._artworkEncSha256 = 1; + if (!(message.artworkEncSha256 && typeof message.artworkEncSha256.length === "number" || $util.isString(message.artworkEncSha256))) + return "artworkEncSha256: buffer expected"; + } + if (message.artworkMediaKey != null && message.hasOwnProperty("artworkMediaKey")) { + properties._artworkMediaKey = 1; + if (!(message.artworkMediaKey && typeof message.artworkMediaKey.length === "number" || $util.isString(message.artworkMediaKey))) + return "artworkMediaKey: buffer expected"; + } + if (message.artistAttribution != null && message.hasOwnProperty("artistAttribution")) { + properties._artistAttribution = 1; + if (!$util.isString(message.artistAttribution)) + return "artistAttribution: string expected"; + } + if (message.countryBlocklist != null && message.hasOwnProperty("countryBlocklist")) { + properties._countryBlocklist = 1; + if (!(message.countryBlocklist && typeof message.countryBlocklist.length === "number" || $util.isString(message.countryBlocklist))) + return "countryBlocklist: buffer expected"; + } + if (message.isExplicit != null && message.hasOwnProperty("isExplicit")) { + properties._isExplicit = 1; + if (typeof message.isExplicit !== "boolean") + return "isExplicit: boolean expected"; + } + return null; + }; + + /** + * Creates an EmbeddedMusic message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.EmbeddedMusic + * @static + * @param {Object.} object Plain object + * @returns {proto.EmbeddedMusic} EmbeddedMusic + */ + EmbeddedMusic.fromObject = function fromObject(object) { + if (object instanceof $root.proto.EmbeddedMusic) + return object; + var message = new $root.proto.EmbeddedMusic(); + if (object.musicContentMediaId != null) + message.musicContentMediaId = String(object.musicContentMediaId); + if (object.songId != null) + message.songId = String(object.songId); + if (object.author != null) + message.author = String(object.author); + if (object.title != null) + message.title = String(object.title); + if (object.artworkDirectPath != null) + message.artworkDirectPath = String(object.artworkDirectPath); + if (object.artworkSha256 != null) + if (typeof object.artworkSha256 === "string") + $util.base64.decode(object.artworkSha256, message.artworkSha256 = $util.newBuffer($util.base64.length(object.artworkSha256)), 0); + else if (object.artworkSha256.length >= 0) + message.artworkSha256 = object.artworkSha256; + if (object.artworkEncSha256 != null) + if (typeof object.artworkEncSha256 === "string") + $util.base64.decode(object.artworkEncSha256, message.artworkEncSha256 = $util.newBuffer($util.base64.length(object.artworkEncSha256)), 0); + else if (object.artworkEncSha256.length >= 0) + message.artworkEncSha256 = object.artworkEncSha256; + if (object.artworkMediaKey != null) + if (typeof object.artworkMediaKey === "string") + $util.base64.decode(object.artworkMediaKey, message.artworkMediaKey = $util.newBuffer($util.base64.length(object.artworkMediaKey)), 0); + else if (object.artworkMediaKey.length >= 0) + message.artworkMediaKey = object.artworkMediaKey; + if (object.artistAttribution != null) + message.artistAttribution = String(object.artistAttribution); + if (object.countryBlocklist != null) + if (typeof object.countryBlocklist === "string") + $util.base64.decode(object.countryBlocklist, message.countryBlocklist = $util.newBuffer($util.base64.length(object.countryBlocklist)), 0); + else if (object.countryBlocklist.length >= 0) + message.countryBlocklist = object.countryBlocklist; + if (object.isExplicit != null) + message.isExplicit = Boolean(object.isExplicit); + return message; + }; + + /** + * Creates a plain object from an EmbeddedMusic message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.EmbeddedMusic + * @static + * @param {proto.EmbeddedMusic} message EmbeddedMusic + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EmbeddedMusic.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.musicContentMediaId != null && message.hasOwnProperty("musicContentMediaId")) { + object.musicContentMediaId = message.musicContentMediaId; + if (options.oneofs) + object._musicContentMediaId = "musicContentMediaId"; + } + if (message.songId != null && message.hasOwnProperty("songId")) { + object.songId = message.songId; + if (options.oneofs) + object._songId = "songId"; + } + if (message.author != null && message.hasOwnProperty("author")) { + object.author = message.author; + if (options.oneofs) + object._author = "author"; + } + if (message.title != null && message.hasOwnProperty("title")) { + object.title = message.title; + if (options.oneofs) + object._title = "title"; + } + if (message.artworkDirectPath != null && message.hasOwnProperty("artworkDirectPath")) { + object.artworkDirectPath = message.artworkDirectPath; + if (options.oneofs) + object._artworkDirectPath = "artworkDirectPath"; + } + if (message.artworkSha256 != null && message.hasOwnProperty("artworkSha256")) { + object.artworkSha256 = options.bytes === String ? $util.base64.encode(message.artworkSha256, 0, message.artworkSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.artworkSha256) : message.artworkSha256; + if (options.oneofs) + object._artworkSha256 = "artworkSha256"; + } + if (message.artworkEncSha256 != null && message.hasOwnProperty("artworkEncSha256")) { + object.artworkEncSha256 = options.bytes === String ? $util.base64.encode(message.artworkEncSha256, 0, message.artworkEncSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.artworkEncSha256) : message.artworkEncSha256; + if (options.oneofs) + object._artworkEncSha256 = "artworkEncSha256"; + } + if (message.artistAttribution != null && message.hasOwnProperty("artistAttribution")) { + object.artistAttribution = message.artistAttribution; + if (options.oneofs) + object._artistAttribution = "artistAttribution"; + } + if (message.countryBlocklist != null && message.hasOwnProperty("countryBlocklist")) { + object.countryBlocklist = options.bytes === String ? $util.base64.encode(message.countryBlocklist, 0, message.countryBlocklist.length) : options.bytes === Array ? Array.prototype.slice.call(message.countryBlocklist) : message.countryBlocklist; + if (options.oneofs) + object._countryBlocklist = "countryBlocklist"; + } + if (message.isExplicit != null && message.hasOwnProperty("isExplicit")) { + object.isExplicit = message.isExplicit; + if (options.oneofs) + object._isExplicit = "isExplicit"; + } + if (message.artworkMediaKey != null && message.hasOwnProperty("artworkMediaKey")) { + object.artworkMediaKey = options.bytes === String ? $util.base64.encode(message.artworkMediaKey, 0, message.artworkMediaKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.artworkMediaKey) : message.artworkMediaKey; + if (options.oneofs) + object._artworkMediaKey = "artworkMediaKey"; + } + return object; + }; + + /** + * Converts this EmbeddedMusic to JSON. + * @function toJSON + * @memberof proto.EmbeddedMusic + * @instance + * @returns {Object.} JSON object + */ + EmbeddedMusic.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EmbeddedMusic + * @function getTypeUrl + * @memberof proto.EmbeddedMusic + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EmbeddedMusic.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.EmbeddedMusic"; + }; + + return EmbeddedMusic; + })(); + + proto.EncryptedPairingRequest = (function() { + + /** + * Properties of an EncryptedPairingRequest. + * @memberof proto + * @interface IEncryptedPairingRequest + * @property {Uint8Array|null} [encryptedPayload] EncryptedPairingRequest encryptedPayload + * @property {Uint8Array|null} [iv] EncryptedPairingRequest iv + */ + + /** + * Constructs a new EncryptedPairingRequest. + * @memberof proto + * @classdesc Represents an EncryptedPairingRequest. + * @implements IEncryptedPairingRequest + * @constructor + * @param {proto.IEncryptedPairingRequest=} [properties] Properties to set + */ + function EncryptedPairingRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EncryptedPairingRequest encryptedPayload. + * @member {Uint8Array|null|undefined} encryptedPayload + * @memberof proto.EncryptedPairingRequest + * @instance + */ + EncryptedPairingRequest.prototype.encryptedPayload = null; + + /** + * EncryptedPairingRequest iv. + * @member {Uint8Array|null|undefined} iv + * @memberof proto.EncryptedPairingRequest + * @instance + */ + EncryptedPairingRequest.prototype.iv = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(EncryptedPairingRequest.prototype, "_encryptedPayload", { + get: $util.oneOfGetter($oneOfFields = ["encryptedPayload"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(EncryptedPairingRequest.prototype, "_iv", { + get: $util.oneOfGetter($oneOfFields = ["iv"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new EncryptedPairingRequest instance using the specified properties. + * @function create + * @memberof proto.EncryptedPairingRequest + * @static + * @param {proto.IEncryptedPairingRequest=} [properties] Properties to set + * @returns {proto.EncryptedPairingRequest} EncryptedPairingRequest instance + */ + EncryptedPairingRequest.create = function create(properties) { + return new EncryptedPairingRequest(properties); + }; + + /** + * Encodes the specified EncryptedPairingRequest message. Does not implicitly {@link proto.EncryptedPairingRequest.verify|verify} messages. + * @function encode + * @memberof proto.EncryptedPairingRequest + * @static + * @param {proto.IEncryptedPairingRequest} message EncryptedPairingRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EncryptedPairingRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.encryptedPayload != null && Object.hasOwnProperty.call(message, "encryptedPayload")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.encryptedPayload); + if (message.iv != null && Object.hasOwnProperty.call(message, "iv")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.iv); + return writer; + }; + + /** + * Encodes the specified EncryptedPairingRequest message, length delimited. Does not implicitly {@link proto.EncryptedPairingRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.EncryptedPairingRequest + * @static + * @param {proto.IEncryptedPairingRequest} message EncryptedPairingRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EncryptedPairingRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EncryptedPairingRequest message from the specified reader or buffer. + * @function decode + * @memberof proto.EncryptedPairingRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.EncryptedPairingRequest} EncryptedPairingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EncryptedPairingRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.EncryptedPairingRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.encryptedPayload = reader.bytes(); + break; + } + case 2: { + message.iv = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EncryptedPairingRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.EncryptedPairingRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.EncryptedPairingRequest} EncryptedPairingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EncryptedPairingRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EncryptedPairingRequest message. + * @function verify + * @memberof proto.EncryptedPairingRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EncryptedPairingRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.encryptedPayload != null && message.hasOwnProperty("encryptedPayload")) { + properties._encryptedPayload = 1; + if (!(message.encryptedPayload && typeof message.encryptedPayload.length === "number" || $util.isString(message.encryptedPayload))) + return "encryptedPayload: buffer expected"; + } + if (message.iv != null && message.hasOwnProperty("iv")) { + properties._iv = 1; + if (!(message.iv && typeof message.iv.length === "number" || $util.isString(message.iv))) + return "iv: buffer expected"; + } + return null; + }; + + /** + * Creates an EncryptedPairingRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.EncryptedPairingRequest + * @static + * @param {Object.} object Plain object + * @returns {proto.EncryptedPairingRequest} EncryptedPairingRequest + */ + EncryptedPairingRequest.fromObject = function fromObject(object) { + if (object instanceof $root.proto.EncryptedPairingRequest) + return object; + var message = new $root.proto.EncryptedPairingRequest(); + if (object.encryptedPayload != null) + if (typeof object.encryptedPayload === "string") + $util.base64.decode(object.encryptedPayload, message.encryptedPayload = $util.newBuffer($util.base64.length(object.encryptedPayload)), 0); + else if (object.encryptedPayload.length >= 0) + message.encryptedPayload = object.encryptedPayload; + if (object.iv != null) + if (typeof object.iv === "string") + $util.base64.decode(object.iv, message.iv = $util.newBuffer($util.base64.length(object.iv)), 0); + else if (object.iv.length >= 0) + message.iv = object.iv; + return message; + }; + + /** + * Creates a plain object from an EncryptedPairingRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.EncryptedPairingRequest + * @static + * @param {proto.EncryptedPairingRequest} message EncryptedPairingRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EncryptedPairingRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.encryptedPayload != null && message.hasOwnProperty("encryptedPayload")) { + object.encryptedPayload = options.bytes === String ? $util.base64.encode(message.encryptedPayload, 0, message.encryptedPayload.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedPayload) : message.encryptedPayload; + if (options.oneofs) + object._encryptedPayload = "encryptedPayload"; + } + if (message.iv != null && message.hasOwnProperty("iv")) { + object.iv = options.bytes === String ? $util.base64.encode(message.iv, 0, message.iv.length) : options.bytes === Array ? Array.prototype.slice.call(message.iv) : message.iv; + if (options.oneofs) + object._iv = "iv"; + } + return object; + }; + + /** + * Converts this EncryptedPairingRequest to JSON. + * @function toJSON + * @memberof proto.EncryptedPairingRequest + * @instance + * @returns {Object.} JSON object + */ + EncryptedPairingRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EncryptedPairingRequest + * @function getTypeUrl + * @memberof proto.EncryptedPairingRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EncryptedPairingRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.EncryptedPairingRequest"; + }; + + return EncryptedPairingRequest; + })(); + proto.EphemeralSetting = (function() { /** @@ -17679,19 +40195,34 @@ $root.proto = (function() { /** * EphemeralSetting duration. - * @member {number} duration + * @member {number|null|undefined} duration * @memberof proto.EphemeralSetting * @instance */ - EphemeralSetting.prototype.duration = 0; + EphemeralSetting.prototype.duration = null; /** * EphemeralSetting timestamp. - * @member {number|Long} timestamp + * @member {number|Long|null|undefined} timestamp * @memberof proto.EphemeralSetting * @instance */ - EphemeralSetting.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + EphemeralSetting.prototype.timestamp = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(EphemeralSetting.prototype, "_duration", { + get: $util.oneOfGetter($oneOfFields = ["duration"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(EphemeralSetting.prototype, "_timestamp", { + get: $util.oneOfGetter($oneOfFields = ["timestamp"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new EphemeralSetting instance using the specified properties. @@ -17755,12 +40286,14 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.duration = reader.sfixed32(); - break; - case 2: - message.timestamp = reader.sfixed64(); - break; + case 1: { + message.duration = reader.sfixed32(); + break; + } + case 2: { + message.timestamp = reader.sfixed64(); + break; + } default: reader.skipType(tag & 7); break; @@ -17796,12 +40329,17 @@ $root.proto = (function() { EphemeralSetting.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.duration != null && message.hasOwnProperty("duration")) + var properties = {}; + if (message.duration != null && message.hasOwnProperty("duration")) { + properties._duration = 1; if (!$util.isInteger(message.duration)) return "duration: integer expected"; - if (message.timestamp != null && message.hasOwnProperty("timestamp")) + } + if (message.timestamp != null && message.hasOwnProperty("timestamp")) { + properties._timestamp = 1; if (!$util.isInteger(message.timestamp) && !(message.timestamp && $util.isInteger(message.timestamp.low) && $util.isInteger(message.timestamp.high))) return "timestamp: integer|Long expected"; + } return null; }; @@ -17844,21 +40382,19 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.duration = 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.timestamp = options.longs === String ? "0" : 0; - } - if (message.duration != null && message.hasOwnProperty("duration")) + if (message.duration != null && message.hasOwnProperty("duration")) { object.duration = message.duration; - if (message.timestamp != null && message.hasOwnProperty("timestamp")) + if (options.oneofs) + object._duration = "duration"; + } + if (message.timestamp != null && message.hasOwnProperty("timestamp")) { if (typeof message.timestamp === "number") object.timestamp = options.longs === String ? String(message.timestamp) : message.timestamp; else object.timestamp = options.longs === String ? $util.Long.prototype.toString.call(message.timestamp) : options.longs === Number ? new $util.LongBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0).toNumber() : message.timestamp; + if (options.oneofs) + object._timestamp = "timestamp"; + } return object; }; @@ -17873,9 +40409,240 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for EphemeralSetting + * @function getTypeUrl + * @memberof proto.EphemeralSetting + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EphemeralSetting.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.EphemeralSetting"; + }; + return EphemeralSetting; })(); + proto.EventAdditionalMetadata = (function() { + + /** + * Properties of an EventAdditionalMetadata. + * @memberof proto + * @interface IEventAdditionalMetadata + * @property {boolean|null} [isStale] EventAdditionalMetadata isStale + */ + + /** + * Constructs a new EventAdditionalMetadata. + * @memberof proto + * @classdesc Represents an EventAdditionalMetadata. + * @implements IEventAdditionalMetadata + * @constructor + * @param {proto.IEventAdditionalMetadata=} [properties] Properties to set + */ + function EventAdditionalMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EventAdditionalMetadata isStale. + * @member {boolean|null|undefined} isStale + * @memberof proto.EventAdditionalMetadata + * @instance + */ + EventAdditionalMetadata.prototype.isStale = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(EventAdditionalMetadata.prototype, "_isStale", { + get: $util.oneOfGetter($oneOfFields = ["isStale"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new EventAdditionalMetadata instance using the specified properties. + * @function create + * @memberof proto.EventAdditionalMetadata + * @static + * @param {proto.IEventAdditionalMetadata=} [properties] Properties to set + * @returns {proto.EventAdditionalMetadata} EventAdditionalMetadata instance + */ + EventAdditionalMetadata.create = function create(properties) { + return new EventAdditionalMetadata(properties); + }; + + /** + * Encodes the specified EventAdditionalMetadata message. Does not implicitly {@link proto.EventAdditionalMetadata.verify|verify} messages. + * @function encode + * @memberof proto.EventAdditionalMetadata + * @static + * @param {proto.IEventAdditionalMetadata} message EventAdditionalMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EventAdditionalMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.isStale != null && Object.hasOwnProperty.call(message, "isStale")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.isStale); + return writer; + }; + + /** + * Encodes the specified EventAdditionalMetadata message, length delimited. Does not implicitly {@link proto.EventAdditionalMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.EventAdditionalMetadata + * @static + * @param {proto.IEventAdditionalMetadata} message EventAdditionalMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EventAdditionalMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EventAdditionalMetadata message from the specified reader or buffer. + * @function decode + * @memberof proto.EventAdditionalMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.EventAdditionalMetadata} EventAdditionalMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EventAdditionalMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.EventAdditionalMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.isStale = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EventAdditionalMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.EventAdditionalMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.EventAdditionalMetadata} EventAdditionalMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EventAdditionalMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EventAdditionalMetadata message. + * @function verify + * @memberof proto.EventAdditionalMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EventAdditionalMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.isStale != null && message.hasOwnProperty("isStale")) { + properties._isStale = 1; + if (typeof message.isStale !== "boolean") + return "isStale: boolean expected"; + } + return null; + }; + + /** + * Creates an EventAdditionalMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.EventAdditionalMetadata + * @static + * @param {Object.} object Plain object + * @returns {proto.EventAdditionalMetadata} EventAdditionalMetadata + */ + EventAdditionalMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.proto.EventAdditionalMetadata) + return object; + var message = new $root.proto.EventAdditionalMetadata(); + if (object.isStale != null) + message.isStale = Boolean(object.isStale); + return message; + }; + + /** + * Creates a plain object from an EventAdditionalMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.EventAdditionalMetadata + * @static + * @param {proto.EventAdditionalMetadata} message EventAdditionalMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EventAdditionalMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.isStale != null && message.hasOwnProperty("isStale")) { + object.isStale = message.isStale; + if (options.oneofs) + object._isStale = "isStale"; + } + return object; + }; + + /** + * Converts this EventAdditionalMetadata to JSON. + * @function toJSON + * @memberof proto.EventAdditionalMetadata + * @instance + * @returns {Object.} JSON object + */ + EventAdditionalMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EventAdditionalMetadata + * @function getTypeUrl + * @memberof proto.EventAdditionalMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EventAdditionalMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.EventAdditionalMetadata"; + }; + + return EventAdditionalMetadata; + })(); + proto.EventResponse = (function() { /** @@ -17913,11 +40680,11 @@ $root.proto = (function() { /** * EventResponse timestampMs. - * @member {number|Long} timestampMs + * @member {number|Long|null|undefined} timestampMs * @memberof proto.EventResponse * @instance */ - EventResponse.prototype.timestampMs = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + EventResponse.prototype.timestampMs = null; /** * EventResponse eventResponseMessage. @@ -17929,11 +40696,38 @@ $root.proto = (function() { /** * EventResponse unread. - * @member {boolean} unread + * @member {boolean|null|undefined} unread * @memberof proto.EventResponse * @instance */ - EventResponse.prototype.unread = false; + EventResponse.prototype.unread = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(EventResponse.prototype, "_eventResponseMessageKey", { + get: $util.oneOfGetter($oneOfFields = ["eventResponseMessageKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(EventResponse.prototype, "_timestampMs", { + get: $util.oneOfGetter($oneOfFields = ["timestampMs"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(EventResponse.prototype, "_eventResponseMessage", { + get: $util.oneOfGetter($oneOfFields = ["eventResponseMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(EventResponse.prototype, "_unread", { + get: $util.oneOfGetter($oneOfFields = ["unread"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new EventResponse instance using the specified properties. @@ -18001,18 +40795,22 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.eventResponseMessageKey = $root.proto.MessageKey.decode(reader, reader.uint32()); - break; - case 2: - message.timestampMs = reader.int64(); - break; - case 3: - message.eventResponseMessage = $root.proto.Message.EventResponseMessage.decode(reader, reader.uint32()); - break; - case 4: - message.unread = reader.bool(); - break; + case 1: { + message.eventResponseMessageKey = $root.proto.MessageKey.decode(reader, reader.uint32()); + break; + } + case 2: { + message.timestampMs = reader.int64(); + break; + } + case 3: { + message.eventResponseMessage = $root.proto.Message.EventResponseMessage.decode(reader, reader.uint32()); + break; + } + case 4: { + message.unread = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -18048,22 +40846,33 @@ $root.proto = (function() { EventResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; if (message.eventResponseMessageKey != null && message.hasOwnProperty("eventResponseMessageKey")) { - var error = $root.proto.MessageKey.verify(message.eventResponseMessageKey); - if (error) - return "eventResponseMessageKey." + error; + properties._eventResponseMessageKey = 1; + { + var error = $root.proto.MessageKey.verify(message.eventResponseMessageKey); + if (error) + return "eventResponseMessageKey." + error; + } } - if (message.timestampMs != null && message.hasOwnProperty("timestampMs")) + if (message.timestampMs != null && message.hasOwnProperty("timestampMs")) { + properties._timestampMs = 1; if (!$util.isInteger(message.timestampMs) && !(message.timestampMs && $util.isInteger(message.timestampMs.low) && $util.isInteger(message.timestampMs.high))) return "timestampMs: integer|Long expected"; - if (message.eventResponseMessage != null && message.hasOwnProperty("eventResponseMessage")) { - var error = $root.proto.Message.EventResponseMessage.verify(message.eventResponseMessage); - if (error) - return "eventResponseMessage." + error; } - if (message.unread != null && message.hasOwnProperty("unread")) + if (message.eventResponseMessage != null && message.hasOwnProperty("eventResponseMessage")) { + properties._eventResponseMessage = 1; + { + var error = $root.proto.Message.EventResponseMessage.verify(message.eventResponseMessage); + if (error) + return "eventResponseMessage." + error; + } + } + if (message.unread != null && message.hasOwnProperty("unread")) { + properties._unread = 1; if (typeof message.unread !== "boolean") return "unread: boolean expected"; + } return null; }; @@ -18116,27 +40925,29 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.eventResponseMessageKey = null; - 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; - object.eventResponseMessage = null; - object.unread = false; - } - if (message.eventResponseMessageKey != null && message.hasOwnProperty("eventResponseMessageKey")) + if (message.eventResponseMessageKey != null && message.hasOwnProperty("eventResponseMessageKey")) { object.eventResponseMessageKey = $root.proto.MessageKey.toObject(message.eventResponseMessageKey, options); - if (message.timestampMs != null && message.hasOwnProperty("timestampMs")) + if (options.oneofs) + object._eventResponseMessageKey = "eventResponseMessageKey"; + } + 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; - if (message.eventResponseMessage != null && message.hasOwnProperty("eventResponseMessage")) + if (options.oneofs) + object._timestampMs = "timestampMs"; + } + if (message.eventResponseMessage != null && message.hasOwnProperty("eventResponseMessage")) { object.eventResponseMessage = $root.proto.Message.EventResponseMessage.toObject(message.eventResponseMessage, options); - if (message.unread != null && message.hasOwnProperty("unread")) + if (options.oneofs) + object._eventResponseMessage = "eventResponseMessage"; + } + if (message.unread != null && message.hasOwnProperty("unread")) { object.unread = message.unread; + if (options.oneofs) + object._unread = "unread"; + } return object; }; @@ -18151,6 +40962,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for EventResponse + * @function getTypeUrl + * @memberof proto.EventResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EventResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.EventResponse"; + }; + return EventResponse; })(); @@ -18181,19 +41007,34 @@ $root.proto = (function() { /** * ExitCode code. - * @member {number|Long} code + * @member {number|Long|null|undefined} code * @memberof proto.ExitCode * @instance */ - ExitCode.prototype.code = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + ExitCode.prototype.code = null; /** * ExitCode text. - * @member {string} text + * @member {string|null|undefined} text * @memberof proto.ExitCode * @instance */ - ExitCode.prototype.text = ""; + ExitCode.prototype.text = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ExitCode.prototype, "_code", { + get: $util.oneOfGetter($oneOfFields = ["code"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ExitCode.prototype, "_text", { + get: $util.oneOfGetter($oneOfFields = ["text"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new ExitCode instance using the specified properties. @@ -18257,12 +41098,14 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.code = reader.uint64(); - break; - case 2: - message.text = reader.string(); - break; + case 1: { + message.code = reader.uint64(); + break; + } + case 2: { + message.text = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -18298,12 +41141,17 @@ $root.proto = (function() { ExitCode.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.code != null && message.hasOwnProperty("code")) + var properties = {}; + if (message.code != null && message.hasOwnProperty("code")) { + properties._code = 1; if (!$util.isInteger(message.code) && !(message.code && $util.isInteger(message.code.low) && $util.isInteger(message.code.high))) return "code: integer|Long expected"; - if (message.text != null && message.hasOwnProperty("text")) + } + if (message.text != null && message.hasOwnProperty("text")) { + properties._text = 1; if (!$util.isString(message.text)) return "text: string expected"; + } return null; }; @@ -18346,21 +41194,19 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.code = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.code = options.longs === String ? "0" : 0; - object.text = ""; - } - if (message.code != null && message.hasOwnProperty("code")) + if (message.code != null && message.hasOwnProperty("code")) { if (typeof message.code === "number") object.code = options.longs === String ? String(message.code) : message.code; else object.code = options.longs === String ? $util.Long.prototype.toString.call(message.code) : options.longs === Number ? new $util.LongBits(message.code.low >>> 0, message.code.high >>> 0).toNumber(true) : message.code; - if (message.text != null && message.hasOwnProperty("text")) + if (options.oneofs) + object._code = "code"; + } + if (message.text != null && message.hasOwnProperty("text")) { object.text = message.text; + if (options.oneofs) + object._text = "text"; + } return object; }; @@ -18375,6 +41221,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ExitCode + * @function getTypeUrl + * @memberof proto.ExitCode + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExitCode.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.ExitCode"; + }; + return ExitCode; })(); @@ -18409,51 +41270,90 @@ $root.proto = (function() { /** * ExternalBlobReference mediaKey. - * @member {Uint8Array} mediaKey + * @member {Uint8Array|null|undefined} mediaKey * @memberof proto.ExternalBlobReference * @instance */ - ExternalBlobReference.prototype.mediaKey = $util.newBuffer([]); + ExternalBlobReference.prototype.mediaKey = null; /** * ExternalBlobReference directPath. - * @member {string} directPath + * @member {string|null|undefined} directPath * @memberof proto.ExternalBlobReference * @instance */ - ExternalBlobReference.prototype.directPath = ""; + ExternalBlobReference.prototype.directPath = null; /** * ExternalBlobReference handle. - * @member {string} handle + * @member {string|null|undefined} handle * @memberof proto.ExternalBlobReference * @instance */ - ExternalBlobReference.prototype.handle = ""; + ExternalBlobReference.prototype.handle = null; /** * ExternalBlobReference fileSizeBytes. - * @member {number|Long} fileSizeBytes + * @member {number|Long|null|undefined} fileSizeBytes * @memberof proto.ExternalBlobReference * @instance */ - ExternalBlobReference.prototype.fileSizeBytes = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + ExternalBlobReference.prototype.fileSizeBytes = null; /** * ExternalBlobReference fileSha256. - * @member {Uint8Array} fileSha256 + * @member {Uint8Array|null|undefined} fileSha256 * @memberof proto.ExternalBlobReference * @instance */ - ExternalBlobReference.prototype.fileSha256 = $util.newBuffer([]); + ExternalBlobReference.prototype.fileSha256 = null; /** * ExternalBlobReference fileEncSha256. - * @member {Uint8Array} fileEncSha256 + * @member {Uint8Array|null|undefined} fileEncSha256 * @memberof proto.ExternalBlobReference * @instance */ - ExternalBlobReference.prototype.fileEncSha256 = $util.newBuffer([]); + ExternalBlobReference.prototype.fileEncSha256 = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ExternalBlobReference.prototype, "_mediaKey", { + get: $util.oneOfGetter($oneOfFields = ["mediaKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ExternalBlobReference.prototype, "_directPath", { + get: $util.oneOfGetter($oneOfFields = ["directPath"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ExternalBlobReference.prototype, "_handle", { + get: $util.oneOfGetter($oneOfFields = ["handle"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ExternalBlobReference.prototype, "_fileSizeBytes", { + get: $util.oneOfGetter($oneOfFields = ["fileSizeBytes"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ExternalBlobReference.prototype, "_fileSha256", { + get: $util.oneOfGetter($oneOfFields = ["fileSha256"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ExternalBlobReference.prototype, "_fileEncSha256", { + get: $util.oneOfGetter($oneOfFields = ["fileEncSha256"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new ExternalBlobReference instance using the specified properties. @@ -18525,24 +41425,30 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.mediaKey = reader.bytes(); - break; - case 2: - message.directPath = reader.string(); - break; - case 3: - message.handle = reader.string(); - break; - case 4: - message.fileSizeBytes = reader.uint64(); - break; - case 5: - message.fileSha256 = reader.bytes(); - break; - case 6: - message.fileEncSha256 = reader.bytes(); - break; + case 1: { + message.mediaKey = reader.bytes(); + break; + } + case 2: { + message.directPath = reader.string(); + break; + } + case 3: { + message.handle = reader.string(); + break; + } + case 4: { + message.fileSizeBytes = reader.uint64(); + break; + } + case 5: { + message.fileSha256 = reader.bytes(); + break; + } + case 6: { + message.fileEncSha256 = reader.bytes(); + break; + } default: reader.skipType(tag & 7); break; @@ -18578,24 +41484,37 @@ $root.proto = (function() { ExternalBlobReference.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) + var properties = {}; + if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) { + properties._mediaKey = 1; if (!(message.mediaKey && typeof message.mediaKey.length === "number" || $util.isString(message.mediaKey))) return "mediaKey: buffer expected"; - if (message.directPath != null && message.hasOwnProperty("directPath")) + } + if (message.directPath != null && message.hasOwnProperty("directPath")) { + properties._directPath = 1; if (!$util.isString(message.directPath)) return "directPath: string expected"; - if (message.handle != null && message.hasOwnProperty("handle")) + } + if (message.handle != null && message.hasOwnProperty("handle")) { + properties._handle = 1; if (!$util.isString(message.handle)) return "handle: string expected"; - if (message.fileSizeBytes != null && message.hasOwnProperty("fileSizeBytes")) + } + if (message.fileSizeBytes != null && message.hasOwnProperty("fileSizeBytes")) { + properties._fileSizeBytes = 1; if (!$util.isInteger(message.fileSizeBytes) && !(message.fileSizeBytes && $util.isInteger(message.fileSizeBytes.low) && $util.isInteger(message.fileSizeBytes.high))) return "fileSizeBytes: integer|Long expected"; - if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) + } + if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) { + properties._fileSha256 = 1; 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 != null && message.hasOwnProperty("fileEncSha256")) { + properties._fileEncSha256 = 1; if (!(message.fileEncSha256 && typeof message.fileEncSha256.length === "number" || $util.isString(message.fileEncSha256))) return "fileEncSha256: buffer expected"; + } return null; }; @@ -18614,7 +41533,7 @@ $root.proto = (function() { 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) + else if (object.mediaKey.length >= 0) message.mediaKey = object.mediaKey; if (object.directPath != null) message.directPath = String(object.directPath); @@ -18632,12 +41551,12 @@ $root.proto = (function() { 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) + else if (object.fileSha256.length >= 0) 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) + else if (object.fileEncSha256.length >= 0) message.fileEncSha256 = object.fileEncSha256; return message; }; @@ -18655,51 +41574,39 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - if (options.bytes === String) - object.mediaKey = ""; - else { - object.mediaKey = []; - if (options.bytes !== Array) - object.mediaKey = $util.newBuffer(object.mediaKey); - } - object.directPath = ""; - object.handle = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.fileSizeBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.fileSizeBytes = options.longs === String ? "0" : 0; - if (options.bytes === String) - object.fileSha256 = ""; - else { - object.fileSha256 = []; - if (options.bytes !== Array) - object.fileSha256 = $util.newBuffer(object.fileSha256); - } - if (options.bytes === String) - object.fileEncSha256 = ""; - else { - object.fileEncSha256 = []; - if (options.bytes !== Array) - object.fileEncSha256 = $util.newBuffer(object.fileEncSha256); - } - } - if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) + if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) { object.mediaKey = options.bytes === String ? $util.base64.encode(message.mediaKey, 0, message.mediaKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.mediaKey) : message.mediaKey; - if (message.directPath != null && message.hasOwnProperty("directPath")) + if (options.oneofs) + object._mediaKey = "mediaKey"; + } + if (message.directPath != null && message.hasOwnProperty("directPath")) { object.directPath = message.directPath; - if (message.handle != null && message.hasOwnProperty("handle")) + if (options.oneofs) + object._directPath = "directPath"; + } + if (message.handle != null && message.hasOwnProperty("handle")) { object.handle = message.handle; - if (message.fileSizeBytes != null && message.hasOwnProperty("fileSizeBytes")) + if (options.oneofs) + object._handle = "handle"; + } + if (message.fileSizeBytes != null && message.hasOwnProperty("fileSizeBytes")) { if (typeof message.fileSizeBytes === "number") object.fileSizeBytes = options.longs === String ? String(message.fileSizeBytes) : message.fileSizeBytes; else object.fileSizeBytes = options.longs === String ? $util.Long.prototype.toString.call(message.fileSizeBytes) : options.longs === Number ? new $util.LongBits(message.fileSizeBytes.low >>> 0, message.fileSizeBytes.high >>> 0).toNumber(true) : message.fileSizeBytes; - if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) + if (options.oneofs) + object._fileSizeBytes = "fileSizeBytes"; + } + if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) { object.fileSha256 = options.bytes === String ? $util.base64.encode(message.fileSha256, 0, message.fileSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.fileSha256) : message.fileSha256; - if (message.fileEncSha256 != null && message.hasOwnProperty("fileEncSha256")) + if (options.oneofs) + object._fileSha256 = "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 (options.oneofs) + object._fileEncSha256 = "fileEncSha256"; + } return object; }; @@ -18714,9 +41621,409 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ExternalBlobReference + * @function getTypeUrl + * @memberof proto.ExternalBlobReference + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExternalBlobReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.ExternalBlobReference"; + }; + return ExternalBlobReference; })(); + proto.Field = (function() { + + /** + * Properties of a Field. + * @memberof proto + * @interface IField + * @property {number|null} [minVersion] Field minVersion + * @property {number|null} [maxVersion] Field maxVersion + * @property {number|null} [notReportableMinVersion] Field notReportableMinVersion + * @property {boolean|null} [isMessage] Field isMessage + * @property {Object.|null} [subfield] Field subfield + */ + + /** + * Constructs a new Field. + * @memberof proto + * @classdesc Represents a Field. + * @implements IField + * @constructor + * @param {proto.IField=} [properties] Properties to set + */ + function Field(properties) { + this.subfield = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Field minVersion. + * @member {number|null|undefined} minVersion + * @memberof proto.Field + * @instance + */ + Field.prototype.minVersion = null; + + /** + * Field maxVersion. + * @member {number|null|undefined} maxVersion + * @memberof proto.Field + * @instance + */ + Field.prototype.maxVersion = null; + + /** + * Field notReportableMinVersion. + * @member {number|null|undefined} notReportableMinVersion + * @memberof proto.Field + * @instance + */ + Field.prototype.notReportableMinVersion = null; + + /** + * Field isMessage. + * @member {boolean|null|undefined} isMessage + * @memberof proto.Field + * @instance + */ + Field.prototype.isMessage = null; + + /** + * Field subfield. + * @member {Object.} subfield + * @memberof proto.Field + * @instance + */ + Field.prototype.subfield = $util.emptyObject; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Field.prototype, "_minVersion", { + get: $util.oneOfGetter($oneOfFields = ["minVersion"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Field.prototype, "_maxVersion", { + get: $util.oneOfGetter($oneOfFields = ["maxVersion"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Field.prototype, "_notReportableMinVersion", { + get: $util.oneOfGetter($oneOfFields = ["notReportableMinVersion"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Field.prototype, "_isMessage", { + get: $util.oneOfGetter($oneOfFields = ["isMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Field instance using the specified properties. + * @function create + * @memberof proto.Field + * @static + * @param {proto.IField=} [properties] Properties to set + * @returns {proto.Field} Field instance + */ + Field.create = function create(properties) { + return new Field(properties); + }; + + /** + * Encodes the specified Field message. Does not implicitly {@link proto.Field.verify|verify} messages. + * @function encode + * @memberof proto.Field + * @static + * @param {proto.IField} message Field message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Field.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.minVersion != null && Object.hasOwnProperty.call(message, "minVersion")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.minVersion); + if (message.maxVersion != null && Object.hasOwnProperty.call(message, "maxVersion")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.maxVersion); + if (message.notReportableMinVersion != null && Object.hasOwnProperty.call(message, "notReportableMinVersion")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.notReportableMinVersion); + if (message.isMessage != null && Object.hasOwnProperty.call(message, "isMessage")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.isMessage); + if (message.subfield != null && Object.hasOwnProperty.call(message, "subfield")) + for (var keys = Object.keys(message.subfield), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 0 =*/8).uint32(keys[i]); + $root.proto.Field.encode(message.subfield[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + return writer; + }; + + /** + * Encodes the specified Field message, length delimited. Does not implicitly {@link proto.Field.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Field + * @static + * @param {proto.IField} message Field message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Field.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Field message from the specified reader or buffer. + * @function decode + * @memberof proto.Field + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Field} Field + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Field.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.Field(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.minVersion = reader.uint32(); + break; + } + case 2: { + message.maxVersion = reader.uint32(); + break; + } + case 3: { + message.notReportableMinVersion = reader.uint32(); + break; + } + case 4: { + message.isMessage = reader.bool(); + break; + } + case 5: { + if (message.subfield === $util.emptyObject) + message.subfield = {}; + var end2 = reader.uint32() + reader.pos; + key = 0; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.uint32(); + break; + case 2: + value = $root.proto.Field.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.subfield[key] = value; + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Field message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Field + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Field} Field + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Field.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Field message. + * @function verify + * @memberof proto.Field + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Field.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.minVersion != null && message.hasOwnProperty("minVersion")) { + properties._minVersion = 1; + if (!$util.isInteger(message.minVersion)) + return "minVersion: integer expected"; + } + if (message.maxVersion != null && message.hasOwnProperty("maxVersion")) { + properties._maxVersion = 1; + if (!$util.isInteger(message.maxVersion)) + return "maxVersion: integer expected"; + } + if (message.notReportableMinVersion != null && message.hasOwnProperty("notReportableMinVersion")) { + properties._notReportableMinVersion = 1; + if (!$util.isInteger(message.notReportableMinVersion)) + return "notReportableMinVersion: integer expected"; + } + if (message.isMessage != null && message.hasOwnProperty("isMessage")) { + properties._isMessage = 1; + if (typeof message.isMessage !== "boolean") + return "isMessage: boolean expected"; + } + if (message.subfield != null && message.hasOwnProperty("subfield")) { + if (!$util.isObject(message.subfield)) + return "subfield: object expected"; + var key = Object.keys(message.subfield); + for (var i = 0; i < key.length; ++i) { + if (!$util.key32Re.test(key[i])) + return "subfield: integer key{k:uint32} expected"; + { + var error = $root.proto.Field.verify(message.subfield[key[i]]); + if (error) + return "subfield." + error; + } + } + } + return null; + }; + + /** + * Creates a Field message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Field + * @static + * @param {Object.} object Plain object + * @returns {proto.Field} Field + */ + Field.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Field) + return object; + var message = new $root.proto.Field(); + if (object.minVersion != null) + message.minVersion = object.minVersion >>> 0; + if (object.maxVersion != null) + message.maxVersion = object.maxVersion >>> 0; + if (object.notReportableMinVersion != null) + message.notReportableMinVersion = object.notReportableMinVersion >>> 0; + if (object.isMessage != null) + message.isMessage = Boolean(object.isMessage); + if (object.subfield) { + if (typeof object.subfield !== "object") + throw TypeError(".proto.Field.subfield: object expected"); + message.subfield = {}; + for (var keys = Object.keys(object.subfield), i = 0; i < keys.length; ++i) { + if (typeof object.subfield[keys[i]] !== "object") + throw TypeError(".proto.Field.subfield: object expected"); + message.subfield[keys[i]] = $root.proto.Field.fromObject(object.subfield[keys[i]]); + } + } + return message; + }; + + /** + * Creates a plain object from a Field message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Field + * @static + * @param {proto.Field} message Field + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Field.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.subfield = {}; + if (message.minVersion != null && message.hasOwnProperty("minVersion")) { + object.minVersion = message.minVersion; + if (options.oneofs) + object._minVersion = "minVersion"; + } + if (message.maxVersion != null && message.hasOwnProperty("maxVersion")) { + object.maxVersion = message.maxVersion; + if (options.oneofs) + object._maxVersion = "maxVersion"; + } + if (message.notReportableMinVersion != null && message.hasOwnProperty("notReportableMinVersion")) { + object.notReportableMinVersion = message.notReportableMinVersion; + if (options.oneofs) + object._notReportableMinVersion = "notReportableMinVersion"; + } + if (message.isMessage != null && message.hasOwnProperty("isMessage")) { + object.isMessage = message.isMessage; + if (options.oneofs) + object._isMessage = "isMessage"; + } + var keys2; + if (message.subfield && (keys2 = Object.keys(message.subfield)).length) { + object.subfield = {}; + for (var j = 0; j < keys2.length; ++j) + object.subfield[keys2[j]] = $root.proto.Field.toObject(message.subfield[keys2[j]], options); + } + return object; + }; + + /** + * Converts this Field to JSON. + * @function toJSON + * @memberof proto.Field + * @instance + * @returns {Object.} JSON object + */ + Field.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Field + * @function getTypeUrl + * @memberof proto.Field + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Field.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Field"; + }; + + return Field; + })(); + proto.GlobalSettings = (function() { /** @@ -18741,6 +42048,7 @@ $root.proto = (function() { * @property {number|null} [photoQualityMode] GlobalSettings photoQualityMode * @property {proto.INotificationSettings|null} [individualNotificationSettings] GlobalSettings individualNotificationSettings * @property {proto.INotificationSettings|null} [groupNotificationSettings] GlobalSettings groupNotificationSettings + * @property {proto.IChatLockSettings|null} [chatLockSettings] GlobalSettings chatLockSettings */ /** @@ -18768,11 +42076,11 @@ $root.proto = (function() { /** * GlobalSettings mediaVisibility. - * @member {proto.MediaVisibility} mediaVisibility + * @member {proto.MediaVisibility|null|undefined} mediaVisibility * @memberof proto.GlobalSettings * @instance */ - GlobalSettings.prototype.mediaVisibility = 0; + GlobalSettings.prototype.mediaVisibility = null; /** * GlobalSettings darkThemeWallpaper. @@ -18808,35 +42116,35 @@ $root.proto = (function() { /** * GlobalSettings showIndividualNotificationsPreview. - * @member {boolean} showIndividualNotificationsPreview + * @member {boolean|null|undefined} showIndividualNotificationsPreview * @memberof proto.GlobalSettings * @instance */ - GlobalSettings.prototype.showIndividualNotificationsPreview = false; + GlobalSettings.prototype.showIndividualNotificationsPreview = null; /** * GlobalSettings showGroupNotificationsPreview. - * @member {boolean} showGroupNotificationsPreview + * @member {boolean|null|undefined} showGroupNotificationsPreview * @memberof proto.GlobalSettings * @instance */ - GlobalSettings.prototype.showGroupNotificationsPreview = false; + GlobalSettings.prototype.showGroupNotificationsPreview = null; /** * GlobalSettings disappearingModeDuration. - * @member {number} disappearingModeDuration + * @member {number|null|undefined} disappearingModeDuration * @memberof proto.GlobalSettings * @instance */ - GlobalSettings.prototype.disappearingModeDuration = 0; + GlobalSettings.prototype.disappearingModeDuration = null; /** * GlobalSettings disappearingModeTimestamp. - * @member {number|Long} disappearingModeTimestamp + * @member {number|Long|null|undefined} disappearingModeTimestamp * @memberof proto.GlobalSettings * @instance */ - GlobalSettings.prototype.disappearingModeTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + GlobalSettings.prototype.disappearingModeTimestamp = null; /** * GlobalSettings avatarUserSettings. @@ -18848,43 +42156,43 @@ $root.proto = (function() { /** * GlobalSettings fontSize. - * @member {number} fontSize + * @member {number|null|undefined} fontSize * @memberof proto.GlobalSettings * @instance */ - GlobalSettings.prototype.fontSize = 0; + GlobalSettings.prototype.fontSize = null; /** * GlobalSettings securityNotifications. - * @member {boolean} securityNotifications + * @member {boolean|null|undefined} securityNotifications * @memberof proto.GlobalSettings * @instance */ - GlobalSettings.prototype.securityNotifications = false; + GlobalSettings.prototype.securityNotifications = null; /** * GlobalSettings autoUnarchiveChats. - * @member {boolean} autoUnarchiveChats + * @member {boolean|null|undefined} autoUnarchiveChats * @memberof proto.GlobalSettings * @instance */ - GlobalSettings.prototype.autoUnarchiveChats = false; + GlobalSettings.prototype.autoUnarchiveChats = null; /** * GlobalSettings videoQualityMode. - * @member {number} videoQualityMode + * @member {number|null|undefined} videoQualityMode * @memberof proto.GlobalSettings * @instance */ - GlobalSettings.prototype.videoQualityMode = 0; + GlobalSettings.prototype.videoQualityMode = null; /** * GlobalSettings photoQualityMode. - * @member {number} photoQualityMode + * @member {number|null|undefined} photoQualityMode * @memberof proto.GlobalSettings * @instance */ - GlobalSettings.prototype.photoQualityMode = 0; + GlobalSettings.prototype.photoQualityMode = null; /** * GlobalSettings individualNotificationSettings. @@ -18902,6 +42210,131 @@ $root.proto = (function() { */ GlobalSettings.prototype.groupNotificationSettings = null; + /** + * GlobalSettings chatLockSettings. + * @member {proto.IChatLockSettings|null|undefined} chatLockSettings + * @memberof proto.GlobalSettings + * @instance + */ + GlobalSettings.prototype.chatLockSettings = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(GlobalSettings.prototype, "_lightThemeWallpaper", { + get: $util.oneOfGetter($oneOfFields = ["lightThemeWallpaper"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(GlobalSettings.prototype, "_mediaVisibility", { + get: $util.oneOfGetter($oneOfFields = ["mediaVisibility"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(GlobalSettings.prototype, "_darkThemeWallpaper", { + get: $util.oneOfGetter($oneOfFields = ["darkThemeWallpaper"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(GlobalSettings.prototype, "_autoDownloadWiFi", { + get: $util.oneOfGetter($oneOfFields = ["autoDownloadWiFi"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(GlobalSettings.prototype, "_autoDownloadCellular", { + get: $util.oneOfGetter($oneOfFields = ["autoDownloadCellular"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(GlobalSettings.prototype, "_autoDownloadRoaming", { + get: $util.oneOfGetter($oneOfFields = ["autoDownloadRoaming"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(GlobalSettings.prototype, "_showIndividualNotificationsPreview", { + get: $util.oneOfGetter($oneOfFields = ["showIndividualNotificationsPreview"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(GlobalSettings.prototype, "_showGroupNotificationsPreview", { + get: $util.oneOfGetter($oneOfFields = ["showGroupNotificationsPreview"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(GlobalSettings.prototype, "_disappearingModeDuration", { + get: $util.oneOfGetter($oneOfFields = ["disappearingModeDuration"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(GlobalSettings.prototype, "_disappearingModeTimestamp", { + get: $util.oneOfGetter($oneOfFields = ["disappearingModeTimestamp"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(GlobalSettings.prototype, "_avatarUserSettings", { + get: $util.oneOfGetter($oneOfFields = ["avatarUserSettings"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(GlobalSettings.prototype, "_fontSize", { + get: $util.oneOfGetter($oneOfFields = ["fontSize"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(GlobalSettings.prototype, "_securityNotifications", { + get: $util.oneOfGetter($oneOfFields = ["securityNotifications"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(GlobalSettings.prototype, "_autoUnarchiveChats", { + get: $util.oneOfGetter($oneOfFields = ["autoUnarchiveChats"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(GlobalSettings.prototype, "_videoQualityMode", { + get: $util.oneOfGetter($oneOfFields = ["videoQualityMode"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(GlobalSettings.prototype, "_photoQualityMode", { + get: $util.oneOfGetter($oneOfFields = ["photoQualityMode"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(GlobalSettings.prototype, "_individualNotificationSettings", { + get: $util.oneOfGetter($oneOfFields = ["individualNotificationSettings"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(GlobalSettings.prototype, "_groupNotificationSettings", { + get: $util.oneOfGetter($oneOfFields = ["groupNotificationSettings"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(GlobalSettings.prototype, "_chatLockSettings", { + get: $util.oneOfGetter($oneOfFields = ["chatLockSettings"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new GlobalSettings instance using the specified properties. * @function create @@ -18962,6 +42395,8 @@ $root.proto = (function() { $root.proto.NotificationSettings.encode(message.individualNotificationSettings, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); if (message.groupNotificationSettings != null && Object.hasOwnProperty.call(message, "groupNotificationSettings")) $root.proto.NotificationSettings.encode(message.groupNotificationSettings, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + if (message.chatLockSettings != null && Object.hasOwnProperty.call(message, "chatLockSettings")) + $root.proto.ChatLockSettings.encode(message.chatLockSettings, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); return writer; }; @@ -18996,60 +42431,82 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.lightThemeWallpaper = $root.proto.WallpaperSettings.decode(reader, reader.uint32()); - break; - case 2: - message.mediaVisibility = reader.int32(); - break; - case 3: - message.darkThemeWallpaper = $root.proto.WallpaperSettings.decode(reader, reader.uint32()); - break; - case 4: - message.autoDownloadWiFi = $root.proto.AutoDownloadSettings.decode(reader, reader.uint32()); - break; - case 5: - message.autoDownloadCellular = $root.proto.AutoDownloadSettings.decode(reader, reader.uint32()); - break; - case 6: - message.autoDownloadRoaming = $root.proto.AutoDownloadSettings.decode(reader, reader.uint32()); - break; - case 7: - message.showIndividualNotificationsPreview = reader.bool(); - break; - case 8: - message.showGroupNotificationsPreview = reader.bool(); - break; - case 9: - message.disappearingModeDuration = reader.int32(); - break; - case 10: - message.disappearingModeTimestamp = reader.int64(); - break; - case 11: - message.avatarUserSettings = $root.proto.AvatarUserSettings.decode(reader, reader.uint32()); - break; - case 12: - message.fontSize = reader.int32(); - break; - case 13: - message.securityNotifications = reader.bool(); - break; - case 14: - message.autoUnarchiveChats = reader.bool(); - break; - case 15: - message.videoQualityMode = reader.int32(); - break; - case 16: - message.photoQualityMode = reader.int32(); - break; - case 17: - message.individualNotificationSettings = $root.proto.NotificationSettings.decode(reader, reader.uint32()); - break; - case 18: - message.groupNotificationSettings = $root.proto.NotificationSettings.decode(reader, reader.uint32()); - break; + case 1: { + message.lightThemeWallpaper = $root.proto.WallpaperSettings.decode(reader, reader.uint32()); + break; + } + case 2: { + message.mediaVisibility = reader.int32(); + break; + } + case 3: { + message.darkThemeWallpaper = $root.proto.WallpaperSettings.decode(reader, reader.uint32()); + break; + } + case 4: { + message.autoDownloadWiFi = $root.proto.AutoDownloadSettings.decode(reader, reader.uint32()); + break; + } + case 5: { + message.autoDownloadCellular = $root.proto.AutoDownloadSettings.decode(reader, reader.uint32()); + break; + } + case 6: { + message.autoDownloadRoaming = $root.proto.AutoDownloadSettings.decode(reader, reader.uint32()); + break; + } + case 7: { + message.showIndividualNotificationsPreview = reader.bool(); + break; + } + case 8: { + message.showGroupNotificationsPreview = reader.bool(); + break; + } + case 9: { + message.disappearingModeDuration = reader.int32(); + break; + } + case 10: { + message.disappearingModeTimestamp = reader.int64(); + break; + } + case 11: { + message.avatarUserSettings = $root.proto.AvatarUserSettings.decode(reader, reader.uint32()); + break; + } + case 12: { + message.fontSize = reader.int32(); + break; + } + case 13: { + message.securityNotifications = reader.bool(); + break; + } + case 14: { + message.autoUnarchiveChats = reader.bool(); + break; + } + case 15: { + message.videoQualityMode = reader.int32(); + break; + } + case 16: { + message.photoQualityMode = reader.int32(); + break; + } + case 17: { + message.individualNotificationSettings = $root.proto.NotificationSettings.decode(reader, reader.uint32()); + break; + } + case 18: { + message.groupNotificationSettings = $root.proto.NotificationSettings.decode(reader, reader.uint32()); + break; + } + case 19: { + message.chatLockSettings = $root.proto.ChatLockSettings.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -19085,12 +42542,17 @@ $root.proto = (function() { GlobalSettings.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; if (message.lightThemeWallpaper != null && message.hasOwnProperty("lightThemeWallpaper")) { - var error = $root.proto.WallpaperSettings.verify(message.lightThemeWallpaper); - if (error) - return "lightThemeWallpaper." + error; + properties._lightThemeWallpaper = 1; + { + var error = $root.proto.WallpaperSettings.verify(message.lightThemeWallpaper); + if (error) + return "lightThemeWallpaper." + error; + } } - if (message.mediaVisibility != null && message.hasOwnProperty("mediaVisibility")) + if (message.mediaVisibility != null && message.hasOwnProperty("mediaVisibility")) { + properties._mediaVisibility = 1; switch (message.mediaVisibility) { default: return "mediaVisibility: enum value expected"; @@ -19099,67 +42561,115 @@ $root.proto = (function() { case 2: break; } + } if (message.darkThemeWallpaper != null && message.hasOwnProperty("darkThemeWallpaper")) { - var error = $root.proto.WallpaperSettings.verify(message.darkThemeWallpaper); - if (error) - return "darkThemeWallpaper." + error; + properties._darkThemeWallpaper = 1; + { + var error = $root.proto.WallpaperSettings.verify(message.darkThemeWallpaper); + if (error) + return "darkThemeWallpaper." + error; + } } if (message.autoDownloadWiFi != null && message.hasOwnProperty("autoDownloadWiFi")) { - var error = $root.proto.AutoDownloadSettings.verify(message.autoDownloadWiFi); - if (error) - return "autoDownloadWiFi." + error; + properties._autoDownloadWiFi = 1; + { + var error = $root.proto.AutoDownloadSettings.verify(message.autoDownloadWiFi); + if (error) + return "autoDownloadWiFi." + error; + } } if (message.autoDownloadCellular != null && message.hasOwnProperty("autoDownloadCellular")) { - var error = $root.proto.AutoDownloadSettings.verify(message.autoDownloadCellular); - if (error) - return "autoDownloadCellular." + error; + properties._autoDownloadCellular = 1; + { + var error = $root.proto.AutoDownloadSettings.verify(message.autoDownloadCellular); + if (error) + return "autoDownloadCellular." + error; + } } if (message.autoDownloadRoaming != null && message.hasOwnProperty("autoDownloadRoaming")) { - var error = $root.proto.AutoDownloadSettings.verify(message.autoDownloadRoaming); - if (error) - return "autoDownloadRoaming." + error; + properties._autoDownloadRoaming = 1; + { + var error = $root.proto.AutoDownloadSettings.verify(message.autoDownloadRoaming); + if (error) + return "autoDownloadRoaming." + error; + } } - if (message.showIndividualNotificationsPreview != null && message.hasOwnProperty("showIndividualNotificationsPreview")) + if (message.showIndividualNotificationsPreview != null && message.hasOwnProperty("showIndividualNotificationsPreview")) { + properties._showIndividualNotificationsPreview = 1; if (typeof message.showIndividualNotificationsPreview !== "boolean") return "showIndividualNotificationsPreview: boolean expected"; - if (message.showGroupNotificationsPreview != null && message.hasOwnProperty("showGroupNotificationsPreview")) + } + if (message.showGroupNotificationsPreview != null && message.hasOwnProperty("showGroupNotificationsPreview")) { + properties._showGroupNotificationsPreview = 1; if (typeof message.showGroupNotificationsPreview !== "boolean") return "showGroupNotificationsPreview: boolean expected"; - if (message.disappearingModeDuration != null && message.hasOwnProperty("disappearingModeDuration")) + } + if (message.disappearingModeDuration != null && message.hasOwnProperty("disappearingModeDuration")) { + properties._disappearingModeDuration = 1; if (!$util.isInteger(message.disappearingModeDuration)) return "disappearingModeDuration: integer expected"; - if (message.disappearingModeTimestamp != null && message.hasOwnProperty("disappearingModeTimestamp")) + } + if (message.disappearingModeTimestamp != null && message.hasOwnProperty("disappearingModeTimestamp")) { + properties._disappearingModeTimestamp = 1; if (!$util.isInteger(message.disappearingModeTimestamp) && !(message.disappearingModeTimestamp && $util.isInteger(message.disappearingModeTimestamp.low) && $util.isInteger(message.disappearingModeTimestamp.high))) return "disappearingModeTimestamp: integer|Long expected"; - if (message.avatarUserSettings != null && message.hasOwnProperty("avatarUserSettings")) { - var error = $root.proto.AvatarUserSettings.verify(message.avatarUserSettings); - if (error) - return "avatarUserSettings." + error; } - if (message.fontSize != null && message.hasOwnProperty("fontSize")) + if (message.avatarUserSettings != null && message.hasOwnProperty("avatarUserSettings")) { + properties._avatarUserSettings = 1; + { + var error = $root.proto.AvatarUserSettings.verify(message.avatarUserSettings); + if (error) + return "avatarUserSettings." + error; + } + } + if (message.fontSize != null && message.hasOwnProperty("fontSize")) { + properties._fontSize = 1; if (!$util.isInteger(message.fontSize)) return "fontSize: integer expected"; - if (message.securityNotifications != null && message.hasOwnProperty("securityNotifications")) + } + if (message.securityNotifications != null && message.hasOwnProperty("securityNotifications")) { + properties._securityNotifications = 1; if (typeof message.securityNotifications !== "boolean") return "securityNotifications: boolean expected"; - if (message.autoUnarchiveChats != null && message.hasOwnProperty("autoUnarchiveChats")) + } + if (message.autoUnarchiveChats != null && message.hasOwnProperty("autoUnarchiveChats")) { + properties._autoUnarchiveChats = 1; if (typeof message.autoUnarchiveChats !== "boolean") return "autoUnarchiveChats: boolean expected"; - if (message.videoQualityMode != null && message.hasOwnProperty("videoQualityMode")) + } + if (message.videoQualityMode != null && message.hasOwnProperty("videoQualityMode")) { + properties._videoQualityMode = 1; if (!$util.isInteger(message.videoQualityMode)) return "videoQualityMode: integer expected"; - if (message.photoQualityMode != null && message.hasOwnProperty("photoQualityMode")) + } + if (message.photoQualityMode != null && message.hasOwnProperty("photoQualityMode")) { + properties._photoQualityMode = 1; if (!$util.isInteger(message.photoQualityMode)) return "photoQualityMode: integer expected"; + } if (message.individualNotificationSettings != null && message.hasOwnProperty("individualNotificationSettings")) { - var error = $root.proto.NotificationSettings.verify(message.individualNotificationSettings); - if (error) - return "individualNotificationSettings." + error; + properties._individualNotificationSettings = 1; + { + var error = $root.proto.NotificationSettings.verify(message.individualNotificationSettings); + if (error) + return "individualNotificationSettings." + error; + } } if (message.groupNotificationSettings != null && message.hasOwnProperty("groupNotificationSettings")) { - var error = $root.proto.NotificationSettings.verify(message.groupNotificationSettings); - if (error) - return "groupNotificationSettings." + error; + properties._groupNotificationSettings = 1; + { + var error = $root.proto.NotificationSettings.verify(message.groupNotificationSettings); + if (error) + return "groupNotificationSettings." + error; + } + } + if (message.chatLockSettings != null && message.hasOwnProperty("chatLockSettings")) { + properties._chatLockSettings = 1; + { + var error = $root.proto.ChatLockSettings.verify(message.chatLockSettings); + if (error) + return "chatLockSettings." + error; + } } return null; }; @@ -19182,6 +42692,12 @@ $root.proto = (function() { message.lightThemeWallpaper = $root.proto.WallpaperSettings.fromObject(object.lightThemeWallpaper); } switch (object.mediaVisibility) { + default: + if (typeof object.mediaVisibility === "number") { + message.mediaVisibility = object.mediaVisibility; + break; + } + break; case "DEFAULT": case 0: message.mediaVisibility = 0; @@ -19255,6 +42771,11 @@ $root.proto = (function() { throw TypeError(".proto.GlobalSettings.groupNotificationSettings: object expected"); message.groupNotificationSettings = $root.proto.NotificationSettings.fromObject(object.groupNotificationSettings); } + if (object.chatLockSettings != null) { + if (typeof object.chatLockSettings !== "object") + throw TypeError(".proto.GlobalSettings.chatLockSettings: object expected"); + message.chatLockSettings = $root.proto.ChatLockSettings.fromObject(object.chatLockSettings); + } return message; }; @@ -19271,69 +42792,104 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.lightThemeWallpaper = null; - object.mediaVisibility = options.enums === String ? "DEFAULT" : 0; - object.darkThemeWallpaper = null; - object.autoDownloadWiFi = null; - object.autoDownloadCellular = null; - object.autoDownloadRoaming = null; - object.showIndividualNotificationsPreview = false; - object.showGroupNotificationsPreview = false; - object.disappearingModeDuration = 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.disappearingModeTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.disappearingModeTimestamp = options.longs === String ? "0" : 0; - object.avatarUserSettings = null; - object.fontSize = 0; - object.securityNotifications = false; - object.autoUnarchiveChats = false; - object.videoQualityMode = 0; - object.photoQualityMode = 0; - object.individualNotificationSettings = null; - object.groupNotificationSettings = null; - } - if (message.lightThemeWallpaper != null && message.hasOwnProperty("lightThemeWallpaper")) + if (message.lightThemeWallpaper != null && message.hasOwnProperty("lightThemeWallpaper")) { object.lightThemeWallpaper = $root.proto.WallpaperSettings.toObject(message.lightThemeWallpaper, options); - if (message.mediaVisibility != null && message.hasOwnProperty("mediaVisibility")) - object.mediaVisibility = options.enums === String ? $root.proto.MediaVisibility[message.mediaVisibility] : message.mediaVisibility; - if (message.darkThemeWallpaper != null && message.hasOwnProperty("darkThemeWallpaper")) + if (options.oneofs) + object._lightThemeWallpaper = "lightThemeWallpaper"; + } + if (message.mediaVisibility != null && message.hasOwnProperty("mediaVisibility")) { + object.mediaVisibility = options.enums === String ? $root.proto.MediaVisibility[message.mediaVisibility] === undefined ? message.mediaVisibility : $root.proto.MediaVisibility[message.mediaVisibility] : message.mediaVisibility; + if (options.oneofs) + object._mediaVisibility = "mediaVisibility"; + } + if (message.darkThemeWallpaper != null && message.hasOwnProperty("darkThemeWallpaper")) { object.darkThemeWallpaper = $root.proto.WallpaperSettings.toObject(message.darkThemeWallpaper, options); - if (message.autoDownloadWiFi != null && message.hasOwnProperty("autoDownloadWiFi")) + if (options.oneofs) + object._darkThemeWallpaper = "darkThemeWallpaper"; + } + if (message.autoDownloadWiFi != null && message.hasOwnProperty("autoDownloadWiFi")) { object.autoDownloadWiFi = $root.proto.AutoDownloadSettings.toObject(message.autoDownloadWiFi, options); - if (message.autoDownloadCellular != null && message.hasOwnProperty("autoDownloadCellular")) + if (options.oneofs) + object._autoDownloadWiFi = "autoDownloadWiFi"; + } + if (message.autoDownloadCellular != null && message.hasOwnProperty("autoDownloadCellular")) { object.autoDownloadCellular = $root.proto.AutoDownloadSettings.toObject(message.autoDownloadCellular, options); - if (message.autoDownloadRoaming != null && message.hasOwnProperty("autoDownloadRoaming")) + if (options.oneofs) + object._autoDownloadCellular = "autoDownloadCellular"; + } + if (message.autoDownloadRoaming != null && message.hasOwnProperty("autoDownloadRoaming")) { object.autoDownloadRoaming = $root.proto.AutoDownloadSettings.toObject(message.autoDownloadRoaming, options); - if (message.showIndividualNotificationsPreview != null && message.hasOwnProperty("showIndividualNotificationsPreview")) + if (options.oneofs) + object._autoDownloadRoaming = "autoDownloadRoaming"; + } + if (message.showIndividualNotificationsPreview != null && message.hasOwnProperty("showIndividualNotificationsPreview")) { object.showIndividualNotificationsPreview = message.showIndividualNotificationsPreview; - if (message.showGroupNotificationsPreview != null && message.hasOwnProperty("showGroupNotificationsPreview")) + if (options.oneofs) + object._showIndividualNotificationsPreview = "showIndividualNotificationsPreview"; + } + if (message.showGroupNotificationsPreview != null && message.hasOwnProperty("showGroupNotificationsPreview")) { object.showGroupNotificationsPreview = message.showGroupNotificationsPreview; - if (message.disappearingModeDuration != null && message.hasOwnProperty("disappearingModeDuration")) + if (options.oneofs) + object._showGroupNotificationsPreview = "showGroupNotificationsPreview"; + } + if (message.disappearingModeDuration != null && message.hasOwnProperty("disappearingModeDuration")) { object.disappearingModeDuration = message.disappearingModeDuration; - if (message.disappearingModeTimestamp != null && message.hasOwnProperty("disappearingModeTimestamp")) + if (options.oneofs) + object._disappearingModeDuration = "disappearingModeDuration"; + } + if (message.disappearingModeTimestamp != null && message.hasOwnProperty("disappearingModeTimestamp")) { if (typeof message.disappearingModeTimestamp === "number") object.disappearingModeTimestamp = options.longs === String ? String(message.disappearingModeTimestamp) : message.disappearingModeTimestamp; else object.disappearingModeTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.disappearingModeTimestamp) : options.longs === Number ? new $util.LongBits(message.disappearingModeTimestamp.low >>> 0, message.disappearingModeTimestamp.high >>> 0).toNumber() : message.disappearingModeTimestamp; - if (message.avatarUserSettings != null && message.hasOwnProperty("avatarUserSettings")) + if (options.oneofs) + object._disappearingModeTimestamp = "disappearingModeTimestamp"; + } + if (message.avatarUserSettings != null && message.hasOwnProperty("avatarUserSettings")) { object.avatarUserSettings = $root.proto.AvatarUserSettings.toObject(message.avatarUserSettings, options); - if (message.fontSize != null && message.hasOwnProperty("fontSize")) + if (options.oneofs) + object._avatarUserSettings = "avatarUserSettings"; + } + if (message.fontSize != null && message.hasOwnProperty("fontSize")) { object.fontSize = message.fontSize; - if (message.securityNotifications != null && message.hasOwnProperty("securityNotifications")) + if (options.oneofs) + object._fontSize = "fontSize"; + } + if (message.securityNotifications != null && message.hasOwnProperty("securityNotifications")) { object.securityNotifications = message.securityNotifications; - if (message.autoUnarchiveChats != null && message.hasOwnProperty("autoUnarchiveChats")) + if (options.oneofs) + object._securityNotifications = "securityNotifications"; + } + if (message.autoUnarchiveChats != null && message.hasOwnProperty("autoUnarchiveChats")) { object.autoUnarchiveChats = message.autoUnarchiveChats; - if (message.videoQualityMode != null && message.hasOwnProperty("videoQualityMode")) + if (options.oneofs) + object._autoUnarchiveChats = "autoUnarchiveChats"; + } + if (message.videoQualityMode != null && message.hasOwnProperty("videoQualityMode")) { object.videoQualityMode = message.videoQualityMode; - if (message.photoQualityMode != null && message.hasOwnProperty("photoQualityMode")) + if (options.oneofs) + object._videoQualityMode = "videoQualityMode"; + } + if (message.photoQualityMode != null && message.hasOwnProperty("photoQualityMode")) { object.photoQualityMode = message.photoQualityMode; - if (message.individualNotificationSettings != null && message.hasOwnProperty("individualNotificationSettings")) + if (options.oneofs) + object._photoQualityMode = "photoQualityMode"; + } + if (message.individualNotificationSettings != null && message.hasOwnProperty("individualNotificationSettings")) { object.individualNotificationSettings = $root.proto.NotificationSettings.toObject(message.individualNotificationSettings, options); - if (message.groupNotificationSettings != null && message.hasOwnProperty("groupNotificationSettings")) + if (options.oneofs) + object._individualNotificationSettings = "individualNotificationSettings"; + } + if (message.groupNotificationSettings != null && message.hasOwnProperty("groupNotificationSettings")) { object.groupNotificationSettings = $root.proto.NotificationSettings.toObject(message.groupNotificationSettings, options); + if (options.oneofs) + object._groupNotificationSettings = "groupNotificationSettings"; + } + if (message.chatLockSettings != null && message.hasOwnProperty("chatLockSettings")) { + object.chatLockSettings = $root.proto.ChatLockSettings.toObject(message.chatLockSettings, options); + if (options.oneofs) + object._chatLockSettings = "chatLockSettings"; + } return object; }; @@ -19348,6 +42904,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GlobalSettings + * @function getTypeUrl + * @memberof proto.GlobalSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GlobalSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.GlobalSettings"; + }; + return GlobalSettings; })(); @@ -19378,19 +42949,34 @@ $root.proto = (function() { /** * GroupMention groupJid. - * @member {string} groupJid + * @member {string|null|undefined} groupJid * @memberof proto.GroupMention * @instance */ - GroupMention.prototype.groupJid = ""; + GroupMention.prototype.groupJid = null; /** * GroupMention groupSubject. - * @member {string} groupSubject + * @member {string|null|undefined} groupSubject * @memberof proto.GroupMention * @instance */ - GroupMention.prototype.groupSubject = ""; + GroupMention.prototype.groupSubject = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(GroupMention.prototype, "_groupJid", { + get: $util.oneOfGetter($oneOfFields = ["groupJid"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(GroupMention.prototype, "_groupSubject", { + get: $util.oneOfGetter($oneOfFields = ["groupSubject"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new GroupMention instance using the specified properties. @@ -19454,12 +43040,14 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.groupJid = reader.string(); - break; - case 2: - message.groupSubject = reader.string(); - break; + case 1: { + message.groupJid = reader.string(); + break; + } + case 2: { + message.groupSubject = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -19495,12 +43083,17 @@ $root.proto = (function() { GroupMention.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.groupJid != null && message.hasOwnProperty("groupJid")) + var properties = {}; + if (message.groupJid != null && message.hasOwnProperty("groupJid")) { + properties._groupJid = 1; if (!$util.isString(message.groupJid)) return "groupJid: string expected"; - if (message.groupSubject != null && message.hasOwnProperty("groupSubject")) + } + if (message.groupSubject != null && message.hasOwnProperty("groupSubject")) { + properties._groupSubject = 1; if (!$util.isString(message.groupSubject)) return "groupSubject: string expected"; + } return null; }; @@ -19536,14 +43129,16 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.groupJid = ""; - object.groupSubject = ""; - } - if (message.groupJid != null && message.hasOwnProperty("groupJid")) + if (message.groupJid != null && message.hasOwnProperty("groupJid")) { object.groupJid = message.groupJid; - if (message.groupSubject != null && message.hasOwnProperty("groupSubject")) + if (options.oneofs) + object._groupJid = "groupJid"; + } + if (message.groupSubject != null && message.hasOwnProperty("groupSubject")) { object.groupSubject = message.groupSubject; + if (options.oneofs) + object._groupSubject = "groupSubject"; + } return object; }; @@ -19558,6 +43153,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GroupMention + * @function getTypeUrl + * @memberof proto.GroupMention + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GroupMention.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.GroupMention"; + }; + return GroupMention; })(); @@ -19596,11 +43206,20 @@ $root.proto = (function() { /** * GroupParticipant rank. - * @member {proto.GroupParticipant.Rank} rank + * @member {proto.GroupParticipant.Rank|null|undefined} rank * @memberof proto.GroupParticipant * @instance */ - GroupParticipant.prototype.rank = 0; + GroupParticipant.prototype.rank = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(GroupParticipant.prototype, "_rank", { + get: $util.oneOfGetter($oneOfFields = ["rank"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new GroupParticipant instance using the specified properties. @@ -19663,12 +43282,14 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.userJid = reader.string(); - break; - case 2: - message.rank = reader.int32(); - break; + case 1: { + message.userJid = reader.string(); + break; + } + case 2: { + message.rank = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -19706,9 +43327,11 @@ $root.proto = (function() { GroupParticipant.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; if (!$util.isString(message.userJid)) return "userJid: string expected"; - if (message.rank != null && message.hasOwnProperty("rank")) + if (message.rank != null && message.hasOwnProperty("rank")) { + properties._rank = 1; switch (message.rank) { default: return "rank: enum value expected"; @@ -19717,6 +43340,7 @@ $root.proto = (function() { case 2: break; } + } return null; }; @@ -19735,6 +43359,12 @@ $root.proto = (function() { if (object.userJid != null) message.userJid = String(object.userJid); switch (object.rank) { + default: + if (typeof object.rank === "number") { + message.rank = object.rank; + break; + } + break; case "REGULAR": case 0: message.rank = 0; @@ -19764,14 +43394,15 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { + if (options.defaults) object.userJid = ""; - object.rank = options.enums === String ? "REGULAR" : 0; - } if (message.userJid != null && message.hasOwnProperty("userJid")) object.userJid = message.userJid; - if (message.rank != null && message.hasOwnProperty("rank")) - object.rank = options.enums === String ? $root.proto.GroupParticipant.Rank[message.rank] : message.rank; + if (message.rank != null && message.hasOwnProperty("rank")) { + object.rank = options.enums === String ? $root.proto.GroupParticipant.Rank[message.rank] === undefined ? message.rank : $root.proto.GroupParticipant.Rank[message.rank] : message.rank; + if (options.oneofs) + object._rank = "rank"; + } return object; }; @@ -19786,6 +43417,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GroupParticipant + * @function getTypeUrl + * @memberof proto.GroupParticipant + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GroupParticipant.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.GroupParticipant"; + }; + /** * Rank enum. * @name proto.GroupParticipant.Rank @@ -19855,6 +43501,27 @@ $root.proto = (function() { */ HandshakeMessage.prototype.clientFinish = null; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HandshakeMessage.prototype, "_clientHello", { + get: $util.oneOfGetter($oneOfFields = ["clientHello"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HandshakeMessage.prototype, "_serverHello", { + get: $util.oneOfGetter($oneOfFields = ["serverHello"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HandshakeMessage.prototype, "_clientFinish", { + get: $util.oneOfGetter($oneOfFields = ["clientFinish"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new HandshakeMessage instance using the specified properties. * @function create @@ -19919,15 +43586,18 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: - message.clientHello = $root.proto.HandshakeMessage.ClientHello.decode(reader, reader.uint32()); - break; - case 3: - message.serverHello = $root.proto.HandshakeMessage.ServerHello.decode(reader, reader.uint32()); - break; - case 4: - message.clientFinish = $root.proto.HandshakeMessage.ClientFinish.decode(reader, reader.uint32()); - break; + case 2: { + message.clientHello = $root.proto.HandshakeMessage.ClientHello.decode(reader, reader.uint32()); + break; + } + case 3: { + message.serverHello = $root.proto.HandshakeMessage.ServerHello.decode(reader, reader.uint32()); + break; + } + case 4: { + message.clientFinish = $root.proto.HandshakeMessage.ClientFinish.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -19963,20 +43633,30 @@ $root.proto = (function() { HandshakeMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; if (message.clientHello != null && message.hasOwnProperty("clientHello")) { - var error = $root.proto.HandshakeMessage.ClientHello.verify(message.clientHello); - if (error) - return "clientHello." + error; + properties._clientHello = 1; + { + 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.HandshakeMessage.ServerHello.verify(message.serverHello); - if (error) - return "serverHello." + error; + properties._serverHello = 1; + { + 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.HandshakeMessage.ClientFinish.verify(message.clientFinish); - if (error) - return "clientFinish." + error; + properties._clientFinish = 1; + { + var error = $root.proto.HandshakeMessage.ClientFinish.verify(message.clientFinish); + if (error) + return "clientFinish." + error; + } } return null; }; @@ -20024,17 +43704,21 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.clientHello = null; - object.serverHello = null; - object.clientFinish = null; - } - if (message.clientHello != null && message.hasOwnProperty("clientHello")) + if (message.clientHello != null && message.hasOwnProperty("clientHello")) { object.clientHello = $root.proto.HandshakeMessage.ClientHello.toObject(message.clientHello, options); - if (message.serverHello != null && message.hasOwnProperty("serverHello")) + if (options.oneofs) + object._clientHello = "clientHello"; + } + if (message.serverHello != null && message.hasOwnProperty("serverHello")) { object.serverHello = $root.proto.HandshakeMessage.ServerHello.toObject(message.serverHello, options); - if (message.clientFinish != null && message.hasOwnProperty("clientFinish")) + if (options.oneofs) + object._serverHello = "serverHello"; + } + if (message.clientFinish != null && message.hasOwnProperty("clientFinish")) { object.clientFinish = $root.proto.HandshakeMessage.ClientFinish.toObject(message.clientFinish, options); + if (options.oneofs) + object._clientFinish = "clientFinish"; + } return object; }; @@ -20049,6 +43733,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for HandshakeMessage + * @function getTypeUrl + * @memberof proto.HandshakeMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HandshakeMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.HandshakeMessage"; + }; + HandshakeMessage.ClientFinish = (function() { /** @@ -20076,19 +43775,34 @@ $root.proto = (function() { /** * ClientFinish static. - * @member {Uint8Array} static + * @member {Uint8Array|null|undefined} static * @memberof proto.HandshakeMessage.ClientFinish * @instance */ - ClientFinish.prototype["static"] = $util.newBuffer([]); + ClientFinish.prototype["static"] = null; /** * ClientFinish payload. - * @member {Uint8Array} payload + * @member {Uint8Array|null|undefined} payload * @memberof proto.HandshakeMessage.ClientFinish * @instance */ - ClientFinish.prototype.payload = $util.newBuffer([]); + ClientFinish.prototype.payload = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ClientFinish.prototype, "_static", { + get: $util.oneOfGetter($oneOfFields = ["static"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ClientFinish.prototype, "_payload", { + get: $util.oneOfGetter($oneOfFields = ["payload"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new ClientFinish instance using the specified properties. @@ -20152,12 +43866,14 @@ $root.proto = (function() { 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; + case 1: { + message["static"] = reader.bytes(); + break; + } + case 2: { + message.payload = reader.bytes(); + break; + } default: reader.skipType(tag & 7); break; @@ -20193,12 +43909,17 @@ $root.proto = (function() { ClientFinish.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message["static"] != null && message.hasOwnProperty("static")) + var properties = {}; + if (message["static"] != null && message.hasOwnProperty("static")) { + properties._static = 1; 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 != null && message.hasOwnProperty("payload")) { + properties._payload = 1; if (!(message.payload && typeof message.payload.length === "number" || $util.isString(message.payload))) return "payload: buffer expected"; + } return null; }; @@ -20217,12 +43938,12 @@ $root.proto = (function() { 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) + else if (object["static"].length >= 0) 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) + else if (object.payload.length >= 0) message.payload = object.payload; return message; }; @@ -20240,26 +43961,16 @@ $root.proto = (function() { 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")) + 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")) + if (options.oneofs) + object._static = "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; + if (options.oneofs) + object._payload = "payload"; + } return object; }; @@ -20274,6 +43985,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ClientFinish + * @function getTypeUrl + * @memberof proto.HandshakeMessage.ClientFinish + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ClientFinish.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.HandshakeMessage.ClientFinish"; + }; + return ClientFinish; })(); @@ -20305,27 +44031,48 @@ $root.proto = (function() { /** * ClientHello ephemeral. - * @member {Uint8Array} ephemeral + * @member {Uint8Array|null|undefined} ephemeral * @memberof proto.HandshakeMessage.ClientHello * @instance */ - ClientHello.prototype.ephemeral = $util.newBuffer([]); + ClientHello.prototype.ephemeral = null; /** * ClientHello static. - * @member {Uint8Array} static + * @member {Uint8Array|null|undefined} static * @memberof proto.HandshakeMessage.ClientHello * @instance */ - ClientHello.prototype["static"] = $util.newBuffer([]); + ClientHello.prototype["static"] = null; /** * ClientHello payload. - * @member {Uint8Array} payload + * @member {Uint8Array|null|undefined} payload * @memberof proto.HandshakeMessage.ClientHello * @instance */ - ClientHello.prototype.payload = $util.newBuffer([]); + ClientHello.prototype.payload = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ClientHello.prototype, "_ephemeral", { + get: $util.oneOfGetter($oneOfFields = ["ephemeral"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ClientHello.prototype, "_static", { + get: $util.oneOfGetter($oneOfFields = ["static"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ClientHello.prototype, "_payload", { + get: $util.oneOfGetter($oneOfFields = ["payload"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new ClientHello instance using the specified properties. @@ -20391,15 +44138,18 @@ $root.proto = (function() { 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; + 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; @@ -20435,15 +44185,22 @@ $root.proto = (function() { ClientHello.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.ephemeral != null && message.hasOwnProperty("ephemeral")) + var properties = {}; + if (message.ephemeral != null && message.hasOwnProperty("ephemeral")) { + properties._ephemeral = 1; 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"] != null && message.hasOwnProperty("static")) { + properties._static = 1; 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 != null && message.hasOwnProperty("payload")) { + properties._payload = 1; if (!(message.payload && typeof message.payload.length === "number" || $util.isString(message.payload))) return "payload: buffer expected"; + } return null; }; @@ -20462,17 +44219,17 @@ $root.proto = (function() { 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) + else if (object.ephemeral.length >= 0) 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) + else if (object["static"].length >= 0) 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) + else if (object.payload.length >= 0) message.payload = object.payload; return message; }; @@ -20490,35 +44247,21 @@ $root.proto = (function() { 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")) + 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")) + if (options.oneofs) + object._ephemeral = "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")) + if (options.oneofs) + object._static = "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; + if (options.oneofs) + object._payload = "payload"; + } return object; }; @@ -20533,6 +44276,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ClientHello + * @function getTypeUrl + * @memberof proto.HandshakeMessage.ClientHello + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ClientHello.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.HandshakeMessage.ClientHello"; + }; + return ClientHello; })(); @@ -20564,27 +44322,48 @@ $root.proto = (function() { /** * ServerHello ephemeral. - * @member {Uint8Array} ephemeral + * @member {Uint8Array|null|undefined} ephemeral * @memberof proto.HandshakeMessage.ServerHello * @instance */ - ServerHello.prototype.ephemeral = $util.newBuffer([]); + ServerHello.prototype.ephemeral = null; /** * ServerHello static. - * @member {Uint8Array} static + * @member {Uint8Array|null|undefined} static * @memberof proto.HandshakeMessage.ServerHello * @instance */ - ServerHello.prototype["static"] = $util.newBuffer([]); + ServerHello.prototype["static"] = null; /** * ServerHello payload. - * @member {Uint8Array} payload + * @member {Uint8Array|null|undefined} payload * @memberof proto.HandshakeMessage.ServerHello * @instance */ - ServerHello.prototype.payload = $util.newBuffer([]); + ServerHello.prototype.payload = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ServerHello.prototype, "_ephemeral", { + get: $util.oneOfGetter($oneOfFields = ["ephemeral"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ServerHello.prototype, "_static", { + get: $util.oneOfGetter($oneOfFields = ["static"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ServerHello.prototype, "_payload", { + get: $util.oneOfGetter($oneOfFields = ["payload"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new ServerHello instance using the specified properties. @@ -20650,15 +44429,18 @@ $root.proto = (function() { 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; + 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; @@ -20694,15 +44476,22 @@ $root.proto = (function() { ServerHello.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.ephemeral != null && message.hasOwnProperty("ephemeral")) + var properties = {}; + if (message.ephemeral != null && message.hasOwnProperty("ephemeral")) { + properties._ephemeral = 1; 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"] != null && message.hasOwnProperty("static")) { + properties._static = 1; 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 != null && message.hasOwnProperty("payload")) { + properties._payload = 1; if (!(message.payload && typeof message.payload.length === "number" || $util.isString(message.payload))) return "payload: buffer expected"; + } return null; }; @@ -20721,17 +44510,17 @@ $root.proto = (function() { 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) + else if (object.ephemeral.length >= 0) 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) + else if (object["static"].length >= 0) 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) + else if (object.payload.length >= 0) message.payload = object.payload; return message; }; @@ -20749,35 +44538,21 @@ $root.proto = (function() { 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")) + 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")) + if (options.oneofs) + object._ephemeral = "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")) + if (options.oneofs) + object._static = "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; + if (options.oneofs) + object._payload = "payload"; + } return object; }; @@ -20792,6 +44567,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ServerHello + * @function getTypeUrl + * @memberof proto.HandshakeMessage.ServerHello + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServerHello.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.HandshakeMessage.ServerHello"; + }; + return ServerHello; })(); @@ -20818,6 +44608,8 @@ $root.proto = (function() { * @property {Array.|null} [callLogRecords] HistorySync callLogRecords * @property {proto.HistorySync.BotAIWaitListState|null} [aiWaitListState] HistorySync aiWaitListState * @property {Array.|null} [phoneNumberToLidMappings] HistorySync phoneNumberToLidMappings + * @property {string|null} [companionMetaNonce] HistorySync companionMetaNonce + * @property {Uint8Array|null} [shareableChatIdentifierEncryptionKey] HistorySync shareableChatIdentifierEncryptionKey */ /** @@ -20868,19 +44660,19 @@ $root.proto = (function() { /** * HistorySync chunkOrder. - * @member {number} chunkOrder + * @member {number|null|undefined} chunkOrder * @memberof proto.HistorySync * @instance */ - HistorySync.prototype.chunkOrder = 0; + HistorySync.prototype.chunkOrder = null; /** * HistorySync progress. - * @member {number} progress + * @member {number|null|undefined} progress * @memberof proto.HistorySync * @instance */ - HistorySync.prototype.progress = 0; + HistorySync.prototype.progress = null; /** * HistorySync pushnames. @@ -20900,19 +44692,19 @@ $root.proto = (function() { /** * HistorySync threadIdUserSecret. - * @member {Uint8Array} threadIdUserSecret + * @member {Uint8Array|null|undefined} threadIdUserSecret * @memberof proto.HistorySync * @instance */ - HistorySync.prototype.threadIdUserSecret = $util.newBuffer([]); + HistorySync.prototype.threadIdUserSecret = null; /** * HistorySync threadDsTimeframeOffset. - * @member {number} threadDsTimeframeOffset + * @member {number|null|undefined} threadDsTimeframeOffset * @memberof proto.HistorySync * @instance */ - HistorySync.prototype.threadDsTimeframeOffset = 0; + HistorySync.prototype.threadDsTimeframeOffset = null; /** * HistorySync recentStickers. @@ -20940,11 +44732,11 @@ $root.proto = (function() { /** * HistorySync aiWaitListState. - * @member {proto.HistorySync.BotAIWaitListState} aiWaitListState + * @member {proto.HistorySync.BotAIWaitListState|null|undefined} aiWaitListState * @memberof proto.HistorySync * @instance */ - HistorySync.prototype.aiWaitListState = 0; + HistorySync.prototype.aiWaitListState = null; /** * HistorySync phoneNumberToLidMappings. @@ -20954,6 +44746,73 @@ $root.proto = (function() { */ HistorySync.prototype.phoneNumberToLidMappings = $util.emptyArray; + /** + * HistorySync companionMetaNonce. + * @member {string|null|undefined} companionMetaNonce + * @memberof proto.HistorySync + * @instance + */ + HistorySync.prototype.companionMetaNonce = null; + + /** + * HistorySync shareableChatIdentifierEncryptionKey. + * @member {Uint8Array|null|undefined} shareableChatIdentifierEncryptionKey + * @memberof proto.HistorySync + * @instance + */ + HistorySync.prototype.shareableChatIdentifierEncryptionKey = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HistorySync.prototype, "_chunkOrder", { + get: $util.oneOfGetter($oneOfFields = ["chunkOrder"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HistorySync.prototype, "_progress", { + get: $util.oneOfGetter($oneOfFields = ["progress"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HistorySync.prototype, "_globalSettings", { + get: $util.oneOfGetter($oneOfFields = ["globalSettings"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HistorySync.prototype, "_threadIdUserSecret", { + get: $util.oneOfGetter($oneOfFields = ["threadIdUserSecret"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HistorySync.prototype, "_threadDsTimeframeOffset", { + get: $util.oneOfGetter($oneOfFields = ["threadDsTimeframeOffset"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HistorySync.prototype, "_aiWaitListState", { + get: $util.oneOfGetter($oneOfFields = ["aiWaitListState"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HistorySync.prototype, "_companionMetaNonce", { + get: $util.oneOfGetter($oneOfFields = ["companionMetaNonce"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HistorySync.prototype, "_shareableChatIdentifierEncryptionKey", { + get: $util.oneOfGetter($oneOfFields = ["shareableChatIdentifierEncryptionKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new HistorySync instance using the specified properties. * @function create @@ -21012,6 +44871,10 @@ $root.proto = (function() { if (message.phoneNumberToLidMappings != null && message.phoneNumberToLidMappings.length) for (var i = 0; i < message.phoneNumberToLidMappings.length; ++i) $root.proto.PhoneNumberToLIDMapping.encode(message.phoneNumberToLidMappings[i], writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.companionMetaNonce != null && Object.hasOwnProperty.call(message, "companionMetaNonce")) + writer.uint32(/* id 16, wireType 2 =*/130).string(message.companionMetaNonce); + if (message.shareableChatIdentifierEncryptionKey != null && Object.hasOwnProperty.call(message, "shareableChatIdentifierEncryptionKey")) + writer.uint32(/* id 17, wireType 2 =*/138).bytes(message.shareableChatIdentifierEncryptionKey); return writer; }; @@ -21046,62 +44909,84 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.syncType = reader.int32(); - break; - case 2: - if (!(message.conversations && message.conversations.length)) - message.conversations = []; - message.conversations.push($root.proto.Conversation.decode(reader, reader.uint32())); - break; - case 3: - if (!(message.statusV3Messages && message.statusV3Messages.length)) - message.statusV3Messages = []; - message.statusV3Messages.push($root.proto.WebMessageInfo.decode(reader, reader.uint32())); - break; - case 5: - message.chunkOrder = reader.uint32(); - break; - case 6: - message.progress = reader.uint32(); - break; - case 7: - if (!(message.pushnames && message.pushnames.length)) - message.pushnames = []; - message.pushnames.push($root.proto.Pushname.decode(reader, reader.uint32())); - break; - case 8: - message.globalSettings = $root.proto.GlobalSettings.decode(reader, reader.uint32()); - break; - case 9: - message.threadIdUserSecret = reader.bytes(); - break; - case 10: - message.threadDsTimeframeOffset = reader.uint32(); - break; - 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; - case 13: - if (!(message.callLogRecords && message.callLogRecords.length)) - message.callLogRecords = []; - message.callLogRecords.push($root.proto.CallLogRecord.decode(reader, reader.uint32())); - break; - case 14: - message.aiWaitListState = reader.int32(); - break; - case 15: - if (!(message.phoneNumberToLidMappings && message.phoneNumberToLidMappings.length)) - message.phoneNumberToLidMappings = []; - message.phoneNumberToLidMappings.push($root.proto.PhoneNumberToLIDMapping.decode(reader, reader.uint32())); - break; + case 1: { + message.syncType = reader.int32(); + break; + } + case 2: { + if (!(message.conversations && message.conversations.length)) + message.conversations = []; + message.conversations.push($root.proto.Conversation.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.statusV3Messages && message.statusV3Messages.length)) + message.statusV3Messages = []; + message.statusV3Messages.push($root.proto.WebMessageInfo.decode(reader, reader.uint32())); + break; + } + case 5: { + message.chunkOrder = reader.uint32(); + break; + } + case 6: { + message.progress = reader.uint32(); + break; + } + case 7: { + if (!(message.pushnames && message.pushnames.length)) + message.pushnames = []; + message.pushnames.push($root.proto.Pushname.decode(reader, reader.uint32())); + break; + } + case 8: { + message.globalSettings = $root.proto.GlobalSettings.decode(reader, reader.uint32()); + break; + } + case 9: { + message.threadIdUserSecret = reader.bytes(); + break; + } + case 10: { + message.threadDsTimeframeOffset = reader.uint32(); + break; + } + 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; + } + case 13: { + if (!(message.callLogRecords && message.callLogRecords.length)) + message.callLogRecords = []; + message.callLogRecords.push($root.proto.CallLogRecord.decode(reader, reader.uint32())); + break; + } + case 14: { + message.aiWaitListState = reader.int32(); + break; + } + case 15: { + if (!(message.phoneNumberToLidMappings && message.phoneNumberToLidMappings.length)) + message.phoneNumberToLidMappings = []; + message.phoneNumberToLidMappings.push($root.proto.PhoneNumberToLIDMapping.decode(reader, reader.uint32())); + break; + } + case 16: { + message.companionMetaNonce = reader.string(); + break; + } + case 17: { + message.shareableChatIdentifierEncryptionKey = reader.bytes(); + break; + } default: reader.skipType(tag & 7); break; @@ -21139,6 +45024,7 @@ $root.proto = (function() { HistorySync.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; switch (message.syncType) { default: return "syncType: enum value expected"; @@ -21169,12 +45055,16 @@ $root.proto = (function() { return "statusV3Messages." + error; } } - if (message.chunkOrder != null && message.hasOwnProperty("chunkOrder")) + if (message.chunkOrder != null && message.hasOwnProperty("chunkOrder")) { + properties._chunkOrder = 1; if (!$util.isInteger(message.chunkOrder)) return "chunkOrder: integer expected"; - if (message.progress != null && message.hasOwnProperty("progress")) + } + if (message.progress != null && message.hasOwnProperty("progress")) { + properties._progress = 1; if (!$util.isInteger(message.progress)) return "progress: integer expected"; + } if (message.pushnames != null && message.hasOwnProperty("pushnames")) { if (!Array.isArray(message.pushnames)) return "pushnames: array expected"; @@ -21185,16 +45075,23 @@ $root.proto = (function() { } } if (message.globalSettings != null && message.hasOwnProperty("globalSettings")) { - var error = $root.proto.GlobalSettings.verify(message.globalSettings); - if (error) - return "globalSettings." + error; + properties._globalSettings = 1; + { + var error = $root.proto.GlobalSettings.verify(message.globalSettings); + if (error) + return "globalSettings." + error; + } } - if (message.threadIdUserSecret != null && message.hasOwnProperty("threadIdUserSecret")) + if (message.threadIdUserSecret != null && message.hasOwnProperty("threadIdUserSecret")) { + properties._threadIdUserSecret = 1; if (!(message.threadIdUserSecret && typeof message.threadIdUserSecret.length === "number" || $util.isString(message.threadIdUserSecret))) return "threadIdUserSecret: buffer expected"; - if (message.threadDsTimeframeOffset != null && message.hasOwnProperty("threadDsTimeframeOffset")) + } + if (message.threadDsTimeframeOffset != null && message.hasOwnProperty("threadDsTimeframeOffset")) { + properties._threadDsTimeframeOffset = 1; 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"; @@ -21222,7 +45119,8 @@ $root.proto = (function() { return "callLogRecords." + error; } } - if (message.aiWaitListState != null && message.hasOwnProperty("aiWaitListState")) + if (message.aiWaitListState != null && message.hasOwnProperty("aiWaitListState")) { + properties._aiWaitListState = 1; switch (message.aiWaitListState) { default: return "aiWaitListState: enum value expected"; @@ -21230,6 +45128,7 @@ $root.proto = (function() { case 1: break; } + } if (message.phoneNumberToLidMappings != null && message.hasOwnProperty("phoneNumberToLidMappings")) { if (!Array.isArray(message.phoneNumberToLidMappings)) return "phoneNumberToLidMappings: array expected"; @@ -21239,6 +45138,16 @@ $root.proto = (function() { return "phoneNumberToLidMappings." + error; } } + if (message.companionMetaNonce != null && message.hasOwnProperty("companionMetaNonce")) { + properties._companionMetaNonce = 1; + if (!$util.isString(message.companionMetaNonce)) + return "companionMetaNonce: string expected"; + } + if (message.shareableChatIdentifierEncryptionKey != null && message.hasOwnProperty("shareableChatIdentifierEncryptionKey")) { + properties._shareableChatIdentifierEncryptionKey = 1; + if (!(message.shareableChatIdentifierEncryptionKey && typeof message.shareableChatIdentifierEncryptionKey.length === "number" || $util.isString(message.shareableChatIdentifierEncryptionKey))) + return "shareableChatIdentifierEncryptionKey: buffer expected"; + } return null; }; @@ -21255,6 +45164,12 @@ $root.proto = (function() { return object; var message = new $root.proto.HistorySync(); switch (object.syncType) { + default: + if (typeof object.syncType === "number") { + message.syncType = object.syncType; + break; + } + break; case "INITIAL_BOOTSTRAP": case 0: message.syncType = 0; @@ -21326,7 +45241,7 @@ $root.proto = (function() { if (object.threadIdUserSecret != null) if (typeof object.threadIdUserSecret === "string") $util.base64.decode(object.threadIdUserSecret, message.threadIdUserSecret = $util.newBuffer($util.base64.length(object.threadIdUserSecret)), 0); - else if (object.threadIdUserSecret.length) + else if (object.threadIdUserSecret.length >= 0) message.threadIdUserSecret = object.threadIdUserSecret; if (object.threadDsTimeframeOffset != null) message.threadDsTimeframeOffset = object.threadDsTimeframeOffset >>> 0; @@ -21361,6 +45276,12 @@ $root.proto = (function() { } } switch (object.aiWaitListState) { + default: + if (typeof object.aiWaitListState === "number") { + message.aiWaitListState = object.aiWaitListState; + break; + } + break; case "IN_WAITLIST": case 0: message.aiWaitListState = 0; @@ -21380,6 +45301,13 @@ $root.proto = (function() { message.phoneNumberToLidMappings[i] = $root.proto.PhoneNumberToLIDMapping.fromObject(object.phoneNumberToLidMappings[i]); } } + if (object.companionMetaNonce != null) + message.companionMetaNonce = String(object.companionMetaNonce); + if (object.shareableChatIdentifierEncryptionKey != null) + if (typeof object.shareableChatIdentifierEncryptionKey === "string") + $util.base64.decode(object.shareableChatIdentifierEncryptionKey, message.shareableChatIdentifierEncryptionKey = $util.newBuffer($util.base64.length(object.shareableChatIdentifierEncryptionKey)), 0); + else if (object.shareableChatIdentifierEncryptionKey.length >= 0) + message.shareableChatIdentifierEncryptionKey = object.shareableChatIdentifierEncryptionKey; return message; }; @@ -21405,23 +45333,10 @@ $root.proto = (function() { object.callLogRecords = []; object.phoneNumberToLidMappings = []; } - if (options.defaults) { + if (options.defaults) object.syncType = options.enums === String ? "INITIAL_BOOTSTRAP" : 0; - object.chunkOrder = 0; - object.progress = 0; - object.globalSettings = null; - if (options.bytes === String) - object.threadIdUserSecret = ""; - else { - object.threadIdUserSecret = []; - if (options.bytes !== Array) - object.threadIdUserSecret = $util.newBuffer(object.threadIdUserSecret); - } - object.threadDsTimeframeOffset = 0; - object.aiWaitListState = options.enums === String ? "IN_WAITLIST" : 0; - } if (message.syncType != null && message.hasOwnProperty("syncType")) - object.syncType = options.enums === String ? $root.proto.HistorySync.HistorySyncType[message.syncType] : message.syncType; + object.syncType = options.enums === String ? $root.proto.HistorySync.HistorySyncType[message.syncType] === undefined ? message.syncType : $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) @@ -21432,21 +45347,36 @@ $root.proto = (function() { for (var j = 0; j < message.statusV3Messages.length; ++j) object.statusV3Messages[j] = $root.proto.WebMessageInfo.toObject(message.statusV3Messages[j], options); } - if (message.chunkOrder != null && message.hasOwnProperty("chunkOrder")) + if (message.chunkOrder != null && message.hasOwnProperty("chunkOrder")) { object.chunkOrder = message.chunkOrder; - if (message.progress != null && message.hasOwnProperty("progress")) + if (options.oneofs) + object._chunkOrder = "chunkOrder"; + } + if (message.progress != null && message.hasOwnProperty("progress")) { object.progress = message.progress; + if (options.oneofs) + object._progress = "progress"; + } if (message.pushnames && message.pushnames.length) { object.pushnames = []; for (var j = 0; j < message.pushnames.length; ++j) object.pushnames[j] = $root.proto.Pushname.toObject(message.pushnames[j], options); } - if (message.globalSettings != null && message.hasOwnProperty("globalSettings")) + if (message.globalSettings != null && message.hasOwnProperty("globalSettings")) { object.globalSettings = $root.proto.GlobalSettings.toObject(message.globalSettings, options); - if (message.threadIdUserSecret != null && message.hasOwnProperty("threadIdUserSecret")) + if (options.oneofs) + object._globalSettings = "globalSettings"; + } + if (message.threadIdUserSecret != null && message.hasOwnProperty("threadIdUserSecret")) { object.threadIdUserSecret = options.bytes === String ? $util.base64.encode(message.threadIdUserSecret, 0, message.threadIdUserSecret.length) : options.bytes === Array ? Array.prototype.slice.call(message.threadIdUserSecret) : message.threadIdUserSecret; - if (message.threadDsTimeframeOffset != null && message.hasOwnProperty("threadDsTimeframeOffset")) + if (options.oneofs) + object._threadIdUserSecret = "threadIdUserSecret"; + } + if (message.threadDsTimeframeOffset != null && message.hasOwnProperty("threadDsTimeframeOffset")) { object.threadDsTimeframeOffset = message.threadDsTimeframeOffset; + if (options.oneofs) + object._threadDsTimeframeOffset = "threadDsTimeframeOffset"; + } if (message.recentStickers && message.recentStickers.length) { object.recentStickers = []; for (var j = 0; j < message.recentStickers.length; ++j) @@ -21462,13 +45392,26 @@ $root.proto = (function() { for (var j = 0; j < message.callLogRecords.length; ++j) object.callLogRecords[j] = $root.proto.CallLogRecord.toObject(message.callLogRecords[j], options); } - if (message.aiWaitListState != null && message.hasOwnProperty("aiWaitListState")) - object.aiWaitListState = options.enums === String ? $root.proto.HistorySync.BotAIWaitListState[message.aiWaitListState] : message.aiWaitListState; + if (message.aiWaitListState != null && message.hasOwnProperty("aiWaitListState")) { + object.aiWaitListState = options.enums === String ? $root.proto.HistorySync.BotAIWaitListState[message.aiWaitListState] === undefined ? message.aiWaitListState : $root.proto.HistorySync.BotAIWaitListState[message.aiWaitListState] : message.aiWaitListState; + if (options.oneofs) + object._aiWaitListState = "aiWaitListState"; + } if (message.phoneNumberToLidMappings && message.phoneNumberToLidMappings.length) { object.phoneNumberToLidMappings = []; for (var j = 0; j < message.phoneNumberToLidMappings.length; ++j) object.phoneNumberToLidMappings[j] = $root.proto.PhoneNumberToLIDMapping.toObject(message.phoneNumberToLidMappings[j], options); } + if (message.companionMetaNonce != null && message.hasOwnProperty("companionMetaNonce")) { + object.companionMetaNonce = message.companionMetaNonce; + if (options.oneofs) + object._companionMetaNonce = "companionMetaNonce"; + } + if (message.shareableChatIdentifierEncryptionKey != null && message.hasOwnProperty("shareableChatIdentifierEncryptionKey")) { + object.shareableChatIdentifierEncryptionKey = options.bytes === String ? $util.base64.encode(message.shareableChatIdentifierEncryptionKey, 0, message.shareableChatIdentifierEncryptionKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.shareableChatIdentifierEncryptionKey) : message.shareableChatIdentifierEncryptionKey; + if (options.oneofs) + object._shareableChatIdentifierEncryptionKey = "shareableChatIdentifierEncryptionKey"; + } return object; }; @@ -21483,6 +45426,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for HistorySync + * @function getTypeUrl + * @memberof proto.HistorySync + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HistorySync.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.HistorySync"; + }; + /** * BotAIWaitListState enum. * @name proto.HistorySync.BotAIWaitListState @@ -21559,11 +45517,26 @@ $root.proto = (function() { /** * HistorySyncMsg msgOrderId. - * @member {number|Long} msgOrderId + * @member {number|Long|null|undefined} msgOrderId * @memberof proto.HistorySyncMsg * @instance */ - HistorySyncMsg.prototype.msgOrderId = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + HistorySyncMsg.prototype.msgOrderId = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HistorySyncMsg.prototype, "_message", { + get: $util.oneOfGetter($oneOfFields = ["message"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HistorySyncMsg.prototype, "_msgOrderId", { + get: $util.oneOfGetter($oneOfFields = ["msgOrderId"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new HistorySyncMsg instance using the specified properties. @@ -21627,12 +45600,14 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.message = $root.proto.WebMessageInfo.decode(reader, reader.uint32()); - break; - case 2: - message.msgOrderId = reader.uint64(); - break; + case 1: { + message.message = $root.proto.WebMessageInfo.decode(reader, reader.uint32()); + break; + } + case 2: { + message.msgOrderId = reader.uint64(); + break; + } default: reader.skipType(tag & 7); break; @@ -21668,14 +45643,20 @@ $root.proto = (function() { HistorySyncMsg.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; if (message.message != null && message.hasOwnProperty("message")) { - var error = $root.proto.WebMessageInfo.verify(message.message); - if (error) - return "message." + error; + properties._message = 1; + { + var error = $root.proto.WebMessageInfo.verify(message.message); + if (error) + return "message." + error; + } } - if (message.msgOrderId != null && message.hasOwnProperty("msgOrderId")) + if (message.msgOrderId != null && message.hasOwnProperty("msgOrderId")) { + properties._msgOrderId = 1; if (!$util.isInteger(message.msgOrderId) && !(message.msgOrderId && $util.isInteger(message.msgOrderId.low) && $util.isInteger(message.msgOrderId.high))) return "msgOrderId: integer|Long expected"; + } return null; }; @@ -21721,21 +45702,19 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.message = null; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.msgOrderId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.msgOrderId = options.longs === String ? "0" : 0; - } - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && message.hasOwnProperty("message")) { object.message = $root.proto.WebMessageInfo.toObject(message.message, options); - if (message.msgOrderId != null && message.hasOwnProperty("msgOrderId")) + if (options.oneofs) + object._message = "message"; + } + if (message.msgOrderId != null && message.hasOwnProperty("msgOrderId")) { if (typeof message.msgOrderId === "number") object.msgOrderId = options.longs === String ? String(message.msgOrderId) : message.msgOrderId; else object.msgOrderId = options.longs === String ? $util.Long.prototype.toString.call(message.msgOrderId) : options.longs === Number ? new $util.LongBits(message.msgOrderId.low >>> 0, message.msgOrderId.high >>> 0).toNumber(true) : message.msgOrderId; + if (options.oneofs) + object._msgOrderId = "msgOrderId"; + } return object; }; @@ -21750,6 +45729,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for HistorySyncMsg + * @function getTypeUrl + * @memberof proto.HistorySyncMsg + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HistorySyncMsg.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.HistorySyncMsg"; + }; + return HistorySyncMsg; })(); @@ -21782,11 +45776,11 @@ $root.proto = (function() { /** * HydratedTemplateButton index. - * @member {number} index + * @member {number|null|undefined} index * @memberof proto.HydratedTemplateButton * @instance */ - HydratedTemplateButton.prototype.index = 0; + HydratedTemplateButton.prototype.index = null; /** * HydratedTemplateButton quickReplyButton. @@ -21815,6 +45809,12 @@ $root.proto = (function() { // OneOf field names bound to virtual getters and setters var $oneOfFields; + // Virtual OneOf for proto3 optional field + Object.defineProperty(HydratedTemplateButton.prototype, "_index", { + get: $util.oneOfGetter($oneOfFields = ["index"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * HydratedTemplateButton hydratedButton. * @member {"quickReplyButton"|"urlButton"|"callButton"|undefined} hydratedButton @@ -21892,18 +45892,22 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 4: - message.index = reader.uint32(); - break; - case 1: - message.quickReplyButton = $root.proto.HydratedTemplateButton.HydratedQuickReplyButton.decode(reader, reader.uint32()); - break; - case 2: - message.urlButton = $root.proto.HydratedTemplateButton.HydratedURLButton.decode(reader, reader.uint32()); - break; - case 3: - message.callButton = $root.proto.HydratedTemplateButton.HydratedCallButton.decode(reader, reader.uint32()); - break; + case 4: { + message.index = reader.uint32(); + break; + } + case 1: { + message.quickReplyButton = $root.proto.HydratedTemplateButton.HydratedQuickReplyButton.decode(reader, reader.uint32()); + break; + } + case 2: { + message.urlButton = $root.proto.HydratedTemplateButton.HydratedURLButton.decode(reader, reader.uint32()); + break; + } + case 3: { + message.callButton = $root.proto.HydratedTemplateButton.HydratedCallButton.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -21940,9 +45944,11 @@ $root.proto = (function() { if (typeof message !== "object" || message === null) return "object expected"; var properties = {}; - if (message.index != null && message.hasOwnProperty("index")) + if (message.index != null && message.hasOwnProperty("index")) { + properties._index = 1; if (!$util.isInteger(message.index)) return "index: integer expected"; + } if (message.quickReplyButton != null && message.hasOwnProperty("quickReplyButton")) { properties.hydratedButton = 1; { @@ -22019,8 +46025,6 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) - object.index = 0; if (message.quickReplyButton != null && message.hasOwnProperty("quickReplyButton")) { object.quickReplyButton = $root.proto.HydratedTemplateButton.HydratedQuickReplyButton.toObject(message.quickReplyButton, options); if (options.oneofs) @@ -22036,8 +46040,11 @@ $root.proto = (function() { if (options.oneofs) object.hydratedButton = "callButton"; } - if (message.index != null && message.hasOwnProperty("index")) + if (message.index != null && message.hasOwnProperty("index")) { object.index = message.index; + if (options.oneofs) + object._index = "index"; + } return object; }; @@ -22052,6 +46059,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for HydratedTemplateButton + * @function getTypeUrl + * @memberof proto.HydratedTemplateButton + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HydratedTemplateButton.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.HydratedTemplateButton"; + }; + HydratedTemplateButton.HydratedCallButton = (function() { /** @@ -22079,19 +46101,34 @@ $root.proto = (function() { /** * HydratedCallButton displayText. - * @member {string} displayText + * @member {string|null|undefined} displayText * @memberof proto.HydratedTemplateButton.HydratedCallButton * @instance */ - HydratedCallButton.prototype.displayText = ""; + HydratedCallButton.prototype.displayText = null; /** * HydratedCallButton phoneNumber. - * @member {string} phoneNumber + * @member {string|null|undefined} phoneNumber * @memberof proto.HydratedTemplateButton.HydratedCallButton * @instance */ - HydratedCallButton.prototype.phoneNumber = ""; + HydratedCallButton.prototype.phoneNumber = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HydratedCallButton.prototype, "_displayText", { + get: $util.oneOfGetter($oneOfFields = ["displayText"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HydratedCallButton.prototype, "_phoneNumber", { + get: $util.oneOfGetter($oneOfFields = ["phoneNumber"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new HydratedCallButton instance using the specified properties. @@ -22155,12 +46192,14 @@ $root.proto = (function() { 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; + case 1: { + message.displayText = reader.string(); + break; + } + case 2: { + message.phoneNumber = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -22196,12 +46235,17 @@ $root.proto = (function() { HydratedCallButton.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.displayText != null && message.hasOwnProperty("displayText")) + var properties = {}; + if (message.displayText != null && message.hasOwnProperty("displayText")) { + properties._displayText = 1; if (!$util.isString(message.displayText)) return "displayText: string expected"; - if (message.phoneNumber != null && message.hasOwnProperty("phoneNumber")) + } + if (message.phoneNumber != null && message.hasOwnProperty("phoneNumber")) { + properties._phoneNumber = 1; if (!$util.isString(message.phoneNumber)) return "phoneNumber: string expected"; + } return null; }; @@ -22237,14 +46281,16 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.displayText = ""; - object.phoneNumber = ""; - } - if (message.displayText != null && message.hasOwnProperty("displayText")) + if (message.displayText != null && message.hasOwnProperty("displayText")) { object.displayText = message.displayText; - if (message.phoneNumber != null && message.hasOwnProperty("phoneNumber")) + if (options.oneofs) + object._displayText = "displayText"; + } + if (message.phoneNumber != null && message.hasOwnProperty("phoneNumber")) { object.phoneNumber = message.phoneNumber; + if (options.oneofs) + object._phoneNumber = "phoneNumber"; + } return object; }; @@ -22259,6 +46305,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for HydratedCallButton + * @function getTypeUrl + * @memberof proto.HydratedTemplateButton.HydratedCallButton + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HydratedCallButton.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.HydratedTemplateButton.HydratedCallButton"; + }; + return HydratedCallButton; })(); @@ -22289,19 +46350,34 @@ $root.proto = (function() { /** * HydratedQuickReplyButton displayText. - * @member {string} displayText + * @member {string|null|undefined} displayText * @memberof proto.HydratedTemplateButton.HydratedQuickReplyButton * @instance */ - HydratedQuickReplyButton.prototype.displayText = ""; + HydratedQuickReplyButton.prototype.displayText = null; /** * HydratedQuickReplyButton id. - * @member {string} id + * @member {string|null|undefined} id * @memberof proto.HydratedTemplateButton.HydratedQuickReplyButton * @instance */ - HydratedQuickReplyButton.prototype.id = ""; + HydratedQuickReplyButton.prototype.id = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HydratedQuickReplyButton.prototype, "_displayText", { + get: $util.oneOfGetter($oneOfFields = ["displayText"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HydratedQuickReplyButton.prototype, "_id", { + get: $util.oneOfGetter($oneOfFields = ["id"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new HydratedQuickReplyButton instance using the specified properties. @@ -22365,12 +46441,14 @@ $root.proto = (function() { 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; + case 1: { + message.displayText = reader.string(); + break; + } + case 2: { + message.id = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -22406,12 +46484,17 @@ $root.proto = (function() { HydratedQuickReplyButton.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.displayText != null && message.hasOwnProperty("displayText")) + var properties = {}; + if (message.displayText != null && message.hasOwnProperty("displayText")) { + properties._displayText = 1; if (!$util.isString(message.displayText)) return "displayText: string expected"; - if (message.id != null && message.hasOwnProperty("id")) + } + if (message.id != null && message.hasOwnProperty("id")) { + properties._id = 1; if (!$util.isString(message.id)) return "id: string expected"; + } return null; }; @@ -22447,14 +46530,16 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.displayText = ""; - object.id = ""; - } - if (message.displayText != null && message.hasOwnProperty("displayText")) + if (message.displayText != null && message.hasOwnProperty("displayText")) { object.displayText = message.displayText; - if (message.id != null && message.hasOwnProperty("id")) + if (options.oneofs) + object._displayText = "displayText"; + } + if (message.id != null && message.hasOwnProperty("id")) { object.id = message.id; + if (options.oneofs) + object._id = "id"; + } return object; }; @@ -22469,6 +46554,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for HydratedQuickReplyButton + * @function getTypeUrl + * @memberof proto.HydratedTemplateButton.HydratedQuickReplyButton + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HydratedQuickReplyButton.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.HydratedTemplateButton.HydratedQuickReplyButton"; + }; + return HydratedQuickReplyButton; })(); @@ -22501,35 +46601,62 @@ $root.proto = (function() { /** * HydratedURLButton displayText. - * @member {string} displayText + * @member {string|null|undefined} displayText * @memberof proto.HydratedTemplateButton.HydratedURLButton * @instance */ - HydratedURLButton.prototype.displayText = ""; + HydratedURLButton.prototype.displayText = null; /** * HydratedURLButton url. - * @member {string} url + * @member {string|null|undefined} url * @memberof proto.HydratedTemplateButton.HydratedURLButton * @instance */ - HydratedURLButton.prototype.url = ""; + HydratedURLButton.prototype.url = null; /** * HydratedURLButton consentedUsersUrl. - * @member {string} consentedUsersUrl + * @member {string|null|undefined} consentedUsersUrl * @memberof proto.HydratedTemplateButton.HydratedURLButton * @instance */ - HydratedURLButton.prototype.consentedUsersUrl = ""; + HydratedURLButton.prototype.consentedUsersUrl = null; /** * HydratedURLButton webviewPresentation. - * @member {proto.HydratedTemplateButton.HydratedURLButton.WebviewPresentationType} webviewPresentation + * @member {proto.HydratedTemplateButton.HydratedURLButton.WebviewPresentationType|null|undefined} webviewPresentation * @memberof proto.HydratedTemplateButton.HydratedURLButton * @instance */ - HydratedURLButton.prototype.webviewPresentation = 1; + HydratedURLButton.prototype.webviewPresentation = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HydratedURLButton.prototype, "_displayText", { + get: $util.oneOfGetter($oneOfFields = ["displayText"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HydratedURLButton.prototype, "_url", { + get: $util.oneOfGetter($oneOfFields = ["url"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HydratedURLButton.prototype, "_consentedUsersUrl", { + get: $util.oneOfGetter($oneOfFields = ["consentedUsersUrl"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HydratedURLButton.prototype, "_webviewPresentation", { + get: $util.oneOfGetter($oneOfFields = ["webviewPresentation"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new HydratedURLButton instance using the specified properties. @@ -22597,18 +46724,22 @@ $root.proto = (function() { 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; - case 3: - message.consentedUsersUrl = reader.string(); - break; - case 4: - message.webviewPresentation = reader.int32(); - break; + case 1: { + message.displayText = reader.string(); + break; + } + case 2: { + message.url = reader.string(); + break; + } + case 3: { + message.consentedUsersUrl = reader.string(); + break; + } + case 4: { + message.webviewPresentation = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -22644,16 +46775,24 @@ $root.proto = (function() { HydratedURLButton.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.displayText != null && message.hasOwnProperty("displayText")) + var properties = {}; + if (message.displayText != null && message.hasOwnProperty("displayText")) { + properties._displayText = 1; if (!$util.isString(message.displayText)) return "displayText: string expected"; - if (message.url != null && message.hasOwnProperty("url")) + } + if (message.url != null && message.hasOwnProperty("url")) { + properties._url = 1; if (!$util.isString(message.url)) return "url: string expected"; - if (message.consentedUsersUrl != null && message.hasOwnProperty("consentedUsersUrl")) + } + if (message.consentedUsersUrl != null && message.hasOwnProperty("consentedUsersUrl")) { + properties._consentedUsersUrl = 1; if (!$util.isString(message.consentedUsersUrl)) return "consentedUsersUrl: string expected"; - if (message.webviewPresentation != null && message.hasOwnProperty("webviewPresentation")) + } + if (message.webviewPresentation != null && message.hasOwnProperty("webviewPresentation")) { + properties._webviewPresentation = 1; switch (message.webviewPresentation) { default: return "webviewPresentation: enum value expected"; @@ -22662,6 +46801,7 @@ $root.proto = (function() { case 3: break; } + } return null; }; @@ -22684,6 +46824,12 @@ $root.proto = (function() { if (object.consentedUsersUrl != null) message.consentedUsersUrl = String(object.consentedUsersUrl); switch (object.webviewPresentation) { + default: + if (typeof object.webviewPresentation === "number") { + message.webviewPresentation = object.webviewPresentation; + break; + } + break; case "FULL": case 1: message.webviewPresentation = 1; @@ -22713,20 +46859,26 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.displayText = ""; - object.url = ""; - object.consentedUsersUrl = ""; - object.webviewPresentation = options.enums === String ? "FULL" : 1; - } - if (message.displayText != null && message.hasOwnProperty("displayText")) + if (message.displayText != null && message.hasOwnProperty("displayText")) { object.displayText = message.displayText; - if (message.url != null && message.hasOwnProperty("url")) + if (options.oneofs) + object._displayText = "displayText"; + } + if (message.url != null && message.hasOwnProperty("url")) { object.url = message.url; - if (message.consentedUsersUrl != null && message.hasOwnProperty("consentedUsersUrl")) + if (options.oneofs) + object._url = "url"; + } + if (message.consentedUsersUrl != null && message.hasOwnProperty("consentedUsersUrl")) { object.consentedUsersUrl = message.consentedUsersUrl; - if (message.webviewPresentation != null && message.hasOwnProperty("webviewPresentation")) - object.webviewPresentation = options.enums === String ? $root.proto.HydratedTemplateButton.HydratedURLButton.WebviewPresentationType[message.webviewPresentation] : message.webviewPresentation; + if (options.oneofs) + object._consentedUsersUrl = "consentedUsersUrl"; + } + if (message.webviewPresentation != null && message.hasOwnProperty("webviewPresentation")) { + object.webviewPresentation = options.enums === String ? $root.proto.HydratedTemplateButton.HydratedURLButton.WebviewPresentationType[message.webviewPresentation] === undefined ? message.webviewPresentation : $root.proto.HydratedTemplateButton.HydratedURLButton.WebviewPresentationType[message.webviewPresentation] : message.webviewPresentation; + if (options.oneofs) + object._webviewPresentation = "webviewPresentation"; + } return object; }; @@ -22741,6 +46893,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for HydratedURLButton + * @function getTypeUrl + * @memberof proto.HydratedTemplateButton.HydratedURLButton + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HydratedURLButton.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.HydratedTemplateButton.HydratedURLButton"; + }; + /** * WebviewPresentationType enum. * @name proto.HydratedTemplateButton.HydratedURLButton.WebviewPresentationType @@ -22790,19 +46957,34 @@ $root.proto = (function() { /** * IdentityKeyPairStructure publicKey. - * @member {Uint8Array} publicKey + * @member {Uint8Array|null|undefined} publicKey * @memberof proto.IdentityKeyPairStructure * @instance */ - IdentityKeyPairStructure.prototype.publicKey = $util.newBuffer([]); + IdentityKeyPairStructure.prototype.publicKey = null; /** * IdentityKeyPairStructure privateKey. - * @member {Uint8Array} privateKey + * @member {Uint8Array|null|undefined} privateKey * @memberof proto.IdentityKeyPairStructure * @instance */ - IdentityKeyPairStructure.prototype.privateKey = $util.newBuffer([]); + IdentityKeyPairStructure.prototype.privateKey = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(IdentityKeyPairStructure.prototype, "_publicKey", { + get: $util.oneOfGetter($oneOfFields = ["publicKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(IdentityKeyPairStructure.prototype, "_privateKey", { + get: $util.oneOfGetter($oneOfFields = ["privateKey"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new IdentityKeyPairStructure instance using the specified properties. @@ -22866,12 +47048,14 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.publicKey = reader.bytes(); - break; - case 2: - message.privateKey = reader.bytes(); - break; + case 1: { + message.publicKey = reader.bytes(); + break; + } + case 2: { + message.privateKey = reader.bytes(); + break; + } default: reader.skipType(tag & 7); break; @@ -22907,12 +47091,17 @@ $root.proto = (function() { IdentityKeyPairStructure.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.publicKey != null && message.hasOwnProperty("publicKey")) + var properties = {}; + if (message.publicKey != null && message.hasOwnProperty("publicKey")) { + properties._publicKey = 1; if (!(message.publicKey && typeof message.publicKey.length === "number" || $util.isString(message.publicKey))) return "publicKey: buffer expected"; - if (message.privateKey != null && message.hasOwnProperty("privateKey")) + } + if (message.privateKey != null && message.hasOwnProperty("privateKey")) { + properties._privateKey = 1; if (!(message.privateKey && typeof message.privateKey.length === "number" || $util.isString(message.privateKey))) return "privateKey: buffer expected"; + } return null; }; @@ -22931,12 +47120,12 @@ $root.proto = (function() { if (object.publicKey != null) if (typeof object.publicKey === "string") $util.base64.decode(object.publicKey, message.publicKey = $util.newBuffer($util.base64.length(object.publicKey)), 0); - else if (object.publicKey.length) + else if (object.publicKey.length >= 0) message.publicKey = object.publicKey; if (object.privateKey != null) if (typeof object.privateKey === "string") $util.base64.decode(object.privateKey, message.privateKey = $util.newBuffer($util.base64.length(object.privateKey)), 0); - else if (object.privateKey.length) + else if (object.privateKey.length >= 0) message.privateKey = object.privateKey; return message; }; @@ -22954,26 +47143,16 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - if (options.bytes === String) - object.publicKey = ""; - else { - object.publicKey = []; - if (options.bytes !== Array) - object.publicKey = $util.newBuffer(object.publicKey); - } - if (options.bytes === String) - object.privateKey = ""; - else { - object.privateKey = []; - if (options.bytes !== Array) - object.privateKey = $util.newBuffer(object.privateKey); - } - } - if (message.publicKey != null && message.hasOwnProperty("publicKey")) + if (message.publicKey != null && message.hasOwnProperty("publicKey")) { object.publicKey = options.bytes === String ? $util.base64.encode(message.publicKey, 0, message.publicKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.publicKey) : message.publicKey; - if (message.privateKey != null && message.hasOwnProperty("privateKey")) + if (options.oneofs) + object._publicKey = "publicKey"; + } + if (message.privateKey != null && message.hasOwnProperty("privateKey")) { object.privateKey = options.bytes === String ? $util.base64.encode(message.privateKey, 0, message.privateKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.privateKey) : message.privateKey; + if (options.oneofs) + object._privateKey = "privateKey"; + } return object; }; @@ -22988,6 +47167,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for IdentityKeyPairStructure + * @function getTypeUrl + * @memberof proto.IdentityKeyPairStructure + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + IdentityKeyPairStructure.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.IdentityKeyPairStructure"; + }; + return IdentityKeyPairStructure; })(); @@ -22999,8 +47193,11 @@ $root.proto = (function() { * @interface IInteractiveAnnotation * @property {Array.|null} [polygonVertices] InteractiveAnnotation polygonVertices * @property {boolean|null} [shouldSkipConfirmation] InteractiveAnnotation shouldSkipConfirmation + * @property {proto.IEmbeddedContent|null} [embeddedContent] InteractiveAnnotation embeddedContent * @property {proto.ILocation|null} [location] InteractiveAnnotation location * @property {proto.ContextInfo.IForwardedNewsletterMessageInfo|null} [newsletter] InteractiveAnnotation newsletter + * @property {boolean|null} [embeddedAction] InteractiveAnnotation embeddedAction + * @property {proto.ITapLinkAction|null} [tapAction] InteractiveAnnotation tapAction */ /** @@ -23029,11 +47226,19 @@ $root.proto = (function() { /** * InteractiveAnnotation shouldSkipConfirmation. - * @member {boolean} shouldSkipConfirmation + * @member {boolean|null|undefined} shouldSkipConfirmation * @memberof proto.InteractiveAnnotation * @instance */ - InteractiveAnnotation.prototype.shouldSkipConfirmation = false; + InteractiveAnnotation.prototype.shouldSkipConfirmation = null; + + /** + * InteractiveAnnotation embeddedContent. + * @member {proto.IEmbeddedContent|null|undefined} embeddedContent + * @memberof proto.InteractiveAnnotation + * @instance + */ + InteractiveAnnotation.prototype.embeddedContent = null; /** * InteractiveAnnotation location. @@ -23051,17 +47256,45 @@ $root.proto = (function() { */ InteractiveAnnotation.prototype.newsletter = null; + /** + * InteractiveAnnotation embeddedAction. + * @member {boolean|null|undefined} embeddedAction + * @memberof proto.InteractiveAnnotation + * @instance + */ + InteractiveAnnotation.prototype.embeddedAction = null; + + /** + * InteractiveAnnotation tapAction. + * @member {proto.ITapLinkAction|null|undefined} tapAction + * @memberof proto.InteractiveAnnotation + * @instance + */ + InteractiveAnnotation.prototype.tapAction = null; + // OneOf field names bound to virtual getters and setters var $oneOfFields; + // Virtual OneOf for proto3 optional field + Object.defineProperty(InteractiveAnnotation.prototype, "_shouldSkipConfirmation", { + get: $util.oneOfGetter($oneOfFields = ["shouldSkipConfirmation"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(InteractiveAnnotation.prototype, "_embeddedContent", { + get: $util.oneOfGetter($oneOfFields = ["embeddedContent"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * InteractiveAnnotation action. - * @member {"location"|"newsletter"|undefined} action + * @member {"location"|"newsletter"|"embeddedAction"|"tapAction"|undefined} action * @memberof proto.InteractiveAnnotation * @instance */ Object.defineProperty(InteractiveAnnotation.prototype, "action", { - get: $util.oneOfGetter($oneOfFields = ["location", "newsletter"]), + get: $util.oneOfGetter($oneOfFields = ["location", "newsletter", "embeddedAction", "tapAction"]), set: $util.oneOfSetter($oneOfFields) }); @@ -23098,6 +47331,12 @@ $root.proto = (function() { $root.proto.ContextInfo.ForwardedNewsletterMessageInfo.encode(message.newsletter, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); if (message.shouldSkipConfirmation != null && Object.hasOwnProperty.call(message, "shouldSkipConfirmation")) writer.uint32(/* id 4, wireType 0 =*/32).bool(message.shouldSkipConfirmation); + if (message.embeddedContent != null && Object.hasOwnProperty.call(message, "embeddedContent")) + $root.proto.EmbeddedContent.encode(message.embeddedContent, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.embeddedAction != null && Object.hasOwnProperty.call(message, "embeddedAction")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.embeddedAction); + if (message.tapAction != null && Object.hasOwnProperty.call(message, "tapAction")) + $root.proto.TapLinkAction.encode(message.tapAction, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); return writer; }; @@ -23132,20 +47371,36 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.polygonVertices && message.polygonVertices.length)) - message.polygonVertices = []; - message.polygonVertices.push($root.proto.Point.decode(reader, reader.uint32())); - break; - case 4: - message.shouldSkipConfirmation = reader.bool(); - break; - case 2: - message.location = $root.proto.Location.decode(reader, reader.uint32()); - break; - case 3: - message.newsletter = $root.proto.ContextInfo.ForwardedNewsletterMessageInfo.decode(reader, reader.uint32()); - break; + case 1: { + if (!(message.polygonVertices && message.polygonVertices.length)) + message.polygonVertices = []; + message.polygonVertices.push($root.proto.Point.decode(reader, reader.uint32())); + break; + } + case 4: { + message.shouldSkipConfirmation = reader.bool(); + break; + } + case 5: { + message.embeddedContent = $root.proto.EmbeddedContent.decode(reader, reader.uint32()); + break; + } + case 2: { + message.location = $root.proto.Location.decode(reader, reader.uint32()); + break; + } + case 3: { + message.newsletter = $root.proto.ContextInfo.ForwardedNewsletterMessageInfo.decode(reader, reader.uint32()); + break; + } + case 6: { + message.embeddedAction = reader.bool(); + break; + } + case 7: { + message.tapAction = $root.proto.TapLinkAction.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -23191,9 +47446,19 @@ $root.proto = (function() { return "polygonVertices." + error; } } - if (message.shouldSkipConfirmation != null && message.hasOwnProperty("shouldSkipConfirmation")) + if (message.shouldSkipConfirmation != null && message.hasOwnProperty("shouldSkipConfirmation")) { + properties._shouldSkipConfirmation = 1; if (typeof message.shouldSkipConfirmation !== "boolean") return "shouldSkipConfirmation: boolean expected"; + } + if (message.embeddedContent != null && message.hasOwnProperty("embeddedContent")) { + properties._embeddedContent = 1; + { + var error = $root.proto.EmbeddedContent.verify(message.embeddedContent); + if (error) + return "embeddedContent." + error; + } + } if (message.location != null && message.hasOwnProperty("location")) { properties.action = 1; { @@ -23212,6 +47477,23 @@ $root.proto = (function() { return "newsletter." + error; } } + if (message.embeddedAction != null && message.hasOwnProperty("embeddedAction")) { + if (properties.action === 1) + return "action: multiple values"; + properties.action = 1; + if (typeof message.embeddedAction !== "boolean") + return "embeddedAction: boolean expected"; + } + if (message.tapAction != null && message.hasOwnProperty("tapAction")) { + if (properties.action === 1) + return "action: multiple values"; + properties.action = 1; + { + var error = $root.proto.TapLinkAction.verify(message.tapAction); + if (error) + return "tapAction." + error; + } + } return null; }; @@ -23239,6 +47521,11 @@ $root.proto = (function() { } if (object.shouldSkipConfirmation != null) message.shouldSkipConfirmation = Boolean(object.shouldSkipConfirmation); + if (object.embeddedContent != null) { + if (typeof object.embeddedContent !== "object") + throw TypeError(".proto.InteractiveAnnotation.embeddedContent: object expected"); + message.embeddedContent = $root.proto.EmbeddedContent.fromObject(object.embeddedContent); + } if (object.location != null) { if (typeof object.location !== "object") throw TypeError(".proto.InteractiveAnnotation.location: object expected"); @@ -23249,6 +47536,13 @@ $root.proto = (function() { throw TypeError(".proto.InteractiveAnnotation.newsletter: object expected"); message.newsletter = $root.proto.ContextInfo.ForwardedNewsletterMessageInfo.fromObject(object.newsletter); } + if (object.embeddedAction != null) + message.embeddedAction = Boolean(object.embeddedAction); + if (object.tapAction != null) { + if (typeof object.tapAction !== "object") + throw TypeError(".proto.InteractiveAnnotation.tapAction: object expected"); + message.tapAction = $root.proto.TapLinkAction.fromObject(object.tapAction); + } return message; }; @@ -23267,8 +47561,6 @@ $root.proto = (function() { var object = {}; if (options.arrays || options.defaults) object.polygonVertices = []; - if (options.defaults) - object.shouldSkipConfirmation = false; if (message.polygonVertices && message.polygonVertices.length) { object.polygonVertices = []; for (var j = 0; j < message.polygonVertices.length; ++j) @@ -23284,8 +47576,26 @@ $root.proto = (function() { if (options.oneofs) object.action = "newsletter"; } - if (message.shouldSkipConfirmation != null && message.hasOwnProperty("shouldSkipConfirmation")) + if (message.shouldSkipConfirmation != null && message.hasOwnProperty("shouldSkipConfirmation")) { object.shouldSkipConfirmation = message.shouldSkipConfirmation; + if (options.oneofs) + object._shouldSkipConfirmation = "shouldSkipConfirmation"; + } + if (message.embeddedContent != null && message.hasOwnProperty("embeddedContent")) { + object.embeddedContent = $root.proto.EmbeddedContent.toObject(message.embeddedContent, options); + if (options.oneofs) + object._embeddedContent = "embeddedContent"; + } + if (message.embeddedAction != null && message.hasOwnProperty("embeddedAction")) { + object.embeddedAction = message.embeddedAction; + if (options.oneofs) + object.action = "embeddedAction"; + } + if (message.tapAction != null && message.hasOwnProperty("tapAction")) { + object.tapAction = $root.proto.TapLinkAction.toObject(message.tapAction, options); + if (options.oneofs) + object.action = "tapAction"; + } return object; }; @@ -23300,6 +47610,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for InteractiveAnnotation + * @function getTypeUrl + * @memberof proto.InteractiveAnnotation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InteractiveAnnotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.InteractiveAnnotation"; + }; + return InteractiveAnnotation; })(); @@ -23334,19 +47659,19 @@ $root.proto = (function() { /** * KeepInChat keepType. - * @member {proto.KeepType} keepType + * @member {proto.KeepType|null|undefined} keepType * @memberof proto.KeepInChat * @instance */ - KeepInChat.prototype.keepType = 0; + KeepInChat.prototype.keepType = null; /** * KeepInChat serverTimestamp. - * @member {number|Long} serverTimestamp + * @member {number|Long|null|undefined} serverTimestamp * @memberof proto.KeepInChat * @instance */ - KeepInChat.prototype.serverTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + KeepInChat.prototype.serverTimestamp = null; /** * KeepInChat key. @@ -23358,27 +47683,66 @@ $root.proto = (function() { /** * KeepInChat deviceJid. - * @member {string} deviceJid + * @member {string|null|undefined} deviceJid * @memberof proto.KeepInChat * @instance */ - KeepInChat.prototype.deviceJid = ""; + KeepInChat.prototype.deviceJid = null; /** * KeepInChat clientTimestampMs. - * @member {number|Long} clientTimestampMs + * @member {number|Long|null|undefined} clientTimestampMs * @memberof proto.KeepInChat * @instance */ - KeepInChat.prototype.clientTimestampMs = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + KeepInChat.prototype.clientTimestampMs = null; /** * KeepInChat serverTimestampMs. - * @member {number|Long} serverTimestampMs + * @member {number|Long|null|undefined} serverTimestampMs * @memberof proto.KeepInChat * @instance */ - KeepInChat.prototype.serverTimestampMs = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + KeepInChat.prototype.serverTimestampMs = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(KeepInChat.prototype, "_keepType", { + get: $util.oneOfGetter($oneOfFields = ["keepType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(KeepInChat.prototype, "_serverTimestamp", { + get: $util.oneOfGetter($oneOfFields = ["serverTimestamp"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(KeepInChat.prototype, "_key", { + get: $util.oneOfGetter($oneOfFields = ["key"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(KeepInChat.prototype, "_deviceJid", { + get: $util.oneOfGetter($oneOfFields = ["deviceJid"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(KeepInChat.prototype, "_clientTimestampMs", { + get: $util.oneOfGetter($oneOfFields = ["clientTimestampMs"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(KeepInChat.prototype, "_serverTimestampMs", { + get: $util.oneOfGetter($oneOfFields = ["serverTimestampMs"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new KeepInChat instance using the specified properties. @@ -23450,24 +47814,30 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.keepType = reader.int32(); - break; - case 2: - message.serverTimestamp = reader.int64(); - break; - case 3: - message.key = $root.proto.MessageKey.decode(reader, reader.uint32()); - break; - case 4: - message.deviceJid = reader.string(); - break; - case 5: - message.clientTimestampMs = reader.int64(); - break; - case 6: - message.serverTimestampMs = reader.int64(); - break; + case 1: { + message.keepType = reader.int32(); + break; + } + case 2: { + message.serverTimestamp = reader.int64(); + break; + } + case 3: { + message.key = $root.proto.MessageKey.decode(reader, reader.uint32()); + break; + } + case 4: { + message.deviceJid = reader.string(); + break; + } + case 5: { + message.clientTimestampMs = reader.int64(); + break; + } + case 6: { + message.serverTimestampMs = reader.int64(); + break; + } default: reader.skipType(tag & 7); break; @@ -23503,7 +47873,9 @@ $root.proto = (function() { KeepInChat.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.keepType != null && message.hasOwnProperty("keepType")) + var properties = {}; + if (message.keepType != null && message.hasOwnProperty("keepType")) { + properties._keepType = 1; switch (message.keepType) { default: return "keepType: enum value expected"; @@ -23512,23 +47884,35 @@ $root.proto = (function() { case 2: break; } - if (message.serverTimestamp != null && message.hasOwnProperty("serverTimestamp")) + } + if (message.serverTimestamp != null && message.hasOwnProperty("serverTimestamp")) { + properties._serverTimestamp = 1; 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 (message.key != null && message.hasOwnProperty("key")) { + properties._key = 1; + { + var error = $root.proto.MessageKey.verify(message.key); + if (error) + return "key." + error; + } + } + if (message.deviceJid != null && message.hasOwnProperty("deviceJid")) { + properties._deviceJid = 1; if (!$util.isString(message.deviceJid)) return "deviceJid: string expected"; - if (message.clientTimestampMs != null && message.hasOwnProperty("clientTimestampMs")) + } + if (message.clientTimestampMs != null && message.hasOwnProperty("clientTimestampMs")) { + properties._clientTimestampMs = 1; if (!$util.isInteger(message.clientTimestampMs) && !(message.clientTimestampMs && $util.isInteger(message.clientTimestampMs.low) && $util.isInteger(message.clientTimestampMs.high))) return "clientTimestampMs: integer|Long expected"; - if (message.serverTimestampMs != null && message.hasOwnProperty("serverTimestampMs")) + } + if (message.serverTimestampMs != null && message.hasOwnProperty("serverTimestampMs")) { + properties._serverTimestampMs = 1; if (!$util.isInteger(message.serverTimestampMs) && !(message.serverTimestampMs && $util.isInteger(message.serverTimestampMs.low) && $util.isInteger(message.serverTimestampMs.high))) return "serverTimestampMs: integer|Long expected"; + } return null; }; @@ -23545,6 +47929,12 @@ $root.proto = (function() { return object; var message = new $root.proto.KeepInChat(); switch (object.keepType) { + default: + if (typeof object.keepType === "number") { + message.keepType = object.keepType; + break; + } + break; case "UNKNOWN": case 0: message.keepType = 0; @@ -23608,47 +47998,45 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.keepType = options.enums === String ? "UNKNOWN" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.serverTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.serverTimestamp = options.longs === String ? "0" : 0; - object.key = null; - object.deviceJid = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.clientTimestampMs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.clientTimestampMs = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.serverTimestampMs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.serverTimestampMs = options.longs === String ? "0" : 0; + if (message.keepType != null && message.hasOwnProperty("keepType")) { + object.keepType = options.enums === String ? $root.proto.KeepType[message.keepType] === undefined ? message.keepType : $root.proto.KeepType[message.keepType] : message.keepType; + if (options.oneofs) + object._keepType = "keepType"; } - if (message.keepType != null && message.hasOwnProperty("keepType")) - object.keepType = options.enums === String ? $root.proto.KeepType[message.keepType] : message.keepType; - if (message.serverTimestamp != null && message.hasOwnProperty("serverTimestamp")) + if (message.serverTimestamp != null && message.hasOwnProperty("serverTimestamp")) { if (typeof message.serverTimestamp === "number") object.serverTimestamp = options.longs === String ? String(message.serverTimestamp) : message.serverTimestamp; else object.serverTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.serverTimestamp) : options.longs === Number ? new $util.LongBits(message.serverTimestamp.low >>> 0, message.serverTimestamp.high >>> 0).toNumber() : message.serverTimestamp; - if (message.key != null && message.hasOwnProperty("key")) + if (options.oneofs) + object._serverTimestamp = "serverTimestamp"; + } + if (message.key != null && message.hasOwnProperty("key")) { object.key = $root.proto.MessageKey.toObject(message.key, options); - if (message.deviceJid != null && message.hasOwnProperty("deviceJid")) + if (options.oneofs) + object._key = "key"; + } + if (message.deviceJid != null && message.hasOwnProperty("deviceJid")) { object.deviceJid = message.deviceJid; - if (message.clientTimestampMs != null && message.hasOwnProperty("clientTimestampMs")) + if (options.oneofs) + object._deviceJid = "deviceJid"; + } + if (message.clientTimestampMs != null && message.hasOwnProperty("clientTimestampMs")) { if (typeof message.clientTimestampMs === "number") object.clientTimestampMs = options.longs === String ? String(message.clientTimestampMs) : message.clientTimestampMs; else object.clientTimestampMs = options.longs === String ? $util.Long.prototype.toString.call(message.clientTimestampMs) : options.longs === Number ? new $util.LongBits(message.clientTimestampMs.low >>> 0, message.clientTimestampMs.high >>> 0).toNumber() : message.clientTimestampMs; - if (message.serverTimestampMs != null && message.hasOwnProperty("serverTimestampMs")) + if (options.oneofs) + object._clientTimestampMs = "clientTimestampMs"; + } + if (message.serverTimestampMs != null && message.hasOwnProperty("serverTimestampMs")) { if (typeof message.serverTimestampMs === "number") object.serverTimestampMs = options.longs === String ? String(message.serverTimestampMs) : message.serverTimestampMs; else object.serverTimestampMs = options.longs === String ? $util.Long.prototype.toString.call(message.serverTimestampMs) : options.longs === Number ? new $util.LongBits(message.serverTimestampMs.low >>> 0, message.serverTimestampMs.high >>> 0).toNumber() : message.serverTimestampMs; + if (options.oneofs) + object._serverTimestampMs = "serverTimestampMs"; + } return object; }; @@ -23663,6 +48051,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for KeepInChat + * @function getTypeUrl + * @memberof proto.KeepInChat + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + KeepInChat.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.KeepInChat"; + }; + return KeepInChat; })(); @@ -23712,43 +48115,76 @@ $root.proto = (function() { /** * KeyExchangeMessage id. - * @member {number} id + * @member {number|null|undefined} id * @memberof proto.KeyExchangeMessage * @instance */ - KeyExchangeMessage.prototype.id = 0; + KeyExchangeMessage.prototype.id = null; /** * KeyExchangeMessage baseKey. - * @member {Uint8Array} baseKey + * @member {Uint8Array|null|undefined} baseKey * @memberof proto.KeyExchangeMessage * @instance */ - KeyExchangeMessage.prototype.baseKey = $util.newBuffer([]); + KeyExchangeMessage.prototype.baseKey = null; /** * KeyExchangeMessage ratchetKey. - * @member {Uint8Array} ratchetKey + * @member {Uint8Array|null|undefined} ratchetKey * @memberof proto.KeyExchangeMessage * @instance */ - KeyExchangeMessage.prototype.ratchetKey = $util.newBuffer([]); + KeyExchangeMessage.prototype.ratchetKey = null; /** * KeyExchangeMessage identityKey. - * @member {Uint8Array} identityKey + * @member {Uint8Array|null|undefined} identityKey * @memberof proto.KeyExchangeMessage * @instance */ - KeyExchangeMessage.prototype.identityKey = $util.newBuffer([]); + KeyExchangeMessage.prototype.identityKey = null; /** * KeyExchangeMessage baseKeySignature. - * @member {Uint8Array} baseKeySignature + * @member {Uint8Array|null|undefined} baseKeySignature * @memberof proto.KeyExchangeMessage * @instance */ - KeyExchangeMessage.prototype.baseKeySignature = $util.newBuffer([]); + KeyExchangeMessage.prototype.baseKeySignature = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(KeyExchangeMessage.prototype, "_id", { + get: $util.oneOfGetter($oneOfFields = ["id"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(KeyExchangeMessage.prototype, "_baseKey", { + get: $util.oneOfGetter($oneOfFields = ["baseKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(KeyExchangeMessage.prototype, "_ratchetKey", { + get: $util.oneOfGetter($oneOfFields = ["ratchetKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(KeyExchangeMessage.prototype, "_identityKey", { + get: $util.oneOfGetter($oneOfFields = ["identityKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(KeyExchangeMessage.prototype, "_baseKeySignature", { + get: $util.oneOfGetter($oneOfFields = ["baseKeySignature"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new KeyExchangeMessage instance using the specified properties. @@ -23818,21 +48254,26 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.id = reader.uint32(); - break; - case 2: - message.baseKey = reader.bytes(); - break; - case 3: - message.ratchetKey = reader.bytes(); - break; - case 4: - message.identityKey = reader.bytes(); - break; - case 5: - message.baseKeySignature = reader.bytes(); - break; + case 1: { + message.id = reader.uint32(); + break; + } + case 2: { + message.baseKey = reader.bytes(); + break; + } + case 3: { + message.ratchetKey = reader.bytes(); + break; + } + case 4: { + message.identityKey = reader.bytes(); + break; + } + case 5: { + message.baseKeySignature = reader.bytes(); + break; + } default: reader.skipType(tag & 7); break; @@ -23868,21 +48309,32 @@ $root.proto = (function() { KeyExchangeMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.id != null && message.hasOwnProperty("id")) + var properties = {}; + if (message.id != null && message.hasOwnProperty("id")) { + properties._id = 1; if (!$util.isInteger(message.id)) return "id: integer expected"; - if (message.baseKey != null && message.hasOwnProperty("baseKey")) + } + if (message.baseKey != null && message.hasOwnProperty("baseKey")) { + properties._baseKey = 1; if (!(message.baseKey && typeof message.baseKey.length === "number" || $util.isString(message.baseKey))) return "baseKey: buffer expected"; - if (message.ratchetKey != null && message.hasOwnProperty("ratchetKey")) + } + if (message.ratchetKey != null && message.hasOwnProperty("ratchetKey")) { + properties._ratchetKey = 1; if (!(message.ratchetKey && typeof message.ratchetKey.length === "number" || $util.isString(message.ratchetKey))) return "ratchetKey: buffer expected"; - if (message.identityKey != null && message.hasOwnProperty("identityKey")) + } + if (message.identityKey != null && message.hasOwnProperty("identityKey")) { + properties._identityKey = 1; if (!(message.identityKey && typeof message.identityKey.length === "number" || $util.isString(message.identityKey))) return "identityKey: buffer expected"; - if (message.baseKeySignature != null && message.hasOwnProperty("baseKeySignature")) + } + if (message.baseKeySignature != null && message.hasOwnProperty("baseKeySignature")) { + properties._baseKeySignature = 1; if (!(message.baseKeySignature && typeof message.baseKeySignature.length === "number" || $util.isString(message.baseKeySignature))) return "baseKeySignature: buffer expected"; + } return null; }; @@ -23903,22 +48355,22 @@ $root.proto = (function() { if (object.baseKey != null) if (typeof object.baseKey === "string") $util.base64.decode(object.baseKey, message.baseKey = $util.newBuffer($util.base64.length(object.baseKey)), 0); - else if (object.baseKey.length) + else if (object.baseKey.length >= 0) message.baseKey = object.baseKey; if (object.ratchetKey != null) if (typeof object.ratchetKey === "string") $util.base64.decode(object.ratchetKey, message.ratchetKey = $util.newBuffer($util.base64.length(object.ratchetKey)), 0); - else if (object.ratchetKey.length) + else if (object.ratchetKey.length >= 0) message.ratchetKey = object.ratchetKey; if (object.identityKey != null) if (typeof object.identityKey === "string") $util.base64.decode(object.identityKey, message.identityKey = $util.newBuffer($util.base64.length(object.identityKey)), 0); - else if (object.identityKey.length) + else if (object.identityKey.length >= 0) message.identityKey = object.identityKey; if (object.baseKeySignature != null) if (typeof object.baseKeySignature === "string") $util.base64.decode(object.baseKeySignature, message.baseKeySignature = $util.newBuffer($util.base64.length(object.baseKeySignature)), 0); - else if (object.baseKeySignature.length) + else if (object.baseKeySignature.length >= 0) message.baseKeySignature = object.baseKeySignature; return message; }; @@ -23936,47 +48388,31 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.id = 0; - if (options.bytes === String) - object.baseKey = ""; - else { - object.baseKey = []; - if (options.bytes !== Array) - object.baseKey = $util.newBuffer(object.baseKey); - } - if (options.bytes === String) - object.ratchetKey = ""; - else { - object.ratchetKey = []; - if (options.bytes !== Array) - object.ratchetKey = $util.newBuffer(object.ratchetKey); - } - if (options.bytes === String) - object.identityKey = ""; - else { - object.identityKey = []; - if (options.bytes !== Array) - object.identityKey = $util.newBuffer(object.identityKey); - } - if (options.bytes === String) - object.baseKeySignature = ""; - else { - object.baseKeySignature = []; - if (options.bytes !== Array) - object.baseKeySignature = $util.newBuffer(object.baseKeySignature); - } - } - if (message.id != null && message.hasOwnProperty("id")) + if (message.id != null && message.hasOwnProperty("id")) { object.id = message.id; - if (message.baseKey != null && message.hasOwnProperty("baseKey")) + if (options.oneofs) + object._id = "id"; + } + if (message.baseKey != null && message.hasOwnProperty("baseKey")) { object.baseKey = options.bytes === String ? $util.base64.encode(message.baseKey, 0, message.baseKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.baseKey) : message.baseKey; - if (message.ratchetKey != null && message.hasOwnProperty("ratchetKey")) + if (options.oneofs) + object._baseKey = "baseKey"; + } + if (message.ratchetKey != null && message.hasOwnProperty("ratchetKey")) { object.ratchetKey = options.bytes === String ? $util.base64.encode(message.ratchetKey, 0, message.ratchetKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.ratchetKey) : message.ratchetKey; - if (message.identityKey != null && message.hasOwnProperty("identityKey")) + if (options.oneofs) + object._ratchetKey = "ratchetKey"; + } + if (message.identityKey != null && message.hasOwnProperty("identityKey")) { object.identityKey = options.bytes === String ? $util.base64.encode(message.identityKey, 0, message.identityKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.identityKey) : message.identityKey; - if (message.baseKeySignature != null && message.hasOwnProperty("baseKeySignature")) + if (options.oneofs) + object._identityKey = "identityKey"; + } + if (message.baseKeySignature != null && message.hasOwnProperty("baseKeySignature")) { object.baseKeySignature = options.bytes === String ? $util.base64.encode(message.baseKeySignature, 0, message.baseKeySignature.length) : options.bytes === Array ? Array.prototype.slice.call(message.baseKeySignature) : message.baseKeySignature; + if (options.oneofs) + object._baseKeySignature = "baseKeySignature"; + } return object; }; @@ -23991,6 +48427,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for KeyExchangeMessage + * @function getTypeUrl + * @memberof proto.KeyExchangeMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + KeyExchangeMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.KeyExchangeMessage"; + }; + return KeyExchangeMessage; })(); @@ -24020,11 +48471,20 @@ $root.proto = (function() { /** * KeyId id. - * @member {Uint8Array} id + * @member {Uint8Array|null|undefined} id * @memberof proto.KeyId * @instance */ - KeyId.prototype.id = $util.newBuffer([]); + KeyId.prototype.id = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(KeyId.prototype, "_id", { + get: $util.oneOfGetter($oneOfFields = ["id"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new KeyId instance using the specified properties. @@ -24086,9 +48546,10 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.id = reader.bytes(); - break; + case 1: { + message.id = reader.bytes(); + break; + } default: reader.skipType(tag & 7); break; @@ -24124,9 +48585,12 @@ $root.proto = (function() { KeyId.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.id != null && message.hasOwnProperty("id")) + var properties = {}; + if (message.id != null && message.hasOwnProperty("id")) { + properties._id = 1; if (!(message.id && typeof message.id.length === "number" || $util.isString(message.id))) return "id: buffer expected"; + } return null; }; @@ -24145,7 +48609,7 @@ $root.proto = (function() { if (object.id != null) if (typeof object.id === "string") $util.base64.decode(object.id, message.id = $util.newBuffer($util.base64.length(object.id)), 0); - else if (object.id.length) + else if (object.id.length >= 0) message.id = object.id; return message; }; @@ -24163,16 +48627,11 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) - if (options.bytes === String) - object.id = ""; - else { - object.id = []; - if (options.bytes !== Array) - object.id = $util.newBuffer(object.id); - } - if (message.id != null && message.hasOwnProperty("id")) + if (message.id != null && message.hasOwnProperty("id")) { object.id = options.bytes === String ? $util.base64.encode(message.id, 0, message.id.length) : options.bytes === Array ? Array.prototype.slice.call(message.id) : message.id; + if (options.oneofs) + object._id = "id"; + } return object; }; @@ -24187,9 +48646,1312 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for KeyId + * @function getTypeUrl + * @memberof proto.KeyId + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + KeyId.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.KeyId"; + }; + return KeyId; })(); + proto.LIDMigrationMapping = (function() { + + /** + * Properties of a LIDMigrationMapping. + * @memberof proto + * @interface ILIDMigrationMapping + * @property {number|Long} pn LIDMigrationMapping pn + * @property {number|Long} assignedLid LIDMigrationMapping assignedLid + * @property {number|Long|null} [latestLid] LIDMigrationMapping latestLid + */ + + /** + * Constructs a new LIDMigrationMapping. + * @memberof proto + * @classdesc Represents a LIDMigrationMapping. + * @implements ILIDMigrationMapping + * @constructor + * @param {proto.ILIDMigrationMapping=} [properties] Properties to set + */ + function LIDMigrationMapping(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LIDMigrationMapping pn. + * @member {number|Long} pn + * @memberof proto.LIDMigrationMapping + * @instance + */ + LIDMigrationMapping.prototype.pn = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * LIDMigrationMapping assignedLid. + * @member {number|Long} assignedLid + * @memberof proto.LIDMigrationMapping + * @instance + */ + LIDMigrationMapping.prototype.assignedLid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * LIDMigrationMapping latestLid. + * @member {number|Long|null|undefined} latestLid + * @memberof proto.LIDMigrationMapping + * @instance + */ + LIDMigrationMapping.prototype.latestLid = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(LIDMigrationMapping.prototype, "_latestLid", { + get: $util.oneOfGetter($oneOfFields = ["latestLid"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new LIDMigrationMapping instance using the specified properties. + * @function create + * @memberof proto.LIDMigrationMapping + * @static + * @param {proto.ILIDMigrationMapping=} [properties] Properties to set + * @returns {proto.LIDMigrationMapping} LIDMigrationMapping instance + */ + LIDMigrationMapping.create = function create(properties) { + return new LIDMigrationMapping(properties); + }; + + /** + * Encodes the specified LIDMigrationMapping message. Does not implicitly {@link proto.LIDMigrationMapping.verify|verify} messages. + * @function encode + * @memberof proto.LIDMigrationMapping + * @static + * @param {proto.ILIDMigrationMapping} message LIDMigrationMapping message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LIDMigrationMapping.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.pn); + writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.assignedLid); + if (message.latestLid != null && Object.hasOwnProperty.call(message, "latestLid")) + writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.latestLid); + return writer; + }; + + /** + * Encodes the specified LIDMigrationMapping message, length delimited. Does not implicitly {@link proto.LIDMigrationMapping.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.LIDMigrationMapping + * @static + * @param {proto.ILIDMigrationMapping} message LIDMigrationMapping message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LIDMigrationMapping.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LIDMigrationMapping message from the specified reader or buffer. + * @function decode + * @memberof proto.LIDMigrationMapping + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.LIDMigrationMapping} LIDMigrationMapping + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LIDMigrationMapping.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.LIDMigrationMapping(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.pn = reader.uint64(); + break; + } + case 2: { + message.assignedLid = reader.uint64(); + break; + } + case 3: { + message.latestLid = reader.uint64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("pn")) + throw $util.ProtocolError("missing required 'pn'", { instance: message }); + if (!message.hasOwnProperty("assignedLid")) + throw $util.ProtocolError("missing required 'assignedLid'", { instance: message }); + return message; + }; + + /** + * Decodes a LIDMigrationMapping message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.LIDMigrationMapping + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.LIDMigrationMapping} LIDMigrationMapping + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LIDMigrationMapping.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LIDMigrationMapping message. + * @function verify + * @memberof proto.LIDMigrationMapping + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LIDMigrationMapping.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (!$util.isInteger(message.pn) && !(message.pn && $util.isInteger(message.pn.low) && $util.isInteger(message.pn.high))) + return "pn: integer|Long expected"; + if (!$util.isInteger(message.assignedLid) && !(message.assignedLid && $util.isInteger(message.assignedLid.low) && $util.isInteger(message.assignedLid.high))) + return "assignedLid: integer|Long expected"; + if (message.latestLid != null && message.hasOwnProperty("latestLid")) { + properties._latestLid = 1; + if (!$util.isInteger(message.latestLid) && !(message.latestLid && $util.isInteger(message.latestLid.low) && $util.isInteger(message.latestLid.high))) + return "latestLid: integer|Long expected"; + } + return null; + }; + + /** + * Creates a LIDMigrationMapping message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.LIDMigrationMapping + * @static + * @param {Object.} object Plain object + * @returns {proto.LIDMigrationMapping} LIDMigrationMapping + */ + LIDMigrationMapping.fromObject = function fromObject(object) { + if (object instanceof $root.proto.LIDMigrationMapping) + return object; + var message = new $root.proto.LIDMigrationMapping(); + if (object.pn != null) + if ($util.Long) + (message.pn = $util.Long.fromValue(object.pn)).unsigned = true; + else if (typeof object.pn === "string") + message.pn = parseInt(object.pn, 10); + else if (typeof object.pn === "number") + message.pn = object.pn; + else if (typeof object.pn === "object") + message.pn = new $util.LongBits(object.pn.low >>> 0, object.pn.high >>> 0).toNumber(true); + if (object.assignedLid != null) + if ($util.Long) + (message.assignedLid = $util.Long.fromValue(object.assignedLid)).unsigned = true; + else if (typeof object.assignedLid === "string") + message.assignedLid = parseInt(object.assignedLid, 10); + else if (typeof object.assignedLid === "number") + message.assignedLid = object.assignedLid; + else if (typeof object.assignedLid === "object") + message.assignedLid = new $util.LongBits(object.assignedLid.low >>> 0, object.assignedLid.high >>> 0).toNumber(true); + if (object.latestLid != null) + if ($util.Long) + (message.latestLid = $util.Long.fromValue(object.latestLid)).unsigned = true; + else if (typeof object.latestLid === "string") + message.latestLid = parseInt(object.latestLid, 10); + else if (typeof object.latestLid === "number") + message.latestLid = object.latestLid; + else if (typeof object.latestLid === "object") + message.latestLid = new $util.LongBits(object.latestLid.low >>> 0, object.latestLid.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a LIDMigrationMapping message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.LIDMigrationMapping + * @static + * @param {proto.LIDMigrationMapping} message LIDMigrationMapping + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LIDMigrationMapping.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.pn = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.pn = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.assignedLid = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.assignedLid = options.longs === String ? "0" : 0; + } + if (message.pn != null && message.hasOwnProperty("pn")) + if (typeof message.pn === "number") + object.pn = options.longs === String ? String(message.pn) : message.pn; + else + object.pn = options.longs === String ? $util.Long.prototype.toString.call(message.pn) : options.longs === Number ? new $util.LongBits(message.pn.low >>> 0, message.pn.high >>> 0).toNumber(true) : message.pn; + if (message.assignedLid != null && message.hasOwnProperty("assignedLid")) + if (typeof message.assignedLid === "number") + object.assignedLid = options.longs === String ? String(message.assignedLid) : message.assignedLid; + else + object.assignedLid = options.longs === String ? $util.Long.prototype.toString.call(message.assignedLid) : options.longs === Number ? new $util.LongBits(message.assignedLid.low >>> 0, message.assignedLid.high >>> 0).toNumber(true) : message.assignedLid; + if (message.latestLid != null && message.hasOwnProperty("latestLid")) { + if (typeof message.latestLid === "number") + object.latestLid = options.longs === String ? String(message.latestLid) : message.latestLid; + else + object.latestLid = options.longs === String ? $util.Long.prototype.toString.call(message.latestLid) : options.longs === Number ? new $util.LongBits(message.latestLid.low >>> 0, message.latestLid.high >>> 0).toNumber(true) : message.latestLid; + if (options.oneofs) + object._latestLid = "latestLid"; + } + return object; + }; + + /** + * Converts this LIDMigrationMapping to JSON. + * @function toJSON + * @memberof proto.LIDMigrationMapping + * @instance + * @returns {Object.} JSON object + */ + LIDMigrationMapping.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LIDMigrationMapping + * @function getTypeUrl + * @memberof proto.LIDMigrationMapping + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LIDMigrationMapping.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.LIDMigrationMapping"; + }; + + return LIDMigrationMapping; + })(); + + proto.LIDMigrationMappingSyncMessage = (function() { + + /** + * Properties of a LIDMigrationMappingSyncMessage. + * @memberof proto + * @interface ILIDMigrationMappingSyncMessage + * @property {Uint8Array|null} [encodedMappingPayload] LIDMigrationMappingSyncMessage encodedMappingPayload + */ + + /** + * Constructs a new LIDMigrationMappingSyncMessage. + * @memberof proto + * @classdesc Represents a LIDMigrationMappingSyncMessage. + * @implements ILIDMigrationMappingSyncMessage + * @constructor + * @param {proto.ILIDMigrationMappingSyncMessage=} [properties] Properties to set + */ + function LIDMigrationMappingSyncMessage(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LIDMigrationMappingSyncMessage encodedMappingPayload. + * @member {Uint8Array|null|undefined} encodedMappingPayload + * @memberof proto.LIDMigrationMappingSyncMessage + * @instance + */ + LIDMigrationMappingSyncMessage.prototype.encodedMappingPayload = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(LIDMigrationMappingSyncMessage.prototype, "_encodedMappingPayload", { + get: $util.oneOfGetter($oneOfFields = ["encodedMappingPayload"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new LIDMigrationMappingSyncMessage instance using the specified properties. + * @function create + * @memberof proto.LIDMigrationMappingSyncMessage + * @static + * @param {proto.ILIDMigrationMappingSyncMessage=} [properties] Properties to set + * @returns {proto.LIDMigrationMappingSyncMessage} LIDMigrationMappingSyncMessage instance + */ + LIDMigrationMappingSyncMessage.create = function create(properties) { + return new LIDMigrationMappingSyncMessage(properties); + }; + + /** + * Encodes the specified LIDMigrationMappingSyncMessage message. Does not implicitly {@link proto.LIDMigrationMappingSyncMessage.verify|verify} messages. + * @function encode + * @memberof proto.LIDMigrationMappingSyncMessage + * @static + * @param {proto.ILIDMigrationMappingSyncMessage} message LIDMigrationMappingSyncMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LIDMigrationMappingSyncMessage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.encodedMappingPayload != null && Object.hasOwnProperty.call(message, "encodedMappingPayload")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.encodedMappingPayload); + return writer; + }; + + /** + * Encodes the specified LIDMigrationMappingSyncMessage message, length delimited. Does not implicitly {@link proto.LIDMigrationMappingSyncMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.LIDMigrationMappingSyncMessage + * @static + * @param {proto.ILIDMigrationMappingSyncMessage} message LIDMigrationMappingSyncMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LIDMigrationMappingSyncMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LIDMigrationMappingSyncMessage message from the specified reader or buffer. + * @function decode + * @memberof proto.LIDMigrationMappingSyncMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.LIDMigrationMappingSyncMessage} LIDMigrationMappingSyncMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LIDMigrationMappingSyncMessage.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.LIDMigrationMappingSyncMessage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.encodedMappingPayload = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LIDMigrationMappingSyncMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.LIDMigrationMappingSyncMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.LIDMigrationMappingSyncMessage} LIDMigrationMappingSyncMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LIDMigrationMappingSyncMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LIDMigrationMappingSyncMessage message. + * @function verify + * @memberof proto.LIDMigrationMappingSyncMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LIDMigrationMappingSyncMessage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.encodedMappingPayload != null && message.hasOwnProperty("encodedMappingPayload")) { + properties._encodedMappingPayload = 1; + if (!(message.encodedMappingPayload && typeof message.encodedMappingPayload.length === "number" || $util.isString(message.encodedMappingPayload))) + return "encodedMappingPayload: buffer expected"; + } + return null; + }; + + /** + * Creates a LIDMigrationMappingSyncMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.LIDMigrationMappingSyncMessage + * @static + * @param {Object.} object Plain object + * @returns {proto.LIDMigrationMappingSyncMessage} LIDMigrationMappingSyncMessage + */ + LIDMigrationMappingSyncMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.LIDMigrationMappingSyncMessage) + return object; + var message = new $root.proto.LIDMigrationMappingSyncMessage(); + if (object.encodedMappingPayload != null) + if (typeof object.encodedMappingPayload === "string") + $util.base64.decode(object.encodedMappingPayload, message.encodedMappingPayload = $util.newBuffer($util.base64.length(object.encodedMappingPayload)), 0); + else if (object.encodedMappingPayload.length >= 0) + message.encodedMappingPayload = object.encodedMappingPayload; + return message; + }; + + /** + * Creates a plain object from a LIDMigrationMappingSyncMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.LIDMigrationMappingSyncMessage + * @static + * @param {proto.LIDMigrationMappingSyncMessage} message LIDMigrationMappingSyncMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LIDMigrationMappingSyncMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.encodedMappingPayload != null && message.hasOwnProperty("encodedMappingPayload")) { + object.encodedMappingPayload = options.bytes === String ? $util.base64.encode(message.encodedMappingPayload, 0, message.encodedMappingPayload.length) : options.bytes === Array ? Array.prototype.slice.call(message.encodedMappingPayload) : message.encodedMappingPayload; + if (options.oneofs) + object._encodedMappingPayload = "encodedMappingPayload"; + } + return object; + }; + + /** + * Converts this LIDMigrationMappingSyncMessage to JSON. + * @function toJSON + * @memberof proto.LIDMigrationMappingSyncMessage + * @instance + * @returns {Object.} JSON object + */ + LIDMigrationMappingSyncMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LIDMigrationMappingSyncMessage + * @function getTypeUrl + * @memberof proto.LIDMigrationMappingSyncMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LIDMigrationMappingSyncMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.LIDMigrationMappingSyncMessage"; + }; + + return LIDMigrationMappingSyncMessage; + })(); + + proto.LIDMigrationMappingSyncPayload = (function() { + + /** + * Properties of a LIDMigrationMappingSyncPayload. + * @memberof proto + * @interface ILIDMigrationMappingSyncPayload + * @property {Array.|null} [pnToLidMappings] LIDMigrationMappingSyncPayload pnToLidMappings + */ + + /** + * Constructs a new LIDMigrationMappingSyncPayload. + * @memberof proto + * @classdesc Represents a LIDMigrationMappingSyncPayload. + * @implements ILIDMigrationMappingSyncPayload + * @constructor + * @param {proto.ILIDMigrationMappingSyncPayload=} [properties] Properties to set + */ + function LIDMigrationMappingSyncPayload(properties) { + this.pnToLidMappings = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LIDMigrationMappingSyncPayload pnToLidMappings. + * @member {Array.} pnToLidMappings + * @memberof proto.LIDMigrationMappingSyncPayload + * @instance + */ + LIDMigrationMappingSyncPayload.prototype.pnToLidMappings = $util.emptyArray; + + /** + * Creates a new LIDMigrationMappingSyncPayload instance using the specified properties. + * @function create + * @memberof proto.LIDMigrationMappingSyncPayload + * @static + * @param {proto.ILIDMigrationMappingSyncPayload=} [properties] Properties to set + * @returns {proto.LIDMigrationMappingSyncPayload} LIDMigrationMappingSyncPayload instance + */ + LIDMigrationMappingSyncPayload.create = function create(properties) { + return new LIDMigrationMappingSyncPayload(properties); + }; + + /** + * Encodes the specified LIDMigrationMappingSyncPayload message. Does not implicitly {@link proto.LIDMigrationMappingSyncPayload.verify|verify} messages. + * @function encode + * @memberof proto.LIDMigrationMappingSyncPayload + * @static + * @param {proto.ILIDMigrationMappingSyncPayload} message LIDMigrationMappingSyncPayload message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LIDMigrationMappingSyncPayload.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.pnToLidMappings != null && message.pnToLidMappings.length) + for (var i = 0; i < message.pnToLidMappings.length; ++i) + $root.proto.LIDMigrationMapping.encode(message.pnToLidMappings[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LIDMigrationMappingSyncPayload message, length delimited. Does not implicitly {@link proto.LIDMigrationMappingSyncPayload.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.LIDMigrationMappingSyncPayload + * @static + * @param {proto.ILIDMigrationMappingSyncPayload} message LIDMigrationMappingSyncPayload message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LIDMigrationMappingSyncPayload.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LIDMigrationMappingSyncPayload message from the specified reader or buffer. + * @function decode + * @memberof proto.LIDMigrationMappingSyncPayload + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.LIDMigrationMappingSyncPayload} LIDMigrationMappingSyncPayload + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LIDMigrationMappingSyncPayload.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.LIDMigrationMappingSyncPayload(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.pnToLidMappings && message.pnToLidMappings.length)) + message.pnToLidMappings = []; + message.pnToLidMappings.push($root.proto.LIDMigrationMapping.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LIDMigrationMappingSyncPayload message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.LIDMigrationMappingSyncPayload + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.LIDMigrationMappingSyncPayload} LIDMigrationMappingSyncPayload + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LIDMigrationMappingSyncPayload.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LIDMigrationMappingSyncPayload message. + * @function verify + * @memberof proto.LIDMigrationMappingSyncPayload + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LIDMigrationMappingSyncPayload.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.pnToLidMappings != null && message.hasOwnProperty("pnToLidMappings")) { + if (!Array.isArray(message.pnToLidMappings)) + return "pnToLidMappings: array expected"; + for (var i = 0; i < message.pnToLidMappings.length; ++i) { + var error = $root.proto.LIDMigrationMapping.verify(message.pnToLidMappings[i]); + if (error) + return "pnToLidMappings." + error; + } + } + return null; + }; + + /** + * Creates a LIDMigrationMappingSyncPayload message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.LIDMigrationMappingSyncPayload + * @static + * @param {Object.} object Plain object + * @returns {proto.LIDMigrationMappingSyncPayload} LIDMigrationMappingSyncPayload + */ + LIDMigrationMappingSyncPayload.fromObject = function fromObject(object) { + if (object instanceof $root.proto.LIDMigrationMappingSyncPayload) + return object; + var message = new $root.proto.LIDMigrationMappingSyncPayload(); + if (object.pnToLidMappings) { + if (!Array.isArray(object.pnToLidMappings)) + throw TypeError(".proto.LIDMigrationMappingSyncPayload.pnToLidMappings: array expected"); + message.pnToLidMappings = []; + for (var i = 0; i < object.pnToLidMappings.length; ++i) { + if (typeof object.pnToLidMappings[i] !== "object") + throw TypeError(".proto.LIDMigrationMappingSyncPayload.pnToLidMappings: object expected"); + message.pnToLidMappings[i] = $root.proto.LIDMigrationMapping.fromObject(object.pnToLidMappings[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a LIDMigrationMappingSyncPayload message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.LIDMigrationMappingSyncPayload + * @static + * @param {proto.LIDMigrationMappingSyncPayload} message LIDMigrationMappingSyncPayload + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LIDMigrationMappingSyncPayload.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.pnToLidMappings = []; + if (message.pnToLidMappings && message.pnToLidMappings.length) { + object.pnToLidMappings = []; + for (var j = 0; j < message.pnToLidMappings.length; ++j) + object.pnToLidMappings[j] = $root.proto.LIDMigrationMapping.toObject(message.pnToLidMappings[j], options); + } + return object; + }; + + /** + * Converts this LIDMigrationMappingSyncPayload to JSON. + * @function toJSON + * @memberof proto.LIDMigrationMappingSyncPayload + * @instance + * @returns {Object.} JSON object + */ + LIDMigrationMappingSyncPayload.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LIDMigrationMappingSyncPayload + * @function getTypeUrl + * @memberof proto.LIDMigrationMappingSyncPayload + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LIDMigrationMappingSyncPayload.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.LIDMigrationMappingSyncPayload"; + }; + + return LIDMigrationMappingSyncPayload; + })(); + + proto.LegacyMessage = (function() { + + /** + * Properties of a LegacyMessage. + * @memberof proto + * @interface ILegacyMessage + * @property {proto.Message.IEventResponseMessage|null} [eventResponseMessage] LegacyMessage eventResponseMessage + * @property {proto.Message.IPollVoteMessage|null} [pollVote] LegacyMessage pollVote + */ + + /** + * Constructs a new LegacyMessage. + * @memberof proto + * @classdesc Represents a LegacyMessage. + * @implements ILegacyMessage + * @constructor + * @param {proto.ILegacyMessage=} [properties] Properties to set + */ + function LegacyMessage(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LegacyMessage eventResponseMessage. + * @member {proto.Message.IEventResponseMessage|null|undefined} eventResponseMessage + * @memberof proto.LegacyMessage + * @instance + */ + LegacyMessage.prototype.eventResponseMessage = null; + + /** + * LegacyMessage pollVote. + * @member {proto.Message.IPollVoteMessage|null|undefined} pollVote + * @memberof proto.LegacyMessage + * @instance + */ + LegacyMessage.prototype.pollVote = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(LegacyMessage.prototype, "_eventResponseMessage", { + get: $util.oneOfGetter($oneOfFields = ["eventResponseMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(LegacyMessage.prototype, "_pollVote", { + get: $util.oneOfGetter($oneOfFields = ["pollVote"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new LegacyMessage instance using the specified properties. + * @function create + * @memberof proto.LegacyMessage + * @static + * @param {proto.ILegacyMessage=} [properties] Properties to set + * @returns {proto.LegacyMessage} LegacyMessage instance + */ + LegacyMessage.create = function create(properties) { + return new LegacyMessage(properties); + }; + + /** + * Encodes the specified LegacyMessage message. Does not implicitly {@link proto.LegacyMessage.verify|verify} messages. + * @function encode + * @memberof proto.LegacyMessage + * @static + * @param {proto.ILegacyMessage} message LegacyMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LegacyMessage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.eventResponseMessage != null && Object.hasOwnProperty.call(message, "eventResponseMessage")) + $root.proto.Message.EventResponseMessage.encode(message.eventResponseMessage, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.pollVote != null && Object.hasOwnProperty.call(message, "pollVote")) + $root.proto.Message.PollVoteMessage.encode(message.pollVote, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LegacyMessage message, length delimited. Does not implicitly {@link proto.LegacyMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.LegacyMessage + * @static + * @param {proto.ILegacyMessage} message LegacyMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LegacyMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LegacyMessage message from the specified reader or buffer. + * @function decode + * @memberof proto.LegacyMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.LegacyMessage} LegacyMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LegacyMessage.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.LegacyMessage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.eventResponseMessage = $root.proto.Message.EventResponseMessage.decode(reader, reader.uint32()); + break; + } + case 2: { + message.pollVote = $root.proto.Message.PollVoteMessage.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LegacyMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.LegacyMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.LegacyMessage} LegacyMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LegacyMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LegacyMessage message. + * @function verify + * @memberof proto.LegacyMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LegacyMessage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.eventResponseMessage != null && message.hasOwnProperty("eventResponseMessage")) { + properties._eventResponseMessage = 1; + { + var error = $root.proto.Message.EventResponseMessage.verify(message.eventResponseMessage); + if (error) + return "eventResponseMessage." + error; + } + } + if (message.pollVote != null && message.hasOwnProperty("pollVote")) { + properties._pollVote = 1; + { + var error = $root.proto.Message.PollVoteMessage.verify(message.pollVote); + if (error) + return "pollVote." + error; + } + } + return null; + }; + + /** + * Creates a LegacyMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.LegacyMessage + * @static + * @param {Object.} object Plain object + * @returns {proto.LegacyMessage} LegacyMessage + */ + LegacyMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.LegacyMessage) + return object; + var message = new $root.proto.LegacyMessage(); + if (object.eventResponseMessage != null) { + if (typeof object.eventResponseMessage !== "object") + throw TypeError(".proto.LegacyMessage.eventResponseMessage: object expected"); + message.eventResponseMessage = $root.proto.Message.EventResponseMessage.fromObject(object.eventResponseMessage); + } + if (object.pollVote != null) { + if (typeof object.pollVote !== "object") + throw TypeError(".proto.LegacyMessage.pollVote: object expected"); + message.pollVote = $root.proto.Message.PollVoteMessage.fromObject(object.pollVote); + } + return message; + }; + + /** + * Creates a plain object from a LegacyMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.LegacyMessage + * @static + * @param {proto.LegacyMessage} message LegacyMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LegacyMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.eventResponseMessage != null && message.hasOwnProperty("eventResponseMessage")) { + object.eventResponseMessage = $root.proto.Message.EventResponseMessage.toObject(message.eventResponseMessage, options); + if (options.oneofs) + object._eventResponseMessage = "eventResponseMessage"; + } + if (message.pollVote != null && message.hasOwnProperty("pollVote")) { + object.pollVote = $root.proto.Message.PollVoteMessage.toObject(message.pollVote, options); + if (options.oneofs) + object._pollVote = "pollVote"; + } + return object; + }; + + /** + * Converts this LegacyMessage to JSON. + * @function toJSON + * @memberof proto.LegacyMessage + * @instance + * @returns {Object.} JSON object + */ + LegacyMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LegacyMessage + * @function getTypeUrl + * @memberof proto.LegacyMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LegacyMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.LegacyMessage"; + }; + + return LegacyMessage; + })(); + + proto.LimitSharing = (function() { + + /** + * Properties of a LimitSharing. + * @memberof proto + * @interface ILimitSharing + * @property {boolean|null} [sharingLimited] LimitSharing sharingLimited + * @property {proto.LimitSharing.Trigger|null} [trigger] LimitSharing trigger + */ + + /** + * Constructs a new LimitSharing. + * @memberof proto + * @classdesc Represents a LimitSharing. + * @implements ILimitSharing + * @constructor + * @param {proto.ILimitSharing=} [properties] Properties to set + */ + function LimitSharing(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LimitSharing sharingLimited. + * @member {boolean|null|undefined} sharingLimited + * @memberof proto.LimitSharing + * @instance + */ + LimitSharing.prototype.sharingLimited = null; + + /** + * LimitSharing trigger. + * @member {proto.LimitSharing.Trigger|null|undefined} trigger + * @memberof proto.LimitSharing + * @instance + */ + LimitSharing.prototype.trigger = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(LimitSharing.prototype, "_sharingLimited", { + get: $util.oneOfGetter($oneOfFields = ["sharingLimited"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(LimitSharing.prototype, "_trigger", { + get: $util.oneOfGetter($oneOfFields = ["trigger"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new LimitSharing instance using the specified properties. + * @function create + * @memberof proto.LimitSharing + * @static + * @param {proto.ILimitSharing=} [properties] Properties to set + * @returns {proto.LimitSharing} LimitSharing instance + */ + LimitSharing.create = function create(properties) { + return new LimitSharing(properties); + }; + + /** + * Encodes the specified LimitSharing message. Does not implicitly {@link proto.LimitSharing.verify|verify} messages. + * @function encode + * @memberof proto.LimitSharing + * @static + * @param {proto.ILimitSharing} message LimitSharing message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LimitSharing.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sharingLimited != null && Object.hasOwnProperty.call(message, "sharingLimited")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.sharingLimited); + if (message.trigger != null && Object.hasOwnProperty.call(message, "trigger")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.trigger); + return writer; + }; + + /** + * Encodes the specified LimitSharing message, length delimited. Does not implicitly {@link proto.LimitSharing.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.LimitSharing + * @static + * @param {proto.ILimitSharing} message LimitSharing message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LimitSharing.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LimitSharing message from the specified reader or buffer. + * @function decode + * @memberof proto.LimitSharing + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.LimitSharing} LimitSharing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LimitSharing.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.LimitSharing(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.sharingLimited = reader.bool(); + break; + } + case 2: { + message.trigger = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LimitSharing message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.LimitSharing + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.LimitSharing} LimitSharing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LimitSharing.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LimitSharing message. + * @function verify + * @memberof proto.LimitSharing + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LimitSharing.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.sharingLimited != null && message.hasOwnProperty("sharingLimited")) { + properties._sharingLimited = 1; + if (typeof message.sharingLimited !== "boolean") + return "sharingLimited: boolean expected"; + } + if (message.trigger != null && message.hasOwnProperty("trigger")) { + properties._trigger = 1; + switch (message.trigger) { + default: + return "trigger: enum value expected"; + case 0: + case 1: + break; + } + } + return null; + }; + + /** + * Creates a LimitSharing message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.LimitSharing + * @static + * @param {Object.} object Plain object + * @returns {proto.LimitSharing} LimitSharing + */ + LimitSharing.fromObject = function fromObject(object) { + if (object instanceof $root.proto.LimitSharing) + return object; + var message = new $root.proto.LimitSharing(); + if (object.sharingLimited != null) + message.sharingLimited = Boolean(object.sharingLimited); + switch (object.trigger) { + default: + if (typeof object.trigger === "number") { + message.trigger = object.trigger; + break; + } + break; + case "CHAT_SETTING": + case 0: + message.trigger = 0; + break; + case "BIZ_SUPPORTS_FB_HOSTING": + case 1: + message.trigger = 1; + break; + } + return message; + }; + + /** + * Creates a plain object from a LimitSharing message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.LimitSharing + * @static + * @param {proto.LimitSharing} message LimitSharing + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LimitSharing.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.sharingLimited != null && message.hasOwnProperty("sharingLimited")) { + object.sharingLimited = message.sharingLimited; + if (options.oneofs) + object._sharingLimited = "sharingLimited"; + } + if (message.trigger != null && message.hasOwnProperty("trigger")) { + object.trigger = options.enums === String ? $root.proto.LimitSharing.Trigger[message.trigger] === undefined ? message.trigger : $root.proto.LimitSharing.Trigger[message.trigger] : message.trigger; + if (options.oneofs) + object._trigger = "trigger"; + } + return object; + }; + + /** + * Converts this LimitSharing to JSON. + * @function toJSON + * @memberof proto.LimitSharing + * @instance + * @returns {Object.} JSON object + */ + LimitSharing.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LimitSharing + * @function getTypeUrl + * @memberof proto.LimitSharing + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LimitSharing.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.LimitSharing"; + }; + + /** + * Trigger enum. + * @name proto.LimitSharing.Trigger + * @enum {number} + * @property {number} CHAT_SETTING=0 CHAT_SETTING value + * @property {number} BIZ_SUPPORTS_FB_HOSTING=1 BIZ_SUPPORTS_FB_HOSTING value + */ + LimitSharing.Trigger = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CHAT_SETTING"] = 0; + values[valuesById[1] = "BIZ_SUPPORTS_FB_HOSTING"] = 1; + return values; + })(); + + return LimitSharing; + })(); + proto.LocalizedName = (function() { /** @@ -24218,27 +49980,48 @@ $root.proto = (function() { /** * LocalizedName lg. - * @member {string} lg + * @member {string|null|undefined} lg * @memberof proto.LocalizedName * @instance */ - LocalizedName.prototype.lg = ""; + LocalizedName.prototype.lg = null; /** * LocalizedName lc. - * @member {string} lc + * @member {string|null|undefined} lc * @memberof proto.LocalizedName * @instance */ - LocalizedName.prototype.lc = ""; + LocalizedName.prototype.lc = null; /** * LocalizedName verifiedName. - * @member {string} verifiedName + * @member {string|null|undefined} verifiedName * @memberof proto.LocalizedName * @instance */ - LocalizedName.prototype.verifiedName = ""; + LocalizedName.prototype.verifiedName = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(LocalizedName.prototype, "_lg", { + get: $util.oneOfGetter($oneOfFields = ["lg"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(LocalizedName.prototype, "_lc", { + get: $util.oneOfGetter($oneOfFields = ["lc"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(LocalizedName.prototype, "_verifiedName", { + get: $util.oneOfGetter($oneOfFields = ["verifiedName"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new LocalizedName instance using the specified properties. @@ -24304,15 +50087,18 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.lg = reader.string(); - break; - case 2: - message.lc = reader.string(); - break; - case 3: - message.verifiedName = reader.string(); - break; + case 1: { + message.lg = reader.string(); + break; + } + case 2: { + message.lc = reader.string(); + break; + } + case 3: { + message.verifiedName = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -24348,15 +50134,22 @@ $root.proto = (function() { LocalizedName.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.lg != null && message.hasOwnProperty("lg")) + var properties = {}; + if (message.lg != null && message.hasOwnProperty("lg")) { + properties._lg = 1; if (!$util.isString(message.lg)) return "lg: string expected"; - if (message.lc != null && message.hasOwnProperty("lc")) + } + if (message.lc != null && message.hasOwnProperty("lc")) { + properties._lc = 1; if (!$util.isString(message.lc)) return "lc: string expected"; - if (message.verifiedName != null && message.hasOwnProperty("verifiedName")) + } + if (message.verifiedName != null && message.hasOwnProperty("verifiedName")) { + properties._verifiedName = 1; if (!$util.isString(message.verifiedName)) return "verifiedName: string expected"; + } return null; }; @@ -24394,17 +50187,21 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.lg = ""; - object.lc = ""; - object.verifiedName = ""; - } - if (message.lg != null && message.hasOwnProperty("lg")) + if (message.lg != null && message.hasOwnProperty("lg")) { object.lg = message.lg; - if (message.lc != null && message.hasOwnProperty("lc")) + if (options.oneofs) + object._lg = "lg"; + } + if (message.lc != null && message.hasOwnProperty("lc")) { object.lc = message.lc; - if (message.verifiedName != null && message.hasOwnProperty("verifiedName")) + if (options.oneofs) + object._lc = "lc"; + } + if (message.verifiedName != null && message.hasOwnProperty("verifiedName")) { object.verifiedName = message.verifiedName; + if (options.oneofs) + object._verifiedName = "verifiedName"; + } return object; }; @@ -24419,6 +50216,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for LocalizedName + * @function getTypeUrl + * @memberof proto.LocalizedName + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LocalizedName.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.LocalizedName"; + }; + return LocalizedName; })(); @@ -24450,27 +50262,48 @@ $root.proto = (function() { /** * Location degreesLatitude. - * @member {number} degreesLatitude + * @member {number|null|undefined} degreesLatitude * @memberof proto.Location * @instance */ - Location.prototype.degreesLatitude = 0; + Location.prototype.degreesLatitude = null; /** * Location degreesLongitude. - * @member {number} degreesLongitude + * @member {number|null|undefined} degreesLongitude * @memberof proto.Location * @instance */ - Location.prototype.degreesLongitude = 0; + Location.prototype.degreesLongitude = null; /** * Location name. - * @member {string} name + * @member {string|null|undefined} name * @memberof proto.Location * @instance */ - Location.prototype.name = ""; + Location.prototype.name = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Location.prototype, "_degreesLatitude", { + get: $util.oneOfGetter($oneOfFields = ["degreesLatitude"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Location.prototype, "_degreesLongitude", { + get: $util.oneOfGetter($oneOfFields = ["degreesLongitude"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Location.prototype, "_name", { + get: $util.oneOfGetter($oneOfFields = ["name"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new Location instance using the specified properties. @@ -24536,15 +50369,18 @@ $root.proto = (function() { 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 1: { + message.degreesLatitude = reader.double(); + break; + } + case 2: { + message.degreesLongitude = reader.double(); + break; + } + case 3: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -24580,15 +50416,22 @@ $root.proto = (function() { Location.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.degreesLatitude != null && message.hasOwnProperty("degreesLatitude")) + var properties = {}; + if (message.degreesLatitude != null && message.hasOwnProperty("degreesLatitude")) { + properties._degreesLatitude = 1; if (typeof message.degreesLatitude !== "number") return "degreesLatitude: number expected"; - if (message.degreesLongitude != null && message.hasOwnProperty("degreesLongitude")) + } + if (message.degreesLongitude != null && message.hasOwnProperty("degreesLongitude")) { + properties._degreesLongitude = 1; if (typeof message.degreesLongitude !== "number") return "degreesLongitude: number expected"; - if (message.name != null && message.hasOwnProperty("name")) + } + if (message.name != null && message.hasOwnProperty("name")) { + properties._name = 1; if (!$util.isString(message.name)) return "name: string expected"; + } return null; }; @@ -24626,17 +50469,21 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.degreesLatitude = 0; - object.degreesLongitude = 0; - object.name = ""; - } - if (message.degreesLatitude != null && message.hasOwnProperty("degreesLatitude")) + 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")) + if (options.oneofs) + object._degreesLatitude = "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")) + if (options.oneofs) + object._degreesLongitude = "degreesLongitude"; + } + if (message.name != null && message.hasOwnProperty("name")) { object.name = message.name; + if (options.oneofs) + object._name = "name"; + } return object; }; @@ -24651,6 +50498,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Location + * @function getTypeUrl + * @memberof proto.Location + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Location.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Location"; + }; + return Location; })(); @@ -24680,11 +50542,20 @@ $root.proto = (function() { /** * MediaData localPath. - * @member {string} localPath + * @member {string|null|undefined} localPath * @memberof proto.MediaData * @instance */ - MediaData.prototype.localPath = ""; + MediaData.prototype.localPath = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MediaData.prototype, "_localPath", { + get: $util.oneOfGetter($oneOfFields = ["localPath"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new MediaData instance using the specified properties. @@ -24746,9 +50617,10 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.localPath = reader.string(); - break; + case 1: { + message.localPath = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -24784,9 +50656,12 @@ $root.proto = (function() { MediaData.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.localPath != null && message.hasOwnProperty("localPath")) + var properties = {}; + if (message.localPath != null && message.hasOwnProperty("localPath")) { + properties._localPath = 1; if (!$util.isString(message.localPath)) return "localPath: string expected"; + } return null; }; @@ -24820,10 +50695,11 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) - object.localPath = ""; - if (message.localPath != null && message.hasOwnProperty("localPath")) + if (message.localPath != null && message.hasOwnProperty("localPath")) { object.localPath = message.localPath; + if (options.oneofs) + object._localPath = "localPath"; + } return object; }; @@ -24838,1172 +50714,24 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for MediaData + * @function getTypeUrl + * @memberof proto.MediaData + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MediaData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.MediaData"; + }; + return MediaData; })(); - proto.MediaEntry = (function() { - - /** - * Properties of a MediaEntry. - * @memberof proto - * @interface IMediaEntry - * @property {Uint8Array|null} [fileSha256] MediaEntry fileSha256 - * @property {Uint8Array|null} [mediaKey] MediaEntry mediaKey - * @property {Uint8Array|null} [fileEncSha256] MediaEntry fileEncSha256 - * @property {string|null} [directPath] MediaEntry directPath - * @property {number|Long|null} [mediaKeyTimestamp] MediaEntry mediaKeyTimestamp - * @property {string|null} [serverMediaType] MediaEntry serverMediaType - * @property {Uint8Array|null} [uploadToken] MediaEntry uploadToken - * @property {Uint8Array|null} [validatedTimestamp] MediaEntry validatedTimestamp - * @property {Uint8Array|null} [sidecar] MediaEntry sidecar - * @property {string|null} [objectId] MediaEntry objectId - * @property {string|null} [fbid] MediaEntry fbid - * @property {proto.MediaEntry.IDownloadableThumbnail|null} [downloadableThumbnail] MediaEntry downloadableThumbnail - * @property {string|null} [handle] MediaEntry handle - * @property {string|null} [filename] MediaEntry filename - * @property {proto.MediaEntry.IProgressiveJpegDetails|null} [progressiveJpegDetails] MediaEntry progressiveJpegDetails - */ - - /** - * Constructs a new MediaEntry. - * @memberof proto - * @classdesc Represents a MediaEntry. - * @implements IMediaEntry - * @constructor - * @param {proto.IMediaEntry=} [properties] Properties to set - */ - function MediaEntry(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MediaEntry fileSha256. - * @member {Uint8Array} fileSha256 - * @memberof proto.MediaEntry - * @instance - */ - MediaEntry.prototype.fileSha256 = $util.newBuffer([]); - - /** - * MediaEntry mediaKey. - * @member {Uint8Array} mediaKey - * @memberof proto.MediaEntry - * @instance - */ - MediaEntry.prototype.mediaKey = $util.newBuffer([]); - - /** - * MediaEntry fileEncSha256. - * @member {Uint8Array} fileEncSha256 - * @memberof proto.MediaEntry - * @instance - */ - MediaEntry.prototype.fileEncSha256 = $util.newBuffer([]); - - /** - * MediaEntry directPath. - * @member {string} directPath - * @memberof proto.MediaEntry - * @instance - */ - MediaEntry.prototype.directPath = ""; - - /** - * MediaEntry mediaKeyTimestamp. - * @member {number|Long} mediaKeyTimestamp - * @memberof proto.MediaEntry - * @instance - */ - MediaEntry.prototype.mediaKeyTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * MediaEntry serverMediaType. - * @member {string} serverMediaType - * @memberof proto.MediaEntry - * @instance - */ - MediaEntry.prototype.serverMediaType = ""; - - /** - * MediaEntry uploadToken. - * @member {Uint8Array} uploadToken - * @memberof proto.MediaEntry - * @instance - */ - MediaEntry.prototype.uploadToken = $util.newBuffer([]); - - /** - * MediaEntry validatedTimestamp. - * @member {Uint8Array} validatedTimestamp - * @memberof proto.MediaEntry - * @instance - */ - MediaEntry.prototype.validatedTimestamp = $util.newBuffer([]); - - /** - * MediaEntry sidecar. - * @member {Uint8Array} sidecar - * @memberof proto.MediaEntry - * @instance - */ - MediaEntry.prototype.sidecar = $util.newBuffer([]); - - /** - * MediaEntry objectId. - * @member {string} objectId - * @memberof proto.MediaEntry - * @instance - */ - MediaEntry.prototype.objectId = ""; - - /** - * MediaEntry fbid. - * @member {string} fbid - * @memberof proto.MediaEntry - * @instance - */ - MediaEntry.prototype.fbid = ""; - - /** - * MediaEntry downloadableThumbnail. - * @member {proto.MediaEntry.IDownloadableThumbnail|null|undefined} downloadableThumbnail - * @memberof proto.MediaEntry - * @instance - */ - MediaEntry.prototype.downloadableThumbnail = null; - - /** - * MediaEntry handle. - * @member {string} handle - * @memberof proto.MediaEntry - * @instance - */ - MediaEntry.prototype.handle = ""; - - /** - * MediaEntry filename. - * @member {string} filename - * @memberof proto.MediaEntry - * @instance - */ - MediaEntry.prototype.filename = ""; - - /** - * MediaEntry progressiveJpegDetails. - * @member {proto.MediaEntry.IProgressiveJpegDetails|null|undefined} progressiveJpegDetails - * @memberof proto.MediaEntry - * @instance - */ - MediaEntry.prototype.progressiveJpegDetails = null; - - /** - * Creates a new MediaEntry instance using the specified properties. - * @function create - * @memberof proto.MediaEntry - * @static - * @param {proto.IMediaEntry=} [properties] Properties to set - * @returns {proto.MediaEntry} MediaEntry instance - */ - MediaEntry.create = function create(properties) { - return new MediaEntry(properties); - }; - - /** - * Encodes the specified MediaEntry message. Does not implicitly {@link proto.MediaEntry.verify|verify} messages. - * @function encode - * @memberof proto.MediaEntry - * @static - * @param {proto.IMediaEntry} message MediaEntry message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MediaEntry.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.mediaKey != null && Object.hasOwnProperty.call(message, "mediaKey")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.mediaKey); - if (message.fileEncSha256 != null && Object.hasOwnProperty.call(message, "fileEncSha256")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.fileEncSha256); - if (message.directPath != null && Object.hasOwnProperty.call(message, "directPath")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.directPath); - if (message.mediaKeyTimestamp != null && Object.hasOwnProperty.call(message, "mediaKeyTimestamp")) - writer.uint32(/* id 5, wireType 0 =*/40).int64(message.mediaKeyTimestamp); - if (message.serverMediaType != null && Object.hasOwnProperty.call(message, "serverMediaType")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.serverMediaType); - if (message.uploadToken != null && Object.hasOwnProperty.call(message, "uploadToken")) - writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.uploadToken); - if (message.validatedTimestamp != null && Object.hasOwnProperty.call(message, "validatedTimestamp")) - writer.uint32(/* id 8, wireType 2 =*/66).bytes(message.validatedTimestamp); - if (message.sidecar != null && Object.hasOwnProperty.call(message, "sidecar")) - writer.uint32(/* id 9, wireType 2 =*/74).bytes(message.sidecar); - if (message.objectId != null && Object.hasOwnProperty.call(message, "objectId")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.objectId); - if (message.fbid != null && Object.hasOwnProperty.call(message, "fbid")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.fbid); - if (message.downloadableThumbnail != null && Object.hasOwnProperty.call(message, "downloadableThumbnail")) - $root.proto.MediaEntry.DownloadableThumbnail.encode(message.downloadableThumbnail, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.handle != null && Object.hasOwnProperty.call(message, "handle")) - writer.uint32(/* id 13, wireType 2 =*/106).string(message.handle); - if (message.filename != null && Object.hasOwnProperty.call(message, "filename")) - writer.uint32(/* id 14, wireType 2 =*/114).string(message.filename); - if (message.progressiveJpegDetails != null && Object.hasOwnProperty.call(message, "progressiveJpegDetails")) - $root.proto.MediaEntry.ProgressiveJpegDetails.encode(message.progressiveJpegDetails, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MediaEntry message, length delimited. Does not implicitly {@link proto.MediaEntry.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.MediaEntry - * @static - * @param {proto.IMediaEntry} message MediaEntry message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MediaEntry.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MediaEntry message from the specified reader or buffer. - * @function decode - * @memberof proto.MediaEntry - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.MediaEntry} MediaEntry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MediaEntry.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.MediaEntry(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.fileSha256 = reader.bytes(); - break; - case 2: - message.mediaKey = reader.bytes(); - break; - case 3: - message.fileEncSha256 = reader.bytes(); - break; - case 4: - message.directPath = reader.string(); - break; - case 5: - message.mediaKeyTimestamp = reader.int64(); - break; - case 6: - message.serverMediaType = reader.string(); - break; - case 7: - message.uploadToken = reader.bytes(); - break; - case 8: - message.validatedTimestamp = reader.bytes(); - break; - case 9: - message.sidecar = reader.bytes(); - break; - case 10: - message.objectId = reader.string(); - break; - case 11: - message.fbid = reader.string(); - break; - case 12: - message.downloadableThumbnail = $root.proto.MediaEntry.DownloadableThumbnail.decode(reader, reader.uint32()); - break; - case 13: - message.handle = reader.string(); - break; - case 14: - message.filename = reader.string(); - break; - case 15: - message.progressiveJpegDetails = $root.proto.MediaEntry.ProgressiveJpegDetails.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MediaEntry message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.MediaEntry - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.MediaEntry} MediaEntry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MediaEntry.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MediaEntry message. - * @function verify - * @memberof proto.MediaEntry - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MediaEntry.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.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.serverMediaType != null && message.hasOwnProperty("serverMediaType")) - if (!$util.isString(message.serverMediaType)) - return "serverMediaType: string expected"; - if (message.uploadToken != null && message.hasOwnProperty("uploadToken")) - if (!(message.uploadToken && typeof message.uploadToken.length === "number" || $util.isString(message.uploadToken))) - return "uploadToken: buffer expected"; - if (message.validatedTimestamp != null && message.hasOwnProperty("validatedTimestamp")) - if (!(message.validatedTimestamp && typeof message.validatedTimestamp.length === "number" || $util.isString(message.validatedTimestamp))) - return "validatedTimestamp: buffer expected"; - if (message.sidecar != null && message.hasOwnProperty("sidecar")) - if (!(message.sidecar && typeof message.sidecar.length === "number" || $util.isString(message.sidecar))) - return "sidecar: buffer expected"; - if (message.objectId != null && message.hasOwnProperty("objectId")) - if (!$util.isString(message.objectId)) - return "objectId: string expected"; - if (message.fbid != null && message.hasOwnProperty("fbid")) - if (!$util.isString(message.fbid)) - return "fbid: string expected"; - if (message.downloadableThumbnail != null && message.hasOwnProperty("downloadableThumbnail")) { - var error = $root.proto.MediaEntry.DownloadableThumbnail.verify(message.downloadableThumbnail); - if (error) - return "downloadableThumbnail." + error; - } - if (message.handle != null && message.hasOwnProperty("handle")) - if (!$util.isString(message.handle)) - return "handle: string expected"; - if (message.filename != null && message.hasOwnProperty("filename")) - if (!$util.isString(message.filename)) - return "filename: string expected"; - if (message.progressiveJpegDetails != null && message.hasOwnProperty("progressiveJpegDetails")) { - var error = $root.proto.MediaEntry.ProgressiveJpegDetails.verify(message.progressiveJpegDetails); - if (error) - return "progressiveJpegDetails." + error; - } - return null; - }; - - /** - * Creates a MediaEntry message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.MediaEntry - * @static - * @param {Object.} object Plain object - * @returns {proto.MediaEntry} MediaEntry - */ - MediaEntry.fromObject = function fromObject(object) { - if (object instanceof $root.proto.MediaEntry) - return object; - var message = new $root.proto.MediaEntry(); - 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.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.serverMediaType != null) - message.serverMediaType = String(object.serverMediaType); - if (object.uploadToken != null) - if (typeof object.uploadToken === "string") - $util.base64.decode(object.uploadToken, message.uploadToken = $util.newBuffer($util.base64.length(object.uploadToken)), 0); - else if (object.uploadToken.length) - message.uploadToken = object.uploadToken; - if (object.validatedTimestamp != null) - if (typeof object.validatedTimestamp === "string") - $util.base64.decode(object.validatedTimestamp, message.validatedTimestamp = $util.newBuffer($util.base64.length(object.validatedTimestamp)), 0); - else if (object.validatedTimestamp.length) - message.validatedTimestamp = object.validatedTimestamp; - if (object.sidecar != null) - if (typeof object.sidecar === "string") - $util.base64.decode(object.sidecar, message.sidecar = $util.newBuffer($util.base64.length(object.sidecar)), 0); - else if (object.sidecar.length) - message.sidecar = object.sidecar; - if (object.objectId != null) - message.objectId = String(object.objectId); - if (object.fbid != null) - message.fbid = String(object.fbid); - if (object.downloadableThumbnail != null) { - if (typeof object.downloadableThumbnail !== "object") - throw TypeError(".proto.MediaEntry.downloadableThumbnail: object expected"); - message.downloadableThumbnail = $root.proto.MediaEntry.DownloadableThumbnail.fromObject(object.downloadableThumbnail); - } - if (object.handle != null) - message.handle = String(object.handle); - if (object.filename != null) - message.filename = String(object.filename); - if (object.progressiveJpegDetails != null) { - if (typeof object.progressiveJpegDetails !== "object") - throw TypeError(".proto.MediaEntry.progressiveJpegDetails: object expected"); - message.progressiveJpegDetails = $root.proto.MediaEntry.ProgressiveJpegDetails.fromObject(object.progressiveJpegDetails); - } - return message; - }; - - /** - * Creates a plain object from a MediaEntry message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.MediaEntry - * @static - * @param {proto.MediaEntry} message MediaEntry - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MediaEntry.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 (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.serverMediaType = ""; - if (options.bytes === String) - object.uploadToken = ""; - else { - object.uploadToken = []; - if (options.bytes !== Array) - object.uploadToken = $util.newBuffer(object.uploadToken); - } - if (options.bytes === String) - object.validatedTimestamp = ""; - else { - object.validatedTimestamp = []; - if (options.bytes !== Array) - object.validatedTimestamp = $util.newBuffer(object.validatedTimestamp); - } - if (options.bytes === String) - object.sidecar = ""; - else { - object.sidecar = []; - if (options.bytes !== Array) - object.sidecar = $util.newBuffer(object.sidecar); - } - object.objectId = ""; - object.fbid = ""; - object.downloadableThumbnail = null; - object.handle = ""; - object.filename = ""; - object.progressiveJpegDetails = null; - } - 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.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.serverMediaType != null && message.hasOwnProperty("serverMediaType")) - object.serverMediaType = message.serverMediaType; - if (message.uploadToken != null && message.hasOwnProperty("uploadToken")) - object.uploadToken = options.bytes === String ? $util.base64.encode(message.uploadToken, 0, message.uploadToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.uploadToken) : message.uploadToken; - if (message.validatedTimestamp != null && message.hasOwnProperty("validatedTimestamp")) - object.validatedTimestamp = options.bytes === String ? $util.base64.encode(message.validatedTimestamp, 0, message.validatedTimestamp.length) : options.bytes === Array ? Array.prototype.slice.call(message.validatedTimestamp) : message.validatedTimestamp; - if (message.sidecar != null && message.hasOwnProperty("sidecar")) - object.sidecar = options.bytes === String ? $util.base64.encode(message.sidecar, 0, message.sidecar.length) : options.bytes === Array ? Array.prototype.slice.call(message.sidecar) : message.sidecar; - if (message.objectId != null && message.hasOwnProperty("objectId")) - object.objectId = message.objectId; - if (message.fbid != null && message.hasOwnProperty("fbid")) - object.fbid = message.fbid; - if (message.downloadableThumbnail != null && message.hasOwnProperty("downloadableThumbnail")) - object.downloadableThumbnail = $root.proto.MediaEntry.DownloadableThumbnail.toObject(message.downloadableThumbnail, options); - if (message.handle != null && message.hasOwnProperty("handle")) - object.handle = message.handle; - if (message.filename != null && message.hasOwnProperty("filename")) - object.filename = message.filename; - if (message.progressiveJpegDetails != null && message.hasOwnProperty("progressiveJpegDetails")) - object.progressiveJpegDetails = $root.proto.MediaEntry.ProgressiveJpegDetails.toObject(message.progressiveJpegDetails, options); - return object; - }; - - /** - * Converts this MediaEntry to JSON. - * @function toJSON - * @memberof proto.MediaEntry - * @instance - * @returns {Object.} JSON object - */ - MediaEntry.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - MediaEntry.DownloadableThumbnail = (function() { - - /** - * Properties of a DownloadableThumbnail. - * @memberof proto.MediaEntry - * @interface IDownloadableThumbnail - * @property {Uint8Array|null} [fileSha256] DownloadableThumbnail fileSha256 - * @property {Uint8Array|null} [fileEncSha256] DownloadableThumbnail fileEncSha256 - * @property {string|null} [directPath] DownloadableThumbnail directPath - * @property {Uint8Array|null} [mediaKey] DownloadableThumbnail mediaKey - * @property {number|Long|null} [mediaKeyTimestamp] DownloadableThumbnail mediaKeyTimestamp - * @property {string|null} [objectId] DownloadableThumbnail objectId - */ - - /** - * Constructs a new DownloadableThumbnail. - * @memberof proto.MediaEntry - * @classdesc Represents a DownloadableThumbnail. - * @implements IDownloadableThumbnail - * @constructor - * @param {proto.MediaEntry.IDownloadableThumbnail=} [properties] Properties to set - */ - function DownloadableThumbnail(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DownloadableThumbnail fileSha256. - * @member {Uint8Array} fileSha256 - * @memberof proto.MediaEntry.DownloadableThumbnail - * @instance - */ - DownloadableThumbnail.prototype.fileSha256 = $util.newBuffer([]); - - /** - * DownloadableThumbnail fileEncSha256. - * @member {Uint8Array} fileEncSha256 - * @memberof proto.MediaEntry.DownloadableThumbnail - * @instance - */ - DownloadableThumbnail.prototype.fileEncSha256 = $util.newBuffer([]); - - /** - * DownloadableThumbnail directPath. - * @member {string} directPath - * @memberof proto.MediaEntry.DownloadableThumbnail - * @instance - */ - DownloadableThumbnail.prototype.directPath = ""; - - /** - * DownloadableThumbnail mediaKey. - * @member {Uint8Array} mediaKey - * @memberof proto.MediaEntry.DownloadableThumbnail - * @instance - */ - DownloadableThumbnail.prototype.mediaKey = $util.newBuffer([]); - - /** - * DownloadableThumbnail mediaKeyTimestamp. - * @member {number|Long} mediaKeyTimestamp - * @memberof proto.MediaEntry.DownloadableThumbnail - * @instance - */ - DownloadableThumbnail.prototype.mediaKeyTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * DownloadableThumbnail objectId. - * @member {string} objectId - * @memberof proto.MediaEntry.DownloadableThumbnail - * @instance - */ - DownloadableThumbnail.prototype.objectId = ""; - - /** - * Creates a new DownloadableThumbnail instance using the specified properties. - * @function create - * @memberof proto.MediaEntry.DownloadableThumbnail - * @static - * @param {proto.MediaEntry.IDownloadableThumbnail=} [properties] Properties to set - * @returns {proto.MediaEntry.DownloadableThumbnail} DownloadableThumbnail instance - */ - DownloadableThumbnail.create = function create(properties) { - return new DownloadableThumbnail(properties); - }; - - /** - * Encodes the specified DownloadableThumbnail message. Does not implicitly {@link proto.MediaEntry.DownloadableThumbnail.verify|verify} messages. - * @function encode - * @memberof proto.MediaEntry.DownloadableThumbnail - * @static - * @param {proto.MediaEntry.IDownloadableThumbnail} message DownloadableThumbnail message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DownloadableThumbnail.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.fileEncSha256 != null && Object.hasOwnProperty.call(message, "fileEncSha256")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.fileEncSha256); - if (message.directPath != null && Object.hasOwnProperty.call(message, "directPath")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.directPath); - if (message.mediaKey != null && Object.hasOwnProperty.call(message, "mediaKey")) - writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.mediaKey); - if (message.mediaKeyTimestamp != null && Object.hasOwnProperty.call(message, "mediaKeyTimestamp")) - writer.uint32(/* id 5, wireType 0 =*/40).int64(message.mediaKeyTimestamp); - if (message.objectId != null && Object.hasOwnProperty.call(message, "objectId")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.objectId); - return writer; - }; - - /** - * Encodes the specified DownloadableThumbnail message, length delimited. Does not implicitly {@link proto.MediaEntry.DownloadableThumbnail.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.MediaEntry.DownloadableThumbnail - * @static - * @param {proto.MediaEntry.IDownloadableThumbnail} message DownloadableThumbnail message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DownloadableThumbnail.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DownloadableThumbnail message from the specified reader or buffer. - * @function decode - * @memberof proto.MediaEntry.DownloadableThumbnail - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.MediaEntry.DownloadableThumbnail} DownloadableThumbnail - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DownloadableThumbnail.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.MediaEntry.DownloadableThumbnail(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.fileSha256 = reader.bytes(); - break; - case 2: - message.fileEncSha256 = reader.bytes(); - break; - case 3: - message.directPath = reader.string(); - break; - case 4: - message.mediaKey = reader.bytes(); - break; - case 5: - message.mediaKeyTimestamp = reader.int64(); - break; - case 6: - message.objectId = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DownloadableThumbnail message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.MediaEntry.DownloadableThumbnail - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.MediaEntry.DownloadableThumbnail} DownloadableThumbnail - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DownloadableThumbnail.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DownloadableThumbnail message. - * @function verify - * @memberof proto.MediaEntry.DownloadableThumbnail - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DownloadableThumbnail.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.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.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.objectId != null && message.hasOwnProperty("objectId")) - if (!$util.isString(message.objectId)) - return "objectId: string expected"; - return null; - }; - - /** - * Creates a DownloadableThumbnail message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.MediaEntry.DownloadableThumbnail - * @static - * @param {Object.} object Plain object - * @returns {proto.MediaEntry.DownloadableThumbnail} DownloadableThumbnail - */ - DownloadableThumbnail.fromObject = function fromObject(object) { - if (object instanceof $root.proto.MediaEntry.DownloadableThumbnail) - return object; - var message = new $root.proto.MediaEntry.DownloadableThumbnail(); - 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); - 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.objectId != null) - message.objectId = String(object.objectId); - return message; - }; - - /** - * Creates a plain object from a DownloadableThumbnail message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.MediaEntry.DownloadableThumbnail - * @static - * @param {proto.MediaEntry.DownloadableThumbnail} message DownloadableThumbnail - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DownloadableThumbnail.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 (options.bytes === String) - object.fileEncSha256 = ""; - else { - object.fileEncSha256 = []; - if (options.bytes !== Array) - object.fileEncSha256 = $util.newBuffer(object.fileEncSha256); - } - object.directPath = ""; - 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.objectId = ""; - } - if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) - object.fileSha256 = options.bytes === String ? $util.base64.encode(message.fileSha256, 0, message.fileSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.fileSha256) : message.fileSha256; - if (message.fileEncSha256 != null && message.hasOwnProperty("fileEncSha256")) - object.fileEncSha256 = options.bytes === String ? $util.base64.encode(message.fileEncSha256, 0, message.fileEncSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.fileEncSha256) : message.fileEncSha256; - if (message.directPath != null && message.hasOwnProperty("directPath")) - object.directPath = message.directPath; - if (message.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.objectId != null && message.hasOwnProperty("objectId")) - object.objectId = message.objectId; - return object; - }; - - /** - * Converts this DownloadableThumbnail to JSON. - * @function toJSON - * @memberof proto.MediaEntry.DownloadableThumbnail - * @instance - * @returns {Object.} JSON object - */ - DownloadableThumbnail.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return DownloadableThumbnail; - })(); - - MediaEntry.ProgressiveJpegDetails = (function() { - - /** - * Properties of a ProgressiveJpegDetails. - * @memberof proto.MediaEntry - * @interface IProgressiveJpegDetails - * @property {Array.|null} [scanLengths] ProgressiveJpegDetails scanLengths - * @property {Uint8Array|null} [sidecar] ProgressiveJpegDetails sidecar - */ - - /** - * Constructs a new ProgressiveJpegDetails. - * @memberof proto.MediaEntry - * @classdesc Represents a ProgressiveJpegDetails. - * @implements IProgressiveJpegDetails - * @constructor - * @param {proto.MediaEntry.IProgressiveJpegDetails=} [properties] Properties to set - */ - function ProgressiveJpegDetails(properties) { - 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]]; - } - - /** - * ProgressiveJpegDetails scanLengths. - * @member {Array.} scanLengths - * @memberof proto.MediaEntry.ProgressiveJpegDetails - * @instance - */ - ProgressiveJpegDetails.prototype.scanLengths = $util.emptyArray; - - /** - * ProgressiveJpegDetails sidecar. - * @member {Uint8Array} sidecar - * @memberof proto.MediaEntry.ProgressiveJpegDetails - * @instance - */ - ProgressiveJpegDetails.prototype.sidecar = $util.newBuffer([]); - - /** - * Creates a new ProgressiveJpegDetails instance using the specified properties. - * @function create - * @memberof proto.MediaEntry.ProgressiveJpegDetails - * @static - * @param {proto.MediaEntry.IProgressiveJpegDetails=} [properties] Properties to set - * @returns {proto.MediaEntry.ProgressiveJpegDetails} ProgressiveJpegDetails instance - */ - ProgressiveJpegDetails.create = function create(properties) { - return new ProgressiveJpegDetails(properties); - }; - - /** - * Encodes the specified ProgressiveJpegDetails message. Does not implicitly {@link proto.MediaEntry.ProgressiveJpegDetails.verify|verify} messages. - * @function encode - * @memberof proto.MediaEntry.ProgressiveJpegDetails - * @static - * @param {proto.MediaEntry.IProgressiveJpegDetails} message ProgressiveJpegDetails message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ProgressiveJpegDetails.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.scanLengths != null && message.scanLengths.length) - for (var i = 0; i < message.scanLengths.length; ++i) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.scanLengths[i]); - if (message.sidecar != null && Object.hasOwnProperty.call(message, "sidecar")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.sidecar); - return writer; - }; - - /** - * Encodes the specified ProgressiveJpegDetails message, length delimited. Does not implicitly {@link proto.MediaEntry.ProgressiveJpegDetails.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.MediaEntry.ProgressiveJpegDetails - * @static - * @param {proto.MediaEntry.IProgressiveJpegDetails} message ProgressiveJpegDetails message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ProgressiveJpegDetails.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ProgressiveJpegDetails message from the specified reader or buffer. - * @function decode - * @memberof proto.MediaEntry.ProgressiveJpegDetails - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.MediaEntry.ProgressiveJpegDetails} ProgressiveJpegDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ProgressiveJpegDetails.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.MediaEntry.ProgressiveJpegDetails(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - 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.int64()); - } else - message.scanLengths.push(reader.int64()); - break; - case 2: - message.sidecar = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ProgressiveJpegDetails message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.MediaEntry.ProgressiveJpegDetails - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.MediaEntry.ProgressiveJpegDetails} ProgressiveJpegDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ProgressiveJpegDetails.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ProgressiveJpegDetails message. - * @function verify - * @memberof proto.MediaEntry.ProgressiveJpegDetails - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ProgressiveJpegDetails.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object 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]) && !(message.scanLengths[i] && $util.isInteger(message.scanLengths[i].low) && $util.isInteger(message.scanLengths[i].high))) - return "scanLengths: integer|Long[] expected"; - } - if (message.sidecar != null && message.hasOwnProperty("sidecar")) - if (!(message.sidecar && typeof message.sidecar.length === "number" || $util.isString(message.sidecar))) - return "sidecar: buffer expected"; - return null; - }; - - /** - * Creates a ProgressiveJpegDetails message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.MediaEntry.ProgressiveJpegDetails - * @static - * @param {Object.} object Plain object - * @returns {proto.MediaEntry.ProgressiveJpegDetails} ProgressiveJpegDetails - */ - ProgressiveJpegDetails.fromObject = function fromObject(object) { - if (object instanceof $root.proto.MediaEntry.ProgressiveJpegDetails) - return object; - var message = new $root.proto.MediaEntry.ProgressiveJpegDetails(); - if (object.scanLengths) { - if (!Array.isArray(object.scanLengths)) - throw TypeError(".proto.MediaEntry.ProgressiveJpegDetails.scanLengths: array expected"); - message.scanLengths = []; - for (var i = 0; i < object.scanLengths.length; ++i) - if ($util.Long) - (message.scanLengths[i] = $util.Long.fromValue(object.scanLengths[i])).unsigned = false; - else if (typeof object.scanLengths[i] === "string") - message.scanLengths[i] = parseInt(object.scanLengths[i], 10); - else if (typeof object.scanLengths[i] === "number") - message.scanLengths[i] = object.scanLengths[i]; - else if (typeof object.scanLengths[i] === "object") - message.scanLengths[i] = new $util.LongBits(object.scanLengths[i].low >>> 0, object.scanLengths[i].high >>> 0).toNumber(); - } - if (object.sidecar != null) - if (typeof object.sidecar === "string") - $util.base64.decode(object.sidecar, message.sidecar = $util.newBuffer($util.base64.length(object.sidecar)), 0); - else if (object.sidecar.length) - message.sidecar = object.sidecar; - return message; - }; - - /** - * Creates a plain object from a ProgressiveJpegDetails message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.MediaEntry.ProgressiveJpegDetails - * @static - * @param {proto.MediaEntry.ProgressiveJpegDetails} message ProgressiveJpegDetails - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ProgressiveJpegDetails.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.scanLengths = []; - if (options.defaults) - if (options.bytes === String) - object.sidecar = ""; - else { - object.sidecar = []; - if (options.bytes !== Array) - object.sidecar = $util.newBuffer(object.sidecar); - } - if (message.scanLengths && message.scanLengths.length) { - object.scanLengths = []; - for (var j = 0; j < message.scanLengths.length; ++j) - if (typeof message.scanLengths[j] === "number") - object.scanLengths[j] = options.longs === String ? String(message.scanLengths[j]) : message.scanLengths[j]; - else - object.scanLengths[j] = options.longs === String ? $util.Long.prototype.toString.call(message.scanLengths[j]) : options.longs === Number ? new $util.LongBits(message.scanLengths[j].low >>> 0, message.scanLengths[j].high >>> 0).toNumber() : message.scanLengths[j]; - } - if (message.sidecar != null && message.hasOwnProperty("sidecar")) - object.sidecar = options.bytes === String ? $util.base64.encode(message.sidecar, 0, message.sidecar.length) : options.bytes === Array ? Array.prototype.slice.call(message.sidecar) : message.sidecar; - return object; - }; - - /** - * Converts this ProgressiveJpegDetails to JSON. - * @function toJSON - * @memberof proto.MediaEntry.ProgressiveJpegDetails - * @instance - * @returns {Object.} JSON object - */ - ProgressiveJpegDetails.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ProgressiveJpegDetails; - })(); - - return MediaEntry; - })(); - proto.MediaNotifyMessage = (function() { /** @@ -26032,27 +50760,48 @@ $root.proto = (function() { /** * MediaNotifyMessage expressPathUrl. - * @member {string} expressPathUrl + * @member {string|null|undefined} expressPathUrl * @memberof proto.MediaNotifyMessage * @instance */ - MediaNotifyMessage.prototype.expressPathUrl = ""; + MediaNotifyMessage.prototype.expressPathUrl = null; /** * MediaNotifyMessage fileEncSha256. - * @member {Uint8Array} fileEncSha256 + * @member {Uint8Array|null|undefined} fileEncSha256 * @memberof proto.MediaNotifyMessage * @instance */ - MediaNotifyMessage.prototype.fileEncSha256 = $util.newBuffer([]); + MediaNotifyMessage.prototype.fileEncSha256 = null; /** * MediaNotifyMessage fileLength. - * @member {number|Long} fileLength + * @member {number|Long|null|undefined} fileLength * @memberof proto.MediaNotifyMessage * @instance */ - MediaNotifyMessage.prototype.fileLength = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + MediaNotifyMessage.prototype.fileLength = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MediaNotifyMessage.prototype, "_expressPathUrl", { + get: $util.oneOfGetter($oneOfFields = ["expressPathUrl"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MediaNotifyMessage.prototype, "_fileEncSha256", { + get: $util.oneOfGetter($oneOfFields = ["fileEncSha256"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MediaNotifyMessage.prototype, "_fileLength", { + get: $util.oneOfGetter($oneOfFields = ["fileLength"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new MediaNotifyMessage instance using the specified properties. @@ -26118,15 +50867,18 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.expressPathUrl = reader.string(); - break; - case 2: - message.fileEncSha256 = reader.bytes(); - break; - case 3: - message.fileLength = reader.uint64(); - break; + case 1: { + message.expressPathUrl = reader.string(); + break; + } + case 2: { + message.fileEncSha256 = reader.bytes(); + break; + } + case 3: { + message.fileLength = reader.uint64(); + break; + } default: reader.skipType(tag & 7); break; @@ -26162,15 +50914,22 @@ $root.proto = (function() { MediaNotifyMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.expressPathUrl != null && message.hasOwnProperty("expressPathUrl")) + var properties = {}; + if (message.expressPathUrl != null && message.hasOwnProperty("expressPathUrl")) { + properties._expressPathUrl = 1; if (!$util.isString(message.expressPathUrl)) return "expressPathUrl: string expected"; - if (message.fileEncSha256 != null && message.hasOwnProperty("fileEncSha256")) + } + if (message.fileEncSha256 != null && message.hasOwnProperty("fileEncSha256")) { + properties._fileEncSha256 = 1; if (!(message.fileEncSha256 && typeof message.fileEncSha256.length === "number" || $util.isString(message.fileEncSha256))) return "fileEncSha256: buffer expected"; - if (message.fileLength != null && message.hasOwnProperty("fileLength")) + } + if (message.fileLength != null && message.hasOwnProperty("fileLength")) { + properties._fileLength = 1; if (!$util.isInteger(message.fileLength) && !(message.fileLength && $util.isInteger(message.fileLength.low) && $util.isInteger(message.fileLength.high))) return "fileLength: integer|Long expected"; + } return null; }; @@ -26191,7 +50950,7 @@ $root.proto = (function() { 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) + else if (object.fileEncSha256.length >= 0) message.fileEncSha256 = object.fileEncSha256; if (object.fileLength != null) if ($util.Long) @@ -26218,30 +50977,24 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.expressPathUrl = ""; - if (options.bytes === String) - object.fileEncSha256 = ""; - else { - object.fileEncSha256 = []; - if (options.bytes !== Array) - object.fileEncSha256 = $util.newBuffer(object.fileEncSha256); - } - 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 (message.expressPathUrl != null && message.hasOwnProperty("expressPathUrl")) + if (message.expressPathUrl != null && message.hasOwnProperty("expressPathUrl")) { object.expressPathUrl = message.expressPathUrl; - if (message.fileEncSha256 != null && message.hasOwnProperty("fileEncSha256")) + if (options.oneofs) + object._expressPathUrl = "expressPathUrl"; + } + 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.fileLength != null && message.hasOwnProperty("fileLength")) + if (options.oneofs) + object._fileEncSha256 = "fileEncSha256"; + } + 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 (options.oneofs) + object._fileLength = "fileLength"; + } return object; }; @@ -26256,6 +51009,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for MediaNotifyMessage + * @function getTypeUrl + * @memberof proto.MediaNotifyMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MediaNotifyMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.MediaNotifyMessage"; + }; + return MediaNotifyMessage; })(); @@ -26268,6 +51036,7 @@ $root.proto = (function() { * @property {string|null} [stanzaId] MediaRetryNotification stanzaId * @property {string|null} [directPath] MediaRetryNotification directPath * @property {proto.MediaRetryNotification.ResultType|null} [result] MediaRetryNotification result + * @property {Uint8Array|null} [messageSecret] MediaRetryNotification messageSecret */ /** @@ -26287,27 +51056,62 @@ $root.proto = (function() { /** * MediaRetryNotification stanzaId. - * @member {string} stanzaId + * @member {string|null|undefined} stanzaId * @memberof proto.MediaRetryNotification * @instance */ - MediaRetryNotification.prototype.stanzaId = ""; + MediaRetryNotification.prototype.stanzaId = null; /** * MediaRetryNotification directPath. - * @member {string} directPath + * @member {string|null|undefined} directPath * @memberof proto.MediaRetryNotification * @instance */ - MediaRetryNotification.prototype.directPath = ""; + MediaRetryNotification.prototype.directPath = null; /** * MediaRetryNotification result. - * @member {proto.MediaRetryNotification.ResultType} result + * @member {proto.MediaRetryNotification.ResultType|null|undefined} result * @memberof proto.MediaRetryNotification * @instance */ - MediaRetryNotification.prototype.result = 0; + MediaRetryNotification.prototype.result = null; + + /** + * MediaRetryNotification messageSecret. + * @member {Uint8Array|null|undefined} messageSecret + * @memberof proto.MediaRetryNotification + * @instance + */ + MediaRetryNotification.prototype.messageSecret = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MediaRetryNotification.prototype, "_stanzaId", { + get: $util.oneOfGetter($oneOfFields = ["stanzaId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MediaRetryNotification.prototype, "_directPath", { + get: $util.oneOfGetter($oneOfFields = ["directPath"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MediaRetryNotification.prototype, "_result", { + get: $util.oneOfGetter($oneOfFields = ["result"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MediaRetryNotification.prototype, "_messageSecret", { + get: $util.oneOfGetter($oneOfFields = ["messageSecret"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new MediaRetryNotification instance using the specified properties. @@ -26339,6 +51143,8 @@ $root.proto = (function() { writer.uint32(/* id 2, wireType 2 =*/18).string(message.directPath); if (message.result != null && Object.hasOwnProperty.call(message, "result")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.result); + if (message.messageSecret != null && Object.hasOwnProperty.call(message, "messageSecret")) + writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.messageSecret); return writer; }; @@ -26373,15 +51179,22 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.stanzaId = reader.string(); - break; - case 2: - message.directPath = reader.string(); - break; - case 3: - message.result = reader.int32(); - break; + case 1: { + message.stanzaId = reader.string(); + break; + } + case 2: { + message.directPath = reader.string(); + break; + } + case 3: { + message.result = reader.int32(); + break; + } + case 4: { + message.messageSecret = reader.bytes(); + break; + } default: reader.skipType(tag & 7); break; @@ -26417,13 +51230,19 @@ $root.proto = (function() { MediaRetryNotification.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.stanzaId != null && message.hasOwnProperty("stanzaId")) + var properties = {}; + if (message.stanzaId != null && message.hasOwnProperty("stanzaId")) { + properties._stanzaId = 1; if (!$util.isString(message.stanzaId)) return "stanzaId: string expected"; - if (message.directPath != null && message.hasOwnProperty("directPath")) + } + if (message.directPath != null && message.hasOwnProperty("directPath")) { + properties._directPath = 1; if (!$util.isString(message.directPath)) return "directPath: string expected"; - if (message.result != null && message.hasOwnProperty("result")) + } + if (message.result != null && message.hasOwnProperty("result")) { + properties._result = 1; switch (message.result) { default: return "result: enum value expected"; @@ -26433,6 +51252,12 @@ $root.proto = (function() { case 3: break; } + } + if (message.messageSecret != null && message.hasOwnProperty("messageSecret")) { + properties._messageSecret = 1; + if (!(message.messageSecret && typeof message.messageSecret.length === "number" || $util.isString(message.messageSecret))) + return "messageSecret: buffer expected"; + } return null; }; @@ -26453,6 +51278,12 @@ $root.proto = (function() { if (object.directPath != null) message.directPath = String(object.directPath); switch (object.result) { + default: + if (typeof object.result === "number") { + message.result = object.result; + break; + } + break; case "GENERAL_ERROR": case 0: message.result = 0; @@ -26470,6 +51301,11 @@ $root.proto = (function() { message.result = 3; break; } + if (object.messageSecret != null) + if (typeof object.messageSecret === "string") + $util.base64.decode(object.messageSecret, message.messageSecret = $util.newBuffer($util.base64.length(object.messageSecret)), 0); + else if (object.messageSecret.length >= 0) + message.messageSecret = object.messageSecret; return message; }; @@ -26486,17 +51322,26 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.stanzaId = ""; - object.directPath = ""; - object.result = options.enums === String ? "GENERAL_ERROR" : 0; - } - if (message.stanzaId != null && message.hasOwnProperty("stanzaId")) + if (message.stanzaId != null && message.hasOwnProperty("stanzaId")) { object.stanzaId = message.stanzaId; - if (message.directPath != null && message.hasOwnProperty("directPath")) + if (options.oneofs) + object._stanzaId = "stanzaId"; + } + if (message.directPath != null && message.hasOwnProperty("directPath")) { object.directPath = message.directPath; - if (message.result != null && message.hasOwnProperty("result")) - object.result = options.enums === String ? $root.proto.MediaRetryNotification.ResultType[message.result] : message.result; + if (options.oneofs) + object._directPath = "directPath"; + } + if (message.result != null && message.hasOwnProperty("result")) { + object.result = options.enums === String ? $root.proto.MediaRetryNotification.ResultType[message.result] === undefined ? message.result : $root.proto.MediaRetryNotification.ResultType[message.result] : message.result; + if (options.oneofs) + object._result = "result"; + } + 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 (options.oneofs) + object._messageSecret = "messageSecret"; + } return object; }; @@ -26511,6 +51356,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for MediaRetryNotification + * @function getTypeUrl + * @memberof proto.MediaRetryNotification + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MediaRetryNotification.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.MediaRetryNotification"; + }; + /** * ResultType enum. * @name proto.MediaRetryNotification.ResultType @@ -26617,11 +51477,25 @@ $root.proto = (function() { * @property {proto.Message.IBCallMessage|null} [bcallMessage] Message bcallMessage * @property {proto.Message.IFutureProofMessage|null} [lottieStickerMessage] Message lottieStickerMessage * @property {proto.Message.IEventMessage|null} [eventMessage] Message eventMessage + * @property {proto.Message.IEncEventResponseMessage|null} [encEventResponseMessage] Message encEventResponseMessage * @property {proto.Message.ICommentMessage|null} [commentMessage] Message commentMessage * @property {proto.Message.INewsletterAdminInviteMessage|null} [newsletterAdminInviteMessage] Message newsletterAdminInviteMessage - * @property {proto.Message.IExtendedTextMessageWithParentKey|null} [extendedTextMessageWithParentKey] Message extendedTextMessageWithParentKey * @property {proto.Message.IPlaceholderMessage|null} [placeholderMessage] Message placeholderMessage - * @property {proto.Message.IEncEventUpdateMessage|null} [encEventUpdateMessage] Message encEventUpdateMessage + * @property {proto.Message.ISecretEncryptedMessage|null} [secretEncryptedMessage] Message secretEncryptedMessage + * @property {proto.Message.IAlbumMessage|null} [albumMessage] Message albumMessage + * @property {proto.Message.IFutureProofMessage|null} [eventCoverImage] Message eventCoverImage + * @property {proto.Message.IStickerPackMessage|null} [stickerPackMessage] Message stickerPackMessage + * @property {proto.Message.IFutureProofMessage|null} [statusMentionMessage] Message statusMentionMessage + * @property {proto.Message.IPollResultSnapshotMessage|null} [pollResultSnapshotMessage] Message pollResultSnapshotMessage + * @property {proto.Message.IFutureProofMessage|null} [pollCreationOptionImageMessage] Message pollCreationOptionImageMessage + * @property {proto.Message.IFutureProofMessage|null} [associatedChildMessage] Message associatedChildMessage + * @property {proto.Message.IFutureProofMessage|null} [groupStatusMentionMessage] Message groupStatusMentionMessage + * @property {proto.Message.IFutureProofMessage|null} [pollCreationMessageV4] Message pollCreationMessageV4 + * @property {proto.Message.IFutureProofMessage|null} [pollCreationMessageV5] Message pollCreationMessageV5 + * @property {proto.Message.IFutureProofMessage|null} [statusAddYours] Message statusAddYours + * @property {proto.Message.IFutureProofMessage|null} [groupStatusMessage] Message groupStatusMessage + * @property {proto.IAIRichResponseMessage|null} [richResponseMessage] Message richResponseMessage + * @property {proto.Message.IStatusNotificationMessage|null} [statusNotificationMessage] Message statusNotificationMessage */ /** @@ -26641,11 +51515,11 @@ $root.proto = (function() { /** * Message conversation. - * @member {string} conversation + * @member {string|null|undefined} conversation * @memberof proto.Message * @instance */ - Message.prototype.conversation = ""; + Message.prototype.conversation = null; /** * Message senderKeyDistributionMessage. @@ -27143,6 +52017,14 @@ $root.proto = (function() { */ Message.prototype.eventMessage = null; + /** + * Message encEventResponseMessage. + * @member {proto.Message.IEncEventResponseMessage|null|undefined} encEventResponseMessage + * @memberof proto.Message + * @instance + */ + Message.prototype.encEventResponseMessage = null; + /** * Message commentMessage. * @member {proto.Message.ICommentMessage|null|undefined} commentMessage @@ -27159,14 +52041,6 @@ $root.proto = (function() { */ Message.prototype.newsletterAdminInviteMessage = null; - /** - * Message extendedTextMessageWithParentKey. - * @member {proto.Message.IExtendedTextMessageWithParentKey|null|undefined} extendedTextMessageWithParentKey - * @memberof proto.Message - * @instance - */ - Message.prototype.extendedTextMessageWithParentKey = null; - /** * Message placeholderMessage. * @member {proto.Message.IPlaceholderMessage|null|undefined} placeholderMessage @@ -27176,12 +52050,619 @@ $root.proto = (function() { Message.prototype.placeholderMessage = null; /** - * Message encEventUpdateMessage. - * @member {proto.Message.IEncEventUpdateMessage|null|undefined} encEventUpdateMessage + * Message secretEncryptedMessage. + * @member {proto.Message.ISecretEncryptedMessage|null|undefined} secretEncryptedMessage * @memberof proto.Message * @instance */ - Message.prototype.encEventUpdateMessage = null; + Message.prototype.secretEncryptedMessage = null; + + /** + * Message albumMessage. + * @member {proto.Message.IAlbumMessage|null|undefined} albumMessage + * @memberof proto.Message + * @instance + */ + Message.prototype.albumMessage = null; + + /** + * Message eventCoverImage. + * @member {proto.Message.IFutureProofMessage|null|undefined} eventCoverImage + * @memberof proto.Message + * @instance + */ + Message.prototype.eventCoverImage = null; + + /** + * Message stickerPackMessage. + * @member {proto.Message.IStickerPackMessage|null|undefined} stickerPackMessage + * @memberof proto.Message + * @instance + */ + Message.prototype.stickerPackMessage = null; + + /** + * Message statusMentionMessage. + * @member {proto.Message.IFutureProofMessage|null|undefined} statusMentionMessage + * @memberof proto.Message + * @instance + */ + Message.prototype.statusMentionMessage = null; + + /** + * Message pollResultSnapshotMessage. + * @member {proto.Message.IPollResultSnapshotMessage|null|undefined} pollResultSnapshotMessage + * @memberof proto.Message + * @instance + */ + Message.prototype.pollResultSnapshotMessage = null; + + /** + * Message pollCreationOptionImageMessage. + * @member {proto.Message.IFutureProofMessage|null|undefined} pollCreationOptionImageMessage + * @memberof proto.Message + * @instance + */ + Message.prototype.pollCreationOptionImageMessage = null; + + /** + * Message associatedChildMessage. + * @member {proto.Message.IFutureProofMessage|null|undefined} associatedChildMessage + * @memberof proto.Message + * @instance + */ + Message.prototype.associatedChildMessage = null; + + /** + * Message groupStatusMentionMessage. + * @member {proto.Message.IFutureProofMessage|null|undefined} groupStatusMentionMessage + * @memberof proto.Message + * @instance + */ + Message.prototype.groupStatusMentionMessage = null; + + /** + * Message pollCreationMessageV4. + * @member {proto.Message.IFutureProofMessage|null|undefined} pollCreationMessageV4 + * @memberof proto.Message + * @instance + */ + Message.prototype.pollCreationMessageV4 = null; + + /** + * Message pollCreationMessageV5. + * @member {proto.Message.IFutureProofMessage|null|undefined} pollCreationMessageV5 + * @memberof proto.Message + * @instance + */ + Message.prototype.pollCreationMessageV5 = null; + + /** + * Message statusAddYours. + * @member {proto.Message.IFutureProofMessage|null|undefined} statusAddYours + * @memberof proto.Message + * @instance + */ + Message.prototype.statusAddYours = null; + + /** + * Message groupStatusMessage. + * @member {proto.Message.IFutureProofMessage|null|undefined} groupStatusMessage + * @memberof proto.Message + * @instance + */ + Message.prototype.groupStatusMessage = null; + + /** + * Message richResponseMessage. + * @member {proto.IAIRichResponseMessage|null|undefined} richResponseMessage + * @memberof proto.Message + * @instance + */ + Message.prototype.richResponseMessage = null; + + /** + * Message statusNotificationMessage. + * @member {proto.Message.IStatusNotificationMessage|null|undefined} statusNotificationMessage + * @memberof proto.Message + * @instance + */ + Message.prototype.statusNotificationMessage = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_conversation", { + get: $util.oneOfGetter($oneOfFields = ["conversation"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_senderKeyDistributionMessage", { + get: $util.oneOfGetter($oneOfFields = ["senderKeyDistributionMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_imageMessage", { + get: $util.oneOfGetter($oneOfFields = ["imageMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_contactMessage", { + get: $util.oneOfGetter($oneOfFields = ["contactMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_locationMessage", { + get: $util.oneOfGetter($oneOfFields = ["locationMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_extendedTextMessage", { + get: $util.oneOfGetter($oneOfFields = ["extendedTextMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_documentMessage", { + get: $util.oneOfGetter($oneOfFields = ["documentMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_audioMessage", { + get: $util.oneOfGetter($oneOfFields = ["audioMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_videoMessage", { + get: $util.oneOfGetter($oneOfFields = ["videoMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_call", { + get: $util.oneOfGetter($oneOfFields = ["call"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_chat", { + get: $util.oneOfGetter($oneOfFields = ["chat"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_protocolMessage", { + get: $util.oneOfGetter($oneOfFields = ["protocolMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_contactsArrayMessage", { + get: $util.oneOfGetter($oneOfFields = ["contactsArrayMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_highlyStructuredMessage", { + get: $util.oneOfGetter($oneOfFields = ["highlyStructuredMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_fastRatchetKeySenderKeyDistributionMessage", { + get: $util.oneOfGetter($oneOfFields = ["fastRatchetKeySenderKeyDistributionMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_sendPaymentMessage", { + get: $util.oneOfGetter($oneOfFields = ["sendPaymentMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_liveLocationMessage", { + get: $util.oneOfGetter($oneOfFields = ["liveLocationMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_requestPaymentMessage", { + get: $util.oneOfGetter($oneOfFields = ["requestPaymentMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_declinePaymentRequestMessage", { + get: $util.oneOfGetter($oneOfFields = ["declinePaymentRequestMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_cancelPaymentRequestMessage", { + get: $util.oneOfGetter($oneOfFields = ["cancelPaymentRequestMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_templateMessage", { + get: $util.oneOfGetter($oneOfFields = ["templateMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_stickerMessage", { + get: $util.oneOfGetter($oneOfFields = ["stickerMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_groupInviteMessage", { + get: $util.oneOfGetter($oneOfFields = ["groupInviteMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_templateButtonReplyMessage", { + get: $util.oneOfGetter($oneOfFields = ["templateButtonReplyMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_productMessage", { + get: $util.oneOfGetter($oneOfFields = ["productMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_deviceSentMessage", { + get: $util.oneOfGetter($oneOfFields = ["deviceSentMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_messageContextInfo", { + get: $util.oneOfGetter($oneOfFields = ["messageContextInfo"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_listMessage", { + get: $util.oneOfGetter($oneOfFields = ["listMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_viewOnceMessage", { + get: $util.oneOfGetter($oneOfFields = ["viewOnceMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_orderMessage", { + get: $util.oneOfGetter($oneOfFields = ["orderMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_listResponseMessage", { + get: $util.oneOfGetter($oneOfFields = ["listResponseMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_ephemeralMessage", { + get: $util.oneOfGetter($oneOfFields = ["ephemeralMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_invoiceMessage", { + get: $util.oneOfGetter($oneOfFields = ["invoiceMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_buttonsMessage", { + get: $util.oneOfGetter($oneOfFields = ["buttonsMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_buttonsResponseMessage", { + get: $util.oneOfGetter($oneOfFields = ["buttonsResponseMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_paymentInviteMessage", { + get: $util.oneOfGetter($oneOfFields = ["paymentInviteMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_interactiveMessage", { + get: $util.oneOfGetter($oneOfFields = ["interactiveMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_reactionMessage", { + get: $util.oneOfGetter($oneOfFields = ["reactionMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_stickerSyncRmrMessage", { + get: $util.oneOfGetter($oneOfFields = ["stickerSyncRmrMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_interactiveResponseMessage", { + get: $util.oneOfGetter($oneOfFields = ["interactiveResponseMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_pollCreationMessage", { + get: $util.oneOfGetter($oneOfFields = ["pollCreationMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_pollUpdateMessage", { + get: $util.oneOfGetter($oneOfFields = ["pollUpdateMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_keepInChatMessage", { + get: $util.oneOfGetter($oneOfFields = ["keepInChatMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_documentWithCaptionMessage", { + get: $util.oneOfGetter($oneOfFields = ["documentWithCaptionMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_requestPhoneNumberMessage", { + get: $util.oneOfGetter($oneOfFields = ["requestPhoneNumberMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_viewOnceMessageV2", { + get: $util.oneOfGetter($oneOfFields = ["viewOnceMessageV2"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_encReactionMessage", { + get: $util.oneOfGetter($oneOfFields = ["encReactionMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_editedMessage", { + get: $util.oneOfGetter($oneOfFields = ["editedMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_viewOnceMessageV2Extension", { + get: $util.oneOfGetter($oneOfFields = ["viewOnceMessageV2Extension"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_pollCreationMessageV2", { + get: $util.oneOfGetter($oneOfFields = ["pollCreationMessageV2"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_scheduledCallCreationMessage", { + get: $util.oneOfGetter($oneOfFields = ["scheduledCallCreationMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_groupMentionedMessage", { + get: $util.oneOfGetter($oneOfFields = ["groupMentionedMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_pinInChatMessage", { + get: $util.oneOfGetter($oneOfFields = ["pinInChatMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_pollCreationMessageV3", { + get: $util.oneOfGetter($oneOfFields = ["pollCreationMessageV3"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_scheduledCallEditMessage", { + get: $util.oneOfGetter($oneOfFields = ["scheduledCallEditMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_ptvMessage", { + get: $util.oneOfGetter($oneOfFields = ["ptvMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_botInvokeMessage", { + get: $util.oneOfGetter($oneOfFields = ["botInvokeMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_callLogMesssage", { + get: $util.oneOfGetter($oneOfFields = ["callLogMesssage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_messageHistoryBundle", { + get: $util.oneOfGetter($oneOfFields = ["messageHistoryBundle"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_encCommentMessage", { + get: $util.oneOfGetter($oneOfFields = ["encCommentMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_bcallMessage", { + get: $util.oneOfGetter($oneOfFields = ["bcallMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_lottieStickerMessage", { + get: $util.oneOfGetter($oneOfFields = ["lottieStickerMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_eventMessage", { + get: $util.oneOfGetter($oneOfFields = ["eventMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_encEventResponseMessage", { + get: $util.oneOfGetter($oneOfFields = ["encEventResponseMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_commentMessage", { + get: $util.oneOfGetter($oneOfFields = ["commentMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_newsletterAdminInviteMessage", { + get: $util.oneOfGetter($oneOfFields = ["newsletterAdminInviteMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_placeholderMessage", { + get: $util.oneOfGetter($oneOfFields = ["placeholderMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_secretEncryptedMessage", { + get: $util.oneOfGetter($oneOfFields = ["secretEncryptedMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_albumMessage", { + get: $util.oneOfGetter($oneOfFields = ["albumMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_eventCoverImage", { + get: $util.oneOfGetter($oneOfFields = ["eventCoverImage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_stickerPackMessage", { + get: $util.oneOfGetter($oneOfFields = ["stickerPackMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_statusMentionMessage", { + get: $util.oneOfGetter($oneOfFields = ["statusMentionMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_pollResultSnapshotMessage", { + get: $util.oneOfGetter($oneOfFields = ["pollResultSnapshotMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_pollCreationOptionImageMessage", { + get: $util.oneOfGetter($oneOfFields = ["pollCreationOptionImageMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_associatedChildMessage", { + get: $util.oneOfGetter($oneOfFields = ["associatedChildMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_groupStatusMentionMessage", { + get: $util.oneOfGetter($oneOfFields = ["groupStatusMentionMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_pollCreationMessageV4", { + get: $util.oneOfGetter($oneOfFields = ["pollCreationMessageV4"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_pollCreationMessageV5", { + get: $util.oneOfGetter($oneOfFields = ["pollCreationMessageV5"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_statusAddYours", { + get: $util.oneOfGetter($oneOfFields = ["statusAddYours"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_groupStatusMessage", { + get: $util.oneOfGetter($oneOfFields = ["groupStatusMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_richResponseMessage", { + get: $util.oneOfGetter($oneOfFields = ["richResponseMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_statusNotificationMessage", { + get: $util.oneOfGetter($oneOfFields = ["statusNotificationMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new Message instance using the specified properties. @@ -27333,16 +52814,44 @@ $root.proto = (function() { $root.proto.Message.FutureProofMessage.encode(message.lottieStickerMessage, writer.uint32(/* id 74, wireType 2 =*/594).fork()).ldelim(); if (message.eventMessage != null && Object.hasOwnProperty.call(message, "eventMessage")) $root.proto.Message.EventMessage.encode(message.eventMessage, writer.uint32(/* id 75, wireType 2 =*/602).fork()).ldelim(); + if (message.encEventResponseMessage != null && Object.hasOwnProperty.call(message, "encEventResponseMessage")) + $root.proto.Message.EncEventResponseMessage.encode(message.encEventResponseMessage, writer.uint32(/* id 76, wireType 2 =*/610).fork()).ldelim(); if (message.commentMessage != null && Object.hasOwnProperty.call(message, "commentMessage")) $root.proto.Message.CommentMessage.encode(message.commentMessage, writer.uint32(/* id 77, wireType 2 =*/618).fork()).ldelim(); if (message.newsletterAdminInviteMessage != null && Object.hasOwnProperty.call(message, "newsletterAdminInviteMessage")) $root.proto.Message.NewsletterAdminInviteMessage.encode(message.newsletterAdminInviteMessage, writer.uint32(/* id 78, wireType 2 =*/626).fork()).ldelim(); - if (message.extendedTextMessageWithParentKey != null && Object.hasOwnProperty.call(message, "extendedTextMessageWithParentKey")) - $root.proto.Message.ExtendedTextMessageWithParentKey.encode(message.extendedTextMessageWithParentKey, writer.uint32(/* id 79, wireType 2 =*/634).fork()).ldelim(); if (message.placeholderMessage != null && Object.hasOwnProperty.call(message, "placeholderMessage")) $root.proto.Message.PlaceholderMessage.encode(message.placeholderMessage, writer.uint32(/* id 80, wireType 2 =*/642).fork()).ldelim(); - if (message.encEventUpdateMessage != null && Object.hasOwnProperty.call(message, "encEventUpdateMessage")) - $root.proto.Message.EncEventUpdateMessage.encode(message.encEventUpdateMessage, writer.uint32(/* id 81, wireType 2 =*/650).fork()).ldelim(); + if (message.secretEncryptedMessage != null && Object.hasOwnProperty.call(message, "secretEncryptedMessage")) + $root.proto.Message.SecretEncryptedMessage.encode(message.secretEncryptedMessage, writer.uint32(/* id 82, wireType 2 =*/658).fork()).ldelim(); + if (message.albumMessage != null && Object.hasOwnProperty.call(message, "albumMessage")) + $root.proto.Message.AlbumMessage.encode(message.albumMessage, writer.uint32(/* id 83, wireType 2 =*/666).fork()).ldelim(); + if (message.eventCoverImage != null && Object.hasOwnProperty.call(message, "eventCoverImage")) + $root.proto.Message.FutureProofMessage.encode(message.eventCoverImage, writer.uint32(/* id 85, wireType 2 =*/682).fork()).ldelim(); + if (message.stickerPackMessage != null && Object.hasOwnProperty.call(message, "stickerPackMessage")) + $root.proto.Message.StickerPackMessage.encode(message.stickerPackMessage, writer.uint32(/* id 86, wireType 2 =*/690).fork()).ldelim(); + if (message.statusMentionMessage != null && Object.hasOwnProperty.call(message, "statusMentionMessage")) + $root.proto.Message.FutureProofMessage.encode(message.statusMentionMessage, writer.uint32(/* id 87, wireType 2 =*/698).fork()).ldelim(); + if (message.pollResultSnapshotMessage != null && Object.hasOwnProperty.call(message, "pollResultSnapshotMessage")) + $root.proto.Message.PollResultSnapshotMessage.encode(message.pollResultSnapshotMessage, writer.uint32(/* id 88, wireType 2 =*/706).fork()).ldelim(); + if (message.pollCreationOptionImageMessage != null && Object.hasOwnProperty.call(message, "pollCreationOptionImageMessage")) + $root.proto.Message.FutureProofMessage.encode(message.pollCreationOptionImageMessage, writer.uint32(/* id 90, wireType 2 =*/722).fork()).ldelim(); + if (message.associatedChildMessage != null && Object.hasOwnProperty.call(message, "associatedChildMessage")) + $root.proto.Message.FutureProofMessage.encode(message.associatedChildMessage, writer.uint32(/* id 91, wireType 2 =*/730).fork()).ldelim(); + if (message.groupStatusMentionMessage != null && Object.hasOwnProperty.call(message, "groupStatusMentionMessage")) + $root.proto.Message.FutureProofMessage.encode(message.groupStatusMentionMessage, writer.uint32(/* id 92, wireType 2 =*/738).fork()).ldelim(); + if (message.pollCreationMessageV4 != null && Object.hasOwnProperty.call(message, "pollCreationMessageV4")) + $root.proto.Message.FutureProofMessage.encode(message.pollCreationMessageV4, writer.uint32(/* id 93, wireType 2 =*/746).fork()).ldelim(); + if (message.pollCreationMessageV5 != null && Object.hasOwnProperty.call(message, "pollCreationMessageV5")) + $root.proto.Message.FutureProofMessage.encode(message.pollCreationMessageV5, writer.uint32(/* id 94, wireType 2 =*/754).fork()).ldelim(); + if (message.statusAddYours != null && Object.hasOwnProperty.call(message, "statusAddYours")) + $root.proto.Message.FutureProofMessage.encode(message.statusAddYours, writer.uint32(/* id 95, wireType 2 =*/762).fork()).ldelim(); + if (message.groupStatusMessage != null && Object.hasOwnProperty.call(message, "groupStatusMessage")) + $root.proto.Message.FutureProofMessage.encode(message.groupStatusMessage, writer.uint32(/* id 96, wireType 2 =*/770).fork()).ldelim(); + if (message.richResponseMessage != null && Object.hasOwnProperty.call(message, "richResponseMessage")) + $root.proto.AIRichResponseMessage.encode(message.richResponseMessage, writer.uint32(/* id 97, wireType 2 =*/778).fork()).ldelim(); + if (message.statusNotificationMessage != null && Object.hasOwnProperty.call(message, "statusNotificationMessage")) + $root.proto.Message.StatusNotificationMessage.encode(message.statusNotificationMessage, writer.uint32(/* id 98, wireType 2 =*/786).fork()).ldelim(); return writer; }; @@ -27377,210 +52886,334 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.conversation = reader.string(); - break; - case 2: - message.senderKeyDistributionMessage = $root.proto.Message.SenderKeyDistributionMessage.decode(reader, reader.uint32()); - break; - case 3: - message.imageMessage = $root.proto.Message.ImageMessage.decode(reader, reader.uint32()); - break; - case 4: - message.contactMessage = $root.proto.Message.ContactMessage.decode(reader, reader.uint32()); - break; - case 5: - message.locationMessage = $root.proto.Message.LocationMessage.decode(reader, reader.uint32()); - break; - case 6: - message.extendedTextMessage = $root.proto.Message.ExtendedTextMessage.decode(reader, reader.uint32()); - break; - case 7: - message.documentMessage = $root.proto.Message.DocumentMessage.decode(reader, reader.uint32()); - break; - case 8: - message.audioMessage = $root.proto.Message.AudioMessage.decode(reader, reader.uint32()); - break; - case 9: - message.videoMessage = $root.proto.Message.VideoMessage.decode(reader, reader.uint32()); - break; - case 10: - message.call = $root.proto.Message.Call.decode(reader, reader.uint32()); - break; - case 11: - message.chat = $root.proto.Message.Chat.decode(reader, reader.uint32()); - break; - case 12: - message.protocolMessage = $root.proto.Message.ProtocolMessage.decode(reader, reader.uint32()); - break; - case 13: - message.contactsArrayMessage = $root.proto.Message.ContactsArrayMessage.decode(reader, reader.uint32()); - break; - case 14: - message.highlyStructuredMessage = $root.proto.Message.HighlyStructuredMessage.decode(reader, reader.uint32()); - break; - case 15: - message.fastRatchetKeySenderKeyDistributionMessage = $root.proto.Message.SenderKeyDistributionMessage.decode(reader, reader.uint32()); - break; - case 16: - message.sendPaymentMessage = $root.proto.Message.SendPaymentMessage.decode(reader, reader.uint32()); - break; - case 18: - message.liveLocationMessage = $root.proto.Message.LiveLocationMessage.decode(reader, reader.uint32()); - break; - case 22: - message.requestPaymentMessage = $root.proto.Message.RequestPaymentMessage.decode(reader, reader.uint32()); - break; - case 23: - message.declinePaymentRequestMessage = $root.proto.Message.DeclinePaymentRequestMessage.decode(reader, reader.uint32()); - break; - case 24: - message.cancelPaymentRequestMessage = $root.proto.Message.CancelPaymentRequestMessage.decode(reader, reader.uint32()); - break; - case 25: - message.templateMessage = $root.proto.Message.TemplateMessage.decode(reader, reader.uint32()); - break; - case 26: - message.stickerMessage = $root.proto.Message.StickerMessage.decode(reader, reader.uint32()); - break; - case 28: - message.groupInviteMessage = $root.proto.Message.GroupInviteMessage.decode(reader, reader.uint32()); - break; - case 29: - message.templateButtonReplyMessage = $root.proto.Message.TemplateButtonReplyMessage.decode(reader, reader.uint32()); - break; - case 30: - message.productMessage = $root.proto.Message.ProductMessage.decode(reader, reader.uint32()); - break; - case 31: - 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.Message.ListMessage.decode(reader, reader.uint32()); - break; - case 37: - message.viewOnceMessage = $root.proto.Message.FutureProofMessage.decode(reader, reader.uint32()); - break; - case 38: - message.orderMessage = $root.proto.Message.OrderMessage.decode(reader, reader.uint32()); - break; - case 39: - message.listResponseMessage = $root.proto.Message.ListResponseMessage.decode(reader, reader.uint32()); - break; - case 40: - message.ephemeralMessage = $root.proto.Message.FutureProofMessage.decode(reader, reader.uint32()); - break; - case 41: - message.invoiceMessage = $root.proto.Message.InvoiceMessage.decode(reader, reader.uint32()); - break; - case 42: - message.buttonsMessage = $root.proto.Message.ButtonsMessage.decode(reader, reader.uint32()); - break; - case 43: - message.buttonsResponseMessage = $root.proto.Message.ButtonsResponseMessage.decode(reader, reader.uint32()); - break; - case 44: - message.paymentInviteMessage = $root.proto.Message.PaymentInviteMessage.decode(reader, reader.uint32()); - break; - case 45: - message.interactiveMessage = $root.proto.Message.InteractiveMessage.decode(reader, reader.uint32()); - break; - case 46: - message.reactionMessage = $root.proto.Message.ReactionMessage.decode(reader, reader.uint32()); - break; - case 47: - message.stickerSyncRmrMessage = $root.proto.Message.StickerSyncRMRMessage.decode(reader, reader.uint32()); - break; - case 48: - message.interactiveResponseMessage = $root.proto.Message.InteractiveResponseMessage.decode(reader, reader.uint32()); - break; - case 49: - message.pollCreationMessage = $root.proto.Message.PollCreationMessage.decode(reader, reader.uint32()); - break; - case 50: - message.pollUpdateMessage = $root.proto.Message.PollUpdateMessage.decode(reader, reader.uint32()); - break; - case 51: - message.keepInChatMessage = $root.proto.Message.KeepInChatMessage.decode(reader, reader.uint32()); - break; - 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; - case 56: - message.encReactionMessage = $root.proto.Message.EncReactionMessage.decode(reader, reader.uint32()); - break; - case 58: - message.editedMessage = $root.proto.Message.FutureProofMessage.decode(reader, reader.uint32()); - break; - case 59: - message.viewOnceMessageV2Extension = $root.proto.Message.FutureProofMessage.decode(reader, reader.uint32()); - break; - case 60: - message.pollCreationMessageV2 = $root.proto.Message.PollCreationMessage.decode(reader, reader.uint32()); - break; - case 61: - message.scheduledCallCreationMessage = $root.proto.Message.ScheduledCallCreationMessage.decode(reader, reader.uint32()); - break; - case 62: - message.groupMentionedMessage = $root.proto.Message.FutureProofMessage.decode(reader, reader.uint32()); - break; - case 63: - message.pinInChatMessage = $root.proto.Message.PinInChatMessage.decode(reader, reader.uint32()); - break; - case 64: - message.pollCreationMessageV3 = $root.proto.Message.PollCreationMessage.decode(reader, reader.uint32()); - break; - case 65: - message.scheduledCallEditMessage = $root.proto.Message.ScheduledCallEditMessage.decode(reader, reader.uint32()); - break; - case 66: - message.ptvMessage = $root.proto.Message.VideoMessage.decode(reader, reader.uint32()); - break; - case 67: - message.botInvokeMessage = $root.proto.Message.FutureProofMessage.decode(reader, reader.uint32()); - break; - case 69: - message.callLogMesssage = $root.proto.Message.CallLogMessage.decode(reader, reader.uint32()); - break; - case 70: - message.messageHistoryBundle = $root.proto.Message.MessageHistoryBundle.decode(reader, reader.uint32()); - break; - case 71: - message.encCommentMessage = $root.proto.Message.EncCommentMessage.decode(reader, reader.uint32()); - break; - case 72: - message.bcallMessage = $root.proto.Message.BCallMessage.decode(reader, reader.uint32()); - break; - case 74: - message.lottieStickerMessage = $root.proto.Message.FutureProofMessage.decode(reader, reader.uint32()); - break; - case 75: - message.eventMessage = $root.proto.Message.EventMessage.decode(reader, reader.uint32()); - break; - case 77: - message.commentMessage = $root.proto.Message.CommentMessage.decode(reader, reader.uint32()); - break; - case 78: - message.newsletterAdminInviteMessage = $root.proto.Message.NewsletterAdminInviteMessage.decode(reader, reader.uint32()); - break; - case 79: - message.extendedTextMessageWithParentKey = $root.proto.Message.ExtendedTextMessageWithParentKey.decode(reader, reader.uint32()); - break; - case 80: - message.placeholderMessage = $root.proto.Message.PlaceholderMessage.decode(reader, reader.uint32()); - break; - case 81: - message.encEventUpdateMessage = $root.proto.Message.EncEventUpdateMessage.decode(reader, reader.uint32()); - break; + case 1: { + message.conversation = reader.string(); + break; + } + case 2: { + message.senderKeyDistributionMessage = $root.proto.Message.SenderKeyDistributionMessage.decode(reader, reader.uint32()); + break; + } + case 3: { + message.imageMessage = $root.proto.Message.ImageMessage.decode(reader, reader.uint32()); + break; + } + case 4: { + message.contactMessage = $root.proto.Message.ContactMessage.decode(reader, reader.uint32()); + break; + } + case 5: { + message.locationMessage = $root.proto.Message.LocationMessage.decode(reader, reader.uint32()); + break; + } + case 6: { + message.extendedTextMessage = $root.proto.Message.ExtendedTextMessage.decode(reader, reader.uint32()); + break; + } + case 7: { + message.documentMessage = $root.proto.Message.DocumentMessage.decode(reader, reader.uint32()); + break; + } + case 8: { + message.audioMessage = $root.proto.Message.AudioMessage.decode(reader, reader.uint32()); + break; + } + case 9: { + message.videoMessage = $root.proto.Message.VideoMessage.decode(reader, reader.uint32()); + break; + } + case 10: { + message.call = $root.proto.Message.Call.decode(reader, reader.uint32()); + break; + } + case 11: { + message.chat = $root.proto.Message.Chat.decode(reader, reader.uint32()); + break; + } + case 12: { + message.protocolMessage = $root.proto.Message.ProtocolMessage.decode(reader, reader.uint32()); + break; + } + case 13: { + message.contactsArrayMessage = $root.proto.Message.ContactsArrayMessage.decode(reader, reader.uint32()); + break; + } + case 14: { + message.highlyStructuredMessage = $root.proto.Message.HighlyStructuredMessage.decode(reader, reader.uint32()); + break; + } + case 15: { + message.fastRatchetKeySenderKeyDistributionMessage = $root.proto.Message.SenderKeyDistributionMessage.decode(reader, reader.uint32()); + break; + } + case 16: { + message.sendPaymentMessage = $root.proto.Message.SendPaymentMessage.decode(reader, reader.uint32()); + break; + } + case 18: { + message.liveLocationMessage = $root.proto.Message.LiveLocationMessage.decode(reader, reader.uint32()); + break; + } + case 22: { + message.requestPaymentMessage = $root.proto.Message.RequestPaymentMessage.decode(reader, reader.uint32()); + break; + } + case 23: { + message.declinePaymentRequestMessage = $root.proto.Message.DeclinePaymentRequestMessage.decode(reader, reader.uint32()); + break; + } + case 24: { + message.cancelPaymentRequestMessage = $root.proto.Message.CancelPaymentRequestMessage.decode(reader, reader.uint32()); + break; + } + case 25: { + message.templateMessage = $root.proto.Message.TemplateMessage.decode(reader, reader.uint32()); + break; + } + case 26: { + message.stickerMessage = $root.proto.Message.StickerMessage.decode(reader, reader.uint32()); + break; + } + case 28: { + message.groupInviteMessage = $root.proto.Message.GroupInviteMessage.decode(reader, reader.uint32()); + break; + } + case 29: { + message.templateButtonReplyMessage = $root.proto.Message.TemplateButtonReplyMessage.decode(reader, reader.uint32()); + break; + } + case 30: { + message.productMessage = $root.proto.Message.ProductMessage.decode(reader, reader.uint32()); + break; + } + case 31: { + 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.Message.ListMessage.decode(reader, reader.uint32()); + break; + } + case 37: { + message.viewOnceMessage = $root.proto.Message.FutureProofMessage.decode(reader, reader.uint32()); + break; + } + case 38: { + message.orderMessage = $root.proto.Message.OrderMessage.decode(reader, reader.uint32()); + break; + } + case 39: { + message.listResponseMessage = $root.proto.Message.ListResponseMessage.decode(reader, reader.uint32()); + break; + } + case 40: { + message.ephemeralMessage = $root.proto.Message.FutureProofMessage.decode(reader, reader.uint32()); + break; + } + case 41: { + message.invoiceMessage = $root.proto.Message.InvoiceMessage.decode(reader, reader.uint32()); + break; + } + case 42: { + message.buttonsMessage = $root.proto.Message.ButtonsMessage.decode(reader, reader.uint32()); + break; + } + case 43: { + message.buttonsResponseMessage = $root.proto.Message.ButtonsResponseMessage.decode(reader, reader.uint32()); + break; + } + case 44: { + message.paymentInviteMessage = $root.proto.Message.PaymentInviteMessage.decode(reader, reader.uint32()); + break; + } + case 45: { + message.interactiveMessage = $root.proto.Message.InteractiveMessage.decode(reader, reader.uint32()); + break; + } + case 46: { + message.reactionMessage = $root.proto.Message.ReactionMessage.decode(reader, reader.uint32()); + break; + } + case 47: { + message.stickerSyncRmrMessage = $root.proto.Message.StickerSyncRMRMessage.decode(reader, reader.uint32()); + break; + } + case 48: { + message.interactiveResponseMessage = $root.proto.Message.InteractiveResponseMessage.decode(reader, reader.uint32()); + break; + } + case 49: { + message.pollCreationMessage = $root.proto.Message.PollCreationMessage.decode(reader, reader.uint32()); + break; + } + case 50: { + message.pollUpdateMessage = $root.proto.Message.PollUpdateMessage.decode(reader, reader.uint32()); + break; + } + case 51: { + message.keepInChatMessage = $root.proto.Message.KeepInChatMessage.decode(reader, reader.uint32()); + break; + } + 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; + } + case 56: { + message.encReactionMessage = $root.proto.Message.EncReactionMessage.decode(reader, reader.uint32()); + break; + } + case 58: { + message.editedMessage = $root.proto.Message.FutureProofMessage.decode(reader, reader.uint32()); + break; + } + case 59: { + message.viewOnceMessageV2Extension = $root.proto.Message.FutureProofMessage.decode(reader, reader.uint32()); + break; + } + case 60: { + message.pollCreationMessageV2 = $root.proto.Message.PollCreationMessage.decode(reader, reader.uint32()); + break; + } + case 61: { + message.scheduledCallCreationMessage = $root.proto.Message.ScheduledCallCreationMessage.decode(reader, reader.uint32()); + break; + } + case 62: { + message.groupMentionedMessage = $root.proto.Message.FutureProofMessage.decode(reader, reader.uint32()); + break; + } + case 63: { + message.pinInChatMessage = $root.proto.Message.PinInChatMessage.decode(reader, reader.uint32()); + break; + } + case 64: { + message.pollCreationMessageV3 = $root.proto.Message.PollCreationMessage.decode(reader, reader.uint32()); + break; + } + case 65: { + message.scheduledCallEditMessage = $root.proto.Message.ScheduledCallEditMessage.decode(reader, reader.uint32()); + break; + } + case 66: { + message.ptvMessage = $root.proto.Message.VideoMessage.decode(reader, reader.uint32()); + break; + } + case 67: { + message.botInvokeMessage = $root.proto.Message.FutureProofMessage.decode(reader, reader.uint32()); + break; + } + case 69: { + message.callLogMesssage = $root.proto.Message.CallLogMessage.decode(reader, reader.uint32()); + break; + } + case 70: { + message.messageHistoryBundle = $root.proto.Message.MessageHistoryBundle.decode(reader, reader.uint32()); + break; + } + case 71: { + message.encCommentMessage = $root.proto.Message.EncCommentMessage.decode(reader, reader.uint32()); + break; + } + case 72: { + message.bcallMessage = $root.proto.Message.BCallMessage.decode(reader, reader.uint32()); + break; + } + case 74: { + message.lottieStickerMessage = $root.proto.Message.FutureProofMessage.decode(reader, reader.uint32()); + break; + } + case 75: { + message.eventMessage = $root.proto.Message.EventMessage.decode(reader, reader.uint32()); + break; + } + case 76: { + message.encEventResponseMessage = $root.proto.Message.EncEventResponseMessage.decode(reader, reader.uint32()); + break; + } + case 77: { + message.commentMessage = $root.proto.Message.CommentMessage.decode(reader, reader.uint32()); + break; + } + case 78: { + message.newsletterAdminInviteMessage = $root.proto.Message.NewsletterAdminInviteMessage.decode(reader, reader.uint32()); + break; + } + case 80: { + message.placeholderMessage = $root.proto.Message.PlaceholderMessage.decode(reader, reader.uint32()); + break; + } + case 82: { + message.secretEncryptedMessage = $root.proto.Message.SecretEncryptedMessage.decode(reader, reader.uint32()); + break; + } + case 83: { + message.albumMessage = $root.proto.Message.AlbumMessage.decode(reader, reader.uint32()); + break; + } + case 85: { + message.eventCoverImage = $root.proto.Message.FutureProofMessage.decode(reader, reader.uint32()); + break; + } + case 86: { + message.stickerPackMessage = $root.proto.Message.StickerPackMessage.decode(reader, reader.uint32()); + break; + } + case 87: { + message.statusMentionMessage = $root.proto.Message.FutureProofMessage.decode(reader, reader.uint32()); + break; + } + case 88: { + message.pollResultSnapshotMessage = $root.proto.Message.PollResultSnapshotMessage.decode(reader, reader.uint32()); + break; + } + case 90: { + message.pollCreationOptionImageMessage = $root.proto.Message.FutureProofMessage.decode(reader, reader.uint32()); + break; + } + case 91: { + message.associatedChildMessage = $root.proto.Message.FutureProofMessage.decode(reader, reader.uint32()); + break; + } + case 92: { + message.groupStatusMentionMessage = $root.proto.Message.FutureProofMessage.decode(reader, reader.uint32()); + break; + } + case 93: { + message.pollCreationMessageV4 = $root.proto.Message.FutureProofMessage.decode(reader, reader.uint32()); + break; + } + case 94: { + message.pollCreationMessageV5 = $root.proto.Message.FutureProofMessage.decode(reader, reader.uint32()); + break; + } + case 95: { + message.statusAddYours = $root.proto.Message.FutureProofMessage.decode(reader, reader.uint32()); + break; + } + case 96: { + message.groupStatusMessage = $root.proto.Message.FutureProofMessage.decode(reader, reader.uint32()); + break; + } + case 97: { + message.richResponseMessage = $root.proto.AIRichResponseMessage.decode(reader, reader.uint32()); + break; + } + case 98: { + message.statusNotificationMessage = $root.proto.Message.StatusNotificationMessage.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -27616,343 +53249,659 @@ $root.proto = (function() { Message.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.conversation != null && message.hasOwnProperty("conversation")) + var properties = {}; + if (message.conversation != null && message.hasOwnProperty("conversation")) { + properties._conversation = 1; if (!$util.isString(message.conversation)) return "conversation: string expected"; + } if (message.senderKeyDistributionMessage != null && message.hasOwnProperty("senderKeyDistributionMessage")) { - var error = $root.proto.Message.SenderKeyDistributionMessage.verify(message.senderKeyDistributionMessage); - if (error) - return "senderKeyDistributionMessage." + error; + properties._senderKeyDistributionMessage = 1; + { + 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.Message.ImageMessage.verify(message.imageMessage); - if (error) - return "imageMessage." + error; + properties._imageMessage = 1; + { + 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.Message.ContactMessage.verify(message.contactMessage); - if (error) - return "contactMessage." + error; + properties._contactMessage = 1; + { + 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.Message.LocationMessage.verify(message.locationMessage); - if (error) - return "locationMessage." + error; + properties._locationMessage = 1; + { + 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.Message.ExtendedTextMessage.verify(message.extendedTextMessage); - if (error) - return "extendedTextMessage." + error; + properties._extendedTextMessage = 1; + { + 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.Message.DocumentMessage.verify(message.documentMessage); - if (error) - return "documentMessage." + error; + properties._documentMessage = 1; + { + 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.Message.AudioMessage.verify(message.audioMessage); - if (error) - return "audioMessage." + error; + properties._audioMessage = 1; + { + 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.Message.VideoMessage.verify(message.videoMessage); - if (error) - return "videoMessage." + error; + properties._videoMessage = 1; + { + 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.Message.Call.verify(message.call); - if (error) - return "call." + error; + properties._call = 1; + { + 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.Message.Chat.verify(message.chat); - if (error) - return "chat." + error; + properties._chat = 1; + { + 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.Message.ProtocolMessage.verify(message.protocolMessage); - if (error) - return "protocolMessage." + error; + properties._protocolMessage = 1; + { + 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.Message.ContactsArrayMessage.verify(message.contactsArrayMessage); - if (error) - return "contactsArrayMessage." + error; + properties._contactsArrayMessage = 1; + { + 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.Message.HighlyStructuredMessage.verify(message.highlyStructuredMessage); - if (error) - return "highlyStructuredMessage." + error; + properties._highlyStructuredMessage = 1; + { + 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.Message.SenderKeyDistributionMessage.verify(message.fastRatchetKeySenderKeyDistributionMessage); - if (error) - return "fastRatchetKeySenderKeyDistributionMessage." + error; + properties._fastRatchetKeySenderKeyDistributionMessage = 1; + { + 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.Message.SendPaymentMessage.verify(message.sendPaymentMessage); - if (error) - return "sendPaymentMessage." + error; + properties._sendPaymentMessage = 1; + { + 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.Message.LiveLocationMessage.verify(message.liveLocationMessage); - if (error) - return "liveLocationMessage." + error; + properties._liveLocationMessage = 1; + { + 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.Message.RequestPaymentMessage.verify(message.requestPaymentMessage); - if (error) - return "requestPaymentMessage." + error; + properties._requestPaymentMessage = 1; + { + 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.Message.DeclinePaymentRequestMessage.verify(message.declinePaymentRequestMessage); - if (error) - return "declinePaymentRequestMessage." + error; + properties._declinePaymentRequestMessage = 1; + { + 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.Message.CancelPaymentRequestMessage.verify(message.cancelPaymentRequestMessage); - if (error) - return "cancelPaymentRequestMessage." + error; + properties._cancelPaymentRequestMessage = 1; + { + 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.Message.TemplateMessage.verify(message.templateMessage); - if (error) - return "templateMessage." + error; + properties._templateMessage = 1; + { + 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.Message.StickerMessage.verify(message.stickerMessage); - if (error) - return "stickerMessage." + error; + properties._stickerMessage = 1; + { + 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.Message.GroupInviteMessage.verify(message.groupInviteMessage); - if (error) - return "groupInviteMessage." + error; + properties._groupInviteMessage = 1; + { + 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.Message.TemplateButtonReplyMessage.verify(message.templateButtonReplyMessage); - if (error) - return "templateButtonReplyMessage." + error; + properties._templateButtonReplyMessage = 1; + { + 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.Message.ProductMessage.verify(message.productMessage); - if (error) - return "productMessage." + error; + properties._productMessage = 1; + { + 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.Message.DeviceSentMessage.verify(message.deviceSentMessage); - if (error) - return "deviceSentMessage." + error; + properties._deviceSentMessage = 1; + { + var error = $root.proto.Message.DeviceSentMessage.verify(message.deviceSentMessage); + if (error) + return "deviceSentMessage." + error; + } } if (message.messageContextInfo != null && message.hasOwnProperty("messageContextInfo")) { - var error = $root.proto.MessageContextInfo.verify(message.messageContextInfo); - if (error) - return "messageContextInfo." + error; + properties._messageContextInfo = 1; + { + var error = $root.proto.MessageContextInfo.verify(message.messageContextInfo); + if (error) + return "messageContextInfo." + error; + } } if (message.listMessage != null && message.hasOwnProperty("listMessage")) { - var error = $root.proto.Message.ListMessage.verify(message.listMessage); - if (error) - return "listMessage." + error; + properties._listMessage = 1; + { + 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.Message.FutureProofMessage.verify(message.viewOnceMessage); - if (error) - return "viewOnceMessage." + error; + properties._viewOnceMessage = 1; + { + 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.Message.OrderMessage.verify(message.orderMessage); - if (error) - return "orderMessage." + error; + properties._orderMessage = 1; + { + 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.Message.ListResponseMessage.verify(message.listResponseMessage); - if (error) - return "listResponseMessage." + error; + properties._listResponseMessage = 1; + { + 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.Message.FutureProofMessage.verify(message.ephemeralMessage); - if (error) - return "ephemeralMessage." + error; + properties._ephemeralMessage = 1; + { + 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.Message.InvoiceMessage.verify(message.invoiceMessage); - if (error) - return "invoiceMessage." + error; + properties._invoiceMessage = 1; + { + 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.Message.ButtonsMessage.verify(message.buttonsMessage); - if (error) - return "buttonsMessage." + error; + properties._buttonsMessage = 1; + { + 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.Message.ButtonsResponseMessage.verify(message.buttonsResponseMessage); - if (error) - return "buttonsResponseMessage." + error; + properties._buttonsResponseMessage = 1; + { + 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.Message.PaymentInviteMessage.verify(message.paymentInviteMessage); - if (error) - return "paymentInviteMessage." + error; + properties._paymentInviteMessage = 1; + { + 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.Message.InteractiveMessage.verify(message.interactiveMessage); - if (error) - return "interactiveMessage." + error; + properties._interactiveMessage = 1; + { + 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.Message.ReactionMessage.verify(message.reactionMessage); - if (error) - return "reactionMessage." + error; + properties._reactionMessage = 1; + { + 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.Message.StickerSyncRMRMessage.verify(message.stickerSyncRmrMessage); - if (error) - return "stickerSyncRmrMessage." + error; + properties._stickerSyncRmrMessage = 1; + { + 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.Message.InteractiveResponseMessage.verify(message.interactiveResponseMessage); - if (error) - return "interactiveResponseMessage." + error; + properties._interactiveResponseMessage = 1; + { + 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.Message.PollCreationMessage.verify(message.pollCreationMessage); - if (error) - return "pollCreationMessage." + error; + properties._pollCreationMessage = 1; + { + 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.Message.PollUpdateMessage.verify(message.pollUpdateMessage); - if (error) - return "pollUpdateMessage." + error; + properties._pollUpdateMessage = 1; + { + 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.Message.KeepInChatMessage.verify(message.keepInChatMessage); - if (error) - return "keepInChatMessage." + error; + properties._keepInChatMessage = 1; + { + 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.Message.FutureProofMessage.verify(message.documentWithCaptionMessage); - if (error) - return "documentWithCaptionMessage." + error; + properties._documentWithCaptionMessage = 1; + { + 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; + properties._requestPhoneNumberMessage = 1; + { + 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; + properties._viewOnceMessageV2 = 1; + { + var error = $root.proto.Message.FutureProofMessage.verify(message.viewOnceMessageV2); + if (error) + return "viewOnceMessageV2." + error; + } } if (message.encReactionMessage != null && message.hasOwnProperty("encReactionMessage")) { - var error = $root.proto.Message.EncReactionMessage.verify(message.encReactionMessage); - if (error) - return "encReactionMessage." + error; + properties._encReactionMessage = 1; + { + var error = $root.proto.Message.EncReactionMessage.verify(message.encReactionMessage); + if (error) + return "encReactionMessage." + error; + } } if (message.editedMessage != null && message.hasOwnProperty("editedMessage")) { - var error = $root.proto.Message.FutureProofMessage.verify(message.editedMessage); - if (error) - return "editedMessage." + error; + properties._editedMessage = 1; + { + var error = $root.proto.Message.FutureProofMessage.verify(message.editedMessage); + if (error) + return "editedMessage." + error; + } } if (message.viewOnceMessageV2Extension != null && message.hasOwnProperty("viewOnceMessageV2Extension")) { - var error = $root.proto.Message.FutureProofMessage.verify(message.viewOnceMessageV2Extension); - if (error) - return "viewOnceMessageV2Extension." + error; + properties._viewOnceMessageV2Extension = 1; + { + var error = $root.proto.Message.FutureProofMessage.verify(message.viewOnceMessageV2Extension); + if (error) + return "viewOnceMessageV2Extension." + error; + } } if (message.pollCreationMessageV2 != null && message.hasOwnProperty("pollCreationMessageV2")) { - var error = $root.proto.Message.PollCreationMessage.verify(message.pollCreationMessageV2); - if (error) - return "pollCreationMessageV2." + error; + properties._pollCreationMessageV2 = 1; + { + var error = $root.proto.Message.PollCreationMessage.verify(message.pollCreationMessageV2); + if (error) + return "pollCreationMessageV2." + error; + } } if (message.scheduledCallCreationMessage != null && message.hasOwnProperty("scheduledCallCreationMessage")) { - var error = $root.proto.Message.ScheduledCallCreationMessage.verify(message.scheduledCallCreationMessage); - if (error) - return "scheduledCallCreationMessage." + error; + properties._scheduledCallCreationMessage = 1; + { + var error = $root.proto.Message.ScheduledCallCreationMessage.verify(message.scheduledCallCreationMessage); + if (error) + return "scheduledCallCreationMessage." + error; + } } if (message.groupMentionedMessage != null && message.hasOwnProperty("groupMentionedMessage")) { - var error = $root.proto.Message.FutureProofMessage.verify(message.groupMentionedMessage); - if (error) - return "groupMentionedMessage." + error; + properties._groupMentionedMessage = 1; + { + var error = $root.proto.Message.FutureProofMessage.verify(message.groupMentionedMessage); + if (error) + return "groupMentionedMessage." + error; + } } if (message.pinInChatMessage != null && message.hasOwnProperty("pinInChatMessage")) { - var error = $root.proto.Message.PinInChatMessage.verify(message.pinInChatMessage); - if (error) - return "pinInChatMessage." + error; + properties._pinInChatMessage = 1; + { + var error = $root.proto.Message.PinInChatMessage.verify(message.pinInChatMessage); + if (error) + return "pinInChatMessage." + error; + } } if (message.pollCreationMessageV3 != null && message.hasOwnProperty("pollCreationMessageV3")) { - var error = $root.proto.Message.PollCreationMessage.verify(message.pollCreationMessageV3); - if (error) - return "pollCreationMessageV3." + error; + properties._pollCreationMessageV3 = 1; + { + var error = $root.proto.Message.PollCreationMessage.verify(message.pollCreationMessageV3); + if (error) + return "pollCreationMessageV3." + error; + } } if (message.scheduledCallEditMessage != null && message.hasOwnProperty("scheduledCallEditMessage")) { - var error = $root.proto.Message.ScheduledCallEditMessage.verify(message.scheduledCallEditMessage); - if (error) - return "scheduledCallEditMessage." + error; + properties._scheduledCallEditMessage = 1; + { + var error = $root.proto.Message.ScheduledCallEditMessage.verify(message.scheduledCallEditMessage); + if (error) + return "scheduledCallEditMessage." + error; + } } if (message.ptvMessage != null && message.hasOwnProperty("ptvMessage")) { - var error = $root.proto.Message.VideoMessage.verify(message.ptvMessage); - if (error) - return "ptvMessage." + error; + properties._ptvMessage = 1; + { + var error = $root.proto.Message.VideoMessage.verify(message.ptvMessage); + if (error) + return "ptvMessage." + error; + } } if (message.botInvokeMessage != null && message.hasOwnProperty("botInvokeMessage")) { - var error = $root.proto.Message.FutureProofMessage.verify(message.botInvokeMessage); - if (error) - return "botInvokeMessage." + error; + properties._botInvokeMessage = 1; + { + var error = $root.proto.Message.FutureProofMessage.verify(message.botInvokeMessage); + if (error) + return "botInvokeMessage." + error; + } } if (message.callLogMesssage != null && message.hasOwnProperty("callLogMesssage")) { - var error = $root.proto.Message.CallLogMessage.verify(message.callLogMesssage); - if (error) - return "callLogMesssage." + error; + properties._callLogMesssage = 1; + { + var error = $root.proto.Message.CallLogMessage.verify(message.callLogMesssage); + if (error) + return "callLogMesssage." + error; + } } if (message.messageHistoryBundle != null && message.hasOwnProperty("messageHistoryBundle")) { - var error = $root.proto.Message.MessageHistoryBundle.verify(message.messageHistoryBundle); - if (error) - return "messageHistoryBundle." + error; + properties._messageHistoryBundle = 1; + { + var error = $root.proto.Message.MessageHistoryBundle.verify(message.messageHistoryBundle); + if (error) + return "messageHistoryBundle." + error; + } } if (message.encCommentMessage != null && message.hasOwnProperty("encCommentMessage")) { - var error = $root.proto.Message.EncCommentMessage.verify(message.encCommentMessage); - if (error) - return "encCommentMessage." + error; + properties._encCommentMessage = 1; + { + var error = $root.proto.Message.EncCommentMessage.verify(message.encCommentMessage); + if (error) + return "encCommentMessage." + error; + } } if (message.bcallMessage != null && message.hasOwnProperty("bcallMessage")) { - var error = $root.proto.Message.BCallMessage.verify(message.bcallMessage); - if (error) - return "bcallMessage." + error; + properties._bcallMessage = 1; + { + var error = $root.proto.Message.BCallMessage.verify(message.bcallMessage); + if (error) + return "bcallMessage." + error; + } } if (message.lottieStickerMessage != null && message.hasOwnProperty("lottieStickerMessage")) { - var error = $root.proto.Message.FutureProofMessage.verify(message.lottieStickerMessage); - if (error) - return "lottieStickerMessage." + error; + properties._lottieStickerMessage = 1; + { + var error = $root.proto.Message.FutureProofMessage.verify(message.lottieStickerMessage); + if (error) + return "lottieStickerMessage." + error; + } } if (message.eventMessage != null && message.hasOwnProperty("eventMessage")) { - var error = $root.proto.Message.EventMessage.verify(message.eventMessage); - if (error) - return "eventMessage." + error; + properties._eventMessage = 1; + { + var error = $root.proto.Message.EventMessage.verify(message.eventMessage); + if (error) + return "eventMessage." + error; + } + } + if (message.encEventResponseMessage != null && message.hasOwnProperty("encEventResponseMessage")) { + properties._encEventResponseMessage = 1; + { + var error = $root.proto.Message.EncEventResponseMessage.verify(message.encEventResponseMessage); + if (error) + return "encEventResponseMessage." + error; + } } if (message.commentMessage != null && message.hasOwnProperty("commentMessage")) { - var error = $root.proto.Message.CommentMessage.verify(message.commentMessage); - if (error) - return "commentMessage." + error; + properties._commentMessage = 1; + { + var error = $root.proto.Message.CommentMessage.verify(message.commentMessage); + if (error) + return "commentMessage." + error; + } } if (message.newsletterAdminInviteMessage != null && message.hasOwnProperty("newsletterAdminInviteMessage")) { - var error = $root.proto.Message.NewsletterAdminInviteMessage.verify(message.newsletterAdminInviteMessage); - if (error) - return "newsletterAdminInviteMessage." + error; - } - if (message.extendedTextMessageWithParentKey != null && message.hasOwnProperty("extendedTextMessageWithParentKey")) { - var error = $root.proto.Message.ExtendedTextMessageWithParentKey.verify(message.extendedTextMessageWithParentKey); - if (error) - return "extendedTextMessageWithParentKey." + error; + properties._newsletterAdminInviteMessage = 1; + { + var error = $root.proto.Message.NewsletterAdminInviteMessage.verify(message.newsletterAdminInviteMessage); + if (error) + return "newsletterAdminInviteMessage." + error; + } } if (message.placeholderMessage != null && message.hasOwnProperty("placeholderMessage")) { - var error = $root.proto.Message.PlaceholderMessage.verify(message.placeholderMessage); - if (error) - return "placeholderMessage." + error; + properties._placeholderMessage = 1; + { + var error = $root.proto.Message.PlaceholderMessage.verify(message.placeholderMessage); + if (error) + return "placeholderMessage." + error; + } } - if (message.encEventUpdateMessage != null && message.hasOwnProperty("encEventUpdateMessage")) { - var error = $root.proto.Message.EncEventUpdateMessage.verify(message.encEventUpdateMessage); - if (error) - return "encEventUpdateMessage." + error; + if (message.secretEncryptedMessage != null && message.hasOwnProperty("secretEncryptedMessage")) { + properties._secretEncryptedMessage = 1; + { + var error = $root.proto.Message.SecretEncryptedMessage.verify(message.secretEncryptedMessage); + if (error) + return "secretEncryptedMessage." + error; + } + } + if (message.albumMessage != null && message.hasOwnProperty("albumMessage")) { + properties._albumMessage = 1; + { + var error = $root.proto.Message.AlbumMessage.verify(message.albumMessage); + if (error) + return "albumMessage." + error; + } + } + if (message.eventCoverImage != null && message.hasOwnProperty("eventCoverImage")) { + properties._eventCoverImage = 1; + { + var error = $root.proto.Message.FutureProofMessage.verify(message.eventCoverImage); + if (error) + return "eventCoverImage." + error; + } + } + if (message.stickerPackMessage != null && message.hasOwnProperty("stickerPackMessage")) { + properties._stickerPackMessage = 1; + { + var error = $root.proto.Message.StickerPackMessage.verify(message.stickerPackMessage); + if (error) + return "stickerPackMessage." + error; + } + } + if (message.statusMentionMessage != null && message.hasOwnProperty("statusMentionMessage")) { + properties._statusMentionMessage = 1; + { + var error = $root.proto.Message.FutureProofMessage.verify(message.statusMentionMessage); + if (error) + return "statusMentionMessage." + error; + } + } + if (message.pollResultSnapshotMessage != null && message.hasOwnProperty("pollResultSnapshotMessage")) { + properties._pollResultSnapshotMessage = 1; + { + var error = $root.proto.Message.PollResultSnapshotMessage.verify(message.pollResultSnapshotMessage); + if (error) + return "pollResultSnapshotMessage." + error; + } + } + if (message.pollCreationOptionImageMessage != null && message.hasOwnProperty("pollCreationOptionImageMessage")) { + properties._pollCreationOptionImageMessage = 1; + { + var error = $root.proto.Message.FutureProofMessage.verify(message.pollCreationOptionImageMessage); + if (error) + return "pollCreationOptionImageMessage." + error; + } + } + if (message.associatedChildMessage != null && message.hasOwnProperty("associatedChildMessage")) { + properties._associatedChildMessage = 1; + { + var error = $root.proto.Message.FutureProofMessage.verify(message.associatedChildMessage); + if (error) + return "associatedChildMessage." + error; + } + } + if (message.groupStatusMentionMessage != null && message.hasOwnProperty("groupStatusMentionMessage")) { + properties._groupStatusMentionMessage = 1; + { + var error = $root.proto.Message.FutureProofMessage.verify(message.groupStatusMentionMessage); + if (error) + return "groupStatusMentionMessage." + error; + } + } + if (message.pollCreationMessageV4 != null && message.hasOwnProperty("pollCreationMessageV4")) { + properties._pollCreationMessageV4 = 1; + { + var error = $root.proto.Message.FutureProofMessage.verify(message.pollCreationMessageV4); + if (error) + return "pollCreationMessageV4." + error; + } + } + if (message.pollCreationMessageV5 != null && message.hasOwnProperty("pollCreationMessageV5")) { + properties._pollCreationMessageV5 = 1; + { + var error = $root.proto.Message.FutureProofMessage.verify(message.pollCreationMessageV5); + if (error) + return "pollCreationMessageV5." + error; + } + } + if (message.statusAddYours != null && message.hasOwnProperty("statusAddYours")) { + properties._statusAddYours = 1; + { + var error = $root.proto.Message.FutureProofMessage.verify(message.statusAddYours); + if (error) + return "statusAddYours." + error; + } + } + if (message.groupStatusMessage != null && message.hasOwnProperty("groupStatusMessage")) { + properties._groupStatusMessage = 1; + { + var error = $root.proto.Message.FutureProofMessage.verify(message.groupStatusMessage); + if (error) + return "groupStatusMessage." + error; + } + } + if (message.richResponseMessage != null && message.hasOwnProperty("richResponseMessage")) { + properties._richResponseMessage = 1; + { + var error = $root.proto.AIRichResponseMessage.verify(message.richResponseMessage); + if (error) + return "richResponseMessage." + error; + } + } + if (message.statusNotificationMessage != null && message.hasOwnProperty("statusNotificationMessage")) { + properties._statusNotificationMessage = 1; + { + var error = $root.proto.Message.StatusNotificationMessage.verify(message.statusNotificationMessage); + if (error) + return "statusNotificationMessage." + error; + } } return null; }; @@ -28281,6 +54230,11 @@ $root.proto = (function() { throw TypeError(".proto.Message.eventMessage: object expected"); message.eventMessage = $root.proto.Message.EventMessage.fromObject(object.eventMessage); } + if (object.encEventResponseMessage != null) { + if (typeof object.encEventResponseMessage !== "object") + throw TypeError(".proto.Message.encEventResponseMessage: object expected"); + message.encEventResponseMessage = $root.proto.Message.EncEventResponseMessage.fromObject(object.encEventResponseMessage); + } if (object.commentMessage != null) { if (typeof object.commentMessage !== "object") throw TypeError(".proto.Message.commentMessage: object expected"); @@ -28291,20 +54245,85 @@ $root.proto = (function() { throw TypeError(".proto.Message.newsletterAdminInviteMessage: object expected"); message.newsletterAdminInviteMessage = $root.proto.Message.NewsletterAdminInviteMessage.fromObject(object.newsletterAdminInviteMessage); } - if (object.extendedTextMessageWithParentKey != null) { - if (typeof object.extendedTextMessageWithParentKey !== "object") - throw TypeError(".proto.Message.extendedTextMessageWithParentKey: object expected"); - message.extendedTextMessageWithParentKey = $root.proto.Message.ExtendedTextMessageWithParentKey.fromObject(object.extendedTextMessageWithParentKey); - } if (object.placeholderMessage != null) { if (typeof object.placeholderMessage !== "object") throw TypeError(".proto.Message.placeholderMessage: object expected"); message.placeholderMessage = $root.proto.Message.PlaceholderMessage.fromObject(object.placeholderMessage); } - if (object.encEventUpdateMessage != null) { - if (typeof object.encEventUpdateMessage !== "object") - throw TypeError(".proto.Message.encEventUpdateMessage: object expected"); - message.encEventUpdateMessage = $root.proto.Message.EncEventUpdateMessage.fromObject(object.encEventUpdateMessage); + if (object.secretEncryptedMessage != null) { + if (typeof object.secretEncryptedMessage !== "object") + throw TypeError(".proto.Message.secretEncryptedMessage: object expected"); + message.secretEncryptedMessage = $root.proto.Message.SecretEncryptedMessage.fromObject(object.secretEncryptedMessage); + } + if (object.albumMessage != null) { + if (typeof object.albumMessage !== "object") + throw TypeError(".proto.Message.albumMessage: object expected"); + message.albumMessage = $root.proto.Message.AlbumMessage.fromObject(object.albumMessage); + } + if (object.eventCoverImage != null) { + if (typeof object.eventCoverImage !== "object") + throw TypeError(".proto.Message.eventCoverImage: object expected"); + message.eventCoverImage = $root.proto.Message.FutureProofMessage.fromObject(object.eventCoverImage); + } + if (object.stickerPackMessage != null) { + if (typeof object.stickerPackMessage !== "object") + throw TypeError(".proto.Message.stickerPackMessage: object expected"); + message.stickerPackMessage = $root.proto.Message.StickerPackMessage.fromObject(object.stickerPackMessage); + } + if (object.statusMentionMessage != null) { + if (typeof object.statusMentionMessage !== "object") + throw TypeError(".proto.Message.statusMentionMessage: object expected"); + message.statusMentionMessage = $root.proto.Message.FutureProofMessage.fromObject(object.statusMentionMessage); + } + if (object.pollResultSnapshotMessage != null) { + if (typeof object.pollResultSnapshotMessage !== "object") + throw TypeError(".proto.Message.pollResultSnapshotMessage: object expected"); + message.pollResultSnapshotMessage = $root.proto.Message.PollResultSnapshotMessage.fromObject(object.pollResultSnapshotMessage); + } + if (object.pollCreationOptionImageMessage != null) { + if (typeof object.pollCreationOptionImageMessage !== "object") + throw TypeError(".proto.Message.pollCreationOptionImageMessage: object expected"); + message.pollCreationOptionImageMessage = $root.proto.Message.FutureProofMessage.fromObject(object.pollCreationOptionImageMessage); + } + if (object.associatedChildMessage != null) { + if (typeof object.associatedChildMessage !== "object") + throw TypeError(".proto.Message.associatedChildMessage: object expected"); + message.associatedChildMessage = $root.proto.Message.FutureProofMessage.fromObject(object.associatedChildMessage); + } + if (object.groupStatusMentionMessage != null) { + if (typeof object.groupStatusMentionMessage !== "object") + throw TypeError(".proto.Message.groupStatusMentionMessage: object expected"); + message.groupStatusMentionMessage = $root.proto.Message.FutureProofMessage.fromObject(object.groupStatusMentionMessage); + } + if (object.pollCreationMessageV4 != null) { + if (typeof object.pollCreationMessageV4 !== "object") + throw TypeError(".proto.Message.pollCreationMessageV4: object expected"); + message.pollCreationMessageV4 = $root.proto.Message.FutureProofMessage.fromObject(object.pollCreationMessageV4); + } + if (object.pollCreationMessageV5 != null) { + if (typeof object.pollCreationMessageV5 !== "object") + throw TypeError(".proto.Message.pollCreationMessageV5: object expected"); + message.pollCreationMessageV5 = $root.proto.Message.FutureProofMessage.fromObject(object.pollCreationMessageV5); + } + if (object.statusAddYours != null) { + if (typeof object.statusAddYours !== "object") + throw TypeError(".proto.Message.statusAddYours: object expected"); + message.statusAddYours = $root.proto.Message.FutureProofMessage.fromObject(object.statusAddYours); + } + if (object.groupStatusMessage != null) { + if (typeof object.groupStatusMessage !== "object") + throw TypeError(".proto.Message.groupStatusMessage: object expected"); + message.groupStatusMessage = $root.proto.Message.FutureProofMessage.fromObject(object.groupStatusMessage); + } + if (object.richResponseMessage != null) { + if (typeof object.richResponseMessage !== "object") + throw TypeError(".proto.Message.richResponseMessage: object expected"); + message.richResponseMessage = $root.proto.AIRichResponseMessage.fromObject(object.richResponseMessage); + } + if (object.statusNotificationMessage != null) { + if (typeof object.statusNotificationMessage !== "object") + throw TypeError(".proto.Message.statusNotificationMessage: object expected"); + message.statusNotificationMessage = $root.proto.Message.StatusNotificationMessage.fromObject(object.statusNotificationMessage); } return message; }; @@ -28322,212 +54341,416 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.conversation = ""; - object.senderKeyDistributionMessage = null; - object.imageMessage = null; - object.contactMessage = null; - object.locationMessage = null; - object.extendedTextMessage = null; - object.documentMessage = null; - object.audioMessage = null; - object.videoMessage = null; - object.call = null; - object.chat = null; - object.protocolMessage = null; - object.contactsArrayMessage = null; - object.highlyStructuredMessage = null; - object.fastRatchetKeySenderKeyDistributionMessage = null; - object.sendPaymentMessage = null; - object.liveLocationMessage = null; - object.requestPaymentMessage = null; - object.declinePaymentRequestMessage = null; - object.cancelPaymentRequestMessage = null; - object.templateMessage = null; - object.stickerMessage = null; - object.groupInviteMessage = null; - object.templateButtonReplyMessage = null; - object.productMessage = null; - object.deviceSentMessage = null; - object.messageContextInfo = null; - object.listMessage = null; - object.viewOnceMessage = null; - object.orderMessage = null; - object.listResponseMessage = null; - object.ephemeralMessage = null; - object.invoiceMessage = null; - object.buttonsMessage = null; - object.buttonsResponseMessage = null; - object.paymentInviteMessage = null; - object.interactiveMessage = null; - object.reactionMessage = null; - object.stickerSyncRmrMessage = null; - object.interactiveResponseMessage = null; - object.pollCreationMessage = null; - object.pollUpdateMessage = null; - object.keepInChatMessage = null; - object.documentWithCaptionMessage = null; - object.requestPhoneNumberMessage = null; - object.viewOnceMessageV2 = null; - object.encReactionMessage = null; - object.editedMessage = null; - object.viewOnceMessageV2Extension = null; - object.pollCreationMessageV2 = null; - object.scheduledCallCreationMessage = null; - object.groupMentionedMessage = null; - object.pinInChatMessage = null; - object.pollCreationMessageV3 = null; - object.scheduledCallEditMessage = null; - object.ptvMessage = null; - object.botInvokeMessage = null; - object.callLogMesssage = null; - object.messageHistoryBundle = null; - object.encCommentMessage = null; - object.bcallMessage = null; - object.lottieStickerMessage = null; - object.eventMessage = null; - object.commentMessage = null; - object.newsletterAdminInviteMessage = null; - object.extendedTextMessageWithParentKey = null; - object.placeholderMessage = null; - object.encEventUpdateMessage = null; - } - if (message.conversation != null && message.hasOwnProperty("conversation")) + if (message.conversation != null && message.hasOwnProperty("conversation")) { object.conversation = message.conversation; - if (message.senderKeyDistributionMessage != null && message.hasOwnProperty("senderKeyDistributionMessage")) + if (options.oneofs) + object._conversation = "conversation"; + } + if (message.senderKeyDistributionMessage != null && message.hasOwnProperty("senderKeyDistributionMessage")) { object.senderKeyDistributionMessage = $root.proto.Message.SenderKeyDistributionMessage.toObject(message.senderKeyDistributionMessage, options); - if (message.imageMessage != null && message.hasOwnProperty("imageMessage")) + if (options.oneofs) + object._senderKeyDistributionMessage = "senderKeyDistributionMessage"; + } + if (message.imageMessage != null && message.hasOwnProperty("imageMessage")) { object.imageMessage = $root.proto.Message.ImageMessage.toObject(message.imageMessage, options); - if (message.contactMessage != null && message.hasOwnProperty("contactMessage")) + if (options.oneofs) + object._imageMessage = "imageMessage"; + } + if (message.contactMessage != null && message.hasOwnProperty("contactMessage")) { object.contactMessage = $root.proto.Message.ContactMessage.toObject(message.contactMessage, options); - if (message.locationMessage != null && message.hasOwnProperty("locationMessage")) + if (options.oneofs) + object._contactMessage = "contactMessage"; + } + if (message.locationMessage != null && message.hasOwnProperty("locationMessage")) { object.locationMessage = $root.proto.Message.LocationMessage.toObject(message.locationMessage, options); - if (message.extendedTextMessage != null && message.hasOwnProperty("extendedTextMessage")) + if (options.oneofs) + object._locationMessage = "locationMessage"; + } + if (message.extendedTextMessage != null && message.hasOwnProperty("extendedTextMessage")) { object.extendedTextMessage = $root.proto.Message.ExtendedTextMessage.toObject(message.extendedTextMessage, options); - if (message.documentMessage != null && message.hasOwnProperty("documentMessage")) + if (options.oneofs) + object._extendedTextMessage = "extendedTextMessage"; + } + if (message.documentMessage != null && message.hasOwnProperty("documentMessage")) { object.documentMessage = $root.proto.Message.DocumentMessage.toObject(message.documentMessage, options); - if (message.audioMessage != null && message.hasOwnProperty("audioMessage")) + if (options.oneofs) + object._documentMessage = "documentMessage"; + } + if (message.audioMessage != null && message.hasOwnProperty("audioMessage")) { object.audioMessage = $root.proto.Message.AudioMessage.toObject(message.audioMessage, options); - if (message.videoMessage != null && message.hasOwnProperty("videoMessage")) + if (options.oneofs) + object._audioMessage = "audioMessage"; + } + if (message.videoMessage != null && message.hasOwnProperty("videoMessage")) { object.videoMessage = $root.proto.Message.VideoMessage.toObject(message.videoMessage, options); - if (message.call != null && message.hasOwnProperty("call")) + if (options.oneofs) + object._videoMessage = "videoMessage"; + } + if (message.call != null && message.hasOwnProperty("call")) { object.call = $root.proto.Message.Call.toObject(message.call, options); - if (message.chat != null && message.hasOwnProperty("chat")) + if (options.oneofs) + object._call = "call"; + } + if (message.chat != null && message.hasOwnProperty("chat")) { object.chat = $root.proto.Message.Chat.toObject(message.chat, options); - if (message.protocolMessage != null && message.hasOwnProperty("protocolMessage")) + if (options.oneofs) + object._chat = "chat"; + } + if (message.protocolMessage != null && message.hasOwnProperty("protocolMessage")) { object.protocolMessage = $root.proto.Message.ProtocolMessage.toObject(message.protocolMessage, options); - if (message.contactsArrayMessage != null && message.hasOwnProperty("contactsArrayMessage")) + if (options.oneofs) + object._protocolMessage = "protocolMessage"; + } + if (message.contactsArrayMessage != null && message.hasOwnProperty("contactsArrayMessage")) { object.contactsArrayMessage = $root.proto.Message.ContactsArrayMessage.toObject(message.contactsArrayMessage, options); - if (message.highlyStructuredMessage != null && message.hasOwnProperty("highlyStructuredMessage")) + if (options.oneofs) + object._contactsArrayMessage = "contactsArrayMessage"; + } + if (message.highlyStructuredMessage != null && message.hasOwnProperty("highlyStructuredMessage")) { object.highlyStructuredMessage = $root.proto.Message.HighlyStructuredMessage.toObject(message.highlyStructuredMessage, options); - if (message.fastRatchetKeySenderKeyDistributionMessage != null && message.hasOwnProperty("fastRatchetKeySenderKeyDistributionMessage")) + if (options.oneofs) + object._highlyStructuredMessage = "highlyStructuredMessage"; + } + if (message.fastRatchetKeySenderKeyDistributionMessage != null && message.hasOwnProperty("fastRatchetKeySenderKeyDistributionMessage")) { object.fastRatchetKeySenderKeyDistributionMessage = $root.proto.Message.SenderKeyDistributionMessage.toObject(message.fastRatchetKeySenderKeyDistributionMessage, options); - if (message.sendPaymentMessage != null && message.hasOwnProperty("sendPaymentMessage")) + if (options.oneofs) + object._fastRatchetKeySenderKeyDistributionMessage = "fastRatchetKeySenderKeyDistributionMessage"; + } + if (message.sendPaymentMessage != null && message.hasOwnProperty("sendPaymentMessage")) { object.sendPaymentMessage = $root.proto.Message.SendPaymentMessage.toObject(message.sendPaymentMessage, options); - if (message.liveLocationMessage != null && message.hasOwnProperty("liveLocationMessage")) + if (options.oneofs) + object._sendPaymentMessage = "sendPaymentMessage"; + } + if (message.liveLocationMessage != null && message.hasOwnProperty("liveLocationMessage")) { object.liveLocationMessage = $root.proto.Message.LiveLocationMessage.toObject(message.liveLocationMessage, options); - if (message.requestPaymentMessage != null && message.hasOwnProperty("requestPaymentMessage")) + if (options.oneofs) + object._liveLocationMessage = "liveLocationMessage"; + } + if (message.requestPaymentMessage != null && message.hasOwnProperty("requestPaymentMessage")) { object.requestPaymentMessage = $root.proto.Message.RequestPaymentMessage.toObject(message.requestPaymentMessage, options); - if (message.declinePaymentRequestMessage != null && message.hasOwnProperty("declinePaymentRequestMessage")) + if (options.oneofs) + object._requestPaymentMessage = "requestPaymentMessage"; + } + if (message.declinePaymentRequestMessage != null && message.hasOwnProperty("declinePaymentRequestMessage")) { object.declinePaymentRequestMessage = $root.proto.Message.DeclinePaymentRequestMessage.toObject(message.declinePaymentRequestMessage, options); - if (message.cancelPaymentRequestMessage != null && message.hasOwnProperty("cancelPaymentRequestMessage")) + if (options.oneofs) + object._declinePaymentRequestMessage = "declinePaymentRequestMessage"; + } + if (message.cancelPaymentRequestMessage != null && message.hasOwnProperty("cancelPaymentRequestMessage")) { object.cancelPaymentRequestMessage = $root.proto.Message.CancelPaymentRequestMessage.toObject(message.cancelPaymentRequestMessage, options); - if (message.templateMessage != null && message.hasOwnProperty("templateMessage")) + if (options.oneofs) + object._cancelPaymentRequestMessage = "cancelPaymentRequestMessage"; + } + if (message.templateMessage != null && message.hasOwnProperty("templateMessage")) { object.templateMessage = $root.proto.Message.TemplateMessage.toObject(message.templateMessage, options); - if (message.stickerMessage != null && message.hasOwnProperty("stickerMessage")) + if (options.oneofs) + object._templateMessage = "templateMessage"; + } + if (message.stickerMessage != null && message.hasOwnProperty("stickerMessage")) { object.stickerMessage = $root.proto.Message.StickerMessage.toObject(message.stickerMessage, options); - if (message.groupInviteMessage != null && message.hasOwnProperty("groupInviteMessage")) + if (options.oneofs) + object._stickerMessage = "stickerMessage"; + } + if (message.groupInviteMessage != null && message.hasOwnProperty("groupInviteMessage")) { object.groupInviteMessage = $root.proto.Message.GroupInviteMessage.toObject(message.groupInviteMessage, options); - if (message.templateButtonReplyMessage != null && message.hasOwnProperty("templateButtonReplyMessage")) + if (options.oneofs) + object._groupInviteMessage = "groupInviteMessage"; + } + if (message.templateButtonReplyMessage != null && message.hasOwnProperty("templateButtonReplyMessage")) { object.templateButtonReplyMessage = $root.proto.Message.TemplateButtonReplyMessage.toObject(message.templateButtonReplyMessage, options); - if (message.productMessage != null && message.hasOwnProperty("productMessage")) + if (options.oneofs) + object._templateButtonReplyMessage = "templateButtonReplyMessage"; + } + if (message.productMessage != null && message.hasOwnProperty("productMessage")) { object.productMessage = $root.proto.Message.ProductMessage.toObject(message.productMessage, options); - if (message.deviceSentMessage != null && message.hasOwnProperty("deviceSentMessage")) + if (options.oneofs) + object._productMessage = "productMessage"; + } + if (message.deviceSentMessage != null && message.hasOwnProperty("deviceSentMessage")) { object.deviceSentMessage = $root.proto.Message.DeviceSentMessage.toObject(message.deviceSentMessage, options); - if (message.messageContextInfo != null && message.hasOwnProperty("messageContextInfo")) + if (options.oneofs) + object._deviceSentMessage = "deviceSentMessage"; + } + if (message.messageContextInfo != null && message.hasOwnProperty("messageContextInfo")) { object.messageContextInfo = $root.proto.MessageContextInfo.toObject(message.messageContextInfo, options); - if (message.listMessage != null && message.hasOwnProperty("listMessage")) + if (options.oneofs) + object._messageContextInfo = "messageContextInfo"; + } + if (message.listMessage != null && message.hasOwnProperty("listMessage")) { object.listMessage = $root.proto.Message.ListMessage.toObject(message.listMessage, options); - if (message.viewOnceMessage != null && message.hasOwnProperty("viewOnceMessage")) + if (options.oneofs) + object._listMessage = "listMessage"; + } + if (message.viewOnceMessage != null && message.hasOwnProperty("viewOnceMessage")) { object.viewOnceMessage = $root.proto.Message.FutureProofMessage.toObject(message.viewOnceMessage, options); - if (message.orderMessage != null && message.hasOwnProperty("orderMessage")) + if (options.oneofs) + object._viewOnceMessage = "viewOnceMessage"; + } + if (message.orderMessage != null && message.hasOwnProperty("orderMessage")) { object.orderMessage = $root.proto.Message.OrderMessage.toObject(message.orderMessage, options); - if (message.listResponseMessage != null && message.hasOwnProperty("listResponseMessage")) + if (options.oneofs) + object._orderMessage = "orderMessage"; + } + if (message.listResponseMessage != null && message.hasOwnProperty("listResponseMessage")) { object.listResponseMessage = $root.proto.Message.ListResponseMessage.toObject(message.listResponseMessage, options); - if (message.ephemeralMessage != null && message.hasOwnProperty("ephemeralMessage")) + if (options.oneofs) + object._listResponseMessage = "listResponseMessage"; + } + if (message.ephemeralMessage != null && message.hasOwnProperty("ephemeralMessage")) { object.ephemeralMessage = $root.proto.Message.FutureProofMessage.toObject(message.ephemeralMessage, options); - if (message.invoiceMessage != null && message.hasOwnProperty("invoiceMessage")) + if (options.oneofs) + object._ephemeralMessage = "ephemeralMessage"; + } + if (message.invoiceMessage != null && message.hasOwnProperty("invoiceMessage")) { object.invoiceMessage = $root.proto.Message.InvoiceMessage.toObject(message.invoiceMessage, options); - if (message.buttonsMessage != null && message.hasOwnProperty("buttonsMessage")) + if (options.oneofs) + object._invoiceMessage = "invoiceMessage"; + } + if (message.buttonsMessage != null && message.hasOwnProperty("buttonsMessage")) { object.buttonsMessage = $root.proto.Message.ButtonsMessage.toObject(message.buttonsMessage, options); - if (message.buttonsResponseMessage != null && message.hasOwnProperty("buttonsResponseMessage")) + if (options.oneofs) + object._buttonsMessage = "buttonsMessage"; + } + if (message.buttonsResponseMessage != null && message.hasOwnProperty("buttonsResponseMessage")) { object.buttonsResponseMessage = $root.proto.Message.ButtonsResponseMessage.toObject(message.buttonsResponseMessage, options); - if (message.paymentInviteMessage != null && message.hasOwnProperty("paymentInviteMessage")) + if (options.oneofs) + object._buttonsResponseMessage = "buttonsResponseMessage"; + } + if (message.paymentInviteMessage != null && message.hasOwnProperty("paymentInviteMessage")) { object.paymentInviteMessage = $root.proto.Message.PaymentInviteMessage.toObject(message.paymentInviteMessage, options); - if (message.interactiveMessage != null && message.hasOwnProperty("interactiveMessage")) + if (options.oneofs) + object._paymentInviteMessage = "paymentInviteMessage"; + } + if (message.interactiveMessage != null && message.hasOwnProperty("interactiveMessage")) { object.interactiveMessage = $root.proto.Message.InteractiveMessage.toObject(message.interactiveMessage, options); - if (message.reactionMessage != null && message.hasOwnProperty("reactionMessage")) + if (options.oneofs) + object._interactiveMessage = "interactiveMessage"; + } + if (message.reactionMessage != null && message.hasOwnProperty("reactionMessage")) { object.reactionMessage = $root.proto.Message.ReactionMessage.toObject(message.reactionMessage, options); - if (message.stickerSyncRmrMessage != null && message.hasOwnProperty("stickerSyncRmrMessage")) + if (options.oneofs) + object._reactionMessage = "reactionMessage"; + } + if (message.stickerSyncRmrMessage != null && message.hasOwnProperty("stickerSyncRmrMessage")) { object.stickerSyncRmrMessage = $root.proto.Message.StickerSyncRMRMessage.toObject(message.stickerSyncRmrMessage, options); - if (message.interactiveResponseMessage != null && message.hasOwnProperty("interactiveResponseMessage")) + if (options.oneofs) + object._stickerSyncRmrMessage = "stickerSyncRmrMessage"; + } + if (message.interactiveResponseMessage != null && message.hasOwnProperty("interactiveResponseMessage")) { object.interactiveResponseMessage = $root.proto.Message.InteractiveResponseMessage.toObject(message.interactiveResponseMessage, options); - if (message.pollCreationMessage != null && message.hasOwnProperty("pollCreationMessage")) + if (options.oneofs) + object._interactiveResponseMessage = "interactiveResponseMessage"; + } + if (message.pollCreationMessage != null && message.hasOwnProperty("pollCreationMessage")) { object.pollCreationMessage = $root.proto.Message.PollCreationMessage.toObject(message.pollCreationMessage, options); - if (message.pollUpdateMessage != null && message.hasOwnProperty("pollUpdateMessage")) + if (options.oneofs) + object._pollCreationMessage = "pollCreationMessage"; + } + if (message.pollUpdateMessage != null && message.hasOwnProperty("pollUpdateMessage")) { object.pollUpdateMessage = $root.proto.Message.PollUpdateMessage.toObject(message.pollUpdateMessage, options); - if (message.keepInChatMessage != null && message.hasOwnProperty("keepInChatMessage")) + if (options.oneofs) + object._pollUpdateMessage = "pollUpdateMessage"; + } + if (message.keepInChatMessage != null && message.hasOwnProperty("keepInChatMessage")) { object.keepInChatMessage = $root.proto.Message.KeepInChatMessage.toObject(message.keepInChatMessage, options); - if (message.documentWithCaptionMessage != null && message.hasOwnProperty("documentWithCaptionMessage")) + if (options.oneofs) + object._keepInChatMessage = "keepInChatMessage"; + } + if (message.documentWithCaptionMessage != null && message.hasOwnProperty("documentWithCaptionMessage")) { object.documentWithCaptionMessage = $root.proto.Message.FutureProofMessage.toObject(message.documentWithCaptionMessage, options); - if (message.requestPhoneNumberMessage != null && message.hasOwnProperty("requestPhoneNumberMessage")) + if (options.oneofs) + object._documentWithCaptionMessage = "documentWithCaptionMessage"; + } + if (message.requestPhoneNumberMessage != null && message.hasOwnProperty("requestPhoneNumberMessage")) { object.requestPhoneNumberMessage = $root.proto.Message.RequestPhoneNumberMessage.toObject(message.requestPhoneNumberMessage, options); - if (message.viewOnceMessageV2 != null && message.hasOwnProperty("viewOnceMessageV2")) + if (options.oneofs) + object._requestPhoneNumberMessage = "requestPhoneNumberMessage"; + } + if (message.viewOnceMessageV2 != null && message.hasOwnProperty("viewOnceMessageV2")) { object.viewOnceMessageV2 = $root.proto.Message.FutureProofMessage.toObject(message.viewOnceMessageV2, options); - if (message.encReactionMessage != null && message.hasOwnProperty("encReactionMessage")) + if (options.oneofs) + object._viewOnceMessageV2 = "viewOnceMessageV2"; + } + if (message.encReactionMessage != null && message.hasOwnProperty("encReactionMessage")) { object.encReactionMessage = $root.proto.Message.EncReactionMessage.toObject(message.encReactionMessage, options); - if (message.editedMessage != null && message.hasOwnProperty("editedMessage")) + if (options.oneofs) + object._encReactionMessage = "encReactionMessage"; + } + if (message.editedMessage != null && message.hasOwnProperty("editedMessage")) { object.editedMessage = $root.proto.Message.FutureProofMessage.toObject(message.editedMessage, options); - if (message.viewOnceMessageV2Extension != null && message.hasOwnProperty("viewOnceMessageV2Extension")) + if (options.oneofs) + object._editedMessage = "editedMessage"; + } + if (message.viewOnceMessageV2Extension != null && message.hasOwnProperty("viewOnceMessageV2Extension")) { object.viewOnceMessageV2Extension = $root.proto.Message.FutureProofMessage.toObject(message.viewOnceMessageV2Extension, options); - if (message.pollCreationMessageV2 != null && message.hasOwnProperty("pollCreationMessageV2")) + if (options.oneofs) + object._viewOnceMessageV2Extension = "viewOnceMessageV2Extension"; + } + if (message.pollCreationMessageV2 != null && message.hasOwnProperty("pollCreationMessageV2")) { object.pollCreationMessageV2 = $root.proto.Message.PollCreationMessage.toObject(message.pollCreationMessageV2, options); - if (message.scheduledCallCreationMessage != null && message.hasOwnProperty("scheduledCallCreationMessage")) + if (options.oneofs) + object._pollCreationMessageV2 = "pollCreationMessageV2"; + } + if (message.scheduledCallCreationMessage != null && message.hasOwnProperty("scheduledCallCreationMessage")) { object.scheduledCallCreationMessage = $root.proto.Message.ScheduledCallCreationMessage.toObject(message.scheduledCallCreationMessage, options); - if (message.groupMentionedMessage != null && message.hasOwnProperty("groupMentionedMessage")) + if (options.oneofs) + object._scheduledCallCreationMessage = "scheduledCallCreationMessage"; + } + if (message.groupMentionedMessage != null && message.hasOwnProperty("groupMentionedMessage")) { object.groupMentionedMessage = $root.proto.Message.FutureProofMessage.toObject(message.groupMentionedMessage, options); - if (message.pinInChatMessage != null && message.hasOwnProperty("pinInChatMessage")) + if (options.oneofs) + object._groupMentionedMessage = "groupMentionedMessage"; + } + if (message.pinInChatMessage != null && message.hasOwnProperty("pinInChatMessage")) { object.pinInChatMessage = $root.proto.Message.PinInChatMessage.toObject(message.pinInChatMessage, options); - if (message.pollCreationMessageV3 != null && message.hasOwnProperty("pollCreationMessageV3")) + if (options.oneofs) + object._pinInChatMessage = "pinInChatMessage"; + } + if (message.pollCreationMessageV3 != null && message.hasOwnProperty("pollCreationMessageV3")) { object.pollCreationMessageV3 = $root.proto.Message.PollCreationMessage.toObject(message.pollCreationMessageV3, options); - if (message.scheduledCallEditMessage != null && message.hasOwnProperty("scheduledCallEditMessage")) + if (options.oneofs) + object._pollCreationMessageV3 = "pollCreationMessageV3"; + } + if (message.scheduledCallEditMessage != null && message.hasOwnProperty("scheduledCallEditMessage")) { object.scheduledCallEditMessage = $root.proto.Message.ScheduledCallEditMessage.toObject(message.scheduledCallEditMessage, options); - if (message.ptvMessage != null && message.hasOwnProperty("ptvMessage")) + if (options.oneofs) + object._scheduledCallEditMessage = "scheduledCallEditMessage"; + } + if (message.ptvMessage != null && message.hasOwnProperty("ptvMessage")) { object.ptvMessage = $root.proto.Message.VideoMessage.toObject(message.ptvMessage, options); - if (message.botInvokeMessage != null && message.hasOwnProperty("botInvokeMessage")) + if (options.oneofs) + object._ptvMessage = "ptvMessage"; + } + if (message.botInvokeMessage != null && message.hasOwnProperty("botInvokeMessage")) { object.botInvokeMessage = $root.proto.Message.FutureProofMessage.toObject(message.botInvokeMessage, options); - if (message.callLogMesssage != null && message.hasOwnProperty("callLogMesssage")) + if (options.oneofs) + object._botInvokeMessage = "botInvokeMessage"; + } + if (message.callLogMesssage != null && message.hasOwnProperty("callLogMesssage")) { object.callLogMesssage = $root.proto.Message.CallLogMessage.toObject(message.callLogMesssage, options); - if (message.messageHistoryBundle != null && message.hasOwnProperty("messageHistoryBundle")) + if (options.oneofs) + object._callLogMesssage = "callLogMesssage"; + } + if (message.messageHistoryBundle != null && message.hasOwnProperty("messageHistoryBundle")) { object.messageHistoryBundle = $root.proto.Message.MessageHistoryBundle.toObject(message.messageHistoryBundle, options); - if (message.encCommentMessage != null && message.hasOwnProperty("encCommentMessage")) + if (options.oneofs) + object._messageHistoryBundle = "messageHistoryBundle"; + } + if (message.encCommentMessage != null && message.hasOwnProperty("encCommentMessage")) { object.encCommentMessage = $root.proto.Message.EncCommentMessage.toObject(message.encCommentMessage, options); - if (message.bcallMessage != null && message.hasOwnProperty("bcallMessage")) + if (options.oneofs) + object._encCommentMessage = "encCommentMessage"; + } + if (message.bcallMessage != null && message.hasOwnProperty("bcallMessage")) { object.bcallMessage = $root.proto.Message.BCallMessage.toObject(message.bcallMessage, options); - if (message.lottieStickerMessage != null && message.hasOwnProperty("lottieStickerMessage")) + if (options.oneofs) + object._bcallMessage = "bcallMessage"; + } + if (message.lottieStickerMessage != null && message.hasOwnProperty("lottieStickerMessage")) { object.lottieStickerMessage = $root.proto.Message.FutureProofMessage.toObject(message.lottieStickerMessage, options); - if (message.eventMessage != null && message.hasOwnProperty("eventMessage")) + if (options.oneofs) + object._lottieStickerMessage = "lottieStickerMessage"; + } + if (message.eventMessage != null && message.hasOwnProperty("eventMessage")) { object.eventMessage = $root.proto.Message.EventMessage.toObject(message.eventMessage, options); - if (message.commentMessage != null && message.hasOwnProperty("commentMessage")) + if (options.oneofs) + object._eventMessage = "eventMessage"; + } + if (message.encEventResponseMessage != null && message.hasOwnProperty("encEventResponseMessage")) { + object.encEventResponseMessage = $root.proto.Message.EncEventResponseMessage.toObject(message.encEventResponseMessage, options); + if (options.oneofs) + object._encEventResponseMessage = "encEventResponseMessage"; + } + if (message.commentMessage != null && message.hasOwnProperty("commentMessage")) { object.commentMessage = $root.proto.Message.CommentMessage.toObject(message.commentMessage, options); - if (message.newsletterAdminInviteMessage != null && message.hasOwnProperty("newsletterAdminInviteMessage")) + if (options.oneofs) + object._commentMessage = "commentMessage"; + } + if (message.newsletterAdminInviteMessage != null && message.hasOwnProperty("newsletterAdminInviteMessage")) { object.newsletterAdminInviteMessage = $root.proto.Message.NewsletterAdminInviteMessage.toObject(message.newsletterAdminInviteMessage, options); - if (message.extendedTextMessageWithParentKey != null && message.hasOwnProperty("extendedTextMessageWithParentKey")) - object.extendedTextMessageWithParentKey = $root.proto.Message.ExtendedTextMessageWithParentKey.toObject(message.extendedTextMessageWithParentKey, options); - if (message.placeholderMessage != null && message.hasOwnProperty("placeholderMessage")) + if (options.oneofs) + object._newsletterAdminInviteMessage = "newsletterAdminInviteMessage"; + } + if (message.placeholderMessage != null && message.hasOwnProperty("placeholderMessage")) { object.placeholderMessage = $root.proto.Message.PlaceholderMessage.toObject(message.placeholderMessage, options); - if (message.encEventUpdateMessage != null && message.hasOwnProperty("encEventUpdateMessage")) - object.encEventUpdateMessage = $root.proto.Message.EncEventUpdateMessage.toObject(message.encEventUpdateMessage, options); + if (options.oneofs) + object._placeholderMessage = "placeholderMessage"; + } + if (message.secretEncryptedMessage != null && message.hasOwnProperty("secretEncryptedMessage")) { + object.secretEncryptedMessage = $root.proto.Message.SecretEncryptedMessage.toObject(message.secretEncryptedMessage, options); + if (options.oneofs) + object._secretEncryptedMessage = "secretEncryptedMessage"; + } + if (message.albumMessage != null && message.hasOwnProperty("albumMessage")) { + object.albumMessage = $root.proto.Message.AlbumMessage.toObject(message.albumMessage, options); + if (options.oneofs) + object._albumMessage = "albumMessage"; + } + if (message.eventCoverImage != null && message.hasOwnProperty("eventCoverImage")) { + object.eventCoverImage = $root.proto.Message.FutureProofMessage.toObject(message.eventCoverImage, options); + if (options.oneofs) + object._eventCoverImage = "eventCoverImage"; + } + if (message.stickerPackMessage != null && message.hasOwnProperty("stickerPackMessage")) { + object.stickerPackMessage = $root.proto.Message.StickerPackMessage.toObject(message.stickerPackMessage, options); + if (options.oneofs) + object._stickerPackMessage = "stickerPackMessage"; + } + if (message.statusMentionMessage != null && message.hasOwnProperty("statusMentionMessage")) { + object.statusMentionMessage = $root.proto.Message.FutureProofMessage.toObject(message.statusMentionMessage, options); + if (options.oneofs) + object._statusMentionMessage = "statusMentionMessage"; + } + if (message.pollResultSnapshotMessage != null && message.hasOwnProperty("pollResultSnapshotMessage")) { + object.pollResultSnapshotMessage = $root.proto.Message.PollResultSnapshotMessage.toObject(message.pollResultSnapshotMessage, options); + if (options.oneofs) + object._pollResultSnapshotMessage = "pollResultSnapshotMessage"; + } + if (message.pollCreationOptionImageMessage != null && message.hasOwnProperty("pollCreationOptionImageMessage")) { + object.pollCreationOptionImageMessage = $root.proto.Message.FutureProofMessage.toObject(message.pollCreationOptionImageMessage, options); + if (options.oneofs) + object._pollCreationOptionImageMessage = "pollCreationOptionImageMessage"; + } + if (message.associatedChildMessage != null && message.hasOwnProperty("associatedChildMessage")) { + object.associatedChildMessage = $root.proto.Message.FutureProofMessage.toObject(message.associatedChildMessage, options); + if (options.oneofs) + object._associatedChildMessage = "associatedChildMessage"; + } + if (message.groupStatusMentionMessage != null && message.hasOwnProperty("groupStatusMentionMessage")) { + object.groupStatusMentionMessage = $root.proto.Message.FutureProofMessage.toObject(message.groupStatusMentionMessage, options); + if (options.oneofs) + object._groupStatusMentionMessage = "groupStatusMentionMessage"; + } + if (message.pollCreationMessageV4 != null && message.hasOwnProperty("pollCreationMessageV4")) { + object.pollCreationMessageV4 = $root.proto.Message.FutureProofMessage.toObject(message.pollCreationMessageV4, options); + if (options.oneofs) + object._pollCreationMessageV4 = "pollCreationMessageV4"; + } + if (message.pollCreationMessageV5 != null && message.hasOwnProperty("pollCreationMessageV5")) { + object.pollCreationMessageV5 = $root.proto.Message.FutureProofMessage.toObject(message.pollCreationMessageV5, options); + if (options.oneofs) + object._pollCreationMessageV5 = "pollCreationMessageV5"; + } + if (message.statusAddYours != null && message.hasOwnProperty("statusAddYours")) { + object.statusAddYours = $root.proto.Message.FutureProofMessage.toObject(message.statusAddYours, options); + if (options.oneofs) + object._statusAddYours = "statusAddYours"; + } + if (message.groupStatusMessage != null && message.hasOwnProperty("groupStatusMessage")) { + object.groupStatusMessage = $root.proto.Message.FutureProofMessage.toObject(message.groupStatusMessage, options); + if (options.oneofs) + object._groupStatusMessage = "groupStatusMessage"; + } + if (message.richResponseMessage != null && message.hasOwnProperty("richResponseMessage")) { + object.richResponseMessage = $root.proto.AIRichResponseMessage.toObject(message.richResponseMessage, options); + if (options.oneofs) + object._richResponseMessage = "richResponseMessage"; + } + if (message.statusNotificationMessage != null && message.hasOwnProperty("statusNotificationMessage")) { + object.statusNotificationMessage = $root.proto.Message.StatusNotificationMessage.toObject(message.statusNotificationMessage, options); + if (options.oneofs) + object._statusNotificationMessage = "statusNotificationMessage"; + } return object; }; @@ -28542,6 +54765,309 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Message + * @function getTypeUrl + * @memberof proto.Message + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Message.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message"; + }; + + Message.AlbumMessage = (function() { + + /** + * Properties of an AlbumMessage. + * @memberof proto.Message + * @interface IAlbumMessage + * @property {number|null} [expectedImageCount] AlbumMessage expectedImageCount + * @property {number|null} [expectedVideoCount] AlbumMessage expectedVideoCount + * @property {proto.IContextInfo|null} [contextInfo] AlbumMessage contextInfo + */ + + /** + * Constructs a new AlbumMessage. + * @memberof proto.Message + * @classdesc Represents an AlbumMessage. + * @implements IAlbumMessage + * @constructor + * @param {proto.Message.IAlbumMessage=} [properties] Properties to set + */ + function AlbumMessage(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AlbumMessage expectedImageCount. + * @member {number|null|undefined} expectedImageCount + * @memberof proto.Message.AlbumMessage + * @instance + */ + AlbumMessage.prototype.expectedImageCount = null; + + /** + * AlbumMessage expectedVideoCount. + * @member {number|null|undefined} expectedVideoCount + * @memberof proto.Message.AlbumMessage + * @instance + */ + AlbumMessage.prototype.expectedVideoCount = null; + + /** + * AlbumMessage contextInfo. + * @member {proto.IContextInfo|null|undefined} contextInfo + * @memberof proto.Message.AlbumMessage + * @instance + */ + AlbumMessage.prototype.contextInfo = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AlbumMessage.prototype, "_expectedImageCount", { + get: $util.oneOfGetter($oneOfFields = ["expectedImageCount"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AlbumMessage.prototype, "_expectedVideoCount", { + get: $util.oneOfGetter($oneOfFields = ["expectedVideoCount"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AlbumMessage.prototype, "_contextInfo", { + get: $util.oneOfGetter($oneOfFields = ["contextInfo"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AlbumMessage instance using the specified properties. + * @function create + * @memberof proto.Message.AlbumMessage + * @static + * @param {proto.Message.IAlbumMessage=} [properties] Properties to set + * @returns {proto.Message.AlbumMessage} AlbumMessage instance + */ + AlbumMessage.create = function create(properties) { + return new AlbumMessage(properties); + }; + + /** + * Encodes the specified AlbumMessage message. Does not implicitly {@link proto.Message.AlbumMessage.verify|verify} messages. + * @function encode + * @memberof proto.Message.AlbumMessage + * @static + * @param {proto.Message.IAlbumMessage} message AlbumMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AlbumMessage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.expectedImageCount != null && Object.hasOwnProperty.call(message, "expectedImageCount")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.expectedImageCount); + if (message.expectedVideoCount != null && Object.hasOwnProperty.call(message, "expectedVideoCount")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.expectedVideoCount); + 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 AlbumMessage message, length delimited. Does not implicitly {@link proto.Message.AlbumMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.AlbumMessage + * @static + * @param {proto.Message.IAlbumMessage} message AlbumMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AlbumMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AlbumMessage message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.AlbumMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.AlbumMessage} AlbumMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AlbumMessage.decode = function 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.AlbumMessage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.expectedImageCount = reader.uint32(); + break; + } + case 3: { + message.expectedVideoCount = reader.uint32(); + break; + } + case 17: { + message.contextInfo = $root.proto.ContextInfo.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AlbumMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.AlbumMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.AlbumMessage} AlbumMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AlbumMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AlbumMessage message. + * @function verify + * @memberof proto.Message.AlbumMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AlbumMessage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.expectedImageCount != null && message.hasOwnProperty("expectedImageCount")) { + properties._expectedImageCount = 1; + if (!$util.isInteger(message.expectedImageCount)) + return "expectedImageCount: integer expected"; + } + if (message.expectedVideoCount != null && message.hasOwnProperty("expectedVideoCount")) { + properties._expectedVideoCount = 1; + if (!$util.isInteger(message.expectedVideoCount)) + return "expectedVideoCount: integer expected"; + } + if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) { + properties._contextInfo = 1; + { + var error = $root.proto.ContextInfo.verify(message.contextInfo); + if (error) + return "contextInfo." + error; + } + } + return null; + }; + + /** + * Creates an AlbumMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.AlbumMessage + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.AlbumMessage} AlbumMessage + */ + AlbumMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.AlbumMessage) + return object; + var message = new $root.proto.Message.AlbumMessage(); + if (object.expectedImageCount != null) + message.expectedImageCount = object.expectedImageCount >>> 0; + if (object.expectedVideoCount != null) + message.expectedVideoCount = object.expectedVideoCount >>> 0; + if (object.contextInfo != null) { + if (typeof object.contextInfo !== "object") + throw TypeError(".proto.Message.AlbumMessage.contextInfo: object expected"); + message.contextInfo = $root.proto.ContextInfo.fromObject(object.contextInfo); + } + return message; + }; + + /** + * Creates a plain object from an AlbumMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.AlbumMessage + * @static + * @param {proto.Message.AlbumMessage} message AlbumMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AlbumMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.expectedImageCount != null && message.hasOwnProperty("expectedImageCount")) { + object.expectedImageCount = message.expectedImageCount; + if (options.oneofs) + object._expectedImageCount = "expectedImageCount"; + } + if (message.expectedVideoCount != null && message.hasOwnProperty("expectedVideoCount")) { + object.expectedVideoCount = message.expectedVideoCount; + if (options.oneofs) + object._expectedVideoCount = "expectedVideoCount"; + } + if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) { + object.contextInfo = $root.proto.ContextInfo.toObject(message.contextInfo, options); + if (options.oneofs) + object._contextInfo = "contextInfo"; + } + return object; + }; + + /** + * Converts this AlbumMessage to JSON. + * @function toJSON + * @memberof proto.Message.AlbumMessage + * @instance + * @returns {Object.} JSON object + */ + AlbumMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AlbumMessage + * @function getTypeUrl + * @memberof proto.Message.AlbumMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AlbumMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.AlbumMessage"; + }; + + return AlbumMessage; + })(); + Message.AppStateFatalExceptionNotification = (function() { /** @@ -28578,11 +55104,20 @@ $root.proto = (function() { /** * AppStateFatalExceptionNotification timestamp. - * @member {number|Long} timestamp + * @member {number|Long|null|undefined} timestamp * @memberof proto.Message.AppStateFatalExceptionNotification * @instance */ - AppStateFatalExceptionNotification.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + AppStateFatalExceptionNotification.prototype.timestamp = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AppStateFatalExceptionNotification.prototype, "_timestamp", { + get: $util.oneOfGetter($oneOfFields = ["timestamp"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new AppStateFatalExceptionNotification instance using the specified properties. @@ -28647,14 +55182,16 @@ $root.proto = (function() { 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; + 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; @@ -28690,6 +55227,7 @@ $root.proto = (function() { AppStateFatalExceptionNotification.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; if (message.collectionNames != null && message.hasOwnProperty("collectionNames")) { if (!Array.isArray(message.collectionNames)) return "collectionNames: array expected"; @@ -28697,9 +55235,11 @@ $root.proto = (function() { if (!$util.isString(message.collectionNames[i])) return "collectionNames: string[] expected"; } - if (message.timestamp != null && message.hasOwnProperty("timestamp")) + if (message.timestamp != null && message.hasOwnProperty("timestamp")) { + properties._timestamp = 1; if (!$util.isInteger(message.timestamp) && !(message.timestamp && $util.isInteger(message.timestamp.low) && $util.isInteger(message.timestamp.high))) return "timestamp: integer|Long expected"; + } return null; }; @@ -28749,22 +55289,19 @@ $root.proto = (function() { 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 (message.timestamp != null && message.hasOwnProperty("timestamp")) { if (typeof message.timestamp === "number") object.timestamp = options.longs === String ? String(message.timestamp) : message.timestamp; else object.timestamp = options.longs === String ? $util.Long.prototype.toString.call(message.timestamp) : options.longs === Number ? new $util.LongBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0).toNumber() : message.timestamp; + if (options.oneofs) + object._timestamp = "timestamp"; + } return object; }; @@ -28779,6 +55316,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for AppStateFatalExceptionNotification + * @function getTypeUrl + * @memberof proto.Message.AppStateFatalExceptionNotification + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AppStateFatalExceptionNotification.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.AppStateFatalExceptionNotification"; + }; + return AppStateFatalExceptionNotification; })(); @@ -28823,6 +55375,21 @@ $root.proto = (function() { */ AppStateSyncKey.prototype.keyData = null; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AppStateSyncKey.prototype, "_keyId", { + get: $util.oneOfGetter($oneOfFields = ["keyId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AppStateSyncKey.prototype, "_keyData", { + get: $util.oneOfGetter($oneOfFields = ["keyData"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new AppStateSyncKey instance using the specified properties. * @function create @@ -28885,12 +55452,14 @@ $root.proto = (function() { 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; + 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; @@ -28926,15 +55495,22 @@ $root.proto = (function() { AppStateSyncKey.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; if (message.keyId != null && message.hasOwnProperty("keyId")) { - var error = $root.proto.Message.AppStateSyncKeyId.verify(message.keyId); - if (error) - return "keyId." + error; + properties._keyId = 1; + { + 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; + properties._keyData = 1; + { + var error = $root.proto.Message.AppStateSyncKeyData.verify(message.keyData); + if (error) + return "keyData." + error; + } } return null; }; @@ -28977,14 +55553,16 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.keyId = null; - object.keyData = null; - } - if (message.keyId != null && message.hasOwnProperty("keyId")) + if (message.keyId != null && message.hasOwnProperty("keyId")) { object.keyId = $root.proto.Message.AppStateSyncKeyId.toObject(message.keyId, options); - if (message.keyData != null && message.hasOwnProperty("keyData")) + if (options.oneofs) + object._keyId = "keyId"; + } + if (message.keyData != null && message.hasOwnProperty("keyData")) { object.keyData = $root.proto.Message.AppStateSyncKeyData.toObject(message.keyData, options); + if (options.oneofs) + object._keyData = "keyData"; + } return object; }; @@ -28999,6 +55577,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for AppStateSyncKey + * @function getTypeUrl + * @memberof proto.Message.AppStateSyncKey + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AppStateSyncKey.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.AppStateSyncKey"; + }; + return AppStateSyncKey; })(); @@ -29030,11 +55623,11 @@ $root.proto = (function() { /** * AppStateSyncKeyData keyData. - * @member {Uint8Array} keyData + * @member {Uint8Array|null|undefined} keyData * @memberof proto.Message.AppStateSyncKeyData * @instance */ - AppStateSyncKeyData.prototype.keyData = $util.newBuffer([]); + AppStateSyncKeyData.prototype.keyData = null; /** * AppStateSyncKeyData fingerprint. @@ -29046,11 +55639,32 @@ $root.proto = (function() { /** * AppStateSyncKeyData timestamp. - * @member {number|Long} timestamp + * @member {number|Long|null|undefined} timestamp * @memberof proto.Message.AppStateSyncKeyData * @instance */ - AppStateSyncKeyData.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + AppStateSyncKeyData.prototype.timestamp = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AppStateSyncKeyData.prototype, "_keyData", { + get: $util.oneOfGetter($oneOfFields = ["keyData"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AppStateSyncKeyData.prototype, "_fingerprint", { + get: $util.oneOfGetter($oneOfFields = ["fingerprint"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AppStateSyncKeyData.prototype, "_timestamp", { + get: $util.oneOfGetter($oneOfFields = ["timestamp"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new AppStateSyncKeyData instance using the specified properties. @@ -29116,15 +55730,18 @@ $root.proto = (function() { 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; + 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; @@ -29160,17 +55777,25 @@ $root.proto = (function() { AppStateSyncKeyData.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.keyData != null && message.hasOwnProperty("keyData")) + var properties = {}; + if (message.keyData != null && message.hasOwnProperty("keyData")) { + properties._keyData = 1; 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 (message.fingerprint != null && message.hasOwnProperty("fingerprint")) { + properties._fingerprint = 1; + { + var error = $root.proto.Message.AppStateSyncKeyFingerprint.verify(message.fingerprint); + if (error) + return "fingerprint." + error; + } + } + if (message.timestamp != null && message.hasOwnProperty("timestamp")) { + properties._timestamp = 1; if (!$util.isInteger(message.timestamp) && !(message.timestamp && $util.isInteger(message.timestamp.low) && $util.isInteger(message.timestamp.high))) return "timestamp: integer|Long expected"; + } return null; }; @@ -29189,7 +55814,7 @@ $root.proto = (function() { 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) + else if (object.keyData.length >= 0) message.keyData = object.keyData; if (object.fingerprint != null) { if (typeof object.fingerprint !== "object") @@ -29221,30 +55846,24 @@ $root.proto = (function() { 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")) + 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")) + if (options.oneofs) + object._keyData = "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 (options.oneofs) + object._fingerprint = "fingerprint"; + } + if (message.timestamp != null && message.hasOwnProperty("timestamp")) { if (typeof message.timestamp === "number") object.timestamp = options.longs === String ? String(message.timestamp) : message.timestamp; else object.timestamp = options.longs === String ? $util.Long.prototype.toString.call(message.timestamp) : options.longs === Number ? new $util.LongBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0).toNumber() : message.timestamp; + if (options.oneofs) + object._timestamp = "timestamp"; + } return object; }; @@ -29259,6 +55878,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for AppStateSyncKeyData + * @function getTypeUrl + * @memberof proto.Message.AppStateSyncKeyData + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AppStateSyncKeyData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.AppStateSyncKeyData"; + }; + return AppStateSyncKeyData; })(); @@ -29291,19 +55925,19 @@ $root.proto = (function() { /** * AppStateSyncKeyFingerprint rawId. - * @member {number} rawId + * @member {number|null|undefined} rawId * @memberof proto.Message.AppStateSyncKeyFingerprint * @instance */ - AppStateSyncKeyFingerprint.prototype.rawId = 0; + AppStateSyncKeyFingerprint.prototype.rawId = null; /** * AppStateSyncKeyFingerprint currentIndex. - * @member {number} currentIndex + * @member {number|null|undefined} currentIndex * @memberof proto.Message.AppStateSyncKeyFingerprint * @instance */ - AppStateSyncKeyFingerprint.prototype.currentIndex = 0; + AppStateSyncKeyFingerprint.prototype.currentIndex = null; /** * AppStateSyncKeyFingerprint deviceIndexes. @@ -29313,6 +55947,21 @@ $root.proto = (function() { */ AppStateSyncKeyFingerprint.prototype.deviceIndexes = $util.emptyArray; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AppStateSyncKeyFingerprint.prototype, "_rawId", { + get: $util.oneOfGetter($oneOfFields = ["rawId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AppStateSyncKeyFingerprint.prototype, "_currentIndex", { + get: $util.oneOfGetter($oneOfFields = ["currentIndex"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new AppStateSyncKeyFingerprint instance using the specified properties. * @function create @@ -29381,22 +56030,25 @@ $root.proto = (function() { 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) + 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()); - } else - message.deviceIndexes.push(reader.uint32()); - break; + break; + } default: reader.skipType(tag & 7); break; @@ -29432,12 +56084,17 @@ $root.proto = (function() { AppStateSyncKeyFingerprint.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.rawId != null && message.hasOwnProperty("rawId")) + var properties = {}; + if (message.rawId != null && message.hasOwnProperty("rawId")) { + properties._rawId = 1; if (!$util.isInteger(message.rawId)) return "rawId: integer expected"; - if (message.currentIndex != null && message.hasOwnProperty("currentIndex")) + } + if (message.currentIndex != null && message.hasOwnProperty("currentIndex")) { + properties._currentIndex = 1; 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"; @@ -29489,14 +56146,16 @@ $root.proto = (function() { 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")) + if (message.rawId != null && message.hasOwnProperty("rawId")) { object.rawId = message.rawId; - if (message.currentIndex != null && message.hasOwnProperty("currentIndex")) + if (options.oneofs) + object._rawId = "rawId"; + } + if (message.currentIndex != null && message.hasOwnProperty("currentIndex")) { object.currentIndex = message.currentIndex; + if (options.oneofs) + object._currentIndex = "currentIndex"; + } if (message.deviceIndexes && message.deviceIndexes.length) { object.deviceIndexes = []; for (var j = 0; j < message.deviceIndexes.length; ++j) @@ -29516,6 +56175,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for AppStateSyncKeyFingerprint + * @function getTypeUrl + * @memberof proto.Message.AppStateSyncKeyFingerprint + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AppStateSyncKeyFingerprint.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.AppStateSyncKeyFingerprint"; + }; + return AppStateSyncKeyFingerprint; })(); @@ -29545,11 +56219,20 @@ $root.proto = (function() { /** * AppStateSyncKeyId keyId. - * @member {Uint8Array} keyId + * @member {Uint8Array|null|undefined} keyId * @memberof proto.Message.AppStateSyncKeyId * @instance */ - AppStateSyncKeyId.prototype.keyId = $util.newBuffer([]); + AppStateSyncKeyId.prototype.keyId = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AppStateSyncKeyId.prototype, "_keyId", { + get: $util.oneOfGetter($oneOfFields = ["keyId"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new AppStateSyncKeyId instance using the specified properties. @@ -29611,9 +56294,10 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.keyId = reader.bytes(); - break; + case 1: { + message.keyId = reader.bytes(); + break; + } default: reader.skipType(tag & 7); break; @@ -29649,9 +56333,12 @@ $root.proto = (function() { AppStateSyncKeyId.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.keyId != null && message.hasOwnProperty("keyId")) + var properties = {}; + if (message.keyId != null && message.hasOwnProperty("keyId")) { + properties._keyId = 1; if (!(message.keyId && typeof message.keyId.length === "number" || $util.isString(message.keyId))) return "keyId: buffer expected"; + } return null; }; @@ -29670,7 +56357,7 @@ $root.proto = (function() { 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) + else if (object.keyId.length >= 0) message.keyId = object.keyId; return message; }; @@ -29688,16 +56375,11 @@ $root.proto = (function() { 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")) + 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; + if (options.oneofs) + object._keyId = "keyId"; + } return object; }; @@ -29712,6 +56394,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for AppStateSyncKeyId + * @function getTypeUrl + * @memberof proto.Message.AppStateSyncKeyId + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AppStateSyncKeyId.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.AppStateSyncKeyId"; + }; + return AppStateSyncKeyId; })(); @@ -29809,11 +56506,12 @@ $root.proto = (function() { 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; + 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; @@ -29920,6 +56618,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for AppStateSyncKeyRequest + * @function getTypeUrl + * @memberof proto.Message.AppStateSyncKeyRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AppStateSyncKeyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.AppStateSyncKeyRequest"; + }; + return AppStateSyncKeyRequest; })(); @@ -30017,11 +56730,12 @@ $root.proto = (function() { 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; + 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; @@ -30128,6 +56842,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for AppStateSyncKeyShare + * @function getTypeUrl + * @memberof proto.Message.AppStateSyncKeyShare + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AppStateSyncKeyShare.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.AppStateSyncKeyShare"; + }; + return AppStateSyncKeyShare; })(); @@ -30152,6 +56881,7 @@ $root.proto = (function() { * @property {Uint8Array|null} [waveform] AudioMessage waveform * @property {number|null} [backgroundArgb] AudioMessage backgroundArgb * @property {boolean|null} [viewOnce] AudioMessage viewOnce + * @property {string|null} [accessibilityLabel] AudioMessage accessibilityLabel */ /** @@ -30171,83 +56901,83 @@ $root.proto = (function() { /** * AudioMessage url. - * @member {string} url + * @member {string|null|undefined} url * @memberof proto.Message.AudioMessage * @instance */ - AudioMessage.prototype.url = ""; + AudioMessage.prototype.url = null; /** * AudioMessage mimetype. - * @member {string} mimetype + * @member {string|null|undefined} mimetype * @memberof proto.Message.AudioMessage * @instance */ - AudioMessage.prototype.mimetype = ""; + AudioMessage.prototype.mimetype = null; /** * AudioMessage fileSha256. - * @member {Uint8Array} fileSha256 + * @member {Uint8Array|null|undefined} fileSha256 * @memberof proto.Message.AudioMessage * @instance */ - AudioMessage.prototype.fileSha256 = $util.newBuffer([]); + AudioMessage.prototype.fileSha256 = null; /** * AudioMessage fileLength. - * @member {number|Long} fileLength + * @member {number|Long|null|undefined} fileLength * @memberof proto.Message.AudioMessage * @instance */ - AudioMessage.prototype.fileLength = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + AudioMessage.prototype.fileLength = null; /** * AudioMessage seconds. - * @member {number} seconds + * @member {number|null|undefined} seconds * @memberof proto.Message.AudioMessage * @instance */ - AudioMessage.prototype.seconds = 0; + AudioMessage.prototype.seconds = null; /** * AudioMessage ptt. - * @member {boolean} ptt + * @member {boolean|null|undefined} ptt * @memberof proto.Message.AudioMessage * @instance */ - AudioMessage.prototype.ptt = false; + AudioMessage.prototype.ptt = null; /** * AudioMessage mediaKey. - * @member {Uint8Array} mediaKey + * @member {Uint8Array|null|undefined} mediaKey * @memberof proto.Message.AudioMessage * @instance */ - AudioMessage.prototype.mediaKey = $util.newBuffer([]); + AudioMessage.prototype.mediaKey = null; /** * AudioMessage fileEncSha256. - * @member {Uint8Array} fileEncSha256 + * @member {Uint8Array|null|undefined} fileEncSha256 * @memberof proto.Message.AudioMessage * @instance */ - AudioMessage.prototype.fileEncSha256 = $util.newBuffer([]); + AudioMessage.prototype.fileEncSha256 = null; /** * AudioMessage directPath. - * @member {string} directPath + * @member {string|null|undefined} directPath * @memberof proto.Message.AudioMessage * @instance */ - AudioMessage.prototype.directPath = ""; + AudioMessage.prototype.directPath = null; /** * AudioMessage mediaKeyTimestamp. - * @member {number|Long} mediaKeyTimestamp + * @member {number|Long|null|undefined} mediaKeyTimestamp * @memberof proto.Message.AudioMessage * @instance */ - AudioMessage.prototype.mediaKeyTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + AudioMessage.prototype.mediaKeyTimestamp = null; /** * AudioMessage contextInfo. @@ -30259,35 +56989,142 @@ $root.proto = (function() { /** * AudioMessage streamingSidecar. - * @member {Uint8Array} streamingSidecar + * @member {Uint8Array|null|undefined} streamingSidecar * @memberof proto.Message.AudioMessage * @instance */ - AudioMessage.prototype.streamingSidecar = $util.newBuffer([]); + AudioMessage.prototype.streamingSidecar = null; /** * AudioMessage waveform. - * @member {Uint8Array} waveform + * @member {Uint8Array|null|undefined} waveform * @memberof proto.Message.AudioMessage * @instance */ - AudioMessage.prototype.waveform = $util.newBuffer([]); + AudioMessage.prototype.waveform = null; /** * AudioMessage backgroundArgb. - * @member {number} backgroundArgb + * @member {number|null|undefined} backgroundArgb * @memberof proto.Message.AudioMessage * @instance */ - AudioMessage.prototype.backgroundArgb = 0; + AudioMessage.prototype.backgroundArgb = null; /** * AudioMessage viewOnce. - * @member {boolean} viewOnce + * @member {boolean|null|undefined} viewOnce * @memberof proto.Message.AudioMessage * @instance */ - AudioMessage.prototype.viewOnce = false; + AudioMessage.prototype.viewOnce = null; + + /** + * AudioMessage accessibilityLabel. + * @member {string|null|undefined} accessibilityLabel + * @memberof proto.Message.AudioMessage + * @instance + */ + AudioMessage.prototype.accessibilityLabel = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AudioMessage.prototype, "_url", { + get: $util.oneOfGetter($oneOfFields = ["url"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AudioMessage.prototype, "_mimetype", { + get: $util.oneOfGetter($oneOfFields = ["mimetype"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AudioMessage.prototype, "_fileSha256", { + get: $util.oneOfGetter($oneOfFields = ["fileSha256"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AudioMessage.prototype, "_fileLength", { + get: $util.oneOfGetter($oneOfFields = ["fileLength"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AudioMessage.prototype, "_seconds", { + get: $util.oneOfGetter($oneOfFields = ["seconds"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AudioMessage.prototype, "_ptt", { + get: $util.oneOfGetter($oneOfFields = ["ptt"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AudioMessage.prototype, "_mediaKey", { + get: $util.oneOfGetter($oneOfFields = ["mediaKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AudioMessage.prototype, "_fileEncSha256", { + get: $util.oneOfGetter($oneOfFields = ["fileEncSha256"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AudioMessage.prototype, "_directPath", { + get: $util.oneOfGetter($oneOfFields = ["directPath"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AudioMessage.prototype, "_mediaKeyTimestamp", { + get: $util.oneOfGetter($oneOfFields = ["mediaKeyTimestamp"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AudioMessage.prototype, "_contextInfo", { + get: $util.oneOfGetter($oneOfFields = ["contextInfo"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AudioMessage.prototype, "_streamingSidecar", { + get: $util.oneOfGetter($oneOfFields = ["streamingSidecar"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AudioMessage.prototype, "_waveform", { + get: $util.oneOfGetter($oneOfFields = ["waveform"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AudioMessage.prototype, "_backgroundArgb", { + get: $util.oneOfGetter($oneOfFields = ["backgroundArgb"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AudioMessage.prototype, "_viewOnce", { + get: $util.oneOfGetter($oneOfFields = ["viewOnce"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AudioMessage.prototype, "_accessibilityLabel", { + get: $util.oneOfGetter($oneOfFields = ["accessibilityLabel"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new AudioMessage instance using the specified properties. @@ -30343,6 +57180,8 @@ $root.proto = (function() { writer.uint32(/* id 20, wireType 5 =*/165).fixed32(message.backgroundArgb); if (message.viewOnce != null && Object.hasOwnProperty.call(message, "viewOnce")) writer.uint32(/* id 21, wireType 0 =*/168).bool(message.viewOnce); + if (message.accessibilityLabel != null && Object.hasOwnProperty.call(message, "accessibilityLabel")) + writer.uint32(/* id 22, wireType 2 =*/178).string(message.accessibilityLabel); return writer; }; @@ -30377,51 +57216,70 @@ $root.proto = (function() { 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; - case 20: - message.backgroundArgb = reader.fixed32(); - break; - case 21: - message.viewOnce = reader.bool(); - break; + 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; + } + case 20: { + message.backgroundArgb = reader.fixed32(); + break; + } + case 21: { + message.viewOnce = reader.bool(); + break; + } + case 22: { + message.accessibilityLabel = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -30457,53 +57315,90 @@ $root.proto = (function() { AudioMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.url != null && message.hasOwnProperty("url")) + var properties = {}; + if (message.url != null && message.hasOwnProperty("url")) { + properties._url = 1; if (!$util.isString(message.url)) return "url: string expected"; - if (message.mimetype != null && message.hasOwnProperty("mimetype")) + } + if (message.mimetype != null && message.hasOwnProperty("mimetype")) { + properties._mimetype = 1; if (!$util.isString(message.mimetype)) return "mimetype: string expected"; - if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) + } + if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) { + properties._fileSha256 = 1; if (!(message.fileSha256 && typeof message.fileSha256.length === "number" || $util.isString(message.fileSha256))) return "fileSha256: buffer expected"; - if (message.fileLength != null && message.hasOwnProperty("fileLength")) + } + if (message.fileLength != null && message.hasOwnProperty("fileLength")) { + properties._fileLength = 1; 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 (message.seconds != null && message.hasOwnProperty("seconds")) { + properties._seconds = 1; if (!$util.isInteger(message.seconds)) return "seconds: integer expected"; - if (message.ptt != null && message.hasOwnProperty("ptt")) + } + if (message.ptt != null && message.hasOwnProperty("ptt")) { + properties._ptt = 1; if (typeof message.ptt !== "boolean") return "ptt: boolean expected"; - if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) + } + if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) { + properties._mediaKey = 1; 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 != null && message.hasOwnProperty("fileEncSha256")) { + properties._fileEncSha256 = 1; if (!(message.fileEncSha256 && typeof message.fileEncSha256.length === "number" || $util.isString(message.fileEncSha256))) return "fileEncSha256: buffer expected"; - if (message.directPath != null && message.hasOwnProperty("directPath")) + } + if (message.directPath != null && message.hasOwnProperty("directPath")) { + properties._directPath = 1; if (!$util.isString(message.directPath)) return "directPath: string expected"; - if (message.mediaKeyTimestamp != null && message.hasOwnProperty("mediaKeyTimestamp")) + } + if (message.mediaKeyTimestamp != null && message.hasOwnProperty("mediaKeyTimestamp")) { + properties._mediaKeyTimestamp = 1; 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.contextInfo != null && message.hasOwnProperty("contextInfo")) { + properties._contextInfo = 1; + { + var error = $root.proto.ContextInfo.verify(message.contextInfo); + if (error) + return "contextInfo." + error; + } + } + if (message.streamingSidecar != null && message.hasOwnProperty("streamingSidecar")) { + properties._streamingSidecar = 1; 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 != null && message.hasOwnProperty("waveform")) { + properties._waveform = 1; if (!(message.waveform && typeof message.waveform.length === "number" || $util.isString(message.waveform))) return "waveform: buffer expected"; - if (message.backgroundArgb != null && message.hasOwnProperty("backgroundArgb")) + } + if (message.backgroundArgb != null && message.hasOwnProperty("backgroundArgb")) { + properties._backgroundArgb = 1; if (!$util.isInteger(message.backgroundArgb)) return "backgroundArgb: integer expected"; - if (message.viewOnce != null && message.hasOwnProperty("viewOnce")) + } + if (message.viewOnce != null && message.hasOwnProperty("viewOnce")) { + properties._viewOnce = 1; if (typeof message.viewOnce !== "boolean") return "viewOnce: boolean expected"; + } + if (message.accessibilityLabel != null && message.hasOwnProperty("accessibilityLabel")) { + properties._accessibilityLabel = 1; + if (!$util.isString(message.accessibilityLabel)) + return "accessibilityLabel: string expected"; + } return null; }; @@ -30526,7 +57421,7 @@ $root.proto = (function() { 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) + else if (object.fileSha256.length >= 0) message.fileSha256 = object.fileSha256; if (object.fileLength != null) if ($util.Long) @@ -30544,12 +57439,12 @@ $root.proto = (function() { 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) + else if (object.mediaKey.length >= 0) 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) + else if (object.fileEncSha256.length >= 0) message.fileEncSha256 = object.fileEncSha256; if (object.directPath != null) message.directPath = String(object.directPath); @@ -30570,17 +57465,19 @@ $root.proto = (function() { 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) + else if (object.streamingSidecar.length >= 0) 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) + else if (object.waveform.length >= 0) message.waveform = object.waveform; if (object.backgroundArgb != null) message.backgroundArgb = object.backgroundArgb >>> 0; if (object.viewOnce != null) message.viewOnce = Boolean(object.viewOnce); + if (object.accessibilityLabel != null) + message.accessibilityLabel = String(object.accessibilityLabel); return message; }; @@ -30597,97 +57494,92 @@ $root.proto = (function() { 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); - } - object.backgroundArgb = 0; - object.viewOnce = false; - } - if (message.url != null && message.hasOwnProperty("url")) + if (message.url != null && message.hasOwnProperty("url")) { object.url = message.url; - if (message.mimetype != null && message.hasOwnProperty("mimetype")) + if (options.oneofs) + object._url = "url"; + } + if (message.mimetype != null && message.hasOwnProperty("mimetype")) { object.mimetype = message.mimetype; - if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) + if (options.oneofs) + object._mimetype = "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 (options.oneofs) + object._fileSha256 = "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")) + if (options.oneofs) + object._fileLength = "fileLength"; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) { object.seconds = message.seconds; - if (message.ptt != null && message.hasOwnProperty("ptt")) + if (options.oneofs) + object._seconds = "seconds"; + } + if (message.ptt != null && message.hasOwnProperty("ptt")) { object.ptt = message.ptt; - if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) + if (options.oneofs) + object._ptt = "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")) + if (options.oneofs) + object._mediaKey = "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")) + if (options.oneofs) + object._fileEncSha256 = "fileEncSha256"; + } + if (message.directPath != null && message.hasOwnProperty("directPath")) { object.directPath = message.directPath; - if (message.mediaKeyTimestamp != null && message.hasOwnProperty("mediaKeyTimestamp")) + if (options.oneofs) + object._directPath = "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")) + if (options.oneofs) + object._mediaKeyTimestamp = "mediaKeyTimestamp"; + } + if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) { object.contextInfo = $root.proto.ContextInfo.toObject(message.contextInfo, options); - if (message.streamingSidecar != null && message.hasOwnProperty("streamingSidecar")) + if (options.oneofs) + object._contextInfo = "contextInfo"; + } + 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")) + if (options.oneofs) + object._streamingSidecar = "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; - if (message.backgroundArgb != null && message.hasOwnProperty("backgroundArgb")) + if (options.oneofs) + object._waveform = "waveform"; + } + if (message.backgroundArgb != null && message.hasOwnProperty("backgroundArgb")) { object.backgroundArgb = message.backgroundArgb; - if (message.viewOnce != null && message.hasOwnProperty("viewOnce")) + if (options.oneofs) + object._backgroundArgb = "backgroundArgb"; + } + if (message.viewOnce != null && message.hasOwnProperty("viewOnce")) { object.viewOnce = message.viewOnce; + if (options.oneofs) + object._viewOnce = "viewOnce"; + } + if (message.accessibilityLabel != null && message.hasOwnProperty("accessibilityLabel")) { + object.accessibilityLabel = message.accessibilityLabel; + if (options.oneofs) + object._accessibilityLabel = "accessibilityLabel"; + } return object; }; @@ -30702,6 +57594,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for AudioMessage + * @function getTypeUrl + * @memberof proto.Message.AudioMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AudioMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.AudioMessage"; + }; + return AudioMessage; })(); @@ -30734,35 +57641,62 @@ $root.proto = (function() { /** * BCallMessage sessionId. - * @member {string} sessionId + * @member {string|null|undefined} sessionId * @memberof proto.Message.BCallMessage * @instance */ - BCallMessage.prototype.sessionId = ""; + BCallMessage.prototype.sessionId = null; /** * BCallMessage mediaType. - * @member {proto.Message.BCallMessage.MediaType} mediaType + * @member {proto.Message.BCallMessage.MediaType|null|undefined} mediaType * @memberof proto.Message.BCallMessage * @instance */ - BCallMessage.prototype.mediaType = 0; + BCallMessage.prototype.mediaType = null; /** * BCallMessage masterKey. - * @member {Uint8Array} masterKey + * @member {Uint8Array|null|undefined} masterKey * @memberof proto.Message.BCallMessage * @instance */ - BCallMessage.prototype.masterKey = $util.newBuffer([]); + BCallMessage.prototype.masterKey = null; /** * BCallMessage caption. - * @member {string} caption + * @member {string|null|undefined} caption * @memberof proto.Message.BCallMessage * @instance */ - BCallMessage.prototype.caption = ""; + BCallMessage.prototype.caption = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BCallMessage.prototype, "_sessionId", { + get: $util.oneOfGetter($oneOfFields = ["sessionId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BCallMessage.prototype, "_mediaType", { + get: $util.oneOfGetter($oneOfFields = ["mediaType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BCallMessage.prototype, "_masterKey", { + get: $util.oneOfGetter($oneOfFields = ["masterKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BCallMessage.prototype, "_caption", { + get: $util.oneOfGetter($oneOfFields = ["caption"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new BCallMessage instance using the specified properties. @@ -30830,18 +57764,22 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.sessionId = reader.string(); - break; - case 2: - message.mediaType = reader.int32(); - break; - case 3: - message.masterKey = reader.bytes(); - break; - case 4: - message.caption = reader.string(); - break; + case 1: { + message.sessionId = reader.string(); + break; + } + case 2: { + message.mediaType = reader.int32(); + break; + } + case 3: { + message.masterKey = reader.bytes(); + break; + } + case 4: { + message.caption = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -30877,10 +57815,14 @@ $root.proto = (function() { BCallMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.sessionId != null && message.hasOwnProperty("sessionId")) + var properties = {}; + if (message.sessionId != null && message.hasOwnProperty("sessionId")) { + properties._sessionId = 1; if (!$util.isString(message.sessionId)) return "sessionId: string expected"; - if (message.mediaType != null && message.hasOwnProperty("mediaType")) + } + if (message.mediaType != null && message.hasOwnProperty("mediaType")) { + properties._mediaType = 1; switch (message.mediaType) { default: return "mediaType: enum value expected"; @@ -30889,12 +57831,17 @@ $root.proto = (function() { case 2: break; } - if (message.masterKey != null && message.hasOwnProperty("masterKey")) + } + if (message.masterKey != null && message.hasOwnProperty("masterKey")) { + properties._masterKey = 1; if (!(message.masterKey && typeof message.masterKey.length === "number" || $util.isString(message.masterKey))) return "masterKey: buffer expected"; - if (message.caption != null && message.hasOwnProperty("caption")) + } + if (message.caption != null && message.hasOwnProperty("caption")) { + properties._caption = 1; if (!$util.isString(message.caption)) return "caption: string expected"; + } return null; }; @@ -30913,6 +57860,12 @@ $root.proto = (function() { if (object.sessionId != null) message.sessionId = String(object.sessionId); switch (object.mediaType) { + default: + if (typeof object.mediaType === "number") { + message.mediaType = object.mediaType; + break; + } + break; case "UNKNOWN": case 0: message.mediaType = 0; @@ -30929,7 +57882,7 @@ $root.proto = (function() { if (object.masterKey != null) if (typeof object.masterKey === "string") $util.base64.decode(object.masterKey, message.masterKey = $util.newBuffer($util.base64.length(object.masterKey)), 0); - else if (object.masterKey.length) + else if (object.masterKey.length >= 0) message.masterKey = object.masterKey; if (object.caption != null) message.caption = String(object.caption); @@ -30949,26 +57902,26 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.sessionId = ""; - object.mediaType = options.enums === String ? "UNKNOWN" : 0; - if (options.bytes === String) - object.masterKey = ""; - else { - object.masterKey = []; - if (options.bytes !== Array) - object.masterKey = $util.newBuffer(object.masterKey); - } - object.caption = ""; - } - if (message.sessionId != null && message.hasOwnProperty("sessionId")) + if (message.sessionId != null && message.hasOwnProperty("sessionId")) { object.sessionId = message.sessionId; - if (message.mediaType != null && message.hasOwnProperty("mediaType")) - object.mediaType = options.enums === String ? $root.proto.Message.BCallMessage.MediaType[message.mediaType] : message.mediaType; - if (message.masterKey != null && message.hasOwnProperty("masterKey")) + if (options.oneofs) + object._sessionId = "sessionId"; + } + if (message.mediaType != null && message.hasOwnProperty("mediaType")) { + object.mediaType = options.enums === String ? $root.proto.Message.BCallMessage.MediaType[message.mediaType] === undefined ? message.mediaType : $root.proto.Message.BCallMessage.MediaType[message.mediaType] : message.mediaType; + if (options.oneofs) + object._mediaType = "mediaType"; + } + if (message.masterKey != null && message.hasOwnProperty("masterKey")) { object.masterKey = options.bytes === String ? $util.base64.encode(message.masterKey, 0, message.masterKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.masterKey) : message.masterKey; - if (message.caption != null && message.hasOwnProperty("caption")) + if (options.oneofs) + object._masterKey = "masterKey"; + } + if (message.caption != null && message.hasOwnProperty("caption")) { object.caption = message.caption; + if (options.oneofs) + object._caption = "caption"; + } return object; }; @@ -30983,6 +57936,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for BCallMessage + * @function getTypeUrl + * @memberof proto.Message.BCallMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BCallMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.BCallMessage"; + }; + /** * MediaType enum. * @name proto.Message.BCallMessage.MediaType @@ -31013,6 +57981,7 @@ $root.proto = (function() { * @property {string|null} [text] BotFeedbackMessage text * @property {number|Long|null} [kindNegative] BotFeedbackMessage kindNegative * @property {number|Long|null} [kindPositive] BotFeedbackMessage kindPositive + * @property {proto.Message.BotFeedbackMessage.ReportKind|null} [kindReport] BotFeedbackMessage kindReport */ /** @@ -31040,35 +58009,82 @@ $root.proto = (function() { /** * BotFeedbackMessage kind. - * @member {proto.Message.BotFeedbackMessage.BotFeedbackKind} kind + * @member {proto.Message.BotFeedbackMessage.BotFeedbackKind|null|undefined} kind * @memberof proto.Message.BotFeedbackMessage * @instance */ - BotFeedbackMessage.prototype.kind = 0; + BotFeedbackMessage.prototype.kind = null; /** * BotFeedbackMessage text. - * @member {string} text + * @member {string|null|undefined} text * @memberof proto.Message.BotFeedbackMessage * @instance */ - BotFeedbackMessage.prototype.text = ""; + BotFeedbackMessage.prototype.text = null; /** * BotFeedbackMessage kindNegative. - * @member {number|Long} kindNegative + * @member {number|Long|null|undefined} kindNegative * @memberof proto.Message.BotFeedbackMessage * @instance */ - BotFeedbackMessage.prototype.kindNegative = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + BotFeedbackMessage.prototype.kindNegative = null; /** * BotFeedbackMessage kindPositive. - * @member {number|Long} kindPositive + * @member {number|Long|null|undefined} kindPositive * @memberof proto.Message.BotFeedbackMessage * @instance */ - BotFeedbackMessage.prototype.kindPositive = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + BotFeedbackMessage.prototype.kindPositive = null; + + /** + * BotFeedbackMessage kindReport. + * @member {proto.Message.BotFeedbackMessage.ReportKind|null|undefined} kindReport + * @memberof proto.Message.BotFeedbackMessage + * @instance + */ + BotFeedbackMessage.prototype.kindReport = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotFeedbackMessage.prototype, "_messageKey", { + get: $util.oneOfGetter($oneOfFields = ["messageKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotFeedbackMessage.prototype, "_kind", { + get: $util.oneOfGetter($oneOfFields = ["kind"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotFeedbackMessage.prototype, "_text", { + get: $util.oneOfGetter($oneOfFields = ["text"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotFeedbackMessage.prototype, "_kindNegative", { + get: $util.oneOfGetter($oneOfFields = ["kindNegative"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotFeedbackMessage.prototype, "_kindPositive", { + get: $util.oneOfGetter($oneOfFields = ["kindPositive"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotFeedbackMessage.prototype, "_kindReport", { + get: $util.oneOfGetter($oneOfFields = ["kindReport"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new BotFeedbackMessage instance using the specified properties. @@ -31104,6 +58120,8 @@ $root.proto = (function() { writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.kindNegative); if (message.kindPositive != null && Object.hasOwnProperty.call(message, "kindPositive")) writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.kindPositive); + if (message.kindReport != null && Object.hasOwnProperty.call(message, "kindReport")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.kindReport); return writer; }; @@ -31138,21 +58156,30 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.messageKey = $root.proto.MessageKey.decode(reader, reader.uint32()); - break; - case 2: - message.kind = reader.int32(); - break; - case 3: - message.text = reader.string(); - break; - case 4: - message.kindNegative = reader.uint64(); - break; - case 5: - message.kindPositive = reader.uint64(); - break; + case 1: { + message.messageKey = $root.proto.MessageKey.decode(reader, reader.uint32()); + break; + } + case 2: { + message.kind = reader.int32(); + break; + } + case 3: { + message.text = reader.string(); + break; + } + case 4: { + message.kindNegative = reader.uint64(); + break; + } + case 5: { + message.kindPositive = reader.uint64(); + break; + } + case 6: { + message.kindReport = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -31188,12 +58215,17 @@ $root.proto = (function() { BotFeedbackMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; if (message.messageKey != null && message.hasOwnProperty("messageKey")) { - var error = $root.proto.MessageKey.verify(message.messageKey); - if (error) - return "messageKey." + error; + properties._messageKey = 1; + { + var error = $root.proto.MessageKey.verify(message.messageKey); + if (error) + return "messageKey." + error; + } } - if (message.kind != null && message.hasOwnProperty("kind")) + if (message.kind != null && message.hasOwnProperty("kind")) { + properties._kind = 1; switch (message.kind) { default: return "kind: enum value expected"; @@ -31207,17 +58239,36 @@ $root.proto = (function() { case 7: case 8: case 9: + case 10: + case 11: + case 12: break; } - if (message.text != null && message.hasOwnProperty("text")) + } + if (message.text != null && message.hasOwnProperty("text")) { + properties._text = 1; if (!$util.isString(message.text)) return "text: string expected"; - if (message.kindNegative != null && message.hasOwnProperty("kindNegative")) + } + if (message.kindNegative != null && message.hasOwnProperty("kindNegative")) { + properties._kindNegative = 1; if (!$util.isInteger(message.kindNegative) && !(message.kindNegative && $util.isInteger(message.kindNegative.low) && $util.isInteger(message.kindNegative.high))) return "kindNegative: integer|Long expected"; - if (message.kindPositive != null && message.hasOwnProperty("kindPositive")) + } + if (message.kindPositive != null && message.hasOwnProperty("kindPositive")) { + properties._kindPositive = 1; if (!$util.isInteger(message.kindPositive) && !(message.kindPositive && $util.isInteger(message.kindPositive.low) && $util.isInteger(message.kindPositive.high))) return "kindPositive: integer|Long expected"; + } + if (message.kindReport != null && message.hasOwnProperty("kindReport")) { + properties._kindReport = 1; + switch (message.kindReport) { + default: + return "kindReport: enum value expected"; + case 0: + break; + } + } return null; }; @@ -31239,6 +58290,12 @@ $root.proto = (function() { message.messageKey = $root.proto.MessageKey.fromObject(object.messageKey); } switch (object.kind) { + default: + if (typeof object.kind === "number") { + message.kind = object.kind; + break; + } + break; case "BOT_FEEDBACK_POSITIVE": case 0: message.kind = 0; @@ -31279,6 +58336,18 @@ $root.proto = (function() { case 9: message.kind = 9; break; + case "BOT_FEEDBACK_NEGATIVE_PERSONALIZED": + case 10: + message.kind = 10; + break; + case "BOT_FEEDBACK_NEGATIVE_CLARITY": + case 11: + message.kind = 11; + break; + case "BOT_FEEDBACK_NEGATIVE_DOESNT_LOOK_LIKE_THE_PERSON": + case 12: + message.kind = 12; + break; } if (object.text != null) message.text = String(object.text); @@ -31300,6 +58369,18 @@ $root.proto = (function() { message.kindPositive = object.kindPositive; else if (typeof object.kindPositive === "object") message.kindPositive = new $util.LongBits(object.kindPositive.low >>> 0, object.kindPositive.high >>> 0).toNumber(true); + switch (object.kindReport) { + default: + if (typeof object.kindReport === "number") { + message.kindReport = object.kindReport; + break; + } + break; + case "GENERIC": + case 0: + message.kindReport = 0; + break; + } return message; }; @@ -31316,37 +58397,42 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.messageKey = null; - object.kind = options.enums === String ? "BOT_FEEDBACK_POSITIVE" : 0; - object.text = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.kindNegative = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.kindNegative = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.kindPositive = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.kindPositive = options.longs === String ? "0" : 0; - } - if (message.messageKey != null && message.hasOwnProperty("messageKey")) + if (message.messageKey != null && message.hasOwnProperty("messageKey")) { object.messageKey = $root.proto.MessageKey.toObject(message.messageKey, options); - if (message.kind != null && message.hasOwnProperty("kind")) - object.kind = options.enums === String ? $root.proto.Message.BotFeedbackMessage.BotFeedbackKind[message.kind] : message.kind; - if (message.text != null && message.hasOwnProperty("text")) + if (options.oneofs) + object._messageKey = "messageKey"; + } + if (message.kind != null && message.hasOwnProperty("kind")) { + object.kind = options.enums === String ? $root.proto.Message.BotFeedbackMessage.BotFeedbackKind[message.kind] === undefined ? message.kind : $root.proto.Message.BotFeedbackMessage.BotFeedbackKind[message.kind] : message.kind; + if (options.oneofs) + object._kind = "kind"; + } + if (message.text != null && message.hasOwnProperty("text")) { object.text = message.text; - if (message.kindNegative != null && message.hasOwnProperty("kindNegative")) + if (options.oneofs) + object._text = "text"; + } + if (message.kindNegative != null && message.hasOwnProperty("kindNegative")) { if (typeof message.kindNegative === "number") object.kindNegative = options.longs === String ? String(message.kindNegative) : message.kindNegative; else object.kindNegative = options.longs === String ? $util.Long.prototype.toString.call(message.kindNegative) : options.longs === Number ? new $util.LongBits(message.kindNegative.low >>> 0, message.kindNegative.high >>> 0).toNumber(true) : message.kindNegative; - if (message.kindPositive != null && message.hasOwnProperty("kindPositive")) + if (options.oneofs) + object._kindNegative = "kindNegative"; + } + if (message.kindPositive != null && message.hasOwnProperty("kindPositive")) { if (typeof message.kindPositive === "number") object.kindPositive = options.longs === String ? String(message.kindPositive) : message.kindPositive; else object.kindPositive = options.longs === String ? $util.Long.prototype.toString.call(message.kindPositive) : options.longs === Number ? new $util.LongBits(message.kindPositive.low >>> 0, message.kindPositive.high >>> 0).toNumber(true) : message.kindPositive; + if (options.oneofs) + object._kindPositive = "kindPositive"; + } + if (message.kindReport != null && message.hasOwnProperty("kindReport")) { + object.kindReport = options.enums === String ? $root.proto.Message.BotFeedbackMessage.ReportKind[message.kindReport] === undefined ? message.kindReport : $root.proto.Message.BotFeedbackMessage.ReportKind[message.kindReport] : message.kindReport; + if (options.oneofs) + object._kindReport = "kindReport"; + } return object; }; @@ -31361,6 +58447,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for BotFeedbackMessage + * @function getTypeUrl + * @memberof proto.Message.BotFeedbackMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BotFeedbackMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.BotFeedbackMessage"; + }; + /** * BotFeedbackKind enum. * @name proto.Message.BotFeedbackMessage.BotFeedbackKind @@ -31375,6 +58476,9 @@ $root.proto = (function() { * @property {number} BOT_FEEDBACK_NEGATIVE_REFUSED=7 BOT_FEEDBACK_NEGATIVE_REFUSED value * @property {number} BOT_FEEDBACK_NEGATIVE_NOT_VISUALLY_APPEALING=8 BOT_FEEDBACK_NEGATIVE_NOT_VISUALLY_APPEALING value * @property {number} BOT_FEEDBACK_NEGATIVE_NOT_RELEVANT_TO_TEXT=9 BOT_FEEDBACK_NEGATIVE_NOT_RELEVANT_TO_TEXT value + * @property {number} BOT_FEEDBACK_NEGATIVE_PERSONALIZED=10 BOT_FEEDBACK_NEGATIVE_PERSONALIZED value + * @property {number} BOT_FEEDBACK_NEGATIVE_CLARITY=11 BOT_FEEDBACK_NEGATIVE_CLARITY value + * @property {number} BOT_FEEDBACK_NEGATIVE_DOESNT_LOOK_LIKE_THE_PERSON=12 BOT_FEEDBACK_NEGATIVE_DOESNT_LOOK_LIKE_THE_PERSON value */ BotFeedbackMessage.BotFeedbackKind = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -31388,6 +58492,9 @@ $root.proto = (function() { values[valuesById[7] = "BOT_FEEDBACK_NEGATIVE_REFUSED"] = 7; values[valuesById[8] = "BOT_FEEDBACK_NEGATIVE_NOT_VISUALLY_APPEALING"] = 8; values[valuesById[9] = "BOT_FEEDBACK_NEGATIVE_NOT_RELEVANT_TO_TEXT"] = 9; + values[valuesById[10] = "BOT_FEEDBACK_NEGATIVE_PERSONALIZED"] = 10; + values[valuesById[11] = "BOT_FEEDBACK_NEGATIVE_CLARITY"] = 11; + values[valuesById[12] = "BOT_FEEDBACK_NEGATIVE_DOESNT_LOOK_LIKE_THE_PERSON"] = 12; return values; })(); @@ -31431,6 +58538,18 @@ $root.proto = (function() { return values; })(); + /** + * ReportKind enum. + * @name proto.Message.BotFeedbackMessage.ReportKind + * @enum {number} + * @property {number} GENERIC=0 GENERIC value + */ + BotFeedbackMessage.ReportKind = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "GENERIC"] = 0; + return values; + })(); + return BotFeedbackMessage; })(); @@ -31470,19 +58589,19 @@ $root.proto = (function() { /** * ButtonsMessage contentText. - * @member {string} contentText + * @member {string|null|undefined} contentText * @memberof proto.Message.ButtonsMessage * @instance */ - ButtonsMessage.prototype.contentText = ""; + ButtonsMessage.prototype.contentText = null; /** * ButtonsMessage footerText. - * @member {string} footerText + * @member {string|null|undefined} footerText * @memberof proto.Message.ButtonsMessage * @instance */ - ButtonsMessage.prototype.footerText = ""; + ButtonsMessage.prototype.footerText = null; /** * ButtonsMessage contextInfo. @@ -31502,11 +58621,11 @@ $root.proto = (function() { /** * ButtonsMessage headerType. - * @member {proto.Message.ButtonsMessage.HeaderType} headerType + * @member {proto.Message.ButtonsMessage.HeaderType|null|undefined} headerType * @memberof proto.Message.ButtonsMessage * @instance */ - ButtonsMessage.prototype.headerType = 0; + ButtonsMessage.prototype.headerType = null; /** * ButtonsMessage text. @@ -31551,6 +58670,30 @@ $root.proto = (function() { // OneOf field names bound to virtual getters and setters var $oneOfFields; + // Virtual OneOf for proto3 optional field + Object.defineProperty(ButtonsMessage.prototype, "_contentText", { + get: $util.oneOfGetter($oneOfFields = ["contentText"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ButtonsMessage.prototype, "_footerText", { + get: $util.oneOfGetter($oneOfFields = ["footerText"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ButtonsMessage.prototype, "_contextInfo", { + get: $util.oneOfGetter($oneOfFields = ["contextInfo"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ButtonsMessage.prototype, "_headerType", { + get: $util.oneOfGetter($oneOfFields = ["headerType"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * ButtonsMessage header. * @member {"text"|"documentMessage"|"imageMessage"|"videoMessage"|"locationMessage"|undefined} header @@ -31641,38 +58784,48 @@ $root.proto = (function() { 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; + 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; @@ -31709,16 +58862,23 @@ $root.proto = (function() { if (typeof message !== "object" || message === null) return "object expected"; var properties = {}; - if (message.contentText != null && message.hasOwnProperty("contentText")) + if (message.contentText != null && message.hasOwnProperty("contentText")) { + properties._contentText = 1; if (!$util.isString(message.contentText)) return "contentText: string expected"; - if (message.footerText != null && message.hasOwnProperty("footerText")) + } + if (message.footerText != null && message.hasOwnProperty("footerText")) { + properties._footerText = 1; 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; + properties._contextInfo = 1; + { + 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)) @@ -31729,7 +58889,8 @@ $root.proto = (function() { return "buttons." + error; } } - if (message.headerType != null && message.hasOwnProperty("headerType")) + if (message.headerType != null && message.hasOwnProperty("headerType")) { + properties._headerType = 1; switch (message.headerType) { default: return "headerType: enum value expected"; @@ -31742,6 +58903,7 @@ $root.proto = (function() { case 6: break; } + } if (message.text != null && message.hasOwnProperty("text")) { properties.header = 1; if (!$util.isString(message.text)) @@ -31822,6 +58984,12 @@ $root.proto = (function() { } } switch (object.headerType) { + default: + if (typeof object.headerType === "number") { + message.headerType = object.headerType; + break; + } + break; case "UNKNOWN": case 0: message.headerType = 0; @@ -31891,12 +59059,6 @@ $root.proto = (function() { 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) @@ -31922,19 +59084,31 @@ $root.proto = (function() { if (options.oneofs) object.header = "locationMessage"; } - if (message.contentText != null && message.hasOwnProperty("contentText")) + if (message.contentText != null && message.hasOwnProperty("contentText")) { object.contentText = message.contentText; - if (message.footerText != null && message.hasOwnProperty("footerText")) + if (options.oneofs) + object._contentText = "contentText"; + } + if (message.footerText != null && message.hasOwnProperty("footerText")) { object.footerText = message.footerText; - if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) + if (options.oneofs) + object._footerText = "footerText"; + } + if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) { object.contextInfo = $root.proto.ContextInfo.toObject(message.contextInfo, options); + if (options.oneofs) + object._contextInfo = "contextInfo"; + } 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; + if (message.headerType != null && message.hasOwnProperty("headerType")) { + object.headerType = options.enums === String ? $root.proto.Message.ButtonsMessage.HeaderType[message.headerType] === undefined ? message.headerType : $root.proto.Message.ButtonsMessage.HeaderType[message.headerType] : message.headerType; + if (options.oneofs) + object._headerType = "headerType"; + } return object; }; @@ -31949,6 +59123,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ButtonsMessage + * @function getTypeUrl + * @memberof proto.Message.ButtonsMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ButtonsMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.ButtonsMessage"; + }; + ButtonsMessage.Button = (function() { /** @@ -31978,11 +59167,11 @@ $root.proto = (function() { /** * Button buttonId. - * @member {string} buttonId + * @member {string|null|undefined} buttonId * @memberof proto.Message.ButtonsMessage.Button * @instance */ - Button.prototype.buttonId = ""; + Button.prototype.buttonId = null; /** * Button buttonText. @@ -31994,11 +59183,11 @@ $root.proto = (function() { /** * Button type. - * @member {proto.Message.ButtonsMessage.Button.Type} type + * @member {proto.Message.ButtonsMessage.Button.Type|null|undefined} type * @memberof proto.Message.ButtonsMessage.Button * @instance */ - Button.prototype.type = 0; + Button.prototype.type = null; /** * Button nativeFlowInfo. @@ -32008,6 +59197,33 @@ $root.proto = (function() { */ Button.prototype.nativeFlowInfo = null; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Button.prototype, "_buttonId", { + get: $util.oneOfGetter($oneOfFields = ["buttonId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Button.prototype, "_buttonText", { + get: $util.oneOfGetter($oneOfFields = ["buttonText"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Button.prototype, "_type", { + get: $util.oneOfGetter($oneOfFields = ["type"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Button.prototype, "_nativeFlowInfo", { + get: $util.oneOfGetter($oneOfFields = ["nativeFlowInfo"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new Button instance using the specified properties. * @function create @@ -32074,18 +59290,22 @@ $root.proto = (function() { 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; + 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; @@ -32121,15 +59341,22 @@ $root.proto = (function() { Button.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.buttonId != null && message.hasOwnProperty("buttonId")) + var properties = {}; + if (message.buttonId != null && message.hasOwnProperty("buttonId")) { + properties._buttonId = 1; 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")) + if (message.buttonText != null && message.hasOwnProperty("buttonText")) { + properties._buttonText = 1; + { + var error = $root.proto.Message.ButtonsMessage.Button.ButtonText.verify(message.buttonText); + if (error) + return "buttonText." + error; + } + } + if (message.type != null && message.hasOwnProperty("type")) { + properties._type = 1; switch (message.type) { default: return "type: enum value expected"; @@ -32138,10 +59365,14 @@ $root.proto = (function() { 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; + properties._nativeFlowInfo = 1; + { + var error = $root.proto.Message.ButtonsMessage.Button.NativeFlowInfo.verify(message.nativeFlowInfo); + if (error) + return "nativeFlowInfo." + error; + } } return null; }; @@ -32166,6 +59397,12 @@ $root.proto = (function() { message.buttonText = $root.proto.Message.ButtonsMessage.Button.ButtonText.fromObject(object.buttonText); } switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; case "UNKNOWN": case 0: message.type = 0; @@ -32200,20 +59437,26 @@ $root.proto = (function() { 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")) + if (message.buttonId != null && message.hasOwnProperty("buttonId")) { object.buttonId = message.buttonId; - if (message.buttonText != null && message.hasOwnProperty("buttonText")) + if (options.oneofs) + object._buttonId = "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")) + if (options.oneofs) + object._buttonText = "buttonText"; + } + if (message.type != null && message.hasOwnProperty("type")) { + object.type = options.enums === String ? $root.proto.Message.ButtonsMessage.Button.Type[message.type] === undefined ? message.type : $root.proto.Message.ButtonsMessage.Button.Type[message.type] : message.type; + if (options.oneofs) + object._type = "type"; + } + if (message.nativeFlowInfo != null && message.hasOwnProperty("nativeFlowInfo")) { object.nativeFlowInfo = $root.proto.Message.ButtonsMessage.Button.NativeFlowInfo.toObject(message.nativeFlowInfo, options); + if (options.oneofs) + object._nativeFlowInfo = "nativeFlowInfo"; + } return object; }; @@ -32228,6 +59471,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Button + * @function getTypeUrl + * @memberof proto.Message.ButtonsMessage.Button + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Button.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.ButtonsMessage.Button"; + }; + Button.ButtonText = (function() { /** @@ -32254,11 +59512,20 @@ $root.proto = (function() { /** * ButtonText displayText. - * @member {string} displayText + * @member {string|null|undefined} displayText * @memberof proto.Message.ButtonsMessage.Button.ButtonText * @instance */ - ButtonText.prototype.displayText = ""; + ButtonText.prototype.displayText = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ButtonText.prototype, "_displayText", { + get: $util.oneOfGetter($oneOfFields = ["displayText"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new ButtonText instance using the specified properties. @@ -32320,9 +59587,10 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.displayText = reader.string(); - break; + case 1: { + message.displayText = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -32358,9 +59626,12 @@ $root.proto = (function() { ButtonText.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.displayText != null && message.hasOwnProperty("displayText")) + var properties = {}; + if (message.displayText != null && message.hasOwnProperty("displayText")) { + properties._displayText = 1; if (!$util.isString(message.displayText)) return "displayText: string expected"; + } return null; }; @@ -32394,10 +59665,11 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) - object.displayText = ""; - if (message.displayText != null && message.hasOwnProperty("displayText")) + if (message.displayText != null && message.hasOwnProperty("displayText")) { object.displayText = message.displayText; + if (options.oneofs) + object._displayText = "displayText"; + } return object; }; @@ -32412,6 +59684,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ButtonText + * @function getTypeUrl + * @memberof proto.Message.ButtonsMessage.Button.ButtonText + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ButtonText.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.ButtonsMessage.Button.ButtonText"; + }; + return ButtonText; })(); @@ -32442,19 +59729,34 @@ $root.proto = (function() { /** * NativeFlowInfo name. - * @member {string} name + * @member {string|null|undefined} name * @memberof proto.Message.ButtonsMessage.Button.NativeFlowInfo * @instance */ - NativeFlowInfo.prototype.name = ""; + NativeFlowInfo.prototype.name = null; /** * NativeFlowInfo paramsJson. - * @member {string} paramsJson + * @member {string|null|undefined} paramsJson * @memberof proto.Message.ButtonsMessage.Button.NativeFlowInfo * @instance */ - NativeFlowInfo.prototype.paramsJson = ""; + NativeFlowInfo.prototype.paramsJson = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(NativeFlowInfo.prototype, "_name", { + get: $util.oneOfGetter($oneOfFields = ["name"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(NativeFlowInfo.prototype, "_paramsJson", { + get: $util.oneOfGetter($oneOfFields = ["paramsJson"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new NativeFlowInfo instance using the specified properties. @@ -32518,12 +59820,14 @@ $root.proto = (function() { 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 1: { + message.name = reader.string(); + break; + } + case 2: { + message.paramsJson = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -32559,12 +59863,17 @@ $root.proto = (function() { NativeFlowInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) { + properties._name = 1; if (!$util.isString(message.name)) return "name: string expected"; - if (message.paramsJson != null && message.hasOwnProperty("paramsJson")) + } + if (message.paramsJson != null && message.hasOwnProperty("paramsJson")) { + properties._paramsJson = 1; if (!$util.isString(message.paramsJson)) return "paramsJson: string expected"; + } return null; }; @@ -32600,14 +59909,16 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.name = ""; - object.paramsJson = ""; - } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && message.hasOwnProperty("name")) { object.name = message.name; - if (message.paramsJson != null && message.hasOwnProperty("paramsJson")) + if (options.oneofs) + object._name = "name"; + } + if (message.paramsJson != null && message.hasOwnProperty("paramsJson")) { object.paramsJson = message.paramsJson; + if (options.oneofs) + object._paramsJson = "paramsJson"; + } return object; }; @@ -32622,6 +59933,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for NativeFlowInfo + * @function getTypeUrl + * @memberof proto.Message.ButtonsMessage.Button.NativeFlowInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NativeFlowInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.ButtonsMessage.Button.NativeFlowInfo"; + }; + return NativeFlowInfo; })(); @@ -32700,11 +60026,11 @@ $root.proto = (function() { /** * ButtonsResponseMessage selectedButtonId. - * @member {string} selectedButtonId + * @member {string|null|undefined} selectedButtonId * @memberof proto.Message.ButtonsResponseMessage * @instance */ - ButtonsResponseMessage.prototype.selectedButtonId = ""; + ButtonsResponseMessage.prototype.selectedButtonId = null; /** * ButtonsResponseMessage contextInfo. @@ -32716,11 +60042,11 @@ $root.proto = (function() { /** * ButtonsResponseMessage type. - * @member {proto.Message.ButtonsResponseMessage.Type} type + * @member {proto.Message.ButtonsResponseMessage.Type|null|undefined} type * @memberof proto.Message.ButtonsResponseMessage * @instance */ - ButtonsResponseMessage.prototype.type = 0; + ButtonsResponseMessage.prototype.type = null; /** * ButtonsResponseMessage selectedDisplayText. @@ -32733,6 +60059,24 @@ $root.proto = (function() { // OneOf field names bound to virtual getters and setters var $oneOfFields; + // Virtual OneOf for proto3 optional field + Object.defineProperty(ButtonsResponseMessage.prototype, "_selectedButtonId", { + get: $util.oneOfGetter($oneOfFields = ["selectedButtonId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ButtonsResponseMessage.prototype, "_contextInfo", { + get: $util.oneOfGetter($oneOfFields = ["contextInfo"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ButtonsResponseMessage.prototype, "_type", { + get: $util.oneOfGetter($oneOfFields = ["type"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * ButtonsResponseMessage response. * @member {"selectedDisplayText"|undefined} response @@ -32810,18 +60154,22 @@ $root.proto = (function() { 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; + 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; @@ -32858,15 +60206,21 @@ $root.proto = (function() { if (typeof message !== "object" || message === null) return "object expected"; var properties = {}; - if (message.selectedButtonId != null && message.hasOwnProperty("selectedButtonId")) + if (message.selectedButtonId != null && message.hasOwnProperty("selectedButtonId")) { + properties._selectedButtonId = 1; 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")) + if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) { + properties._contextInfo = 1; + { + var error = $root.proto.ContextInfo.verify(message.contextInfo); + if (error) + return "contextInfo." + error; + } + } + if (message.type != null && message.hasOwnProperty("type")) { + properties._type = 1; switch (message.type) { default: return "type: enum value expected"; @@ -32874,6 +60228,7 @@ $root.proto = (function() { case 1: break; } + } if (message.selectedDisplayText != null && message.hasOwnProperty("selectedDisplayText")) { properties.response = 1; if (!$util.isString(message.selectedDisplayText)) @@ -32902,6 +60257,12 @@ $root.proto = (function() { message.contextInfo = $root.proto.ContextInfo.fromObject(object.contextInfo); } switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; case "UNKNOWN": case 0: message.type = 0; @@ -32929,22 +60290,26 @@ $root.proto = (function() { 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")) + if (message.selectedButtonId != null && message.hasOwnProperty("selectedButtonId")) { object.selectedButtonId = message.selectedButtonId; + if (options.oneofs) + object._selectedButtonId = "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")) + 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; + if (options.oneofs) + object._contextInfo = "contextInfo"; + } + if (message.type != null && message.hasOwnProperty("type")) { + object.type = options.enums === String ? $root.proto.Message.ButtonsResponseMessage.Type[message.type] === undefined ? message.type : $root.proto.Message.ButtonsResponseMessage.Type[message.type] : message.type; + if (options.oneofs) + object._type = "type"; + } return object; }; @@ -32959,6 +60324,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ButtonsResponseMessage + * @function getTypeUrl + * @memberof proto.Message.ButtonsResponseMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ButtonsResponseMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.ButtonsResponseMessage"; + }; + /** * Type enum. * @name proto.Message.ButtonsResponseMessage.Type @@ -32986,6 +60366,8 @@ $root.proto = (function() { * @property {string|null} [conversionSource] Call conversionSource * @property {Uint8Array|null} [conversionData] Call conversionData * @property {number|null} [conversionDelaySeconds] Call conversionDelaySeconds + * @property {string|null} [ctwaSignals] Call ctwaSignals + * @property {Uint8Array|null} [ctwaPayload] Call ctwaPayload */ /** @@ -33005,35 +60387,90 @@ $root.proto = (function() { /** * Call callKey. - * @member {Uint8Array} callKey + * @member {Uint8Array|null|undefined} callKey * @memberof proto.Message.Call * @instance */ - Call.prototype.callKey = $util.newBuffer([]); + Call.prototype.callKey = null; /** * Call conversionSource. - * @member {string} conversionSource + * @member {string|null|undefined} conversionSource * @memberof proto.Message.Call * @instance */ - Call.prototype.conversionSource = ""; + Call.prototype.conversionSource = null; /** * Call conversionData. - * @member {Uint8Array} conversionData + * @member {Uint8Array|null|undefined} conversionData * @memberof proto.Message.Call * @instance */ - Call.prototype.conversionData = $util.newBuffer([]); + Call.prototype.conversionData = null; /** * Call conversionDelaySeconds. - * @member {number} conversionDelaySeconds + * @member {number|null|undefined} conversionDelaySeconds * @memberof proto.Message.Call * @instance */ - Call.prototype.conversionDelaySeconds = 0; + Call.prototype.conversionDelaySeconds = null; + + /** + * Call ctwaSignals. + * @member {string|null|undefined} ctwaSignals + * @memberof proto.Message.Call + * @instance + */ + Call.prototype.ctwaSignals = null; + + /** + * Call ctwaPayload. + * @member {Uint8Array|null|undefined} ctwaPayload + * @memberof proto.Message.Call + * @instance + */ + Call.prototype.ctwaPayload = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Call.prototype, "_callKey", { + get: $util.oneOfGetter($oneOfFields = ["callKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Call.prototype, "_conversionSource", { + get: $util.oneOfGetter($oneOfFields = ["conversionSource"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Call.prototype, "_conversionData", { + get: $util.oneOfGetter($oneOfFields = ["conversionData"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Call.prototype, "_conversionDelaySeconds", { + get: $util.oneOfGetter($oneOfFields = ["conversionDelaySeconds"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Call.prototype, "_ctwaSignals", { + get: $util.oneOfGetter($oneOfFields = ["ctwaSignals"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Call.prototype, "_ctwaPayload", { + get: $util.oneOfGetter($oneOfFields = ["ctwaPayload"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new Call instance using the specified properties. @@ -33067,6 +60504,10 @@ $root.proto = (function() { 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); + if (message.ctwaSignals != null && Object.hasOwnProperty.call(message, "ctwaSignals")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.ctwaSignals); + if (message.ctwaPayload != null && Object.hasOwnProperty.call(message, "ctwaPayload")) + writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.ctwaPayload); return writer; }; @@ -33101,18 +60542,30 @@ $root.proto = (function() { 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; + 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; + } + case 5: { + message.ctwaSignals = reader.string(); + break; + } + case 6: { + message.ctwaPayload = reader.bytes(); + break; + } default: reader.skipType(tag & 7); break; @@ -33148,18 +60601,37 @@ $root.proto = (function() { Call.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.callKey != null && message.hasOwnProperty("callKey")) + var properties = {}; + if (message.callKey != null && message.hasOwnProperty("callKey")) { + properties._callKey = 1; if (!(message.callKey && typeof message.callKey.length === "number" || $util.isString(message.callKey))) return "callKey: buffer expected"; - if (message.conversionSource != null && message.hasOwnProperty("conversionSource")) + } + if (message.conversionSource != null && message.hasOwnProperty("conversionSource")) { + properties._conversionSource = 1; if (!$util.isString(message.conversionSource)) return "conversionSource: string expected"; - if (message.conversionData != null && message.hasOwnProperty("conversionData")) + } + if (message.conversionData != null && message.hasOwnProperty("conversionData")) { + properties._conversionData = 1; if (!(message.conversionData && typeof message.conversionData.length === "number" || $util.isString(message.conversionData))) return "conversionData: buffer expected"; - if (message.conversionDelaySeconds != null && message.hasOwnProperty("conversionDelaySeconds")) + } + if (message.conversionDelaySeconds != null && message.hasOwnProperty("conversionDelaySeconds")) { + properties._conversionDelaySeconds = 1; if (!$util.isInteger(message.conversionDelaySeconds)) return "conversionDelaySeconds: integer expected"; + } + if (message.ctwaSignals != null && message.hasOwnProperty("ctwaSignals")) { + properties._ctwaSignals = 1; + if (!$util.isString(message.ctwaSignals)) + return "ctwaSignals: string expected"; + } + if (message.ctwaPayload != null && message.hasOwnProperty("ctwaPayload")) { + properties._ctwaPayload = 1; + if (!(message.ctwaPayload && typeof message.ctwaPayload.length === "number" || $util.isString(message.ctwaPayload))) + return "ctwaPayload: buffer expected"; + } return null; }; @@ -33178,17 +60650,24 @@ $root.proto = (function() { 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) + else if (object.callKey.length >= 0) 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) + else if (object.conversionData.length >= 0) message.conversionData = object.conversionData; if (object.conversionDelaySeconds != null) message.conversionDelaySeconds = object.conversionDelaySeconds >>> 0; + if (object.ctwaSignals != null) + message.ctwaSignals = String(object.ctwaSignals); + if (object.ctwaPayload != null) + if (typeof object.ctwaPayload === "string") + $util.base64.decode(object.ctwaPayload, message.ctwaPayload = $util.newBuffer($util.base64.length(object.ctwaPayload)), 0); + else if (object.ctwaPayload.length >= 0) + message.ctwaPayload = object.ctwaPayload; return message; }; @@ -33205,32 +60684,36 @@ $root.proto = (function() { 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")) + 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")) + if (options.oneofs) + object._callKey = "callKey"; + } + if (message.conversionSource != null && message.hasOwnProperty("conversionSource")) { object.conversionSource = message.conversionSource; - if (message.conversionData != null && message.hasOwnProperty("conversionData")) + if (options.oneofs) + object._conversionSource = "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")) + if (options.oneofs) + object._conversionData = "conversionData"; + } + if (message.conversionDelaySeconds != null && message.hasOwnProperty("conversionDelaySeconds")) { object.conversionDelaySeconds = message.conversionDelaySeconds; + if (options.oneofs) + object._conversionDelaySeconds = "conversionDelaySeconds"; + } + if (message.ctwaSignals != null && message.hasOwnProperty("ctwaSignals")) { + object.ctwaSignals = message.ctwaSignals; + if (options.oneofs) + object._ctwaSignals = "ctwaSignals"; + } + if (message.ctwaPayload != null && message.hasOwnProperty("ctwaPayload")) { + object.ctwaPayload = options.bytes === String ? $util.base64.encode(message.ctwaPayload, 0, message.ctwaPayload.length) : options.bytes === Array ? Array.prototype.slice.call(message.ctwaPayload) : message.ctwaPayload; + if (options.oneofs) + object._ctwaPayload = "ctwaPayload"; + } return object; }; @@ -33245,6 +60728,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Call + * @function getTypeUrl + * @memberof proto.Message.Call + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Call.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.Call"; + }; + return Call; })(); @@ -33279,35 +60777,35 @@ $root.proto = (function() { /** * CallLogMessage isVideo. - * @member {boolean} isVideo + * @member {boolean|null|undefined} isVideo * @memberof proto.Message.CallLogMessage * @instance */ - CallLogMessage.prototype.isVideo = false; + CallLogMessage.prototype.isVideo = null; /** * CallLogMessage callOutcome. - * @member {proto.Message.CallLogMessage.CallOutcome} callOutcome + * @member {proto.Message.CallLogMessage.CallOutcome|null|undefined} callOutcome * @memberof proto.Message.CallLogMessage * @instance */ - CallLogMessage.prototype.callOutcome = 0; + CallLogMessage.prototype.callOutcome = null; /** * CallLogMessage durationSecs. - * @member {number|Long} durationSecs + * @member {number|Long|null|undefined} durationSecs * @memberof proto.Message.CallLogMessage * @instance */ - CallLogMessage.prototype.durationSecs = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CallLogMessage.prototype.durationSecs = null; /** * CallLogMessage callType. - * @member {proto.Message.CallLogMessage.CallType} callType + * @member {proto.Message.CallLogMessage.CallType|null|undefined} callType * @memberof proto.Message.CallLogMessage * @instance */ - CallLogMessage.prototype.callType = 0; + CallLogMessage.prototype.callType = null; /** * CallLogMessage participants. @@ -33317,6 +60815,33 @@ $root.proto = (function() { */ CallLogMessage.prototype.participants = $util.emptyArray; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CallLogMessage.prototype, "_isVideo", { + get: $util.oneOfGetter($oneOfFields = ["isVideo"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CallLogMessage.prototype, "_callOutcome", { + get: $util.oneOfGetter($oneOfFields = ["callOutcome"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CallLogMessage.prototype, "_durationSecs", { + get: $util.oneOfGetter($oneOfFields = ["durationSecs"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CallLogMessage.prototype, "_callType", { + get: $util.oneOfGetter($oneOfFields = ["callType"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new CallLogMessage instance using the specified properties. * @function create @@ -33386,23 +60911,28 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.isVideo = reader.bool(); - break; - case 2: - message.callOutcome = reader.int32(); - break; - case 3: - message.durationSecs = reader.int64(); - break; - case 4: - message.callType = reader.int32(); - break; - case 5: - if (!(message.participants && message.participants.length)) - message.participants = []; - message.participants.push($root.proto.Message.CallLogMessage.CallParticipant.decode(reader, reader.uint32())); - break; + case 1: { + message.isVideo = reader.bool(); + break; + } + case 2: { + message.callOutcome = reader.int32(); + break; + } + case 3: { + message.durationSecs = reader.int64(); + break; + } + case 4: { + message.callType = reader.int32(); + break; + } + case 5: { + if (!(message.participants && message.participants.length)) + message.participants = []; + message.participants.push($root.proto.Message.CallLogMessage.CallParticipant.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -33438,10 +60968,14 @@ $root.proto = (function() { CallLogMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.isVideo != null && message.hasOwnProperty("isVideo")) + var properties = {}; + if (message.isVideo != null && message.hasOwnProperty("isVideo")) { + properties._isVideo = 1; if (typeof message.isVideo !== "boolean") return "isVideo: boolean expected"; - if (message.callOutcome != null && message.hasOwnProperty("callOutcome")) + } + if (message.callOutcome != null && message.hasOwnProperty("callOutcome")) { + properties._callOutcome = 1; switch (message.callOutcome) { default: return "callOutcome: enum value expected"; @@ -33455,10 +60989,14 @@ $root.proto = (function() { case 7: break; } - if (message.durationSecs != null && message.hasOwnProperty("durationSecs")) + } + if (message.durationSecs != null && message.hasOwnProperty("durationSecs")) { + properties._durationSecs = 1; if (!$util.isInteger(message.durationSecs) && !(message.durationSecs && $util.isInteger(message.durationSecs.low) && $util.isInteger(message.durationSecs.high))) return "durationSecs: integer|Long expected"; - if (message.callType != null && message.hasOwnProperty("callType")) + } + if (message.callType != null && message.hasOwnProperty("callType")) { + properties._callType = 1; switch (message.callType) { default: return "callType: enum value expected"; @@ -33467,6 +61005,7 @@ $root.proto = (function() { case 2: break; } + } if (message.participants != null && message.hasOwnProperty("participants")) { if (!Array.isArray(message.participants)) return "participants: array expected"; @@ -33494,6 +61033,12 @@ $root.proto = (function() { if (object.isVideo != null) message.isVideo = Boolean(object.isVideo); switch (object.callOutcome) { + default: + if (typeof object.callOutcome === "number") { + message.callOutcome = object.callOutcome; + break; + } + break; case "CONNECTED": case 0: message.callOutcome = 0; @@ -33537,6 +61082,12 @@ $root.proto = (function() { else if (typeof object.durationSecs === "object") message.durationSecs = new $util.LongBits(object.durationSecs.low >>> 0, object.durationSecs.high >>> 0).toNumber(); switch (object.callType) { + default: + if (typeof object.callType === "number") { + message.callType = object.callType; + break; + } + break; case "REGULAR": case 0: message.callType = 0; @@ -33578,27 +61129,29 @@ $root.proto = (function() { var object = {}; if (options.arrays || options.defaults) object.participants = []; - if (options.defaults) { - object.isVideo = false; - object.callOutcome = options.enums === String ? "CONNECTED" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.durationSecs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.durationSecs = options.longs === String ? "0" : 0; - object.callType = options.enums === String ? "REGULAR" : 0; - } - if (message.isVideo != null && message.hasOwnProperty("isVideo")) + if (message.isVideo != null && message.hasOwnProperty("isVideo")) { object.isVideo = message.isVideo; - if (message.callOutcome != null && message.hasOwnProperty("callOutcome")) - object.callOutcome = options.enums === String ? $root.proto.Message.CallLogMessage.CallOutcome[message.callOutcome] : message.callOutcome; - if (message.durationSecs != null && message.hasOwnProperty("durationSecs")) + if (options.oneofs) + object._isVideo = "isVideo"; + } + if (message.callOutcome != null && message.hasOwnProperty("callOutcome")) { + object.callOutcome = options.enums === String ? $root.proto.Message.CallLogMessage.CallOutcome[message.callOutcome] === undefined ? message.callOutcome : $root.proto.Message.CallLogMessage.CallOutcome[message.callOutcome] : message.callOutcome; + if (options.oneofs) + object._callOutcome = "callOutcome"; + } + if (message.durationSecs != null && message.hasOwnProperty("durationSecs")) { if (typeof message.durationSecs === "number") object.durationSecs = options.longs === String ? String(message.durationSecs) : message.durationSecs; else object.durationSecs = options.longs === String ? $util.Long.prototype.toString.call(message.durationSecs) : options.longs === Number ? new $util.LongBits(message.durationSecs.low >>> 0, message.durationSecs.high >>> 0).toNumber() : message.durationSecs; - if (message.callType != null && message.hasOwnProperty("callType")) - object.callType = options.enums === String ? $root.proto.Message.CallLogMessage.CallType[message.callType] : message.callType; + if (options.oneofs) + object._durationSecs = "durationSecs"; + } + if (message.callType != null && message.hasOwnProperty("callType")) { + object.callType = options.enums === String ? $root.proto.Message.CallLogMessage.CallType[message.callType] === undefined ? message.callType : $root.proto.Message.CallLogMessage.CallType[message.callType] : message.callType; + if (options.oneofs) + object._callType = "callType"; + } if (message.participants && message.participants.length) { object.participants = []; for (var j = 0; j < message.participants.length; ++j) @@ -33618,6 +61171,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CallLogMessage + * @function getTypeUrl + * @memberof proto.Message.CallLogMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CallLogMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.CallLogMessage"; + }; + /** * CallOutcome enum. * @name proto.Message.CallLogMessage.CallOutcome @@ -33671,19 +61239,34 @@ $root.proto = (function() { /** * CallParticipant jid. - * @member {string} jid + * @member {string|null|undefined} jid * @memberof proto.Message.CallLogMessage.CallParticipant * @instance */ - CallParticipant.prototype.jid = ""; + CallParticipant.prototype.jid = null; /** * CallParticipant callOutcome. - * @member {proto.Message.CallLogMessage.CallOutcome} callOutcome + * @member {proto.Message.CallLogMessage.CallOutcome|null|undefined} callOutcome * @memberof proto.Message.CallLogMessage.CallParticipant * @instance */ - CallParticipant.prototype.callOutcome = 0; + CallParticipant.prototype.callOutcome = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CallParticipant.prototype, "_jid", { + get: $util.oneOfGetter($oneOfFields = ["jid"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CallParticipant.prototype, "_callOutcome", { + get: $util.oneOfGetter($oneOfFields = ["callOutcome"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new CallParticipant instance using the specified properties. @@ -33747,12 +61330,14 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.jid = reader.string(); - break; - case 2: - message.callOutcome = reader.int32(); - break; + case 1: { + message.jid = reader.string(); + break; + } + case 2: { + message.callOutcome = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -33788,10 +61373,14 @@ $root.proto = (function() { CallParticipant.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.jid != null && message.hasOwnProperty("jid")) + var properties = {}; + if (message.jid != null && message.hasOwnProperty("jid")) { + properties._jid = 1; if (!$util.isString(message.jid)) return "jid: string expected"; - if (message.callOutcome != null && message.hasOwnProperty("callOutcome")) + } + if (message.callOutcome != null && message.hasOwnProperty("callOutcome")) { + properties._callOutcome = 1; switch (message.callOutcome) { default: return "callOutcome: enum value expected"; @@ -33805,6 +61394,7 @@ $root.proto = (function() { case 7: break; } + } return null; }; @@ -33823,6 +61413,12 @@ $root.proto = (function() { if (object.jid != null) message.jid = String(object.jid); switch (object.callOutcome) { + default: + if (typeof object.callOutcome === "number") { + message.callOutcome = object.callOutcome; + break; + } + break; case "CONNECTED": case 0: message.callOutcome = 0; @@ -33872,14 +61468,16 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.jid = ""; - object.callOutcome = options.enums === String ? "CONNECTED" : 0; - } - if (message.jid != null && message.hasOwnProperty("jid")) + if (message.jid != null && message.hasOwnProperty("jid")) { object.jid = message.jid; - if (message.callOutcome != null && message.hasOwnProperty("callOutcome")) - object.callOutcome = options.enums === String ? $root.proto.Message.CallLogMessage.CallOutcome[message.callOutcome] : message.callOutcome; + if (options.oneofs) + object._jid = "jid"; + } + if (message.callOutcome != null && message.hasOwnProperty("callOutcome")) { + object.callOutcome = options.enums === String ? $root.proto.Message.CallLogMessage.CallOutcome[message.callOutcome] === undefined ? message.callOutcome : $root.proto.Message.CallLogMessage.CallOutcome[message.callOutcome] : message.callOutcome; + if (options.oneofs) + object._callOutcome = "callOutcome"; + } return object; }; @@ -33894,6 +61492,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CallParticipant + * @function getTypeUrl + * @memberof proto.Message.CallLogMessage.CallParticipant + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CallParticipant.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.CallLogMessage.CallParticipant"; + }; + return CallParticipant; })(); @@ -33948,6 +61561,15 @@ $root.proto = (function() { */ CancelPaymentRequestMessage.prototype.key = null; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CancelPaymentRequestMessage.prototype, "_key", { + get: $util.oneOfGetter($oneOfFields = ["key"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new CancelPaymentRequestMessage instance using the specified properties. * @function create @@ -34008,9 +61630,10 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.key = $root.proto.MessageKey.decode(reader, reader.uint32()); - break; + case 1: { + message.key = $root.proto.MessageKey.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -34046,10 +61669,14 @@ $root.proto = (function() { CancelPaymentRequestMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; if (message.key != null && message.hasOwnProperty("key")) { - var error = $root.proto.MessageKey.verify(message.key); - if (error) - return "key." + error; + properties._key = 1; + { + var error = $root.proto.MessageKey.verify(message.key); + if (error) + return "key." + error; + } } return null; }; @@ -34087,10 +61714,11 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) - object.key = null; - if (message.key != null && message.hasOwnProperty("key")) + if (message.key != null && message.hasOwnProperty("key")) { object.key = $root.proto.MessageKey.toObject(message.key, options); + if (options.oneofs) + object._key = "key"; + } return object; }; @@ -34105,6 +61733,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CancelPaymentRequestMessage + * @function getTypeUrl + * @memberof proto.Message.CancelPaymentRequestMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CancelPaymentRequestMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.CancelPaymentRequestMessage"; + }; + return CancelPaymentRequestMessage; })(); @@ -34135,19 +61778,34 @@ $root.proto = (function() { /** * Chat displayName. - * @member {string} displayName + * @member {string|null|undefined} displayName * @memberof proto.Message.Chat * @instance */ - Chat.prototype.displayName = ""; + Chat.prototype.displayName = null; /** * Chat id. - * @member {string} id + * @member {string|null|undefined} id * @memberof proto.Message.Chat * @instance */ - Chat.prototype.id = ""; + Chat.prototype.id = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Chat.prototype, "_displayName", { + get: $util.oneOfGetter($oneOfFields = ["displayName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Chat.prototype, "_id", { + get: $util.oneOfGetter($oneOfFields = ["id"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new Chat instance using the specified properties. @@ -34211,12 +61869,14 @@ $root.proto = (function() { 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; + case 1: { + message.displayName = reader.string(); + break; + } + case 2: { + message.id = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -34252,12 +61912,17 @@ $root.proto = (function() { Chat.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) + var properties = {}; + if (message.displayName != null && message.hasOwnProperty("displayName")) { + properties._displayName = 1; if (!$util.isString(message.displayName)) return "displayName: string expected"; - if (message.id != null && message.hasOwnProperty("id")) + } + if (message.id != null && message.hasOwnProperty("id")) { + properties._id = 1; if (!$util.isString(message.id)) return "id: string expected"; + } return null; }; @@ -34293,14 +61958,16 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.displayName = ""; - object.id = ""; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) + if (message.displayName != null && message.hasOwnProperty("displayName")) { object.displayName = message.displayName; - if (message.id != null && message.hasOwnProperty("id")) + if (options.oneofs) + object._displayName = "displayName"; + } + if (message.id != null && message.hasOwnProperty("id")) { object.id = message.id; + if (options.oneofs) + object._id = "id"; + } return object; }; @@ -34315,9 +61982,389 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Chat + * @function getTypeUrl + * @memberof proto.Message.Chat + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Chat.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.Chat"; + }; + return Chat; })(); + Message.CloudAPIThreadControlNotification = (function() { + + /** + * Properties of a CloudAPIThreadControlNotification. + * @memberof proto.Message + * @interface ICloudAPIThreadControlNotification + * @property {proto.Message.CloudAPIThreadControlNotification.CloudAPIThreadControl|null} [status] CloudAPIThreadControlNotification status + * @property {number|Long|null} [senderNotificationTimestampMs] CloudAPIThreadControlNotification senderNotificationTimestampMs + * @property {string|null} [consumerLid] CloudAPIThreadControlNotification consumerLid + * @property {string|null} [consumerPhoneNumber] CloudAPIThreadControlNotification consumerPhoneNumber + */ + + /** + * Constructs a new CloudAPIThreadControlNotification. + * @memberof proto.Message + * @classdesc Represents a CloudAPIThreadControlNotification. + * @implements ICloudAPIThreadControlNotification + * @constructor + * @param {proto.Message.ICloudAPIThreadControlNotification=} [properties] Properties to set + */ + function CloudAPIThreadControlNotification(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CloudAPIThreadControlNotification status. + * @member {proto.Message.CloudAPIThreadControlNotification.CloudAPIThreadControl|null|undefined} status + * @memberof proto.Message.CloudAPIThreadControlNotification + * @instance + */ + CloudAPIThreadControlNotification.prototype.status = null; + + /** + * CloudAPIThreadControlNotification senderNotificationTimestampMs. + * @member {number|Long|null|undefined} senderNotificationTimestampMs + * @memberof proto.Message.CloudAPIThreadControlNotification + * @instance + */ + CloudAPIThreadControlNotification.prototype.senderNotificationTimestampMs = null; + + /** + * CloudAPIThreadControlNotification consumerLid. + * @member {string|null|undefined} consumerLid + * @memberof proto.Message.CloudAPIThreadControlNotification + * @instance + */ + CloudAPIThreadControlNotification.prototype.consumerLid = null; + + /** + * CloudAPIThreadControlNotification consumerPhoneNumber. + * @member {string|null|undefined} consumerPhoneNumber + * @memberof proto.Message.CloudAPIThreadControlNotification + * @instance + */ + CloudAPIThreadControlNotification.prototype.consumerPhoneNumber = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CloudAPIThreadControlNotification.prototype, "_status", { + get: $util.oneOfGetter($oneOfFields = ["status"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CloudAPIThreadControlNotification.prototype, "_senderNotificationTimestampMs", { + get: $util.oneOfGetter($oneOfFields = ["senderNotificationTimestampMs"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CloudAPIThreadControlNotification.prototype, "_consumerLid", { + get: $util.oneOfGetter($oneOfFields = ["consumerLid"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CloudAPIThreadControlNotification.prototype, "_consumerPhoneNumber", { + get: $util.oneOfGetter($oneOfFields = ["consumerPhoneNumber"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new CloudAPIThreadControlNotification instance using the specified properties. + * @function create + * @memberof proto.Message.CloudAPIThreadControlNotification + * @static + * @param {proto.Message.ICloudAPIThreadControlNotification=} [properties] Properties to set + * @returns {proto.Message.CloudAPIThreadControlNotification} CloudAPIThreadControlNotification instance + */ + CloudAPIThreadControlNotification.create = function create(properties) { + return new CloudAPIThreadControlNotification(properties); + }; + + /** + * Encodes the specified CloudAPIThreadControlNotification message. Does not implicitly {@link proto.Message.CloudAPIThreadControlNotification.verify|verify} messages. + * @function encode + * @memberof proto.Message.CloudAPIThreadControlNotification + * @static + * @param {proto.Message.ICloudAPIThreadControlNotification} message CloudAPIThreadControlNotification message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudAPIThreadControlNotification.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.status); + if (message.senderNotificationTimestampMs != null && Object.hasOwnProperty.call(message, "senderNotificationTimestampMs")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.senderNotificationTimestampMs); + if (message.consumerLid != null && Object.hasOwnProperty.call(message, "consumerLid")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.consumerLid); + if (message.consumerPhoneNumber != null && Object.hasOwnProperty.call(message, "consumerPhoneNumber")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.consumerPhoneNumber); + return writer; + }; + + /** + * Encodes the specified CloudAPIThreadControlNotification message, length delimited. Does not implicitly {@link proto.Message.CloudAPIThreadControlNotification.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.CloudAPIThreadControlNotification + * @static + * @param {proto.Message.ICloudAPIThreadControlNotification} message CloudAPIThreadControlNotification message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudAPIThreadControlNotification.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CloudAPIThreadControlNotification message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.CloudAPIThreadControlNotification + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.CloudAPIThreadControlNotification} CloudAPIThreadControlNotification + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudAPIThreadControlNotification.decode = function 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.CloudAPIThreadControlNotification(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.status = reader.int32(); + break; + } + case 2: { + message.senderNotificationTimestampMs = reader.int64(); + break; + } + case 3: { + message.consumerLid = reader.string(); + break; + } + case 4: { + message.consumerPhoneNumber = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CloudAPIThreadControlNotification message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.CloudAPIThreadControlNotification + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.CloudAPIThreadControlNotification} CloudAPIThreadControlNotification + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudAPIThreadControlNotification.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CloudAPIThreadControlNotification message. + * @function verify + * @memberof proto.Message.CloudAPIThreadControlNotification + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CloudAPIThreadControlNotification.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.status != null && message.hasOwnProperty("status")) { + properties._status = 1; + switch (message.status) { + default: + return "status: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.senderNotificationTimestampMs != null && message.hasOwnProperty("senderNotificationTimestampMs")) { + properties._senderNotificationTimestampMs = 1; + if (!$util.isInteger(message.senderNotificationTimestampMs) && !(message.senderNotificationTimestampMs && $util.isInteger(message.senderNotificationTimestampMs.low) && $util.isInteger(message.senderNotificationTimestampMs.high))) + return "senderNotificationTimestampMs: integer|Long expected"; + } + if (message.consumerLid != null && message.hasOwnProperty("consumerLid")) { + properties._consumerLid = 1; + if (!$util.isString(message.consumerLid)) + return "consumerLid: string expected"; + } + if (message.consumerPhoneNumber != null && message.hasOwnProperty("consumerPhoneNumber")) { + properties._consumerPhoneNumber = 1; + if (!$util.isString(message.consumerPhoneNumber)) + return "consumerPhoneNumber: string expected"; + } + return null; + }; + + /** + * Creates a CloudAPIThreadControlNotification message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.CloudAPIThreadControlNotification + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.CloudAPIThreadControlNotification} CloudAPIThreadControlNotification + */ + CloudAPIThreadControlNotification.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.CloudAPIThreadControlNotification) + return object; + var message = new $root.proto.Message.CloudAPIThreadControlNotification(); + switch (object.status) { + default: + if (typeof object.status === "number") { + message.status = object.status; + break; + } + break; + case "UNKNOWN": + case 0: + message.status = 0; + break; + case "CONTROL_PASSED": + case 1: + message.status = 1; + break; + case "CONTROL_TAKEN": + case 2: + message.status = 2; + break; + } + if (object.senderNotificationTimestampMs != null) + if ($util.Long) + (message.senderNotificationTimestampMs = $util.Long.fromValue(object.senderNotificationTimestampMs)).unsigned = false; + else if (typeof object.senderNotificationTimestampMs === "string") + message.senderNotificationTimestampMs = parseInt(object.senderNotificationTimestampMs, 10); + else if (typeof object.senderNotificationTimestampMs === "number") + message.senderNotificationTimestampMs = object.senderNotificationTimestampMs; + else if (typeof object.senderNotificationTimestampMs === "object") + message.senderNotificationTimestampMs = new $util.LongBits(object.senderNotificationTimestampMs.low >>> 0, object.senderNotificationTimestampMs.high >>> 0).toNumber(); + if (object.consumerLid != null) + message.consumerLid = String(object.consumerLid); + if (object.consumerPhoneNumber != null) + message.consumerPhoneNumber = String(object.consumerPhoneNumber); + return message; + }; + + /** + * Creates a plain object from a CloudAPIThreadControlNotification message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.CloudAPIThreadControlNotification + * @static + * @param {proto.Message.CloudAPIThreadControlNotification} message CloudAPIThreadControlNotification + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CloudAPIThreadControlNotification.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.status != null && message.hasOwnProperty("status")) { + object.status = options.enums === String ? $root.proto.Message.CloudAPIThreadControlNotification.CloudAPIThreadControl[message.status] === undefined ? message.status : $root.proto.Message.CloudAPIThreadControlNotification.CloudAPIThreadControl[message.status] : message.status; + if (options.oneofs) + object._status = "status"; + } + if (message.senderNotificationTimestampMs != null && message.hasOwnProperty("senderNotificationTimestampMs")) { + if (typeof message.senderNotificationTimestampMs === "number") + object.senderNotificationTimestampMs = options.longs === String ? String(message.senderNotificationTimestampMs) : message.senderNotificationTimestampMs; + else + object.senderNotificationTimestampMs = options.longs === String ? $util.Long.prototype.toString.call(message.senderNotificationTimestampMs) : options.longs === Number ? new $util.LongBits(message.senderNotificationTimestampMs.low >>> 0, message.senderNotificationTimestampMs.high >>> 0).toNumber() : message.senderNotificationTimestampMs; + if (options.oneofs) + object._senderNotificationTimestampMs = "senderNotificationTimestampMs"; + } + if (message.consumerLid != null && message.hasOwnProperty("consumerLid")) { + object.consumerLid = message.consumerLid; + if (options.oneofs) + object._consumerLid = "consumerLid"; + } + if (message.consumerPhoneNumber != null && message.hasOwnProperty("consumerPhoneNumber")) { + object.consumerPhoneNumber = message.consumerPhoneNumber; + if (options.oneofs) + object._consumerPhoneNumber = "consumerPhoneNumber"; + } + return object; + }; + + /** + * Converts this CloudAPIThreadControlNotification to JSON. + * @function toJSON + * @memberof proto.Message.CloudAPIThreadControlNotification + * @instance + * @returns {Object.} JSON object + */ + CloudAPIThreadControlNotification.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CloudAPIThreadControlNotification + * @function getTypeUrl + * @memberof proto.Message.CloudAPIThreadControlNotification + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CloudAPIThreadControlNotification.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.CloudAPIThreadControlNotification"; + }; + + /** + * CloudAPIThreadControl enum. + * @name proto.Message.CloudAPIThreadControlNotification.CloudAPIThreadControl + * @enum {number} + * @property {number} UNKNOWN=0 UNKNOWN value + * @property {number} CONTROL_PASSED=1 CONTROL_PASSED value + * @property {number} CONTROL_TAKEN=2 CONTROL_TAKEN value + */ + CloudAPIThreadControlNotification.CloudAPIThreadControl = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNKNOWN"] = 0; + values[valuesById[1] = "CONTROL_PASSED"] = 1; + values[valuesById[2] = "CONTROL_TAKEN"] = 2; + return values; + })(); + + return CloudAPIThreadControlNotification; + })(); + Message.CommentMessage = (function() { /** @@ -34359,6 +62406,21 @@ $root.proto = (function() { */ CommentMessage.prototype.targetMessageKey = null; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CommentMessage.prototype, "_message", { + get: $util.oneOfGetter($oneOfFields = ["message"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CommentMessage.prototype, "_targetMessageKey", { + get: $util.oneOfGetter($oneOfFields = ["targetMessageKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new CommentMessage instance using the specified properties. * @function create @@ -34421,12 +62483,14 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.message = $root.proto.Message.decode(reader, reader.uint32()); - break; - case 2: - message.targetMessageKey = $root.proto.MessageKey.decode(reader, reader.uint32()); - break; + case 1: { + message.message = $root.proto.Message.decode(reader, reader.uint32()); + break; + } + case 2: { + message.targetMessageKey = $root.proto.MessageKey.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -34462,15 +62526,22 @@ $root.proto = (function() { CommentMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; if (message.message != null && message.hasOwnProperty("message")) { - var error = $root.proto.Message.verify(message.message); - if (error) - return "message." + error; + properties._message = 1; + { + var error = $root.proto.Message.verify(message.message); + if (error) + return "message." + error; + } } if (message.targetMessageKey != null && message.hasOwnProperty("targetMessageKey")) { - var error = $root.proto.MessageKey.verify(message.targetMessageKey); - if (error) - return "targetMessageKey." + error; + properties._targetMessageKey = 1; + { + var error = $root.proto.MessageKey.verify(message.targetMessageKey); + if (error) + return "targetMessageKey." + error; + } } return null; }; @@ -34513,14 +62584,16 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.message = null; - object.targetMessageKey = null; - } - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && message.hasOwnProperty("message")) { object.message = $root.proto.Message.toObject(message.message, options); - if (message.targetMessageKey != null && message.hasOwnProperty("targetMessageKey")) + if (options.oneofs) + object._message = "message"; + } + if (message.targetMessageKey != null && message.hasOwnProperty("targetMessageKey")) { object.targetMessageKey = $root.proto.MessageKey.toObject(message.targetMessageKey, options); + if (options.oneofs) + object._targetMessageKey = "targetMessageKey"; + } return object; }; @@ -34535,6 +62608,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CommentMessage + * @function getTypeUrl + * @memberof proto.Message.CommentMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CommentMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.CommentMessage"; + }; + return CommentMessage; })(); @@ -34566,19 +62654,19 @@ $root.proto = (function() { /** * ContactMessage displayName. - * @member {string} displayName + * @member {string|null|undefined} displayName * @memberof proto.Message.ContactMessage * @instance */ - ContactMessage.prototype.displayName = ""; + ContactMessage.prototype.displayName = null; /** * ContactMessage vcard. - * @member {string} vcard + * @member {string|null|undefined} vcard * @memberof proto.Message.ContactMessage * @instance */ - ContactMessage.prototype.vcard = ""; + ContactMessage.prototype.vcard = null; /** * ContactMessage contextInfo. @@ -34588,6 +62676,27 @@ $root.proto = (function() { */ ContactMessage.prototype.contextInfo = null; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ContactMessage.prototype, "_displayName", { + get: $util.oneOfGetter($oneOfFields = ["displayName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ContactMessage.prototype, "_vcard", { + get: $util.oneOfGetter($oneOfFields = ["vcard"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ContactMessage.prototype, "_contextInfo", { + get: $util.oneOfGetter($oneOfFields = ["contextInfo"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new ContactMessage instance using the specified properties. * @function create @@ -34652,15 +62761,18 @@ $root.proto = (function() { 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; + 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; @@ -34696,16 +62808,24 @@ $root.proto = (function() { ContactMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) + var properties = {}; + if (message.displayName != null && message.hasOwnProperty("displayName")) { + properties._displayName = 1; if (!$util.isString(message.displayName)) return "displayName: string expected"; - if (message.vcard != null && message.hasOwnProperty("vcard")) + } + if (message.vcard != null && message.hasOwnProperty("vcard")) { + properties._vcard = 1; 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; + properties._contextInfo = 1; + { + var error = $root.proto.ContextInfo.verify(message.contextInfo); + if (error) + return "contextInfo." + error; + } } return null; }; @@ -34747,17 +62867,21 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.displayName = ""; - object.vcard = ""; - object.contextInfo = null; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) + if (message.displayName != null && message.hasOwnProperty("displayName")) { object.displayName = message.displayName; - if (message.vcard != null && message.hasOwnProperty("vcard")) + if (options.oneofs) + object._displayName = "displayName"; + } + if (message.vcard != null && message.hasOwnProperty("vcard")) { object.vcard = message.vcard; - if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) + if (options.oneofs) + object._vcard = "vcard"; + } + if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) { object.contextInfo = $root.proto.ContextInfo.toObject(message.contextInfo, options); + if (options.oneofs) + object._contextInfo = "contextInfo"; + } return object; }; @@ -34772,6 +62896,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ContactMessage + * @function getTypeUrl + * @memberof proto.Message.ContactMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ContactMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.ContactMessage"; + }; + return ContactMessage; })(); @@ -34804,11 +62943,11 @@ $root.proto = (function() { /** * ContactsArrayMessage displayName. - * @member {string} displayName + * @member {string|null|undefined} displayName * @memberof proto.Message.ContactsArrayMessage * @instance */ - ContactsArrayMessage.prototype.displayName = ""; + ContactsArrayMessage.prototype.displayName = null; /** * ContactsArrayMessage contacts. @@ -34826,6 +62965,21 @@ $root.proto = (function() { */ ContactsArrayMessage.prototype.contextInfo = null; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ContactsArrayMessage.prototype, "_displayName", { + get: $util.oneOfGetter($oneOfFields = ["displayName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ContactsArrayMessage.prototype, "_contextInfo", { + get: $util.oneOfGetter($oneOfFields = ["contextInfo"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new ContactsArrayMessage instance using the specified properties. * @function create @@ -34891,17 +63045,20 @@ $root.proto = (function() { 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; + 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; @@ -34937,9 +63094,12 @@ $root.proto = (function() { ContactsArrayMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) + var properties = {}; + if (message.displayName != null && message.hasOwnProperty("displayName")) { + properties._displayName = 1; 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"; @@ -34950,9 +63110,12 @@ $root.proto = (function() { } } if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) { - var error = $root.proto.ContextInfo.verify(message.contextInfo); - if (error) - return "contextInfo." + error; + properties._contextInfo = 1; + { + var error = $root.proto.ContextInfo.verify(message.contextInfo); + if (error) + return "contextInfo." + error; + } } return null; }; @@ -35004,19 +63167,21 @@ $root.proto = (function() { var object = {}; if (options.arrays || options.defaults) object.contacts = []; - if (options.defaults) { - object.displayName = ""; - object.contextInfo = null; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) + if (message.displayName != null && message.hasOwnProperty("displayName")) { object.displayName = message.displayName; + if (options.oneofs) + object._displayName = "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")) + if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) { object.contextInfo = $root.proto.ContextInfo.toObject(message.contextInfo, options); + if (options.oneofs) + object._contextInfo = "contextInfo"; + } return object; }; @@ -35031,6 +63196,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ContactsArrayMessage + * @function getTypeUrl + * @memberof proto.Message.ContactsArrayMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ContactsArrayMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.ContactsArrayMessage"; + }; + return ContactsArrayMessage; })(); @@ -35066,6 +63246,15 @@ $root.proto = (function() { */ DeclinePaymentRequestMessage.prototype.key = null; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DeclinePaymentRequestMessage.prototype, "_key", { + get: $util.oneOfGetter($oneOfFields = ["key"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new DeclinePaymentRequestMessage instance using the specified properties. * @function create @@ -35126,9 +63315,10 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.key = $root.proto.MessageKey.decode(reader, reader.uint32()); - break; + case 1: { + message.key = $root.proto.MessageKey.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -35164,10 +63354,14 @@ $root.proto = (function() { DeclinePaymentRequestMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; if (message.key != null && message.hasOwnProperty("key")) { - var error = $root.proto.MessageKey.verify(message.key); - if (error) - return "key." + error; + properties._key = 1; + { + var error = $root.proto.MessageKey.verify(message.key); + if (error) + return "key." + error; + } } return null; }; @@ -35205,10 +63399,11 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) - object.key = null; - if (message.key != null && message.hasOwnProperty("key")) + if (message.key != null && message.hasOwnProperty("key")) { object.key = $root.proto.MessageKey.toObject(message.key, options); + if (options.oneofs) + object._key = "key"; + } return object; }; @@ -35223,6 +63418,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DeclinePaymentRequestMessage + * @function getTypeUrl + * @memberof proto.Message.DeclinePaymentRequestMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeclinePaymentRequestMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.DeclinePaymentRequestMessage"; + }; + return DeclinePaymentRequestMessage; })(); @@ -35254,11 +63464,11 @@ $root.proto = (function() { /** * DeviceSentMessage destinationJid. - * @member {string} destinationJid + * @member {string|null|undefined} destinationJid * @memberof proto.Message.DeviceSentMessage * @instance */ - DeviceSentMessage.prototype.destinationJid = ""; + DeviceSentMessage.prototype.destinationJid = null; /** * DeviceSentMessage message. @@ -35270,11 +63480,32 @@ $root.proto = (function() { /** * DeviceSentMessage phash. - * @member {string} phash + * @member {string|null|undefined} phash * @memberof proto.Message.DeviceSentMessage * @instance */ - DeviceSentMessage.prototype.phash = ""; + DeviceSentMessage.prototype.phash = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DeviceSentMessage.prototype, "_destinationJid", { + get: $util.oneOfGetter($oneOfFields = ["destinationJid"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DeviceSentMessage.prototype, "_message", { + get: $util.oneOfGetter($oneOfFields = ["message"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DeviceSentMessage.prototype, "_phash", { + get: $util.oneOfGetter($oneOfFields = ["phash"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new DeviceSentMessage instance using the specified properties. @@ -35340,15 +63571,18 @@ $root.proto = (function() { 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; + 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; @@ -35384,17 +63618,25 @@ $root.proto = (function() { DeviceSentMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.destinationJid != null && message.hasOwnProperty("destinationJid")) + var properties = {}; + if (message.destinationJid != null && message.hasOwnProperty("destinationJid")) { + properties._destinationJid = 1; 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 (message.message != null && message.hasOwnProperty("message")) { + properties._message = 1; + { + var error = $root.proto.Message.verify(message.message); + if (error) + return "message." + error; + } + } + if (message.phash != null && message.hasOwnProperty("phash")) { + properties._phash = 1; if (!$util.isString(message.phash)) return "phash: string expected"; + } return null; }; @@ -35435,17 +63677,21 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.destinationJid = ""; - object.message = null; - object.phash = ""; - } - if (message.destinationJid != null && message.hasOwnProperty("destinationJid")) + if (message.destinationJid != null && message.hasOwnProperty("destinationJid")) { object.destinationJid = message.destinationJid; - if (message.message != null && message.hasOwnProperty("message")) + if (options.oneofs) + object._destinationJid = "destinationJid"; + } + if (message.message != null && message.hasOwnProperty("message")) { object.message = $root.proto.Message.toObject(message.message, options); - if (message.phash != null && message.hasOwnProperty("phash")) + if (options.oneofs) + object._message = "message"; + } + if (message.phash != null && message.hasOwnProperty("phash")) { object.phash = message.phash; + if (options.oneofs) + object._phash = "phash"; + } return object; }; @@ -35460,6 +63706,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DeviceSentMessage + * @function getTypeUrl + * @memberof proto.Message.DeviceSentMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeviceSentMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.DeviceSentMessage"; + }; + return DeviceSentMessage; })(); @@ -35489,6 +63750,7 @@ $root.proto = (function() { * @property {number|null} [thumbnailHeight] DocumentMessage thumbnailHeight * @property {number|null} [thumbnailWidth] DocumentMessage thumbnailWidth * @property {string|null} [caption] DocumentMessage caption + * @property {string|null} [accessibilityLabel] DocumentMessage accessibilityLabel */ /** @@ -35508,131 +63770,131 @@ $root.proto = (function() { /** * DocumentMessage url. - * @member {string} url + * @member {string|null|undefined} url * @memberof proto.Message.DocumentMessage * @instance */ - DocumentMessage.prototype.url = ""; + DocumentMessage.prototype.url = null; /** * DocumentMessage mimetype. - * @member {string} mimetype + * @member {string|null|undefined} mimetype * @memberof proto.Message.DocumentMessage * @instance */ - DocumentMessage.prototype.mimetype = ""; + DocumentMessage.prototype.mimetype = null; /** * DocumentMessage title. - * @member {string} title + * @member {string|null|undefined} title * @memberof proto.Message.DocumentMessage * @instance */ - DocumentMessage.prototype.title = ""; + DocumentMessage.prototype.title = null; /** * DocumentMessage fileSha256. - * @member {Uint8Array} fileSha256 + * @member {Uint8Array|null|undefined} fileSha256 * @memberof proto.Message.DocumentMessage * @instance */ - DocumentMessage.prototype.fileSha256 = $util.newBuffer([]); + DocumentMessage.prototype.fileSha256 = null; /** * DocumentMessage fileLength. - * @member {number|Long} fileLength + * @member {number|Long|null|undefined} fileLength * @memberof proto.Message.DocumentMessage * @instance */ - DocumentMessage.prototype.fileLength = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + DocumentMessage.prototype.fileLength = null; /** * DocumentMessage pageCount. - * @member {number} pageCount + * @member {number|null|undefined} pageCount * @memberof proto.Message.DocumentMessage * @instance */ - DocumentMessage.prototype.pageCount = 0; + DocumentMessage.prototype.pageCount = null; /** * DocumentMessage mediaKey. - * @member {Uint8Array} mediaKey + * @member {Uint8Array|null|undefined} mediaKey * @memberof proto.Message.DocumentMessage * @instance */ - DocumentMessage.prototype.mediaKey = $util.newBuffer([]); + DocumentMessage.prototype.mediaKey = null; /** * DocumentMessage fileName. - * @member {string} fileName + * @member {string|null|undefined} fileName * @memberof proto.Message.DocumentMessage * @instance */ - DocumentMessage.prototype.fileName = ""; + DocumentMessage.prototype.fileName = null; /** * DocumentMessage fileEncSha256. - * @member {Uint8Array} fileEncSha256 + * @member {Uint8Array|null|undefined} fileEncSha256 * @memberof proto.Message.DocumentMessage * @instance */ - DocumentMessage.prototype.fileEncSha256 = $util.newBuffer([]); + DocumentMessage.prototype.fileEncSha256 = null; /** * DocumentMessage directPath. - * @member {string} directPath + * @member {string|null|undefined} directPath * @memberof proto.Message.DocumentMessage * @instance */ - DocumentMessage.prototype.directPath = ""; + DocumentMessage.prototype.directPath = null; /** * DocumentMessage mediaKeyTimestamp. - * @member {number|Long} mediaKeyTimestamp + * @member {number|Long|null|undefined} mediaKeyTimestamp * @memberof proto.Message.DocumentMessage * @instance */ - DocumentMessage.prototype.mediaKeyTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + DocumentMessage.prototype.mediaKeyTimestamp = null; /** * DocumentMessage contactVcard. - * @member {boolean} contactVcard + * @member {boolean|null|undefined} contactVcard * @memberof proto.Message.DocumentMessage * @instance */ - DocumentMessage.prototype.contactVcard = false; + DocumentMessage.prototype.contactVcard = null; /** * DocumentMessage thumbnailDirectPath. - * @member {string} thumbnailDirectPath + * @member {string|null|undefined} thumbnailDirectPath * @memberof proto.Message.DocumentMessage * @instance */ - DocumentMessage.prototype.thumbnailDirectPath = ""; + DocumentMessage.prototype.thumbnailDirectPath = null; /** * DocumentMessage thumbnailSha256. - * @member {Uint8Array} thumbnailSha256 + * @member {Uint8Array|null|undefined} thumbnailSha256 * @memberof proto.Message.DocumentMessage * @instance */ - DocumentMessage.prototype.thumbnailSha256 = $util.newBuffer([]); + DocumentMessage.prototype.thumbnailSha256 = null; /** * DocumentMessage thumbnailEncSha256. - * @member {Uint8Array} thumbnailEncSha256 + * @member {Uint8Array|null|undefined} thumbnailEncSha256 * @memberof proto.Message.DocumentMessage * @instance */ - DocumentMessage.prototype.thumbnailEncSha256 = $util.newBuffer([]); + DocumentMessage.prototype.thumbnailEncSha256 = null; /** * DocumentMessage jpegThumbnail. - * @member {Uint8Array} jpegThumbnail + * @member {Uint8Array|null|undefined} jpegThumbnail * @memberof proto.Message.DocumentMessage * @instance */ - DocumentMessage.prototype.jpegThumbnail = $util.newBuffer([]); + DocumentMessage.prototype.jpegThumbnail = null; /** * DocumentMessage contextInfo. @@ -35644,27 +63906,164 @@ $root.proto = (function() { /** * DocumentMessage thumbnailHeight. - * @member {number} thumbnailHeight + * @member {number|null|undefined} thumbnailHeight * @memberof proto.Message.DocumentMessage * @instance */ - DocumentMessage.prototype.thumbnailHeight = 0; + DocumentMessage.prototype.thumbnailHeight = null; /** * DocumentMessage thumbnailWidth. - * @member {number} thumbnailWidth + * @member {number|null|undefined} thumbnailWidth * @memberof proto.Message.DocumentMessage * @instance */ - DocumentMessage.prototype.thumbnailWidth = 0; + DocumentMessage.prototype.thumbnailWidth = null; /** * DocumentMessage caption. - * @member {string} caption + * @member {string|null|undefined} caption * @memberof proto.Message.DocumentMessage * @instance */ - DocumentMessage.prototype.caption = ""; + DocumentMessage.prototype.caption = null; + + /** + * DocumentMessage accessibilityLabel. + * @member {string|null|undefined} accessibilityLabel + * @memberof proto.Message.DocumentMessage + * @instance + */ + DocumentMessage.prototype.accessibilityLabel = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DocumentMessage.prototype, "_url", { + get: $util.oneOfGetter($oneOfFields = ["url"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DocumentMessage.prototype, "_mimetype", { + get: $util.oneOfGetter($oneOfFields = ["mimetype"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DocumentMessage.prototype, "_title", { + get: $util.oneOfGetter($oneOfFields = ["title"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DocumentMessage.prototype, "_fileSha256", { + get: $util.oneOfGetter($oneOfFields = ["fileSha256"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DocumentMessage.prototype, "_fileLength", { + get: $util.oneOfGetter($oneOfFields = ["fileLength"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DocumentMessage.prototype, "_pageCount", { + get: $util.oneOfGetter($oneOfFields = ["pageCount"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DocumentMessage.prototype, "_mediaKey", { + get: $util.oneOfGetter($oneOfFields = ["mediaKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DocumentMessage.prototype, "_fileName", { + get: $util.oneOfGetter($oneOfFields = ["fileName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DocumentMessage.prototype, "_fileEncSha256", { + get: $util.oneOfGetter($oneOfFields = ["fileEncSha256"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DocumentMessage.prototype, "_directPath", { + get: $util.oneOfGetter($oneOfFields = ["directPath"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DocumentMessage.prototype, "_mediaKeyTimestamp", { + get: $util.oneOfGetter($oneOfFields = ["mediaKeyTimestamp"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DocumentMessage.prototype, "_contactVcard", { + get: $util.oneOfGetter($oneOfFields = ["contactVcard"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DocumentMessage.prototype, "_thumbnailDirectPath", { + get: $util.oneOfGetter($oneOfFields = ["thumbnailDirectPath"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DocumentMessage.prototype, "_thumbnailSha256", { + get: $util.oneOfGetter($oneOfFields = ["thumbnailSha256"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DocumentMessage.prototype, "_thumbnailEncSha256", { + get: $util.oneOfGetter($oneOfFields = ["thumbnailEncSha256"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DocumentMessage.prototype, "_jpegThumbnail", { + get: $util.oneOfGetter($oneOfFields = ["jpegThumbnail"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DocumentMessage.prototype, "_contextInfo", { + get: $util.oneOfGetter($oneOfFields = ["contextInfo"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DocumentMessage.prototype, "_thumbnailHeight", { + get: $util.oneOfGetter($oneOfFields = ["thumbnailHeight"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DocumentMessage.prototype, "_thumbnailWidth", { + get: $util.oneOfGetter($oneOfFields = ["thumbnailWidth"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DocumentMessage.prototype, "_caption", { + get: $util.oneOfGetter($oneOfFields = ["caption"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DocumentMessage.prototype, "_accessibilityLabel", { + get: $util.oneOfGetter($oneOfFields = ["accessibilityLabel"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new DocumentMessage instance using the specified properties. @@ -35730,6 +64129,8 @@ $root.proto = (function() { 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); + if (message.accessibilityLabel != null && Object.hasOwnProperty.call(message, "accessibilityLabel")) + writer.uint32(/* id 21, wireType 2 =*/170).string(message.accessibilityLabel); return writer; }; @@ -35764,66 +64165,90 @@ $root.proto = (function() { 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; + 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; + } + case 21: { + message.accessibilityLabel = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -35859,68 +64284,115 @@ $root.proto = (function() { DocumentMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.url != null && message.hasOwnProperty("url")) + var properties = {}; + if (message.url != null && message.hasOwnProperty("url")) { + properties._url = 1; if (!$util.isString(message.url)) return "url: string expected"; - if (message.mimetype != null && message.hasOwnProperty("mimetype")) + } + if (message.mimetype != null && message.hasOwnProperty("mimetype")) { + properties._mimetype = 1; if (!$util.isString(message.mimetype)) return "mimetype: string expected"; - if (message.title != null && message.hasOwnProperty("title")) + } + if (message.title != null && message.hasOwnProperty("title")) { + properties._title = 1; if (!$util.isString(message.title)) return "title: string expected"; - if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) + } + if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) { + properties._fileSha256 = 1; if (!(message.fileSha256 && typeof message.fileSha256.length === "number" || $util.isString(message.fileSha256))) return "fileSha256: buffer expected"; - if (message.fileLength != null && message.hasOwnProperty("fileLength")) + } + if (message.fileLength != null && message.hasOwnProperty("fileLength")) { + properties._fileLength = 1; 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 (message.pageCount != null && message.hasOwnProperty("pageCount")) { + properties._pageCount = 1; if (!$util.isInteger(message.pageCount)) return "pageCount: integer expected"; - if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) + } + if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) { + properties._mediaKey = 1; if (!(message.mediaKey && typeof message.mediaKey.length === "number" || $util.isString(message.mediaKey))) return "mediaKey: buffer expected"; - if (message.fileName != null && message.hasOwnProperty("fileName")) + } + if (message.fileName != null && message.hasOwnProperty("fileName")) { + properties._fileName = 1; if (!$util.isString(message.fileName)) return "fileName: string expected"; - if (message.fileEncSha256 != null && message.hasOwnProperty("fileEncSha256")) + } + if (message.fileEncSha256 != null && message.hasOwnProperty("fileEncSha256")) { + properties._fileEncSha256 = 1; if (!(message.fileEncSha256 && typeof message.fileEncSha256.length === "number" || $util.isString(message.fileEncSha256))) return "fileEncSha256: buffer expected"; - if (message.directPath != null && message.hasOwnProperty("directPath")) + } + if (message.directPath != null && message.hasOwnProperty("directPath")) { + properties._directPath = 1; if (!$util.isString(message.directPath)) return "directPath: string expected"; - if (message.mediaKeyTimestamp != null && message.hasOwnProperty("mediaKeyTimestamp")) + } + if (message.mediaKeyTimestamp != null && message.hasOwnProperty("mediaKeyTimestamp")) { + properties._mediaKeyTimestamp = 1; 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 (message.contactVcard != null && message.hasOwnProperty("contactVcard")) { + properties._contactVcard = 1; if (typeof message.contactVcard !== "boolean") return "contactVcard: boolean expected"; - if (message.thumbnailDirectPath != null && message.hasOwnProperty("thumbnailDirectPath")) + } + if (message.thumbnailDirectPath != null && message.hasOwnProperty("thumbnailDirectPath")) { + properties._thumbnailDirectPath = 1; if (!$util.isString(message.thumbnailDirectPath)) return "thumbnailDirectPath: string expected"; - if (message.thumbnailSha256 != null && message.hasOwnProperty("thumbnailSha256")) + } + if (message.thumbnailSha256 != null && message.hasOwnProperty("thumbnailSha256")) { + properties._thumbnailSha256 = 1; 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 != null && message.hasOwnProperty("thumbnailEncSha256")) { + properties._thumbnailEncSha256 = 1; 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 != null && message.hasOwnProperty("jpegThumbnail")) { + properties._jpegThumbnail = 1; 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 (message.contextInfo != null && message.hasOwnProperty("contextInfo")) { + properties._contextInfo = 1; + { + var error = $root.proto.ContextInfo.verify(message.contextInfo); + if (error) + return "contextInfo." + error; + } + } + if (message.thumbnailHeight != null && message.hasOwnProperty("thumbnailHeight")) { + properties._thumbnailHeight = 1; if (!$util.isInteger(message.thumbnailHeight)) return "thumbnailHeight: integer expected"; - if (message.thumbnailWidth != null && message.hasOwnProperty("thumbnailWidth")) + } + if (message.thumbnailWidth != null && message.hasOwnProperty("thumbnailWidth")) { + properties._thumbnailWidth = 1; if (!$util.isInteger(message.thumbnailWidth)) return "thumbnailWidth: integer expected"; - if (message.caption != null && message.hasOwnProperty("caption")) + } + if (message.caption != null && message.hasOwnProperty("caption")) { + properties._caption = 1; if (!$util.isString(message.caption)) return "caption: string expected"; + } + if (message.accessibilityLabel != null && message.hasOwnProperty("accessibilityLabel")) { + properties._accessibilityLabel = 1; + if (!$util.isString(message.accessibilityLabel)) + return "accessibilityLabel: string expected"; + } return null; }; @@ -35945,7 +64417,7 @@ $root.proto = (function() { 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) + else if (object.fileSha256.length >= 0) message.fileSha256 = object.fileSha256; if (object.fileLength != null) if ($util.Long) @@ -35961,14 +64433,14 @@ $root.proto = (function() { 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) + else if (object.mediaKey.length >= 0) 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) + else if (object.fileEncSha256.length >= 0) message.fileEncSha256 = object.fileEncSha256; if (object.directPath != null) message.directPath = String(object.directPath); @@ -35988,17 +64460,17 @@ $root.proto = (function() { 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) + else if (object.thumbnailSha256.length >= 0) 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) + else if (object.thumbnailEncSha256.length >= 0) 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) + else if (object.jpegThumbnail.length >= 0) message.jpegThumbnail = object.jpegThumbnail; if (object.contextInfo != null) { if (typeof object.contextInfo !== "object") @@ -36011,6 +64483,8 @@ $root.proto = (function() { message.thumbnailWidth = object.thumbnailWidth >>> 0; if (object.caption != null) message.caption = String(object.caption); + if (object.accessibilityLabel != null) + message.accessibilityLabel = String(object.accessibilityLabel); return message; }; @@ -36027,118 +64501,117 @@ $root.proto = (function() { 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")) + if (message.url != null && message.hasOwnProperty("url")) { object.url = message.url; - if (message.mimetype != null && message.hasOwnProperty("mimetype")) + if (options.oneofs) + object._url = "url"; + } + if (message.mimetype != null && message.hasOwnProperty("mimetype")) { object.mimetype = message.mimetype; - if (message.title != null && message.hasOwnProperty("title")) + if (options.oneofs) + object._mimetype = "mimetype"; + } + if (message.title != null && message.hasOwnProperty("title")) { object.title = message.title; - if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) + if (options.oneofs) + object._title = "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 (options.oneofs) + object._fileSha256 = "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")) + if (options.oneofs) + object._fileLength = "fileLength"; + } + if (message.pageCount != null && message.hasOwnProperty("pageCount")) { object.pageCount = message.pageCount; - if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) + if (options.oneofs) + object._pageCount = "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")) + if (options.oneofs) + object._mediaKey = "mediaKey"; + } + if (message.fileName != null && message.hasOwnProperty("fileName")) { object.fileName = message.fileName; - if (message.fileEncSha256 != null && message.hasOwnProperty("fileEncSha256")) + if (options.oneofs) + object._fileName = "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")) + if (options.oneofs) + object._fileEncSha256 = "fileEncSha256"; + } + if (message.directPath != null && message.hasOwnProperty("directPath")) { object.directPath = message.directPath; - if (message.mediaKeyTimestamp != null && message.hasOwnProperty("mediaKeyTimestamp")) + if (options.oneofs) + object._directPath = "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")) + if (options.oneofs) + object._mediaKeyTimestamp = "mediaKeyTimestamp"; + } + if (message.contactVcard != null && message.hasOwnProperty("contactVcard")) { object.contactVcard = message.contactVcard; - if (message.thumbnailDirectPath != null && message.hasOwnProperty("thumbnailDirectPath")) + if (options.oneofs) + object._contactVcard = "contactVcard"; + } + if (message.thumbnailDirectPath != null && message.hasOwnProperty("thumbnailDirectPath")) { object.thumbnailDirectPath = message.thumbnailDirectPath; - if (message.thumbnailSha256 != null && message.hasOwnProperty("thumbnailSha256")) + if (options.oneofs) + object._thumbnailDirectPath = "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")) + if (options.oneofs) + object._thumbnailSha256 = "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")) + if (options.oneofs) + object._thumbnailEncSha256 = "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")) + if (options.oneofs) + object._jpegThumbnail = "jpegThumbnail"; + } + if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) { object.contextInfo = $root.proto.ContextInfo.toObject(message.contextInfo, options); - if (message.thumbnailHeight != null && message.hasOwnProperty("thumbnailHeight")) + if (options.oneofs) + object._contextInfo = "contextInfo"; + } + if (message.thumbnailHeight != null && message.hasOwnProperty("thumbnailHeight")) { object.thumbnailHeight = message.thumbnailHeight; - if (message.thumbnailWidth != null && message.hasOwnProperty("thumbnailWidth")) + if (options.oneofs) + object._thumbnailHeight = "thumbnailHeight"; + } + if (message.thumbnailWidth != null && message.hasOwnProperty("thumbnailWidth")) { object.thumbnailWidth = message.thumbnailWidth; - if (message.caption != null && message.hasOwnProperty("caption")) + if (options.oneofs) + object._thumbnailWidth = "thumbnailWidth"; + } + if (message.caption != null && message.hasOwnProperty("caption")) { object.caption = message.caption; + if (options.oneofs) + object._caption = "caption"; + } + if (message.accessibilityLabel != null && message.hasOwnProperty("accessibilityLabel")) { + object.accessibilityLabel = message.accessibilityLabel; + if (options.oneofs) + object._accessibilityLabel = "accessibilityLabel"; + } return object; }; @@ -36153,6 +64626,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DocumentMessage + * @function getTypeUrl + * @memberof proto.Message.DocumentMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DocumentMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.DocumentMessage"; + }; + return DocumentMessage; })(); @@ -36192,19 +64680,40 @@ $root.proto = (function() { /** * EncCommentMessage encPayload. - * @member {Uint8Array} encPayload + * @member {Uint8Array|null|undefined} encPayload * @memberof proto.Message.EncCommentMessage * @instance */ - EncCommentMessage.prototype.encPayload = $util.newBuffer([]); + EncCommentMessage.prototype.encPayload = null; /** * EncCommentMessage encIv. - * @member {Uint8Array} encIv + * @member {Uint8Array|null|undefined} encIv * @memberof proto.Message.EncCommentMessage * @instance */ - EncCommentMessage.prototype.encIv = $util.newBuffer([]); + EncCommentMessage.prototype.encIv = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(EncCommentMessage.prototype, "_targetMessageKey", { + get: $util.oneOfGetter($oneOfFields = ["targetMessageKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(EncCommentMessage.prototype, "_encPayload", { + get: $util.oneOfGetter($oneOfFields = ["encPayload"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(EncCommentMessage.prototype, "_encIv", { + get: $util.oneOfGetter($oneOfFields = ["encIv"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new EncCommentMessage instance using the specified properties. @@ -36270,15 +64779,18 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.targetMessageKey = $root.proto.MessageKey.decode(reader, reader.uint32()); - break; - case 2: - message.encPayload = reader.bytes(); - break; - case 3: - message.encIv = reader.bytes(); - break; + case 1: { + message.targetMessageKey = $root.proto.MessageKey.decode(reader, reader.uint32()); + break; + } + case 2: { + message.encPayload = reader.bytes(); + break; + } + case 3: { + message.encIv = reader.bytes(); + break; + } default: reader.skipType(tag & 7); break; @@ -36314,17 +64826,25 @@ $root.proto = (function() { EncCommentMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; if (message.targetMessageKey != null && message.hasOwnProperty("targetMessageKey")) { - var error = $root.proto.MessageKey.verify(message.targetMessageKey); - if (error) - return "targetMessageKey." + error; + properties._targetMessageKey = 1; + { + var error = $root.proto.MessageKey.verify(message.targetMessageKey); + if (error) + return "targetMessageKey." + error; + } } - if (message.encPayload != null && message.hasOwnProperty("encPayload")) + if (message.encPayload != null && message.hasOwnProperty("encPayload")) { + properties._encPayload = 1; 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 != null && message.hasOwnProperty("encIv")) { + properties._encIv = 1; if (!(message.encIv && typeof message.encIv.length === "number" || $util.isString(message.encIv))) return "encIv: buffer expected"; + } return null; }; @@ -36348,12 +64868,12 @@ $root.proto = (function() { 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) + else if (object.encPayload.length >= 0) 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) + else if (object.encIv.length >= 0) message.encIv = object.encIv; return message; }; @@ -36371,29 +64891,21 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.targetMessageKey = null; - 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.targetMessageKey != null && message.hasOwnProperty("targetMessageKey")) + if (message.targetMessageKey != null && message.hasOwnProperty("targetMessageKey")) { object.targetMessageKey = $root.proto.MessageKey.toObject(message.targetMessageKey, options); - if (message.encPayload != null && message.hasOwnProperty("encPayload")) + if (options.oneofs) + object._targetMessageKey = "targetMessageKey"; + } + 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")) + if (options.oneofs) + object._encPayload = "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; + if (options.oneofs) + object._encIv = "encIv"; + } return object; }; @@ -36408,29 +64920,44 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for EncCommentMessage + * @function getTypeUrl + * @memberof proto.Message.EncCommentMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EncCommentMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.EncCommentMessage"; + }; + return EncCommentMessage; })(); - Message.EncEventUpdateMessage = (function() { + Message.EncEventResponseMessage = (function() { /** - * Properties of an EncEventUpdateMessage. + * Properties of an EncEventResponseMessage. * @memberof proto.Message - * @interface IEncEventUpdateMessage - * @property {proto.IMessageKey|null} [eventCreationMessageKey] EncEventUpdateMessage eventCreationMessageKey - * @property {Uint8Array|null} [encPayload] EncEventUpdateMessage encPayload - * @property {Uint8Array|null} [encIv] EncEventUpdateMessage encIv + * @interface IEncEventResponseMessage + * @property {proto.IMessageKey|null} [eventCreationMessageKey] EncEventResponseMessage eventCreationMessageKey + * @property {Uint8Array|null} [encPayload] EncEventResponseMessage encPayload + * @property {Uint8Array|null} [encIv] EncEventResponseMessage encIv */ /** - * Constructs a new EncEventUpdateMessage. + * Constructs a new EncEventResponseMessage. * @memberof proto.Message - * @classdesc Represents an EncEventUpdateMessage. - * @implements IEncEventUpdateMessage + * @classdesc Represents an EncEventResponseMessage. + * @implements IEncEventResponseMessage * @constructor - * @param {proto.Message.IEncEventUpdateMessage=} [properties] Properties to set + * @param {proto.Message.IEncEventResponseMessage=} [properties] Properties to set */ - function EncEventUpdateMessage(properties) { + function EncEventResponseMessage(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -36438,51 +64965,72 @@ $root.proto = (function() { } /** - * EncEventUpdateMessage eventCreationMessageKey. + * EncEventResponseMessage eventCreationMessageKey. * @member {proto.IMessageKey|null|undefined} eventCreationMessageKey - * @memberof proto.Message.EncEventUpdateMessage + * @memberof proto.Message.EncEventResponseMessage * @instance */ - EncEventUpdateMessage.prototype.eventCreationMessageKey = null; + EncEventResponseMessage.prototype.eventCreationMessageKey = null; /** - * EncEventUpdateMessage encPayload. - * @member {Uint8Array} encPayload - * @memberof proto.Message.EncEventUpdateMessage + * EncEventResponseMessage encPayload. + * @member {Uint8Array|null|undefined} encPayload + * @memberof proto.Message.EncEventResponseMessage * @instance */ - EncEventUpdateMessage.prototype.encPayload = $util.newBuffer([]); + EncEventResponseMessage.prototype.encPayload = null; /** - * EncEventUpdateMessage encIv. - * @member {Uint8Array} encIv - * @memberof proto.Message.EncEventUpdateMessage + * EncEventResponseMessage encIv. + * @member {Uint8Array|null|undefined} encIv + * @memberof proto.Message.EncEventResponseMessage * @instance */ - EncEventUpdateMessage.prototype.encIv = $util.newBuffer([]); + EncEventResponseMessage.prototype.encIv = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(EncEventResponseMessage.prototype, "_eventCreationMessageKey", { + get: $util.oneOfGetter($oneOfFields = ["eventCreationMessageKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(EncEventResponseMessage.prototype, "_encPayload", { + get: $util.oneOfGetter($oneOfFields = ["encPayload"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(EncEventResponseMessage.prototype, "_encIv", { + get: $util.oneOfGetter($oneOfFields = ["encIv"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new EncEventUpdateMessage instance using the specified properties. + * Creates a new EncEventResponseMessage instance using the specified properties. * @function create - * @memberof proto.Message.EncEventUpdateMessage + * @memberof proto.Message.EncEventResponseMessage * @static - * @param {proto.Message.IEncEventUpdateMessage=} [properties] Properties to set - * @returns {proto.Message.EncEventUpdateMessage} EncEventUpdateMessage instance + * @param {proto.Message.IEncEventResponseMessage=} [properties] Properties to set + * @returns {proto.Message.EncEventResponseMessage} EncEventResponseMessage instance */ - EncEventUpdateMessage.create = function create(properties) { - return new EncEventUpdateMessage(properties); + EncEventResponseMessage.create = function create(properties) { + return new EncEventResponseMessage(properties); }; /** - * Encodes the specified EncEventUpdateMessage message. Does not implicitly {@link proto.Message.EncEventUpdateMessage.verify|verify} messages. + * Encodes the specified EncEventResponseMessage message. Does not implicitly {@link proto.Message.EncEventResponseMessage.verify|verify} messages. * @function encode - * @memberof proto.Message.EncEventUpdateMessage + * @memberof proto.Message.EncEventResponseMessage * @static - * @param {proto.Message.IEncEventUpdateMessage} message EncEventUpdateMessage message or plain object to encode + * @param {proto.Message.IEncEventResponseMessage} message EncEventResponseMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EncEventUpdateMessage.encode = function encode(message, writer) { + EncEventResponseMessage.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.eventCreationMessageKey != null && Object.hasOwnProperty.call(message, "eventCreationMessageKey")) @@ -36495,45 +65043,48 @@ $root.proto = (function() { }; /** - * Encodes the specified EncEventUpdateMessage message, length delimited. Does not implicitly {@link proto.Message.EncEventUpdateMessage.verify|verify} messages. + * Encodes the specified EncEventResponseMessage message, length delimited. Does not implicitly {@link proto.Message.EncEventResponseMessage.verify|verify} messages. * @function encodeDelimited - * @memberof proto.Message.EncEventUpdateMessage + * @memberof proto.Message.EncEventResponseMessage * @static - * @param {proto.Message.IEncEventUpdateMessage} message EncEventUpdateMessage message or plain object to encode + * @param {proto.Message.IEncEventResponseMessage} message EncEventResponseMessage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EncEventUpdateMessage.encodeDelimited = function encodeDelimited(message, writer) { + EncEventResponseMessage.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an EncEventUpdateMessage message from the specified reader or buffer. + * Decodes an EncEventResponseMessage message from the specified reader or buffer. * @function decode - * @memberof proto.Message.EncEventUpdateMessage + * @memberof proto.Message.EncEventResponseMessage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {proto.Message.EncEventUpdateMessage} EncEventUpdateMessage + * @returns {proto.Message.EncEventResponseMessage} EncEventResponseMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EncEventUpdateMessage.decode = function decode(reader, length) { + EncEventResponseMessage.decode = function 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.EncEventUpdateMessage(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.Message.EncEventResponseMessage(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.eventCreationMessageKey = $root.proto.MessageKey.decode(reader, reader.uint32()); - break; - case 2: - message.encPayload = reader.bytes(); - break; - case 3: - message.encIv = reader.bytes(); - break; + case 1: { + message.eventCreationMessageKey = $root.proto.MessageKey.decode(reader, reader.uint32()); + break; + } + case 2: { + message.encPayload = reader.bytes(); + break; + } + case 3: { + message.encIv = reader.bytes(); + break; + } default: reader.skipType(tag & 7); break; @@ -36543,127 +65094,142 @@ $root.proto = (function() { }; /** - * Decodes an EncEventUpdateMessage message from the specified reader or buffer, length delimited. + * Decodes an EncEventResponseMessage message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof proto.Message.EncEventUpdateMessage + * @memberof proto.Message.EncEventResponseMessage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.Message.EncEventUpdateMessage} EncEventUpdateMessage + * @returns {proto.Message.EncEventResponseMessage} EncEventResponseMessage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EncEventUpdateMessage.decodeDelimited = function decodeDelimited(reader) { + EncEventResponseMessage.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an EncEventUpdateMessage message. + * Verifies an EncEventResponseMessage message. * @function verify - * @memberof proto.Message.EncEventUpdateMessage + * @memberof proto.Message.EncEventResponseMessage * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - EncEventUpdateMessage.verify = function verify(message) { + EncEventResponseMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; if (message.eventCreationMessageKey != null && message.hasOwnProperty("eventCreationMessageKey")) { - var error = $root.proto.MessageKey.verify(message.eventCreationMessageKey); - if (error) - return "eventCreationMessageKey." + error; + properties._eventCreationMessageKey = 1; + { + var error = $root.proto.MessageKey.verify(message.eventCreationMessageKey); + if (error) + return "eventCreationMessageKey." + error; + } } - if (message.encPayload != null && message.hasOwnProperty("encPayload")) + if (message.encPayload != null && message.hasOwnProperty("encPayload")) { + properties._encPayload = 1; 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 != null && message.hasOwnProperty("encIv")) { + properties._encIv = 1; if (!(message.encIv && typeof message.encIv.length === "number" || $util.isString(message.encIv))) return "encIv: buffer expected"; + } return null; }; /** - * Creates an EncEventUpdateMessage message from a plain object. Also converts values to their respective internal types. + * Creates an EncEventResponseMessage message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof proto.Message.EncEventUpdateMessage + * @memberof proto.Message.EncEventResponseMessage * @static * @param {Object.} object Plain object - * @returns {proto.Message.EncEventUpdateMessage} EncEventUpdateMessage + * @returns {proto.Message.EncEventResponseMessage} EncEventResponseMessage */ - EncEventUpdateMessage.fromObject = function fromObject(object) { - if (object instanceof $root.proto.Message.EncEventUpdateMessage) + EncEventResponseMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.EncEventResponseMessage) return object; - var message = new $root.proto.Message.EncEventUpdateMessage(); + var message = new $root.proto.Message.EncEventResponseMessage(); if (object.eventCreationMessageKey != null) { if (typeof object.eventCreationMessageKey !== "object") - throw TypeError(".proto.Message.EncEventUpdateMessage.eventCreationMessageKey: object expected"); + throw TypeError(".proto.Message.EncEventResponseMessage.eventCreationMessageKey: object expected"); message.eventCreationMessageKey = $root.proto.MessageKey.fromObject(object.eventCreationMessageKey); } 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) + else if (object.encPayload.length >= 0) 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) + else if (object.encIv.length >= 0) message.encIv = object.encIv; return message; }; /** - * Creates a plain object from an EncEventUpdateMessage message. Also converts values to other types if specified. + * Creates a plain object from an EncEventResponseMessage message. Also converts values to other types if specified. * @function toObject - * @memberof proto.Message.EncEventUpdateMessage + * @memberof proto.Message.EncEventResponseMessage * @static - * @param {proto.Message.EncEventUpdateMessage} message EncEventUpdateMessage + * @param {proto.Message.EncEventResponseMessage} message EncEventResponseMessage * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EncEventUpdateMessage.toObject = function toObject(message, options) { + EncEventResponseMessage.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.eventCreationMessageKey = null; - 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.eventCreationMessageKey != null && message.hasOwnProperty("eventCreationMessageKey")) + if (message.eventCreationMessageKey != null && message.hasOwnProperty("eventCreationMessageKey")) { object.eventCreationMessageKey = $root.proto.MessageKey.toObject(message.eventCreationMessageKey, options); - if (message.encPayload != null && message.hasOwnProperty("encPayload")) + if (options.oneofs) + object._eventCreationMessageKey = "eventCreationMessageKey"; + } + 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")) + if (options.oneofs) + object._encPayload = "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; + if (options.oneofs) + object._encIv = "encIv"; + } return object; }; /** - * Converts this EncEventUpdateMessage to JSON. + * Converts this EncEventResponseMessage to JSON. * @function toJSON - * @memberof proto.Message.EncEventUpdateMessage + * @memberof proto.Message.EncEventResponseMessage * @instance * @returns {Object.} JSON object */ - EncEventUpdateMessage.prototype.toJSON = function toJSON() { + EncEventResponseMessage.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return EncEventUpdateMessage; + /** + * Gets the default type url for EncEventResponseMessage + * @function getTypeUrl + * @memberof proto.Message.EncEventResponseMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EncEventResponseMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.EncEventResponseMessage"; + }; + + return EncEventResponseMessage; })(); Message.EncReactionMessage = (function() { @@ -36702,19 +65268,40 @@ $root.proto = (function() { /** * EncReactionMessage encPayload. - * @member {Uint8Array} encPayload + * @member {Uint8Array|null|undefined} encPayload * @memberof proto.Message.EncReactionMessage * @instance */ - EncReactionMessage.prototype.encPayload = $util.newBuffer([]); + EncReactionMessage.prototype.encPayload = null; /** * EncReactionMessage encIv. - * @member {Uint8Array} encIv + * @member {Uint8Array|null|undefined} encIv * @memberof proto.Message.EncReactionMessage * @instance */ - EncReactionMessage.prototype.encIv = $util.newBuffer([]); + EncReactionMessage.prototype.encIv = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(EncReactionMessage.prototype, "_targetMessageKey", { + get: $util.oneOfGetter($oneOfFields = ["targetMessageKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(EncReactionMessage.prototype, "_encPayload", { + get: $util.oneOfGetter($oneOfFields = ["encPayload"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(EncReactionMessage.prototype, "_encIv", { + get: $util.oneOfGetter($oneOfFields = ["encIv"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new EncReactionMessage instance using the specified properties. @@ -36780,15 +65367,18 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.targetMessageKey = $root.proto.MessageKey.decode(reader, reader.uint32()); - break; - case 2: - message.encPayload = reader.bytes(); - break; - case 3: - message.encIv = reader.bytes(); - break; + case 1: { + message.targetMessageKey = $root.proto.MessageKey.decode(reader, reader.uint32()); + break; + } + case 2: { + message.encPayload = reader.bytes(); + break; + } + case 3: { + message.encIv = reader.bytes(); + break; + } default: reader.skipType(tag & 7); break; @@ -36824,17 +65414,25 @@ $root.proto = (function() { EncReactionMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; if (message.targetMessageKey != null && message.hasOwnProperty("targetMessageKey")) { - var error = $root.proto.MessageKey.verify(message.targetMessageKey); - if (error) - return "targetMessageKey." + error; + properties._targetMessageKey = 1; + { + var error = $root.proto.MessageKey.verify(message.targetMessageKey); + if (error) + return "targetMessageKey." + error; + } } - if (message.encPayload != null && message.hasOwnProperty("encPayload")) + if (message.encPayload != null && message.hasOwnProperty("encPayload")) { + properties._encPayload = 1; 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 != null && message.hasOwnProperty("encIv")) { + properties._encIv = 1; if (!(message.encIv && typeof message.encIv.length === "number" || $util.isString(message.encIv))) return "encIv: buffer expected"; + } return null; }; @@ -36858,12 +65456,12 @@ $root.proto = (function() { 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) + else if (object.encPayload.length >= 0) 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) + else if (object.encIv.length >= 0) message.encIv = object.encIv; return message; }; @@ -36881,29 +65479,21 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.targetMessageKey = null; - 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.targetMessageKey != null && message.hasOwnProperty("targetMessageKey")) + if (message.targetMessageKey != null && message.hasOwnProperty("targetMessageKey")) { object.targetMessageKey = $root.proto.MessageKey.toObject(message.targetMessageKey, options); - if (message.encPayload != null && message.hasOwnProperty("encPayload")) + if (options.oneofs) + object._targetMessageKey = "targetMessageKey"; + } + 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")) + if (options.oneofs) + object._encPayload = "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; + if (options.oneofs) + object._encIv = "encIv"; + } return object; }; @@ -36918,238 +65508,24 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for EncReactionMessage + * @function getTypeUrl + * @memberof proto.Message.EncReactionMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EncReactionMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.EncReactionMessage"; + }; + return EncReactionMessage; })(); - Message.EventEditMessage = (function() { - - /** - * Properties of an EventEditMessage. - * @memberof proto.Message - * @interface IEventEditMessage - * @property {proto.Message.IEventMessage|null} [eventEditMessage] EventEditMessage eventEditMessage - * @property {number|Long|null} [editTimestampMs] EventEditMessage editTimestampMs - */ - - /** - * Constructs a new EventEditMessage. - * @memberof proto.Message - * @classdesc Represents an EventEditMessage. - * @implements IEventEditMessage - * @constructor - * @param {proto.Message.IEventEditMessage=} [properties] Properties to set - */ - function EventEditMessage(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EventEditMessage eventEditMessage. - * @member {proto.Message.IEventMessage|null|undefined} eventEditMessage - * @memberof proto.Message.EventEditMessage - * @instance - */ - EventEditMessage.prototype.eventEditMessage = null; - - /** - * EventEditMessage editTimestampMs. - * @member {number|Long} editTimestampMs - * @memberof proto.Message.EventEditMessage - * @instance - */ - EventEditMessage.prototype.editTimestampMs = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new EventEditMessage instance using the specified properties. - * @function create - * @memberof proto.Message.EventEditMessage - * @static - * @param {proto.Message.IEventEditMessage=} [properties] Properties to set - * @returns {proto.Message.EventEditMessage} EventEditMessage instance - */ - EventEditMessage.create = function create(properties) { - return new EventEditMessage(properties); - }; - - /** - * Encodes the specified EventEditMessage message. Does not implicitly {@link proto.Message.EventEditMessage.verify|verify} messages. - * @function encode - * @memberof proto.Message.EventEditMessage - * @static - * @param {proto.Message.IEventEditMessage} message EventEditMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EventEditMessage.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.eventEditMessage != null && Object.hasOwnProperty.call(message, "eventEditMessage")) - $root.proto.Message.EventMessage.encode(message.eventEditMessage, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.editTimestampMs != null && Object.hasOwnProperty.call(message, "editTimestampMs")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.editTimestampMs); - return writer; - }; - - /** - * Encodes the specified EventEditMessage message, length delimited. Does not implicitly {@link proto.Message.EventEditMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.Message.EventEditMessage - * @static - * @param {proto.Message.IEventEditMessage} message EventEditMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EventEditMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EventEditMessage message from the specified reader or buffer. - * @function decode - * @memberof proto.Message.EventEditMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.Message.EventEditMessage} EventEditMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EventEditMessage.decode = function 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.EventEditMessage(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.eventEditMessage = $root.proto.Message.EventMessage.decode(reader, reader.uint32()); - break; - case 2: - message.editTimestampMs = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EventEditMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.Message.EventEditMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.Message.EventEditMessage} EventEditMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EventEditMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EventEditMessage message. - * @function verify - * @memberof proto.Message.EventEditMessage - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EventEditMessage.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.eventEditMessage != null && message.hasOwnProperty("eventEditMessage")) { - var error = $root.proto.Message.EventMessage.verify(message.eventEditMessage); - if (error) - return "eventEditMessage." + error; - } - if (message.editTimestampMs != null && message.hasOwnProperty("editTimestampMs")) - if (!$util.isInteger(message.editTimestampMs) && !(message.editTimestampMs && $util.isInteger(message.editTimestampMs.low) && $util.isInteger(message.editTimestampMs.high))) - return "editTimestampMs: integer|Long expected"; - return null; - }; - - /** - * Creates an EventEditMessage message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.Message.EventEditMessage - * @static - * @param {Object.} object Plain object - * @returns {proto.Message.EventEditMessage} EventEditMessage - */ - EventEditMessage.fromObject = function fromObject(object) { - if (object instanceof $root.proto.Message.EventEditMessage) - return object; - var message = new $root.proto.Message.EventEditMessage(); - if (object.eventEditMessage != null) { - if (typeof object.eventEditMessage !== "object") - throw TypeError(".proto.Message.EventEditMessage.eventEditMessage: object expected"); - message.eventEditMessage = $root.proto.Message.EventMessage.fromObject(object.eventEditMessage); - } - if (object.editTimestampMs != null) - if ($util.Long) - (message.editTimestampMs = $util.Long.fromValue(object.editTimestampMs)).unsigned = false; - else if (typeof object.editTimestampMs === "string") - message.editTimestampMs = parseInt(object.editTimestampMs, 10); - else if (typeof object.editTimestampMs === "number") - message.editTimestampMs = object.editTimestampMs; - else if (typeof object.editTimestampMs === "object") - message.editTimestampMs = new $util.LongBits(object.editTimestampMs.low >>> 0, object.editTimestampMs.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from an EventEditMessage message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.Message.EventEditMessage - * @static - * @param {proto.Message.EventEditMessage} message EventEditMessage - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EventEditMessage.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.eventEditMessage = null; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.editTimestampMs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.editTimestampMs = options.longs === String ? "0" : 0; - } - if (message.eventEditMessage != null && message.hasOwnProperty("eventEditMessage")) - object.eventEditMessage = $root.proto.Message.EventMessage.toObject(message.eventEditMessage, options); - if (message.editTimestampMs != null && message.hasOwnProperty("editTimestampMs")) - if (typeof message.editTimestampMs === "number") - object.editTimestampMs = options.longs === String ? String(message.editTimestampMs) : message.editTimestampMs; - else - object.editTimestampMs = options.longs === String ? $util.Long.prototype.toString.call(message.editTimestampMs) : options.longs === Number ? new $util.LongBits(message.editTimestampMs.low >>> 0, message.editTimestampMs.high >>> 0).toNumber() : message.editTimestampMs; - return object; - }; - - /** - * Converts this EventEditMessage to JSON. - * @function toJSON - * @memberof proto.Message.EventEditMessage - * @instance - * @returns {Object.} JSON object - */ - EventEditMessage.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return EventEditMessage; - })(); - Message.EventMessage = (function() { /** @@ -37163,6 +65539,8 @@ $root.proto = (function() { * @property {proto.Message.ILocationMessage|null} [location] EventMessage location * @property {string|null} [joinLink] EventMessage joinLink * @property {number|Long|null} [startTime] EventMessage startTime + * @property {number|Long|null} [endTime] EventMessage endTime + * @property {boolean|null} [extraGuestsAllowed] EventMessage extraGuestsAllowed */ /** @@ -37190,27 +65568,27 @@ $root.proto = (function() { /** * EventMessage isCanceled. - * @member {boolean} isCanceled + * @member {boolean|null|undefined} isCanceled * @memberof proto.Message.EventMessage * @instance */ - EventMessage.prototype.isCanceled = false; + EventMessage.prototype.isCanceled = null; /** * EventMessage name. - * @member {string} name + * @member {string|null|undefined} name * @memberof proto.Message.EventMessage * @instance */ - EventMessage.prototype.name = ""; + EventMessage.prototype.name = null; /** * EventMessage description. - * @member {string} description + * @member {string|null|undefined} description * @memberof proto.Message.EventMessage * @instance */ - EventMessage.prototype.description = ""; + EventMessage.prototype.description = null; /** * EventMessage location. @@ -37222,19 +65600,92 @@ $root.proto = (function() { /** * EventMessage joinLink. - * @member {string} joinLink + * @member {string|null|undefined} joinLink * @memberof proto.Message.EventMessage * @instance */ - EventMessage.prototype.joinLink = ""; + EventMessage.prototype.joinLink = null; /** * EventMessage startTime. - * @member {number|Long} startTime + * @member {number|Long|null|undefined} startTime * @memberof proto.Message.EventMessage * @instance */ - EventMessage.prototype.startTime = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + EventMessage.prototype.startTime = null; + + /** + * EventMessage endTime. + * @member {number|Long|null|undefined} endTime + * @memberof proto.Message.EventMessage + * @instance + */ + EventMessage.prototype.endTime = null; + + /** + * EventMessage extraGuestsAllowed. + * @member {boolean|null|undefined} extraGuestsAllowed + * @memberof proto.Message.EventMessage + * @instance + */ + EventMessage.prototype.extraGuestsAllowed = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(EventMessage.prototype, "_contextInfo", { + get: $util.oneOfGetter($oneOfFields = ["contextInfo"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(EventMessage.prototype, "_isCanceled", { + get: $util.oneOfGetter($oneOfFields = ["isCanceled"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(EventMessage.prototype, "_name", { + get: $util.oneOfGetter($oneOfFields = ["name"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(EventMessage.prototype, "_description", { + get: $util.oneOfGetter($oneOfFields = ["description"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(EventMessage.prototype, "_location", { + get: $util.oneOfGetter($oneOfFields = ["location"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(EventMessage.prototype, "_joinLink", { + get: $util.oneOfGetter($oneOfFields = ["joinLink"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(EventMessage.prototype, "_startTime", { + get: $util.oneOfGetter($oneOfFields = ["startTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(EventMessage.prototype, "_endTime", { + get: $util.oneOfGetter($oneOfFields = ["endTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(EventMessage.prototype, "_extraGuestsAllowed", { + get: $util.oneOfGetter($oneOfFields = ["extraGuestsAllowed"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new EventMessage instance using the specified properties. @@ -37274,6 +65725,10 @@ $root.proto = (function() { writer.uint32(/* id 6, wireType 2 =*/50).string(message.joinLink); if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) writer.uint32(/* id 7, wireType 0 =*/56).int64(message.startTime); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + writer.uint32(/* id 8, wireType 0 =*/64).int64(message.endTime); + if (message.extraGuestsAllowed != null && Object.hasOwnProperty.call(message, "extraGuestsAllowed")) + writer.uint32(/* id 9, wireType 0 =*/72).bool(message.extraGuestsAllowed); return writer; }; @@ -37308,27 +65763,42 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.contextInfo = $root.proto.ContextInfo.decode(reader, reader.uint32()); - break; - case 2: - message.isCanceled = reader.bool(); - break; - case 3: - message.name = reader.string(); - break; - case 4: - message.description = reader.string(); - break; - case 5: - message.location = $root.proto.Message.LocationMessage.decode(reader, reader.uint32()); - break; - case 6: - message.joinLink = reader.string(); - break; - case 7: - message.startTime = reader.int64(); - break; + case 1: { + message.contextInfo = $root.proto.ContextInfo.decode(reader, reader.uint32()); + break; + } + case 2: { + message.isCanceled = reader.bool(); + break; + } + case 3: { + message.name = reader.string(); + break; + } + case 4: { + message.description = reader.string(); + break; + } + case 5: { + message.location = $root.proto.Message.LocationMessage.decode(reader, reader.uint32()); + break; + } + case 6: { + message.joinLink = reader.string(); + break; + } + case 7: { + message.startTime = reader.int64(); + break; + } + case 8: { + message.endTime = reader.int64(); + break; + } + case 9: { + message.extraGuestsAllowed = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -37364,31 +65834,58 @@ $root.proto = (function() { EventMessage.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; + properties._contextInfo = 1; + { + var error = $root.proto.ContextInfo.verify(message.contextInfo); + if (error) + return "contextInfo." + error; + } } - if (message.isCanceled != null && message.hasOwnProperty("isCanceled")) + if (message.isCanceled != null && message.hasOwnProperty("isCanceled")) { + properties._isCanceled = 1; if (typeof message.isCanceled !== "boolean") return "isCanceled: boolean expected"; - if (message.name != null && message.hasOwnProperty("name")) + } + if (message.name != null && message.hasOwnProperty("name")) { + properties._name = 1; if (!$util.isString(message.name)) return "name: string expected"; - if (message.description != null && message.hasOwnProperty("description")) + } + if (message.description != null && message.hasOwnProperty("description")) { + properties._description = 1; if (!$util.isString(message.description)) return "description: string expected"; - if (message.location != null && message.hasOwnProperty("location")) { - var error = $root.proto.Message.LocationMessage.verify(message.location); - if (error) - return "location." + error; } - if (message.joinLink != null && message.hasOwnProperty("joinLink")) + if (message.location != null && message.hasOwnProperty("location")) { + properties._location = 1; + { + var error = $root.proto.Message.LocationMessage.verify(message.location); + if (error) + return "location." + error; + } + } + if (message.joinLink != null && message.hasOwnProperty("joinLink")) { + properties._joinLink = 1; if (!$util.isString(message.joinLink)) return "joinLink: string expected"; - if (message.startTime != null && message.hasOwnProperty("startTime")) + } + if (message.startTime != null && message.hasOwnProperty("startTime")) { + properties._startTime = 1; if (!$util.isInteger(message.startTime) && !(message.startTime && $util.isInteger(message.startTime.low) && $util.isInteger(message.startTime.high))) return "startTime: integer|Long expected"; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + properties._endTime = 1; + if (!$util.isInteger(message.endTime) && !(message.endTime && $util.isInteger(message.endTime.low) && $util.isInteger(message.endTime.high))) + return "endTime: integer|Long expected"; + } + if (message.extraGuestsAllowed != null && message.hasOwnProperty("extraGuestsAllowed")) { + properties._extraGuestsAllowed = 1; + if (typeof message.extraGuestsAllowed !== "boolean") + return "extraGuestsAllowed: boolean expected"; + } return null; }; @@ -37431,6 +65928,17 @@ $root.proto = (function() { message.startTime = object.startTime; else if (typeof object.startTime === "object") message.startTime = new $util.LongBits(object.startTime.low >>> 0, object.startTime.high >>> 0).toNumber(); + if (object.endTime != null) + if ($util.Long) + (message.endTime = $util.Long.fromValue(object.endTime)).unsigned = false; + else if (typeof object.endTime === "string") + message.endTime = parseInt(object.endTime, 10); + else if (typeof object.endTime === "number") + message.endTime = object.endTime; + else if (typeof object.endTime === "object") + message.endTime = new $util.LongBits(object.endTime.low >>> 0, object.endTime.high >>> 0).toNumber(); + if (object.extraGuestsAllowed != null) + message.extraGuestsAllowed = Boolean(object.extraGuestsAllowed); return message; }; @@ -37447,36 +65955,57 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.contextInfo = null; - object.isCanceled = false; - object.name = ""; - object.description = ""; - object.location = null; - object.joinLink = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.startTime = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.startTime = options.longs === String ? "0" : 0; - } - if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) + if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) { object.contextInfo = $root.proto.ContextInfo.toObject(message.contextInfo, options); - if (message.isCanceled != null && message.hasOwnProperty("isCanceled")) + if (options.oneofs) + object._contextInfo = "contextInfo"; + } + if (message.isCanceled != null && message.hasOwnProperty("isCanceled")) { object.isCanceled = message.isCanceled; - if (message.name != null && message.hasOwnProperty("name")) + if (options.oneofs) + object._isCanceled = "isCanceled"; + } + if (message.name != null && message.hasOwnProperty("name")) { object.name = message.name; - if (message.description != null && message.hasOwnProperty("description")) + if (options.oneofs) + object._name = "name"; + } + if (message.description != null && message.hasOwnProperty("description")) { object.description = message.description; - if (message.location != null && message.hasOwnProperty("location")) + if (options.oneofs) + object._description = "description"; + } + if (message.location != null && message.hasOwnProperty("location")) { object.location = $root.proto.Message.LocationMessage.toObject(message.location, options); - if (message.joinLink != null && message.hasOwnProperty("joinLink")) + if (options.oneofs) + object._location = "location"; + } + if (message.joinLink != null && message.hasOwnProperty("joinLink")) { object.joinLink = message.joinLink; - if (message.startTime != null && message.hasOwnProperty("startTime")) + if (options.oneofs) + object._joinLink = "joinLink"; + } + if (message.startTime != null && message.hasOwnProperty("startTime")) { if (typeof message.startTime === "number") object.startTime = options.longs === String ? String(message.startTime) : message.startTime; else object.startTime = options.longs === String ? $util.Long.prototype.toString.call(message.startTime) : options.longs === Number ? new $util.LongBits(message.startTime.low >>> 0, message.startTime.high >>> 0).toNumber() : message.startTime; + if (options.oneofs) + object._startTime = "startTime"; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + if (typeof message.endTime === "number") + object.endTime = options.longs === String ? String(message.endTime) : message.endTime; + else + object.endTime = options.longs === String ? $util.Long.prototype.toString.call(message.endTime) : options.longs === Number ? new $util.LongBits(message.endTime.low >>> 0, message.endTime.high >>> 0).toNumber() : message.endTime; + if (options.oneofs) + object._endTime = "endTime"; + } + if (message.extraGuestsAllowed != null && message.hasOwnProperty("extraGuestsAllowed")) { + object.extraGuestsAllowed = message.extraGuestsAllowed; + if (options.oneofs) + object._extraGuestsAllowed = "extraGuestsAllowed"; + } return object; }; @@ -37491,6 +66020,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for EventMessage + * @function getTypeUrl + * @memberof proto.Message.EventMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EventMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.EventMessage"; + }; + return EventMessage; })(); @@ -37502,6 +66046,7 @@ $root.proto = (function() { * @interface IEventResponseMessage * @property {proto.Message.EventResponseMessage.EventResponseType|null} [response] EventResponseMessage response * @property {number|Long|null} [timestampMs] EventResponseMessage timestampMs + * @property {number|null} [extraGuestCount] EventResponseMessage extraGuestCount */ /** @@ -37521,19 +66066,48 @@ $root.proto = (function() { /** * EventResponseMessage response. - * @member {proto.Message.EventResponseMessage.EventResponseType} response + * @member {proto.Message.EventResponseMessage.EventResponseType|null|undefined} response * @memberof proto.Message.EventResponseMessage * @instance */ - EventResponseMessage.prototype.response = 0; + EventResponseMessage.prototype.response = null; /** * EventResponseMessage timestampMs. - * @member {number|Long} timestampMs + * @member {number|Long|null|undefined} timestampMs * @memberof proto.Message.EventResponseMessage * @instance */ - EventResponseMessage.prototype.timestampMs = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + EventResponseMessage.prototype.timestampMs = null; + + /** + * EventResponseMessage extraGuestCount. + * @member {number|null|undefined} extraGuestCount + * @memberof proto.Message.EventResponseMessage + * @instance + */ + EventResponseMessage.prototype.extraGuestCount = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(EventResponseMessage.prototype, "_response", { + get: $util.oneOfGetter($oneOfFields = ["response"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(EventResponseMessage.prototype, "_timestampMs", { + get: $util.oneOfGetter($oneOfFields = ["timestampMs"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(EventResponseMessage.prototype, "_extraGuestCount", { + get: $util.oneOfGetter($oneOfFields = ["extraGuestCount"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new EventResponseMessage instance using the specified properties. @@ -37563,6 +66137,8 @@ $root.proto = (function() { writer.uint32(/* id 1, wireType 0 =*/8).int32(message.response); if (message.timestampMs != null && Object.hasOwnProperty.call(message, "timestampMs")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.timestampMs); + if (message.extraGuestCount != null && Object.hasOwnProperty.call(message, "extraGuestCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.extraGuestCount); return writer; }; @@ -37597,12 +66173,18 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.response = reader.int32(); - break; - case 2: - message.timestampMs = reader.int64(); - break; + case 1: { + message.response = reader.int32(); + break; + } + case 2: { + message.timestampMs = reader.int64(); + break; + } + case 3: { + message.extraGuestCount = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -37638,18 +66220,29 @@ $root.proto = (function() { EventResponseMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.response != null && message.hasOwnProperty("response")) + var properties = {}; + if (message.response != null && message.hasOwnProperty("response")) { + properties._response = 1; switch (message.response) { default: return "response: enum value expected"; case 0: case 1: case 2: + case 3: break; } - if (message.timestampMs != null && message.hasOwnProperty("timestampMs")) + } + if (message.timestampMs != null && message.hasOwnProperty("timestampMs")) { + properties._timestampMs = 1; if (!$util.isInteger(message.timestampMs) && !(message.timestampMs && $util.isInteger(message.timestampMs.low) && $util.isInteger(message.timestampMs.high))) return "timestampMs: integer|Long expected"; + } + if (message.extraGuestCount != null && message.hasOwnProperty("extraGuestCount")) { + properties._extraGuestCount = 1; + if (!$util.isInteger(message.extraGuestCount)) + return "extraGuestCount: integer expected"; + } return null; }; @@ -37666,6 +66259,12 @@ $root.proto = (function() { return object; var message = new $root.proto.Message.EventResponseMessage(); switch (object.response) { + default: + if (typeof object.response === "number") { + message.response = object.response; + break; + } + break; case "UNKNOWN": case 0: message.response = 0; @@ -37678,6 +66277,10 @@ $root.proto = (function() { case 2: message.response = 2; break; + case "MAYBE": + case 3: + message.response = 3; + break; } if (object.timestampMs != null) if ($util.Long) @@ -37688,6 +66291,8 @@ $root.proto = (function() { message.timestampMs = object.timestampMs; else if (typeof object.timestampMs === "object") message.timestampMs = new $util.LongBits(object.timestampMs.low >>> 0, object.timestampMs.high >>> 0).toNumber(); + if (object.extraGuestCount != null) + message.extraGuestCount = object.extraGuestCount | 0; return message; }; @@ -37704,21 +66309,24 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.response = 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.response != null && message.hasOwnProperty("response")) { + object.response = options.enums === String ? $root.proto.Message.EventResponseMessage.EventResponseType[message.response] === undefined ? message.response : $root.proto.Message.EventResponseMessage.EventResponseType[message.response] : message.response; + if (options.oneofs) + object._response = "response"; } - if (message.response != null && message.hasOwnProperty("response")) - object.response = options.enums === String ? $root.proto.Message.EventResponseMessage.EventResponseType[message.response] : message.response; - if (message.timestampMs != null && message.hasOwnProperty("timestampMs")) + 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; + if (options.oneofs) + object._timestampMs = "timestampMs"; + } + if (message.extraGuestCount != null && message.hasOwnProperty("extraGuestCount")) { + object.extraGuestCount = message.extraGuestCount; + if (options.oneofs) + object._extraGuestCount = "extraGuestCount"; + } return object; }; @@ -37733,6 +66341,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for EventResponseMessage + * @function getTypeUrl + * @memberof proto.Message.EventResponseMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EventResponseMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.EventResponseMessage"; + }; + /** * EventResponseType enum. * @name proto.Message.EventResponseMessage.EventResponseType @@ -37740,238 +66363,20 @@ $root.proto = (function() { * @property {number} UNKNOWN=0 UNKNOWN value * @property {number} GOING=1 GOING value * @property {number} NOT_GOING=2 NOT_GOING value + * @property {number} MAYBE=3 MAYBE value */ EventResponseMessage.EventResponseType = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "UNKNOWN"] = 0; values[valuesById[1] = "GOING"] = 1; values[valuesById[2] = "NOT_GOING"] = 2; + values[valuesById[3] = "MAYBE"] = 3; return values; })(); return EventResponseMessage; })(); - Message.EventUpdateMessage = (function() { - - /** - * Properties of an EventUpdateMessage. - * @memberof proto.Message - * @interface IEventUpdateMessage - * @property {proto.Message.IEventResponseMessage|null} [response] EventUpdateMessage response - * @property {proto.Message.IEventEditMessage|null} [edit] EventUpdateMessage edit - */ - - /** - * Constructs a new EventUpdateMessage. - * @memberof proto.Message - * @classdesc Represents an EventUpdateMessage. - * @implements IEventUpdateMessage - * @constructor - * @param {proto.Message.IEventUpdateMessage=} [properties] Properties to set - */ - function EventUpdateMessage(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EventUpdateMessage response. - * @member {proto.Message.IEventResponseMessage|null|undefined} response - * @memberof proto.Message.EventUpdateMessage - * @instance - */ - EventUpdateMessage.prototype.response = null; - - /** - * EventUpdateMessage edit. - * @member {proto.Message.IEventEditMessage|null|undefined} edit - * @memberof proto.Message.EventUpdateMessage - * @instance - */ - EventUpdateMessage.prototype.edit = null; - - /** - * Creates a new EventUpdateMessage instance using the specified properties. - * @function create - * @memberof proto.Message.EventUpdateMessage - * @static - * @param {proto.Message.IEventUpdateMessage=} [properties] Properties to set - * @returns {proto.Message.EventUpdateMessage} EventUpdateMessage instance - */ - EventUpdateMessage.create = function create(properties) { - return new EventUpdateMessage(properties); - }; - - /** - * Encodes the specified EventUpdateMessage message. Does not implicitly {@link proto.Message.EventUpdateMessage.verify|verify} messages. - * @function encode - * @memberof proto.Message.EventUpdateMessage - * @static - * @param {proto.Message.IEventUpdateMessage} message EventUpdateMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EventUpdateMessage.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.response != null && Object.hasOwnProperty.call(message, "response")) - $root.proto.Message.EventResponseMessage.encode(message.response, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.edit != null && Object.hasOwnProperty.call(message, "edit")) - $root.proto.Message.EventEditMessage.encode(message.edit, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified EventUpdateMessage message, length delimited. Does not implicitly {@link proto.Message.EventUpdateMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.Message.EventUpdateMessage - * @static - * @param {proto.Message.IEventUpdateMessage} message EventUpdateMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EventUpdateMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EventUpdateMessage message from the specified reader or buffer. - * @function decode - * @memberof proto.Message.EventUpdateMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.Message.EventUpdateMessage} EventUpdateMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EventUpdateMessage.decode = function 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.EventUpdateMessage(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.response = $root.proto.Message.EventResponseMessage.decode(reader, reader.uint32()); - break; - case 2: - message.edit = $root.proto.Message.EventEditMessage.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EventUpdateMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.Message.EventUpdateMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.Message.EventUpdateMessage} EventUpdateMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EventUpdateMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EventUpdateMessage message. - * @function verify - * @memberof proto.Message.EventUpdateMessage - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EventUpdateMessage.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.response != null && message.hasOwnProperty("response")) { - var error = $root.proto.Message.EventResponseMessage.verify(message.response); - if (error) - return "response." + error; - } - if (message.edit != null && message.hasOwnProperty("edit")) { - var error = $root.proto.Message.EventEditMessage.verify(message.edit); - if (error) - return "edit." + error; - } - return null; - }; - - /** - * Creates an EventUpdateMessage message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.Message.EventUpdateMessage - * @static - * @param {Object.} object Plain object - * @returns {proto.Message.EventUpdateMessage} EventUpdateMessage - */ - EventUpdateMessage.fromObject = function fromObject(object) { - if (object instanceof $root.proto.Message.EventUpdateMessage) - return object; - var message = new $root.proto.Message.EventUpdateMessage(); - if (object.response != null) { - if (typeof object.response !== "object") - throw TypeError(".proto.Message.EventUpdateMessage.response: object expected"); - message.response = $root.proto.Message.EventResponseMessage.fromObject(object.response); - } - if (object.edit != null) { - if (typeof object.edit !== "object") - throw TypeError(".proto.Message.EventUpdateMessage.edit: object expected"); - message.edit = $root.proto.Message.EventEditMessage.fromObject(object.edit); - } - return message; - }; - - /** - * Creates a plain object from an EventUpdateMessage message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.Message.EventUpdateMessage - * @static - * @param {proto.Message.EventUpdateMessage} message EventUpdateMessage - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EventUpdateMessage.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.response = null; - object.edit = null; - } - if (message.response != null && message.hasOwnProperty("response")) - object.response = $root.proto.Message.EventResponseMessage.toObject(message.response, options); - if (message.edit != null && message.hasOwnProperty("edit")) - object.edit = $root.proto.Message.EventEditMessage.toObject(message.edit, options); - return object; - }; - - /** - * Converts this EventUpdateMessage to JSON. - * @function toJSON - * @memberof proto.Message.EventUpdateMessage - * @instance - * @returns {Object.} JSON object - */ - EventUpdateMessage.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return EventUpdateMessage; - })(); - Message.ExtendedTextMessage = (function() { /** @@ -37980,7 +66385,6 @@ $root.proto = (function() { * @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 @@ -38002,6 +66406,9 @@ $root.proto = (function() { * @property {Uint8Array|null} [inviteLinkParentGroupThumbnailV2] ExtendedTextMessage inviteLinkParentGroupThumbnailV2 * @property {proto.Message.ExtendedTextMessage.InviteLinkGroupType|null} [inviteLinkGroupTypeV2] ExtendedTextMessage inviteLinkGroupTypeV2 * @property {boolean|null} [viewOnce] ExtendedTextMessage viewOnce + * @property {number|null} [videoHeight] ExtendedTextMessage videoHeight + * @property {number|null} [videoWidth] ExtendedTextMessage videoWidth + * @property {proto.Message.IMMSThumbnailMetadata|null} [faviconMMSMetadata] ExtendedTextMessage faviconMMSMetadata */ /** @@ -38021,83 +66428,75 @@ $root.proto = (function() { /** * ExtendedTextMessage text. - * @member {string} text + * @member {string|null|undefined} text * @memberof proto.Message.ExtendedTextMessage * @instance */ - ExtendedTextMessage.prototype.text = ""; + ExtendedTextMessage.prototype.text = null; /** * ExtendedTextMessage matchedText. - * @member {string} matchedText + * @member {string|null|undefined} matchedText * @memberof proto.Message.ExtendedTextMessage * @instance */ - ExtendedTextMessage.prototype.matchedText = ""; - - /** - * ExtendedTextMessage canonicalUrl. - * @member {string} canonicalUrl - * @memberof proto.Message.ExtendedTextMessage - * @instance - */ - ExtendedTextMessage.prototype.canonicalUrl = ""; + ExtendedTextMessage.prototype.matchedText = null; /** * ExtendedTextMessage description. - * @member {string} description + * @member {string|null|undefined} description * @memberof proto.Message.ExtendedTextMessage * @instance */ - ExtendedTextMessage.prototype.description = ""; + ExtendedTextMessage.prototype.description = null; /** * ExtendedTextMessage title. - * @member {string} title + * @member {string|null|undefined} title * @memberof proto.Message.ExtendedTextMessage * @instance */ - ExtendedTextMessage.prototype.title = ""; + ExtendedTextMessage.prototype.title = null; /** * ExtendedTextMessage textArgb. - * @member {number} textArgb + * @member {number|null|undefined} textArgb * @memberof proto.Message.ExtendedTextMessage * @instance */ - ExtendedTextMessage.prototype.textArgb = 0; + ExtendedTextMessage.prototype.textArgb = null; /** * ExtendedTextMessage backgroundArgb. - * @member {number} backgroundArgb + * @member {number|null|undefined} backgroundArgb * @memberof proto.Message.ExtendedTextMessage * @instance */ - ExtendedTextMessage.prototype.backgroundArgb = 0; + ExtendedTextMessage.prototype.backgroundArgb = null; /** * ExtendedTextMessage font. - * @member {proto.Message.ExtendedTextMessage.FontType} font + * @member {proto.Message.ExtendedTextMessage.FontType|null|undefined} font * @memberof proto.Message.ExtendedTextMessage * @instance */ - ExtendedTextMessage.prototype.font = 0; + ExtendedTextMessage.prototype.font = null; /** * ExtendedTextMessage previewType. - * @member {proto.Message.ExtendedTextMessage.PreviewType} previewType + * @member {proto.Message.ExtendedTextMessage.PreviewType|null|undefined} previewType * @memberof proto.Message.ExtendedTextMessage * @instance */ - ExtendedTextMessage.prototype.previewType = 0; + ExtendedTextMessage.prototype.previewType = null; /** * ExtendedTextMessage jpegThumbnail. - * @member {Uint8Array} jpegThumbnail + * @member {Uint8Array|null|undefined} jpegThumbnail * @memberof proto.Message.ExtendedTextMessage * @instance */ - ExtendedTextMessage.prototype.jpegThumbnail = $util.newBuffer([]); + ExtendedTextMessage.prototype.jpegThumbnail = null; /** * ExtendedTextMessage contextInfo. @@ -38109,107 +66508,290 @@ $root.proto = (function() { /** * ExtendedTextMessage doNotPlayInline. - * @member {boolean} doNotPlayInline + * @member {boolean|null|undefined} doNotPlayInline * @memberof proto.Message.ExtendedTextMessage * @instance */ - ExtendedTextMessage.prototype.doNotPlayInline = false; + ExtendedTextMessage.prototype.doNotPlayInline = null; /** * ExtendedTextMessage thumbnailDirectPath. - * @member {string} thumbnailDirectPath + * @member {string|null|undefined} thumbnailDirectPath * @memberof proto.Message.ExtendedTextMessage * @instance */ - ExtendedTextMessage.prototype.thumbnailDirectPath = ""; + ExtendedTextMessage.prototype.thumbnailDirectPath = null; /** * ExtendedTextMessage thumbnailSha256. - * @member {Uint8Array} thumbnailSha256 + * @member {Uint8Array|null|undefined} thumbnailSha256 * @memberof proto.Message.ExtendedTextMessage * @instance */ - ExtendedTextMessage.prototype.thumbnailSha256 = $util.newBuffer([]); + ExtendedTextMessage.prototype.thumbnailSha256 = null; /** * ExtendedTextMessage thumbnailEncSha256. - * @member {Uint8Array} thumbnailEncSha256 + * @member {Uint8Array|null|undefined} thumbnailEncSha256 * @memberof proto.Message.ExtendedTextMessage * @instance */ - ExtendedTextMessage.prototype.thumbnailEncSha256 = $util.newBuffer([]); + ExtendedTextMessage.prototype.thumbnailEncSha256 = null; /** * ExtendedTextMessage mediaKey. - * @member {Uint8Array} mediaKey + * @member {Uint8Array|null|undefined} mediaKey * @memberof proto.Message.ExtendedTextMessage * @instance */ - ExtendedTextMessage.prototype.mediaKey = $util.newBuffer([]); + ExtendedTextMessage.prototype.mediaKey = null; /** * ExtendedTextMessage mediaKeyTimestamp. - * @member {number|Long} mediaKeyTimestamp + * @member {number|Long|null|undefined} mediaKeyTimestamp * @memberof proto.Message.ExtendedTextMessage * @instance */ - ExtendedTextMessage.prototype.mediaKeyTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + ExtendedTextMessage.prototype.mediaKeyTimestamp = null; /** * ExtendedTextMessage thumbnailHeight. - * @member {number} thumbnailHeight + * @member {number|null|undefined} thumbnailHeight * @memberof proto.Message.ExtendedTextMessage * @instance */ - ExtendedTextMessage.prototype.thumbnailHeight = 0; + ExtendedTextMessage.prototype.thumbnailHeight = null; /** * ExtendedTextMessage thumbnailWidth. - * @member {number} thumbnailWidth + * @member {number|null|undefined} thumbnailWidth * @memberof proto.Message.ExtendedTextMessage * @instance */ - ExtendedTextMessage.prototype.thumbnailWidth = 0; + ExtendedTextMessage.prototype.thumbnailWidth = null; /** * ExtendedTextMessage inviteLinkGroupType. - * @member {proto.Message.ExtendedTextMessage.InviteLinkGroupType} inviteLinkGroupType + * @member {proto.Message.ExtendedTextMessage.InviteLinkGroupType|null|undefined} inviteLinkGroupType * @memberof proto.Message.ExtendedTextMessage * @instance */ - ExtendedTextMessage.prototype.inviteLinkGroupType = 0; + ExtendedTextMessage.prototype.inviteLinkGroupType = null; /** * ExtendedTextMessage inviteLinkParentGroupSubjectV2. - * @member {string} inviteLinkParentGroupSubjectV2 + * @member {string|null|undefined} inviteLinkParentGroupSubjectV2 * @memberof proto.Message.ExtendedTextMessage * @instance */ - ExtendedTextMessage.prototype.inviteLinkParentGroupSubjectV2 = ""; + ExtendedTextMessage.prototype.inviteLinkParentGroupSubjectV2 = null; /** * ExtendedTextMessage inviteLinkParentGroupThumbnailV2. - * @member {Uint8Array} inviteLinkParentGroupThumbnailV2 + * @member {Uint8Array|null|undefined} inviteLinkParentGroupThumbnailV2 * @memberof proto.Message.ExtendedTextMessage * @instance */ - ExtendedTextMessage.prototype.inviteLinkParentGroupThumbnailV2 = $util.newBuffer([]); + ExtendedTextMessage.prototype.inviteLinkParentGroupThumbnailV2 = null; /** * ExtendedTextMessage inviteLinkGroupTypeV2. - * @member {proto.Message.ExtendedTextMessage.InviteLinkGroupType} inviteLinkGroupTypeV2 + * @member {proto.Message.ExtendedTextMessage.InviteLinkGroupType|null|undefined} inviteLinkGroupTypeV2 * @memberof proto.Message.ExtendedTextMessage * @instance */ - ExtendedTextMessage.prototype.inviteLinkGroupTypeV2 = 0; + ExtendedTextMessage.prototype.inviteLinkGroupTypeV2 = null; /** * ExtendedTextMessage viewOnce. - * @member {boolean} viewOnce + * @member {boolean|null|undefined} viewOnce * @memberof proto.Message.ExtendedTextMessage * @instance */ - ExtendedTextMessage.prototype.viewOnce = false; + ExtendedTextMessage.prototype.viewOnce = null; + + /** + * ExtendedTextMessage videoHeight. + * @member {number|null|undefined} videoHeight + * @memberof proto.Message.ExtendedTextMessage + * @instance + */ + ExtendedTextMessage.prototype.videoHeight = null; + + /** + * ExtendedTextMessage videoWidth. + * @member {number|null|undefined} videoWidth + * @memberof proto.Message.ExtendedTextMessage + * @instance + */ + ExtendedTextMessage.prototype.videoWidth = null; + + /** + * ExtendedTextMessage faviconMMSMetadata. + * @member {proto.Message.IMMSThumbnailMetadata|null|undefined} faviconMMSMetadata + * @memberof proto.Message.ExtendedTextMessage + * @instance + */ + ExtendedTextMessage.prototype.faviconMMSMetadata = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ExtendedTextMessage.prototype, "_text", { + get: $util.oneOfGetter($oneOfFields = ["text"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ExtendedTextMessage.prototype, "_matchedText", { + get: $util.oneOfGetter($oneOfFields = ["matchedText"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ExtendedTextMessage.prototype, "_description", { + get: $util.oneOfGetter($oneOfFields = ["description"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ExtendedTextMessage.prototype, "_title", { + get: $util.oneOfGetter($oneOfFields = ["title"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ExtendedTextMessage.prototype, "_textArgb", { + get: $util.oneOfGetter($oneOfFields = ["textArgb"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ExtendedTextMessage.prototype, "_backgroundArgb", { + get: $util.oneOfGetter($oneOfFields = ["backgroundArgb"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ExtendedTextMessage.prototype, "_font", { + get: $util.oneOfGetter($oneOfFields = ["font"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ExtendedTextMessage.prototype, "_previewType", { + get: $util.oneOfGetter($oneOfFields = ["previewType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ExtendedTextMessage.prototype, "_jpegThumbnail", { + get: $util.oneOfGetter($oneOfFields = ["jpegThumbnail"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ExtendedTextMessage.prototype, "_contextInfo", { + get: $util.oneOfGetter($oneOfFields = ["contextInfo"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ExtendedTextMessage.prototype, "_doNotPlayInline", { + get: $util.oneOfGetter($oneOfFields = ["doNotPlayInline"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ExtendedTextMessage.prototype, "_thumbnailDirectPath", { + get: $util.oneOfGetter($oneOfFields = ["thumbnailDirectPath"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ExtendedTextMessage.prototype, "_thumbnailSha256", { + get: $util.oneOfGetter($oneOfFields = ["thumbnailSha256"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ExtendedTextMessage.prototype, "_thumbnailEncSha256", { + get: $util.oneOfGetter($oneOfFields = ["thumbnailEncSha256"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ExtendedTextMessage.prototype, "_mediaKey", { + get: $util.oneOfGetter($oneOfFields = ["mediaKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ExtendedTextMessage.prototype, "_mediaKeyTimestamp", { + get: $util.oneOfGetter($oneOfFields = ["mediaKeyTimestamp"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ExtendedTextMessage.prototype, "_thumbnailHeight", { + get: $util.oneOfGetter($oneOfFields = ["thumbnailHeight"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ExtendedTextMessage.prototype, "_thumbnailWidth", { + get: $util.oneOfGetter($oneOfFields = ["thumbnailWidth"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ExtendedTextMessage.prototype, "_inviteLinkGroupType", { + get: $util.oneOfGetter($oneOfFields = ["inviteLinkGroupType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ExtendedTextMessage.prototype, "_inviteLinkParentGroupSubjectV2", { + get: $util.oneOfGetter($oneOfFields = ["inviteLinkParentGroupSubjectV2"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ExtendedTextMessage.prototype, "_inviteLinkParentGroupThumbnailV2", { + get: $util.oneOfGetter($oneOfFields = ["inviteLinkParentGroupThumbnailV2"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ExtendedTextMessage.prototype, "_inviteLinkGroupTypeV2", { + get: $util.oneOfGetter($oneOfFields = ["inviteLinkGroupTypeV2"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ExtendedTextMessage.prototype, "_viewOnce", { + get: $util.oneOfGetter($oneOfFields = ["viewOnce"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ExtendedTextMessage.prototype, "_videoHeight", { + get: $util.oneOfGetter($oneOfFields = ["videoHeight"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ExtendedTextMessage.prototype, "_videoWidth", { + get: $util.oneOfGetter($oneOfFields = ["videoWidth"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ExtendedTextMessage.prototype, "_faviconMMSMetadata", { + get: $util.oneOfGetter($oneOfFields = ["faviconMMSMetadata"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new ExtendedTextMessage instance using the specified properties. @@ -38239,8 +66821,6 @@ $root.proto = (function() { 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")) @@ -38283,6 +66863,12 @@ $root.proto = (function() { writer.uint32(/* id 29, wireType 0 =*/232).int32(message.inviteLinkGroupTypeV2); if (message.viewOnce != null && Object.hasOwnProperty.call(message, "viewOnce")) writer.uint32(/* id 30, wireType 0 =*/240).bool(message.viewOnce); + if (message.videoHeight != null && Object.hasOwnProperty.call(message, "videoHeight")) + writer.uint32(/* id 31, wireType 0 =*/248).uint32(message.videoHeight); + if (message.videoWidth != null && Object.hasOwnProperty.call(message, "videoWidth")) + writer.uint32(/* id 32, wireType 0 =*/256).uint32(message.videoWidth); + if (message.faviconMMSMetadata != null && Object.hasOwnProperty.call(message, "faviconMMSMetadata")) + $root.proto.Message.MMSThumbnailMetadata.encode(message.faviconMMSMetadata, writer.uint32(/* id 33, wireType 2 =*/266).fork()).ldelim(); return writer; }; @@ -38317,78 +66903,110 @@ $root.proto = (function() { 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; - case 30: - message.viewOnce = reader.bool(); - break; + case 1: { + message.text = reader.string(); + break; + } + case 2: { + message.matchedText = 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; + } + case 30: { + message.viewOnce = reader.bool(); + break; + } + case 31: { + message.videoHeight = reader.uint32(); + break; + } + case 32: { + message.videoWidth = reader.uint32(); + break; + } + case 33: { + message.faviconMMSMetadata = $root.proto.Message.MMSThumbnailMetadata.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -38424,28 +67042,39 @@ $root.proto = (function() { ExtendedTextMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.text != null && message.hasOwnProperty("text")) + var properties = {}; + if (message.text != null && message.hasOwnProperty("text")) { + properties._text = 1; if (!$util.isString(message.text)) return "text: string expected"; - if (message.matchedText != null && message.hasOwnProperty("matchedText")) + } + if (message.matchedText != null && message.hasOwnProperty("matchedText")) { + properties._matchedText = 1; 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 (message.description != null && message.hasOwnProperty("description")) { + properties._description = 1; if (!$util.isString(message.description)) return "description: string expected"; - if (message.title != null && message.hasOwnProperty("title")) + } + if (message.title != null && message.hasOwnProperty("title")) { + properties._title = 1; if (!$util.isString(message.title)) return "title: string expected"; - if (message.textArgb != null && message.hasOwnProperty("textArgb")) + } + if (message.textArgb != null && message.hasOwnProperty("textArgb")) { + properties._textArgb = 1; if (!$util.isInteger(message.textArgb)) return "textArgb: integer expected"; - if (message.backgroundArgb != null && message.hasOwnProperty("backgroundArgb")) + } + if (message.backgroundArgb != null && message.hasOwnProperty("backgroundArgb")) { + properties._backgroundArgb = 1; if (!$util.isInteger(message.backgroundArgb)) return "backgroundArgb: integer expected"; - if (message.font != null && message.hasOwnProperty("font")) + } + if (message.font != null && message.hasOwnProperty("font")) { + properties._font = 1; switch (message.font) { default: return "font: enum value expected"; @@ -38459,7 +67088,9 @@ $root.proto = (function() { case 10: break; } - if (message.previewType != null && message.hasOwnProperty("previewType")) + } + if (message.previewType != null && message.hasOwnProperty("previewType")) { + properties._previewType = 1; switch (message.previewType) { default: return "previewType: enum value expected"; @@ -38467,41 +67098,66 @@ $root.proto = (function() { case 1: case 4: case 5: + case 6: + case 7: break; } - if (message.jpegThumbnail != null && message.hasOwnProperty("jpegThumbnail")) + } + if (message.jpegThumbnail != null && message.hasOwnProperty("jpegThumbnail")) { + properties._jpegThumbnail = 1; 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 (message.contextInfo != null && message.hasOwnProperty("contextInfo")) { + properties._contextInfo = 1; + { + var error = $root.proto.ContextInfo.verify(message.contextInfo); + if (error) + return "contextInfo." + error; + } + } + if (message.doNotPlayInline != null && message.hasOwnProperty("doNotPlayInline")) { + properties._doNotPlayInline = 1; if (typeof message.doNotPlayInline !== "boolean") return "doNotPlayInline: boolean expected"; - if (message.thumbnailDirectPath != null && message.hasOwnProperty("thumbnailDirectPath")) + } + if (message.thumbnailDirectPath != null && message.hasOwnProperty("thumbnailDirectPath")) { + properties._thumbnailDirectPath = 1; if (!$util.isString(message.thumbnailDirectPath)) return "thumbnailDirectPath: string expected"; - if (message.thumbnailSha256 != null && message.hasOwnProperty("thumbnailSha256")) + } + if (message.thumbnailSha256 != null && message.hasOwnProperty("thumbnailSha256")) { + properties._thumbnailSha256 = 1; 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 != null && message.hasOwnProperty("thumbnailEncSha256")) { + properties._thumbnailEncSha256 = 1; 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 != null && message.hasOwnProperty("mediaKey")) { + properties._mediaKey = 1; if (!(message.mediaKey && typeof message.mediaKey.length === "number" || $util.isString(message.mediaKey))) return "mediaKey: buffer expected"; - if (message.mediaKeyTimestamp != null && message.hasOwnProperty("mediaKeyTimestamp")) + } + if (message.mediaKeyTimestamp != null && message.hasOwnProperty("mediaKeyTimestamp")) { + properties._mediaKeyTimestamp = 1; 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 (message.thumbnailHeight != null && message.hasOwnProperty("thumbnailHeight")) { + properties._thumbnailHeight = 1; if (!$util.isInteger(message.thumbnailHeight)) return "thumbnailHeight: integer expected"; - if (message.thumbnailWidth != null && message.hasOwnProperty("thumbnailWidth")) + } + if (message.thumbnailWidth != null && message.hasOwnProperty("thumbnailWidth")) { + properties._thumbnailWidth = 1; if (!$util.isInteger(message.thumbnailWidth)) return "thumbnailWidth: integer expected"; - if (message.inviteLinkGroupType != null && message.hasOwnProperty("inviteLinkGroupType")) + } + if (message.inviteLinkGroupType != null && message.hasOwnProperty("inviteLinkGroupType")) { + properties._inviteLinkGroupType = 1; switch (message.inviteLinkGroupType) { default: return "inviteLinkGroupType: enum value expected"; @@ -38511,13 +67167,19 @@ $root.proto = (function() { case 3: break; } - if (message.inviteLinkParentGroupSubjectV2 != null && message.hasOwnProperty("inviteLinkParentGroupSubjectV2")) + } + if (message.inviteLinkParentGroupSubjectV2 != null && message.hasOwnProperty("inviteLinkParentGroupSubjectV2")) { + properties._inviteLinkParentGroupSubjectV2 = 1; if (!$util.isString(message.inviteLinkParentGroupSubjectV2)) return "inviteLinkParentGroupSubjectV2: string expected"; - if (message.inviteLinkParentGroupThumbnailV2 != null && message.hasOwnProperty("inviteLinkParentGroupThumbnailV2")) + } + if (message.inviteLinkParentGroupThumbnailV2 != null && message.hasOwnProperty("inviteLinkParentGroupThumbnailV2")) { + properties._inviteLinkParentGroupThumbnailV2 = 1; if (!(message.inviteLinkParentGroupThumbnailV2 && typeof message.inviteLinkParentGroupThumbnailV2.length === "number" || $util.isString(message.inviteLinkParentGroupThumbnailV2))) return "inviteLinkParentGroupThumbnailV2: buffer expected"; - if (message.inviteLinkGroupTypeV2 != null && message.hasOwnProperty("inviteLinkGroupTypeV2")) + } + if (message.inviteLinkGroupTypeV2 != null && message.hasOwnProperty("inviteLinkGroupTypeV2")) { + properties._inviteLinkGroupTypeV2 = 1; switch (message.inviteLinkGroupTypeV2) { default: return "inviteLinkGroupTypeV2: enum value expected"; @@ -38527,9 +67189,30 @@ $root.proto = (function() { case 3: break; } - if (message.viewOnce != null && message.hasOwnProperty("viewOnce")) + } + if (message.viewOnce != null && message.hasOwnProperty("viewOnce")) { + properties._viewOnce = 1; if (typeof message.viewOnce !== "boolean") return "viewOnce: boolean expected"; + } + if (message.videoHeight != null && message.hasOwnProperty("videoHeight")) { + properties._videoHeight = 1; + if (!$util.isInteger(message.videoHeight)) + return "videoHeight: integer expected"; + } + if (message.videoWidth != null && message.hasOwnProperty("videoWidth")) { + properties._videoWidth = 1; + if (!$util.isInteger(message.videoWidth)) + return "videoWidth: integer expected"; + } + if (message.faviconMMSMetadata != null && message.hasOwnProperty("faviconMMSMetadata")) { + properties._faviconMMSMetadata = 1; + { + var error = $root.proto.Message.MMSThumbnailMetadata.verify(message.faviconMMSMetadata); + if (error) + return "faviconMMSMetadata." + error; + } + } return null; }; @@ -38549,8 +67232,6 @@ $root.proto = (function() { 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) @@ -38560,6 +67241,12 @@ $root.proto = (function() { if (object.backgroundArgb != null) message.backgroundArgb = object.backgroundArgb >>> 0; switch (object.font) { + default: + if (typeof object.font === "number") { + message.font = object.font; + break; + } + break; case "SYSTEM": case 0: message.font = 0; @@ -38594,6 +67281,12 @@ $root.proto = (function() { break; } switch (object.previewType) { + default: + if (typeof object.previewType === "number") { + message.previewType = object.previewType; + break; + } + break; case "NONE": case 0: message.previewType = 0; @@ -38610,11 +67303,19 @@ $root.proto = (function() { case 5: message.previewType = 5; break; + case "PAYMENT_LINKS": + case 6: + message.previewType = 6; + break; + case "PROFILE": + case 7: + message.previewType = 7; + 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) + else if (object.jpegThumbnail.length >= 0) message.jpegThumbnail = object.jpegThumbnail; if (object.contextInfo != null) { if (typeof object.contextInfo !== "object") @@ -38628,17 +67329,17 @@ $root.proto = (function() { 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) + else if (object.thumbnailSha256.length >= 0) 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) + else if (object.thumbnailEncSha256.length >= 0) 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) + else if (object.mediaKey.length >= 0) message.mediaKey = object.mediaKey; if (object.mediaKeyTimestamp != null) if ($util.Long) @@ -38654,6 +67355,12 @@ $root.proto = (function() { if (object.thumbnailWidth != null) message.thumbnailWidth = object.thumbnailWidth >>> 0; switch (object.inviteLinkGroupType) { + default: + if (typeof object.inviteLinkGroupType === "number") { + message.inviteLinkGroupType = object.inviteLinkGroupType; + break; + } + break; case "DEFAULT": case 0: message.inviteLinkGroupType = 0; @@ -38676,9 +67383,15 @@ $root.proto = (function() { 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) + else if (object.inviteLinkParentGroupThumbnailV2.length >= 0) message.inviteLinkParentGroupThumbnailV2 = object.inviteLinkParentGroupThumbnailV2; switch (object.inviteLinkGroupTypeV2) { + default: + if (typeof object.inviteLinkGroupTypeV2 === "number") { + message.inviteLinkGroupTypeV2 = object.inviteLinkGroupTypeV2; + break; + } + break; case "DEFAULT": case 0: message.inviteLinkGroupTypeV2 = 0; @@ -38698,6 +67411,15 @@ $root.proto = (function() { } if (object.viewOnce != null) message.viewOnce = Boolean(object.viewOnce); + if (object.videoHeight != null) + message.videoHeight = object.videoHeight >>> 0; + if (object.videoWidth != null) + message.videoWidth = object.videoWidth >>> 0; + if (object.faviconMMSMetadata != null) { + if (typeof object.faviconMMSMetadata !== "object") + throw TypeError(".proto.Message.ExtendedTextMessage.faviconMMSMetadata: object expected"); + message.faviconMMSMetadata = $root.proto.Message.MMSThumbnailMetadata.fromObject(object.faviconMMSMetadata); + } return message; }; @@ -38714,117 +67436,139 @@ $root.proto = (function() { 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 ? "SYSTEM" : 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; - object.viewOnce = false; - } - if (message.text != null && message.hasOwnProperty("text")) + if (message.text != null && message.hasOwnProperty("text")) { object.text = message.text; - if (message.matchedText != null && message.hasOwnProperty("matchedText")) + if (options.oneofs) + object._text = "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")) + if (options.oneofs) + object._matchedText = "matchedText"; + } + if (message.description != null && message.hasOwnProperty("description")) { object.description = message.description; - if (message.title != null && message.hasOwnProperty("title")) + if (options.oneofs) + object._description = "description"; + } + if (message.title != null && message.hasOwnProperty("title")) { object.title = message.title; - if (message.textArgb != null && message.hasOwnProperty("textArgb")) + if (options.oneofs) + object._title = "title"; + } + if (message.textArgb != null && message.hasOwnProperty("textArgb")) { object.textArgb = message.textArgb; - if (message.backgroundArgb != null && message.hasOwnProperty("backgroundArgb")) + if (options.oneofs) + object._textArgb = "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")) + if (options.oneofs) + object._backgroundArgb = "backgroundArgb"; + } + if (message.font != null && message.hasOwnProperty("font")) { + object.font = options.enums === String ? $root.proto.Message.ExtendedTextMessage.FontType[message.font] === undefined ? message.font : $root.proto.Message.ExtendedTextMessage.FontType[message.font] : message.font; + if (options.oneofs) + object._font = "font"; + } + if (message.previewType != null && message.hasOwnProperty("previewType")) { + object.previewType = options.enums === String ? $root.proto.Message.ExtendedTextMessage.PreviewType[message.previewType] === undefined ? message.previewType : $root.proto.Message.ExtendedTextMessage.PreviewType[message.previewType] : message.previewType; + if (options.oneofs) + object._previewType = "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")) + if (options.oneofs) + object._jpegThumbnail = "jpegThumbnail"; + } + if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) { object.contextInfo = $root.proto.ContextInfo.toObject(message.contextInfo, options); - if (message.doNotPlayInline != null && message.hasOwnProperty("doNotPlayInline")) + if (options.oneofs) + object._contextInfo = "contextInfo"; + } + if (message.doNotPlayInline != null && message.hasOwnProperty("doNotPlayInline")) { object.doNotPlayInline = message.doNotPlayInline; - if (message.thumbnailDirectPath != null && message.hasOwnProperty("thumbnailDirectPath")) + if (options.oneofs) + object._doNotPlayInline = "doNotPlayInline"; + } + if (message.thumbnailDirectPath != null && message.hasOwnProperty("thumbnailDirectPath")) { object.thumbnailDirectPath = message.thumbnailDirectPath; - if (message.thumbnailSha256 != null && message.hasOwnProperty("thumbnailSha256")) + if (options.oneofs) + object._thumbnailDirectPath = "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")) + if (options.oneofs) + object._thumbnailSha256 = "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")) + if (options.oneofs) + object._thumbnailEncSha256 = "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 (options.oneofs) + object._mediaKey = "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")) + if (options.oneofs) + object._mediaKeyTimestamp = "mediaKeyTimestamp"; + } + if (message.thumbnailHeight != null && message.hasOwnProperty("thumbnailHeight")) { object.thumbnailHeight = message.thumbnailHeight; - if (message.thumbnailWidth != null && message.hasOwnProperty("thumbnailWidth")) + if (options.oneofs) + object._thumbnailHeight = "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")) + if (options.oneofs) + object._thumbnailWidth = "thumbnailWidth"; + } + if (message.inviteLinkGroupType != null && message.hasOwnProperty("inviteLinkGroupType")) { + object.inviteLinkGroupType = options.enums === String ? $root.proto.Message.ExtendedTextMessage.InviteLinkGroupType[message.inviteLinkGroupType] === undefined ? message.inviteLinkGroupType : $root.proto.Message.ExtendedTextMessage.InviteLinkGroupType[message.inviteLinkGroupType] : message.inviteLinkGroupType; + if (options.oneofs) + object._inviteLinkGroupType = "inviteLinkGroupType"; + } + if (message.inviteLinkParentGroupSubjectV2 != null && message.hasOwnProperty("inviteLinkParentGroupSubjectV2")) { object.inviteLinkParentGroupSubjectV2 = message.inviteLinkParentGroupSubjectV2; - if (message.inviteLinkParentGroupThumbnailV2 != null && message.hasOwnProperty("inviteLinkParentGroupThumbnailV2")) + if (options.oneofs) + object._inviteLinkParentGroupSubjectV2 = "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; - if (message.viewOnce != null && message.hasOwnProperty("viewOnce")) + if (options.oneofs) + object._inviteLinkParentGroupThumbnailV2 = "inviteLinkParentGroupThumbnailV2"; + } + if (message.inviteLinkGroupTypeV2 != null && message.hasOwnProperty("inviteLinkGroupTypeV2")) { + object.inviteLinkGroupTypeV2 = options.enums === String ? $root.proto.Message.ExtendedTextMessage.InviteLinkGroupType[message.inviteLinkGroupTypeV2] === undefined ? message.inviteLinkGroupTypeV2 : $root.proto.Message.ExtendedTextMessage.InviteLinkGroupType[message.inviteLinkGroupTypeV2] : message.inviteLinkGroupTypeV2; + if (options.oneofs) + object._inviteLinkGroupTypeV2 = "inviteLinkGroupTypeV2"; + } + if (message.viewOnce != null && message.hasOwnProperty("viewOnce")) { object.viewOnce = message.viewOnce; + if (options.oneofs) + object._viewOnce = "viewOnce"; + } + if (message.videoHeight != null && message.hasOwnProperty("videoHeight")) { + object.videoHeight = message.videoHeight; + if (options.oneofs) + object._videoHeight = "videoHeight"; + } + if (message.videoWidth != null && message.hasOwnProperty("videoWidth")) { + object.videoWidth = message.videoWidth; + if (options.oneofs) + object._videoWidth = "videoWidth"; + } + if (message.faviconMMSMetadata != null && message.hasOwnProperty("faviconMMSMetadata")) { + object.faviconMMSMetadata = $root.proto.Message.MMSThumbnailMetadata.toObject(message.faviconMMSMetadata, options); + if (options.oneofs) + object._faviconMMSMetadata = "faviconMMSMetadata"; + } return object; }; @@ -38839,6 +67583,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ExtendedTextMessage + * @function getTypeUrl + * @memberof proto.Message.ExtendedTextMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtendedTextMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.ExtendedTextMessage"; + }; + /** * FontType enum. * @name proto.Message.ExtendedTextMessage.FontType @@ -38891,6 +67650,8 @@ $root.proto = (function() { * @property {number} VIDEO=1 VIDEO value * @property {number} PLACEHOLDER=4 PLACEHOLDER value * @property {number} IMAGE=5 IMAGE value + * @property {number} PAYMENT_LINKS=6 PAYMENT_LINKS value + * @property {number} PROFILE=7 PROFILE value */ ExtendedTextMessage.PreviewType = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -38898,31 +67659,32 @@ $root.proto = (function() { values[valuesById[1] = "VIDEO"] = 1; values[valuesById[4] = "PLACEHOLDER"] = 4; values[valuesById[5] = "IMAGE"] = 5; + values[valuesById[6] = "PAYMENT_LINKS"] = 6; + values[valuesById[7] = "PROFILE"] = 7; return values; })(); return ExtendedTextMessage; })(); - Message.ExtendedTextMessageWithParentKey = (function() { + Message.FullHistorySyncOnDemandRequestMetadata = (function() { /** - * Properties of an ExtendedTextMessageWithParentKey. + * Properties of a FullHistorySyncOnDemandRequestMetadata. * @memberof proto.Message - * @interface IExtendedTextMessageWithParentKey - * @property {proto.IMessageKey|null} [key] ExtendedTextMessageWithParentKey key - * @property {proto.Message.IExtendedTextMessage|null} [extendedTextMessage] ExtendedTextMessageWithParentKey extendedTextMessage + * @interface IFullHistorySyncOnDemandRequestMetadata + * @property {string|null} [requestId] FullHistorySyncOnDemandRequestMetadata requestId */ /** - * Constructs a new ExtendedTextMessageWithParentKey. + * Constructs a new FullHistorySyncOnDemandRequestMetadata. * @memberof proto.Message - * @classdesc Represents an ExtendedTextMessageWithParentKey. - * @implements IExtendedTextMessageWithParentKey + * @classdesc Represents a FullHistorySyncOnDemandRequestMetadata. + * @implements IFullHistorySyncOnDemandRequestMetadata * @constructor - * @param {proto.Message.IExtendedTextMessageWithParentKey=} [properties] Properties to set + * @param {proto.Message.IFullHistorySyncOnDemandRequestMetadata=} [properties] Properties to set */ - function ExtendedTextMessageWithParentKey(properties) { + function FullHistorySyncOnDemandRequestMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -38930,89 +67692,86 @@ $root.proto = (function() { } /** - * ExtendedTextMessageWithParentKey key. - * @member {proto.IMessageKey|null|undefined} key - * @memberof proto.Message.ExtendedTextMessageWithParentKey + * FullHistorySyncOnDemandRequestMetadata requestId. + * @member {string|null|undefined} requestId + * @memberof proto.Message.FullHistorySyncOnDemandRequestMetadata * @instance */ - ExtendedTextMessageWithParentKey.prototype.key = null; + FullHistorySyncOnDemandRequestMetadata.prototype.requestId = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(FullHistorySyncOnDemandRequestMetadata.prototype, "_requestId", { + get: $util.oneOfGetter($oneOfFields = ["requestId"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * ExtendedTextMessageWithParentKey extendedTextMessage. - * @member {proto.Message.IExtendedTextMessage|null|undefined} extendedTextMessage - * @memberof proto.Message.ExtendedTextMessageWithParentKey - * @instance - */ - ExtendedTextMessageWithParentKey.prototype.extendedTextMessage = null; - - /** - * Creates a new ExtendedTextMessageWithParentKey instance using the specified properties. + * Creates a new FullHistorySyncOnDemandRequestMetadata instance using the specified properties. * @function create - * @memberof proto.Message.ExtendedTextMessageWithParentKey + * @memberof proto.Message.FullHistorySyncOnDemandRequestMetadata * @static - * @param {proto.Message.IExtendedTextMessageWithParentKey=} [properties] Properties to set - * @returns {proto.Message.ExtendedTextMessageWithParentKey} ExtendedTextMessageWithParentKey instance + * @param {proto.Message.IFullHistorySyncOnDemandRequestMetadata=} [properties] Properties to set + * @returns {proto.Message.FullHistorySyncOnDemandRequestMetadata} FullHistorySyncOnDemandRequestMetadata instance */ - ExtendedTextMessageWithParentKey.create = function create(properties) { - return new ExtendedTextMessageWithParentKey(properties); + FullHistorySyncOnDemandRequestMetadata.create = function create(properties) { + return new FullHistorySyncOnDemandRequestMetadata(properties); }; /** - * Encodes the specified ExtendedTextMessageWithParentKey message. Does not implicitly {@link proto.Message.ExtendedTextMessageWithParentKey.verify|verify} messages. + * Encodes the specified FullHistorySyncOnDemandRequestMetadata message. Does not implicitly {@link proto.Message.FullHistorySyncOnDemandRequestMetadata.verify|verify} messages. * @function encode - * @memberof proto.Message.ExtendedTextMessageWithParentKey + * @memberof proto.Message.FullHistorySyncOnDemandRequestMetadata * @static - * @param {proto.Message.IExtendedTextMessageWithParentKey} message ExtendedTextMessageWithParentKey message or plain object to encode + * @param {proto.Message.IFullHistorySyncOnDemandRequestMetadata} message FullHistorySyncOnDemandRequestMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExtendedTextMessageWithParentKey.encode = function encode(message, writer) { + FullHistorySyncOnDemandRequestMetadata.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.extendedTextMessage != null && Object.hasOwnProperty.call(message, "extendedTextMessage")) - $root.proto.Message.ExtendedTextMessage.encode(message.extendedTextMessage, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.requestId); return writer; }; /** - * Encodes the specified ExtendedTextMessageWithParentKey message, length delimited. Does not implicitly {@link proto.Message.ExtendedTextMessageWithParentKey.verify|verify} messages. + * Encodes the specified FullHistorySyncOnDemandRequestMetadata message, length delimited. Does not implicitly {@link proto.Message.FullHistorySyncOnDemandRequestMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof proto.Message.ExtendedTextMessageWithParentKey + * @memberof proto.Message.FullHistorySyncOnDemandRequestMetadata * @static - * @param {proto.Message.IExtendedTextMessageWithParentKey} message ExtendedTextMessageWithParentKey message or plain object to encode + * @param {proto.Message.IFullHistorySyncOnDemandRequestMetadata} message FullHistorySyncOnDemandRequestMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExtendedTextMessageWithParentKey.encodeDelimited = function encodeDelimited(message, writer) { + FullHistorySyncOnDemandRequestMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ExtendedTextMessageWithParentKey message from the specified reader or buffer. + * Decodes a FullHistorySyncOnDemandRequestMetadata message from the specified reader or buffer. * @function decode - * @memberof proto.Message.ExtendedTextMessageWithParentKey + * @memberof proto.Message.FullHistorySyncOnDemandRequestMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {proto.Message.ExtendedTextMessageWithParentKey} ExtendedTextMessageWithParentKey + * @returns {proto.Message.FullHistorySyncOnDemandRequestMetadata} FullHistorySyncOnDemandRequestMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExtendedTextMessageWithParentKey.decode = function decode(reader, length) { + FullHistorySyncOnDemandRequestMetadata.decode = function 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.ExtendedTextMessageWithParentKey(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.Message.FullHistorySyncOnDemandRequestMetadata(); 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.extendedTextMessage = $root.proto.Message.ExtendedTextMessage.decode(reader, reader.uint32()); - break; + case 1: { + message.requestId = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -39022,106 +67781,106 @@ $root.proto = (function() { }; /** - * Decodes an ExtendedTextMessageWithParentKey message from the specified reader or buffer, length delimited. + * Decodes a FullHistorySyncOnDemandRequestMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof proto.Message.ExtendedTextMessageWithParentKey + * @memberof proto.Message.FullHistorySyncOnDemandRequestMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.Message.ExtendedTextMessageWithParentKey} ExtendedTextMessageWithParentKey + * @returns {proto.Message.FullHistorySyncOnDemandRequestMetadata} FullHistorySyncOnDemandRequestMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ExtendedTextMessageWithParentKey.decodeDelimited = function decodeDelimited(reader) { + FullHistorySyncOnDemandRequestMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ExtendedTextMessageWithParentKey message. + * Verifies a FullHistorySyncOnDemandRequestMetadata message. * @function verify - * @memberof proto.Message.ExtendedTextMessageWithParentKey + * @memberof proto.Message.FullHistorySyncOnDemandRequestMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ExtendedTextMessageWithParentKey.verify = function verify(message) { + FullHistorySyncOnDemandRequestMetadata.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.extendedTextMessage != null && message.hasOwnProperty("extendedTextMessage")) { - var error = $root.proto.Message.ExtendedTextMessage.verify(message.extendedTextMessage); - if (error) - return "extendedTextMessage." + error; + var properties = {}; + if (message.requestId != null && message.hasOwnProperty("requestId")) { + properties._requestId = 1; + if (!$util.isString(message.requestId)) + return "requestId: string expected"; } return null; }; /** - * Creates an ExtendedTextMessageWithParentKey message from a plain object. Also converts values to their respective internal types. + * Creates a FullHistorySyncOnDemandRequestMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof proto.Message.ExtendedTextMessageWithParentKey + * @memberof proto.Message.FullHistorySyncOnDemandRequestMetadata * @static * @param {Object.} object Plain object - * @returns {proto.Message.ExtendedTextMessageWithParentKey} ExtendedTextMessageWithParentKey + * @returns {proto.Message.FullHistorySyncOnDemandRequestMetadata} FullHistorySyncOnDemandRequestMetadata */ - ExtendedTextMessageWithParentKey.fromObject = function fromObject(object) { - if (object instanceof $root.proto.Message.ExtendedTextMessageWithParentKey) + FullHistorySyncOnDemandRequestMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.FullHistorySyncOnDemandRequestMetadata) return object; - var message = new $root.proto.Message.ExtendedTextMessageWithParentKey(); - if (object.key != null) { - if (typeof object.key !== "object") - throw TypeError(".proto.Message.ExtendedTextMessageWithParentKey.key: object expected"); - message.key = $root.proto.MessageKey.fromObject(object.key); - } - if (object.extendedTextMessage != null) { - if (typeof object.extendedTextMessage !== "object") - throw TypeError(".proto.Message.ExtendedTextMessageWithParentKey.extendedTextMessage: object expected"); - message.extendedTextMessage = $root.proto.Message.ExtendedTextMessage.fromObject(object.extendedTextMessage); - } + var message = new $root.proto.Message.FullHistorySyncOnDemandRequestMetadata(); + if (object.requestId != null) + message.requestId = String(object.requestId); return message; }; /** - * Creates a plain object from an ExtendedTextMessageWithParentKey message. Also converts values to other types if specified. + * Creates a plain object from a FullHistorySyncOnDemandRequestMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof proto.Message.ExtendedTextMessageWithParentKey + * @memberof proto.Message.FullHistorySyncOnDemandRequestMetadata * @static - * @param {proto.Message.ExtendedTextMessageWithParentKey} message ExtendedTextMessageWithParentKey + * @param {proto.Message.FullHistorySyncOnDemandRequestMetadata} message FullHistorySyncOnDemandRequestMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExtendedTextMessageWithParentKey.toObject = function toObject(message, options) { + FullHistorySyncOnDemandRequestMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.key = null; - object.extendedTextMessage = null; + if (message.requestId != null && message.hasOwnProperty("requestId")) { + object.requestId = message.requestId; + if (options.oneofs) + object._requestId = "requestId"; } - if (message.key != null && message.hasOwnProperty("key")) - object.key = $root.proto.MessageKey.toObject(message.key, options); - if (message.extendedTextMessage != null && message.hasOwnProperty("extendedTextMessage")) - object.extendedTextMessage = $root.proto.Message.ExtendedTextMessage.toObject(message.extendedTextMessage, options); return object; }; /** - * Converts this ExtendedTextMessageWithParentKey to JSON. + * Converts this FullHistorySyncOnDemandRequestMetadata to JSON. * @function toJSON - * @memberof proto.Message.ExtendedTextMessageWithParentKey + * @memberof proto.Message.FullHistorySyncOnDemandRequestMetadata * @instance * @returns {Object.} JSON object */ - ExtendedTextMessageWithParentKey.prototype.toJSON = function toJSON() { + FullHistorySyncOnDemandRequestMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ExtendedTextMessageWithParentKey; + /** + * Gets the default type url for FullHistorySyncOnDemandRequestMetadata + * @function getTypeUrl + * @memberof proto.Message.FullHistorySyncOnDemandRequestMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FullHistorySyncOnDemandRequestMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.FullHistorySyncOnDemandRequestMetadata"; + }; + + return FullHistorySyncOnDemandRequestMetadata; })(); Message.FutureProofMessage = (function() { @@ -39156,6 +67915,15 @@ $root.proto = (function() { */ FutureProofMessage.prototype.message = null; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(FutureProofMessage.prototype, "_message", { + get: $util.oneOfGetter($oneOfFields = ["message"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new FutureProofMessage instance using the specified properties. * @function create @@ -39216,9 +67984,10 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.message = $root.proto.Message.decode(reader, reader.uint32()); - break; + case 1: { + message.message = $root.proto.Message.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -39254,10 +68023,14 @@ $root.proto = (function() { FutureProofMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; if (message.message != null && message.hasOwnProperty("message")) { - var error = $root.proto.Message.verify(message.message); - if (error) - return "message." + error; + properties._message = 1; + { + var error = $root.proto.Message.verify(message.message); + if (error) + return "message." + error; + } } return null; }; @@ -39295,10 +68068,11 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) - object.message = null; - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && message.hasOwnProperty("message")) { object.message = $root.proto.Message.toObject(message.message, options); + if (options.oneofs) + object._message = "message"; + } return object; }; @@ -39313,6 +68087,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FutureProofMessage + * @function getTypeUrl + * @memberof proto.Message.FutureProofMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FutureProofMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.FutureProofMessage"; + }; + return FutureProofMessage; })(); @@ -39349,51 +68138,51 @@ $root.proto = (function() { /** * GroupInviteMessage groupJid. - * @member {string} groupJid + * @member {string|null|undefined} groupJid * @memberof proto.Message.GroupInviteMessage * @instance */ - GroupInviteMessage.prototype.groupJid = ""; + GroupInviteMessage.prototype.groupJid = null; /** * GroupInviteMessage inviteCode. - * @member {string} inviteCode + * @member {string|null|undefined} inviteCode * @memberof proto.Message.GroupInviteMessage * @instance */ - GroupInviteMessage.prototype.inviteCode = ""; + GroupInviteMessage.prototype.inviteCode = null; /** * GroupInviteMessage inviteExpiration. - * @member {number|Long} inviteExpiration + * @member {number|Long|null|undefined} inviteExpiration * @memberof proto.Message.GroupInviteMessage * @instance */ - GroupInviteMessage.prototype.inviteExpiration = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + GroupInviteMessage.prototype.inviteExpiration = null; /** * GroupInviteMessage groupName. - * @member {string} groupName + * @member {string|null|undefined} groupName * @memberof proto.Message.GroupInviteMessage * @instance */ - GroupInviteMessage.prototype.groupName = ""; + GroupInviteMessage.prototype.groupName = null; /** * GroupInviteMessage jpegThumbnail. - * @member {Uint8Array} jpegThumbnail + * @member {Uint8Array|null|undefined} jpegThumbnail * @memberof proto.Message.GroupInviteMessage * @instance */ - GroupInviteMessage.prototype.jpegThumbnail = $util.newBuffer([]); + GroupInviteMessage.prototype.jpegThumbnail = null; /** * GroupInviteMessage caption. - * @member {string} caption + * @member {string|null|undefined} caption * @memberof proto.Message.GroupInviteMessage * @instance */ - GroupInviteMessage.prototype.caption = ""; + GroupInviteMessage.prototype.caption = null; /** * GroupInviteMessage contextInfo. @@ -39405,11 +68194,62 @@ $root.proto = (function() { /** * GroupInviteMessage groupType. - * @member {proto.Message.GroupInviteMessage.GroupType} groupType + * @member {proto.Message.GroupInviteMessage.GroupType|null|undefined} groupType * @memberof proto.Message.GroupInviteMessage * @instance */ - GroupInviteMessage.prototype.groupType = 0; + GroupInviteMessage.prototype.groupType = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(GroupInviteMessage.prototype, "_groupJid", { + get: $util.oneOfGetter($oneOfFields = ["groupJid"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(GroupInviteMessage.prototype, "_inviteCode", { + get: $util.oneOfGetter($oneOfFields = ["inviteCode"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(GroupInviteMessage.prototype, "_inviteExpiration", { + get: $util.oneOfGetter($oneOfFields = ["inviteExpiration"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(GroupInviteMessage.prototype, "_groupName", { + get: $util.oneOfGetter($oneOfFields = ["groupName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(GroupInviteMessage.prototype, "_jpegThumbnail", { + get: $util.oneOfGetter($oneOfFields = ["jpegThumbnail"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(GroupInviteMessage.prototype, "_caption", { + get: $util.oneOfGetter($oneOfFields = ["caption"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(GroupInviteMessage.prototype, "_contextInfo", { + get: $util.oneOfGetter($oneOfFields = ["contextInfo"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(GroupInviteMessage.prototype, "_groupType", { + get: $util.oneOfGetter($oneOfFields = ["groupType"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new GroupInviteMessage instance using the specified properties. @@ -39485,30 +68325,38 @@ $root.proto = (function() { 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; + 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; @@ -39544,30 +68392,47 @@ $root.proto = (function() { GroupInviteMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.groupJid != null && message.hasOwnProperty("groupJid")) + var properties = {}; + if (message.groupJid != null && message.hasOwnProperty("groupJid")) { + properties._groupJid = 1; if (!$util.isString(message.groupJid)) return "groupJid: string expected"; - if (message.inviteCode != null && message.hasOwnProperty("inviteCode")) + } + if (message.inviteCode != null && message.hasOwnProperty("inviteCode")) { + properties._inviteCode = 1; if (!$util.isString(message.inviteCode)) return "inviteCode: string expected"; - if (message.inviteExpiration != null && message.hasOwnProperty("inviteExpiration")) + } + if (message.inviteExpiration != null && message.hasOwnProperty("inviteExpiration")) { + properties._inviteExpiration = 1; 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 (message.groupName != null && message.hasOwnProperty("groupName")) { + properties._groupName = 1; if (!$util.isString(message.groupName)) return "groupName: string expected"; - if (message.jpegThumbnail != null && message.hasOwnProperty("jpegThumbnail")) + } + if (message.jpegThumbnail != null && message.hasOwnProperty("jpegThumbnail")) { + properties._jpegThumbnail = 1; if (!(message.jpegThumbnail && typeof message.jpegThumbnail.length === "number" || $util.isString(message.jpegThumbnail))) return "jpegThumbnail: buffer expected"; - if (message.caption != null && message.hasOwnProperty("caption")) + } + if (message.caption != null && message.hasOwnProperty("caption")) { + properties._caption = 1; 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")) + if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) { + properties._contextInfo = 1; + { + var error = $root.proto.ContextInfo.verify(message.contextInfo); + if (error) + return "contextInfo." + error; + } + } + if (message.groupType != null && message.hasOwnProperty("groupType")) { + properties._groupType = 1; switch (message.groupType) { default: return "groupType: enum value expected"; @@ -39575,6 +68440,7 @@ $root.proto = (function() { case 1: break; } + } return null; }; @@ -39608,7 +68474,7 @@ $root.proto = (function() { 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) + else if (object.jpegThumbnail.length >= 0) message.jpegThumbnail = object.jpegThumbnail; if (object.caption != null) message.caption = String(object.caption); @@ -39618,6 +68484,12 @@ $root.proto = (function() { message.contextInfo = $root.proto.ContextInfo.fromObject(object.contextInfo); } switch (object.groupType) { + default: + if (typeof object.groupType === "number") { + message.groupType = object.groupType; + break; + } + break; case "DEFAULT": case 0: message.groupType = 0; @@ -39643,45 +68515,49 @@ $root.proto = (function() { 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")) + if (message.groupJid != null && message.hasOwnProperty("groupJid")) { object.groupJid = message.groupJid; - if (message.inviteCode != null && message.hasOwnProperty("inviteCode")) + if (options.oneofs) + object._groupJid = "groupJid"; + } + if (message.inviteCode != null && message.hasOwnProperty("inviteCode")) { object.inviteCode = message.inviteCode; - if (message.inviteExpiration != null && message.hasOwnProperty("inviteExpiration")) + if (options.oneofs) + object._inviteCode = "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")) + if (options.oneofs) + object._inviteExpiration = "inviteExpiration"; + } + if (message.groupName != null && message.hasOwnProperty("groupName")) { object.groupName = message.groupName; - if (message.jpegThumbnail != null && message.hasOwnProperty("jpegThumbnail")) + if (options.oneofs) + object._groupName = "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")) + if (options.oneofs) + object._jpegThumbnail = "jpegThumbnail"; + } + if (message.caption != null && message.hasOwnProperty("caption")) { object.caption = message.caption; - if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) + if (options.oneofs) + object._caption = "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; + if (options.oneofs) + object._contextInfo = "contextInfo"; + } + if (message.groupType != null && message.hasOwnProperty("groupType")) { + object.groupType = options.enums === String ? $root.proto.Message.GroupInviteMessage.GroupType[message.groupType] === undefined ? message.groupType : $root.proto.Message.GroupInviteMessage.GroupType[message.groupType] : message.groupType; + if (options.oneofs) + object._groupType = "groupType"; + } return object; }; @@ -39696,6 +68572,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GroupInviteMessage + * @function getTypeUrl + * @memberof proto.Message.GroupInviteMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GroupInviteMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.GroupInviteMessage"; + }; + /** * GroupType enum. * @name proto.Message.GroupInviteMessage.GroupType @@ -39749,19 +68640,19 @@ $root.proto = (function() { /** * HighlyStructuredMessage namespace. - * @member {string} namespace + * @member {string|null|undefined} namespace * @memberof proto.Message.HighlyStructuredMessage * @instance */ - HighlyStructuredMessage.prototype.namespace = ""; + HighlyStructuredMessage.prototype.namespace = null; /** * HighlyStructuredMessage elementName. - * @member {string} elementName + * @member {string|null|undefined} elementName * @memberof proto.Message.HighlyStructuredMessage * @instance */ - HighlyStructuredMessage.prototype.elementName = ""; + HighlyStructuredMessage.prototype.elementName = null; /** * HighlyStructuredMessage params. @@ -39773,19 +68664,19 @@ $root.proto = (function() { /** * HighlyStructuredMessage fallbackLg. - * @member {string} fallbackLg + * @member {string|null|undefined} fallbackLg * @memberof proto.Message.HighlyStructuredMessage * @instance */ - HighlyStructuredMessage.prototype.fallbackLg = ""; + HighlyStructuredMessage.prototype.fallbackLg = null; /** * HighlyStructuredMessage fallbackLc. - * @member {string} fallbackLc + * @member {string|null|undefined} fallbackLc * @memberof proto.Message.HighlyStructuredMessage * @instance */ - HighlyStructuredMessage.prototype.fallbackLc = ""; + HighlyStructuredMessage.prototype.fallbackLc = null; /** * HighlyStructuredMessage localizableParams. @@ -39797,19 +68688,19 @@ $root.proto = (function() { /** * HighlyStructuredMessage deterministicLg. - * @member {string} deterministicLg + * @member {string|null|undefined} deterministicLg * @memberof proto.Message.HighlyStructuredMessage * @instance */ - HighlyStructuredMessage.prototype.deterministicLg = ""; + HighlyStructuredMessage.prototype.deterministicLg = null; /** * HighlyStructuredMessage deterministicLc. - * @member {string} deterministicLc + * @member {string|null|undefined} deterministicLc * @memberof proto.Message.HighlyStructuredMessage * @instance */ - HighlyStructuredMessage.prototype.deterministicLc = ""; + HighlyStructuredMessage.prototype.deterministicLc = null; /** * HighlyStructuredMessage hydratedHsm. @@ -39819,6 +68710,51 @@ $root.proto = (function() { */ HighlyStructuredMessage.prototype.hydratedHsm = null; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HighlyStructuredMessage.prototype, "_namespace", { + get: $util.oneOfGetter($oneOfFields = ["namespace"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HighlyStructuredMessage.prototype, "_elementName", { + get: $util.oneOfGetter($oneOfFields = ["elementName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HighlyStructuredMessage.prototype, "_fallbackLg", { + get: $util.oneOfGetter($oneOfFields = ["fallbackLg"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HighlyStructuredMessage.prototype, "_fallbackLc", { + get: $util.oneOfGetter($oneOfFields = ["fallbackLc"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HighlyStructuredMessage.prototype, "_deterministicLg", { + get: $util.oneOfGetter($oneOfFields = ["deterministicLg"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HighlyStructuredMessage.prototype, "_deterministicLc", { + get: $util.oneOfGetter($oneOfFields = ["deterministicLc"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HighlyStructuredMessage.prototype, "_hydratedHsm", { + get: $util.oneOfGetter($oneOfFields = ["hydratedHsm"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new HighlyStructuredMessage instance using the specified properties. * @function create @@ -39897,37 +68833,46 @@ $root.proto = (function() { 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; + 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; @@ -39963,12 +68908,17 @@ $root.proto = (function() { HighlyStructuredMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.namespace != null && message.hasOwnProperty("namespace")) + var properties = {}; + if (message.namespace != null && message.hasOwnProperty("namespace")) { + properties._namespace = 1; if (!$util.isString(message.namespace)) return "namespace: string expected"; - if (message.elementName != null && message.hasOwnProperty("elementName")) + } + if (message.elementName != null && message.hasOwnProperty("elementName")) { + properties._elementName = 1; 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"; @@ -39976,12 +68926,16 @@ $root.proto = (function() { if (!$util.isString(message.params[i])) return "params: string[] expected"; } - if (message.fallbackLg != null && message.hasOwnProperty("fallbackLg")) + if (message.fallbackLg != null && message.hasOwnProperty("fallbackLg")) { + properties._fallbackLg = 1; if (!$util.isString(message.fallbackLg)) return "fallbackLg: string expected"; - if (message.fallbackLc != null && message.hasOwnProperty("fallbackLc")) + } + if (message.fallbackLc != null && message.hasOwnProperty("fallbackLc")) { + properties._fallbackLc = 1; 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"; @@ -39991,16 +68945,23 @@ $root.proto = (function() { return "localizableParams." + error; } } - if (message.deterministicLg != null && message.hasOwnProperty("deterministicLg")) + if (message.deterministicLg != null && message.hasOwnProperty("deterministicLg")) { + properties._deterministicLg = 1; if (!$util.isString(message.deterministicLg)) return "deterministicLg: string expected"; - if (message.deterministicLc != null && message.hasOwnProperty("deterministicLc")) + } + if (message.deterministicLc != null && message.hasOwnProperty("deterministicLc")) { + properties._deterministicLc = 1; 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; + properties._hydratedHsm = 1; + { + var error = $root.proto.Message.TemplateMessage.verify(message.hydratedHsm); + if (error) + return "hydratedHsm." + error; + } } return null; }; @@ -40071,39 +69032,51 @@ $root.proto = (function() { 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")) + if (message.namespace != null && message.hasOwnProperty("namespace")) { object.namespace = message.namespace; - if (message.elementName != null && message.hasOwnProperty("elementName")) + if (options.oneofs) + object._namespace = "namespace"; + } + if (message.elementName != null && message.hasOwnProperty("elementName")) { object.elementName = message.elementName; + if (options.oneofs) + object._elementName = "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")) + if (message.fallbackLg != null && message.hasOwnProperty("fallbackLg")) { object.fallbackLg = message.fallbackLg; - if (message.fallbackLc != null && message.hasOwnProperty("fallbackLc")) + if (options.oneofs) + object._fallbackLg = "fallbackLg"; + } + if (message.fallbackLc != null && message.hasOwnProperty("fallbackLc")) { object.fallbackLc = message.fallbackLc; + if (options.oneofs) + object._fallbackLc = "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")) + if (message.deterministicLg != null && message.hasOwnProperty("deterministicLg")) { object.deterministicLg = message.deterministicLg; - if (message.deterministicLc != null && message.hasOwnProperty("deterministicLc")) + if (options.oneofs) + object._deterministicLg = "deterministicLg"; + } + if (message.deterministicLc != null && message.hasOwnProperty("deterministicLc")) { object.deterministicLc = message.deterministicLc; - if (message.hydratedHsm != null && message.hasOwnProperty("hydratedHsm")) + if (options.oneofs) + object._deterministicLc = "deterministicLc"; + } + if (message.hydratedHsm != null && message.hasOwnProperty("hydratedHsm")) { object.hydratedHsm = $root.proto.Message.TemplateMessage.toObject(message.hydratedHsm, options); + if (options.oneofs) + object._hydratedHsm = "hydratedHsm"; + } return object; }; @@ -40118,6 +69091,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for HighlyStructuredMessage + * @function getTypeUrl + * @memberof proto.Message.HighlyStructuredMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HighlyStructuredMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.HighlyStructuredMessage"; + }; + HighlyStructuredMessage.HSMLocalizableParameter = (function() { /** @@ -40146,11 +69134,11 @@ $root.proto = (function() { /** * HSMLocalizableParameter default. - * @member {string} default + * @member {string|null|undefined} default * @memberof proto.Message.HighlyStructuredMessage.HSMLocalizableParameter * @instance */ - HSMLocalizableParameter.prototype["default"] = ""; + HSMLocalizableParameter.prototype["default"] = null; /** * HSMLocalizableParameter currency. @@ -40171,6 +69159,12 @@ $root.proto = (function() { // OneOf field names bound to virtual getters and setters var $oneOfFields; + // Virtual OneOf for proto3 optional field + Object.defineProperty(HSMLocalizableParameter.prototype, "_default", { + get: $util.oneOfGetter($oneOfFields = ["default"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * HSMLocalizableParameter paramOneof. * @member {"currency"|"dateTime"|undefined} paramOneof @@ -40246,15 +69240,18 @@ $root.proto = (function() { 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; + 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; @@ -40291,9 +69288,11 @@ $root.proto = (function() { if (typeof message !== "object" || message === null) return "object expected"; var properties = {}; - if (message["default"] != null && message.hasOwnProperty("default")) + if (message["default"] != null && message.hasOwnProperty("default")) { + properties._default = 1; if (!$util.isString(message["default"])) return "default: string expected"; + } if (message.currency != null && message.hasOwnProperty("currency")) { properties.paramOneof = 1; { @@ -40355,10 +69354,11 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) - object["default"] = ""; - if (message["default"] != null && message.hasOwnProperty("default")) + if (message["default"] != null && message.hasOwnProperty("default")) { object["default"] = message["default"]; + if (options.oneofs) + object._default = "default"; + } if (message.currency != null && message.hasOwnProperty("currency")) { object.currency = $root.proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMCurrency.toObject(message.currency, options); if (options.oneofs) @@ -40383,6 +69383,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for HSMLocalizableParameter + * @function getTypeUrl + * @memberof proto.Message.HighlyStructuredMessage.HSMLocalizableParameter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HSMLocalizableParameter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.HighlyStructuredMessage.HSMLocalizableParameter"; + }; + HSMLocalizableParameter.HSMCurrency = (function() { /** @@ -40410,19 +69425,34 @@ $root.proto = (function() { /** * HSMCurrency currencyCode. - * @member {string} currencyCode + * @member {string|null|undefined} currencyCode * @memberof proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMCurrency * @instance */ - HSMCurrency.prototype.currencyCode = ""; + HSMCurrency.prototype.currencyCode = null; /** * HSMCurrency amount1000. - * @member {number|Long} amount1000 + * @member {number|Long|null|undefined} amount1000 * @memberof proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMCurrency * @instance */ - HSMCurrency.prototype.amount1000 = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + HSMCurrency.prototype.amount1000 = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HSMCurrency.prototype, "_currencyCode", { + get: $util.oneOfGetter($oneOfFields = ["currencyCode"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HSMCurrency.prototype, "_amount1000", { + get: $util.oneOfGetter($oneOfFields = ["amount1000"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new HSMCurrency instance using the specified properties. @@ -40486,12 +69516,14 @@ $root.proto = (function() { 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; + case 1: { + message.currencyCode = reader.string(); + break; + } + case 2: { + message.amount1000 = reader.int64(); + break; + } default: reader.skipType(tag & 7); break; @@ -40527,12 +69559,17 @@ $root.proto = (function() { HSMCurrency.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) + var properties = {}; + if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) { + properties._currencyCode = 1; if (!$util.isString(message.currencyCode)) return "currencyCode: string expected"; - if (message.amount1000 != null && message.hasOwnProperty("amount1000")) + } + if (message.amount1000 != null && message.hasOwnProperty("amount1000")) { + properties._amount1000 = 1; if (!$util.isInteger(message.amount1000) && !(message.amount1000 && $util.isInteger(message.amount1000.low) && $util.isInteger(message.amount1000.high))) return "amount1000: integer|Long expected"; + } return null; }; @@ -40575,21 +69612,19 @@ $root.proto = (function() { 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")) + if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) { object.currencyCode = message.currencyCode; - if (message.amount1000 != null && message.hasOwnProperty("amount1000")) + if (options.oneofs) + object._currencyCode = "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; + if (options.oneofs) + object._amount1000 = "amount1000"; + } return object; }; @@ -40604,6 +69639,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for HSMCurrency + * @function getTypeUrl + * @memberof proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMCurrency + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HSMCurrency.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMCurrency"; + }; + return HSMCurrency; })(); @@ -40724,12 +69774,14 @@ $root.proto = (function() { 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; + 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; @@ -40849,6 +69901,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for HSMDateTime + * @function getTypeUrl + * @memberof proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HSMDateTime.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime"; + }; + HSMDateTime.HSMDateTimeComponent = (function() { /** @@ -40881,59 +69948,104 @@ $root.proto = (function() { /** * HSMDateTimeComponent dayOfWeek. - * @member {proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent.DayOfWeekType} dayOfWeek + * @member {proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent.DayOfWeekType|null|undefined} dayOfWeek * @memberof proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent * @instance */ - HSMDateTimeComponent.prototype.dayOfWeek = 1; + HSMDateTimeComponent.prototype.dayOfWeek = null; /** * HSMDateTimeComponent year. - * @member {number} year + * @member {number|null|undefined} year * @memberof proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent * @instance */ - HSMDateTimeComponent.prototype.year = 0; + HSMDateTimeComponent.prototype.year = null; /** * HSMDateTimeComponent month. - * @member {number} month + * @member {number|null|undefined} month * @memberof proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent * @instance */ - HSMDateTimeComponent.prototype.month = 0; + HSMDateTimeComponent.prototype.month = null; /** * HSMDateTimeComponent dayOfMonth. - * @member {number} dayOfMonth + * @member {number|null|undefined} dayOfMonth * @memberof proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent * @instance */ - HSMDateTimeComponent.prototype.dayOfMonth = 0; + HSMDateTimeComponent.prototype.dayOfMonth = null; /** * HSMDateTimeComponent hour. - * @member {number} hour + * @member {number|null|undefined} hour * @memberof proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent * @instance */ - HSMDateTimeComponent.prototype.hour = 0; + HSMDateTimeComponent.prototype.hour = null; /** * HSMDateTimeComponent minute. - * @member {number} minute + * @member {number|null|undefined} minute * @memberof proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent * @instance */ - HSMDateTimeComponent.prototype.minute = 0; + HSMDateTimeComponent.prototype.minute = null; /** * HSMDateTimeComponent calendar. - * @member {proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent.CalendarType} calendar + * @member {proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent.CalendarType|null|undefined} calendar * @memberof proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent * @instance */ - HSMDateTimeComponent.prototype.calendar = 1; + HSMDateTimeComponent.prototype.calendar = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HSMDateTimeComponent.prototype, "_dayOfWeek", { + get: $util.oneOfGetter($oneOfFields = ["dayOfWeek"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HSMDateTimeComponent.prototype, "_year", { + get: $util.oneOfGetter($oneOfFields = ["year"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HSMDateTimeComponent.prototype, "_month", { + get: $util.oneOfGetter($oneOfFields = ["month"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HSMDateTimeComponent.prototype, "_dayOfMonth", { + get: $util.oneOfGetter($oneOfFields = ["dayOfMonth"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HSMDateTimeComponent.prototype, "_hour", { + get: $util.oneOfGetter($oneOfFields = ["hour"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HSMDateTimeComponent.prototype, "_minute", { + get: $util.oneOfGetter($oneOfFields = ["minute"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HSMDateTimeComponent.prototype, "_calendar", { + get: $util.oneOfGetter($oneOfFields = ["calendar"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new HSMDateTimeComponent instance using the specified properties. @@ -41007,27 +70119,34 @@ $root.proto = (function() { 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; + 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; @@ -41063,7 +70182,9 @@ $root.proto = (function() { HSMDateTimeComponent.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.dayOfWeek != null && message.hasOwnProperty("dayOfWeek")) + var properties = {}; + if (message.dayOfWeek != null && message.hasOwnProperty("dayOfWeek")) { + properties._dayOfWeek = 1; switch (message.dayOfWeek) { default: return "dayOfWeek: enum value expected"; @@ -41076,22 +70197,34 @@ $root.proto = (function() { case 7: break; } - if (message.year != null && message.hasOwnProperty("year")) + } + if (message.year != null && message.hasOwnProperty("year")) { + properties._year = 1; if (!$util.isInteger(message.year)) return "year: integer expected"; - if (message.month != null && message.hasOwnProperty("month")) + } + if (message.month != null && message.hasOwnProperty("month")) { + properties._month = 1; if (!$util.isInteger(message.month)) return "month: integer expected"; - if (message.dayOfMonth != null && message.hasOwnProperty("dayOfMonth")) + } + if (message.dayOfMonth != null && message.hasOwnProperty("dayOfMonth")) { + properties._dayOfMonth = 1; if (!$util.isInteger(message.dayOfMonth)) return "dayOfMonth: integer expected"; - if (message.hour != null && message.hasOwnProperty("hour")) + } + if (message.hour != null && message.hasOwnProperty("hour")) { + properties._hour = 1; if (!$util.isInteger(message.hour)) return "hour: integer expected"; - if (message.minute != null && message.hasOwnProperty("minute")) + } + if (message.minute != null && message.hasOwnProperty("minute")) { + properties._minute = 1; if (!$util.isInteger(message.minute)) return "minute: integer expected"; - if (message.calendar != null && message.hasOwnProperty("calendar")) + } + if (message.calendar != null && message.hasOwnProperty("calendar")) { + properties._calendar = 1; switch (message.calendar) { default: return "calendar: enum value expected"; @@ -41099,6 +70232,7 @@ $root.proto = (function() { case 2: break; } + } return null; }; @@ -41115,6 +70249,12 @@ $root.proto = (function() { return object; var message = new $root.proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent(); switch (object.dayOfWeek) { + default: + if (typeof object.dayOfWeek === "number") { + message.dayOfWeek = object.dayOfWeek; + break; + } + break; case "MONDAY": case 1: message.dayOfWeek = 1; @@ -41155,6 +70295,12 @@ $root.proto = (function() { if (object.minute != null) message.minute = object.minute >>> 0; switch (object.calendar) { + default: + if (typeof object.calendar === "number") { + message.calendar = object.calendar; + break; + } + break; case "GREGORIAN": case 1: message.calendar = 1; @@ -41180,29 +70326,41 @@ $root.proto = (function() { 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] === undefined ? message.dayOfWeek : $root.proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent.DayOfWeekType[message.dayOfWeek] : message.dayOfWeek; + if (options.oneofs) + object._dayOfWeek = "dayOfWeek"; } - 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")) + if (message.year != null && message.hasOwnProperty("year")) { object.year = message.year; - if (message.month != null && message.hasOwnProperty("month")) + if (options.oneofs) + object._year = "year"; + } + if (message.month != null && message.hasOwnProperty("month")) { object.month = message.month; - if (message.dayOfMonth != null && message.hasOwnProperty("dayOfMonth")) + if (options.oneofs) + object._month = "month"; + } + if (message.dayOfMonth != null && message.hasOwnProperty("dayOfMonth")) { object.dayOfMonth = message.dayOfMonth; - if (message.hour != null && message.hasOwnProperty("hour")) + if (options.oneofs) + object._dayOfMonth = "dayOfMonth"; + } + if (message.hour != null && message.hasOwnProperty("hour")) { object.hour = message.hour; - if (message.minute != null && message.hasOwnProperty("minute")) + if (options.oneofs) + object._hour = "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; + if (options.oneofs) + object._minute = "minute"; + } + if (message.calendar != null && message.hasOwnProperty("calendar")) { + object.calendar = options.enums === String ? $root.proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent.CalendarType[message.calendar] === undefined ? message.calendar : $root.proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent.CalendarType[message.calendar] : message.calendar; + if (options.oneofs) + object._calendar = "calendar"; + } return object; }; @@ -41217,6 +70375,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for HSMDateTimeComponent + * @function getTypeUrl + * @memberof proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HSMDateTimeComponent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent"; + }; + /** * CalendarType enum. * @name proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent.CalendarType @@ -41284,11 +70457,20 @@ $root.proto = (function() { /** * HSMDateTimeUnixEpoch timestamp. - * @member {number|Long} timestamp + * @member {number|Long|null|undefined} timestamp * @memberof proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeUnixEpoch * @instance */ - HSMDateTimeUnixEpoch.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + HSMDateTimeUnixEpoch.prototype.timestamp = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HSMDateTimeUnixEpoch.prototype, "_timestamp", { + get: $util.oneOfGetter($oneOfFields = ["timestamp"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new HSMDateTimeUnixEpoch instance using the specified properties. @@ -41350,9 +70532,10 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.timestamp = reader.int64(); - break; + case 1: { + message.timestamp = reader.int64(); + break; + } default: reader.skipType(tag & 7); break; @@ -41388,9 +70571,12 @@ $root.proto = (function() { HSMDateTimeUnixEpoch.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.timestamp != null && message.hasOwnProperty("timestamp")) + var properties = {}; + if (message.timestamp != null && message.hasOwnProperty("timestamp")) { + properties._timestamp = 1; if (!$util.isInteger(message.timestamp) && !(message.timestamp && $util.isInteger(message.timestamp.low) && $util.isInteger(message.timestamp.high))) return "timestamp: integer|Long expected"; + } return null; }; @@ -41431,17 +70617,14 @@ $root.proto = (function() { 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 (message.timestamp != null && message.hasOwnProperty("timestamp")) { if (typeof message.timestamp === "number") object.timestamp = options.longs === String ? String(message.timestamp) : message.timestamp; else object.timestamp = options.longs === String ? $util.Long.prototype.toString.call(message.timestamp) : options.longs === Number ? new $util.LongBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0).toNumber() : message.timestamp; + if (options.oneofs) + object._timestamp = "timestamp"; + } return object; }; @@ -41456,6 +70639,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for HSMDateTimeUnixEpoch + * @function getTypeUrl + * @memberof proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeUnixEpoch + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HSMDateTimeUnixEpoch.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeUnixEpoch"; + }; + return HSMDateTimeUnixEpoch; })(); @@ -41486,6 +70684,8 @@ $root.proto = (function() { * @property {number|Long|null} [oldestMsgInChunkTimestampSec] HistorySyncNotification oldestMsgInChunkTimestampSec * @property {Uint8Array|null} [initialHistBootstrapInlinePayload] HistorySyncNotification initialHistBootstrapInlinePayload * @property {string|null} [peerDataRequestSessionId] HistorySyncNotification peerDataRequestSessionId + * @property {proto.Message.IFullHistorySyncOnDemandRequestMetadata|null} [fullHistorySyncOnDemandRequestMetadata] HistorySyncNotification fullHistorySyncOnDemandRequestMetadata + * @property {string|null} [encHandle] HistorySyncNotification encHandle */ /** @@ -41505,99 +70705,202 @@ $root.proto = (function() { /** * HistorySyncNotification fileSha256. - * @member {Uint8Array} fileSha256 + * @member {Uint8Array|null|undefined} fileSha256 * @memberof proto.Message.HistorySyncNotification * @instance */ - HistorySyncNotification.prototype.fileSha256 = $util.newBuffer([]); + HistorySyncNotification.prototype.fileSha256 = null; /** * HistorySyncNotification fileLength. - * @member {number|Long} fileLength + * @member {number|Long|null|undefined} fileLength * @memberof proto.Message.HistorySyncNotification * @instance */ - HistorySyncNotification.prototype.fileLength = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + HistorySyncNotification.prototype.fileLength = null; /** * HistorySyncNotification mediaKey. - * @member {Uint8Array} mediaKey + * @member {Uint8Array|null|undefined} mediaKey * @memberof proto.Message.HistorySyncNotification * @instance */ - HistorySyncNotification.prototype.mediaKey = $util.newBuffer([]); + HistorySyncNotification.prototype.mediaKey = null; /** * HistorySyncNotification fileEncSha256. - * @member {Uint8Array} fileEncSha256 + * @member {Uint8Array|null|undefined} fileEncSha256 * @memberof proto.Message.HistorySyncNotification * @instance */ - HistorySyncNotification.prototype.fileEncSha256 = $util.newBuffer([]); + HistorySyncNotification.prototype.fileEncSha256 = null; /** * HistorySyncNotification directPath. - * @member {string} directPath + * @member {string|null|undefined} directPath * @memberof proto.Message.HistorySyncNotification * @instance */ - HistorySyncNotification.prototype.directPath = ""; + HistorySyncNotification.prototype.directPath = null; /** * HistorySyncNotification syncType. - * @member {proto.Message.HistorySyncNotification.HistorySyncType} syncType + * @member {proto.Message.HistorySyncNotification.HistorySyncType|null|undefined} syncType * @memberof proto.Message.HistorySyncNotification * @instance */ - HistorySyncNotification.prototype.syncType = 0; + HistorySyncNotification.prototype.syncType = null; /** * HistorySyncNotification chunkOrder. - * @member {number} chunkOrder + * @member {number|null|undefined} chunkOrder * @memberof proto.Message.HistorySyncNotification * @instance */ - HistorySyncNotification.prototype.chunkOrder = 0; + HistorySyncNotification.prototype.chunkOrder = null; /** * HistorySyncNotification originalMessageId. - * @member {string} originalMessageId + * @member {string|null|undefined} originalMessageId * @memberof proto.Message.HistorySyncNotification * @instance */ - HistorySyncNotification.prototype.originalMessageId = ""; + HistorySyncNotification.prototype.originalMessageId = null; /** * HistorySyncNotification progress. - * @member {number} progress + * @member {number|null|undefined} progress * @memberof proto.Message.HistorySyncNotification * @instance */ - HistorySyncNotification.prototype.progress = 0; + HistorySyncNotification.prototype.progress = null; /** * HistorySyncNotification oldestMsgInChunkTimestampSec. - * @member {number|Long} oldestMsgInChunkTimestampSec + * @member {number|Long|null|undefined} oldestMsgInChunkTimestampSec * @memberof proto.Message.HistorySyncNotification * @instance */ - HistorySyncNotification.prototype.oldestMsgInChunkTimestampSec = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + HistorySyncNotification.prototype.oldestMsgInChunkTimestampSec = null; /** * HistorySyncNotification initialHistBootstrapInlinePayload. - * @member {Uint8Array} initialHistBootstrapInlinePayload + * @member {Uint8Array|null|undefined} initialHistBootstrapInlinePayload * @memberof proto.Message.HistorySyncNotification * @instance */ - HistorySyncNotification.prototype.initialHistBootstrapInlinePayload = $util.newBuffer([]); + HistorySyncNotification.prototype.initialHistBootstrapInlinePayload = null; /** * HistorySyncNotification peerDataRequestSessionId. - * @member {string} peerDataRequestSessionId + * @member {string|null|undefined} peerDataRequestSessionId * @memberof proto.Message.HistorySyncNotification * @instance */ - HistorySyncNotification.prototype.peerDataRequestSessionId = ""; + HistorySyncNotification.prototype.peerDataRequestSessionId = null; + + /** + * HistorySyncNotification fullHistorySyncOnDemandRequestMetadata. + * @member {proto.Message.IFullHistorySyncOnDemandRequestMetadata|null|undefined} fullHistorySyncOnDemandRequestMetadata + * @memberof proto.Message.HistorySyncNotification + * @instance + */ + HistorySyncNotification.prototype.fullHistorySyncOnDemandRequestMetadata = null; + + /** + * HistorySyncNotification encHandle. + * @member {string|null|undefined} encHandle + * @memberof proto.Message.HistorySyncNotification + * @instance + */ + HistorySyncNotification.prototype.encHandle = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HistorySyncNotification.prototype, "_fileSha256", { + get: $util.oneOfGetter($oneOfFields = ["fileSha256"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HistorySyncNotification.prototype, "_fileLength", { + get: $util.oneOfGetter($oneOfFields = ["fileLength"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HistorySyncNotification.prototype, "_mediaKey", { + get: $util.oneOfGetter($oneOfFields = ["mediaKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HistorySyncNotification.prototype, "_fileEncSha256", { + get: $util.oneOfGetter($oneOfFields = ["fileEncSha256"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HistorySyncNotification.prototype, "_directPath", { + get: $util.oneOfGetter($oneOfFields = ["directPath"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HistorySyncNotification.prototype, "_syncType", { + get: $util.oneOfGetter($oneOfFields = ["syncType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HistorySyncNotification.prototype, "_chunkOrder", { + get: $util.oneOfGetter($oneOfFields = ["chunkOrder"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HistorySyncNotification.prototype, "_originalMessageId", { + get: $util.oneOfGetter($oneOfFields = ["originalMessageId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HistorySyncNotification.prototype, "_progress", { + get: $util.oneOfGetter($oneOfFields = ["progress"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HistorySyncNotification.prototype, "_oldestMsgInChunkTimestampSec", { + get: $util.oneOfGetter($oneOfFields = ["oldestMsgInChunkTimestampSec"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HistorySyncNotification.prototype, "_initialHistBootstrapInlinePayload", { + get: $util.oneOfGetter($oneOfFields = ["initialHistBootstrapInlinePayload"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HistorySyncNotification.prototype, "_peerDataRequestSessionId", { + get: $util.oneOfGetter($oneOfFields = ["peerDataRequestSessionId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HistorySyncNotification.prototype, "_fullHistorySyncOnDemandRequestMetadata", { + get: $util.oneOfGetter($oneOfFields = ["fullHistorySyncOnDemandRequestMetadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HistorySyncNotification.prototype, "_encHandle", { + get: $util.oneOfGetter($oneOfFields = ["encHandle"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new HistorySyncNotification instance using the specified properties. @@ -41647,6 +70950,10 @@ $root.proto = (function() { writer.uint32(/* id 11, wireType 2 =*/90).bytes(message.initialHistBootstrapInlinePayload); if (message.peerDataRequestSessionId != null && Object.hasOwnProperty.call(message, "peerDataRequestSessionId")) writer.uint32(/* id 12, wireType 2 =*/98).string(message.peerDataRequestSessionId); + if (message.fullHistorySyncOnDemandRequestMetadata != null && Object.hasOwnProperty.call(message, "fullHistorySyncOnDemandRequestMetadata")) + $root.proto.Message.FullHistorySyncOnDemandRequestMetadata.encode(message.fullHistorySyncOnDemandRequestMetadata, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.encHandle != null && Object.hasOwnProperty.call(message, "encHandle")) + writer.uint32(/* id 14, wireType 2 =*/114).string(message.encHandle); return writer; }; @@ -41681,42 +70988,62 @@ $root.proto = (function() { 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; - case 10: - message.oldestMsgInChunkTimestampSec = reader.int64(); - break; - case 11: - message.initialHistBootstrapInlinePayload = reader.bytes(); - break; - case 12: - message.peerDataRequestSessionId = reader.string(); - break; + 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; + } + case 10: { + message.oldestMsgInChunkTimestampSec = reader.int64(); + break; + } + case 11: { + message.initialHistBootstrapInlinePayload = reader.bytes(); + break; + } + case 12: { + message.peerDataRequestSessionId = reader.string(); + break; + } + case 13: { + message.fullHistorySyncOnDemandRequestMetadata = $root.proto.Message.FullHistorySyncOnDemandRequestMetadata.decode(reader, reader.uint32()); + break; + } + case 14: { + message.encHandle = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -41752,22 +71079,34 @@ $root.proto = (function() { HistorySyncNotification.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) + var properties = {}; + if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) { + properties._fileSha256 = 1; if (!(message.fileSha256 && typeof message.fileSha256.length === "number" || $util.isString(message.fileSha256))) return "fileSha256: buffer expected"; - if (message.fileLength != null && message.hasOwnProperty("fileLength")) + } + if (message.fileLength != null && message.hasOwnProperty("fileLength")) { + properties._fileLength = 1; 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 != null && message.hasOwnProperty("mediaKey")) { + properties._mediaKey = 1; 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 != null && message.hasOwnProperty("fileEncSha256")) { + properties._fileEncSha256 = 1; if (!(message.fileEncSha256 && typeof message.fileEncSha256.length === "number" || $util.isString(message.fileEncSha256))) return "fileEncSha256: buffer expected"; - if (message.directPath != null && message.hasOwnProperty("directPath")) + } + if (message.directPath != null && message.hasOwnProperty("directPath")) { + properties._directPath = 1; if (!$util.isString(message.directPath)) return "directPath: string expected"; - if (message.syncType != null && message.hasOwnProperty("syncType")) + } + if (message.syncType != null && message.hasOwnProperty("syncType")) { + properties._syncType = 1; switch (message.syncType) { default: return "syncType: enum value expected"; @@ -41778,26 +71117,53 @@ $root.proto = (function() { case 4: case 5: case 6: + case 7: break; } - if (message.chunkOrder != null && message.hasOwnProperty("chunkOrder")) + } + if (message.chunkOrder != null && message.hasOwnProperty("chunkOrder")) { + properties._chunkOrder = 1; if (!$util.isInteger(message.chunkOrder)) return "chunkOrder: integer expected"; - if (message.originalMessageId != null && message.hasOwnProperty("originalMessageId")) + } + if (message.originalMessageId != null && message.hasOwnProperty("originalMessageId")) { + properties._originalMessageId = 1; if (!$util.isString(message.originalMessageId)) return "originalMessageId: string expected"; - if (message.progress != null && message.hasOwnProperty("progress")) + } + if (message.progress != null && message.hasOwnProperty("progress")) { + properties._progress = 1; if (!$util.isInteger(message.progress)) return "progress: integer expected"; - if (message.oldestMsgInChunkTimestampSec != null && message.hasOwnProperty("oldestMsgInChunkTimestampSec")) + } + if (message.oldestMsgInChunkTimestampSec != null && message.hasOwnProperty("oldestMsgInChunkTimestampSec")) { + properties._oldestMsgInChunkTimestampSec = 1; if (!$util.isInteger(message.oldestMsgInChunkTimestampSec) && !(message.oldestMsgInChunkTimestampSec && $util.isInteger(message.oldestMsgInChunkTimestampSec.low) && $util.isInteger(message.oldestMsgInChunkTimestampSec.high))) return "oldestMsgInChunkTimestampSec: integer|Long expected"; - if (message.initialHistBootstrapInlinePayload != null && message.hasOwnProperty("initialHistBootstrapInlinePayload")) + } + if (message.initialHistBootstrapInlinePayload != null && message.hasOwnProperty("initialHistBootstrapInlinePayload")) { + properties._initialHistBootstrapInlinePayload = 1; if (!(message.initialHistBootstrapInlinePayload && typeof message.initialHistBootstrapInlinePayload.length === "number" || $util.isString(message.initialHistBootstrapInlinePayload))) return "initialHistBootstrapInlinePayload: buffer expected"; - if (message.peerDataRequestSessionId != null && message.hasOwnProperty("peerDataRequestSessionId")) + } + if (message.peerDataRequestSessionId != null && message.hasOwnProperty("peerDataRequestSessionId")) { + properties._peerDataRequestSessionId = 1; if (!$util.isString(message.peerDataRequestSessionId)) return "peerDataRequestSessionId: string expected"; + } + if (message.fullHistorySyncOnDemandRequestMetadata != null && message.hasOwnProperty("fullHistorySyncOnDemandRequestMetadata")) { + properties._fullHistorySyncOnDemandRequestMetadata = 1; + { + var error = $root.proto.Message.FullHistorySyncOnDemandRequestMetadata.verify(message.fullHistorySyncOnDemandRequestMetadata); + if (error) + return "fullHistorySyncOnDemandRequestMetadata." + error; + } + } + if (message.encHandle != null && message.hasOwnProperty("encHandle")) { + properties._encHandle = 1; + if (!$util.isString(message.encHandle)) + return "encHandle: string expected"; + } return null; }; @@ -41816,7 +71182,7 @@ $root.proto = (function() { 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) + else if (object.fileSha256.length >= 0) message.fileSha256 = object.fileSha256; if (object.fileLength != null) if ($util.Long) @@ -41830,16 +71196,22 @@ $root.proto = (function() { 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) + else if (object.mediaKey.length >= 0) 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) + else if (object.fileEncSha256.length >= 0) message.fileEncSha256 = object.fileEncSha256; if (object.directPath != null) message.directPath = String(object.directPath); switch (object.syncType) { + default: + if (typeof object.syncType === "number") { + message.syncType = object.syncType; + break; + } + break; case "INITIAL_BOOTSTRAP": case 0: message.syncType = 0; @@ -41868,6 +71240,10 @@ $root.proto = (function() { case 6: message.syncType = 6; break; + case "NO_HISTORY": + case 7: + message.syncType = 7; + break; } if (object.chunkOrder != null) message.chunkOrder = object.chunkOrder >>> 0; @@ -41887,10 +71263,17 @@ $root.proto = (function() { if (object.initialHistBootstrapInlinePayload != null) if (typeof object.initialHistBootstrapInlinePayload === "string") $util.base64.decode(object.initialHistBootstrapInlinePayload, message.initialHistBootstrapInlinePayload = $util.newBuffer($util.base64.length(object.initialHistBootstrapInlinePayload)), 0); - else if (object.initialHistBootstrapInlinePayload.length) + else if (object.initialHistBootstrapInlinePayload.length >= 0) message.initialHistBootstrapInlinePayload = object.initialHistBootstrapInlinePayload; if (object.peerDataRequestSessionId != null) message.peerDataRequestSessionId = String(object.peerDataRequestSessionId); + if (object.fullHistorySyncOnDemandRequestMetadata != null) { + if (typeof object.fullHistorySyncOnDemandRequestMetadata !== "object") + throw TypeError(".proto.Message.HistorySyncNotification.fullHistorySyncOnDemandRequestMetadata: object expected"); + message.fullHistorySyncOnDemandRequestMetadata = $root.proto.Message.FullHistorySyncOnDemandRequestMetadata.fromObject(object.fullHistorySyncOnDemandRequestMetadata); + } + if (object.encHandle != null) + message.encHandle = String(object.encHandle); return message; }; @@ -41907,82 +71290,82 @@ $root.proto = (function() { 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 ($util.Long) { - var long = new $util.Long(0, 0, false); - object.oldestMsgInChunkTimestampSec = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.oldestMsgInChunkTimestampSec = options.longs === String ? "0" : 0; - if (options.bytes === String) - object.initialHistBootstrapInlinePayload = ""; - else { - object.initialHistBootstrapInlinePayload = []; - if (options.bytes !== Array) - object.initialHistBootstrapInlinePayload = $util.newBuffer(object.initialHistBootstrapInlinePayload); - } - object.peerDataRequestSessionId = ""; - } - if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) + 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 (options.oneofs) + object._fileSha256 = "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")) + if (options.oneofs) + object._fileLength = "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")) + if (options.oneofs) + object._mediaKey = "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")) + if (options.oneofs) + object._fileEncSha256 = "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")) + if (options.oneofs) + object._directPath = "directPath"; + } + if (message.syncType != null && message.hasOwnProperty("syncType")) { + object.syncType = options.enums === String ? $root.proto.Message.HistorySyncNotification.HistorySyncType[message.syncType] === undefined ? message.syncType : $root.proto.Message.HistorySyncNotification.HistorySyncType[message.syncType] : message.syncType; + if (options.oneofs) + object._syncType = "syncType"; + } + if (message.chunkOrder != null && message.hasOwnProperty("chunkOrder")) { object.chunkOrder = message.chunkOrder; - if (message.originalMessageId != null && message.hasOwnProperty("originalMessageId")) + if (options.oneofs) + object._chunkOrder = "chunkOrder"; + } + if (message.originalMessageId != null && message.hasOwnProperty("originalMessageId")) { object.originalMessageId = message.originalMessageId; - if (message.progress != null && message.hasOwnProperty("progress")) + if (options.oneofs) + object._originalMessageId = "originalMessageId"; + } + if (message.progress != null && message.hasOwnProperty("progress")) { object.progress = message.progress; - if (message.oldestMsgInChunkTimestampSec != null && message.hasOwnProperty("oldestMsgInChunkTimestampSec")) + if (options.oneofs) + object._progress = "progress"; + } + if (message.oldestMsgInChunkTimestampSec != null && message.hasOwnProperty("oldestMsgInChunkTimestampSec")) { if (typeof message.oldestMsgInChunkTimestampSec === "number") object.oldestMsgInChunkTimestampSec = options.longs === String ? String(message.oldestMsgInChunkTimestampSec) : message.oldestMsgInChunkTimestampSec; else object.oldestMsgInChunkTimestampSec = options.longs === String ? $util.Long.prototype.toString.call(message.oldestMsgInChunkTimestampSec) : options.longs === Number ? new $util.LongBits(message.oldestMsgInChunkTimestampSec.low >>> 0, message.oldestMsgInChunkTimestampSec.high >>> 0).toNumber() : message.oldestMsgInChunkTimestampSec; - if (message.initialHistBootstrapInlinePayload != null && message.hasOwnProperty("initialHistBootstrapInlinePayload")) + if (options.oneofs) + object._oldestMsgInChunkTimestampSec = "oldestMsgInChunkTimestampSec"; + } + if (message.initialHistBootstrapInlinePayload != null && message.hasOwnProperty("initialHistBootstrapInlinePayload")) { object.initialHistBootstrapInlinePayload = options.bytes === String ? $util.base64.encode(message.initialHistBootstrapInlinePayload, 0, message.initialHistBootstrapInlinePayload.length) : options.bytes === Array ? Array.prototype.slice.call(message.initialHistBootstrapInlinePayload) : message.initialHistBootstrapInlinePayload; - if (message.peerDataRequestSessionId != null && message.hasOwnProperty("peerDataRequestSessionId")) + if (options.oneofs) + object._initialHistBootstrapInlinePayload = "initialHistBootstrapInlinePayload"; + } + if (message.peerDataRequestSessionId != null && message.hasOwnProperty("peerDataRequestSessionId")) { object.peerDataRequestSessionId = message.peerDataRequestSessionId; + if (options.oneofs) + object._peerDataRequestSessionId = "peerDataRequestSessionId"; + } + if (message.fullHistorySyncOnDemandRequestMetadata != null && message.hasOwnProperty("fullHistorySyncOnDemandRequestMetadata")) { + object.fullHistorySyncOnDemandRequestMetadata = $root.proto.Message.FullHistorySyncOnDemandRequestMetadata.toObject(message.fullHistorySyncOnDemandRequestMetadata, options); + if (options.oneofs) + object._fullHistorySyncOnDemandRequestMetadata = "fullHistorySyncOnDemandRequestMetadata"; + } + if (message.encHandle != null && message.hasOwnProperty("encHandle")) { + object.encHandle = message.encHandle; + if (options.oneofs) + object._encHandle = "encHandle"; + } return object; }; @@ -41997,6 +71380,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for HistorySyncNotification + * @function getTypeUrl + * @memberof proto.Message.HistorySyncNotification + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HistorySyncNotification.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.HistorySyncNotification"; + }; + /** * HistorySyncType enum. * @name proto.Message.HistorySyncNotification.HistorySyncType @@ -42008,6 +71406,7 @@ $root.proto = (function() { * @property {number} PUSH_NAME=4 PUSH_NAME value * @property {number} NON_BLOCKING_DATA=5 NON_BLOCKING_DATA value * @property {number} ON_DEMAND=6 ON_DEMAND value + * @property {number} NO_HISTORY=7 NO_HISTORY value */ HistorySyncNotification.HistorySyncType = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -42018,6 +71417,7 @@ $root.proto = (function() { values[valuesById[4] = "PUSH_NAME"] = 4; values[valuesById[5] = "NON_BLOCKING_DATA"] = 5; values[valuesById[6] = "ON_DEMAND"] = 6; + values[valuesById[7] = "NO_HISTORY"] = 7; return values; })(); @@ -42057,6 +71457,8 @@ $root.proto = (function() { * @property {Uint8Array|null} [thumbnailEncSha256] ImageMessage thumbnailEncSha256 * @property {string|null} [staticUrl] ImageMessage staticUrl * @property {Array.|null} [annotations] ImageMessage annotations + * @property {proto.Message.ImageMessage.ImageSourceType|null} [imageSourceType] ImageMessage imageSourceType + * @property {string|null} [accessibilityLabel] ImageMessage accessibilityLabel */ /** @@ -42079,75 +71481,75 @@ $root.proto = (function() { /** * ImageMessage url. - * @member {string} url + * @member {string|null|undefined} url * @memberof proto.Message.ImageMessage * @instance */ - ImageMessage.prototype.url = ""; + ImageMessage.prototype.url = null; /** * ImageMessage mimetype. - * @member {string} mimetype + * @member {string|null|undefined} mimetype * @memberof proto.Message.ImageMessage * @instance */ - ImageMessage.prototype.mimetype = ""; + ImageMessage.prototype.mimetype = null; /** * ImageMessage caption. - * @member {string} caption + * @member {string|null|undefined} caption * @memberof proto.Message.ImageMessage * @instance */ - ImageMessage.prototype.caption = ""; + ImageMessage.prototype.caption = null; /** * ImageMessage fileSha256. - * @member {Uint8Array} fileSha256 + * @member {Uint8Array|null|undefined} fileSha256 * @memberof proto.Message.ImageMessage * @instance */ - ImageMessage.prototype.fileSha256 = $util.newBuffer([]); + ImageMessage.prototype.fileSha256 = null; /** * ImageMessage fileLength. - * @member {number|Long} fileLength + * @member {number|Long|null|undefined} fileLength * @memberof proto.Message.ImageMessage * @instance */ - ImageMessage.prototype.fileLength = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + ImageMessage.prototype.fileLength = null; /** * ImageMessage height. - * @member {number} height + * @member {number|null|undefined} height * @memberof proto.Message.ImageMessage * @instance */ - ImageMessage.prototype.height = 0; + ImageMessage.prototype.height = null; /** * ImageMessage width. - * @member {number} width + * @member {number|null|undefined} width * @memberof proto.Message.ImageMessage * @instance */ - ImageMessage.prototype.width = 0; + ImageMessage.prototype.width = null; /** * ImageMessage mediaKey. - * @member {Uint8Array} mediaKey + * @member {Uint8Array|null|undefined} mediaKey * @memberof proto.Message.ImageMessage * @instance */ - ImageMessage.prototype.mediaKey = $util.newBuffer([]); + ImageMessage.prototype.mediaKey = null; /** * ImageMessage fileEncSha256. - * @member {Uint8Array} fileEncSha256 + * @member {Uint8Array|null|undefined} fileEncSha256 * @memberof proto.Message.ImageMessage * @instance */ - ImageMessage.prototype.fileEncSha256 = $util.newBuffer([]); + ImageMessage.prototype.fileEncSha256 = null; /** * ImageMessage interactiveAnnotations. @@ -42159,27 +71561,27 @@ $root.proto = (function() { /** * ImageMessage directPath. - * @member {string} directPath + * @member {string|null|undefined} directPath * @memberof proto.Message.ImageMessage * @instance */ - ImageMessage.prototype.directPath = ""; + ImageMessage.prototype.directPath = null; /** * ImageMessage mediaKeyTimestamp. - * @member {number|Long} mediaKeyTimestamp + * @member {number|Long|null|undefined} mediaKeyTimestamp * @memberof proto.Message.ImageMessage * @instance */ - ImageMessage.prototype.mediaKeyTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + ImageMessage.prototype.mediaKeyTimestamp = null; /** * ImageMessage jpegThumbnail. - * @member {Uint8Array} jpegThumbnail + * @member {Uint8Array|null|undefined} jpegThumbnail * @memberof proto.Message.ImageMessage * @instance */ - ImageMessage.prototype.jpegThumbnail = $util.newBuffer([]); + ImageMessage.prototype.jpegThumbnail = null; /** * ImageMessage contextInfo. @@ -42191,35 +71593,35 @@ $root.proto = (function() { /** * ImageMessage firstScanSidecar. - * @member {Uint8Array} firstScanSidecar + * @member {Uint8Array|null|undefined} firstScanSidecar * @memberof proto.Message.ImageMessage * @instance */ - ImageMessage.prototype.firstScanSidecar = $util.newBuffer([]); + ImageMessage.prototype.firstScanSidecar = null; /** * ImageMessage firstScanLength. - * @member {number} firstScanLength + * @member {number|null|undefined} firstScanLength * @memberof proto.Message.ImageMessage * @instance */ - ImageMessage.prototype.firstScanLength = 0; + ImageMessage.prototype.firstScanLength = null; /** * ImageMessage experimentGroupId. - * @member {number} experimentGroupId + * @member {number|null|undefined} experimentGroupId * @memberof proto.Message.ImageMessage * @instance */ - ImageMessage.prototype.experimentGroupId = 0; + ImageMessage.prototype.experimentGroupId = null; /** * ImageMessage scansSidecar. - * @member {Uint8Array} scansSidecar + * @member {Uint8Array|null|undefined} scansSidecar * @memberof proto.Message.ImageMessage * @instance */ - ImageMessage.prototype.scansSidecar = $util.newBuffer([]); + ImageMessage.prototype.scansSidecar = null; /** * ImageMessage scanLengths. @@ -42231,59 +71633,59 @@ $root.proto = (function() { /** * ImageMessage midQualityFileSha256. - * @member {Uint8Array} midQualityFileSha256 + * @member {Uint8Array|null|undefined} midQualityFileSha256 * @memberof proto.Message.ImageMessage * @instance */ - ImageMessage.prototype.midQualityFileSha256 = $util.newBuffer([]); + ImageMessage.prototype.midQualityFileSha256 = null; /** * ImageMessage midQualityFileEncSha256. - * @member {Uint8Array} midQualityFileEncSha256 + * @member {Uint8Array|null|undefined} midQualityFileEncSha256 * @memberof proto.Message.ImageMessage * @instance */ - ImageMessage.prototype.midQualityFileEncSha256 = $util.newBuffer([]); + ImageMessage.prototype.midQualityFileEncSha256 = null; /** * ImageMessage viewOnce. - * @member {boolean} viewOnce + * @member {boolean|null|undefined} viewOnce * @memberof proto.Message.ImageMessage * @instance */ - ImageMessage.prototype.viewOnce = false; + ImageMessage.prototype.viewOnce = null; /** * ImageMessage thumbnailDirectPath. - * @member {string} thumbnailDirectPath + * @member {string|null|undefined} thumbnailDirectPath * @memberof proto.Message.ImageMessage * @instance */ - ImageMessage.prototype.thumbnailDirectPath = ""; + ImageMessage.prototype.thumbnailDirectPath = null; /** * ImageMessage thumbnailSha256. - * @member {Uint8Array} thumbnailSha256 + * @member {Uint8Array|null|undefined} thumbnailSha256 * @memberof proto.Message.ImageMessage * @instance */ - ImageMessage.prototype.thumbnailSha256 = $util.newBuffer([]); + ImageMessage.prototype.thumbnailSha256 = null; /** * ImageMessage thumbnailEncSha256. - * @member {Uint8Array} thumbnailEncSha256 + * @member {Uint8Array|null|undefined} thumbnailEncSha256 * @memberof proto.Message.ImageMessage * @instance */ - ImageMessage.prototype.thumbnailEncSha256 = $util.newBuffer([]); + ImageMessage.prototype.thumbnailEncSha256 = null; /** * ImageMessage staticUrl. - * @member {string} staticUrl + * @member {string|null|undefined} staticUrl * @memberof proto.Message.ImageMessage * @instance */ - ImageMessage.prototype.staticUrl = ""; + ImageMessage.prototype.staticUrl = null; /** * ImageMessage annotations. @@ -42293,6 +71695,181 @@ $root.proto = (function() { */ ImageMessage.prototype.annotations = $util.emptyArray; + /** + * ImageMessage imageSourceType. + * @member {proto.Message.ImageMessage.ImageSourceType|null|undefined} imageSourceType + * @memberof proto.Message.ImageMessage + * @instance + */ + ImageMessage.prototype.imageSourceType = null; + + /** + * ImageMessage accessibilityLabel. + * @member {string|null|undefined} accessibilityLabel + * @memberof proto.Message.ImageMessage + * @instance + */ + ImageMessage.prototype.accessibilityLabel = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ImageMessage.prototype, "_url", { + get: $util.oneOfGetter($oneOfFields = ["url"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ImageMessage.prototype, "_mimetype", { + get: $util.oneOfGetter($oneOfFields = ["mimetype"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ImageMessage.prototype, "_caption", { + get: $util.oneOfGetter($oneOfFields = ["caption"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ImageMessage.prototype, "_fileSha256", { + get: $util.oneOfGetter($oneOfFields = ["fileSha256"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ImageMessage.prototype, "_fileLength", { + get: $util.oneOfGetter($oneOfFields = ["fileLength"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ImageMessage.prototype, "_height", { + get: $util.oneOfGetter($oneOfFields = ["height"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ImageMessage.prototype, "_width", { + get: $util.oneOfGetter($oneOfFields = ["width"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ImageMessage.prototype, "_mediaKey", { + get: $util.oneOfGetter($oneOfFields = ["mediaKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ImageMessage.prototype, "_fileEncSha256", { + get: $util.oneOfGetter($oneOfFields = ["fileEncSha256"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ImageMessage.prototype, "_directPath", { + get: $util.oneOfGetter($oneOfFields = ["directPath"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ImageMessage.prototype, "_mediaKeyTimestamp", { + get: $util.oneOfGetter($oneOfFields = ["mediaKeyTimestamp"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ImageMessage.prototype, "_jpegThumbnail", { + get: $util.oneOfGetter($oneOfFields = ["jpegThumbnail"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ImageMessage.prototype, "_contextInfo", { + get: $util.oneOfGetter($oneOfFields = ["contextInfo"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ImageMessage.prototype, "_firstScanSidecar", { + get: $util.oneOfGetter($oneOfFields = ["firstScanSidecar"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ImageMessage.prototype, "_firstScanLength", { + get: $util.oneOfGetter($oneOfFields = ["firstScanLength"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ImageMessage.prototype, "_experimentGroupId", { + get: $util.oneOfGetter($oneOfFields = ["experimentGroupId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ImageMessage.prototype, "_scansSidecar", { + get: $util.oneOfGetter($oneOfFields = ["scansSidecar"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ImageMessage.prototype, "_midQualityFileSha256", { + get: $util.oneOfGetter($oneOfFields = ["midQualityFileSha256"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ImageMessage.prototype, "_midQualityFileEncSha256", { + get: $util.oneOfGetter($oneOfFields = ["midQualityFileEncSha256"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ImageMessage.prototype, "_viewOnce", { + get: $util.oneOfGetter($oneOfFields = ["viewOnce"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ImageMessage.prototype, "_thumbnailDirectPath", { + get: $util.oneOfGetter($oneOfFields = ["thumbnailDirectPath"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ImageMessage.prototype, "_thumbnailSha256", { + get: $util.oneOfGetter($oneOfFields = ["thumbnailSha256"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ImageMessage.prototype, "_thumbnailEncSha256", { + get: $util.oneOfGetter($oneOfFields = ["thumbnailEncSha256"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ImageMessage.prototype, "_staticUrl", { + get: $util.oneOfGetter($oneOfFields = ["staticUrl"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ImageMessage.prototype, "_imageSourceType", { + get: $util.oneOfGetter($oneOfFields = ["imageSourceType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ImageMessage.prototype, "_accessibilityLabel", { + get: $util.oneOfGetter($oneOfFields = ["accessibilityLabel"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new ImageMessage instance using the specified properties. * @function create @@ -42354,9 +71931,12 @@ $root.proto = (function() { 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) + if (message.scanLengths != null && message.scanLengths.length) { + writer.uint32(/* id 22, wireType 2 =*/178).fork(); for (var i = 0; i < message.scanLengths.length; ++i) - writer.uint32(/* id 22, wireType 0 =*/176).uint32(message.scanLengths[i]); + writer.uint32(message.scanLengths[i]); + writer.ldelim(); + } 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")) @@ -42374,6 +71954,10 @@ $root.proto = (function() { if (message.annotations != null && message.annotations.length) for (var i = 0; i < message.annotations.length; ++i) $root.proto.InteractiveAnnotation.encode(message.annotations[i], writer.uint32(/* id 30, wireType 2 =*/242).fork()).ldelim(); + if (message.imageSourceType != null && Object.hasOwnProperty.call(message, "imageSourceType")) + writer.uint32(/* id 31, wireType 0 =*/248).int32(message.imageSourceType); + if (message.accessibilityLabel != null && Object.hasOwnProperty.call(message, "accessibilityLabel")) + writer.uint32(/* id 32, wireType 2 =*/258).string(message.accessibilityLabel); return writer; }; @@ -42408,98 +71992,133 @@ $root.proto = (function() { 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) + 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()); - } 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; - case 30: - if (!(message.annotations && message.annotations.length)) - message.annotations = []; - message.annotations.push($root.proto.InteractiveAnnotation.decode(reader, reader.uint32())); - break; + 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; + } + case 30: { + if (!(message.annotations && message.annotations.length)) + message.annotations = []; + message.annotations.push($root.proto.InteractiveAnnotation.decode(reader, reader.uint32())); + break; + } + case 31: { + message.imageSourceType = reader.int32(); + break; + } + case 32: { + message.accessibilityLabel = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -42535,33 +72154,52 @@ $root.proto = (function() { ImageMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.url != null && message.hasOwnProperty("url")) + var properties = {}; + if (message.url != null && message.hasOwnProperty("url")) { + properties._url = 1; if (!$util.isString(message.url)) return "url: string expected"; - if (message.mimetype != null && message.hasOwnProperty("mimetype")) + } + if (message.mimetype != null && message.hasOwnProperty("mimetype")) { + properties._mimetype = 1; if (!$util.isString(message.mimetype)) return "mimetype: string expected"; - if (message.caption != null && message.hasOwnProperty("caption")) + } + if (message.caption != null && message.hasOwnProperty("caption")) { + properties._caption = 1; if (!$util.isString(message.caption)) return "caption: string expected"; - if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) + } + if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) { + properties._fileSha256 = 1; if (!(message.fileSha256 && typeof message.fileSha256.length === "number" || $util.isString(message.fileSha256))) return "fileSha256: buffer expected"; - if (message.fileLength != null && message.hasOwnProperty("fileLength")) + } + if (message.fileLength != null && message.hasOwnProperty("fileLength")) { + properties._fileLength = 1; 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 (message.height != null && message.hasOwnProperty("height")) { + properties._height = 1; if (!$util.isInteger(message.height)) return "height: integer expected"; - if (message.width != null && message.hasOwnProperty("width")) + } + if (message.width != null && message.hasOwnProperty("width")) { + properties._width = 1; if (!$util.isInteger(message.width)) return "width: integer expected"; - if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) + } + if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) { + properties._mediaKey = 1; 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 != null && message.hasOwnProperty("fileEncSha256")) { + properties._fileEncSha256 = 1; 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"; @@ -42571,32 +72209,49 @@ $root.proto = (function() { return "interactiveAnnotations." + error; } } - if (message.directPath != null && message.hasOwnProperty("directPath")) + if (message.directPath != null && message.hasOwnProperty("directPath")) { + properties._directPath = 1; if (!$util.isString(message.directPath)) return "directPath: string expected"; - if (message.mediaKeyTimestamp != null && message.hasOwnProperty("mediaKeyTimestamp")) + } + if (message.mediaKeyTimestamp != null && message.hasOwnProperty("mediaKeyTimestamp")) { + properties._mediaKeyTimestamp = 1; 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 != null && message.hasOwnProperty("jpegThumbnail")) { + properties._jpegThumbnail = 1; 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.contextInfo != null && message.hasOwnProperty("contextInfo")) { + properties._contextInfo = 1; + { + var error = $root.proto.ContextInfo.verify(message.contextInfo); + if (error) + return "contextInfo." + error; + } + } + if (message.firstScanSidecar != null && message.hasOwnProperty("firstScanSidecar")) { + properties._firstScanSidecar = 1; if (!(message.firstScanSidecar && typeof message.firstScanSidecar.length === "number" || $util.isString(message.firstScanSidecar))) return "firstScanSidecar: buffer expected"; - if (message.firstScanLength != null && message.hasOwnProperty("firstScanLength")) + } + if (message.firstScanLength != null && message.hasOwnProperty("firstScanLength")) { + properties._firstScanLength = 1; if (!$util.isInteger(message.firstScanLength)) return "firstScanLength: integer expected"; - if (message.experimentGroupId != null && message.hasOwnProperty("experimentGroupId")) + } + if (message.experimentGroupId != null && message.hasOwnProperty("experimentGroupId")) { + properties._experimentGroupId = 1; if (!$util.isInteger(message.experimentGroupId)) return "experimentGroupId: integer expected"; - if (message.scansSidecar != null && message.hasOwnProperty("scansSidecar")) + } + if (message.scansSidecar != null && message.hasOwnProperty("scansSidecar")) { + properties._scansSidecar = 1; 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"; @@ -42604,27 +72259,41 @@ $root.proto = (function() { if (!$util.isInteger(message.scanLengths[i])) return "scanLengths: integer[] expected"; } - if (message.midQualityFileSha256 != null && message.hasOwnProperty("midQualityFileSha256")) + if (message.midQualityFileSha256 != null && message.hasOwnProperty("midQualityFileSha256")) { + properties._midQualityFileSha256 = 1; 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 != null && message.hasOwnProperty("midQualityFileEncSha256")) { + properties._midQualityFileEncSha256 = 1; if (!(message.midQualityFileEncSha256 && typeof message.midQualityFileEncSha256.length === "number" || $util.isString(message.midQualityFileEncSha256))) return "midQualityFileEncSha256: buffer expected"; - if (message.viewOnce != null && message.hasOwnProperty("viewOnce")) + } + if (message.viewOnce != null && message.hasOwnProperty("viewOnce")) { + properties._viewOnce = 1; if (typeof message.viewOnce !== "boolean") return "viewOnce: boolean expected"; - if (message.thumbnailDirectPath != null && message.hasOwnProperty("thumbnailDirectPath")) + } + if (message.thumbnailDirectPath != null && message.hasOwnProperty("thumbnailDirectPath")) { + properties._thumbnailDirectPath = 1; if (!$util.isString(message.thumbnailDirectPath)) return "thumbnailDirectPath: string expected"; - if (message.thumbnailSha256 != null && message.hasOwnProperty("thumbnailSha256")) + } + if (message.thumbnailSha256 != null && message.hasOwnProperty("thumbnailSha256")) { + properties._thumbnailSha256 = 1; 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 != null && message.hasOwnProperty("thumbnailEncSha256")) { + properties._thumbnailEncSha256 = 1; if (!(message.thumbnailEncSha256 && typeof message.thumbnailEncSha256.length === "number" || $util.isString(message.thumbnailEncSha256))) return "thumbnailEncSha256: buffer expected"; - if (message.staticUrl != null && message.hasOwnProperty("staticUrl")) + } + if (message.staticUrl != null && message.hasOwnProperty("staticUrl")) { + properties._staticUrl = 1; if (!$util.isString(message.staticUrl)) return "staticUrl: string expected"; + } if (message.annotations != null && message.hasOwnProperty("annotations")) { if (!Array.isArray(message.annotations)) return "annotations: array expected"; @@ -42634,6 +72303,23 @@ $root.proto = (function() { return "annotations." + error; } } + if (message.imageSourceType != null && message.hasOwnProperty("imageSourceType")) { + properties._imageSourceType = 1; + switch (message.imageSourceType) { + default: + return "imageSourceType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + } + if (message.accessibilityLabel != null && message.hasOwnProperty("accessibilityLabel")) { + properties._accessibilityLabel = 1; + if (!$util.isString(message.accessibilityLabel)) + return "accessibilityLabel: string expected"; + } return null; }; @@ -42658,7 +72344,7 @@ $root.proto = (function() { 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) + else if (object.fileSha256.length >= 0) message.fileSha256 = object.fileSha256; if (object.fileLength != null) if ($util.Long) @@ -42676,12 +72362,12 @@ $root.proto = (function() { 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) + else if (object.mediaKey.length >= 0) 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) + else if (object.fileEncSha256.length >= 0) message.fileEncSha256 = object.fileEncSha256; if (object.interactiveAnnotations) { if (!Array.isArray(object.interactiveAnnotations)) @@ -42707,7 +72393,7 @@ $root.proto = (function() { 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) + else if (object.jpegThumbnail.length >= 0) message.jpegThumbnail = object.jpegThumbnail; if (object.contextInfo != null) { if (typeof object.contextInfo !== "object") @@ -42717,7 +72403,7 @@ $root.proto = (function() { 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) + else if (object.firstScanSidecar.length >= 0) message.firstScanSidecar = object.firstScanSidecar; if (object.firstScanLength != null) message.firstScanLength = object.firstScanLength >>> 0; @@ -42726,7 +72412,7 @@ $root.proto = (function() { 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) + else if (object.scansSidecar.length >= 0) message.scansSidecar = object.scansSidecar; if (object.scanLengths) { if (!Array.isArray(object.scanLengths)) @@ -42738,12 +72424,12 @@ $root.proto = (function() { 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) + else if (object.midQualityFileSha256.length >= 0) 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) + else if (object.midQualityFileEncSha256.length >= 0) message.midQualityFileEncSha256 = object.midQualityFileEncSha256; if (object.viewOnce != null) message.viewOnce = Boolean(object.viewOnce); @@ -42752,12 +72438,12 @@ $root.proto = (function() { 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) + else if (object.thumbnailSha256.length >= 0) 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) + else if (object.thumbnailEncSha256.length >= 0) message.thumbnailEncSha256 = object.thumbnailEncSha256; if (object.staticUrl != null) message.staticUrl = String(object.staticUrl); @@ -42771,6 +72457,32 @@ $root.proto = (function() { message.annotations[i] = $root.proto.InteractiveAnnotation.fromObject(object.annotations[i]); } } + switch (object.imageSourceType) { + default: + if (typeof object.imageSourceType === "number") { + message.imageSourceType = object.imageSourceType; + break; + } + break; + case "USER_IMAGE": + case 0: + message.imageSourceType = 0; + break; + case "AI_GENERATED": + case 1: + message.imageSourceType = 1; + break; + case "AI_MODIFIED": + case 2: + message.imageSourceType = 2; + break; + case "RASTERIZED_TEXT_STATUS": + case 3: + message.imageSourceType = 3; + break; + } + if (object.accessibilityLabel != null) + message.accessibilityLabel = String(object.accessibilityLabel); return message; }; @@ -42792,169 +72504,157 @@ $root.proto = (function() { object.scanLengths = []; object.annotations = []; } - 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")) + if (message.url != null && message.hasOwnProperty("url")) { object.url = message.url; - if (message.mimetype != null && message.hasOwnProperty("mimetype")) + if (options.oneofs) + object._url = "url"; + } + if (message.mimetype != null && message.hasOwnProperty("mimetype")) { object.mimetype = message.mimetype; - if (message.caption != null && message.hasOwnProperty("caption")) + if (options.oneofs) + object._mimetype = "mimetype"; + } + if (message.caption != null && message.hasOwnProperty("caption")) { object.caption = message.caption; - if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) + if (options.oneofs) + object._caption = "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 (options.oneofs) + object._fileSha256 = "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")) + if (options.oneofs) + object._fileLength = "fileLength"; + } + if (message.height != null && message.hasOwnProperty("height")) { object.height = message.height; - if (message.width != null && message.hasOwnProperty("width")) + if (options.oneofs) + object._height = "height"; + } + if (message.width != null && message.hasOwnProperty("width")) { object.width = message.width; - if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) + if (options.oneofs) + object._width = "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")) + if (options.oneofs) + object._mediaKey = "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 (options.oneofs) + object._fileEncSha256 = "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")) + if (message.directPath != null && message.hasOwnProperty("directPath")) { object.directPath = message.directPath; - if (message.mediaKeyTimestamp != null && message.hasOwnProperty("mediaKeyTimestamp")) + if (options.oneofs) + object._directPath = "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")) + if (options.oneofs) + object._mediaKeyTimestamp = "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")) + if (options.oneofs) + object._jpegThumbnail = "jpegThumbnail"; + } + if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) { object.contextInfo = $root.proto.ContextInfo.toObject(message.contextInfo, options); - if (message.firstScanSidecar != null && message.hasOwnProperty("firstScanSidecar")) + if (options.oneofs) + object._contextInfo = "contextInfo"; + } + 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")) + if (options.oneofs) + object._firstScanSidecar = "firstScanSidecar"; + } + if (message.firstScanLength != null && message.hasOwnProperty("firstScanLength")) { object.firstScanLength = message.firstScanLength; - if (message.experimentGroupId != null && message.hasOwnProperty("experimentGroupId")) + if (options.oneofs) + object._firstScanLength = "firstScanLength"; + } + if (message.experimentGroupId != null && message.hasOwnProperty("experimentGroupId")) { object.experimentGroupId = message.experimentGroupId; - if (message.scansSidecar != null && message.hasOwnProperty("scansSidecar")) + if (options.oneofs) + object._experimentGroupId = "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 (options.oneofs) + object._scansSidecar = "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")) + 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")) + if (options.oneofs) + object._midQualityFileSha256 = "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")) + if (options.oneofs) + object._midQualityFileEncSha256 = "midQualityFileEncSha256"; + } + if (message.viewOnce != null && message.hasOwnProperty("viewOnce")) { object.viewOnce = message.viewOnce; - if (message.thumbnailDirectPath != null && message.hasOwnProperty("thumbnailDirectPath")) + if (options.oneofs) + object._viewOnce = "viewOnce"; + } + if (message.thumbnailDirectPath != null && message.hasOwnProperty("thumbnailDirectPath")) { object.thumbnailDirectPath = message.thumbnailDirectPath; - if (message.thumbnailSha256 != null && message.hasOwnProperty("thumbnailSha256")) + if (options.oneofs) + object._thumbnailDirectPath = "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")) + if (options.oneofs) + object._thumbnailSha256 = "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")) + if (options.oneofs) + object._thumbnailEncSha256 = "thumbnailEncSha256"; + } + if (message.staticUrl != null && message.hasOwnProperty("staticUrl")) { object.staticUrl = message.staticUrl; + if (options.oneofs) + object._staticUrl = "staticUrl"; + } if (message.annotations && message.annotations.length) { object.annotations = []; for (var j = 0; j < message.annotations.length; ++j) object.annotations[j] = $root.proto.InteractiveAnnotation.toObject(message.annotations[j], options); } + if (message.imageSourceType != null && message.hasOwnProperty("imageSourceType")) { + object.imageSourceType = options.enums === String ? $root.proto.Message.ImageMessage.ImageSourceType[message.imageSourceType] === undefined ? message.imageSourceType : $root.proto.Message.ImageMessage.ImageSourceType[message.imageSourceType] : message.imageSourceType; + if (options.oneofs) + object._imageSourceType = "imageSourceType"; + } + if (message.accessibilityLabel != null && message.hasOwnProperty("accessibilityLabel")) { + object.accessibilityLabel = message.accessibilityLabel; + if (options.oneofs) + object._accessibilityLabel = "accessibilityLabel"; + } return object; }; @@ -42969,6 +72669,39 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ImageMessage + * @function getTypeUrl + * @memberof proto.Message.ImageMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ImageMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.ImageMessage"; + }; + + /** + * ImageSourceType enum. + * @name proto.Message.ImageMessage.ImageSourceType + * @enum {number} + * @property {number} USER_IMAGE=0 USER_IMAGE value + * @property {number} AI_GENERATED=1 AI_GENERATED value + * @property {number} AI_MODIFIED=2 AI_MODIFIED value + * @property {number} RASTERIZED_TEXT_STATUS=3 RASTERIZED_TEXT_STATUS value + */ + ImageMessage.ImageSourceType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "USER_IMAGE"] = 0; + values[valuesById[1] = "AI_GENERATED"] = 1; + values[valuesById[2] = "AI_MODIFIED"] = 2; + values[valuesById[3] = "RASTERIZED_TEXT_STATUS"] = 3; + return values; + })(); + return ImageMessage; })(); @@ -42998,11 +72731,20 @@ $root.proto = (function() { /** * InitialSecurityNotificationSettingSync securityNotificationEnabled. - * @member {boolean} securityNotificationEnabled + * @member {boolean|null|undefined} securityNotificationEnabled * @memberof proto.Message.InitialSecurityNotificationSettingSync * @instance */ - InitialSecurityNotificationSettingSync.prototype.securityNotificationEnabled = false; + InitialSecurityNotificationSettingSync.prototype.securityNotificationEnabled = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(InitialSecurityNotificationSettingSync.prototype, "_securityNotificationEnabled", { + get: $util.oneOfGetter($oneOfFields = ["securityNotificationEnabled"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new InitialSecurityNotificationSettingSync instance using the specified properties. @@ -43064,9 +72806,10 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.securityNotificationEnabled = reader.bool(); - break; + case 1: { + message.securityNotificationEnabled = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -43102,9 +72845,12 @@ $root.proto = (function() { InitialSecurityNotificationSettingSync.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.securityNotificationEnabled != null && message.hasOwnProperty("securityNotificationEnabled")) + var properties = {}; + if (message.securityNotificationEnabled != null && message.hasOwnProperty("securityNotificationEnabled")) { + properties._securityNotificationEnabled = 1; if (typeof message.securityNotificationEnabled !== "boolean") return "securityNotificationEnabled: boolean expected"; + } return null; }; @@ -43138,10 +72884,11 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) - object.securityNotificationEnabled = false; - if (message.securityNotificationEnabled != null && message.hasOwnProperty("securityNotificationEnabled")) + if (message.securityNotificationEnabled != null && message.hasOwnProperty("securityNotificationEnabled")) { object.securityNotificationEnabled = message.securityNotificationEnabled; + if (options.oneofs) + object._securityNotificationEnabled = "securityNotificationEnabled"; + } return object; }; @@ -43156,6 +72903,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for InitialSecurityNotificationSettingSync + * @function getTypeUrl + * @memberof proto.Message.InitialSecurityNotificationSettingSync + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InitialSecurityNotificationSettingSync.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.InitialSecurityNotificationSettingSync"; + }; + return InitialSecurityNotificationSettingSync; })(); @@ -43169,6 +72931,7 @@ $root.proto = (function() { * @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.IUrlTrackingMap|null} [urlTrackingMap] InteractiveMessage urlTrackingMap * @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 @@ -43222,6 +72985,14 @@ $root.proto = (function() { */ InteractiveMessage.prototype.contextInfo = null; + /** + * InteractiveMessage urlTrackingMap. + * @member {proto.IUrlTrackingMap|null|undefined} urlTrackingMap + * @memberof proto.Message.InteractiveMessage + * @instance + */ + InteractiveMessage.prototype.urlTrackingMap = null; + /** * InteractiveMessage shopStorefrontMessage. * @member {proto.Message.InteractiveMessage.IShopMessage|null|undefined} shopStorefrontMessage @@ -43257,6 +73028,36 @@ $root.proto = (function() { // OneOf field names bound to virtual getters and setters var $oneOfFields; + // Virtual OneOf for proto3 optional field + Object.defineProperty(InteractiveMessage.prototype, "_header", { + get: $util.oneOfGetter($oneOfFields = ["header"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(InteractiveMessage.prototype, "_body", { + get: $util.oneOfGetter($oneOfFields = ["body"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(InteractiveMessage.prototype, "_footer", { + get: $util.oneOfGetter($oneOfFields = ["footer"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(InteractiveMessage.prototype, "_contextInfo", { + get: $util.oneOfGetter($oneOfFields = ["contextInfo"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(InteractiveMessage.prototype, "_urlTrackingMap", { + get: $util.oneOfGetter($oneOfFields = ["urlTrackingMap"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * InteractiveMessage interactiveMessage. * @member {"shopStorefrontMessage"|"collectionMessage"|"nativeFlowMessage"|"carouselMessage"|undefined} interactiveMessage @@ -43308,6 +73109,8 @@ $root.proto = (function() { $root.proto.Message.InteractiveMessage.CarouselMessage.encode(message.carouselMessage, writer.uint32(/* id 7, wireType 2 =*/58).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(); + if (message.urlTrackingMap != null && Object.hasOwnProperty.call(message, "urlTrackingMap")) + $root.proto.UrlTrackingMap.encode(message.urlTrackingMap, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); return writer; }; @@ -43342,30 +73145,42 @@ $root.proto = (function() { 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; - case 7: - message.carouselMessage = $root.proto.Message.InteractiveMessage.CarouselMessage.decode(reader, reader.uint32()); - break; + 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 16: { + message.urlTrackingMap = $root.proto.UrlTrackingMap.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; + } + case 7: { + message.carouselMessage = $root.proto.Message.InteractiveMessage.CarouselMessage.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -43403,24 +73218,44 @@ $root.proto = (function() { 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; + properties._header = 1; + { + 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; + properties._body = 1; + { + 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; + properties._footer = 1; + { + 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; + properties._contextInfo = 1; + { + var error = $root.proto.ContextInfo.verify(message.contextInfo); + if (error) + return "contextInfo." + error; + } + } + if (message.urlTrackingMap != null && message.hasOwnProperty("urlTrackingMap")) { + properties._urlTrackingMap = 1; + { + var error = $root.proto.UrlTrackingMap.verify(message.urlTrackingMap); + if (error) + return "urlTrackingMap." + error; + } } if (message.shopStorefrontMessage != null && message.hasOwnProperty("shopStorefrontMessage")) { properties.interactiveMessage = 1; @@ -43495,6 +73330,11 @@ $root.proto = (function() { throw TypeError(".proto.Message.InteractiveMessage.contextInfo: object expected"); message.contextInfo = $root.proto.ContextInfo.fromObject(object.contextInfo); } + if (object.urlTrackingMap != null) { + if (typeof object.urlTrackingMap !== "object") + throw TypeError(".proto.Message.InteractiveMessage.urlTrackingMap: object expected"); + message.urlTrackingMap = $root.proto.UrlTrackingMap.fromObject(object.urlTrackingMap); + } if (object.shopStorefrontMessage != null) { if (typeof object.shopStorefrontMessage !== "object") throw TypeError(".proto.Message.InteractiveMessage.shopStorefrontMessage: object expected"); @@ -43531,18 +73371,21 @@ $root.proto = (function() { 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")) + 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")) + if (options.oneofs) + object._header = "header"; + } + 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")) + if (options.oneofs) + object._body = "body"; + } + if (message.footer != null && message.hasOwnProperty("footer")) { object.footer = $root.proto.Message.InteractiveMessage.Footer.toObject(message.footer, options); + if (options.oneofs) + object._footer = "footer"; + } if (message.shopStorefrontMessage != null && message.hasOwnProperty("shopStorefrontMessage")) { object.shopStorefrontMessage = $root.proto.Message.InteractiveMessage.ShopMessage.toObject(message.shopStorefrontMessage, options); if (options.oneofs) @@ -43563,8 +73406,16 @@ $root.proto = (function() { if (options.oneofs) object.interactiveMessage = "carouselMessage"; } - if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) + if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) { object.contextInfo = $root.proto.ContextInfo.toObject(message.contextInfo, options); + if (options.oneofs) + object._contextInfo = "contextInfo"; + } + if (message.urlTrackingMap != null && message.hasOwnProperty("urlTrackingMap")) { + object.urlTrackingMap = $root.proto.UrlTrackingMap.toObject(message.urlTrackingMap, options); + if (options.oneofs) + object._urlTrackingMap = "urlTrackingMap"; + } return object; }; @@ -43579,6 +73430,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for InteractiveMessage + * @function getTypeUrl + * @memberof proto.Message.InteractiveMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InteractiveMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.InteractiveMessage"; + }; + InteractiveMessage.Body = (function() { /** @@ -43605,11 +73471,20 @@ $root.proto = (function() { /** * Body text. - * @member {string} text + * @member {string|null|undefined} text * @memberof proto.Message.InteractiveMessage.Body * @instance */ - Body.prototype.text = ""; + Body.prototype.text = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Body.prototype, "_text", { + get: $util.oneOfGetter($oneOfFields = ["text"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new Body instance using the specified properties. @@ -43671,9 +73546,10 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.text = reader.string(); - break; + case 1: { + message.text = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -43709,9 +73585,12 @@ $root.proto = (function() { Body.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.text != null && message.hasOwnProperty("text")) + var properties = {}; + if (message.text != null && message.hasOwnProperty("text")) { + properties._text = 1; if (!$util.isString(message.text)) return "text: string expected"; + } return null; }; @@ -43745,10 +73624,11 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) - object.text = ""; - if (message.text != null && message.hasOwnProperty("text")) + if (message.text != null && message.hasOwnProperty("text")) { object.text = message.text; + if (options.oneofs) + object._text = "text"; + } return object; }; @@ -43763,6 +73643,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Body + * @function getTypeUrl + * @memberof proto.Message.InteractiveMessage.Body + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Body.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.InteractiveMessage.Body"; + }; + return Body; })(); @@ -43802,11 +73697,20 @@ $root.proto = (function() { /** * CarouselMessage messageVersion. - * @member {number} messageVersion + * @member {number|null|undefined} messageVersion * @memberof proto.Message.InteractiveMessage.CarouselMessage * @instance */ - CarouselMessage.prototype.messageVersion = 0; + CarouselMessage.prototype.messageVersion = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CarouselMessage.prototype, "_messageVersion", { + get: $util.oneOfGetter($oneOfFields = ["messageVersion"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new CarouselMessage instance using the specified properties. @@ -43871,14 +73775,16 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.cards && message.cards.length)) - message.cards = []; - message.cards.push($root.proto.Message.InteractiveMessage.decode(reader, reader.uint32())); - break; - case 2: - message.messageVersion = reader.int32(); - break; + case 1: { + if (!(message.cards && message.cards.length)) + message.cards = []; + message.cards.push($root.proto.Message.InteractiveMessage.decode(reader, reader.uint32())); + break; + } + case 2: { + message.messageVersion = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -43914,6 +73820,7 @@ $root.proto = (function() { CarouselMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; if (message.cards != null && message.hasOwnProperty("cards")) { if (!Array.isArray(message.cards)) return "cards: array expected"; @@ -43923,9 +73830,11 @@ $root.proto = (function() { return "cards." + error; } } - if (message.messageVersion != null && message.hasOwnProperty("messageVersion")) + if (message.messageVersion != null && message.hasOwnProperty("messageVersion")) { + properties._messageVersion = 1; if (!$util.isInteger(message.messageVersion)) return "messageVersion: integer expected"; + } return null; }; @@ -43971,15 +73880,16 @@ $root.proto = (function() { var object = {}; if (options.arrays || options.defaults) object.cards = []; - if (options.defaults) - object.messageVersion = 0; if (message.cards && message.cards.length) { object.cards = []; for (var j = 0; j < message.cards.length; ++j) object.cards[j] = $root.proto.Message.InteractiveMessage.toObject(message.cards[j], options); } - if (message.messageVersion != null && message.hasOwnProperty("messageVersion")) + if (message.messageVersion != null && message.hasOwnProperty("messageVersion")) { object.messageVersion = message.messageVersion; + if (options.oneofs) + object._messageVersion = "messageVersion"; + } return object; }; @@ -43994,6 +73904,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CarouselMessage + * @function getTypeUrl + * @memberof proto.Message.InteractiveMessage.CarouselMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CarouselMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.InteractiveMessage.CarouselMessage"; + }; + return CarouselMessage; })(); @@ -44025,27 +73950,48 @@ $root.proto = (function() { /** * CollectionMessage bizJid. - * @member {string} bizJid + * @member {string|null|undefined} bizJid * @memberof proto.Message.InteractiveMessage.CollectionMessage * @instance */ - CollectionMessage.prototype.bizJid = ""; + CollectionMessage.prototype.bizJid = null; /** * CollectionMessage id. - * @member {string} id + * @member {string|null|undefined} id * @memberof proto.Message.InteractiveMessage.CollectionMessage * @instance */ - CollectionMessage.prototype.id = ""; + CollectionMessage.prototype.id = null; /** * CollectionMessage messageVersion. - * @member {number} messageVersion + * @member {number|null|undefined} messageVersion * @memberof proto.Message.InteractiveMessage.CollectionMessage * @instance */ - CollectionMessage.prototype.messageVersion = 0; + CollectionMessage.prototype.messageVersion = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CollectionMessage.prototype, "_bizJid", { + get: $util.oneOfGetter($oneOfFields = ["bizJid"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CollectionMessage.prototype, "_id", { + get: $util.oneOfGetter($oneOfFields = ["id"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CollectionMessage.prototype, "_messageVersion", { + get: $util.oneOfGetter($oneOfFields = ["messageVersion"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new CollectionMessage instance using the specified properties. @@ -44111,15 +74057,18 @@ $root.proto = (function() { 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; + 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; @@ -44155,15 +74104,22 @@ $root.proto = (function() { CollectionMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.bizJid != null && message.hasOwnProperty("bizJid")) + var properties = {}; + if (message.bizJid != null && message.hasOwnProperty("bizJid")) { + properties._bizJid = 1; if (!$util.isString(message.bizJid)) return "bizJid: string expected"; - if (message.id != null && message.hasOwnProperty("id")) + } + if (message.id != null && message.hasOwnProperty("id")) { + properties._id = 1; if (!$util.isString(message.id)) return "id: string expected"; - if (message.messageVersion != null && message.hasOwnProperty("messageVersion")) + } + if (message.messageVersion != null && message.hasOwnProperty("messageVersion")) { + properties._messageVersion = 1; if (!$util.isInteger(message.messageVersion)) return "messageVersion: integer expected"; + } return null; }; @@ -44201,17 +74157,21 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.bizJid = ""; - object.id = ""; - object.messageVersion = 0; - } - if (message.bizJid != null && message.hasOwnProperty("bizJid")) + if (message.bizJid != null && message.hasOwnProperty("bizJid")) { object.bizJid = message.bizJid; - if (message.id != null && message.hasOwnProperty("id")) + if (options.oneofs) + object._bizJid = "bizJid"; + } + if (message.id != null && message.hasOwnProperty("id")) { object.id = message.id; - if (message.messageVersion != null && message.hasOwnProperty("messageVersion")) + if (options.oneofs) + object._id = "id"; + } + if (message.messageVersion != null && message.hasOwnProperty("messageVersion")) { object.messageVersion = message.messageVersion; + if (options.oneofs) + object._messageVersion = "messageVersion"; + } return object; }; @@ -44226,6 +74186,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CollectionMessage + * @function getTypeUrl + * @memberof proto.Message.InteractiveMessage.CollectionMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CollectionMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.InteractiveMessage.CollectionMessage"; + }; + return CollectionMessage; })(); @@ -44255,11 +74230,20 @@ $root.proto = (function() { /** * Footer text. - * @member {string} text + * @member {string|null|undefined} text * @memberof proto.Message.InteractiveMessage.Footer * @instance */ - Footer.prototype.text = ""; + Footer.prototype.text = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Footer.prototype, "_text", { + get: $util.oneOfGetter($oneOfFields = ["text"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new Footer instance using the specified properties. @@ -44321,9 +74305,10 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.text = reader.string(); - break; + case 1: { + message.text = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -44359,9 +74344,12 @@ $root.proto = (function() { Footer.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.text != null && message.hasOwnProperty("text")) + var properties = {}; + if (message.text != null && message.hasOwnProperty("text")) { + properties._text = 1; if (!$util.isString(message.text)) return "text: string expected"; + } return null; }; @@ -44395,10 +74383,11 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) - object.text = ""; - if (message.text != null && message.hasOwnProperty("text")) + if (message.text != null && message.hasOwnProperty("text")) { object.text = message.text; + if (options.oneofs) + object._text = "text"; + } return object; }; @@ -44413,6 +74402,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Footer + * @function getTypeUrl + * @memberof proto.Message.InteractiveMessage.Footer + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Footer.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.InteractiveMessage.Footer"; + }; + return Footer; })(); @@ -44430,6 +74434,7 @@ $root.proto = (function() { * @property {Uint8Array|null} [jpegThumbnail] Header jpegThumbnail * @property {proto.Message.IVideoMessage|null} [videoMessage] Header videoMessage * @property {proto.Message.ILocationMessage|null} [locationMessage] Header locationMessage + * @property {proto.Message.IProductMessage|null} [productMessage] Header productMessage */ /** @@ -44449,27 +74454,27 @@ $root.proto = (function() { /** * Header title. - * @member {string} title + * @member {string|null|undefined} title * @memberof proto.Message.InteractiveMessage.Header * @instance */ - Header.prototype.title = ""; + Header.prototype.title = null; /** * Header subtitle. - * @member {string} subtitle + * @member {string|null|undefined} subtitle * @memberof proto.Message.InteractiveMessage.Header * @instance */ - Header.prototype.subtitle = ""; + Header.prototype.subtitle = null; /** * Header hasMediaAttachment. - * @member {boolean} hasMediaAttachment + * @member {boolean|null|undefined} hasMediaAttachment * @memberof proto.Message.InteractiveMessage.Header * @instance */ - Header.prototype.hasMediaAttachment = false; + Header.prototype.hasMediaAttachment = null; /** * Header documentMessage. @@ -44511,17 +74516,43 @@ $root.proto = (function() { */ Header.prototype.locationMessage = null; + /** + * Header productMessage. + * @member {proto.Message.IProductMessage|null|undefined} productMessage + * @memberof proto.Message.InteractiveMessage.Header + * @instance + */ + Header.prototype.productMessage = null; + // OneOf field names bound to virtual getters and setters var $oneOfFields; + // Virtual OneOf for proto3 optional field + Object.defineProperty(Header.prototype, "_title", { + get: $util.oneOfGetter($oneOfFields = ["title"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Header.prototype, "_subtitle", { + get: $util.oneOfGetter($oneOfFields = ["subtitle"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Header.prototype, "_hasMediaAttachment", { + get: $util.oneOfGetter($oneOfFields = ["hasMediaAttachment"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Header media. - * @member {"documentMessage"|"imageMessage"|"jpegThumbnail"|"videoMessage"|"locationMessage"|undefined} media + * @member {"documentMessage"|"imageMessage"|"jpegThumbnail"|"videoMessage"|"locationMessage"|"productMessage"|undefined} media * @memberof proto.Message.InteractiveMessage.Header * @instance */ Object.defineProperty(Header.prototype, "media", { - get: $util.oneOfGetter($oneOfFields = ["documentMessage", "imageMessage", "jpegThumbnail", "videoMessage", "locationMessage"]), + get: $util.oneOfGetter($oneOfFields = ["documentMessage", "imageMessage", "jpegThumbnail", "videoMessage", "locationMessage", "productMessage"]), set: $util.oneOfSetter($oneOfFields) }); @@ -44565,6 +74596,8 @@ $root.proto = (function() { $root.proto.Message.VideoMessage.encode(message.videoMessage, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); if (message.locationMessage != null && Object.hasOwnProperty.call(message, "locationMessage")) $root.proto.Message.LocationMessage.encode(message.locationMessage, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.productMessage != null && Object.hasOwnProperty.call(message, "productMessage")) + $root.proto.Message.ProductMessage.encode(message.productMessage, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); return writer; }; @@ -44599,30 +74632,42 @@ $root.proto = (function() { 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; - case 8: - message.locationMessage = $root.proto.Message.LocationMessage.decode(reader, reader.uint32()); - break; + 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; + } + case 8: { + message.locationMessage = $root.proto.Message.LocationMessage.decode(reader, reader.uint32()); + break; + } + case 9: { + message.productMessage = $root.proto.Message.ProductMessage.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -44659,15 +74704,21 @@ $root.proto = (function() { if (typeof message !== "object" || message === null) return "object expected"; var properties = {}; - if (message.title != null && message.hasOwnProperty("title")) + if (message.title != null && message.hasOwnProperty("title")) { + properties._title = 1; if (!$util.isString(message.title)) return "title: string expected"; - if (message.subtitle != null && message.hasOwnProperty("subtitle")) + } + if (message.subtitle != null && message.hasOwnProperty("subtitle")) { + properties._subtitle = 1; if (!$util.isString(message.subtitle)) return "subtitle: string expected"; - if (message.hasMediaAttachment != null && message.hasOwnProperty("hasMediaAttachment")) + } + if (message.hasMediaAttachment != null && message.hasOwnProperty("hasMediaAttachment")) { + properties._hasMediaAttachment = 1; if (typeof message.hasMediaAttachment !== "boolean") return "hasMediaAttachment: boolean expected"; + } if (message.documentMessage != null && message.hasOwnProperty("documentMessage")) { properties.media = 1; { @@ -44713,6 +74764,16 @@ $root.proto = (function() { return "locationMessage." + error; } } + if (message.productMessage != null && message.hasOwnProperty("productMessage")) { + if (properties.media === 1) + return "media: multiple values"; + properties.media = 1; + { + var error = $root.proto.Message.ProductMessage.verify(message.productMessage); + if (error) + return "productMessage." + error; + } + } return null; }; @@ -44747,7 +74808,7 @@ $root.proto = (function() { 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) + else if (object.jpegThumbnail.length >= 0) message.jpegThumbnail = object.jpegThumbnail; if (object.videoMessage != null) { if (typeof object.videoMessage !== "object") @@ -44759,6 +74820,11 @@ $root.proto = (function() { throw TypeError(".proto.Message.InteractiveMessage.Header.locationMessage: object expected"); message.locationMessage = $root.proto.Message.LocationMessage.fromObject(object.locationMessage); } + if (object.productMessage != null) { + if (typeof object.productMessage !== "object") + throw TypeError(".proto.Message.InteractiveMessage.Header.productMessage: object expected"); + message.productMessage = $root.proto.Message.ProductMessage.fromObject(object.productMessage); + } return message; }; @@ -44775,15 +74841,16 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.title = ""; - object.subtitle = ""; - object.hasMediaAttachment = false; - } - if (message.title != null && message.hasOwnProperty("title")) + if (message.title != null && message.hasOwnProperty("title")) { object.title = message.title; - if (message.subtitle != null && message.hasOwnProperty("subtitle")) + if (options.oneofs) + object._title = "title"; + } + if (message.subtitle != null && message.hasOwnProperty("subtitle")) { object.subtitle = message.subtitle; + if (options.oneofs) + object._subtitle = "subtitle"; + } if (message.documentMessage != null && message.hasOwnProperty("documentMessage")) { object.documentMessage = $root.proto.Message.DocumentMessage.toObject(message.documentMessage, options); if (options.oneofs) @@ -44794,8 +74861,11 @@ $root.proto = (function() { if (options.oneofs) object.media = "imageMessage"; } - if (message.hasMediaAttachment != null && message.hasOwnProperty("hasMediaAttachment")) + if (message.hasMediaAttachment != null && message.hasOwnProperty("hasMediaAttachment")) { object.hasMediaAttachment = message.hasMediaAttachment; + if (options.oneofs) + object._hasMediaAttachment = "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) @@ -44811,6 +74881,11 @@ $root.proto = (function() { if (options.oneofs) object.media = "locationMessage"; } + if (message.productMessage != null && message.hasOwnProperty("productMessage")) { + object.productMessage = $root.proto.Message.ProductMessage.toObject(message.productMessage, options); + if (options.oneofs) + object.media = "productMessage"; + } return object; }; @@ -44825,6 +74900,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Header + * @function getTypeUrl + * @memberof proto.Message.InteractiveMessage.Header + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Header.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.InteractiveMessage.Header"; + }; + return Header; })(); @@ -44865,19 +74955,34 @@ $root.proto = (function() { /** * NativeFlowMessage messageParamsJson. - * @member {string} messageParamsJson + * @member {string|null|undefined} messageParamsJson * @memberof proto.Message.InteractiveMessage.NativeFlowMessage * @instance */ - NativeFlowMessage.prototype.messageParamsJson = ""; + NativeFlowMessage.prototype.messageParamsJson = null; /** * NativeFlowMessage messageVersion. - * @member {number} messageVersion + * @member {number|null|undefined} messageVersion * @memberof proto.Message.InteractiveMessage.NativeFlowMessage * @instance */ - NativeFlowMessage.prototype.messageVersion = 0; + NativeFlowMessage.prototype.messageVersion = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(NativeFlowMessage.prototype, "_messageParamsJson", { + get: $util.oneOfGetter($oneOfFields = ["messageParamsJson"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(NativeFlowMessage.prototype, "_messageVersion", { + get: $util.oneOfGetter($oneOfFields = ["messageVersion"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new NativeFlowMessage instance using the specified properties. @@ -44944,17 +75049,20 @@ $root.proto = (function() { 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; + 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; @@ -44990,6 +75098,7 @@ $root.proto = (function() { NativeFlowMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; if (message.buttons != null && message.hasOwnProperty("buttons")) { if (!Array.isArray(message.buttons)) return "buttons: array expected"; @@ -44999,12 +75108,16 @@ $root.proto = (function() { return "buttons." + error; } } - if (message.messageParamsJson != null && message.hasOwnProperty("messageParamsJson")) + if (message.messageParamsJson != null && message.hasOwnProperty("messageParamsJson")) { + properties._messageParamsJson = 1; if (!$util.isString(message.messageParamsJson)) return "messageParamsJson: string expected"; - if (message.messageVersion != null && message.hasOwnProperty("messageVersion")) + } + if (message.messageVersion != null && message.hasOwnProperty("messageVersion")) { + properties._messageVersion = 1; if (!$util.isInteger(message.messageVersion)) return "messageVersion: integer expected"; + } return null; }; @@ -45052,19 +75165,21 @@ $root.proto = (function() { 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")) + if (message.messageParamsJson != null && message.hasOwnProperty("messageParamsJson")) { object.messageParamsJson = message.messageParamsJson; - if (message.messageVersion != null && message.hasOwnProperty("messageVersion")) + if (options.oneofs) + object._messageParamsJson = "messageParamsJson"; + } + if (message.messageVersion != null && message.hasOwnProperty("messageVersion")) { object.messageVersion = message.messageVersion; + if (options.oneofs) + object._messageVersion = "messageVersion"; + } return object; }; @@ -45079,6 +75194,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for NativeFlowMessage + * @function getTypeUrl + * @memberof proto.Message.InteractiveMessage.NativeFlowMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NativeFlowMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.InteractiveMessage.NativeFlowMessage"; + }; + NativeFlowMessage.NativeFlowButton = (function() { /** @@ -45106,19 +75236,34 @@ $root.proto = (function() { /** * NativeFlowButton name. - * @member {string} name + * @member {string|null|undefined} name * @memberof proto.Message.InteractiveMessage.NativeFlowMessage.NativeFlowButton * @instance */ - NativeFlowButton.prototype.name = ""; + NativeFlowButton.prototype.name = null; /** * NativeFlowButton buttonParamsJson. - * @member {string} buttonParamsJson + * @member {string|null|undefined} buttonParamsJson * @memberof proto.Message.InteractiveMessage.NativeFlowMessage.NativeFlowButton * @instance */ - NativeFlowButton.prototype.buttonParamsJson = ""; + NativeFlowButton.prototype.buttonParamsJson = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(NativeFlowButton.prototype, "_name", { + get: $util.oneOfGetter($oneOfFields = ["name"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(NativeFlowButton.prototype, "_buttonParamsJson", { + get: $util.oneOfGetter($oneOfFields = ["buttonParamsJson"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new NativeFlowButton instance using the specified properties. @@ -45182,12 +75327,14 @@ $root.proto = (function() { 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; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.buttonParamsJson = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -45223,12 +75370,17 @@ $root.proto = (function() { NativeFlowButton.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) { + properties._name = 1; if (!$util.isString(message.name)) return "name: string expected"; - if (message.buttonParamsJson != null && message.hasOwnProperty("buttonParamsJson")) + } + if (message.buttonParamsJson != null && message.hasOwnProperty("buttonParamsJson")) { + properties._buttonParamsJson = 1; if (!$util.isString(message.buttonParamsJson)) return "buttonParamsJson: string expected"; + } return null; }; @@ -45264,14 +75416,16 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.name = ""; - object.buttonParamsJson = ""; - } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && message.hasOwnProperty("name")) { object.name = message.name; - if (message.buttonParamsJson != null && message.hasOwnProperty("buttonParamsJson")) + if (options.oneofs) + object._name = "name"; + } + if (message.buttonParamsJson != null && message.hasOwnProperty("buttonParamsJson")) { object.buttonParamsJson = message.buttonParamsJson; + if (options.oneofs) + object._buttonParamsJson = "buttonParamsJson"; + } return object; }; @@ -45286,6 +75440,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for NativeFlowButton + * @function getTypeUrl + * @memberof proto.Message.InteractiveMessage.NativeFlowMessage.NativeFlowButton + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NativeFlowButton.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.InteractiveMessage.NativeFlowMessage.NativeFlowButton"; + }; + return NativeFlowButton; })(); @@ -45320,27 +75489,48 @@ $root.proto = (function() { /** * ShopMessage id. - * @member {string} id + * @member {string|null|undefined} id * @memberof proto.Message.InteractiveMessage.ShopMessage * @instance */ - ShopMessage.prototype.id = ""; + ShopMessage.prototype.id = null; /** * ShopMessage surface. - * @member {proto.Message.InteractiveMessage.ShopMessage.Surface} surface + * @member {proto.Message.InteractiveMessage.ShopMessage.Surface|null|undefined} surface * @memberof proto.Message.InteractiveMessage.ShopMessage * @instance */ - ShopMessage.prototype.surface = 0; + ShopMessage.prototype.surface = null; /** * ShopMessage messageVersion. - * @member {number} messageVersion + * @member {number|null|undefined} messageVersion * @memberof proto.Message.InteractiveMessage.ShopMessage * @instance */ - ShopMessage.prototype.messageVersion = 0; + ShopMessage.prototype.messageVersion = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ShopMessage.prototype, "_id", { + get: $util.oneOfGetter($oneOfFields = ["id"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ShopMessage.prototype, "_surface", { + get: $util.oneOfGetter($oneOfFields = ["surface"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ShopMessage.prototype, "_messageVersion", { + get: $util.oneOfGetter($oneOfFields = ["messageVersion"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new ShopMessage instance using the specified properties. @@ -45406,15 +75596,18 @@ $root.proto = (function() { 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; + 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; @@ -45450,10 +75643,14 @@ $root.proto = (function() { ShopMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.id != null && message.hasOwnProperty("id")) + var properties = {}; + if (message.id != null && message.hasOwnProperty("id")) { + properties._id = 1; if (!$util.isString(message.id)) return "id: string expected"; - if (message.surface != null && message.hasOwnProperty("surface")) + } + if (message.surface != null && message.hasOwnProperty("surface")) { + properties._surface = 1; switch (message.surface) { default: return "surface: enum value expected"; @@ -45463,9 +75660,12 @@ $root.proto = (function() { case 3: break; } - if (message.messageVersion != null && message.hasOwnProperty("messageVersion")) + } + if (message.messageVersion != null && message.hasOwnProperty("messageVersion")) { + properties._messageVersion = 1; if (!$util.isInteger(message.messageVersion)) return "messageVersion: integer expected"; + } return null; }; @@ -45484,6 +75684,12 @@ $root.proto = (function() { if (object.id != null) message.id = String(object.id); switch (object.surface) { + default: + if (typeof object.surface === "number") { + message.surface = object.surface; + break; + } + break; case "UNKNOWN_SURFACE": case 0: message.surface = 0; @@ -45519,17 +75725,21 @@ $root.proto = (function() { 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")) + 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")) + if (options.oneofs) + object._id = "id"; + } + if (message.surface != null && message.hasOwnProperty("surface")) { + object.surface = options.enums === String ? $root.proto.Message.InteractiveMessage.ShopMessage.Surface[message.surface] === undefined ? message.surface : $root.proto.Message.InteractiveMessage.ShopMessage.Surface[message.surface] : message.surface; + if (options.oneofs) + object._surface = "surface"; + } + if (message.messageVersion != null && message.hasOwnProperty("messageVersion")) { object.messageVersion = message.messageVersion; + if (options.oneofs) + object._messageVersion = "messageVersion"; + } return object; }; @@ -45544,6 +75754,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ShopMessage + * @function getTypeUrl + * @memberof proto.Message.InteractiveMessage.ShopMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ShopMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.InteractiveMessage.ShopMessage"; + }; + /** * Surface enum. * @name proto.Message.InteractiveMessage.ShopMessage.Surface @@ -45621,6 +75846,18 @@ $root.proto = (function() { // OneOf field names bound to virtual getters and setters var $oneOfFields; + // Virtual OneOf for proto3 optional field + Object.defineProperty(InteractiveResponseMessage.prototype, "_body", { + get: $util.oneOfGetter($oneOfFields = ["body"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(InteractiveResponseMessage.prototype, "_contextInfo", { + get: $util.oneOfGetter($oneOfFields = ["contextInfo"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * InteractiveResponseMessage interactiveResponseMessage. * @member {"nativeFlowResponseMessage"|undefined} interactiveResponseMessage @@ -45696,15 +75933,18 @@ $root.proto = (function() { 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; + 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; @@ -45742,14 +75982,20 @@ $root.proto = (function() { 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; + properties._body = 1; + { + 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; + properties._contextInfo = 1; + { + var error = $root.proto.ContextInfo.verify(message.contextInfo); + if (error) + return "contextInfo." + error; + } } if (message.nativeFlowResponseMessage != null && message.hasOwnProperty("nativeFlowResponseMessage")) { properties.interactiveResponseMessage = 1; @@ -45805,19 +76051,21 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.body = null; - object.contextInfo = null; - } - if (message.body != null && message.hasOwnProperty("body")) + if (message.body != null && message.hasOwnProperty("body")) { object.body = $root.proto.Message.InteractiveResponseMessage.Body.toObject(message.body, options); + if (options.oneofs) + object._body = "body"; + } 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")) + if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) { object.contextInfo = $root.proto.ContextInfo.toObject(message.contextInfo, options); + if (options.oneofs) + object._contextInfo = "contextInfo"; + } return object; }; @@ -45832,6 +76080,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for InteractiveResponseMessage + * @function getTypeUrl + * @memberof proto.Message.InteractiveResponseMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InteractiveResponseMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.InteractiveResponseMessage"; + }; + InteractiveResponseMessage.Body = (function() { /** @@ -45859,19 +76122,34 @@ $root.proto = (function() { /** * Body text. - * @member {string} text + * @member {string|null|undefined} text * @memberof proto.Message.InteractiveResponseMessage.Body * @instance */ - Body.prototype.text = ""; + Body.prototype.text = null; /** * Body format. - * @member {proto.Message.InteractiveResponseMessage.Body.Format} format + * @member {proto.Message.InteractiveResponseMessage.Body.Format|null|undefined} format * @memberof proto.Message.InteractiveResponseMessage.Body * @instance */ - Body.prototype.format = 0; + Body.prototype.format = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Body.prototype, "_text", { + get: $util.oneOfGetter($oneOfFields = ["text"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Body.prototype, "_format", { + get: $util.oneOfGetter($oneOfFields = ["format"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new Body instance using the specified properties. @@ -45935,12 +76213,14 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.text = reader.string(); - break; - case 2: - message.format = reader.int32(); - break; + case 1: { + message.text = reader.string(); + break; + } + case 2: { + message.format = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -45976,10 +76256,14 @@ $root.proto = (function() { Body.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.text != null && message.hasOwnProperty("text")) + var properties = {}; + if (message.text != null && message.hasOwnProperty("text")) { + properties._text = 1; if (!$util.isString(message.text)) return "text: string expected"; - if (message.format != null && message.hasOwnProperty("format")) + } + if (message.format != null && message.hasOwnProperty("format")) { + properties._format = 1; switch (message.format) { default: return "format: enum value expected"; @@ -45987,6 +76271,7 @@ $root.proto = (function() { case 1: break; } + } return null; }; @@ -46005,6 +76290,12 @@ $root.proto = (function() { if (object.text != null) message.text = String(object.text); switch (object.format) { + default: + if (typeof object.format === "number") { + message.format = object.format; + break; + } + break; case "DEFAULT": case 0: message.format = 0; @@ -46030,14 +76321,16 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.text = ""; - object.format = options.enums === String ? "DEFAULT" : 0; - } - if (message.text != null && message.hasOwnProperty("text")) + if (message.text != null && message.hasOwnProperty("text")) { object.text = message.text; - if (message.format != null && message.hasOwnProperty("format")) - object.format = options.enums === String ? $root.proto.Message.InteractiveResponseMessage.Body.Format[message.format] : message.format; + if (options.oneofs) + object._text = "text"; + } + if (message.format != null && message.hasOwnProperty("format")) { + object.format = options.enums === String ? $root.proto.Message.InteractiveResponseMessage.Body.Format[message.format] === undefined ? message.format : $root.proto.Message.InteractiveResponseMessage.Body.Format[message.format] : message.format; + if (options.oneofs) + object._format = "format"; + } return object; }; @@ -46052,6 +76345,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Body + * @function getTypeUrl + * @memberof proto.Message.InteractiveResponseMessage.Body + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Body.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.InteractiveResponseMessage.Body"; + }; + /** * Format enum. * @name proto.Message.InteractiveResponseMessage.Body.Format @@ -46097,27 +76405,48 @@ $root.proto = (function() { /** * NativeFlowResponseMessage name. - * @member {string} name + * @member {string|null|undefined} name * @memberof proto.Message.InteractiveResponseMessage.NativeFlowResponseMessage * @instance */ - NativeFlowResponseMessage.prototype.name = ""; + NativeFlowResponseMessage.prototype.name = null; /** * NativeFlowResponseMessage paramsJson. - * @member {string} paramsJson + * @member {string|null|undefined} paramsJson * @memberof proto.Message.InteractiveResponseMessage.NativeFlowResponseMessage * @instance */ - NativeFlowResponseMessage.prototype.paramsJson = ""; + NativeFlowResponseMessage.prototype.paramsJson = null; /** * NativeFlowResponseMessage version. - * @member {number} version + * @member {number|null|undefined} version * @memberof proto.Message.InteractiveResponseMessage.NativeFlowResponseMessage * @instance */ - NativeFlowResponseMessage.prototype.version = 0; + NativeFlowResponseMessage.prototype.version = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(NativeFlowResponseMessage.prototype, "_name", { + get: $util.oneOfGetter($oneOfFields = ["name"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(NativeFlowResponseMessage.prototype, "_paramsJson", { + get: $util.oneOfGetter($oneOfFields = ["paramsJson"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(NativeFlowResponseMessage.prototype, "_version", { + get: $util.oneOfGetter($oneOfFields = ["version"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new NativeFlowResponseMessage instance using the specified properties. @@ -46183,15 +76512,18 @@ $root.proto = (function() { 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; + 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; @@ -46227,15 +76559,22 @@ $root.proto = (function() { NativeFlowResponseMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) { + properties._name = 1; if (!$util.isString(message.name)) return "name: string expected"; - if (message.paramsJson != null && message.hasOwnProperty("paramsJson")) + } + if (message.paramsJson != null && message.hasOwnProperty("paramsJson")) { + properties._paramsJson = 1; if (!$util.isString(message.paramsJson)) return "paramsJson: string expected"; - if (message.version != null && message.hasOwnProperty("version")) + } + if (message.version != null && message.hasOwnProperty("version")) { + properties._version = 1; if (!$util.isInteger(message.version)) return "version: integer expected"; + } return null; }; @@ -46273,17 +76612,21 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.name = ""; - object.paramsJson = ""; - object.version = 0; - } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && message.hasOwnProperty("name")) { object.name = message.name; - if (message.paramsJson != null && message.hasOwnProperty("paramsJson")) + if (options.oneofs) + object._name = "name"; + } + if (message.paramsJson != null && message.hasOwnProperty("paramsJson")) { object.paramsJson = message.paramsJson; - if (message.version != null && message.hasOwnProperty("version")) + if (options.oneofs) + object._paramsJson = "paramsJson"; + } + if (message.version != null && message.hasOwnProperty("version")) { object.version = message.version; + if (options.oneofs) + object._version = "version"; + } return object; }; @@ -46298,6 +76641,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for NativeFlowResponseMessage + * @function getTypeUrl + * @memberof proto.Message.InteractiveResponseMessage.NativeFlowResponseMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NativeFlowResponseMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.InteractiveResponseMessage.NativeFlowResponseMessage"; + }; + return NativeFlowResponseMessage; })(); @@ -46339,83 +76697,146 @@ $root.proto = (function() { /** * InvoiceMessage note. - * @member {string} note + * @member {string|null|undefined} note * @memberof proto.Message.InvoiceMessage * @instance */ - InvoiceMessage.prototype.note = ""; + InvoiceMessage.prototype.note = null; /** * InvoiceMessage token. - * @member {string} token + * @member {string|null|undefined} token * @memberof proto.Message.InvoiceMessage * @instance */ - InvoiceMessage.prototype.token = ""; + InvoiceMessage.prototype.token = null; /** * InvoiceMessage attachmentType. - * @member {proto.Message.InvoiceMessage.AttachmentType} attachmentType + * @member {proto.Message.InvoiceMessage.AttachmentType|null|undefined} attachmentType * @memberof proto.Message.InvoiceMessage * @instance */ - InvoiceMessage.prototype.attachmentType = 0; + InvoiceMessage.prototype.attachmentType = null; /** * InvoiceMessage attachmentMimetype. - * @member {string} attachmentMimetype + * @member {string|null|undefined} attachmentMimetype * @memberof proto.Message.InvoiceMessage * @instance */ - InvoiceMessage.prototype.attachmentMimetype = ""; + InvoiceMessage.prototype.attachmentMimetype = null; /** * InvoiceMessage attachmentMediaKey. - * @member {Uint8Array} attachmentMediaKey + * @member {Uint8Array|null|undefined} attachmentMediaKey * @memberof proto.Message.InvoiceMessage * @instance */ - InvoiceMessage.prototype.attachmentMediaKey = $util.newBuffer([]); + InvoiceMessage.prototype.attachmentMediaKey = null; /** * InvoiceMessage attachmentMediaKeyTimestamp. - * @member {number|Long} attachmentMediaKeyTimestamp + * @member {number|Long|null|undefined} attachmentMediaKeyTimestamp * @memberof proto.Message.InvoiceMessage * @instance */ - InvoiceMessage.prototype.attachmentMediaKeyTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + InvoiceMessage.prototype.attachmentMediaKeyTimestamp = null; /** * InvoiceMessage attachmentFileSha256. - * @member {Uint8Array} attachmentFileSha256 + * @member {Uint8Array|null|undefined} attachmentFileSha256 * @memberof proto.Message.InvoiceMessage * @instance */ - InvoiceMessage.prototype.attachmentFileSha256 = $util.newBuffer([]); + InvoiceMessage.prototype.attachmentFileSha256 = null; /** * InvoiceMessage attachmentFileEncSha256. - * @member {Uint8Array} attachmentFileEncSha256 + * @member {Uint8Array|null|undefined} attachmentFileEncSha256 * @memberof proto.Message.InvoiceMessage * @instance */ - InvoiceMessage.prototype.attachmentFileEncSha256 = $util.newBuffer([]); + InvoiceMessage.prototype.attachmentFileEncSha256 = null; /** * InvoiceMessage attachmentDirectPath. - * @member {string} attachmentDirectPath + * @member {string|null|undefined} attachmentDirectPath * @memberof proto.Message.InvoiceMessage * @instance */ - InvoiceMessage.prototype.attachmentDirectPath = ""; + InvoiceMessage.prototype.attachmentDirectPath = null; /** * InvoiceMessage attachmentJpegThumbnail. - * @member {Uint8Array} attachmentJpegThumbnail + * @member {Uint8Array|null|undefined} attachmentJpegThumbnail * @memberof proto.Message.InvoiceMessage * @instance */ - InvoiceMessage.prototype.attachmentJpegThumbnail = $util.newBuffer([]); + InvoiceMessage.prototype.attachmentJpegThumbnail = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(InvoiceMessage.prototype, "_note", { + get: $util.oneOfGetter($oneOfFields = ["note"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(InvoiceMessage.prototype, "_token", { + get: $util.oneOfGetter($oneOfFields = ["token"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(InvoiceMessage.prototype, "_attachmentType", { + get: $util.oneOfGetter($oneOfFields = ["attachmentType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(InvoiceMessage.prototype, "_attachmentMimetype", { + get: $util.oneOfGetter($oneOfFields = ["attachmentMimetype"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(InvoiceMessage.prototype, "_attachmentMediaKey", { + get: $util.oneOfGetter($oneOfFields = ["attachmentMediaKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(InvoiceMessage.prototype, "_attachmentMediaKeyTimestamp", { + get: $util.oneOfGetter($oneOfFields = ["attachmentMediaKeyTimestamp"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(InvoiceMessage.prototype, "_attachmentFileSha256", { + get: $util.oneOfGetter($oneOfFields = ["attachmentFileSha256"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(InvoiceMessage.prototype, "_attachmentFileEncSha256", { + get: $util.oneOfGetter($oneOfFields = ["attachmentFileEncSha256"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(InvoiceMessage.prototype, "_attachmentDirectPath", { + get: $util.oneOfGetter($oneOfFields = ["attachmentDirectPath"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(InvoiceMessage.prototype, "_attachmentJpegThumbnail", { + get: $util.oneOfGetter($oneOfFields = ["attachmentJpegThumbnail"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new InvoiceMessage instance using the specified properties. @@ -46495,36 +76916,46 @@ $root.proto = (function() { 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; + 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; @@ -46560,13 +76991,19 @@ $root.proto = (function() { InvoiceMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.note != null && message.hasOwnProperty("note")) + var properties = {}; + if (message.note != null && message.hasOwnProperty("note")) { + properties._note = 1; if (!$util.isString(message.note)) return "note: string expected"; - if (message.token != null && message.hasOwnProperty("token")) + } + if (message.token != null && message.hasOwnProperty("token")) { + properties._token = 1; if (!$util.isString(message.token)) return "token: string expected"; - if (message.attachmentType != null && message.hasOwnProperty("attachmentType")) + } + if (message.attachmentType != null && message.hasOwnProperty("attachmentType")) { + properties._attachmentType = 1; switch (message.attachmentType) { default: return "attachmentType: enum value expected"; @@ -46574,27 +77011,42 @@ $root.proto = (function() { case 1: break; } - if (message.attachmentMimetype != null && message.hasOwnProperty("attachmentMimetype")) + } + if (message.attachmentMimetype != null && message.hasOwnProperty("attachmentMimetype")) { + properties._attachmentMimetype = 1; if (!$util.isString(message.attachmentMimetype)) return "attachmentMimetype: string expected"; - if (message.attachmentMediaKey != null && message.hasOwnProperty("attachmentMediaKey")) + } + if (message.attachmentMediaKey != null && message.hasOwnProperty("attachmentMediaKey")) { + properties._attachmentMediaKey = 1; if (!(message.attachmentMediaKey && typeof message.attachmentMediaKey.length === "number" || $util.isString(message.attachmentMediaKey))) return "attachmentMediaKey: buffer expected"; - if (message.attachmentMediaKeyTimestamp != null && message.hasOwnProperty("attachmentMediaKeyTimestamp")) + } + if (message.attachmentMediaKeyTimestamp != null && message.hasOwnProperty("attachmentMediaKeyTimestamp")) { + properties._attachmentMediaKeyTimestamp = 1; 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 != null && message.hasOwnProperty("attachmentFileSha256")) { + properties._attachmentFileSha256 = 1; 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 != null && message.hasOwnProperty("attachmentFileEncSha256")) { + properties._attachmentFileEncSha256 = 1; if (!(message.attachmentFileEncSha256 && typeof message.attachmentFileEncSha256.length === "number" || $util.isString(message.attachmentFileEncSha256))) return "attachmentFileEncSha256: buffer expected"; - if (message.attachmentDirectPath != null && message.hasOwnProperty("attachmentDirectPath")) + } + if (message.attachmentDirectPath != null && message.hasOwnProperty("attachmentDirectPath")) { + properties._attachmentDirectPath = 1; if (!$util.isString(message.attachmentDirectPath)) return "attachmentDirectPath: string expected"; - if (message.attachmentJpegThumbnail != null && message.hasOwnProperty("attachmentJpegThumbnail")) + } + if (message.attachmentJpegThumbnail != null && message.hasOwnProperty("attachmentJpegThumbnail")) { + properties._attachmentJpegThumbnail = 1; if (!(message.attachmentJpegThumbnail && typeof message.attachmentJpegThumbnail.length === "number" || $util.isString(message.attachmentJpegThumbnail))) return "attachmentJpegThumbnail: buffer expected"; + } return null; }; @@ -46615,6 +77067,12 @@ $root.proto = (function() { if (object.token != null) message.token = String(object.token); switch (object.attachmentType) { + default: + if (typeof object.attachmentType === "number") { + message.attachmentType = object.attachmentType; + break; + } + break; case "IMAGE": case 0: message.attachmentType = 0; @@ -46629,7 +77087,7 @@ $root.proto = (function() { 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) + else if (object.attachmentMediaKey.length >= 0) message.attachmentMediaKey = object.attachmentMediaKey; if (object.attachmentMediaKeyTimestamp != null) if ($util.Long) @@ -46643,19 +77101,19 @@ $root.proto = (function() { 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) + else if (object.attachmentFileSha256.length >= 0) 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) + else if (object.attachmentFileEncSha256.length >= 0) 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) + else if (object.attachmentJpegThumbnail.length >= 0) message.attachmentJpegThumbnail = object.attachmentJpegThumbnail; return message; }; @@ -46673,69 +77131,59 @@ $root.proto = (function() { 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")) + if (message.note != null && message.hasOwnProperty("note")) { object.note = message.note; - if (message.token != null && message.hasOwnProperty("token")) + if (options.oneofs) + object._note = "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")) + if (options.oneofs) + object._token = "token"; + } + if (message.attachmentType != null && message.hasOwnProperty("attachmentType")) { + object.attachmentType = options.enums === String ? $root.proto.Message.InvoiceMessage.AttachmentType[message.attachmentType] === undefined ? message.attachmentType : $root.proto.Message.InvoiceMessage.AttachmentType[message.attachmentType] : message.attachmentType; + if (options.oneofs) + object._attachmentType = "attachmentType"; + } + if (message.attachmentMimetype != null && message.hasOwnProperty("attachmentMimetype")) { object.attachmentMimetype = message.attachmentMimetype; - if (message.attachmentMediaKey != null && message.hasOwnProperty("attachmentMediaKey")) + if (options.oneofs) + object._attachmentMimetype = "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 (options.oneofs) + object._attachmentMediaKey = "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")) + if (options.oneofs) + object._attachmentMediaKeyTimestamp = "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")) + if (options.oneofs) + object._attachmentFileSha256 = "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")) + if (options.oneofs) + object._attachmentFileEncSha256 = "attachmentFileEncSha256"; + } + if (message.attachmentDirectPath != null && message.hasOwnProperty("attachmentDirectPath")) { object.attachmentDirectPath = message.attachmentDirectPath; - if (message.attachmentJpegThumbnail != null && message.hasOwnProperty("attachmentJpegThumbnail")) + if (options.oneofs) + object._attachmentDirectPath = "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; + if (options.oneofs) + object._attachmentJpegThumbnail = "attachmentJpegThumbnail"; + } return object; }; @@ -46750,6 +77198,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for InvoiceMessage + * @function getTypeUrl + * @memberof proto.Message.InvoiceMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InvoiceMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.InvoiceMessage"; + }; + /** * AttachmentType enum. * @name proto.Message.InvoiceMessage.AttachmentType @@ -46803,19 +77266,40 @@ $root.proto = (function() { /** * KeepInChatMessage keepType. - * @member {proto.KeepType} keepType + * @member {proto.KeepType|null|undefined} keepType * @memberof proto.Message.KeepInChatMessage * @instance */ - KeepInChatMessage.prototype.keepType = 0; + KeepInChatMessage.prototype.keepType = null; /** * KeepInChatMessage timestampMs. - * @member {number|Long} timestampMs + * @member {number|Long|null|undefined} timestampMs * @memberof proto.Message.KeepInChatMessage * @instance */ - KeepInChatMessage.prototype.timestampMs = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + KeepInChatMessage.prototype.timestampMs = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(KeepInChatMessage.prototype, "_key", { + get: $util.oneOfGetter($oneOfFields = ["key"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(KeepInChatMessage.prototype, "_keepType", { + get: $util.oneOfGetter($oneOfFields = ["keepType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(KeepInChatMessage.prototype, "_timestampMs", { + get: $util.oneOfGetter($oneOfFields = ["timestampMs"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new KeepInChatMessage instance using the specified properties. @@ -46881,15 +77365,18 @@ $root.proto = (function() { 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; + 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; @@ -46925,12 +77412,17 @@ $root.proto = (function() { KeepInChatMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; if (message.key != null && message.hasOwnProperty("key")) { - var error = $root.proto.MessageKey.verify(message.key); - if (error) - return "key." + error; + properties._key = 1; + { + var error = $root.proto.MessageKey.verify(message.key); + if (error) + return "key." + error; + } } - if (message.keepType != null && message.hasOwnProperty("keepType")) + if (message.keepType != null && message.hasOwnProperty("keepType")) { + properties._keepType = 1; switch (message.keepType) { default: return "keepType: enum value expected"; @@ -46939,9 +77431,12 @@ $root.proto = (function() { case 2: break; } - if (message.timestampMs != null && message.hasOwnProperty("timestampMs")) + } + if (message.timestampMs != null && message.hasOwnProperty("timestampMs")) { + properties._timestampMs = 1; if (!$util.isInteger(message.timestampMs) && !(message.timestampMs && $util.isInteger(message.timestampMs.low) && $util.isInteger(message.timestampMs.high))) return "timestampMs: integer|Long expected"; + } return null; }; @@ -46963,6 +77458,12 @@ $root.proto = (function() { message.key = $root.proto.MessageKey.fromObject(object.key); } switch (object.keepType) { + default: + if (typeof object.keepType === "number") { + message.keepType = object.keepType; + break; + } + break; case "UNKNOWN": case 0: message.keepType = 0; @@ -47001,24 +77502,24 @@ $root.proto = (function() { 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")) + 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 (options.oneofs) + object._key = "key"; + } + if (message.keepType != null && message.hasOwnProperty("keepType")) { + object.keepType = options.enums === String ? $root.proto.KeepType[message.keepType] === undefined ? message.keepType : $root.proto.KeepType[message.keepType] : message.keepType; + if (options.oneofs) + object._keepType = "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; + if (options.oneofs) + object._timestampMs = "timestampMs"; + } return object; }; @@ -47033,6 +77534,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for KeepInChatMessage + * @function getTypeUrl + * @memberof proto.Message.KeepInChatMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + KeepInChatMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.KeepInChatMessage"; + }; + return KeepInChatMessage; })(); @@ -47070,35 +77586,35 @@ $root.proto = (function() { /** * ListMessage title. - * @member {string} title + * @member {string|null|undefined} title * @memberof proto.Message.ListMessage * @instance */ - ListMessage.prototype.title = ""; + ListMessage.prototype.title = null; /** * ListMessage description. - * @member {string} description + * @member {string|null|undefined} description * @memberof proto.Message.ListMessage * @instance */ - ListMessage.prototype.description = ""; + ListMessage.prototype.description = null; /** * ListMessage buttonText. - * @member {string} buttonText + * @member {string|null|undefined} buttonText * @memberof proto.Message.ListMessage * @instance */ - ListMessage.prototype.buttonText = ""; + ListMessage.prototype.buttonText = null; /** * ListMessage listType. - * @member {proto.Message.ListMessage.ListType} listType + * @member {proto.Message.ListMessage.ListType|null|undefined} listType * @memberof proto.Message.ListMessage * @instance */ - ListMessage.prototype.listType = 0; + ListMessage.prototype.listType = null; /** * ListMessage sections. @@ -47118,11 +77634,11 @@ $root.proto = (function() { /** * ListMessage footerText. - * @member {string} footerText + * @member {string|null|undefined} footerText * @memberof proto.Message.ListMessage * @instance */ - ListMessage.prototype.footerText = ""; + ListMessage.prototype.footerText = null; /** * ListMessage contextInfo. @@ -47132,6 +77648,51 @@ $root.proto = (function() { */ ListMessage.prototype.contextInfo = null; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ListMessage.prototype, "_title", { + get: $util.oneOfGetter($oneOfFields = ["title"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ListMessage.prototype, "_description", { + get: $util.oneOfGetter($oneOfFields = ["description"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ListMessage.prototype, "_buttonText", { + get: $util.oneOfGetter($oneOfFields = ["buttonText"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ListMessage.prototype, "_listType", { + get: $util.oneOfGetter($oneOfFields = ["listType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ListMessage.prototype, "_productListInfo", { + get: $util.oneOfGetter($oneOfFields = ["productListInfo"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ListMessage.prototype, "_footerText", { + get: $util.oneOfGetter($oneOfFields = ["footerText"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ListMessage.prototype, "_contextInfo", { + get: $util.oneOfGetter($oneOfFields = ["contextInfo"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new ListMessage instance using the specified properties. * @function create @@ -47207,32 +77768,40 @@ $root.proto = (function() { 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; + 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; @@ -47268,16 +77837,24 @@ $root.proto = (function() { ListMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.title != null && message.hasOwnProperty("title")) + var properties = {}; + if (message.title != null && message.hasOwnProperty("title")) { + properties._title = 1; if (!$util.isString(message.title)) return "title: string expected"; - if (message.description != null && message.hasOwnProperty("description")) + } + if (message.description != null && message.hasOwnProperty("description")) { + properties._description = 1; if (!$util.isString(message.description)) return "description: string expected"; - if (message.buttonText != null && message.hasOwnProperty("buttonText")) + } + if (message.buttonText != null && message.hasOwnProperty("buttonText")) { + properties._buttonText = 1; if (!$util.isString(message.buttonText)) return "buttonText: string expected"; - if (message.listType != null && message.hasOwnProperty("listType")) + } + if (message.listType != null && message.hasOwnProperty("listType")) { + properties._listType = 1; switch (message.listType) { default: return "listType: enum value expected"; @@ -47286,6 +77863,7 @@ $root.proto = (function() { case 2: break; } + } if (message.sections != null && message.hasOwnProperty("sections")) { if (!Array.isArray(message.sections)) return "sections: array expected"; @@ -47296,17 +77874,25 @@ $root.proto = (function() { } } if (message.productListInfo != null && message.hasOwnProperty("productListInfo")) { - var error = $root.proto.Message.ListMessage.ProductListInfo.verify(message.productListInfo); - if (error) - return "productListInfo." + error; + properties._productListInfo = 1; + { + var error = $root.proto.Message.ListMessage.ProductListInfo.verify(message.productListInfo); + if (error) + return "productListInfo." + error; + } } - if (message.footerText != null && message.hasOwnProperty("footerText")) + if (message.footerText != null && message.hasOwnProperty("footerText")) { + properties._footerText = 1; 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; + properties._contextInfo = 1; + { + var error = $root.proto.ContextInfo.verify(message.contextInfo); + if (error) + return "contextInfo." + error; + } } return null; }; @@ -47330,6 +77916,12 @@ $root.proto = (function() { if (object.buttonText != null) message.buttonText = String(object.buttonText); switch (object.listType) { + default: + if (typeof object.listType === "number") { + message.listType = object.listType; + break; + } + break; case "UNKNOWN": case 0: message.listType = 0; @@ -47383,34 +77975,46 @@ $root.proto = (function() { 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")) + if (message.title != null && message.hasOwnProperty("title")) { object.title = message.title; - if (message.description != null && message.hasOwnProperty("description")) + if (options.oneofs) + object._title = "title"; + } + if (message.description != null && message.hasOwnProperty("description")) { object.description = message.description; - if (message.buttonText != null && message.hasOwnProperty("buttonText")) + if (options.oneofs) + object._description = "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 (options.oneofs) + object._buttonText = "buttonText"; + } + if (message.listType != null && message.hasOwnProperty("listType")) { + object.listType = options.enums === String ? $root.proto.Message.ListMessage.ListType[message.listType] === undefined ? message.listType : $root.proto.Message.ListMessage.ListType[message.listType] : message.listType; + if (options.oneofs) + object._listType = "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")) + 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")) + if (options.oneofs) + object._productListInfo = "productListInfo"; + } + if (message.footerText != null && message.hasOwnProperty("footerText")) { object.footerText = message.footerText; - if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) + if (options.oneofs) + object._footerText = "footerText"; + } + if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) { object.contextInfo = $root.proto.ContextInfo.toObject(message.contextInfo, options); + if (options.oneofs) + object._contextInfo = "contextInfo"; + } return object; }; @@ -47425,6 +78029,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListMessage + * @function getTypeUrl + * @memberof proto.Message.ListMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.ListMessage"; + }; + /** * ListType enum. * @name proto.Message.ListMessage.ListType @@ -47467,11 +78086,20 @@ $root.proto = (function() { /** * Product productId. - * @member {string} productId + * @member {string|null|undefined} productId * @memberof proto.Message.ListMessage.Product * @instance */ - Product.prototype.productId = ""; + Product.prototype.productId = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Product.prototype, "_productId", { + get: $util.oneOfGetter($oneOfFields = ["productId"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new Product instance using the specified properties. @@ -47533,9 +78161,10 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.productId = reader.string(); - break; + case 1: { + message.productId = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -47571,9 +78200,12 @@ $root.proto = (function() { Product.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.productId != null && message.hasOwnProperty("productId")) + var properties = {}; + if (message.productId != null && message.hasOwnProperty("productId")) { + properties._productId = 1; if (!$util.isString(message.productId)) return "productId: string expected"; + } return null; }; @@ -47607,10 +78239,11 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) - object.productId = ""; - if (message.productId != null && message.hasOwnProperty("productId")) + if (message.productId != null && message.hasOwnProperty("productId")) { object.productId = message.productId; + if (options.oneofs) + object._productId = "productId"; + } return object; }; @@ -47625,6 +78258,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Product + * @function getTypeUrl + * @memberof proto.Message.ListMessage.Product + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Product.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.ListMessage.Product"; + }; + return Product; })(); @@ -47655,19 +78303,34 @@ $root.proto = (function() { /** * ProductListHeaderImage productId. - * @member {string} productId + * @member {string|null|undefined} productId * @memberof proto.Message.ListMessage.ProductListHeaderImage * @instance */ - ProductListHeaderImage.prototype.productId = ""; + ProductListHeaderImage.prototype.productId = null; /** * ProductListHeaderImage jpegThumbnail. - * @member {Uint8Array} jpegThumbnail + * @member {Uint8Array|null|undefined} jpegThumbnail * @memberof proto.Message.ListMessage.ProductListHeaderImage * @instance */ - ProductListHeaderImage.prototype.jpegThumbnail = $util.newBuffer([]); + ProductListHeaderImage.prototype.jpegThumbnail = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ProductListHeaderImage.prototype, "_productId", { + get: $util.oneOfGetter($oneOfFields = ["productId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ProductListHeaderImage.prototype, "_jpegThumbnail", { + get: $util.oneOfGetter($oneOfFields = ["jpegThumbnail"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new ProductListHeaderImage instance using the specified properties. @@ -47731,12 +78394,14 @@ $root.proto = (function() { 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; + case 1: { + message.productId = reader.string(); + break; + } + case 2: { + message.jpegThumbnail = reader.bytes(); + break; + } default: reader.skipType(tag & 7); break; @@ -47772,12 +78437,17 @@ $root.proto = (function() { ProductListHeaderImage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.productId != null && message.hasOwnProperty("productId")) + var properties = {}; + if (message.productId != null && message.hasOwnProperty("productId")) { + properties._productId = 1; if (!$util.isString(message.productId)) return "productId: string expected"; - if (message.jpegThumbnail != null && message.hasOwnProperty("jpegThumbnail")) + } + if (message.jpegThumbnail != null && message.hasOwnProperty("jpegThumbnail")) { + properties._jpegThumbnail = 1; if (!(message.jpegThumbnail && typeof message.jpegThumbnail.length === "number" || $util.isString(message.jpegThumbnail))) return "jpegThumbnail: buffer expected"; + } return null; }; @@ -47798,7 +78468,7 @@ $root.proto = (function() { 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) + else if (object.jpegThumbnail.length >= 0) message.jpegThumbnail = object.jpegThumbnail; return message; }; @@ -47816,20 +78486,16 @@ $root.proto = (function() { 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")) + if (message.productId != null && message.hasOwnProperty("productId")) { object.productId = message.productId; - if (message.jpegThumbnail != null && message.hasOwnProperty("jpegThumbnail")) + if (options.oneofs) + object._productId = "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; + if (options.oneofs) + object._jpegThumbnail = "jpegThumbnail"; + } return object; }; @@ -47844,6 +78510,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ProductListHeaderImage + * @function getTypeUrl + * @memberof proto.Message.ListMessage.ProductListHeaderImage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ProductListHeaderImage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.ListMessage.ProductListHeaderImage"; + }; + return ProductListHeaderImage; })(); @@ -47892,11 +78573,26 @@ $root.proto = (function() { /** * ProductListInfo businessOwnerJid. - * @member {string} businessOwnerJid + * @member {string|null|undefined} businessOwnerJid * @memberof proto.Message.ListMessage.ProductListInfo * @instance */ - ProductListInfo.prototype.businessOwnerJid = ""; + ProductListInfo.prototype.businessOwnerJid = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ProductListInfo.prototype, "_headerImage", { + get: $util.oneOfGetter($oneOfFields = ["headerImage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ProductListInfo.prototype, "_businessOwnerJid", { + get: $util.oneOfGetter($oneOfFields = ["businessOwnerJid"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new ProductListInfo instance using the specified properties. @@ -47963,17 +78659,20 @@ $root.proto = (function() { 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; + 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; @@ -48009,6 +78708,7 @@ $root.proto = (function() { ProductListInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; if (message.productSections != null && message.hasOwnProperty("productSections")) { if (!Array.isArray(message.productSections)) return "productSections: array expected"; @@ -48019,13 +78719,18 @@ $root.proto = (function() { } } if (message.headerImage != null && message.hasOwnProperty("headerImage")) { - var error = $root.proto.Message.ListMessage.ProductListHeaderImage.verify(message.headerImage); - if (error) - return "headerImage." + error; + properties._headerImage = 1; + { + var error = $root.proto.Message.ListMessage.ProductListHeaderImage.verify(message.headerImage); + if (error) + return "headerImage." + error; + } } - if (message.businessOwnerJid != null && message.hasOwnProperty("businessOwnerJid")) + if (message.businessOwnerJid != null && message.hasOwnProperty("businessOwnerJid")) { + properties._businessOwnerJid = 1; if (!$util.isString(message.businessOwnerJid)) return "businessOwnerJid: string expected"; + } return null; }; @@ -48076,19 +78781,21 @@ $root.proto = (function() { 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")) + 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")) + if (options.oneofs) + object._headerImage = "headerImage"; + } + if (message.businessOwnerJid != null && message.hasOwnProperty("businessOwnerJid")) { object.businessOwnerJid = message.businessOwnerJid; + if (options.oneofs) + object._businessOwnerJid = "businessOwnerJid"; + } return object; }; @@ -48103,6 +78810,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ProductListInfo + * @function getTypeUrl + * @memberof proto.Message.ListMessage.ProductListInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ProductListInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.ListMessage.ProductListInfo"; + }; + return ProductListInfo; })(); @@ -48134,11 +78856,11 @@ $root.proto = (function() { /** * ProductSection title. - * @member {string} title + * @member {string|null|undefined} title * @memberof proto.Message.ListMessage.ProductSection * @instance */ - ProductSection.prototype.title = ""; + ProductSection.prototype.title = null; /** * ProductSection products. @@ -48148,6 +78870,15 @@ $root.proto = (function() { */ ProductSection.prototype.products = $util.emptyArray; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ProductSection.prototype, "_title", { + get: $util.oneOfGetter($oneOfFields = ["title"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new ProductSection instance using the specified properties. * @function create @@ -48211,14 +78942,16 @@ $root.proto = (function() { 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; + 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; @@ -48254,9 +78987,12 @@ $root.proto = (function() { ProductSection.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.title != null && message.hasOwnProperty("title")) + var properties = {}; + if (message.title != null && message.hasOwnProperty("title")) { + properties._title = 1; 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"; @@ -48311,10 +79047,11 @@ $root.proto = (function() { var object = {}; if (options.arrays || options.defaults) object.products = []; - if (options.defaults) - object.title = ""; - if (message.title != null && message.hasOwnProperty("title")) + if (message.title != null && message.hasOwnProperty("title")) { object.title = message.title; + if (options.oneofs) + object._title = "title"; + } if (message.products && message.products.length) { object.products = []; for (var j = 0; j < message.products.length; ++j) @@ -48334,6 +79071,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ProductSection + * @function getTypeUrl + * @memberof proto.Message.ListMessage.ProductSection + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ProductSection.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.ListMessage.ProductSection"; + }; + return ProductSection; })(); @@ -48365,27 +79117,48 @@ $root.proto = (function() { /** * Row title. - * @member {string} title + * @member {string|null|undefined} title * @memberof proto.Message.ListMessage.Row * @instance */ - Row.prototype.title = ""; + Row.prototype.title = null; /** * Row description. - * @member {string} description + * @member {string|null|undefined} description * @memberof proto.Message.ListMessage.Row * @instance */ - Row.prototype.description = ""; + Row.prototype.description = null; /** * Row rowId. - * @member {string} rowId + * @member {string|null|undefined} rowId * @memberof proto.Message.ListMessage.Row * @instance */ - Row.prototype.rowId = ""; + Row.prototype.rowId = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Row.prototype, "_title", { + get: $util.oneOfGetter($oneOfFields = ["title"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Row.prototype, "_description", { + get: $util.oneOfGetter($oneOfFields = ["description"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Row.prototype, "_rowId", { + get: $util.oneOfGetter($oneOfFields = ["rowId"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new Row instance using the specified properties. @@ -48451,15 +79224,18 @@ $root.proto = (function() { 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; + 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; @@ -48495,15 +79271,22 @@ $root.proto = (function() { Row.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.title != null && message.hasOwnProperty("title")) + var properties = {}; + if (message.title != null && message.hasOwnProperty("title")) { + properties._title = 1; if (!$util.isString(message.title)) return "title: string expected"; - if (message.description != null && message.hasOwnProperty("description")) + } + if (message.description != null && message.hasOwnProperty("description")) { + properties._description = 1; if (!$util.isString(message.description)) return "description: string expected"; - if (message.rowId != null && message.hasOwnProperty("rowId")) + } + if (message.rowId != null && message.hasOwnProperty("rowId")) { + properties._rowId = 1; if (!$util.isString(message.rowId)) return "rowId: string expected"; + } return null; }; @@ -48541,17 +79324,21 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.title = ""; - object.description = ""; - object.rowId = ""; - } - if (message.title != null && message.hasOwnProperty("title")) + if (message.title != null && message.hasOwnProperty("title")) { object.title = message.title; - if (message.description != null && message.hasOwnProperty("description")) + if (options.oneofs) + object._title = "title"; + } + if (message.description != null && message.hasOwnProperty("description")) { object.description = message.description; - if (message.rowId != null && message.hasOwnProperty("rowId")) + if (options.oneofs) + object._description = "description"; + } + if (message.rowId != null && message.hasOwnProperty("rowId")) { object.rowId = message.rowId; + if (options.oneofs) + object._rowId = "rowId"; + } return object; }; @@ -48566,6 +79353,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Row + * @function getTypeUrl + * @memberof proto.Message.ListMessage.Row + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Row.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.ListMessage.Row"; + }; + return Row; })(); @@ -48597,11 +79399,11 @@ $root.proto = (function() { /** * Section title. - * @member {string} title + * @member {string|null|undefined} title * @memberof proto.Message.ListMessage.Section * @instance */ - Section.prototype.title = ""; + Section.prototype.title = null; /** * Section rows. @@ -48611,6 +79413,15 @@ $root.proto = (function() { */ Section.prototype.rows = $util.emptyArray; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Section.prototype, "_title", { + get: $util.oneOfGetter($oneOfFields = ["title"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new Section instance using the specified properties. * @function create @@ -48674,14 +79485,16 @@ $root.proto = (function() { 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; + 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; @@ -48717,9 +79530,12 @@ $root.proto = (function() { Section.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.title != null && message.hasOwnProperty("title")) + var properties = {}; + if (message.title != null && message.hasOwnProperty("title")) { + properties._title = 1; 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"; @@ -48774,10 +79590,11 @@ $root.proto = (function() { var object = {}; if (options.arrays || options.defaults) object.rows = []; - if (options.defaults) - object.title = ""; - if (message.title != null && message.hasOwnProperty("title")) + if (message.title != null && message.hasOwnProperty("title")) { object.title = message.title; + if (options.oneofs) + object._title = "title"; + } if (message.rows && message.rows.length) { object.rows = []; for (var j = 0; j < message.rows.length; ++j) @@ -48797,6 +79614,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Section + * @function getTypeUrl + * @memberof proto.Message.ListMessage.Section + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Section.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.ListMessage.Section"; + }; + return Section; })(); @@ -48833,19 +79665,19 @@ $root.proto = (function() { /** * ListResponseMessage title. - * @member {string} title + * @member {string|null|undefined} title * @memberof proto.Message.ListResponseMessage * @instance */ - ListResponseMessage.prototype.title = ""; + ListResponseMessage.prototype.title = null; /** * ListResponseMessage listType. - * @member {proto.Message.ListResponseMessage.ListType} listType + * @member {proto.Message.ListResponseMessage.ListType|null|undefined} listType * @memberof proto.Message.ListResponseMessage * @instance */ - ListResponseMessage.prototype.listType = 0; + ListResponseMessage.prototype.listType = null; /** * ListResponseMessage singleSelectReply. @@ -48865,11 +79697,44 @@ $root.proto = (function() { /** * ListResponseMessage description. - * @member {string} description + * @member {string|null|undefined} description * @memberof proto.Message.ListResponseMessage * @instance */ - ListResponseMessage.prototype.description = ""; + ListResponseMessage.prototype.description = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ListResponseMessage.prototype, "_title", { + get: $util.oneOfGetter($oneOfFields = ["title"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ListResponseMessage.prototype, "_listType", { + get: $util.oneOfGetter($oneOfFields = ["listType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ListResponseMessage.prototype, "_singleSelectReply", { + get: $util.oneOfGetter($oneOfFields = ["singleSelectReply"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ListResponseMessage.prototype, "_contextInfo", { + get: $util.oneOfGetter($oneOfFields = ["contextInfo"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ListResponseMessage.prototype, "_description", { + get: $util.oneOfGetter($oneOfFields = ["description"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new ListResponseMessage instance using the specified properties. @@ -48939,21 +79804,26 @@ $root.proto = (function() { 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; + 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; @@ -48989,10 +79859,14 @@ $root.proto = (function() { ListResponseMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.title != null && message.hasOwnProperty("title")) + var properties = {}; + if (message.title != null && message.hasOwnProperty("title")) { + properties._title = 1; if (!$util.isString(message.title)) return "title: string expected"; - if (message.listType != null && message.hasOwnProperty("listType")) + } + if (message.listType != null && message.hasOwnProperty("listType")) { + properties._listType = 1; switch (message.listType) { default: return "listType: enum value expected"; @@ -49000,19 +79874,28 @@ $root.proto = (function() { 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; + properties._singleSelectReply = 1; + { + 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; + properties._contextInfo = 1; + { + var error = $root.proto.ContextInfo.verify(message.contextInfo); + if (error) + return "contextInfo." + error; + } } - if (message.description != null && message.hasOwnProperty("description")) + if (message.description != null && message.hasOwnProperty("description")) { + properties._description = 1; if (!$util.isString(message.description)) return "description: string expected"; + } return null; }; @@ -49031,6 +79914,12 @@ $root.proto = (function() { if (object.title != null) message.title = String(object.title); switch (object.listType) { + default: + if (typeof object.listType === "number") { + message.listType = object.listType; + break; + } + break; case "UNKNOWN": case 0: message.listType = 0; @@ -49068,23 +79957,31 @@ $root.proto = (function() { 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")) + 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")) + if (options.oneofs) + object._title = "title"; + } + if (message.listType != null && message.hasOwnProperty("listType")) { + object.listType = options.enums === String ? $root.proto.Message.ListResponseMessage.ListType[message.listType] === undefined ? message.listType : $root.proto.Message.ListResponseMessage.ListType[message.listType] : message.listType; + if (options.oneofs) + object._listType = "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")) + if (options.oneofs) + object._singleSelectReply = "singleSelectReply"; + } + if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) { object.contextInfo = $root.proto.ContextInfo.toObject(message.contextInfo, options); - if (message.description != null && message.hasOwnProperty("description")) + if (options.oneofs) + object._contextInfo = "contextInfo"; + } + if (message.description != null && message.hasOwnProperty("description")) { object.description = message.description; + if (options.oneofs) + object._description = "description"; + } return object; }; @@ -49099,6 +79996,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListResponseMessage + * @function getTypeUrl + * @memberof proto.Message.ListResponseMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListResponseMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.ListResponseMessage"; + }; + /** * ListType enum. * @name proto.Message.ListResponseMessage.ListType @@ -49139,11 +80051,20 @@ $root.proto = (function() { /** * SingleSelectReply selectedRowId. - * @member {string} selectedRowId + * @member {string|null|undefined} selectedRowId * @memberof proto.Message.ListResponseMessage.SingleSelectReply * @instance */ - SingleSelectReply.prototype.selectedRowId = ""; + SingleSelectReply.prototype.selectedRowId = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SingleSelectReply.prototype, "_selectedRowId", { + get: $util.oneOfGetter($oneOfFields = ["selectedRowId"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new SingleSelectReply instance using the specified properties. @@ -49205,9 +80126,10 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.selectedRowId = reader.string(); - break; + case 1: { + message.selectedRowId = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -49243,9 +80165,12 @@ $root.proto = (function() { SingleSelectReply.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.selectedRowId != null && message.hasOwnProperty("selectedRowId")) + var properties = {}; + if (message.selectedRowId != null && message.hasOwnProperty("selectedRowId")) { + properties._selectedRowId = 1; if (!$util.isString(message.selectedRowId)) return "selectedRowId: string expected"; + } return null; }; @@ -49279,10 +80204,11 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) - object.selectedRowId = ""; - if (message.selectedRowId != null && message.hasOwnProperty("selectedRowId")) + if (message.selectedRowId != null && message.hasOwnProperty("selectedRowId")) { object.selectedRowId = message.selectedRowId; + if (options.oneofs) + object._selectedRowId = "selectedRowId"; + } return object; }; @@ -49297,6 +80223,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for SingleSelectReply + * @function getTypeUrl + * @memberof proto.Message.ListResponseMessage.SingleSelectReply + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SingleSelectReply.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.ListResponseMessage.SingleSelectReply"; + }; + return SingleSelectReply; })(); @@ -49338,75 +80279,75 @@ $root.proto = (function() { /** * LiveLocationMessage degreesLatitude. - * @member {number} degreesLatitude + * @member {number|null|undefined} degreesLatitude * @memberof proto.Message.LiveLocationMessage * @instance */ - LiveLocationMessage.prototype.degreesLatitude = 0; + LiveLocationMessage.prototype.degreesLatitude = null; /** * LiveLocationMessage degreesLongitude. - * @member {number} degreesLongitude + * @member {number|null|undefined} degreesLongitude * @memberof proto.Message.LiveLocationMessage * @instance */ - LiveLocationMessage.prototype.degreesLongitude = 0; + LiveLocationMessage.prototype.degreesLongitude = null; /** * LiveLocationMessage accuracyInMeters. - * @member {number} accuracyInMeters + * @member {number|null|undefined} accuracyInMeters * @memberof proto.Message.LiveLocationMessage * @instance */ - LiveLocationMessage.prototype.accuracyInMeters = 0; + LiveLocationMessage.prototype.accuracyInMeters = null; /** * LiveLocationMessage speedInMps. - * @member {number} speedInMps + * @member {number|null|undefined} speedInMps * @memberof proto.Message.LiveLocationMessage * @instance */ - LiveLocationMessage.prototype.speedInMps = 0; + LiveLocationMessage.prototype.speedInMps = null; /** * LiveLocationMessage degreesClockwiseFromMagneticNorth. - * @member {number} degreesClockwiseFromMagneticNorth + * @member {number|null|undefined} degreesClockwiseFromMagneticNorth * @memberof proto.Message.LiveLocationMessage * @instance */ - LiveLocationMessage.prototype.degreesClockwiseFromMagneticNorth = 0; + LiveLocationMessage.prototype.degreesClockwiseFromMagneticNorth = null; /** * LiveLocationMessage caption. - * @member {string} caption + * @member {string|null|undefined} caption * @memberof proto.Message.LiveLocationMessage * @instance */ - LiveLocationMessage.prototype.caption = ""; + LiveLocationMessage.prototype.caption = null; /** * LiveLocationMessage sequenceNumber. - * @member {number|Long} sequenceNumber + * @member {number|Long|null|undefined} sequenceNumber * @memberof proto.Message.LiveLocationMessage * @instance */ - LiveLocationMessage.prototype.sequenceNumber = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + LiveLocationMessage.prototype.sequenceNumber = null; /** * LiveLocationMessage timeOffset. - * @member {number} timeOffset + * @member {number|null|undefined} timeOffset * @memberof proto.Message.LiveLocationMessage * @instance */ - LiveLocationMessage.prototype.timeOffset = 0; + LiveLocationMessage.prototype.timeOffset = null; /** * LiveLocationMessage jpegThumbnail. - * @member {Uint8Array} jpegThumbnail + * @member {Uint8Array|null|undefined} jpegThumbnail * @memberof proto.Message.LiveLocationMessage * @instance */ - LiveLocationMessage.prototype.jpegThumbnail = $util.newBuffer([]); + LiveLocationMessage.prototype.jpegThumbnail = null; /** * LiveLocationMessage contextInfo. @@ -49416,6 +80357,69 @@ $root.proto = (function() { */ LiveLocationMessage.prototype.contextInfo = null; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(LiveLocationMessage.prototype, "_degreesLatitude", { + get: $util.oneOfGetter($oneOfFields = ["degreesLatitude"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(LiveLocationMessage.prototype, "_degreesLongitude", { + get: $util.oneOfGetter($oneOfFields = ["degreesLongitude"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(LiveLocationMessage.prototype, "_accuracyInMeters", { + get: $util.oneOfGetter($oneOfFields = ["accuracyInMeters"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(LiveLocationMessage.prototype, "_speedInMps", { + get: $util.oneOfGetter($oneOfFields = ["speedInMps"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(LiveLocationMessage.prototype, "_degreesClockwiseFromMagneticNorth", { + get: $util.oneOfGetter($oneOfFields = ["degreesClockwiseFromMagneticNorth"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(LiveLocationMessage.prototype, "_caption", { + get: $util.oneOfGetter($oneOfFields = ["caption"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(LiveLocationMessage.prototype, "_sequenceNumber", { + get: $util.oneOfGetter($oneOfFields = ["sequenceNumber"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(LiveLocationMessage.prototype, "_timeOffset", { + get: $util.oneOfGetter($oneOfFields = ["timeOffset"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(LiveLocationMessage.prototype, "_jpegThumbnail", { + get: $util.oneOfGetter($oneOfFields = ["jpegThumbnail"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(LiveLocationMessage.prototype, "_contextInfo", { + get: $util.oneOfGetter($oneOfFields = ["contextInfo"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new LiveLocationMessage instance using the specified properties. * @function create @@ -49494,36 +80498,46 @@ $root.proto = (function() { 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; + 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; @@ -49559,37 +80573,59 @@ $root.proto = (function() { LiveLocationMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.degreesLatitude != null && message.hasOwnProperty("degreesLatitude")) + var properties = {}; + if (message.degreesLatitude != null && message.hasOwnProperty("degreesLatitude")) { + properties._degreesLatitude = 1; if (typeof message.degreesLatitude !== "number") return "degreesLatitude: number expected"; - if (message.degreesLongitude != null && message.hasOwnProperty("degreesLongitude")) + } + if (message.degreesLongitude != null && message.hasOwnProperty("degreesLongitude")) { + properties._degreesLongitude = 1; if (typeof message.degreesLongitude !== "number") return "degreesLongitude: number expected"; - if (message.accuracyInMeters != null && message.hasOwnProperty("accuracyInMeters")) + } + if (message.accuracyInMeters != null && message.hasOwnProperty("accuracyInMeters")) { + properties._accuracyInMeters = 1; if (!$util.isInteger(message.accuracyInMeters)) return "accuracyInMeters: integer expected"; - if (message.speedInMps != null && message.hasOwnProperty("speedInMps")) + } + if (message.speedInMps != null && message.hasOwnProperty("speedInMps")) { + properties._speedInMps = 1; if (typeof message.speedInMps !== "number") return "speedInMps: number expected"; - if (message.degreesClockwiseFromMagneticNorth != null && message.hasOwnProperty("degreesClockwiseFromMagneticNorth")) + } + if (message.degreesClockwiseFromMagneticNorth != null && message.hasOwnProperty("degreesClockwiseFromMagneticNorth")) { + properties._degreesClockwiseFromMagneticNorth = 1; if (!$util.isInteger(message.degreesClockwiseFromMagneticNorth)) return "degreesClockwiseFromMagneticNorth: integer expected"; - if (message.caption != null && message.hasOwnProperty("caption")) + } + if (message.caption != null && message.hasOwnProperty("caption")) { + properties._caption = 1; if (!$util.isString(message.caption)) return "caption: string expected"; - if (message.sequenceNumber != null && message.hasOwnProperty("sequenceNumber")) + } + if (message.sequenceNumber != null && message.hasOwnProperty("sequenceNumber")) { + properties._sequenceNumber = 1; 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 (message.timeOffset != null && message.hasOwnProperty("timeOffset")) { + properties._timeOffset = 1; if (!$util.isInteger(message.timeOffset)) return "timeOffset: integer expected"; - if (message.jpegThumbnail != null && message.hasOwnProperty("jpegThumbnail")) + } + if (message.jpegThumbnail != null && message.hasOwnProperty("jpegThumbnail")) { + properties._jpegThumbnail = 1; 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; + properties._contextInfo = 1; + { + var error = $root.proto.ContextInfo.verify(message.contextInfo); + if (error) + return "contextInfo." + error; + } } return null; }; @@ -49632,7 +80668,7 @@ $root.proto = (function() { 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) + else if (object.jpegThumbnail.length >= 0) message.jpegThumbnail = object.jpegThumbnail; if (object.contextInfo != null) { if (typeof object.contextInfo !== "object") @@ -49655,51 +80691,59 @@ $root.proto = (function() { 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")) + 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")) + if (options.oneofs) + object._degreesLatitude = "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")) + if (options.oneofs) + object._degreesLongitude = "degreesLongitude"; + } + if (message.accuracyInMeters != null && message.hasOwnProperty("accuracyInMeters")) { object.accuracyInMeters = message.accuracyInMeters; - if (message.speedInMps != null && message.hasOwnProperty("speedInMps")) + if (options.oneofs) + object._accuracyInMeters = "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")) + if (options.oneofs) + object._speedInMps = "speedInMps"; + } + if (message.degreesClockwiseFromMagneticNorth != null && message.hasOwnProperty("degreesClockwiseFromMagneticNorth")) { object.degreesClockwiseFromMagneticNorth = message.degreesClockwiseFromMagneticNorth; - if (message.caption != null && message.hasOwnProperty("caption")) + if (options.oneofs) + object._degreesClockwiseFromMagneticNorth = "degreesClockwiseFromMagneticNorth"; + } + if (message.caption != null && message.hasOwnProperty("caption")) { object.caption = message.caption; - if (message.sequenceNumber != null && message.hasOwnProperty("sequenceNumber")) + if (options.oneofs) + object._caption = "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")) + if (options.oneofs) + object._sequenceNumber = "sequenceNumber"; + } + if (message.timeOffset != null && message.hasOwnProperty("timeOffset")) { object.timeOffset = message.timeOffset; - if (message.jpegThumbnail != null && message.hasOwnProperty("jpegThumbnail")) + if (options.oneofs) + object._timeOffset = "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")) + if (options.oneofs) + object._jpegThumbnail = "jpegThumbnail"; + } + if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) { object.contextInfo = $root.proto.ContextInfo.toObject(message.contextInfo, options); + if (options.oneofs) + object._contextInfo = "contextInfo"; + } return object; }; @@ -49714,6 +80758,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for LiveLocationMessage + * @function getTypeUrl + * @memberof proto.Message.LiveLocationMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LiveLocationMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.LiveLocationMessage"; + }; + return LiveLocationMessage; })(); @@ -49754,91 +80813,91 @@ $root.proto = (function() { /** * LocationMessage degreesLatitude. - * @member {number} degreesLatitude + * @member {number|null|undefined} degreesLatitude * @memberof proto.Message.LocationMessage * @instance */ - LocationMessage.prototype.degreesLatitude = 0; + LocationMessage.prototype.degreesLatitude = null; /** * LocationMessage degreesLongitude. - * @member {number} degreesLongitude + * @member {number|null|undefined} degreesLongitude * @memberof proto.Message.LocationMessage * @instance */ - LocationMessage.prototype.degreesLongitude = 0; + LocationMessage.prototype.degreesLongitude = null; /** * LocationMessage name. - * @member {string} name + * @member {string|null|undefined} name * @memberof proto.Message.LocationMessage * @instance */ - LocationMessage.prototype.name = ""; + LocationMessage.prototype.name = null; /** * LocationMessage address. - * @member {string} address + * @member {string|null|undefined} address * @memberof proto.Message.LocationMessage * @instance */ - LocationMessage.prototype.address = ""; + LocationMessage.prototype.address = null; /** * LocationMessage url. - * @member {string} url + * @member {string|null|undefined} url * @memberof proto.Message.LocationMessage * @instance */ - LocationMessage.prototype.url = ""; + LocationMessage.prototype.url = null; /** * LocationMessage isLive. - * @member {boolean} isLive + * @member {boolean|null|undefined} isLive * @memberof proto.Message.LocationMessage * @instance */ - LocationMessage.prototype.isLive = false; + LocationMessage.prototype.isLive = null; /** * LocationMessage accuracyInMeters. - * @member {number} accuracyInMeters + * @member {number|null|undefined} accuracyInMeters * @memberof proto.Message.LocationMessage * @instance */ - LocationMessage.prototype.accuracyInMeters = 0; + LocationMessage.prototype.accuracyInMeters = null; /** * LocationMessage speedInMps. - * @member {number} speedInMps + * @member {number|null|undefined} speedInMps * @memberof proto.Message.LocationMessage * @instance */ - LocationMessage.prototype.speedInMps = 0; + LocationMessage.prototype.speedInMps = null; /** * LocationMessage degreesClockwiseFromMagneticNorth. - * @member {number} degreesClockwiseFromMagneticNorth + * @member {number|null|undefined} degreesClockwiseFromMagneticNorth * @memberof proto.Message.LocationMessage * @instance */ - LocationMessage.prototype.degreesClockwiseFromMagneticNorth = 0; + LocationMessage.prototype.degreesClockwiseFromMagneticNorth = null; /** * LocationMessage comment. - * @member {string} comment + * @member {string|null|undefined} comment * @memberof proto.Message.LocationMessage * @instance */ - LocationMessage.prototype.comment = ""; + LocationMessage.prototype.comment = null; /** * LocationMessage jpegThumbnail. - * @member {Uint8Array} jpegThumbnail + * @member {Uint8Array|null|undefined} jpegThumbnail * @memberof proto.Message.LocationMessage * @instance */ - LocationMessage.prototype.jpegThumbnail = $util.newBuffer([]); + LocationMessage.prototype.jpegThumbnail = null; /** * LocationMessage contextInfo. @@ -49848,6 +80907,81 @@ $root.proto = (function() { */ LocationMessage.prototype.contextInfo = null; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(LocationMessage.prototype, "_degreesLatitude", { + get: $util.oneOfGetter($oneOfFields = ["degreesLatitude"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(LocationMessage.prototype, "_degreesLongitude", { + get: $util.oneOfGetter($oneOfFields = ["degreesLongitude"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(LocationMessage.prototype, "_name", { + get: $util.oneOfGetter($oneOfFields = ["name"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(LocationMessage.prototype, "_address", { + get: $util.oneOfGetter($oneOfFields = ["address"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(LocationMessage.prototype, "_url", { + get: $util.oneOfGetter($oneOfFields = ["url"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(LocationMessage.prototype, "_isLive", { + get: $util.oneOfGetter($oneOfFields = ["isLive"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(LocationMessage.prototype, "_accuracyInMeters", { + get: $util.oneOfGetter($oneOfFields = ["accuracyInMeters"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(LocationMessage.prototype, "_speedInMps", { + get: $util.oneOfGetter($oneOfFields = ["speedInMps"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(LocationMessage.prototype, "_degreesClockwiseFromMagneticNorth", { + get: $util.oneOfGetter($oneOfFields = ["degreesClockwiseFromMagneticNorth"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(LocationMessage.prototype, "_comment", { + get: $util.oneOfGetter($oneOfFields = ["comment"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(LocationMessage.prototype, "_jpegThumbnail", { + get: $util.oneOfGetter($oneOfFields = ["jpegThumbnail"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(LocationMessage.prototype, "_contextInfo", { + get: $util.oneOfGetter($oneOfFields = ["contextInfo"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new LocationMessage instance using the specified properties. * @function create @@ -49930,42 +81064,54 @@ $root.proto = (function() { 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; + 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; @@ -50001,43 +81147,69 @@ $root.proto = (function() { LocationMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.degreesLatitude != null && message.hasOwnProperty("degreesLatitude")) + var properties = {}; + if (message.degreesLatitude != null && message.hasOwnProperty("degreesLatitude")) { + properties._degreesLatitude = 1; if (typeof message.degreesLatitude !== "number") return "degreesLatitude: number expected"; - if (message.degreesLongitude != null && message.hasOwnProperty("degreesLongitude")) + } + if (message.degreesLongitude != null && message.hasOwnProperty("degreesLongitude")) { + properties._degreesLongitude = 1; if (typeof message.degreesLongitude !== "number") return "degreesLongitude: number expected"; - if (message.name != null && message.hasOwnProperty("name")) + } + if (message.name != null && message.hasOwnProperty("name")) { + properties._name = 1; if (!$util.isString(message.name)) return "name: string expected"; - if (message.address != null && message.hasOwnProperty("address")) + } + if (message.address != null && message.hasOwnProperty("address")) { + properties._address = 1; if (!$util.isString(message.address)) return "address: string expected"; - if (message.url != null && message.hasOwnProperty("url")) + } + if (message.url != null && message.hasOwnProperty("url")) { + properties._url = 1; if (!$util.isString(message.url)) return "url: string expected"; - if (message.isLive != null && message.hasOwnProperty("isLive")) + } + if (message.isLive != null && message.hasOwnProperty("isLive")) { + properties._isLive = 1; if (typeof message.isLive !== "boolean") return "isLive: boolean expected"; - if (message.accuracyInMeters != null && message.hasOwnProperty("accuracyInMeters")) + } + if (message.accuracyInMeters != null && message.hasOwnProperty("accuracyInMeters")) { + properties._accuracyInMeters = 1; if (!$util.isInteger(message.accuracyInMeters)) return "accuracyInMeters: integer expected"; - if (message.speedInMps != null && message.hasOwnProperty("speedInMps")) + } + if (message.speedInMps != null && message.hasOwnProperty("speedInMps")) { + properties._speedInMps = 1; if (typeof message.speedInMps !== "number") return "speedInMps: number expected"; - if (message.degreesClockwiseFromMagneticNorth != null && message.hasOwnProperty("degreesClockwiseFromMagneticNorth")) + } + if (message.degreesClockwiseFromMagneticNorth != null && message.hasOwnProperty("degreesClockwiseFromMagneticNorth")) { + properties._degreesClockwiseFromMagneticNorth = 1; if (!$util.isInteger(message.degreesClockwiseFromMagneticNorth)) return "degreesClockwiseFromMagneticNorth: integer expected"; - if (message.comment != null && message.hasOwnProperty("comment")) + } + if (message.comment != null && message.hasOwnProperty("comment")) { + properties._comment = 1; if (!$util.isString(message.comment)) return "comment: string expected"; - if (message.jpegThumbnail != null && message.hasOwnProperty("jpegThumbnail")) + } + if (message.jpegThumbnail != null && message.hasOwnProperty("jpegThumbnail")) { + properties._jpegThumbnail = 1; 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; + properties._contextInfo = 1; + { + var error = $root.proto.ContextInfo.verify(message.contextInfo); + if (error) + return "contextInfo." + error; + } } return null; }; @@ -50077,7 +81249,7 @@ $root.proto = (function() { 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) + else if (object.jpegThumbnail.length >= 0) message.jpegThumbnail = object.jpegThumbnail; if (object.contextInfo != null) { if (typeof object.contextInfo !== "object") @@ -50100,50 +81272,66 @@ $root.proto = (function() { 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")) + 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")) + if (options.oneofs) + object._degreesLatitude = "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")) + if (options.oneofs) + object._degreesLongitude = "degreesLongitude"; + } + if (message.name != null && message.hasOwnProperty("name")) { object.name = message.name; - if (message.address != null && message.hasOwnProperty("address")) + if (options.oneofs) + object._name = "name"; + } + if (message.address != null && message.hasOwnProperty("address")) { object.address = message.address; - if (message.url != null && message.hasOwnProperty("url")) + if (options.oneofs) + object._address = "address"; + } + if (message.url != null && message.hasOwnProperty("url")) { object.url = message.url; - if (message.isLive != null && message.hasOwnProperty("isLive")) + if (options.oneofs) + object._url = "url"; + } + if (message.isLive != null && message.hasOwnProperty("isLive")) { object.isLive = message.isLive; - if (message.accuracyInMeters != null && message.hasOwnProperty("accuracyInMeters")) + if (options.oneofs) + object._isLive = "isLive"; + } + if (message.accuracyInMeters != null && message.hasOwnProperty("accuracyInMeters")) { object.accuracyInMeters = message.accuracyInMeters; - if (message.speedInMps != null && message.hasOwnProperty("speedInMps")) + if (options.oneofs) + object._accuracyInMeters = "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")) + if (options.oneofs) + object._speedInMps = "speedInMps"; + } + if (message.degreesClockwiseFromMagneticNorth != null && message.hasOwnProperty("degreesClockwiseFromMagneticNorth")) { object.degreesClockwiseFromMagneticNorth = message.degreesClockwiseFromMagneticNorth; - if (message.comment != null && message.hasOwnProperty("comment")) + if (options.oneofs) + object._degreesClockwiseFromMagneticNorth = "degreesClockwiseFromMagneticNorth"; + } + if (message.comment != null && message.hasOwnProperty("comment")) { object.comment = message.comment; - if (message.jpegThumbnail != null && message.hasOwnProperty("jpegThumbnail")) + if (options.oneofs) + object._comment = "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")) + if (options.oneofs) + object._jpegThumbnail = "jpegThumbnail"; + } + if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) { object.contextInfo = $root.proto.ContextInfo.toObject(message.contextInfo, options); + if (options.oneofs) + object._contextInfo = "contextInfo"; + } return object; }; @@ -50158,9 +81346,457 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for LocationMessage + * @function getTypeUrl + * @memberof proto.Message.LocationMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LocationMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.LocationMessage"; + }; + return LocationMessage; })(); + Message.MMSThumbnailMetadata = (function() { + + /** + * Properties of a MMSThumbnailMetadata. + * @memberof proto.Message + * @interface IMMSThumbnailMetadata + * @property {string|null} [thumbnailDirectPath] MMSThumbnailMetadata thumbnailDirectPath + * @property {Uint8Array|null} [thumbnailSha256] MMSThumbnailMetadata thumbnailSha256 + * @property {Uint8Array|null} [thumbnailEncSha256] MMSThumbnailMetadata thumbnailEncSha256 + * @property {Uint8Array|null} [mediaKey] MMSThumbnailMetadata mediaKey + * @property {number|Long|null} [mediaKeyTimestamp] MMSThumbnailMetadata mediaKeyTimestamp + * @property {number|null} [thumbnailHeight] MMSThumbnailMetadata thumbnailHeight + * @property {number|null} [thumbnailWidth] MMSThumbnailMetadata thumbnailWidth + */ + + /** + * Constructs a new MMSThumbnailMetadata. + * @memberof proto.Message + * @classdesc Represents a MMSThumbnailMetadata. + * @implements IMMSThumbnailMetadata + * @constructor + * @param {proto.Message.IMMSThumbnailMetadata=} [properties] Properties to set + */ + function MMSThumbnailMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MMSThumbnailMetadata thumbnailDirectPath. + * @member {string|null|undefined} thumbnailDirectPath + * @memberof proto.Message.MMSThumbnailMetadata + * @instance + */ + MMSThumbnailMetadata.prototype.thumbnailDirectPath = null; + + /** + * MMSThumbnailMetadata thumbnailSha256. + * @member {Uint8Array|null|undefined} thumbnailSha256 + * @memberof proto.Message.MMSThumbnailMetadata + * @instance + */ + MMSThumbnailMetadata.prototype.thumbnailSha256 = null; + + /** + * MMSThumbnailMetadata thumbnailEncSha256. + * @member {Uint8Array|null|undefined} thumbnailEncSha256 + * @memberof proto.Message.MMSThumbnailMetadata + * @instance + */ + MMSThumbnailMetadata.prototype.thumbnailEncSha256 = null; + + /** + * MMSThumbnailMetadata mediaKey. + * @member {Uint8Array|null|undefined} mediaKey + * @memberof proto.Message.MMSThumbnailMetadata + * @instance + */ + MMSThumbnailMetadata.prototype.mediaKey = null; + + /** + * MMSThumbnailMetadata mediaKeyTimestamp. + * @member {number|Long|null|undefined} mediaKeyTimestamp + * @memberof proto.Message.MMSThumbnailMetadata + * @instance + */ + MMSThumbnailMetadata.prototype.mediaKeyTimestamp = null; + + /** + * MMSThumbnailMetadata thumbnailHeight. + * @member {number|null|undefined} thumbnailHeight + * @memberof proto.Message.MMSThumbnailMetadata + * @instance + */ + MMSThumbnailMetadata.prototype.thumbnailHeight = null; + + /** + * MMSThumbnailMetadata thumbnailWidth. + * @member {number|null|undefined} thumbnailWidth + * @memberof proto.Message.MMSThumbnailMetadata + * @instance + */ + MMSThumbnailMetadata.prototype.thumbnailWidth = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MMSThumbnailMetadata.prototype, "_thumbnailDirectPath", { + get: $util.oneOfGetter($oneOfFields = ["thumbnailDirectPath"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MMSThumbnailMetadata.prototype, "_thumbnailSha256", { + get: $util.oneOfGetter($oneOfFields = ["thumbnailSha256"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MMSThumbnailMetadata.prototype, "_thumbnailEncSha256", { + get: $util.oneOfGetter($oneOfFields = ["thumbnailEncSha256"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MMSThumbnailMetadata.prototype, "_mediaKey", { + get: $util.oneOfGetter($oneOfFields = ["mediaKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MMSThumbnailMetadata.prototype, "_mediaKeyTimestamp", { + get: $util.oneOfGetter($oneOfFields = ["mediaKeyTimestamp"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MMSThumbnailMetadata.prototype, "_thumbnailHeight", { + get: $util.oneOfGetter($oneOfFields = ["thumbnailHeight"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MMSThumbnailMetadata.prototype, "_thumbnailWidth", { + get: $util.oneOfGetter($oneOfFields = ["thumbnailWidth"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new MMSThumbnailMetadata instance using the specified properties. + * @function create + * @memberof proto.Message.MMSThumbnailMetadata + * @static + * @param {proto.Message.IMMSThumbnailMetadata=} [properties] Properties to set + * @returns {proto.Message.MMSThumbnailMetadata} MMSThumbnailMetadata instance + */ + MMSThumbnailMetadata.create = function create(properties) { + return new MMSThumbnailMetadata(properties); + }; + + /** + * Encodes the specified MMSThumbnailMetadata message. Does not implicitly {@link proto.Message.MMSThumbnailMetadata.verify|verify} messages. + * @function encode + * @memberof proto.Message.MMSThumbnailMetadata + * @static + * @param {proto.Message.IMMSThumbnailMetadata} message MMSThumbnailMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MMSThumbnailMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.thumbnailDirectPath != null && Object.hasOwnProperty.call(message, "thumbnailDirectPath")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.thumbnailDirectPath); + if (message.thumbnailSha256 != null && Object.hasOwnProperty.call(message, "thumbnailSha256")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.thumbnailSha256); + if (message.thumbnailEncSha256 != null && Object.hasOwnProperty.call(message, "thumbnailEncSha256")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.thumbnailEncSha256); + if (message.mediaKey != null && Object.hasOwnProperty.call(message, "mediaKey")) + writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.mediaKey); + if (message.mediaKeyTimestamp != null && Object.hasOwnProperty.call(message, "mediaKeyTimestamp")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.mediaKeyTimestamp); + if (message.thumbnailHeight != null && Object.hasOwnProperty.call(message, "thumbnailHeight")) + writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.thumbnailHeight); + if (message.thumbnailWidth != null && Object.hasOwnProperty.call(message, "thumbnailWidth")) + writer.uint32(/* id 7, wireType 0 =*/56).uint32(message.thumbnailWidth); + return writer; + }; + + /** + * Encodes the specified MMSThumbnailMetadata message, length delimited. Does not implicitly {@link proto.Message.MMSThumbnailMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.MMSThumbnailMetadata + * @static + * @param {proto.Message.IMMSThumbnailMetadata} message MMSThumbnailMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MMSThumbnailMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MMSThumbnailMetadata message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.MMSThumbnailMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.MMSThumbnailMetadata} MMSThumbnailMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MMSThumbnailMetadata.decode = function 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.MMSThumbnailMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.thumbnailDirectPath = reader.string(); + break; + } + case 2: { + message.thumbnailSha256 = reader.bytes(); + break; + } + case 3: { + message.thumbnailEncSha256 = reader.bytes(); + break; + } + case 4: { + message.mediaKey = reader.bytes(); + break; + } + case 5: { + message.mediaKeyTimestamp = reader.int64(); + break; + } + case 6: { + message.thumbnailHeight = reader.uint32(); + break; + } + case 7: { + message.thumbnailWidth = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MMSThumbnailMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.MMSThumbnailMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.MMSThumbnailMetadata} MMSThumbnailMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MMSThumbnailMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MMSThumbnailMetadata message. + * @function verify + * @memberof proto.Message.MMSThumbnailMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MMSThumbnailMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.thumbnailDirectPath != null && message.hasOwnProperty("thumbnailDirectPath")) { + properties._thumbnailDirectPath = 1; + if (!$util.isString(message.thumbnailDirectPath)) + return "thumbnailDirectPath: string expected"; + } + if (message.thumbnailSha256 != null && message.hasOwnProperty("thumbnailSha256")) { + properties._thumbnailSha256 = 1; + if (!(message.thumbnailSha256 && typeof message.thumbnailSha256.length === "number" || $util.isString(message.thumbnailSha256))) + return "thumbnailSha256: buffer expected"; + } + if (message.thumbnailEncSha256 != null && message.hasOwnProperty("thumbnailEncSha256")) { + properties._thumbnailEncSha256 = 1; + if (!(message.thumbnailEncSha256 && typeof message.thumbnailEncSha256.length === "number" || $util.isString(message.thumbnailEncSha256))) + return "thumbnailEncSha256: buffer expected"; + } + if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) { + properties._mediaKey = 1; + if (!(message.mediaKey && typeof message.mediaKey.length === "number" || $util.isString(message.mediaKey))) + return "mediaKey: buffer expected"; + } + if (message.mediaKeyTimestamp != null && message.hasOwnProperty("mediaKeyTimestamp")) { + properties._mediaKeyTimestamp = 1; + 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")) { + properties._thumbnailHeight = 1; + if (!$util.isInteger(message.thumbnailHeight)) + return "thumbnailHeight: integer expected"; + } + if (message.thumbnailWidth != null && message.hasOwnProperty("thumbnailWidth")) { + properties._thumbnailWidth = 1; + if (!$util.isInteger(message.thumbnailWidth)) + return "thumbnailWidth: integer expected"; + } + return null; + }; + + /** + * Creates a MMSThumbnailMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.MMSThumbnailMetadata + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.MMSThumbnailMetadata} MMSThumbnailMetadata + */ + MMSThumbnailMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.MMSThumbnailMetadata) + return object; + var message = new $root.proto.Message.MMSThumbnailMetadata(); + 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 >= 0) + 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 >= 0) + 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 >= 0) + 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; + return message; + }; + + /** + * Creates a plain object from a MMSThumbnailMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.MMSThumbnailMetadata + * @static + * @param {proto.Message.MMSThumbnailMetadata} message MMSThumbnailMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MMSThumbnailMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.thumbnailDirectPath != null && message.hasOwnProperty("thumbnailDirectPath")) { + object.thumbnailDirectPath = message.thumbnailDirectPath; + if (options.oneofs) + object._thumbnailDirectPath = "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 (options.oneofs) + object._thumbnailSha256 = "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 (options.oneofs) + object._thumbnailEncSha256 = "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 (options.oneofs) + object._mediaKey = "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 (options.oneofs) + object._mediaKeyTimestamp = "mediaKeyTimestamp"; + } + if (message.thumbnailHeight != null && message.hasOwnProperty("thumbnailHeight")) { + object.thumbnailHeight = message.thumbnailHeight; + if (options.oneofs) + object._thumbnailHeight = "thumbnailHeight"; + } + if (message.thumbnailWidth != null && message.hasOwnProperty("thumbnailWidth")) { + object.thumbnailWidth = message.thumbnailWidth; + if (options.oneofs) + object._thumbnailWidth = "thumbnailWidth"; + } + return object; + }; + + /** + * Converts this MMSThumbnailMetadata to JSON. + * @function toJSON + * @memberof proto.Message.MMSThumbnailMetadata + * @instance + * @returns {Object.} JSON object + */ + MMSThumbnailMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MMSThumbnailMetadata + * @function getTypeUrl + * @memberof proto.Message.MMSThumbnailMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MMSThumbnailMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.MMSThumbnailMetadata"; + }; + + return MMSThumbnailMetadata; + })(); + Message.MessageHistoryBundle = (function() { /** @@ -50195,51 +81831,51 @@ $root.proto = (function() { /** * MessageHistoryBundle mimetype. - * @member {string} mimetype + * @member {string|null|undefined} mimetype * @memberof proto.Message.MessageHistoryBundle * @instance */ - MessageHistoryBundle.prototype.mimetype = ""; + MessageHistoryBundle.prototype.mimetype = null; /** * MessageHistoryBundle fileSha256. - * @member {Uint8Array} fileSha256 + * @member {Uint8Array|null|undefined} fileSha256 * @memberof proto.Message.MessageHistoryBundle * @instance */ - MessageHistoryBundle.prototype.fileSha256 = $util.newBuffer([]); + MessageHistoryBundle.prototype.fileSha256 = null; /** * MessageHistoryBundle mediaKey. - * @member {Uint8Array} mediaKey + * @member {Uint8Array|null|undefined} mediaKey * @memberof proto.Message.MessageHistoryBundle * @instance */ - MessageHistoryBundle.prototype.mediaKey = $util.newBuffer([]); + MessageHistoryBundle.prototype.mediaKey = null; /** * MessageHistoryBundle fileEncSha256. - * @member {Uint8Array} fileEncSha256 + * @member {Uint8Array|null|undefined} fileEncSha256 * @memberof proto.Message.MessageHistoryBundle * @instance */ - MessageHistoryBundle.prototype.fileEncSha256 = $util.newBuffer([]); + MessageHistoryBundle.prototype.fileEncSha256 = null; /** * MessageHistoryBundle directPath. - * @member {string} directPath + * @member {string|null|undefined} directPath * @memberof proto.Message.MessageHistoryBundle * @instance */ - MessageHistoryBundle.prototype.directPath = ""; + MessageHistoryBundle.prototype.directPath = null; /** * MessageHistoryBundle mediaKeyTimestamp. - * @member {number|Long} mediaKeyTimestamp + * @member {number|Long|null|undefined} mediaKeyTimestamp * @memberof proto.Message.MessageHistoryBundle * @instance */ - MessageHistoryBundle.prototype.mediaKeyTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + MessageHistoryBundle.prototype.mediaKeyTimestamp = null; /** * MessageHistoryBundle contextInfo. @@ -50257,6 +81893,51 @@ $root.proto = (function() { */ MessageHistoryBundle.prototype.participants = $util.emptyArray; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MessageHistoryBundle.prototype, "_mimetype", { + get: $util.oneOfGetter($oneOfFields = ["mimetype"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MessageHistoryBundle.prototype, "_fileSha256", { + get: $util.oneOfGetter($oneOfFields = ["fileSha256"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MessageHistoryBundle.prototype, "_mediaKey", { + get: $util.oneOfGetter($oneOfFields = ["mediaKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MessageHistoryBundle.prototype, "_fileEncSha256", { + get: $util.oneOfGetter($oneOfFields = ["fileEncSha256"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MessageHistoryBundle.prototype, "_directPath", { + get: $util.oneOfGetter($oneOfFields = ["directPath"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MessageHistoryBundle.prototype, "_mediaKeyTimestamp", { + get: $util.oneOfGetter($oneOfFields = ["mediaKeyTimestamp"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MessageHistoryBundle.prototype, "_contextInfo", { + get: $util.oneOfGetter($oneOfFields = ["contextInfo"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new MessageHistoryBundle instance using the specified properties. * @function create @@ -50332,32 +82013,40 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: - message.mimetype = reader.string(); - break; - case 3: - message.fileSha256 = reader.bytes(); - break; - case 5: - message.mediaKey = reader.bytes(); - break; - case 6: - message.fileEncSha256 = reader.bytes(); - break; - case 7: - message.directPath = reader.string(); - break; - case 8: - message.mediaKeyTimestamp = reader.int64(); - break; - case 9: - message.contextInfo = $root.proto.ContextInfo.decode(reader, reader.uint32()); - break; - case 10: - if (!(message.participants && message.participants.length)) - message.participants = []; - message.participants.push(reader.string()); - break; + case 2: { + message.mimetype = reader.string(); + break; + } + case 3: { + message.fileSha256 = reader.bytes(); + break; + } + case 5: { + message.mediaKey = reader.bytes(); + break; + } + case 6: { + message.fileEncSha256 = reader.bytes(); + break; + } + case 7: { + message.directPath = reader.string(); + break; + } + case 8: { + message.mediaKeyTimestamp = reader.int64(); + break; + } + case 9: { + message.contextInfo = $root.proto.ContextInfo.decode(reader, reader.uint32()); + break; + } + case 10: { + if (!(message.participants && message.participants.length)) + message.participants = []; + message.participants.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -50393,28 +82082,44 @@ $root.proto = (function() { MessageHistoryBundle.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.mimetype != null && message.hasOwnProperty("mimetype")) + var properties = {}; + if (message.mimetype != null && message.hasOwnProperty("mimetype")) { + properties._mimetype = 1; if (!$util.isString(message.mimetype)) return "mimetype: string expected"; - if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) + } + if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) { + properties._fileSha256 = 1; if (!(message.fileSha256 && typeof message.fileSha256.length === "number" || $util.isString(message.fileSha256))) return "fileSha256: buffer expected"; - if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) + } + if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) { + properties._mediaKey = 1; 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 != null && message.hasOwnProperty("fileEncSha256")) { + properties._fileEncSha256 = 1; if (!(message.fileEncSha256 && typeof message.fileEncSha256.length === "number" || $util.isString(message.fileEncSha256))) return "fileEncSha256: buffer expected"; - if (message.directPath != null && message.hasOwnProperty("directPath")) + } + if (message.directPath != null && message.hasOwnProperty("directPath")) { + properties._directPath = 1; if (!$util.isString(message.directPath)) return "directPath: string expected"; - if (message.mediaKeyTimestamp != null && message.hasOwnProperty("mediaKeyTimestamp")) + } + if (message.mediaKeyTimestamp != null && message.hasOwnProperty("mediaKeyTimestamp")) { + properties._mediaKeyTimestamp = 1; 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; + properties._contextInfo = 1; + { + var error = $root.proto.ContextInfo.verify(message.contextInfo); + if (error) + return "contextInfo." + error; + } } if (message.participants != null && message.hasOwnProperty("participants")) { if (!Array.isArray(message.participants)) @@ -50443,17 +82148,17 @@ $root.proto = (function() { 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) + else if (object.fileSha256.length >= 0) message.fileSha256 = object.fileSha256; 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) + else if (object.mediaKey.length >= 0) 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) + else if (object.fileEncSha256.length >= 0) message.fileEncSha256 = object.fileEncSha256; if (object.directPath != null) message.directPath = String(object.directPath); @@ -50496,54 +82201,44 @@ $root.proto = (function() { var object = {}; if (options.arrays || options.defaults) object.participants = []; - if (options.defaults) { - object.mimetype = ""; - if (options.bytes === String) - object.fileSha256 = ""; - else { - object.fileSha256 = []; - if (options.bytes !== Array) - object.fileSha256 = $util.newBuffer(object.fileSha256); - } - 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 (message.mimetype != null && message.hasOwnProperty("mimetype")) + if (message.mimetype != null && message.hasOwnProperty("mimetype")) { object.mimetype = message.mimetype; - if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) + if (options.oneofs) + object._mimetype = "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.mediaKey != null && message.hasOwnProperty("mediaKey")) + if (options.oneofs) + object._fileSha256 = "fileSha256"; + } + 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")) + if (options.oneofs) + object._mediaKey = "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")) + if (options.oneofs) + object._fileEncSha256 = "fileEncSha256"; + } + if (message.directPath != null && message.hasOwnProperty("directPath")) { object.directPath = message.directPath; - if (message.mediaKeyTimestamp != null && message.hasOwnProperty("mediaKeyTimestamp")) + if (options.oneofs) + object._directPath = "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")) + if (options.oneofs) + object._mediaKeyTimestamp = "mediaKeyTimestamp"; + } + if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) { object.contextInfo = $root.proto.ContextInfo.toObject(message.contextInfo, options); + if (options.oneofs) + object._contextInfo = "contextInfo"; + } if (message.participants && message.participants.length) { object.participants = []; for (var j = 0; j < message.participants.length; ++j) @@ -50563,6 +82258,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for MessageHistoryBundle + * @function getTypeUrl + * @memberof proto.Message.MessageHistoryBundle + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MessageHistoryBundle.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.MessageHistoryBundle"; + }; + return MessageHistoryBundle; })(); @@ -50577,6 +82287,7 @@ $root.proto = (function() { * @property {Uint8Array|null} [jpegThumbnail] NewsletterAdminInviteMessage jpegThumbnail * @property {string|null} [caption] NewsletterAdminInviteMessage caption * @property {number|Long|null} [inviteExpiration] NewsletterAdminInviteMessage inviteExpiration + * @property {proto.IContextInfo|null} [contextInfo] NewsletterAdminInviteMessage contextInfo */ /** @@ -50596,43 +82307,90 @@ $root.proto = (function() { /** * NewsletterAdminInviteMessage newsletterJid. - * @member {string} newsletterJid + * @member {string|null|undefined} newsletterJid * @memberof proto.Message.NewsletterAdminInviteMessage * @instance */ - NewsletterAdminInviteMessage.prototype.newsletterJid = ""; + NewsletterAdminInviteMessage.prototype.newsletterJid = null; /** * NewsletterAdminInviteMessage newsletterName. - * @member {string} newsletterName + * @member {string|null|undefined} newsletterName * @memberof proto.Message.NewsletterAdminInviteMessage * @instance */ - NewsletterAdminInviteMessage.prototype.newsletterName = ""; + NewsletterAdminInviteMessage.prototype.newsletterName = null; /** * NewsletterAdminInviteMessage jpegThumbnail. - * @member {Uint8Array} jpegThumbnail + * @member {Uint8Array|null|undefined} jpegThumbnail * @memberof proto.Message.NewsletterAdminInviteMessage * @instance */ - NewsletterAdminInviteMessage.prototype.jpegThumbnail = $util.newBuffer([]); + NewsletterAdminInviteMessage.prototype.jpegThumbnail = null; /** * NewsletterAdminInviteMessage caption. - * @member {string} caption + * @member {string|null|undefined} caption * @memberof proto.Message.NewsletterAdminInviteMessage * @instance */ - NewsletterAdminInviteMessage.prototype.caption = ""; + NewsletterAdminInviteMessage.prototype.caption = null; /** * NewsletterAdminInviteMessage inviteExpiration. - * @member {number|Long} inviteExpiration + * @member {number|Long|null|undefined} inviteExpiration * @memberof proto.Message.NewsletterAdminInviteMessage * @instance */ - NewsletterAdminInviteMessage.prototype.inviteExpiration = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + NewsletterAdminInviteMessage.prototype.inviteExpiration = null; + + /** + * NewsletterAdminInviteMessage contextInfo. + * @member {proto.IContextInfo|null|undefined} contextInfo + * @memberof proto.Message.NewsletterAdminInviteMessage + * @instance + */ + NewsletterAdminInviteMessage.prototype.contextInfo = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(NewsletterAdminInviteMessage.prototype, "_newsletterJid", { + get: $util.oneOfGetter($oneOfFields = ["newsletterJid"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(NewsletterAdminInviteMessage.prototype, "_newsletterName", { + get: $util.oneOfGetter($oneOfFields = ["newsletterName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(NewsletterAdminInviteMessage.prototype, "_jpegThumbnail", { + get: $util.oneOfGetter($oneOfFields = ["jpegThumbnail"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(NewsletterAdminInviteMessage.prototype, "_caption", { + get: $util.oneOfGetter($oneOfFields = ["caption"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(NewsletterAdminInviteMessage.prototype, "_inviteExpiration", { + get: $util.oneOfGetter($oneOfFields = ["inviteExpiration"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(NewsletterAdminInviteMessage.prototype, "_contextInfo", { + get: $util.oneOfGetter($oneOfFields = ["contextInfo"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new NewsletterAdminInviteMessage instance using the specified properties. @@ -50668,6 +82426,8 @@ $root.proto = (function() { writer.uint32(/* id 4, wireType 2 =*/34).string(message.caption); if (message.inviteExpiration != null && Object.hasOwnProperty.call(message, "inviteExpiration")) writer.uint32(/* id 5, wireType 0 =*/40).int64(message.inviteExpiration); + if (message.contextInfo != null && Object.hasOwnProperty.call(message, "contextInfo")) + $root.proto.ContextInfo.encode(message.contextInfo, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; @@ -50702,21 +82462,30 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.newsletterJid = reader.string(); - break; - case 2: - message.newsletterName = reader.string(); - break; - case 3: - message.jpegThumbnail = reader.bytes(); - break; - case 4: - message.caption = reader.string(); - break; - case 5: - message.inviteExpiration = reader.int64(); - break; + case 1: { + message.newsletterJid = reader.string(); + break; + } + case 2: { + message.newsletterName = reader.string(); + break; + } + case 3: { + message.jpegThumbnail = reader.bytes(); + break; + } + case 4: { + message.caption = reader.string(); + break; + } + case 5: { + message.inviteExpiration = reader.int64(); + break; + } + case 6: { + message.contextInfo = $root.proto.ContextInfo.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -50752,21 +82521,40 @@ $root.proto = (function() { NewsletterAdminInviteMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.newsletterJid != null && message.hasOwnProperty("newsletterJid")) + var properties = {}; + if (message.newsletterJid != null && message.hasOwnProperty("newsletterJid")) { + properties._newsletterJid = 1; if (!$util.isString(message.newsletterJid)) return "newsletterJid: string expected"; - if (message.newsletterName != null && message.hasOwnProperty("newsletterName")) + } + if (message.newsletterName != null && message.hasOwnProperty("newsletterName")) { + properties._newsletterName = 1; if (!$util.isString(message.newsletterName)) return "newsletterName: string expected"; - if (message.jpegThumbnail != null && message.hasOwnProperty("jpegThumbnail")) + } + if (message.jpegThumbnail != null && message.hasOwnProperty("jpegThumbnail")) { + properties._jpegThumbnail = 1; if (!(message.jpegThumbnail && typeof message.jpegThumbnail.length === "number" || $util.isString(message.jpegThumbnail))) return "jpegThumbnail: buffer expected"; - if (message.caption != null && message.hasOwnProperty("caption")) + } + if (message.caption != null && message.hasOwnProperty("caption")) { + properties._caption = 1; if (!$util.isString(message.caption)) return "caption: string expected"; - if (message.inviteExpiration != null && message.hasOwnProperty("inviteExpiration")) + } + if (message.inviteExpiration != null && message.hasOwnProperty("inviteExpiration")) { + properties._inviteExpiration = 1; if (!$util.isInteger(message.inviteExpiration) && !(message.inviteExpiration && $util.isInteger(message.inviteExpiration.low) && $util.isInteger(message.inviteExpiration.high))) return "inviteExpiration: integer|Long expected"; + } + if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) { + properties._contextInfo = 1; + { + var error = $root.proto.ContextInfo.verify(message.contextInfo); + if (error) + return "contextInfo." + error; + } + } return null; }; @@ -50789,7 +82577,7 @@ $root.proto = (function() { 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) + else if (object.jpegThumbnail.length >= 0) message.jpegThumbnail = object.jpegThumbnail; if (object.caption != null) message.caption = String(object.caption); @@ -50802,6 +82590,11 @@ $root.proto = (function() { 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.contextInfo != null) { + if (typeof object.contextInfo !== "object") + throw TypeError(".proto.Message.NewsletterAdminInviteMessage.contextInfo: object expected"); + message.contextInfo = $root.proto.ContextInfo.fromObject(object.contextInfo); + } return message; }; @@ -50818,36 +82611,39 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.newsletterJid = ""; - object.newsletterName = ""; - if (options.bytes === String) - object.jpegThumbnail = ""; - else { - object.jpegThumbnail = []; - if (options.bytes !== Array) - object.jpegThumbnail = $util.newBuffer(object.jpegThumbnail); - } - object.caption = ""; - 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; - } - if (message.newsletterJid != null && message.hasOwnProperty("newsletterJid")) + if (message.newsletterJid != null && message.hasOwnProperty("newsletterJid")) { object.newsletterJid = message.newsletterJid; - if (message.newsletterName != null && message.hasOwnProperty("newsletterName")) + if (options.oneofs) + object._newsletterJid = "newsletterJid"; + } + if (message.newsletterName != null && message.hasOwnProperty("newsletterName")) { object.newsletterName = message.newsletterName; - if (message.jpegThumbnail != null && message.hasOwnProperty("jpegThumbnail")) + if (options.oneofs) + object._newsletterName = "newsletterName"; + } + 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")) + if (options.oneofs) + object._jpegThumbnail = "jpegThumbnail"; + } + if (message.caption != null && message.hasOwnProperty("caption")) { object.caption = message.caption; - if (message.inviteExpiration != null && message.hasOwnProperty("inviteExpiration")) + if (options.oneofs) + object._caption = "caption"; + } + 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 (options.oneofs) + object._inviteExpiration = "inviteExpiration"; + } + if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) { + object.contextInfo = $root.proto.ContextInfo.toObject(message.contextInfo, options); + if (options.oneofs) + object._contextInfo = "contextInfo"; + } return object; }; @@ -50862,6 +82658,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for NewsletterAdminInviteMessage + * @function getTypeUrl + * @memberof proto.Message.NewsletterAdminInviteMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NewsletterAdminInviteMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.NewsletterAdminInviteMessage"; + }; + return NewsletterAdminInviteMessage; })(); @@ -50904,91 +82715,91 @@ $root.proto = (function() { /** * OrderMessage orderId. - * @member {string} orderId + * @member {string|null|undefined} orderId * @memberof proto.Message.OrderMessage * @instance */ - OrderMessage.prototype.orderId = ""; + OrderMessage.prototype.orderId = null; /** * OrderMessage thumbnail. - * @member {Uint8Array} thumbnail + * @member {Uint8Array|null|undefined} thumbnail * @memberof proto.Message.OrderMessage * @instance */ - OrderMessage.prototype.thumbnail = $util.newBuffer([]); + OrderMessage.prototype.thumbnail = null; /** * OrderMessage itemCount. - * @member {number} itemCount + * @member {number|null|undefined} itemCount * @memberof proto.Message.OrderMessage * @instance */ - OrderMessage.prototype.itemCount = 0; + OrderMessage.prototype.itemCount = null; /** * OrderMessage status. - * @member {proto.Message.OrderMessage.OrderStatus} status + * @member {proto.Message.OrderMessage.OrderStatus|null|undefined} status * @memberof proto.Message.OrderMessage * @instance */ - OrderMessage.prototype.status = 1; + OrderMessage.prototype.status = null; /** * OrderMessage surface. - * @member {proto.Message.OrderMessage.OrderSurface} surface + * @member {proto.Message.OrderMessage.OrderSurface|null|undefined} surface * @memberof proto.Message.OrderMessage * @instance */ - OrderMessage.prototype.surface = 1; + OrderMessage.prototype.surface = null; /** * OrderMessage message. - * @member {string} message + * @member {string|null|undefined} message * @memberof proto.Message.OrderMessage * @instance */ - OrderMessage.prototype.message = ""; + OrderMessage.prototype.message = null; /** * OrderMessage orderTitle. - * @member {string} orderTitle + * @member {string|null|undefined} orderTitle * @memberof proto.Message.OrderMessage * @instance */ - OrderMessage.prototype.orderTitle = ""; + OrderMessage.prototype.orderTitle = null; /** * OrderMessage sellerJid. - * @member {string} sellerJid + * @member {string|null|undefined} sellerJid * @memberof proto.Message.OrderMessage * @instance */ - OrderMessage.prototype.sellerJid = ""; + OrderMessage.prototype.sellerJid = null; /** * OrderMessage token. - * @member {string} token + * @member {string|null|undefined} token * @memberof proto.Message.OrderMessage * @instance */ - OrderMessage.prototype.token = ""; + OrderMessage.prototype.token = null; /** * OrderMessage totalAmount1000. - * @member {number|Long} totalAmount1000 + * @member {number|Long|null|undefined} totalAmount1000 * @memberof proto.Message.OrderMessage * @instance */ - OrderMessage.prototype.totalAmount1000 = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + OrderMessage.prototype.totalAmount1000 = null; /** * OrderMessage totalCurrencyCode. - * @member {string} totalCurrencyCode + * @member {string|null|undefined} totalCurrencyCode * @memberof proto.Message.OrderMessage * @instance */ - OrderMessage.prototype.totalCurrencyCode = ""; + OrderMessage.prototype.totalCurrencyCode = null; /** * OrderMessage contextInfo. @@ -51000,11 +82811,11 @@ $root.proto = (function() { /** * OrderMessage messageVersion. - * @member {number} messageVersion + * @member {number|null|undefined} messageVersion * @memberof proto.Message.OrderMessage * @instance */ - OrderMessage.prototype.messageVersion = 0; + OrderMessage.prototype.messageVersion = null; /** * OrderMessage orderRequestMessageId. @@ -51014,6 +82825,93 @@ $root.proto = (function() { */ OrderMessage.prototype.orderRequestMessageId = null; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(OrderMessage.prototype, "_orderId", { + get: $util.oneOfGetter($oneOfFields = ["orderId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(OrderMessage.prototype, "_thumbnail", { + get: $util.oneOfGetter($oneOfFields = ["thumbnail"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(OrderMessage.prototype, "_itemCount", { + get: $util.oneOfGetter($oneOfFields = ["itemCount"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(OrderMessage.prototype, "_status", { + get: $util.oneOfGetter($oneOfFields = ["status"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(OrderMessage.prototype, "_surface", { + get: $util.oneOfGetter($oneOfFields = ["surface"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(OrderMessage.prototype, "_message", { + get: $util.oneOfGetter($oneOfFields = ["message"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(OrderMessage.prototype, "_orderTitle", { + get: $util.oneOfGetter($oneOfFields = ["orderTitle"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(OrderMessage.prototype, "_sellerJid", { + get: $util.oneOfGetter($oneOfFields = ["sellerJid"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(OrderMessage.prototype, "_token", { + get: $util.oneOfGetter($oneOfFields = ["token"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(OrderMessage.prototype, "_totalAmount1000", { + get: $util.oneOfGetter($oneOfFields = ["totalAmount1000"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(OrderMessage.prototype, "_totalCurrencyCode", { + get: $util.oneOfGetter($oneOfFields = ["totalCurrencyCode"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(OrderMessage.prototype, "_contextInfo", { + get: $util.oneOfGetter($oneOfFields = ["contextInfo"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(OrderMessage.prototype, "_messageVersion", { + get: $util.oneOfGetter($oneOfFields = ["messageVersion"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(OrderMessage.prototype, "_orderRequestMessageId", { + get: $util.oneOfGetter($oneOfFields = ["orderRequestMessageId"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new OrderMessage instance using the specified properties. * @function create @@ -51100,48 +82998,62 @@ $root.proto = (function() { 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; - case 12: - message.messageVersion = reader.int32(); - break; - case 13: - message.orderRequestMessageId = $root.proto.MessageKey.decode(reader, reader.uint32()); - break; + 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; + } + case 12: { + message.messageVersion = reader.int32(); + break; + } + case 13: { + message.orderRequestMessageId = $root.proto.MessageKey.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -51177,16 +83089,24 @@ $root.proto = (function() { OrderMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.orderId != null && message.hasOwnProperty("orderId")) + var properties = {}; + if (message.orderId != null && message.hasOwnProperty("orderId")) { + properties._orderId = 1; if (!$util.isString(message.orderId)) return "orderId: string expected"; - if (message.thumbnail != null && message.hasOwnProperty("thumbnail")) + } + if (message.thumbnail != null && message.hasOwnProperty("thumbnail")) { + properties._thumbnail = 1; if (!(message.thumbnail && typeof message.thumbnail.length === "number" || $util.isString(message.thumbnail))) return "thumbnail: buffer expected"; - if (message.itemCount != null && message.hasOwnProperty("itemCount")) + } + if (message.itemCount != null && message.hasOwnProperty("itemCount")) { + properties._itemCount = 1; if (!$util.isInteger(message.itemCount)) return "itemCount: integer expected"; - if (message.status != null && message.hasOwnProperty("status")) + } + if (message.status != null && message.hasOwnProperty("status")) { + properties._status = 1; switch (message.status) { default: return "status: enum value expected"; @@ -51195,43 +83115,66 @@ $root.proto = (function() { case 3: break; } - if (message.surface != null && message.hasOwnProperty("surface")) + } + if (message.surface != null && message.hasOwnProperty("surface")) { + properties._surface = 1; switch (message.surface) { default: return "surface: enum value expected"; case 1: break; } - if (message.message != null && message.hasOwnProperty("message")) + } + if (message.message != null && message.hasOwnProperty("message")) { + properties._message = 1; if (!$util.isString(message.message)) return "message: string expected"; - if (message.orderTitle != null && message.hasOwnProperty("orderTitle")) + } + if (message.orderTitle != null && message.hasOwnProperty("orderTitle")) { + properties._orderTitle = 1; if (!$util.isString(message.orderTitle)) return "orderTitle: string expected"; - if (message.sellerJid != null && message.hasOwnProperty("sellerJid")) + } + if (message.sellerJid != null && message.hasOwnProperty("sellerJid")) { + properties._sellerJid = 1; if (!$util.isString(message.sellerJid)) return "sellerJid: string expected"; - if (message.token != null && message.hasOwnProperty("token")) + } + if (message.token != null && message.hasOwnProperty("token")) { + properties._token = 1; if (!$util.isString(message.token)) return "token: string expected"; - if (message.totalAmount1000 != null && message.hasOwnProperty("totalAmount1000")) + } + if (message.totalAmount1000 != null && message.hasOwnProperty("totalAmount1000")) { + properties._totalAmount1000 = 1; 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 (message.totalCurrencyCode != null && message.hasOwnProperty("totalCurrencyCode")) { + properties._totalCurrencyCode = 1; 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 (message.messageVersion != null && message.hasOwnProperty("messageVersion")) + if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) { + properties._contextInfo = 1; + { + var error = $root.proto.ContextInfo.verify(message.contextInfo); + if (error) + return "contextInfo." + error; + } + } + if (message.messageVersion != null && message.hasOwnProperty("messageVersion")) { + properties._messageVersion = 1; if (!$util.isInteger(message.messageVersion)) return "messageVersion: integer expected"; + } if (message.orderRequestMessageId != null && message.hasOwnProperty("orderRequestMessageId")) { - var error = $root.proto.MessageKey.verify(message.orderRequestMessageId); - if (error) - return "orderRequestMessageId." + error; + properties._orderRequestMessageId = 1; + { + var error = $root.proto.MessageKey.verify(message.orderRequestMessageId); + if (error) + return "orderRequestMessageId." + error; + } } return null; }; @@ -51253,11 +83196,17 @@ $root.proto = (function() { 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) + else if (object.thumbnail.length >= 0) message.thumbnail = object.thumbnail; if (object.itemCount != null) message.itemCount = object.itemCount | 0; switch (object.status) { + default: + if (typeof object.status === "number") { + message.status = object.status; + break; + } + break; case "INQUIRY": case 1: message.status = 1; @@ -51272,6 +83221,12 @@ $root.proto = (function() { break; } switch (object.surface) { + default: + if (typeof object.surface === "number") { + message.surface = object.surface; + break; + } + break; case "CATALOG": case 1: message.surface = 1; @@ -51324,63 +83279,79 @@ $root.proto = (function() { 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.messageVersion = 0; - object.orderRequestMessageId = null; - object.contextInfo = null; - } - if (message.orderId != null && message.hasOwnProperty("orderId")) + if (message.orderId != null && message.hasOwnProperty("orderId")) { object.orderId = message.orderId; - if (message.thumbnail != null && message.hasOwnProperty("thumbnail")) + if (options.oneofs) + object._orderId = "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")) + if (options.oneofs) + object._thumbnail = "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")) + if (options.oneofs) + object._itemCount = "itemCount"; + } + if (message.status != null && message.hasOwnProperty("status")) { + object.status = options.enums === String ? $root.proto.Message.OrderMessage.OrderStatus[message.status] === undefined ? message.status : $root.proto.Message.OrderMessage.OrderStatus[message.status] : message.status; + if (options.oneofs) + object._status = "status"; + } + if (message.surface != null && message.hasOwnProperty("surface")) { + object.surface = options.enums === String ? $root.proto.Message.OrderMessage.OrderSurface[message.surface] === undefined ? message.surface : $root.proto.Message.OrderMessage.OrderSurface[message.surface] : message.surface; + if (options.oneofs) + object._surface = "surface"; + } + if (message.message != null && message.hasOwnProperty("message")) { object.message = message.message; - if (message.orderTitle != null && message.hasOwnProperty("orderTitle")) + if (options.oneofs) + object._message = "message"; + } + if (message.orderTitle != null && message.hasOwnProperty("orderTitle")) { object.orderTitle = message.orderTitle; - if (message.sellerJid != null && message.hasOwnProperty("sellerJid")) + if (options.oneofs) + object._orderTitle = "orderTitle"; + } + if (message.sellerJid != null && message.hasOwnProperty("sellerJid")) { object.sellerJid = message.sellerJid; - if (message.token != null && message.hasOwnProperty("token")) + if (options.oneofs) + object._sellerJid = "sellerJid"; + } + if (message.token != null && message.hasOwnProperty("token")) { object.token = message.token; - if (message.totalAmount1000 != null && message.hasOwnProperty("totalAmount1000")) + if (options.oneofs) + object._token = "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")) + if (options.oneofs) + object._totalAmount1000 = "totalAmount1000"; + } + if (message.totalCurrencyCode != null && message.hasOwnProperty("totalCurrencyCode")) { object.totalCurrencyCode = message.totalCurrencyCode; - if (message.messageVersion != null && message.hasOwnProperty("messageVersion")) + if (options.oneofs) + object._totalCurrencyCode = "totalCurrencyCode"; + } + if (message.messageVersion != null && message.hasOwnProperty("messageVersion")) { object.messageVersion = message.messageVersion; - if (message.orderRequestMessageId != null && message.hasOwnProperty("orderRequestMessageId")) + if (options.oneofs) + object._messageVersion = "messageVersion"; + } + if (message.orderRequestMessageId != null && message.hasOwnProperty("orderRequestMessageId")) { object.orderRequestMessageId = $root.proto.MessageKey.toObject(message.orderRequestMessageId, options); - if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) + if (options.oneofs) + object._orderRequestMessageId = "orderRequestMessageId"; + } + if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) { object.contextInfo = $root.proto.ContextInfo.toObject(message.contextInfo, options); + if (options.oneofs) + object._contextInfo = "contextInfo"; + } return object; }; @@ -51395,6 +83366,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for OrderMessage + * @function getTypeUrl + * @memberof proto.Message.OrderMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OrderMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.OrderMessage"; + }; + /** * OrderStatus enum. * @name proto.Message.OrderMessage.OrderStatus @@ -51453,19 +83439,34 @@ $root.proto = (function() { /** * PaymentInviteMessage serviceType. - * @member {proto.Message.PaymentInviteMessage.ServiceType} serviceType + * @member {proto.Message.PaymentInviteMessage.ServiceType|null|undefined} serviceType * @memberof proto.Message.PaymentInviteMessage * @instance */ - PaymentInviteMessage.prototype.serviceType = 0; + PaymentInviteMessage.prototype.serviceType = null; /** * PaymentInviteMessage expiryTimestamp. - * @member {number|Long} expiryTimestamp + * @member {number|Long|null|undefined} expiryTimestamp * @memberof proto.Message.PaymentInviteMessage * @instance */ - PaymentInviteMessage.prototype.expiryTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + PaymentInviteMessage.prototype.expiryTimestamp = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PaymentInviteMessage.prototype, "_serviceType", { + get: $util.oneOfGetter($oneOfFields = ["serviceType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PaymentInviteMessage.prototype, "_expiryTimestamp", { + get: $util.oneOfGetter($oneOfFields = ["expiryTimestamp"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new PaymentInviteMessage instance using the specified properties. @@ -51529,12 +83530,14 @@ $root.proto = (function() { 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; + case 1: { + message.serviceType = reader.int32(); + break; + } + case 2: { + message.expiryTimestamp = reader.int64(); + break; + } default: reader.skipType(tag & 7); break; @@ -51570,7 +83573,9 @@ $root.proto = (function() { PaymentInviteMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.serviceType != null && message.hasOwnProperty("serviceType")) + var properties = {}; + if (message.serviceType != null && message.hasOwnProperty("serviceType")) { + properties._serviceType = 1; switch (message.serviceType) { default: return "serviceType: enum value expected"; @@ -51580,9 +83585,12 @@ $root.proto = (function() { case 3: break; } - if (message.expiryTimestamp != null && message.hasOwnProperty("expiryTimestamp")) + } + if (message.expiryTimestamp != null && message.hasOwnProperty("expiryTimestamp")) { + properties._expiryTimestamp = 1; if (!$util.isInteger(message.expiryTimestamp) && !(message.expiryTimestamp && $util.isInteger(message.expiryTimestamp.low) && $util.isInteger(message.expiryTimestamp.high))) return "expiryTimestamp: integer|Long expected"; + } return null; }; @@ -51599,6 +83607,12 @@ $root.proto = (function() { return object; var message = new $root.proto.Message.PaymentInviteMessage(); switch (object.serviceType) { + default: + if (typeof object.serviceType === "number") { + message.serviceType = object.serviceType; + break; + } + break; case "UNKNOWN": case 0: message.serviceType = 0; @@ -51641,21 +83655,19 @@ $root.proto = (function() { 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] === undefined ? message.serviceType : $root.proto.Message.PaymentInviteMessage.ServiceType[message.serviceType] : message.serviceType; + if (options.oneofs) + object._serviceType = "serviceType"; } - 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 (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 (options.oneofs) + object._expiryTimestamp = "expiryTimestamp"; + } return object; }; @@ -51670,6 +83682,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for PaymentInviteMessage + * @function getTypeUrl + * @memberof proto.Message.PaymentInviteMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PaymentInviteMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.PaymentInviteMessage"; + }; + /** * ServiceType enum. * @name proto.Message.PaymentInviteMessage.ServiceType @@ -51702,6 +83729,7 @@ $root.proto = (function() { * @property {Array.|null} [requestUrlPreview] PeerDataOperationRequestMessage requestUrlPreview * @property {proto.Message.PeerDataOperationRequestMessage.IHistorySyncOnDemandRequest|null} [historySyncOnDemandRequest] PeerDataOperationRequestMessage historySyncOnDemandRequest * @property {Array.|null} [placeholderMessageResendRequest] PeerDataOperationRequestMessage placeholderMessageResendRequest + * @property {proto.Message.PeerDataOperationRequestMessage.IFullHistorySyncOnDemandRequest|null} [fullHistorySyncOnDemandRequest] PeerDataOperationRequestMessage fullHistorySyncOnDemandRequest */ /** @@ -51724,11 +83752,11 @@ $root.proto = (function() { /** * PeerDataOperationRequestMessage peerDataOperationRequestType. - * @member {proto.Message.PeerDataOperationRequestType} peerDataOperationRequestType + * @member {proto.Message.PeerDataOperationRequestType|null|undefined} peerDataOperationRequestType * @memberof proto.Message.PeerDataOperationRequestMessage * @instance */ - PeerDataOperationRequestMessage.prototype.peerDataOperationRequestType = 0; + PeerDataOperationRequestMessage.prototype.peerDataOperationRequestType = null; /** * PeerDataOperationRequestMessage requestStickerReupload. @@ -51762,6 +83790,35 @@ $root.proto = (function() { */ PeerDataOperationRequestMessage.prototype.placeholderMessageResendRequest = $util.emptyArray; + /** + * PeerDataOperationRequestMessage fullHistorySyncOnDemandRequest. + * @member {proto.Message.PeerDataOperationRequestMessage.IFullHistorySyncOnDemandRequest|null|undefined} fullHistorySyncOnDemandRequest + * @memberof proto.Message.PeerDataOperationRequestMessage + * @instance + */ + PeerDataOperationRequestMessage.prototype.fullHistorySyncOnDemandRequest = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PeerDataOperationRequestMessage.prototype, "_peerDataOperationRequestType", { + get: $util.oneOfGetter($oneOfFields = ["peerDataOperationRequestType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PeerDataOperationRequestMessage.prototype, "_historySyncOnDemandRequest", { + get: $util.oneOfGetter($oneOfFields = ["historySyncOnDemandRequest"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PeerDataOperationRequestMessage.prototype, "_fullHistorySyncOnDemandRequest", { + get: $util.oneOfGetter($oneOfFields = ["fullHistorySyncOnDemandRequest"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new PeerDataOperationRequestMessage instance using the specified properties. * @function create @@ -51799,6 +83856,8 @@ $root.proto = (function() { if (message.placeholderMessageResendRequest != null && message.placeholderMessageResendRequest.length) for (var i = 0; i < message.placeholderMessageResendRequest.length; ++i) $root.proto.Message.PeerDataOperationRequestMessage.PlaceholderMessageResendRequest.encode(message.placeholderMessageResendRequest[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.fullHistorySyncOnDemandRequest != null && Object.hasOwnProperty.call(message, "fullHistorySyncOnDemandRequest")) + $root.proto.Message.PeerDataOperationRequestMessage.FullHistorySyncOnDemandRequest.encode(message.fullHistorySyncOnDemandRequest, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; @@ -51833,27 +83892,36 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.peerDataOperationRequestType = reader.int32(); - break; - case 2: - if (!(message.requestStickerReupload && message.requestStickerReupload.length)) - message.requestStickerReupload = []; - message.requestStickerReupload.push($root.proto.Message.PeerDataOperationRequestMessage.RequestStickerReupload.decode(reader, reader.uint32())); - break; - case 3: - if (!(message.requestUrlPreview && message.requestUrlPreview.length)) - message.requestUrlPreview = []; - message.requestUrlPreview.push($root.proto.Message.PeerDataOperationRequestMessage.RequestUrlPreview.decode(reader, reader.uint32())); - break; - case 4: - message.historySyncOnDemandRequest = $root.proto.Message.PeerDataOperationRequestMessage.HistorySyncOnDemandRequest.decode(reader, reader.uint32()); - break; - case 5: - if (!(message.placeholderMessageResendRequest && message.placeholderMessageResendRequest.length)) - message.placeholderMessageResendRequest = []; - message.placeholderMessageResendRequest.push($root.proto.Message.PeerDataOperationRequestMessage.PlaceholderMessageResendRequest.decode(reader, reader.uint32())); - break; + case 1: { + message.peerDataOperationRequestType = reader.int32(); + break; + } + case 2: { + if (!(message.requestStickerReupload && message.requestStickerReupload.length)) + message.requestStickerReupload = []; + message.requestStickerReupload.push($root.proto.Message.PeerDataOperationRequestMessage.RequestStickerReupload.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.requestUrlPreview && message.requestUrlPreview.length)) + message.requestUrlPreview = []; + message.requestUrlPreview.push($root.proto.Message.PeerDataOperationRequestMessage.RequestUrlPreview.decode(reader, reader.uint32())); + break; + } + case 4: { + message.historySyncOnDemandRequest = $root.proto.Message.PeerDataOperationRequestMessage.HistorySyncOnDemandRequest.decode(reader, reader.uint32()); + break; + } + case 5: { + if (!(message.placeholderMessageResendRequest && message.placeholderMessageResendRequest.length)) + message.placeholderMessageResendRequest = []; + message.placeholderMessageResendRequest.push($root.proto.Message.PeerDataOperationRequestMessage.PlaceholderMessageResendRequest.decode(reader, reader.uint32())); + break; + } + case 6: { + message.fullHistorySyncOnDemandRequest = $root.proto.Message.PeerDataOperationRequestMessage.FullHistorySyncOnDemandRequest.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -51889,7 +83957,9 @@ $root.proto = (function() { PeerDataOperationRequestMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.peerDataOperationRequestType != null && message.hasOwnProperty("peerDataOperationRequestType")) + var properties = {}; + if (message.peerDataOperationRequestType != null && message.hasOwnProperty("peerDataOperationRequestType")) { + properties._peerDataOperationRequestType = 1; switch (message.peerDataOperationRequestType) { default: return "peerDataOperationRequestType: enum value expected"; @@ -51898,8 +83968,12 @@ $root.proto = (function() { case 2: case 3: case 4: + case 5: + case 6: + case 7: break; } + } if (message.requestStickerReupload != null && message.hasOwnProperty("requestStickerReupload")) { if (!Array.isArray(message.requestStickerReupload)) return "requestStickerReupload: array expected"; @@ -51919,9 +83993,12 @@ $root.proto = (function() { } } if (message.historySyncOnDemandRequest != null && message.hasOwnProperty("historySyncOnDemandRequest")) { - var error = $root.proto.Message.PeerDataOperationRequestMessage.HistorySyncOnDemandRequest.verify(message.historySyncOnDemandRequest); - if (error) - return "historySyncOnDemandRequest." + error; + properties._historySyncOnDemandRequest = 1; + { + var error = $root.proto.Message.PeerDataOperationRequestMessage.HistorySyncOnDemandRequest.verify(message.historySyncOnDemandRequest); + if (error) + return "historySyncOnDemandRequest." + error; + } } if (message.placeholderMessageResendRequest != null && message.hasOwnProperty("placeholderMessageResendRequest")) { if (!Array.isArray(message.placeholderMessageResendRequest)) @@ -51932,6 +84009,14 @@ $root.proto = (function() { return "placeholderMessageResendRequest." + error; } } + if (message.fullHistorySyncOnDemandRequest != null && message.hasOwnProperty("fullHistorySyncOnDemandRequest")) { + properties._fullHistorySyncOnDemandRequest = 1; + { + var error = $root.proto.Message.PeerDataOperationRequestMessage.FullHistorySyncOnDemandRequest.verify(message.fullHistorySyncOnDemandRequest); + if (error) + return "fullHistorySyncOnDemandRequest." + error; + } + } return null; }; @@ -51948,6 +84033,12 @@ $root.proto = (function() { return object; var message = new $root.proto.Message.PeerDataOperationRequestMessage(); switch (object.peerDataOperationRequestType) { + default: + if (typeof object.peerDataOperationRequestType === "number") { + message.peerDataOperationRequestType = object.peerDataOperationRequestType; + break; + } + break; case "UPLOAD_STICKER": case 0: message.peerDataOperationRequestType = 0; @@ -51968,6 +84059,18 @@ $root.proto = (function() { case 4: message.peerDataOperationRequestType = 4; break; + case "WAFFLE_LINKING_NONCE_FETCH": + case 5: + message.peerDataOperationRequestType = 5; + break; + case "FULL_HISTORY_SYNC_ON_DEMAND": + case 6: + message.peerDataOperationRequestType = 6; + break; + case "COMPANION_META_NONCE_FETCH": + case 7: + message.peerDataOperationRequestType = 7; + break; } if (object.requestStickerReupload) { if (!Array.isArray(object.requestStickerReupload)) @@ -52004,6 +84107,11 @@ $root.proto = (function() { message.placeholderMessageResendRequest[i] = $root.proto.Message.PeerDataOperationRequestMessage.PlaceholderMessageResendRequest.fromObject(object.placeholderMessageResendRequest[i]); } } + if (object.fullHistorySyncOnDemandRequest != null) { + if (typeof object.fullHistorySyncOnDemandRequest !== "object") + throw TypeError(".proto.Message.PeerDataOperationRequestMessage.fullHistorySyncOnDemandRequest: object expected"); + message.fullHistorySyncOnDemandRequest = $root.proto.Message.PeerDataOperationRequestMessage.FullHistorySyncOnDemandRequest.fromObject(object.fullHistorySyncOnDemandRequest); + } return message; }; @@ -52025,12 +84133,11 @@ $root.proto = (function() { object.requestUrlPreview = []; object.placeholderMessageResendRequest = []; } - if (options.defaults) { - object.peerDataOperationRequestType = options.enums === String ? "UPLOAD_STICKER" : 0; - object.historySyncOnDemandRequest = null; + if (message.peerDataOperationRequestType != null && message.hasOwnProperty("peerDataOperationRequestType")) { + object.peerDataOperationRequestType = options.enums === String ? $root.proto.Message.PeerDataOperationRequestType[message.peerDataOperationRequestType] === undefined ? message.peerDataOperationRequestType : $root.proto.Message.PeerDataOperationRequestType[message.peerDataOperationRequestType] : message.peerDataOperationRequestType; + if (options.oneofs) + object._peerDataOperationRequestType = "peerDataOperationRequestType"; } - if (message.peerDataOperationRequestType != null && message.hasOwnProperty("peerDataOperationRequestType")) - object.peerDataOperationRequestType = options.enums === String ? $root.proto.Message.PeerDataOperationRequestType[message.peerDataOperationRequestType] : message.peerDataOperationRequestType; if (message.requestStickerReupload && message.requestStickerReupload.length) { object.requestStickerReupload = []; for (var j = 0; j < message.requestStickerReupload.length; ++j) @@ -52041,13 +84148,21 @@ $root.proto = (function() { for (var j = 0; j < message.requestUrlPreview.length; ++j) object.requestUrlPreview[j] = $root.proto.Message.PeerDataOperationRequestMessage.RequestUrlPreview.toObject(message.requestUrlPreview[j], options); } - if (message.historySyncOnDemandRequest != null && message.hasOwnProperty("historySyncOnDemandRequest")) + if (message.historySyncOnDemandRequest != null && message.hasOwnProperty("historySyncOnDemandRequest")) { object.historySyncOnDemandRequest = $root.proto.Message.PeerDataOperationRequestMessage.HistorySyncOnDemandRequest.toObject(message.historySyncOnDemandRequest, options); + if (options.oneofs) + object._historySyncOnDemandRequest = "historySyncOnDemandRequest"; + } if (message.placeholderMessageResendRequest && message.placeholderMessageResendRequest.length) { object.placeholderMessageResendRequest = []; for (var j = 0; j < message.placeholderMessageResendRequest.length; ++j) object.placeholderMessageResendRequest[j] = $root.proto.Message.PeerDataOperationRequestMessage.PlaceholderMessageResendRequest.toObject(message.placeholderMessageResendRequest[j], options); } + if (message.fullHistorySyncOnDemandRequest != null && message.hasOwnProperty("fullHistorySyncOnDemandRequest")) { + object.fullHistorySyncOnDemandRequest = $root.proto.Message.PeerDataOperationRequestMessage.FullHistorySyncOnDemandRequest.toObject(message.fullHistorySyncOnDemandRequest, options); + if (options.oneofs) + object._fullHistorySyncOnDemandRequest = "fullHistorySyncOnDemandRequest"; + } return object; }; @@ -52062,6 +84177,282 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for PeerDataOperationRequestMessage + * @function getTypeUrl + * @memberof proto.Message.PeerDataOperationRequestMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PeerDataOperationRequestMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.PeerDataOperationRequestMessage"; + }; + + PeerDataOperationRequestMessage.FullHistorySyncOnDemandRequest = (function() { + + /** + * Properties of a FullHistorySyncOnDemandRequest. + * @memberof proto.Message.PeerDataOperationRequestMessage + * @interface IFullHistorySyncOnDemandRequest + * @property {proto.Message.IFullHistorySyncOnDemandRequestMetadata|null} [requestMetadata] FullHistorySyncOnDemandRequest requestMetadata + * @property {proto.DeviceProps.IHistorySyncConfig|null} [historySyncConfig] FullHistorySyncOnDemandRequest historySyncConfig + */ + + /** + * Constructs a new FullHistorySyncOnDemandRequest. + * @memberof proto.Message.PeerDataOperationRequestMessage + * @classdesc Represents a FullHistorySyncOnDemandRequest. + * @implements IFullHistorySyncOnDemandRequest + * @constructor + * @param {proto.Message.PeerDataOperationRequestMessage.IFullHistorySyncOnDemandRequest=} [properties] Properties to set + */ + function FullHistorySyncOnDemandRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FullHistorySyncOnDemandRequest requestMetadata. + * @member {proto.Message.IFullHistorySyncOnDemandRequestMetadata|null|undefined} requestMetadata + * @memberof proto.Message.PeerDataOperationRequestMessage.FullHistorySyncOnDemandRequest + * @instance + */ + FullHistorySyncOnDemandRequest.prototype.requestMetadata = null; + + /** + * FullHistorySyncOnDemandRequest historySyncConfig. + * @member {proto.DeviceProps.IHistorySyncConfig|null|undefined} historySyncConfig + * @memberof proto.Message.PeerDataOperationRequestMessage.FullHistorySyncOnDemandRequest + * @instance + */ + FullHistorySyncOnDemandRequest.prototype.historySyncConfig = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(FullHistorySyncOnDemandRequest.prototype, "_requestMetadata", { + get: $util.oneOfGetter($oneOfFields = ["requestMetadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(FullHistorySyncOnDemandRequest.prototype, "_historySyncConfig", { + get: $util.oneOfGetter($oneOfFields = ["historySyncConfig"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new FullHistorySyncOnDemandRequest instance using the specified properties. + * @function create + * @memberof proto.Message.PeerDataOperationRequestMessage.FullHistorySyncOnDemandRequest + * @static + * @param {proto.Message.PeerDataOperationRequestMessage.IFullHistorySyncOnDemandRequest=} [properties] Properties to set + * @returns {proto.Message.PeerDataOperationRequestMessage.FullHistorySyncOnDemandRequest} FullHistorySyncOnDemandRequest instance + */ + FullHistorySyncOnDemandRequest.create = function create(properties) { + return new FullHistorySyncOnDemandRequest(properties); + }; + + /** + * Encodes the specified FullHistorySyncOnDemandRequest message. Does not implicitly {@link proto.Message.PeerDataOperationRequestMessage.FullHistorySyncOnDemandRequest.verify|verify} messages. + * @function encode + * @memberof proto.Message.PeerDataOperationRequestMessage.FullHistorySyncOnDemandRequest + * @static + * @param {proto.Message.PeerDataOperationRequestMessage.IFullHistorySyncOnDemandRequest} message FullHistorySyncOnDemandRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FullHistorySyncOnDemandRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.requestMetadata != null && Object.hasOwnProperty.call(message, "requestMetadata")) + $root.proto.Message.FullHistorySyncOnDemandRequestMetadata.encode(message.requestMetadata, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.historySyncConfig != null && Object.hasOwnProperty.call(message, "historySyncConfig")) + $root.proto.DeviceProps.HistorySyncConfig.encode(message.historySyncConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FullHistorySyncOnDemandRequest message, length delimited. Does not implicitly {@link proto.Message.PeerDataOperationRequestMessage.FullHistorySyncOnDemandRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.PeerDataOperationRequestMessage.FullHistorySyncOnDemandRequest + * @static + * @param {proto.Message.PeerDataOperationRequestMessage.IFullHistorySyncOnDemandRequest} message FullHistorySyncOnDemandRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FullHistorySyncOnDemandRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FullHistorySyncOnDemandRequest message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.PeerDataOperationRequestMessage.FullHistorySyncOnDemandRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.PeerDataOperationRequestMessage.FullHistorySyncOnDemandRequest} FullHistorySyncOnDemandRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FullHistorySyncOnDemandRequest.decode = function 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.PeerDataOperationRequestMessage.FullHistorySyncOnDemandRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.requestMetadata = $root.proto.Message.FullHistorySyncOnDemandRequestMetadata.decode(reader, reader.uint32()); + break; + } + case 2: { + message.historySyncConfig = $root.proto.DeviceProps.HistorySyncConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FullHistorySyncOnDemandRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.PeerDataOperationRequestMessage.FullHistorySyncOnDemandRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.PeerDataOperationRequestMessage.FullHistorySyncOnDemandRequest} FullHistorySyncOnDemandRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FullHistorySyncOnDemandRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FullHistorySyncOnDemandRequest message. + * @function verify + * @memberof proto.Message.PeerDataOperationRequestMessage.FullHistorySyncOnDemandRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FullHistorySyncOnDemandRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.requestMetadata != null && message.hasOwnProperty("requestMetadata")) { + properties._requestMetadata = 1; + { + var error = $root.proto.Message.FullHistorySyncOnDemandRequestMetadata.verify(message.requestMetadata); + if (error) + return "requestMetadata." + error; + } + } + if (message.historySyncConfig != null && message.hasOwnProperty("historySyncConfig")) { + properties._historySyncConfig = 1; + { + var error = $root.proto.DeviceProps.HistorySyncConfig.verify(message.historySyncConfig); + if (error) + return "historySyncConfig." + error; + } + } + return null; + }; + + /** + * Creates a FullHistorySyncOnDemandRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.PeerDataOperationRequestMessage.FullHistorySyncOnDemandRequest + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.PeerDataOperationRequestMessage.FullHistorySyncOnDemandRequest} FullHistorySyncOnDemandRequest + */ + FullHistorySyncOnDemandRequest.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.PeerDataOperationRequestMessage.FullHistorySyncOnDemandRequest) + return object; + var message = new $root.proto.Message.PeerDataOperationRequestMessage.FullHistorySyncOnDemandRequest(); + if (object.requestMetadata != null) { + if (typeof object.requestMetadata !== "object") + throw TypeError(".proto.Message.PeerDataOperationRequestMessage.FullHistorySyncOnDemandRequest.requestMetadata: object expected"); + message.requestMetadata = $root.proto.Message.FullHistorySyncOnDemandRequestMetadata.fromObject(object.requestMetadata); + } + if (object.historySyncConfig != null) { + if (typeof object.historySyncConfig !== "object") + throw TypeError(".proto.Message.PeerDataOperationRequestMessage.FullHistorySyncOnDemandRequest.historySyncConfig: object expected"); + message.historySyncConfig = $root.proto.DeviceProps.HistorySyncConfig.fromObject(object.historySyncConfig); + } + return message; + }; + + /** + * Creates a plain object from a FullHistorySyncOnDemandRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.PeerDataOperationRequestMessage.FullHistorySyncOnDemandRequest + * @static + * @param {proto.Message.PeerDataOperationRequestMessage.FullHistorySyncOnDemandRequest} message FullHistorySyncOnDemandRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FullHistorySyncOnDemandRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.requestMetadata != null && message.hasOwnProperty("requestMetadata")) { + object.requestMetadata = $root.proto.Message.FullHistorySyncOnDemandRequestMetadata.toObject(message.requestMetadata, options); + if (options.oneofs) + object._requestMetadata = "requestMetadata"; + } + if (message.historySyncConfig != null && message.hasOwnProperty("historySyncConfig")) { + object.historySyncConfig = $root.proto.DeviceProps.HistorySyncConfig.toObject(message.historySyncConfig, options); + if (options.oneofs) + object._historySyncConfig = "historySyncConfig"; + } + return object; + }; + + /** + * Converts this FullHistorySyncOnDemandRequest to JSON. + * @function toJSON + * @memberof proto.Message.PeerDataOperationRequestMessage.FullHistorySyncOnDemandRequest + * @instance + * @returns {Object.} JSON object + */ + FullHistorySyncOnDemandRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FullHistorySyncOnDemandRequest + * @function getTypeUrl + * @memberof proto.Message.PeerDataOperationRequestMessage.FullHistorySyncOnDemandRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FullHistorySyncOnDemandRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.PeerDataOperationRequestMessage.FullHistorySyncOnDemandRequest"; + }; + + return FullHistorySyncOnDemandRequest; + })(); + PeerDataOperationRequestMessage.HistorySyncOnDemandRequest = (function() { /** @@ -52073,6 +84464,7 @@ $root.proto = (function() { * @property {boolean|null} [oldestMsgFromMe] HistorySyncOnDemandRequest oldestMsgFromMe * @property {number|null} [onDemandMsgCount] HistorySyncOnDemandRequest onDemandMsgCount * @property {number|Long|null} [oldestMsgTimestampMs] HistorySyncOnDemandRequest oldestMsgTimestampMs + * @property {string|null} [accountLid] HistorySyncOnDemandRequest accountLid */ /** @@ -52092,43 +84484,90 @@ $root.proto = (function() { /** * HistorySyncOnDemandRequest chatJid. - * @member {string} chatJid + * @member {string|null|undefined} chatJid * @memberof proto.Message.PeerDataOperationRequestMessage.HistorySyncOnDemandRequest * @instance */ - HistorySyncOnDemandRequest.prototype.chatJid = ""; + HistorySyncOnDemandRequest.prototype.chatJid = null; /** * HistorySyncOnDemandRequest oldestMsgId. - * @member {string} oldestMsgId + * @member {string|null|undefined} oldestMsgId * @memberof proto.Message.PeerDataOperationRequestMessage.HistorySyncOnDemandRequest * @instance */ - HistorySyncOnDemandRequest.prototype.oldestMsgId = ""; + HistorySyncOnDemandRequest.prototype.oldestMsgId = null; /** * HistorySyncOnDemandRequest oldestMsgFromMe. - * @member {boolean} oldestMsgFromMe + * @member {boolean|null|undefined} oldestMsgFromMe * @memberof proto.Message.PeerDataOperationRequestMessage.HistorySyncOnDemandRequest * @instance */ - HistorySyncOnDemandRequest.prototype.oldestMsgFromMe = false; + HistorySyncOnDemandRequest.prototype.oldestMsgFromMe = null; /** * HistorySyncOnDemandRequest onDemandMsgCount. - * @member {number} onDemandMsgCount + * @member {number|null|undefined} onDemandMsgCount * @memberof proto.Message.PeerDataOperationRequestMessage.HistorySyncOnDemandRequest * @instance */ - HistorySyncOnDemandRequest.prototype.onDemandMsgCount = 0; + HistorySyncOnDemandRequest.prototype.onDemandMsgCount = null; /** * HistorySyncOnDemandRequest oldestMsgTimestampMs. - * @member {number|Long} oldestMsgTimestampMs + * @member {number|Long|null|undefined} oldestMsgTimestampMs * @memberof proto.Message.PeerDataOperationRequestMessage.HistorySyncOnDemandRequest * @instance */ - HistorySyncOnDemandRequest.prototype.oldestMsgTimestampMs = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + HistorySyncOnDemandRequest.prototype.oldestMsgTimestampMs = null; + + /** + * HistorySyncOnDemandRequest accountLid. + * @member {string|null|undefined} accountLid + * @memberof proto.Message.PeerDataOperationRequestMessage.HistorySyncOnDemandRequest + * @instance + */ + HistorySyncOnDemandRequest.prototype.accountLid = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HistorySyncOnDemandRequest.prototype, "_chatJid", { + get: $util.oneOfGetter($oneOfFields = ["chatJid"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HistorySyncOnDemandRequest.prototype, "_oldestMsgId", { + get: $util.oneOfGetter($oneOfFields = ["oldestMsgId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HistorySyncOnDemandRequest.prototype, "_oldestMsgFromMe", { + get: $util.oneOfGetter($oneOfFields = ["oldestMsgFromMe"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HistorySyncOnDemandRequest.prototype, "_onDemandMsgCount", { + get: $util.oneOfGetter($oneOfFields = ["onDemandMsgCount"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HistorySyncOnDemandRequest.prototype, "_oldestMsgTimestampMs", { + get: $util.oneOfGetter($oneOfFields = ["oldestMsgTimestampMs"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HistorySyncOnDemandRequest.prototype, "_accountLid", { + get: $util.oneOfGetter($oneOfFields = ["accountLid"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new HistorySyncOnDemandRequest instance using the specified properties. @@ -52164,6 +84603,8 @@ $root.proto = (function() { writer.uint32(/* id 4, wireType 0 =*/32).int32(message.onDemandMsgCount); if (message.oldestMsgTimestampMs != null && Object.hasOwnProperty.call(message, "oldestMsgTimestampMs")) writer.uint32(/* id 5, wireType 0 =*/40).int64(message.oldestMsgTimestampMs); + if (message.accountLid != null && Object.hasOwnProperty.call(message, "accountLid")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.accountLid); return writer; }; @@ -52198,21 +84639,30 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.chatJid = reader.string(); - break; - case 2: - message.oldestMsgId = reader.string(); - break; - case 3: - message.oldestMsgFromMe = reader.bool(); - break; - case 4: - message.onDemandMsgCount = reader.int32(); - break; - case 5: - message.oldestMsgTimestampMs = reader.int64(); - break; + case 1: { + message.chatJid = reader.string(); + break; + } + case 2: { + message.oldestMsgId = reader.string(); + break; + } + case 3: { + message.oldestMsgFromMe = reader.bool(); + break; + } + case 4: { + message.onDemandMsgCount = reader.int32(); + break; + } + case 5: { + message.oldestMsgTimestampMs = reader.int64(); + break; + } + case 6: { + message.accountLid = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -52248,21 +84698,37 @@ $root.proto = (function() { HistorySyncOnDemandRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.chatJid != null && message.hasOwnProperty("chatJid")) + var properties = {}; + if (message.chatJid != null && message.hasOwnProperty("chatJid")) { + properties._chatJid = 1; if (!$util.isString(message.chatJid)) return "chatJid: string expected"; - if (message.oldestMsgId != null && message.hasOwnProperty("oldestMsgId")) + } + if (message.oldestMsgId != null && message.hasOwnProperty("oldestMsgId")) { + properties._oldestMsgId = 1; if (!$util.isString(message.oldestMsgId)) return "oldestMsgId: string expected"; - if (message.oldestMsgFromMe != null && message.hasOwnProperty("oldestMsgFromMe")) + } + if (message.oldestMsgFromMe != null && message.hasOwnProperty("oldestMsgFromMe")) { + properties._oldestMsgFromMe = 1; if (typeof message.oldestMsgFromMe !== "boolean") return "oldestMsgFromMe: boolean expected"; - if (message.onDemandMsgCount != null && message.hasOwnProperty("onDemandMsgCount")) + } + if (message.onDemandMsgCount != null && message.hasOwnProperty("onDemandMsgCount")) { + properties._onDemandMsgCount = 1; if (!$util.isInteger(message.onDemandMsgCount)) return "onDemandMsgCount: integer expected"; - if (message.oldestMsgTimestampMs != null && message.hasOwnProperty("oldestMsgTimestampMs")) + } + if (message.oldestMsgTimestampMs != null && message.hasOwnProperty("oldestMsgTimestampMs")) { + properties._oldestMsgTimestampMs = 1; if (!$util.isInteger(message.oldestMsgTimestampMs) && !(message.oldestMsgTimestampMs && $util.isInteger(message.oldestMsgTimestampMs.low) && $util.isInteger(message.oldestMsgTimestampMs.high))) return "oldestMsgTimestampMs: integer|Long expected"; + } + if (message.accountLid != null && message.hasOwnProperty("accountLid")) { + properties._accountLid = 1; + if (!$util.isString(message.accountLid)) + return "accountLid: string expected"; + } return null; }; @@ -52295,6 +84761,8 @@ $root.proto = (function() { message.oldestMsgTimestampMs = object.oldestMsgTimestampMs; else if (typeof object.oldestMsgTimestampMs === "object") message.oldestMsgTimestampMs = new $util.LongBits(object.oldestMsgTimestampMs.low >>> 0, object.oldestMsgTimestampMs.high >>> 0).toNumber(); + if (object.accountLid != null) + message.accountLid = String(object.accountLid); return message; }; @@ -52311,30 +84779,39 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.chatJid = ""; - object.oldestMsgId = ""; - object.oldestMsgFromMe = false; - object.onDemandMsgCount = 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.oldestMsgTimestampMs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.oldestMsgTimestampMs = options.longs === String ? "0" : 0; - } - if (message.chatJid != null && message.hasOwnProperty("chatJid")) + if (message.chatJid != null && message.hasOwnProperty("chatJid")) { object.chatJid = message.chatJid; - if (message.oldestMsgId != null && message.hasOwnProperty("oldestMsgId")) + if (options.oneofs) + object._chatJid = "chatJid"; + } + if (message.oldestMsgId != null && message.hasOwnProperty("oldestMsgId")) { object.oldestMsgId = message.oldestMsgId; - if (message.oldestMsgFromMe != null && message.hasOwnProperty("oldestMsgFromMe")) + if (options.oneofs) + object._oldestMsgId = "oldestMsgId"; + } + if (message.oldestMsgFromMe != null && message.hasOwnProperty("oldestMsgFromMe")) { object.oldestMsgFromMe = message.oldestMsgFromMe; - if (message.onDemandMsgCount != null && message.hasOwnProperty("onDemandMsgCount")) + if (options.oneofs) + object._oldestMsgFromMe = "oldestMsgFromMe"; + } + if (message.onDemandMsgCount != null && message.hasOwnProperty("onDemandMsgCount")) { object.onDemandMsgCount = message.onDemandMsgCount; - if (message.oldestMsgTimestampMs != null && message.hasOwnProperty("oldestMsgTimestampMs")) + if (options.oneofs) + object._onDemandMsgCount = "onDemandMsgCount"; + } + if (message.oldestMsgTimestampMs != null && message.hasOwnProperty("oldestMsgTimestampMs")) { if (typeof message.oldestMsgTimestampMs === "number") object.oldestMsgTimestampMs = options.longs === String ? String(message.oldestMsgTimestampMs) : message.oldestMsgTimestampMs; else object.oldestMsgTimestampMs = options.longs === String ? $util.Long.prototype.toString.call(message.oldestMsgTimestampMs) : options.longs === Number ? new $util.LongBits(message.oldestMsgTimestampMs.low >>> 0, message.oldestMsgTimestampMs.high >>> 0).toNumber() : message.oldestMsgTimestampMs; + if (options.oneofs) + object._oldestMsgTimestampMs = "oldestMsgTimestampMs"; + } + if (message.accountLid != null && message.hasOwnProperty("accountLid")) { + object.accountLid = message.accountLid; + if (options.oneofs) + object._accountLid = "accountLid"; + } return object; }; @@ -52349,6 +84826,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for HistorySyncOnDemandRequest + * @function getTypeUrl + * @memberof proto.Message.PeerDataOperationRequestMessage.HistorySyncOnDemandRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HistorySyncOnDemandRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.PeerDataOperationRequestMessage.HistorySyncOnDemandRequest"; + }; + return HistorySyncOnDemandRequest; })(); @@ -52384,6 +84876,15 @@ $root.proto = (function() { */ PlaceholderMessageResendRequest.prototype.messageKey = null; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PlaceholderMessageResendRequest.prototype, "_messageKey", { + get: $util.oneOfGetter($oneOfFields = ["messageKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new PlaceholderMessageResendRequest instance using the specified properties. * @function create @@ -52444,9 +84945,10 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.messageKey = $root.proto.MessageKey.decode(reader, reader.uint32()); - break; + case 1: { + message.messageKey = $root.proto.MessageKey.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -52482,10 +84984,14 @@ $root.proto = (function() { PlaceholderMessageResendRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; if (message.messageKey != null && message.hasOwnProperty("messageKey")) { - var error = $root.proto.MessageKey.verify(message.messageKey); - if (error) - return "messageKey." + error; + properties._messageKey = 1; + { + var error = $root.proto.MessageKey.verify(message.messageKey); + if (error) + return "messageKey." + error; + } } return null; }; @@ -52523,10 +85029,11 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) - object.messageKey = null; - if (message.messageKey != null && message.hasOwnProperty("messageKey")) + if (message.messageKey != null && message.hasOwnProperty("messageKey")) { object.messageKey = $root.proto.MessageKey.toObject(message.messageKey, options); + if (options.oneofs) + object._messageKey = "messageKey"; + } return object; }; @@ -52541,6 +85048,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for PlaceholderMessageResendRequest + * @function getTypeUrl + * @memberof proto.Message.PeerDataOperationRequestMessage.PlaceholderMessageResendRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PlaceholderMessageResendRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.PeerDataOperationRequestMessage.PlaceholderMessageResendRequest"; + }; + return PlaceholderMessageResendRequest; })(); @@ -52570,11 +85092,20 @@ $root.proto = (function() { /** * RequestStickerReupload fileSha256. - * @member {string} fileSha256 + * @member {string|null|undefined} fileSha256 * @memberof proto.Message.PeerDataOperationRequestMessage.RequestStickerReupload * @instance */ - RequestStickerReupload.prototype.fileSha256 = ""; + RequestStickerReupload.prototype.fileSha256 = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(RequestStickerReupload.prototype, "_fileSha256", { + get: $util.oneOfGetter($oneOfFields = ["fileSha256"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new RequestStickerReupload instance using the specified properties. @@ -52636,9 +85167,10 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.fileSha256 = reader.string(); - break; + case 1: { + message.fileSha256 = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -52674,9 +85206,12 @@ $root.proto = (function() { RequestStickerReupload.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) + var properties = {}; + if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) { + properties._fileSha256 = 1; if (!$util.isString(message.fileSha256)) return "fileSha256: string expected"; + } return null; }; @@ -52710,10 +85245,11 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) - object.fileSha256 = ""; - if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) + if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) { object.fileSha256 = message.fileSha256; + if (options.oneofs) + object._fileSha256 = "fileSha256"; + } return object; }; @@ -52728,6 +85264,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for RequestStickerReupload + * @function getTypeUrl + * @memberof proto.Message.PeerDataOperationRequestMessage.RequestStickerReupload + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RequestStickerReupload.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.PeerDataOperationRequestMessage.RequestStickerReupload"; + }; + return RequestStickerReupload; })(); @@ -52758,19 +85309,34 @@ $root.proto = (function() { /** * RequestUrlPreview url. - * @member {string} url + * @member {string|null|undefined} url * @memberof proto.Message.PeerDataOperationRequestMessage.RequestUrlPreview * @instance */ - RequestUrlPreview.prototype.url = ""; + RequestUrlPreview.prototype.url = null; /** * RequestUrlPreview includeHqThumbnail. - * @member {boolean} includeHqThumbnail + * @member {boolean|null|undefined} includeHqThumbnail * @memberof proto.Message.PeerDataOperationRequestMessage.RequestUrlPreview * @instance */ - RequestUrlPreview.prototype.includeHqThumbnail = false; + RequestUrlPreview.prototype.includeHqThumbnail = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(RequestUrlPreview.prototype, "_url", { + get: $util.oneOfGetter($oneOfFields = ["url"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(RequestUrlPreview.prototype, "_includeHqThumbnail", { + get: $util.oneOfGetter($oneOfFields = ["includeHqThumbnail"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new RequestUrlPreview instance using the specified properties. @@ -52834,12 +85400,14 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.url = reader.string(); - break; - case 2: - message.includeHqThumbnail = reader.bool(); - break; + case 1: { + message.url = reader.string(); + break; + } + case 2: { + message.includeHqThumbnail = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -52875,12 +85443,17 @@ $root.proto = (function() { RequestUrlPreview.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.url != null && message.hasOwnProperty("url")) + var properties = {}; + if (message.url != null && message.hasOwnProperty("url")) { + properties._url = 1; if (!$util.isString(message.url)) return "url: string expected"; - if (message.includeHqThumbnail != null && message.hasOwnProperty("includeHqThumbnail")) + } + if (message.includeHqThumbnail != null && message.hasOwnProperty("includeHqThumbnail")) { + properties._includeHqThumbnail = 1; if (typeof message.includeHqThumbnail !== "boolean") return "includeHqThumbnail: boolean expected"; + } return null; }; @@ -52916,14 +85489,16 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.url = ""; - object.includeHqThumbnail = false; - } - if (message.url != null && message.hasOwnProperty("url")) + if (message.url != null && message.hasOwnProperty("url")) { object.url = message.url; - if (message.includeHqThumbnail != null && message.hasOwnProperty("includeHqThumbnail")) + if (options.oneofs) + object._url = "url"; + } + if (message.includeHqThumbnail != null && message.hasOwnProperty("includeHqThumbnail")) { object.includeHqThumbnail = message.includeHqThumbnail; + if (options.oneofs) + object._includeHqThumbnail = "includeHqThumbnail"; + } return object; }; @@ -52938,6 +85513,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for RequestUrlPreview + * @function getTypeUrl + * @memberof proto.Message.PeerDataOperationRequestMessage.RequestUrlPreview + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RequestUrlPreview.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.PeerDataOperationRequestMessage.RequestUrlPreview"; + }; + return RequestUrlPreview; })(); @@ -52973,19 +85563,19 @@ $root.proto = (function() { /** * PeerDataOperationRequestResponseMessage peerDataOperationRequestType. - * @member {proto.Message.PeerDataOperationRequestType} peerDataOperationRequestType + * @member {proto.Message.PeerDataOperationRequestType|null|undefined} peerDataOperationRequestType * @memberof proto.Message.PeerDataOperationRequestResponseMessage * @instance */ - PeerDataOperationRequestResponseMessage.prototype.peerDataOperationRequestType = 0; + PeerDataOperationRequestResponseMessage.prototype.peerDataOperationRequestType = null; /** * PeerDataOperationRequestResponseMessage stanzaId. - * @member {string} stanzaId + * @member {string|null|undefined} stanzaId * @memberof proto.Message.PeerDataOperationRequestResponseMessage * @instance */ - PeerDataOperationRequestResponseMessage.prototype.stanzaId = ""; + PeerDataOperationRequestResponseMessage.prototype.stanzaId = null; /** * PeerDataOperationRequestResponseMessage peerDataOperationResult. @@ -52995,6 +85585,21 @@ $root.proto = (function() { */ PeerDataOperationRequestResponseMessage.prototype.peerDataOperationResult = $util.emptyArray; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PeerDataOperationRequestResponseMessage.prototype, "_peerDataOperationRequestType", { + get: $util.oneOfGetter($oneOfFields = ["peerDataOperationRequestType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PeerDataOperationRequestResponseMessage.prototype, "_stanzaId", { + get: $util.oneOfGetter($oneOfFields = ["stanzaId"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new PeerDataOperationRequestResponseMessage instance using the specified properties. * @function create @@ -53060,17 +85665,20 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.peerDataOperationRequestType = reader.int32(); - break; - case 2: - message.stanzaId = reader.string(); - break; - case 3: - if (!(message.peerDataOperationResult && message.peerDataOperationResult.length)) - message.peerDataOperationResult = []; - message.peerDataOperationResult.push($root.proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.decode(reader, reader.uint32())); - break; + case 1: { + message.peerDataOperationRequestType = reader.int32(); + break; + } + case 2: { + message.stanzaId = reader.string(); + break; + } + case 3: { + if (!(message.peerDataOperationResult && message.peerDataOperationResult.length)) + message.peerDataOperationResult = []; + message.peerDataOperationResult.push($root.proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -53106,7 +85714,9 @@ $root.proto = (function() { PeerDataOperationRequestResponseMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.peerDataOperationRequestType != null && message.hasOwnProperty("peerDataOperationRequestType")) + var properties = {}; + if (message.peerDataOperationRequestType != null && message.hasOwnProperty("peerDataOperationRequestType")) { + properties._peerDataOperationRequestType = 1; switch (message.peerDataOperationRequestType) { default: return "peerDataOperationRequestType: enum value expected"; @@ -53115,11 +85725,17 @@ $root.proto = (function() { case 2: case 3: case 4: + case 5: + case 6: + case 7: break; } - if (message.stanzaId != null && message.hasOwnProperty("stanzaId")) + } + if (message.stanzaId != null && message.hasOwnProperty("stanzaId")) { + properties._stanzaId = 1; if (!$util.isString(message.stanzaId)) return "stanzaId: string expected"; + } if (message.peerDataOperationResult != null && message.hasOwnProperty("peerDataOperationResult")) { if (!Array.isArray(message.peerDataOperationResult)) return "peerDataOperationResult: array expected"; @@ -53145,6 +85761,12 @@ $root.proto = (function() { return object; var message = new $root.proto.Message.PeerDataOperationRequestResponseMessage(); switch (object.peerDataOperationRequestType) { + default: + if (typeof object.peerDataOperationRequestType === "number") { + message.peerDataOperationRequestType = object.peerDataOperationRequestType; + break; + } + break; case "UPLOAD_STICKER": case 0: message.peerDataOperationRequestType = 0; @@ -53165,6 +85787,18 @@ $root.proto = (function() { case 4: message.peerDataOperationRequestType = 4; break; + case "WAFFLE_LINKING_NONCE_FETCH": + case 5: + message.peerDataOperationRequestType = 5; + break; + case "FULL_HISTORY_SYNC_ON_DEMAND": + case 6: + message.peerDataOperationRequestType = 6; + break; + case "COMPANION_META_NONCE_FETCH": + case 7: + message.peerDataOperationRequestType = 7; + break; } if (object.stanzaId != null) message.stanzaId = String(object.stanzaId); @@ -53196,14 +85830,16 @@ $root.proto = (function() { var object = {}; if (options.arrays || options.defaults) object.peerDataOperationResult = []; - if (options.defaults) { - object.peerDataOperationRequestType = options.enums === String ? "UPLOAD_STICKER" : 0; - object.stanzaId = ""; + if (message.peerDataOperationRequestType != null && message.hasOwnProperty("peerDataOperationRequestType")) { + object.peerDataOperationRequestType = options.enums === String ? $root.proto.Message.PeerDataOperationRequestType[message.peerDataOperationRequestType] === undefined ? message.peerDataOperationRequestType : $root.proto.Message.PeerDataOperationRequestType[message.peerDataOperationRequestType] : message.peerDataOperationRequestType; + if (options.oneofs) + object._peerDataOperationRequestType = "peerDataOperationRequestType"; } - if (message.peerDataOperationRequestType != null && message.hasOwnProperty("peerDataOperationRequestType")) - object.peerDataOperationRequestType = options.enums === String ? $root.proto.Message.PeerDataOperationRequestType[message.peerDataOperationRequestType] : message.peerDataOperationRequestType; - if (message.stanzaId != null && message.hasOwnProperty("stanzaId")) + if (message.stanzaId != null && message.hasOwnProperty("stanzaId")) { object.stanzaId = message.stanzaId; + if (options.oneofs) + object._stanzaId = "stanzaId"; + } if (message.peerDataOperationResult && message.peerDataOperationResult.length) { object.peerDataOperationResult = []; for (var j = 0; j < message.peerDataOperationResult.length; ++j) @@ -53223,6 +85859,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for PeerDataOperationRequestResponseMessage + * @function getTypeUrl + * @memberof proto.Message.PeerDataOperationRequestResponseMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PeerDataOperationRequestResponseMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.PeerDataOperationRequestResponseMessage"; + }; + PeerDataOperationRequestResponseMessage.PeerDataOperationResult = (function() { /** @@ -53233,6 +85884,9 @@ $root.proto = (function() { * @property {proto.Message.IStickerMessage|null} [stickerMessage] PeerDataOperationResult stickerMessage * @property {proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.ILinkPreviewResponse|null} [linkPreviewResponse] PeerDataOperationResult linkPreviewResponse * @property {proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.IPlaceholderMessageResendResponse|null} [placeholderMessageResendResponse] PeerDataOperationResult placeholderMessageResendResponse + * @property {proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.IWaffleNonceFetchResponse|null} [waffleNonceFetchRequestResponse] PeerDataOperationResult waffleNonceFetchRequestResponse + * @property {proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.IFullHistorySyncOnDemandRequestResponse|null} [fullHistorySyncOnDemandRequestResponse] PeerDataOperationResult fullHistorySyncOnDemandRequestResponse + * @property {proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.ICompanionMetaNonceFetchResponse|null} [companionMetaNonceFetchRequestResponse] PeerDataOperationResult companionMetaNonceFetchRequestResponse */ /** @@ -53252,11 +85906,11 @@ $root.proto = (function() { /** * PeerDataOperationResult mediaUploadResult. - * @member {proto.MediaRetryNotification.ResultType} mediaUploadResult + * @member {proto.MediaRetryNotification.ResultType|null|undefined} mediaUploadResult * @memberof proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult * @instance */ - PeerDataOperationResult.prototype.mediaUploadResult = 0; + PeerDataOperationResult.prototype.mediaUploadResult = null; /** * PeerDataOperationResult stickerMessage. @@ -53282,6 +85936,75 @@ $root.proto = (function() { */ PeerDataOperationResult.prototype.placeholderMessageResendResponse = null; + /** + * PeerDataOperationResult waffleNonceFetchRequestResponse. + * @member {proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.IWaffleNonceFetchResponse|null|undefined} waffleNonceFetchRequestResponse + * @memberof proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult + * @instance + */ + PeerDataOperationResult.prototype.waffleNonceFetchRequestResponse = null; + + /** + * PeerDataOperationResult fullHistorySyncOnDemandRequestResponse. + * @member {proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.IFullHistorySyncOnDemandRequestResponse|null|undefined} fullHistorySyncOnDemandRequestResponse + * @memberof proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult + * @instance + */ + PeerDataOperationResult.prototype.fullHistorySyncOnDemandRequestResponse = null; + + /** + * PeerDataOperationResult companionMetaNonceFetchRequestResponse. + * @member {proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.ICompanionMetaNonceFetchResponse|null|undefined} companionMetaNonceFetchRequestResponse + * @memberof proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult + * @instance + */ + PeerDataOperationResult.prototype.companionMetaNonceFetchRequestResponse = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PeerDataOperationResult.prototype, "_mediaUploadResult", { + get: $util.oneOfGetter($oneOfFields = ["mediaUploadResult"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PeerDataOperationResult.prototype, "_stickerMessage", { + get: $util.oneOfGetter($oneOfFields = ["stickerMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PeerDataOperationResult.prototype, "_linkPreviewResponse", { + get: $util.oneOfGetter($oneOfFields = ["linkPreviewResponse"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PeerDataOperationResult.prototype, "_placeholderMessageResendResponse", { + get: $util.oneOfGetter($oneOfFields = ["placeholderMessageResendResponse"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PeerDataOperationResult.prototype, "_waffleNonceFetchRequestResponse", { + get: $util.oneOfGetter($oneOfFields = ["waffleNonceFetchRequestResponse"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PeerDataOperationResult.prototype, "_fullHistorySyncOnDemandRequestResponse", { + get: $util.oneOfGetter($oneOfFields = ["fullHistorySyncOnDemandRequestResponse"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PeerDataOperationResult.prototype, "_companionMetaNonceFetchRequestResponse", { + get: $util.oneOfGetter($oneOfFields = ["companionMetaNonceFetchRequestResponse"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new PeerDataOperationResult instance using the specified properties. * @function create @@ -53314,6 +86037,12 @@ $root.proto = (function() { $root.proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.encode(message.linkPreviewResponse, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); if (message.placeholderMessageResendResponse != null && Object.hasOwnProperty.call(message, "placeholderMessageResendResponse")) $root.proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.PlaceholderMessageResendResponse.encode(message.placeholderMessageResendResponse, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.waffleNonceFetchRequestResponse != null && Object.hasOwnProperty.call(message, "waffleNonceFetchRequestResponse")) + $root.proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.WaffleNonceFetchResponse.encode(message.waffleNonceFetchRequestResponse, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.fullHistorySyncOnDemandRequestResponse != null && Object.hasOwnProperty.call(message, "fullHistorySyncOnDemandRequestResponse")) + $root.proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.FullHistorySyncOnDemandRequestResponse.encode(message.fullHistorySyncOnDemandRequestResponse, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.companionMetaNonceFetchRequestResponse != null && Object.hasOwnProperty.call(message, "companionMetaNonceFetchRequestResponse")) + $root.proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionMetaNonceFetchResponse.encode(message.companionMetaNonceFetchRequestResponse, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); return writer; }; @@ -53348,18 +86077,34 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.mediaUploadResult = reader.int32(); - break; - case 2: - message.stickerMessage = $root.proto.Message.StickerMessage.decode(reader, reader.uint32()); - break; - case 3: - message.linkPreviewResponse = $root.proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.decode(reader, reader.uint32()); - break; - case 4: - message.placeholderMessageResendResponse = $root.proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.PlaceholderMessageResendResponse.decode(reader, reader.uint32()); - break; + case 1: { + message.mediaUploadResult = reader.int32(); + break; + } + case 2: { + message.stickerMessage = $root.proto.Message.StickerMessage.decode(reader, reader.uint32()); + break; + } + case 3: { + message.linkPreviewResponse = $root.proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.decode(reader, reader.uint32()); + break; + } + case 4: { + message.placeholderMessageResendResponse = $root.proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.PlaceholderMessageResendResponse.decode(reader, reader.uint32()); + break; + } + case 5: { + message.waffleNonceFetchRequestResponse = $root.proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.WaffleNonceFetchResponse.decode(reader, reader.uint32()); + break; + } + case 6: { + message.fullHistorySyncOnDemandRequestResponse = $root.proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.FullHistorySyncOnDemandRequestResponse.decode(reader, reader.uint32()); + break; + } + case 7: { + message.companionMetaNonceFetchRequestResponse = $root.proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionMetaNonceFetchResponse.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -53395,7 +86140,9 @@ $root.proto = (function() { PeerDataOperationResult.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.mediaUploadResult != null && message.hasOwnProperty("mediaUploadResult")) + var properties = {}; + if (message.mediaUploadResult != null && message.hasOwnProperty("mediaUploadResult")) { + properties._mediaUploadResult = 1; switch (message.mediaUploadResult) { default: return "mediaUploadResult: enum value expected"; @@ -53405,20 +86152,54 @@ $root.proto = (function() { case 3: break; } + } if (message.stickerMessage != null && message.hasOwnProperty("stickerMessage")) { - var error = $root.proto.Message.StickerMessage.verify(message.stickerMessage); - if (error) - return "stickerMessage." + error; + properties._stickerMessage = 1; + { + var error = $root.proto.Message.StickerMessage.verify(message.stickerMessage); + if (error) + return "stickerMessage." + error; + } } if (message.linkPreviewResponse != null && message.hasOwnProperty("linkPreviewResponse")) { - var error = $root.proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.verify(message.linkPreviewResponse); - if (error) - return "linkPreviewResponse." + error; + properties._linkPreviewResponse = 1; + { + var error = $root.proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.verify(message.linkPreviewResponse); + if (error) + return "linkPreviewResponse." + error; + } } if (message.placeholderMessageResendResponse != null && message.hasOwnProperty("placeholderMessageResendResponse")) { - var error = $root.proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.PlaceholderMessageResendResponse.verify(message.placeholderMessageResendResponse); - if (error) - return "placeholderMessageResendResponse." + error; + properties._placeholderMessageResendResponse = 1; + { + var error = $root.proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.PlaceholderMessageResendResponse.verify(message.placeholderMessageResendResponse); + if (error) + return "placeholderMessageResendResponse." + error; + } + } + if (message.waffleNonceFetchRequestResponse != null && message.hasOwnProperty("waffleNonceFetchRequestResponse")) { + properties._waffleNonceFetchRequestResponse = 1; + { + var error = $root.proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.WaffleNonceFetchResponse.verify(message.waffleNonceFetchRequestResponse); + if (error) + return "waffleNonceFetchRequestResponse." + error; + } + } + if (message.fullHistorySyncOnDemandRequestResponse != null && message.hasOwnProperty("fullHistorySyncOnDemandRequestResponse")) { + properties._fullHistorySyncOnDemandRequestResponse = 1; + { + var error = $root.proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.FullHistorySyncOnDemandRequestResponse.verify(message.fullHistorySyncOnDemandRequestResponse); + if (error) + return "fullHistorySyncOnDemandRequestResponse." + error; + } + } + if (message.companionMetaNonceFetchRequestResponse != null && message.hasOwnProperty("companionMetaNonceFetchRequestResponse")) { + properties._companionMetaNonceFetchRequestResponse = 1; + { + var error = $root.proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionMetaNonceFetchResponse.verify(message.companionMetaNonceFetchRequestResponse); + if (error) + return "companionMetaNonceFetchRequestResponse." + error; + } } return null; }; @@ -53436,6 +86217,12 @@ $root.proto = (function() { return object; var message = new $root.proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult(); switch (object.mediaUploadResult) { + default: + if (typeof object.mediaUploadResult === "number") { + message.mediaUploadResult = object.mediaUploadResult; + break; + } + break; case "GENERAL_ERROR": case 0: message.mediaUploadResult = 0; @@ -53468,6 +86255,21 @@ $root.proto = (function() { throw TypeError(".proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.placeholderMessageResendResponse: object expected"); message.placeholderMessageResendResponse = $root.proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.PlaceholderMessageResendResponse.fromObject(object.placeholderMessageResendResponse); } + if (object.waffleNonceFetchRequestResponse != null) { + if (typeof object.waffleNonceFetchRequestResponse !== "object") + throw TypeError(".proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.waffleNonceFetchRequestResponse: object expected"); + message.waffleNonceFetchRequestResponse = $root.proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.WaffleNonceFetchResponse.fromObject(object.waffleNonceFetchRequestResponse); + } + if (object.fullHistorySyncOnDemandRequestResponse != null) { + if (typeof object.fullHistorySyncOnDemandRequestResponse !== "object") + throw TypeError(".proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.fullHistorySyncOnDemandRequestResponse: object expected"); + message.fullHistorySyncOnDemandRequestResponse = $root.proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.FullHistorySyncOnDemandRequestResponse.fromObject(object.fullHistorySyncOnDemandRequestResponse); + } + if (object.companionMetaNonceFetchRequestResponse != null) { + if (typeof object.companionMetaNonceFetchRequestResponse !== "object") + throw TypeError(".proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.companionMetaNonceFetchRequestResponse: object expected"); + message.companionMetaNonceFetchRequestResponse = $root.proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionMetaNonceFetchResponse.fromObject(object.companionMetaNonceFetchRequestResponse); + } return message; }; @@ -53484,20 +86286,41 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.mediaUploadResult = options.enums === String ? "GENERAL_ERROR" : 0; - object.stickerMessage = null; - object.linkPreviewResponse = null; - object.placeholderMessageResendResponse = null; + if (message.mediaUploadResult != null && message.hasOwnProperty("mediaUploadResult")) { + object.mediaUploadResult = options.enums === String ? $root.proto.MediaRetryNotification.ResultType[message.mediaUploadResult] === undefined ? message.mediaUploadResult : $root.proto.MediaRetryNotification.ResultType[message.mediaUploadResult] : message.mediaUploadResult; + if (options.oneofs) + object._mediaUploadResult = "mediaUploadResult"; } - 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")) + if (message.stickerMessage != null && message.hasOwnProperty("stickerMessage")) { object.stickerMessage = $root.proto.Message.StickerMessage.toObject(message.stickerMessage, options); - if (message.linkPreviewResponse != null && message.hasOwnProperty("linkPreviewResponse")) + if (options.oneofs) + object._stickerMessage = "stickerMessage"; + } + if (message.linkPreviewResponse != null && message.hasOwnProperty("linkPreviewResponse")) { object.linkPreviewResponse = $root.proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.toObject(message.linkPreviewResponse, options); - if (message.placeholderMessageResendResponse != null && message.hasOwnProperty("placeholderMessageResendResponse")) + if (options.oneofs) + object._linkPreviewResponse = "linkPreviewResponse"; + } + if (message.placeholderMessageResendResponse != null && message.hasOwnProperty("placeholderMessageResendResponse")) { object.placeholderMessageResendResponse = $root.proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.PlaceholderMessageResendResponse.toObject(message.placeholderMessageResendResponse, options); + if (options.oneofs) + object._placeholderMessageResendResponse = "placeholderMessageResendResponse"; + } + if (message.waffleNonceFetchRequestResponse != null && message.hasOwnProperty("waffleNonceFetchRequestResponse")) { + object.waffleNonceFetchRequestResponse = $root.proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.WaffleNonceFetchResponse.toObject(message.waffleNonceFetchRequestResponse, options); + if (options.oneofs) + object._waffleNonceFetchRequestResponse = "waffleNonceFetchRequestResponse"; + } + if (message.fullHistorySyncOnDemandRequestResponse != null && message.hasOwnProperty("fullHistorySyncOnDemandRequestResponse")) { + object.fullHistorySyncOnDemandRequestResponse = $root.proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.FullHistorySyncOnDemandRequestResponse.toObject(message.fullHistorySyncOnDemandRequestResponse, options); + if (options.oneofs) + object._fullHistorySyncOnDemandRequestResponse = "fullHistorySyncOnDemandRequestResponse"; + } + if (message.companionMetaNonceFetchRequestResponse != null && message.hasOwnProperty("companionMetaNonceFetchRequestResponse")) { + object.companionMetaNonceFetchRequestResponse = $root.proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionMetaNonceFetchResponse.toObject(message.companionMetaNonceFetchRequestResponse, options); + if (options.oneofs) + object._companionMetaNonceFetchRequestResponse = "companionMetaNonceFetchRequestResponse"; + } return object; }; @@ -53512,6 +86335,560 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for PeerDataOperationResult + * @function getTypeUrl + * @memberof proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PeerDataOperationResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult"; + }; + + PeerDataOperationResult.CompanionMetaNonceFetchResponse = (function() { + + /** + * Properties of a CompanionMetaNonceFetchResponse. + * @memberof proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult + * @interface ICompanionMetaNonceFetchResponse + * @property {string|null} [nonce] CompanionMetaNonceFetchResponse nonce + */ + + /** + * Constructs a new CompanionMetaNonceFetchResponse. + * @memberof proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult + * @classdesc Represents a CompanionMetaNonceFetchResponse. + * @implements ICompanionMetaNonceFetchResponse + * @constructor + * @param {proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.ICompanionMetaNonceFetchResponse=} [properties] Properties to set + */ + function CompanionMetaNonceFetchResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CompanionMetaNonceFetchResponse nonce. + * @member {string|null|undefined} nonce + * @memberof proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionMetaNonceFetchResponse + * @instance + */ + CompanionMetaNonceFetchResponse.prototype.nonce = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CompanionMetaNonceFetchResponse.prototype, "_nonce", { + get: $util.oneOfGetter($oneOfFields = ["nonce"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new CompanionMetaNonceFetchResponse instance using the specified properties. + * @function create + * @memberof proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionMetaNonceFetchResponse + * @static + * @param {proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.ICompanionMetaNonceFetchResponse=} [properties] Properties to set + * @returns {proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionMetaNonceFetchResponse} CompanionMetaNonceFetchResponse instance + */ + CompanionMetaNonceFetchResponse.create = function create(properties) { + return new CompanionMetaNonceFetchResponse(properties); + }; + + /** + * Encodes the specified CompanionMetaNonceFetchResponse message. Does not implicitly {@link proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionMetaNonceFetchResponse.verify|verify} messages. + * @function encode + * @memberof proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionMetaNonceFetchResponse + * @static + * @param {proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.ICompanionMetaNonceFetchResponse} message CompanionMetaNonceFetchResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompanionMetaNonceFetchResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.nonce != null && Object.hasOwnProperty.call(message, "nonce")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.nonce); + return writer; + }; + + /** + * Encodes the specified CompanionMetaNonceFetchResponse message, length delimited. Does not implicitly {@link proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionMetaNonceFetchResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionMetaNonceFetchResponse + * @static + * @param {proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.ICompanionMetaNonceFetchResponse} message CompanionMetaNonceFetchResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompanionMetaNonceFetchResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CompanionMetaNonceFetchResponse message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionMetaNonceFetchResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionMetaNonceFetchResponse} CompanionMetaNonceFetchResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompanionMetaNonceFetchResponse.decode = function 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.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionMetaNonceFetchResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.nonce = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CompanionMetaNonceFetchResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionMetaNonceFetchResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionMetaNonceFetchResponse} CompanionMetaNonceFetchResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompanionMetaNonceFetchResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CompanionMetaNonceFetchResponse message. + * @function verify + * @memberof proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionMetaNonceFetchResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CompanionMetaNonceFetchResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.nonce != null && message.hasOwnProperty("nonce")) { + properties._nonce = 1; + if (!$util.isString(message.nonce)) + return "nonce: string expected"; + } + return null; + }; + + /** + * Creates a CompanionMetaNonceFetchResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionMetaNonceFetchResponse + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionMetaNonceFetchResponse} CompanionMetaNonceFetchResponse + */ + CompanionMetaNonceFetchResponse.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionMetaNonceFetchResponse) + return object; + var message = new $root.proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionMetaNonceFetchResponse(); + if (object.nonce != null) + message.nonce = String(object.nonce); + return message; + }; + + /** + * Creates a plain object from a CompanionMetaNonceFetchResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionMetaNonceFetchResponse + * @static + * @param {proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionMetaNonceFetchResponse} message CompanionMetaNonceFetchResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CompanionMetaNonceFetchResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.nonce != null && message.hasOwnProperty("nonce")) { + object.nonce = message.nonce; + if (options.oneofs) + object._nonce = "nonce"; + } + return object; + }; + + /** + * Converts this CompanionMetaNonceFetchResponse to JSON. + * @function toJSON + * @memberof proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionMetaNonceFetchResponse + * @instance + * @returns {Object.} JSON object + */ + CompanionMetaNonceFetchResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CompanionMetaNonceFetchResponse + * @function getTypeUrl + * @memberof proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionMetaNonceFetchResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CompanionMetaNonceFetchResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionMetaNonceFetchResponse"; + }; + + return CompanionMetaNonceFetchResponse; + })(); + + PeerDataOperationResult.FullHistorySyncOnDemandRequestResponse = (function() { + + /** + * Properties of a FullHistorySyncOnDemandRequestResponse. + * @memberof proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult + * @interface IFullHistorySyncOnDemandRequestResponse + * @property {proto.Message.IFullHistorySyncOnDemandRequestMetadata|null} [requestMetadata] FullHistorySyncOnDemandRequestResponse requestMetadata + * @property {proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.FullHistorySyncOnDemandResponseCode|null} [responseCode] FullHistorySyncOnDemandRequestResponse responseCode + */ + + /** + * Constructs a new FullHistorySyncOnDemandRequestResponse. + * @memberof proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult + * @classdesc Represents a FullHistorySyncOnDemandRequestResponse. + * @implements IFullHistorySyncOnDemandRequestResponse + * @constructor + * @param {proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.IFullHistorySyncOnDemandRequestResponse=} [properties] Properties to set + */ + function FullHistorySyncOnDemandRequestResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FullHistorySyncOnDemandRequestResponse requestMetadata. + * @member {proto.Message.IFullHistorySyncOnDemandRequestMetadata|null|undefined} requestMetadata + * @memberof proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.FullHistorySyncOnDemandRequestResponse + * @instance + */ + FullHistorySyncOnDemandRequestResponse.prototype.requestMetadata = null; + + /** + * FullHistorySyncOnDemandRequestResponse responseCode. + * @member {proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.FullHistorySyncOnDemandResponseCode|null|undefined} responseCode + * @memberof proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.FullHistorySyncOnDemandRequestResponse + * @instance + */ + FullHistorySyncOnDemandRequestResponse.prototype.responseCode = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(FullHistorySyncOnDemandRequestResponse.prototype, "_requestMetadata", { + get: $util.oneOfGetter($oneOfFields = ["requestMetadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(FullHistorySyncOnDemandRequestResponse.prototype, "_responseCode", { + get: $util.oneOfGetter($oneOfFields = ["responseCode"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new FullHistorySyncOnDemandRequestResponse instance using the specified properties. + * @function create + * @memberof proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.FullHistorySyncOnDemandRequestResponse + * @static + * @param {proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.IFullHistorySyncOnDemandRequestResponse=} [properties] Properties to set + * @returns {proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.FullHistorySyncOnDemandRequestResponse} FullHistorySyncOnDemandRequestResponse instance + */ + FullHistorySyncOnDemandRequestResponse.create = function create(properties) { + return new FullHistorySyncOnDemandRequestResponse(properties); + }; + + /** + * Encodes the specified FullHistorySyncOnDemandRequestResponse message. Does not implicitly {@link proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.FullHistorySyncOnDemandRequestResponse.verify|verify} messages. + * @function encode + * @memberof proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.FullHistorySyncOnDemandRequestResponse + * @static + * @param {proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.IFullHistorySyncOnDemandRequestResponse} message FullHistorySyncOnDemandRequestResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FullHistorySyncOnDemandRequestResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.requestMetadata != null && Object.hasOwnProperty.call(message, "requestMetadata")) + $root.proto.Message.FullHistorySyncOnDemandRequestMetadata.encode(message.requestMetadata, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.responseCode != null && Object.hasOwnProperty.call(message, "responseCode")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.responseCode); + return writer; + }; + + /** + * Encodes the specified FullHistorySyncOnDemandRequestResponse message, length delimited. Does not implicitly {@link proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.FullHistorySyncOnDemandRequestResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.FullHistorySyncOnDemandRequestResponse + * @static + * @param {proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.IFullHistorySyncOnDemandRequestResponse} message FullHistorySyncOnDemandRequestResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FullHistorySyncOnDemandRequestResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FullHistorySyncOnDemandRequestResponse message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.FullHistorySyncOnDemandRequestResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.FullHistorySyncOnDemandRequestResponse} FullHistorySyncOnDemandRequestResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FullHistorySyncOnDemandRequestResponse.decode = function 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.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.FullHistorySyncOnDemandRequestResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.requestMetadata = $root.proto.Message.FullHistorySyncOnDemandRequestMetadata.decode(reader, reader.uint32()); + break; + } + case 2: { + message.responseCode = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FullHistorySyncOnDemandRequestResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.FullHistorySyncOnDemandRequestResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.FullHistorySyncOnDemandRequestResponse} FullHistorySyncOnDemandRequestResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FullHistorySyncOnDemandRequestResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FullHistorySyncOnDemandRequestResponse message. + * @function verify + * @memberof proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.FullHistorySyncOnDemandRequestResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FullHistorySyncOnDemandRequestResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.requestMetadata != null && message.hasOwnProperty("requestMetadata")) { + properties._requestMetadata = 1; + { + var error = $root.proto.Message.FullHistorySyncOnDemandRequestMetadata.verify(message.requestMetadata); + if (error) + return "requestMetadata." + error; + } + } + if (message.responseCode != null && message.hasOwnProperty("responseCode")) { + properties._responseCode = 1; + switch (message.responseCode) { + default: + return "responseCode: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + } + return null; + }; + + /** + * Creates a FullHistorySyncOnDemandRequestResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.FullHistorySyncOnDemandRequestResponse + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.FullHistorySyncOnDemandRequestResponse} FullHistorySyncOnDemandRequestResponse + */ + FullHistorySyncOnDemandRequestResponse.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.FullHistorySyncOnDemandRequestResponse) + return object; + var message = new $root.proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.FullHistorySyncOnDemandRequestResponse(); + if (object.requestMetadata != null) { + if (typeof object.requestMetadata !== "object") + throw TypeError(".proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.FullHistorySyncOnDemandRequestResponse.requestMetadata: object expected"); + message.requestMetadata = $root.proto.Message.FullHistorySyncOnDemandRequestMetadata.fromObject(object.requestMetadata); + } + switch (object.responseCode) { + default: + if (typeof object.responseCode === "number") { + message.responseCode = object.responseCode; + break; + } + break; + case "REQUEST_SUCCESS": + case 0: + message.responseCode = 0; + break; + case "REQUEST_TIME_EXPIRED": + case 1: + message.responseCode = 1; + break; + case "DECLINED_SHARING_HISTORY": + case 2: + message.responseCode = 2; + break; + case "GENERIC_ERROR": + case 3: + message.responseCode = 3; + break; + case "ERROR_REQUEST_ON_NON_SMB_PRIMARY": + case 4: + message.responseCode = 4; + break; + case "ERROR_HOSTED_DEVICE_NOT_CONNECTED": + case 5: + message.responseCode = 5; + break; + case "ERROR_HOSTED_DEVICE_LOGIN_TIME_NOT_SET": + case 6: + message.responseCode = 6; + break; + } + return message; + }; + + /** + * Creates a plain object from a FullHistorySyncOnDemandRequestResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.FullHistorySyncOnDemandRequestResponse + * @static + * @param {proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.FullHistorySyncOnDemandRequestResponse} message FullHistorySyncOnDemandRequestResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FullHistorySyncOnDemandRequestResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.requestMetadata != null && message.hasOwnProperty("requestMetadata")) { + object.requestMetadata = $root.proto.Message.FullHistorySyncOnDemandRequestMetadata.toObject(message.requestMetadata, options); + if (options.oneofs) + object._requestMetadata = "requestMetadata"; + } + if (message.responseCode != null && message.hasOwnProperty("responseCode")) { + object.responseCode = options.enums === String ? $root.proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.FullHistorySyncOnDemandResponseCode[message.responseCode] === undefined ? message.responseCode : $root.proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.FullHistorySyncOnDemandResponseCode[message.responseCode] : message.responseCode; + if (options.oneofs) + object._responseCode = "responseCode"; + } + return object; + }; + + /** + * Converts this FullHistorySyncOnDemandRequestResponse to JSON. + * @function toJSON + * @memberof proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.FullHistorySyncOnDemandRequestResponse + * @instance + * @returns {Object.} JSON object + */ + FullHistorySyncOnDemandRequestResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FullHistorySyncOnDemandRequestResponse + * @function getTypeUrl + * @memberof proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.FullHistorySyncOnDemandRequestResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FullHistorySyncOnDemandRequestResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.FullHistorySyncOnDemandRequestResponse"; + }; + + return FullHistorySyncOnDemandRequestResponse; + })(); + + /** + * FullHistorySyncOnDemandResponseCode enum. + * @name proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.FullHistorySyncOnDemandResponseCode + * @enum {number} + * @property {number} REQUEST_SUCCESS=0 REQUEST_SUCCESS value + * @property {number} REQUEST_TIME_EXPIRED=1 REQUEST_TIME_EXPIRED value + * @property {number} DECLINED_SHARING_HISTORY=2 DECLINED_SHARING_HISTORY value + * @property {number} GENERIC_ERROR=3 GENERIC_ERROR value + * @property {number} ERROR_REQUEST_ON_NON_SMB_PRIMARY=4 ERROR_REQUEST_ON_NON_SMB_PRIMARY value + * @property {number} ERROR_HOSTED_DEVICE_NOT_CONNECTED=5 ERROR_HOSTED_DEVICE_NOT_CONNECTED value + * @property {number} ERROR_HOSTED_DEVICE_LOGIN_TIME_NOT_SET=6 ERROR_HOSTED_DEVICE_LOGIN_TIME_NOT_SET value + */ + PeerDataOperationResult.FullHistorySyncOnDemandResponseCode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "REQUEST_SUCCESS"] = 0; + values[valuesById[1] = "REQUEST_TIME_EXPIRED"] = 1; + values[valuesById[2] = "DECLINED_SHARING_HISTORY"] = 2; + values[valuesById[3] = "GENERIC_ERROR"] = 3; + values[valuesById[4] = "ERROR_REQUEST_ON_NON_SMB_PRIMARY"] = 4; + values[valuesById[5] = "ERROR_HOSTED_DEVICE_NOT_CONNECTED"] = 5; + values[valuesById[6] = "ERROR_HOSTED_DEVICE_LOGIN_TIME_NOT_SET"] = 6; + return values; + })(); + PeerDataOperationResult.LinkPreviewResponse = (function() { /** @@ -53522,7 +86899,6 @@ $root.proto = (function() { * @property {string|null} [title] LinkPreviewResponse title * @property {string|null} [description] LinkPreviewResponse description * @property {Uint8Array|null} [thumbData] LinkPreviewResponse thumbData - * @property {string|null} [canonicalUrl] LinkPreviewResponse canonicalUrl * @property {string|null} [matchText] LinkPreviewResponse matchText * @property {string|null} [previewType] LinkPreviewResponse previewType * @property {proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.ILinkPreviewHighQualityThumbnail|null} [hqThumbnail] LinkPreviewResponse hqThumbnail @@ -53545,59 +86921,51 @@ $root.proto = (function() { /** * LinkPreviewResponse url. - * @member {string} url + * @member {string|null|undefined} url * @memberof proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse * @instance */ - LinkPreviewResponse.prototype.url = ""; + LinkPreviewResponse.prototype.url = null; /** * LinkPreviewResponse title. - * @member {string} title + * @member {string|null|undefined} title * @memberof proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse * @instance */ - LinkPreviewResponse.prototype.title = ""; + LinkPreviewResponse.prototype.title = null; /** * LinkPreviewResponse description. - * @member {string} description + * @member {string|null|undefined} description * @memberof proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse * @instance */ - LinkPreviewResponse.prototype.description = ""; + LinkPreviewResponse.prototype.description = null; /** * LinkPreviewResponse thumbData. - * @member {Uint8Array} thumbData + * @member {Uint8Array|null|undefined} thumbData * @memberof proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse * @instance */ - LinkPreviewResponse.prototype.thumbData = $util.newBuffer([]); - - /** - * LinkPreviewResponse canonicalUrl. - * @member {string} canonicalUrl - * @memberof proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse - * @instance - */ - LinkPreviewResponse.prototype.canonicalUrl = ""; + LinkPreviewResponse.prototype.thumbData = null; /** * LinkPreviewResponse matchText. - * @member {string} matchText + * @member {string|null|undefined} matchText * @memberof proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse * @instance */ - LinkPreviewResponse.prototype.matchText = ""; + LinkPreviewResponse.prototype.matchText = null; /** * LinkPreviewResponse previewType. - * @member {string} previewType + * @member {string|null|undefined} previewType * @memberof proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse * @instance */ - LinkPreviewResponse.prototype.previewType = ""; + LinkPreviewResponse.prototype.previewType = null; /** * LinkPreviewResponse hqThumbnail. @@ -53607,6 +86975,51 @@ $root.proto = (function() { */ LinkPreviewResponse.prototype.hqThumbnail = null; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(LinkPreviewResponse.prototype, "_url", { + get: $util.oneOfGetter($oneOfFields = ["url"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(LinkPreviewResponse.prototype, "_title", { + get: $util.oneOfGetter($oneOfFields = ["title"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(LinkPreviewResponse.prototype, "_description", { + get: $util.oneOfGetter($oneOfFields = ["description"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(LinkPreviewResponse.prototype, "_thumbData", { + get: $util.oneOfGetter($oneOfFields = ["thumbData"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(LinkPreviewResponse.prototype, "_matchText", { + get: $util.oneOfGetter($oneOfFields = ["matchText"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(LinkPreviewResponse.prototype, "_previewType", { + get: $util.oneOfGetter($oneOfFields = ["previewType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(LinkPreviewResponse.prototype, "_hqThumbnail", { + get: $util.oneOfGetter($oneOfFields = ["hqThumbnail"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new LinkPreviewResponse instance using the specified properties. * @function create @@ -53639,8 +87052,6 @@ $root.proto = (function() { writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); if (message.thumbData != null && Object.hasOwnProperty.call(message, "thumbData")) writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.thumbData); - if (message.canonicalUrl != null && Object.hasOwnProperty.call(message, "canonicalUrl")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.canonicalUrl); if (message.matchText != null && Object.hasOwnProperty.call(message, "matchText")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.matchText); if (message.previewType != null && Object.hasOwnProperty.call(message, "previewType")) @@ -53681,30 +87092,34 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.url = reader.string(); - break; - case 2: - message.title = reader.string(); - break; - case 3: - message.description = reader.string(); - break; - case 4: - message.thumbData = reader.bytes(); - break; - case 5: - message.canonicalUrl = reader.string(); - break; - case 6: - message.matchText = reader.string(); - break; - case 7: - message.previewType = reader.string(); - break; - case 8: - message.hqThumbnail = $root.proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.LinkPreviewHighQualityThumbnail.decode(reader, reader.uint32()); - break; + case 1: { + message.url = reader.string(); + break; + } + case 2: { + message.title = reader.string(); + break; + } + case 3: { + message.description = reader.string(); + break; + } + case 4: { + message.thumbData = reader.bytes(); + break; + } + case 6: { + message.matchText = reader.string(); + break; + } + case 7: { + message.previewType = reader.string(); + break; + } + case 8: { + message.hqThumbnail = $root.proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.LinkPreviewHighQualityThumbnail.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -53740,31 +87155,44 @@ $root.proto = (function() { LinkPreviewResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.url != null && message.hasOwnProperty("url")) + var properties = {}; + if (message.url != null && message.hasOwnProperty("url")) { + properties._url = 1; if (!$util.isString(message.url)) return "url: string expected"; - if (message.title != null && message.hasOwnProperty("title")) + } + if (message.title != null && message.hasOwnProperty("title")) { + properties._title = 1; if (!$util.isString(message.title)) return "title: string expected"; - if (message.description != null && message.hasOwnProperty("description")) + } + if (message.description != null && message.hasOwnProperty("description")) { + properties._description = 1; if (!$util.isString(message.description)) return "description: string expected"; - if (message.thumbData != null && message.hasOwnProperty("thumbData")) + } + if (message.thumbData != null && message.hasOwnProperty("thumbData")) { + properties._thumbData = 1; if (!(message.thumbData && typeof message.thumbData.length === "number" || $util.isString(message.thumbData))) return "thumbData: buffer expected"; - if (message.canonicalUrl != null && message.hasOwnProperty("canonicalUrl")) - if (!$util.isString(message.canonicalUrl)) - return "canonicalUrl: string expected"; - if (message.matchText != null && message.hasOwnProperty("matchText")) + } + if (message.matchText != null && message.hasOwnProperty("matchText")) { + properties._matchText = 1; if (!$util.isString(message.matchText)) return "matchText: string expected"; - if (message.previewType != null && message.hasOwnProperty("previewType")) + } + if (message.previewType != null && message.hasOwnProperty("previewType")) { + properties._previewType = 1; if (!$util.isString(message.previewType)) return "previewType: string expected"; + } if (message.hqThumbnail != null && message.hasOwnProperty("hqThumbnail")) { - var error = $root.proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.LinkPreviewHighQualityThumbnail.verify(message.hqThumbnail); - if (error) - return "hqThumbnail." + error; + properties._hqThumbnail = 1; + { + var error = $root.proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.LinkPreviewHighQualityThumbnail.verify(message.hqThumbnail); + if (error) + return "hqThumbnail." + error; + } } return null; }; @@ -53790,10 +87218,8 @@ $root.proto = (function() { if (object.thumbData != null) if (typeof object.thumbData === "string") $util.base64.decode(object.thumbData, message.thumbData = $util.newBuffer($util.base64.length(object.thumbData)), 0); - else if (object.thumbData.length) + else if (object.thumbData.length >= 0) message.thumbData = object.thumbData; - if (object.canonicalUrl != null) - message.canonicalUrl = String(object.canonicalUrl); if (object.matchText != null) message.matchText = String(object.matchText); if (object.previewType != null) @@ -53819,38 +87245,41 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.url = ""; - object.title = ""; - object.description = ""; - if (options.bytes === String) - object.thumbData = ""; - else { - object.thumbData = []; - if (options.bytes !== Array) - object.thumbData = $util.newBuffer(object.thumbData); - } - object.canonicalUrl = ""; - object.matchText = ""; - object.previewType = ""; - object.hqThumbnail = null; - } - if (message.url != null && message.hasOwnProperty("url")) + if (message.url != null && message.hasOwnProperty("url")) { object.url = message.url; - if (message.title != null && message.hasOwnProperty("title")) + if (options.oneofs) + object._url = "url"; + } + if (message.title != null && message.hasOwnProperty("title")) { object.title = message.title; - if (message.description != null && message.hasOwnProperty("description")) + if (options.oneofs) + object._title = "title"; + } + if (message.description != null && message.hasOwnProperty("description")) { object.description = message.description; - if (message.thumbData != null && message.hasOwnProperty("thumbData")) + if (options.oneofs) + object._description = "description"; + } + if (message.thumbData != null && message.hasOwnProperty("thumbData")) { object.thumbData = options.bytes === String ? $util.base64.encode(message.thumbData, 0, message.thumbData.length) : options.bytes === Array ? Array.prototype.slice.call(message.thumbData) : message.thumbData; - if (message.canonicalUrl != null && message.hasOwnProperty("canonicalUrl")) - object.canonicalUrl = message.canonicalUrl; - if (message.matchText != null && message.hasOwnProperty("matchText")) + if (options.oneofs) + object._thumbData = "thumbData"; + } + if (message.matchText != null && message.hasOwnProperty("matchText")) { object.matchText = message.matchText; - if (message.previewType != null && message.hasOwnProperty("previewType")) + if (options.oneofs) + object._matchText = "matchText"; + } + if (message.previewType != null && message.hasOwnProperty("previewType")) { object.previewType = message.previewType; - if (message.hqThumbnail != null && message.hasOwnProperty("hqThumbnail")) + if (options.oneofs) + object._previewType = "previewType"; + } + if (message.hqThumbnail != null && message.hasOwnProperty("hqThumbnail")) { object.hqThumbnail = $root.proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.LinkPreviewHighQualityThumbnail.toObject(message.hqThumbnail, options); + if (options.oneofs) + object._hqThumbnail = "hqThumbnail"; + } return object; }; @@ -53865,6 +87294,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for LinkPreviewResponse + * @function getTypeUrl + * @memberof proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LinkPreviewResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse"; + }; + LinkPreviewResponse.LinkPreviewHighQualityThumbnail = (function() { /** @@ -53897,59 +87341,104 @@ $root.proto = (function() { /** * LinkPreviewHighQualityThumbnail directPath. - * @member {string} directPath + * @member {string|null|undefined} directPath * @memberof proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.LinkPreviewHighQualityThumbnail * @instance */ - LinkPreviewHighQualityThumbnail.prototype.directPath = ""; + LinkPreviewHighQualityThumbnail.prototype.directPath = null; /** * LinkPreviewHighQualityThumbnail thumbHash. - * @member {string} thumbHash + * @member {string|null|undefined} thumbHash * @memberof proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.LinkPreviewHighQualityThumbnail * @instance */ - LinkPreviewHighQualityThumbnail.prototype.thumbHash = ""; + LinkPreviewHighQualityThumbnail.prototype.thumbHash = null; /** * LinkPreviewHighQualityThumbnail encThumbHash. - * @member {string} encThumbHash + * @member {string|null|undefined} encThumbHash * @memberof proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.LinkPreviewHighQualityThumbnail * @instance */ - LinkPreviewHighQualityThumbnail.prototype.encThumbHash = ""; + LinkPreviewHighQualityThumbnail.prototype.encThumbHash = null; /** * LinkPreviewHighQualityThumbnail mediaKey. - * @member {Uint8Array} mediaKey + * @member {Uint8Array|null|undefined} mediaKey * @memberof proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.LinkPreviewHighQualityThumbnail * @instance */ - LinkPreviewHighQualityThumbnail.prototype.mediaKey = $util.newBuffer([]); + LinkPreviewHighQualityThumbnail.prototype.mediaKey = null; /** * LinkPreviewHighQualityThumbnail mediaKeyTimestampMs. - * @member {number|Long} mediaKeyTimestampMs + * @member {number|Long|null|undefined} mediaKeyTimestampMs * @memberof proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.LinkPreviewHighQualityThumbnail * @instance */ - LinkPreviewHighQualityThumbnail.prototype.mediaKeyTimestampMs = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + LinkPreviewHighQualityThumbnail.prototype.mediaKeyTimestampMs = null; /** * LinkPreviewHighQualityThumbnail thumbWidth. - * @member {number} thumbWidth + * @member {number|null|undefined} thumbWidth * @memberof proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.LinkPreviewHighQualityThumbnail * @instance */ - LinkPreviewHighQualityThumbnail.prototype.thumbWidth = 0; + LinkPreviewHighQualityThumbnail.prototype.thumbWidth = null; /** * LinkPreviewHighQualityThumbnail thumbHeight. - * @member {number} thumbHeight + * @member {number|null|undefined} thumbHeight * @memberof proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.LinkPreviewHighQualityThumbnail * @instance */ - LinkPreviewHighQualityThumbnail.prototype.thumbHeight = 0; + LinkPreviewHighQualityThumbnail.prototype.thumbHeight = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(LinkPreviewHighQualityThumbnail.prototype, "_directPath", { + get: $util.oneOfGetter($oneOfFields = ["directPath"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(LinkPreviewHighQualityThumbnail.prototype, "_thumbHash", { + get: $util.oneOfGetter($oneOfFields = ["thumbHash"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(LinkPreviewHighQualityThumbnail.prototype, "_encThumbHash", { + get: $util.oneOfGetter($oneOfFields = ["encThumbHash"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(LinkPreviewHighQualityThumbnail.prototype, "_mediaKey", { + get: $util.oneOfGetter($oneOfFields = ["mediaKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(LinkPreviewHighQualityThumbnail.prototype, "_mediaKeyTimestampMs", { + get: $util.oneOfGetter($oneOfFields = ["mediaKeyTimestampMs"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(LinkPreviewHighQualityThumbnail.prototype, "_thumbWidth", { + get: $util.oneOfGetter($oneOfFields = ["thumbWidth"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(LinkPreviewHighQualityThumbnail.prototype, "_thumbHeight", { + get: $util.oneOfGetter($oneOfFields = ["thumbHeight"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new LinkPreviewHighQualityThumbnail instance using the specified properties. @@ -54023,27 +87512,34 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.directPath = reader.string(); - break; - case 2: - message.thumbHash = reader.string(); - break; - case 3: - message.encThumbHash = reader.string(); - break; - case 4: - message.mediaKey = reader.bytes(); - break; - case 5: - message.mediaKeyTimestampMs = reader.int64(); - break; - case 6: - message.thumbWidth = reader.int32(); - break; - case 7: - message.thumbHeight = reader.int32(); - break; + case 1: { + message.directPath = reader.string(); + break; + } + case 2: { + message.thumbHash = reader.string(); + break; + } + case 3: { + message.encThumbHash = reader.string(); + break; + } + case 4: { + message.mediaKey = reader.bytes(); + break; + } + case 5: { + message.mediaKeyTimestampMs = reader.int64(); + break; + } + case 6: { + message.thumbWidth = reader.int32(); + break; + } + case 7: { + message.thumbHeight = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -54079,27 +87575,42 @@ $root.proto = (function() { LinkPreviewHighQualityThumbnail.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.directPath != null && message.hasOwnProperty("directPath")) + var properties = {}; + if (message.directPath != null && message.hasOwnProperty("directPath")) { + properties._directPath = 1; if (!$util.isString(message.directPath)) return "directPath: string expected"; - if (message.thumbHash != null && message.hasOwnProperty("thumbHash")) + } + if (message.thumbHash != null && message.hasOwnProperty("thumbHash")) { + properties._thumbHash = 1; if (!$util.isString(message.thumbHash)) return "thumbHash: string expected"; - if (message.encThumbHash != null && message.hasOwnProperty("encThumbHash")) + } + if (message.encThumbHash != null && message.hasOwnProperty("encThumbHash")) { + properties._encThumbHash = 1; if (!$util.isString(message.encThumbHash)) return "encThumbHash: string expected"; - if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) + } + if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) { + properties._mediaKey = 1; if (!(message.mediaKey && typeof message.mediaKey.length === "number" || $util.isString(message.mediaKey))) return "mediaKey: buffer expected"; - if (message.mediaKeyTimestampMs != null && message.hasOwnProperty("mediaKeyTimestampMs")) + } + if (message.mediaKeyTimestampMs != null && message.hasOwnProperty("mediaKeyTimestampMs")) { + properties._mediaKeyTimestampMs = 1; if (!$util.isInteger(message.mediaKeyTimestampMs) && !(message.mediaKeyTimestampMs && $util.isInteger(message.mediaKeyTimestampMs.low) && $util.isInteger(message.mediaKeyTimestampMs.high))) return "mediaKeyTimestampMs: integer|Long expected"; - if (message.thumbWidth != null && message.hasOwnProperty("thumbWidth")) + } + if (message.thumbWidth != null && message.hasOwnProperty("thumbWidth")) { + properties._thumbWidth = 1; if (!$util.isInteger(message.thumbWidth)) return "thumbWidth: integer expected"; - if (message.thumbHeight != null && message.hasOwnProperty("thumbHeight")) + } + if (message.thumbHeight != null && message.hasOwnProperty("thumbHeight")) { + properties._thumbHeight = 1; if (!$util.isInteger(message.thumbHeight)) return "thumbHeight: integer expected"; + } return null; }; @@ -54124,7 +87635,7 @@ $root.proto = (function() { 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) + else if (object.mediaKey.length >= 0) message.mediaKey = object.mediaKey; if (object.mediaKeyTimestampMs != null) if ($util.Long) @@ -54155,42 +87666,44 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.directPath = ""; - object.thumbHash = ""; - object.encThumbHash = ""; - 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.mediaKeyTimestampMs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.mediaKeyTimestampMs = options.longs === String ? "0" : 0; - object.thumbWidth = 0; - object.thumbHeight = 0; - } - if (message.directPath != null && message.hasOwnProperty("directPath")) + if (message.directPath != null && message.hasOwnProperty("directPath")) { object.directPath = message.directPath; - if (message.thumbHash != null && message.hasOwnProperty("thumbHash")) + if (options.oneofs) + object._directPath = "directPath"; + } + if (message.thumbHash != null && message.hasOwnProperty("thumbHash")) { object.thumbHash = message.thumbHash; - if (message.encThumbHash != null && message.hasOwnProperty("encThumbHash")) + if (options.oneofs) + object._thumbHash = "thumbHash"; + } + if (message.encThumbHash != null && message.hasOwnProperty("encThumbHash")) { object.encThumbHash = message.encThumbHash; - if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) + if (options.oneofs) + object._encThumbHash = "encThumbHash"; + } + 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.mediaKeyTimestampMs != null && message.hasOwnProperty("mediaKeyTimestampMs")) + if (options.oneofs) + object._mediaKey = "mediaKey"; + } + if (message.mediaKeyTimestampMs != null && message.hasOwnProperty("mediaKeyTimestampMs")) { if (typeof message.mediaKeyTimestampMs === "number") object.mediaKeyTimestampMs = options.longs === String ? String(message.mediaKeyTimestampMs) : message.mediaKeyTimestampMs; else object.mediaKeyTimestampMs = options.longs === String ? $util.Long.prototype.toString.call(message.mediaKeyTimestampMs) : options.longs === Number ? new $util.LongBits(message.mediaKeyTimestampMs.low >>> 0, message.mediaKeyTimestampMs.high >>> 0).toNumber() : message.mediaKeyTimestampMs; - if (message.thumbWidth != null && message.hasOwnProperty("thumbWidth")) + if (options.oneofs) + object._mediaKeyTimestampMs = "mediaKeyTimestampMs"; + } + if (message.thumbWidth != null && message.hasOwnProperty("thumbWidth")) { object.thumbWidth = message.thumbWidth; - if (message.thumbHeight != null && message.hasOwnProperty("thumbHeight")) + if (options.oneofs) + object._thumbWidth = "thumbWidth"; + } + if (message.thumbHeight != null && message.hasOwnProperty("thumbHeight")) { object.thumbHeight = message.thumbHeight; + if (options.oneofs) + object._thumbHeight = "thumbHeight"; + } return object; }; @@ -54205,6 +87718,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for LinkPreviewHighQualityThumbnail + * @function getTypeUrl + * @memberof proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.LinkPreviewHighQualityThumbnail + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LinkPreviewHighQualityThumbnail.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.LinkPreviewHighQualityThumbnail"; + }; + return LinkPreviewHighQualityThumbnail; })(); @@ -54237,11 +87765,20 @@ $root.proto = (function() { /** * PlaceholderMessageResendResponse webMessageInfoBytes. - * @member {Uint8Array} webMessageInfoBytes + * @member {Uint8Array|null|undefined} webMessageInfoBytes * @memberof proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.PlaceholderMessageResendResponse * @instance */ - PlaceholderMessageResendResponse.prototype.webMessageInfoBytes = $util.newBuffer([]); + PlaceholderMessageResendResponse.prototype.webMessageInfoBytes = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PlaceholderMessageResendResponse.prototype, "_webMessageInfoBytes", { + get: $util.oneOfGetter($oneOfFields = ["webMessageInfoBytes"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new PlaceholderMessageResendResponse instance using the specified properties. @@ -54303,9 +87840,10 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.webMessageInfoBytes = reader.bytes(); - break; + case 1: { + message.webMessageInfoBytes = reader.bytes(); + break; + } default: reader.skipType(tag & 7); break; @@ -54341,9 +87879,12 @@ $root.proto = (function() { PlaceholderMessageResendResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.webMessageInfoBytes != null && message.hasOwnProperty("webMessageInfoBytes")) + var properties = {}; + if (message.webMessageInfoBytes != null && message.hasOwnProperty("webMessageInfoBytes")) { + properties._webMessageInfoBytes = 1; if (!(message.webMessageInfoBytes && typeof message.webMessageInfoBytes.length === "number" || $util.isString(message.webMessageInfoBytes))) return "webMessageInfoBytes: buffer expected"; + } return null; }; @@ -54362,7 +87903,7 @@ $root.proto = (function() { if (object.webMessageInfoBytes != null) if (typeof object.webMessageInfoBytes === "string") $util.base64.decode(object.webMessageInfoBytes, message.webMessageInfoBytes = $util.newBuffer($util.base64.length(object.webMessageInfoBytes)), 0); - else if (object.webMessageInfoBytes.length) + else if (object.webMessageInfoBytes.length >= 0) message.webMessageInfoBytes = object.webMessageInfoBytes; return message; }; @@ -54380,16 +87921,11 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) - if (options.bytes === String) - object.webMessageInfoBytes = ""; - else { - object.webMessageInfoBytes = []; - if (options.bytes !== Array) - object.webMessageInfoBytes = $util.newBuffer(object.webMessageInfoBytes); - } - if (message.webMessageInfoBytes != null && message.hasOwnProperty("webMessageInfoBytes")) + if (message.webMessageInfoBytes != null && message.hasOwnProperty("webMessageInfoBytes")) { object.webMessageInfoBytes = options.bytes === String ? $util.base64.encode(message.webMessageInfoBytes, 0, message.webMessageInfoBytes.length) : options.bytes === Array ? Array.prototype.slice.call(message.webMessageInfoBytes) : message.webMessageInfoBytes; + if (options.oneofs) + object._webMessageInfoBytes = "webMessageInfoBytes"; + } return object; }; @@ -54404,9 +87940,273 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for PlaceholderMessageResendResponse + * @function getTypeUrl + * @memberof proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.PlaceholderMessageResendResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PlaceholderMessageResendResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.PlaceholderMessageResendResponse"; + }; + return PlaceholderMessageResendResponse; })(); + PeerDataOperationResult.WaffleNonceFetchResponse = (function() { + + /** + * Properties of a WaffleNonceFetchResponse. + * @memberof proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult + * @interface IWaffleNonceFetchResponse + * @property {string|null} [nonce] WaffleNonceFetchResponse nonce + * @property {string|null} [waEntFbid] WaffleNonceFetchResponse waEntFbid + */ + + /** + * Constructs a new WaffleNonceFetchResponse. + * @memberof proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult + * @classdesc Represents a WaffleNonceFetchResponse. + * @implements IWaffleNonceFetchResponse + * @constructor + * @param {proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.IWaffleNonceFetchResponse=} [properties] Properties to set + */ + function WaffleNonceFetchResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WaffleNonceFetchResponse nonce. + * @member {string|null|undefined} nonce + * @memberof proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.WaffleNonceFetchResponse + * @instance + */ + WaffleNonceFetchResponse.prototype.nonce = null; + + /** + * WaffleNonceFetchResponse waEntFbid. + * @member {string|null|undefined} waEntFbid + * @memberof proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.WaffleNonceFetchResponse + * @instance + */ + WaffleNonceFetchResponse.prototype.waEntFbid = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WaffleNonceFetchResponse.prototype, "_nonce", { + get: $util.oneOfGetter($oneOfFields = ["nonce"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WaffleNonceFetchResponse.prototype, "_waEntFbid", { + get: $util.oneOfGetter($oneOfFields = ["waEntFbid"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new WaffleNonceFetchResponse instance using the specified properties. + * @function create + * @memberof proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.WaffleNonceFetchResponse + * @static + * @param {proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.IWaffleNonceFetchResponse=} [properties] Properties to set + * @returns {proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.WaffleNonceFetchResponse} WaffleNonceFetchResponse instance + */ + WaffleNonceFetchResponse.create = function create(properties) { + return new WaffleNonceFetchResponse(properties); + }; + + /** + * Encodes the specified WaffleNonceFetchResponse message. Does not implicitly {@link proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.WaffleNonceFetchResponse.verify|verify} messages. + * @function encode + * @memberof proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.WaffleNonceFetchResponse + * @static + * @param {proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.IWaffleNonceFetchResponse} message WaffleNonceFetchResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WaffleNonceFetchResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.nonce != null && Object.hasOwnProperty.call(message, "nonce")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.nonce); + if (message.waEntFbid != null && Object.hasOwnProperty.call(message, "waEntFbid")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.waEntFbid); + return writer; + }; + + /** + * Encodes the specified WaffleNonceFetchResponse message, length delimited. Does not implicitly {@link proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.WaffleNonceFetchResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.WaffleNonceFetchResponse + * @static + * @param {proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.IWaffleNonceFetchResponse} message WaffleNonceFetchResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WaffleNonceFetchResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WaffleNonceFetchResponse message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.WaffleNonceFetchResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.WaffleNonceFetchResponse} WaffleNonceFetchResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WaffleNonceFetchResponse.decode = function 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.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.WaffleNonceFetchResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.nonce = reader.string(); + break; + } + case 2: { + message.waEntFbid = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WaffleNonceFetchResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.WaffleNonceFetchResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.WaffleNonceFetchResponse} WaffleNonceFetchResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WaffleNonceFetchResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WaffleNonceFetchResponse message. + * @function verify + * @memberof proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.WaffleNonceFetchResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WaffleNonceFetchResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.nonce != null && message.hasOwnProperty("nonce")) { + properties._nonce = 1; + if (!$util.isString(message.nonce)) + return "nonce: string expected"; + } + if (message.waEntFbid != null && message.hasOwnProperty("waEntFbid")) { + properties._waEntFbid = 1; + if (!$util.isString(message.waEntFbid)) + return "waEntFbid: string expected"; + } + return null; + }; + + /** + * Creates a WaffleNonceFetchResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.WaffleNonceFetchResponse + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.WaffleNonceFetchResponse} WaffleNonceFetchResponse + */ + WaffleNonceFetchResponse.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.WaffleNonceFetchResponse) + return object; + var message = new $root.proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.WaffleNonceFetchResponse(); + if (object.nonce != null) + message.nonce = String(object.nonce); + if (object.waEntFbid != null) + message.waEntFbid = String(object.waEntFbid); + return message; + }; + + /** + * Creates a plain object from a WaffleNonceFetchResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.WaffleNonceFetchResponse + * @static + * @param {proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.WaffleNonceFetchResponse} message WaffleNonceFetchResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WaffleNonceFetchResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.nonce != null && message.hasOwnProperty("nonce")) { + object.nonce = message.nonce; + if (options.oneofs) + object._nonce = "nonce"; + } + if (message.waEntFbid != null && message.hasOwnProperty("waEntFbid")) { + object.waEntFbid = message.waEntFbid; + if (options.oneofs) + object._waEntFbid = "waEntFbid"; + } + return object; + }; + + /** + * Converts this WaffleNonceFetchResponse to JSON. + * @function toJSON + * @memberof proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.WaffleNonceFetchResponse + * @instance + * @returns {Object.} JSON object + */ + WaffleNonceFetchResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for WaffleNonceFetchResponse + * @function getTypeUrl + * @memberof proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.WaffleNonceFetchResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WaffleNonceFetchResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.WaffleNonceFetchResponse"; + }; + + return WaffleNonceFetchResponse; + })(); + return PeerDataOperationResult; })(); @@ -54422,6 +88222,9 @@ $root.proto = (function() { * @property {number} GENERATE_LINK_PREVIEW=2 GENERATE_LINK_PREVIEW value * @property {number} HISTORY_SYNC_ON_DEMAND=3 HISTORY_SYNC_ON_DEMAND value * @property {number} PLACEHOLDER_MESSAGE_RESEND=4 PLACEHOLDER_MESSAGE_RESEND value + * @property {number} WAFFLE_LINKING_NONCE_FETCH=5 WAFFLE_LINKING_NONCE_FETCH value + * @property {number} FULL_HISTORY_SYNC_ON_DEMAND=6 FULL_HISTORY_SYNC_ON_DEMAND value + * @property {number} COMPANION_META_NONCE_FETCH=7 COMPANION_META_NONCE_FETCH value */ Message.PeerDataOperationRequestType = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -54430,6 +88233,9 @@ $root.proto = (function() { values[valuesById[2] = "GENERATE_LINK_PREVIEW"] = 2; values[valuesById[3] = "HISTORY_SYNC_ON_DEMAND"] = 3; values[valuesById[4] = "PLACEHOLDER_MESSAGE_RESEND"] = 4; + values[valuesById[5] = "WAFFLE_LINKING_NONCE_FETCH"] = 5; + values[valuesById[6] = "FULL_HISTORY_SYNC_ON_DEMAND"] = 6; + values[valuesById[7] = "COMPANION_META_NONCE_FETCH"] = 7; return values; })(); @@ -54469,19 +88275,40 @@ $root.proto = (function() { /** * PinInChatMessage type. - * @member {proto.Message.PinInChatMessage.Type} type + * @member {proto.Message.PinInChatMessage.Type|null|undefined} type * @memberof proto.Message.PinInChatMessage * @instance */ - PinInChatMessage.prototype.type = 0; + PinInChatMessage.prototype.type = null; /** * PinInChatMessage senderTimestampMs. - * @member {number|Long} senderTimestampMs + * @member {number|Long|null|undefined} senderTimestampMs * @memberof proto.Message.PinInChatMessage * @instance */ - PinInChatMessage.prototype.senderTimestampMs = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + PinInChatMessage.prototype.senderTimestampMs = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PinInChatMessage.prototype, "_key", { + get: $util.oneOfGetter($oneOfFields = ["key"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PinInChatMessage.prototype, "_type", { + get: $util.oneOfGetter($oneOfFields = ["type"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PinInChatMessage.prototype, "_senderTimestampMs", { + get: $util.oneOfGetter($oneOfFields = ["senderTimestampMs"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new PinInChatMessage instance using the specified properties. @@ -54547,15 +88374,18 @@ $root.proto = (function() { 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 3: - message.senderTimestampMs = reader.int64(); - break; + case 1: { + message.key = $root.proto.MessageKey.decode(reader, reader.uint32()); + break; + } + case 2: { + message.type = reader.int32(); + break; + } + case 3: { + message.senderTimestampMs = reader.int64(); + break; + } default: reader.skipType(tag & 7); break; @@ -54591,12 +88421,17 @@ $root.proto = (function() { PinInChatMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; if (message.key != null && message.hasOwnProperty("key")) { - var error = $root.proto.MessageKey.verify(message.key); - if (error) - return "key." + error; + properties._key = 1; + { + var error = $root.proto.MessageKey.verify(message.key); + if (error) + return "key." + error; + } } - if (message.type != null && message.hasOwnProperty("type")) + if (message.type != null && message.hasOwnProperty("type")) { + properties._type = 1; switch (message.type) { default: return "type: enum value expected"; @@ -54605,9 +88440,12 @@ $root.proto = (function() { case 2: break; } - if (message.senderTimestampMs != null && message.hasOwnProperty("senderTimestampMs")) + } + if (message.senderTimestampMs != null && message.hasOwnProperty("senderTimestampMs")) { + properties._senderTimestampMs = 1; if (!$util.isInteger(message.senderTimestampMs) && !(message.senderTimestampMs && $util.isInteger(message.senderTimestampMs.low) && $util.isInteger(message.senderTimestampMs.high))) return "senderTimestampMs: integer|Long expected"; + } return null; }; @@ -54629,6 +88467,12 @@ $root.proto = (function() { message.key = $root.proto.MessageKey.fromObject(object.key); } switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; case "UNKNOWN_TYPE": case 0: message.type = 0; @@ -54667,24 +88511,24 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.key = null; - object.type = options.enums === String ? "UNKNOWN_TYPE" : 0; - 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")) + 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.PinInChatMessage.Type[message.type] : message.type; - if (message.senderTimestampMs != null && message.hasOwnProperty("senderTimestampMs")) + if (options.oneofs) + object._key = "key"; + } + if (message.type != null && message.hasOwnProperty("type")) { + object.type = options.enums === String ? $root.proto.Message.PinInChatMessage.Type[message.type] === undefined ? message.type : $root.proto.Message.PinInChatMessage.Type[message.type] : message.type; + if (options.oneofs) + object._type = "type"; + } + 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 (options.oneofs) + object._senderTimestampMs = "senderTimestampMs"; + } return object; }; @@ -54699,6 +88543,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for PinInChatMessage + * @function getTypeUrl + * @memberof proto.Message.PinInChatMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PinInChatMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.PinInChatMessage"; + }; + /** * Type enum. * @name proto.Message.PinInChatMessage.Type @@ -54744,11 +88603,20 @@ $root.proto = (function() { /** * PlaceholderMessage type. - * @member {proto.Message.PlaceholderMessage.PlaceholderType} type + * @member {proto.Message.PlaceholderMessage.PlaceholderType|null|undefined} type * @memberof proto.Message.PlaceholderMessage * @instance */ - PlaceholderMessage.prototype.type = 0; + PlaceholderMessage.prototype.type = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PlaceholderMessage.prototype, "_type", { + get: $util.oneOfGetter($oneOfFields = ["type"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new PlaceholderMessage instance using the specified properties. @@ -54810,9 +88678,10 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.type = reader.int32(); - break; + case 1: { + message.type = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -54848,13 +88717,16 @@ $root.proto = (function() { PlaceholderMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) + var properties = {}; + if (message.type != null && message.hasOwnProperty("type")) { + properties._type = 1; switch (message.type) { default: return "type: enum value expected"; case 0: break; } + } return null; }; @@ -54871,6 +88743,12 @@ $root.proto = (function() { return object; var message = new $root.proto.Message.PlaceholderMessage(); switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; case "MASK_LINKED_DEVICES": case 0: message.type = 0; @@ -54892,10 +88770,11 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) - object.type = options.enums === String ? "MASK_LINKED_DEVICES" : 0; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.proto.Message.PlaceholderMessage.PlaceholderType[message.type] : message.type; + if (message.type != null && message.hasOwnProperty("type")) { + object.type = options.enums === String ? $root.proto.Message.PlaceholderMessage.PlaceholderType[message.type] === undefined ? message.type : $root.proto.Message.PlaceholderMessage.PlaceholderType[message.type] : message.type; + if (options.oneofs) + object._type = "type"; + } return object; }; @@ -54910,6 +88789,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for PlaceholderMessage + * @function getTypeUrl + * @memberof proto.Message.PlaceholderMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PlaceholderMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.PlaceholderMessage"; + }; + /** * PlaceholderType enum. * @name proto.Message.PlaceholderMessage.PlaceholderType @@ -54925,6 +88819,22 @@ $root.proto = (function() { return PlaceholderMessage; })(); + /** + * PollContentType enum. + * @name proto.Message.PollContentType + * @enum {number} + * @property {number} UNKNOWN=0 UNKNOWN value + * @property {number} TEXT=1 TEXT value + * @property {number} IMAGE=2 IMAGE value + */ + Message.PollContentType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNKNOWN"] = 0; + values[valuesById[1] = "TEXT"] = 1; + values[valuesById[2] = "IMAGE"] = 2; + return values; + })(); + Message.PollCreationMessage = (function() { /** @@ -54936,6 +88846,9 @@ $root.proto = (function() { * @property {Array.|null} [options] PollCreationMessage options * @property {number|null} [selectableOptionsCount] PollCreationMessage selectableOptionsCount * @property {proto.IContextInfo|null} [contextInfo] PollCreationMessage contextInfo + * @property {proto.Message.PollContentType|null} [pollContentType] PollCreationMessage pollContentType + * @property {proto.Message.PollCreationMessage.PollType|null} [pollType] PollCreationMessage pollType + * @property {proto.Message.PollCreationMessage.IOption|null} [correctAnswer] PollCreationMessage correctAnswer */ /** @@ -54956,19 +88869,19 @@ $root.proto = (function() { /** * PollCreationMessage encKey. - * @member {Uint8Array} encKey + * @member {Uint8Array|null|undefined} encKey * @memberof proto.Message.PollCreationMessage * @instance */ - PollCreationMessage.prototype.encKey = $util.newBuffer([]); + PollCreationMessage.prototype.encKey = null; /** * PollCreationMessage name. - * @member {string} name + * @member {string|null|undefined} name * @memberof proto.Message.PollCreationMessage * @instance */ - PollCreationMessage.prototype.name = ""; + PollCreationMessage.prototype.name = null; /** * PollCreationMessage options. @@ -54980,11 +88893,11 @@ $root.proto = (function() { /** * PollCreationMessage selectableOptionsCount. - * @member {number} selectableOptionsCount + * @member {number|null|undefined} selectableOptionsCount * @memberof proto.Message.PollCreationMessage * @instance */ - PollCreationMessage.prototype.selectableOptionsCount = 0; + PollCreationMessage.prototype.selectableOptionsCount = null; /** * PollCreationMessage contextInfo. @@ -54994,6 +88907,75 @@ $root.proto = (function() { */ PollCreationMessage.prototype.contextInfo = null; + /** + * PollCreationMessage pollContentType. + * @member {proto.Message.PollContentType|null|undefined} pollContentType + * @memberof proto.Message.PollCreationMessage + * @instance + */ + PollCreationMessage.prototype.pollContentType = null; + + /** + * PollCreationMessage pollType. + * @member {proto.Message.PollCreationMessage.PollType|null|undefined} pollType + * @memberof proto.Message.PollCreationMessage + * @instance + */ + PollCreationMessage.prototype.pollType = null; + + /** + * PollCreationMessage correctAnswer. + * @member {proto.Message.PollCreationMessage.IOption|null|undefined} correctAnswer + * @memberof proto.Message.PollCreationMessage + * @instance + */ + PollCreationMessage.prototype.correctAnswer = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PollCreationMessage.prototype, "_encKey", { + get: $util.oneOfGetter($oneOfFields = ["encKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PollCreationMessage.prototype, "_name", { + get: $util.oneOfGetter($oneOfFields = ["name"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PollCreationMessage.prototype, "_selectableOptionsCount", { + get: $util.oneOfGetter($oneOfFields = ["selectableOptionsCount"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PollCreationMessage.prototype, "_contextInfo", { + get: $util.oneOfGetter($oneOfFields = ["contextInfo"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PollCreationMessage.prototype, "_pollContentType", { + get: $util.oneOfGetter($oneOfFields = ["pollContentType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PollCreationMessage.prototype, "_pollType", { + get: $util.oneOfGetter($oneOfFields = ["pollType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PollCreationMessage.prototype, "_correctAnswer", { + get: $util.oneOfGetter($oneOfFields = ["correctAnswer"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new PollCreationMessage instance using the specified properties. * @function create @@ -55029,6 +89011,12 @@ $root.proto = (function() { 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(); + if (message.pollContentType != null && Object.hasOwnProperty.call(message, "pollContentType")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.pollContentType); + if (message.pollType != null && Object.hasOwnProperty.call(message, "pollType")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.pollType); + if (message.correctAnswer != null && Object.hasOwnProperty.call(message, "correctAnswer")) + $root.proto.Message.PollCreationMessage.Option.encode(message.correctAnswer, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); return writer; }; @@ -55063,23 +89051,40 @@ $root.proto = (function() { 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; + 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; + } + case 6: { + message.pollContentType = reader.int32(); + break; + } + case 7: { + message.pollType = reader.int32(); + break; + } + case 8: { + message.correctAnswer = $root.proto.Message.PollCreationMessage.Option.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -55115,12 +89120,17 @@ $root.proto = (function() { PollCreationMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.encKey != null && message.hasOwnProperty("encKey")) + var properties = {}; + if (message.encKey != null && message.hasOwnProperty("encKey")) { + properties._encKey = 1; if (!(message.encKey && typeof message.encKey.length === "number" || $util.isString(message.encKey))) return "encKey: buffer expected"; - if (message.name != null && message.hasOwnProperty("name")) + } + if (message.name != null && message.hasOwnProperty("name")) { + properties._name = 1; 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"; @@ -55130,13 +89140,47 @@ $root.proto = (function() { return "options." + error; } } - if (message.selectableOptionsCount != null && message.hasOwnProperty("selectableOptionsCount")) + if (message.selectableOptionsCount != null && message.hasOwnProperty("selectableOptionsCount")) { + properties._selectableOptionsCount = 1; 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; + properties._contextInfo = 1; + { + var error = $root.proto.ContextInfo.verify(message.contextInfo); + if (error) + return "contextInfo." + error; + } + } + if (message.pollContentType != null && message.hasOwnProperty("pollContentType")) { + properties._pollContentType = 1; + switch (message.pollContentType) { + default: + return "pollContentType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.pollType != null && message.hasOwnProperty("pollType")) { + properties._pollType = 1; + switch (message.pollType) { + default: + return "pollType: enum value expected"; + case 0: + case 1: + break; + } + } + if (message.correctAnswer != null && message.hasOwnProperty("correctAnswer")) { + properties._correctAnswer = 1; + { + var error = $root.proto.Message.PollCreationMessage.Option.verify(message.correctAnswer); + if (error) + return "correctAnswer." + error; + } } return null; }; @@ -55156,7 +89200,7 @@ $root.proto = (function() { 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) + else if (object.encKey.length >= 0) message.encKey = object.encKey; if (object.name != null) message.name = String(object.name); @@ -55177,6 +89221,47 @@ $root.proto = (function() { throw TypeError(".proto.Message.PollCreationMessage.contextInfo: object expected"); message.contextInfo = $root.proto.ContextInfo.fromObject(object.contextInfo); } + switch (object.pollContentType) { + default: + if (typeof object.pollContentType === "number") { + message.pollContentType = object.pollContentType; + break; + } + break; + case "UNKNOWN": + case 0: + message.pollContentType = 0; + break; + case "TEXT": + case 1: + message.pollContentType = 1; + break; + case "IMAGE": + case 2: + message.pollContentType = 2; + break; + } + switch (object.pollType) { + default: + if (typeof object.pollType === "number") { + message.pollType = object.pollType; + break; + } + break; + case "POLL": + case 0: + message.pollType = 0; + break; + case "QUIZ": + case 1: + message.pollType = 1; + break; + } + if (object.correctAnswer != null) { + if (typeof object.correctAnswer !== "object") + throw TypeError(".proto.Message.PollCreationMessage.correctAnswer: object expected"); + message.correctAnswer = $root.proto.Message.PollCreationMessage.Option.fromObject(object.correctAnswer); + } return message; }; @@ -55195,31 +89280,46 @@ $root.proto = (function() { 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")) + 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")) + if (options.oneofs) + object._encKey = "encKey"; + } + if (message.name != null && message.hasOwnProperty("name")) { object.name = message.name; + if (options.oneofs) + object._name = "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")) + if (message.selectableOptionsCount != null && message.hasOwnProperty("selectableOptionsCount")) { object.selectableOptionsCount = message.selectableOptionsCount; - if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) + if (options.oneofs) + object._selectableOptionsCount = "selectableOptionsCount"; + } + if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) { object.contextInfo = $root.proto.ContextInfo.toObject(message.contextInfo, options); + if (options.oneofs) + object._contextInfo = "contextInfo"; + } + if (message.pollContentType != null && message.hasOwnProperty("pollContentType")) { + object.pollContentType = options.enums === String ? $root.proto.Message.PollContentType[message.pollContentType] === undefined ? message.pollContentType : $root.proto.Message.PollContentType[message.pollContentType] : message.pollContentType; + if (options.oneofs) + object._pollContentType = "pollContentType"; + } + if (message.pollType != null && message.hasOwnProperty("pollType")) { + object.pollType = options.enums === String ? $root.proto.Message.PollCreationMessage.PollType[message.pollType] === undefined ? message.pollType : $root.proto.Message.PollCreationMessage.PollType[message.pollType] : message.pollType; + if (options.oneofs) + object._pollType = "pollType"; + } + if (message.correctAnswer != null && message.hasOwnProperty("correctAnswer")) { + object.correctAnswer = $root.proto.Message.PollCreationMessage.Option.toObject(message.correctAnswer, options); + if (options.oneofs) + object._correctAnswer = "correctAnswer"; + } return object; }; @@ -55234,6 +89334,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for PollCreationMessage + * @function getTypeUrl + * @memberof proto.Message.PollCreationMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PollCreationMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.PollCreationMessage"; + }; + PollCreationMessage.Option = (function() { /** @@ -55241,6 +89356,7 @@ $root.proto = (function() { * @memberof proto.Message.PollCreationMessage * @interface IOption * @property {string|null} [optionName] Option optionName + * @property {string|null} [optionHash] Option optionHash */ /** @@ -55260,11 +89376,34 @@ $root.proto = (function() { /** * Option optionName. - * @member {string} optionName + * @member {string|null|undefined} optionName * @memberof proto.Message.PollCreationMessage.Option * @instance */ - Option.prototype.optionName = ""; + Option.prototype.optionName = null; + + /** + * Option optionHash. + * @member {string|null|undefined} optionHash + * @memberof proto.Message.PollCreationMessage.Option + * @instance + */ + Option.prototype.optionHash = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Option.prototype, "_optionName", { + get: $util.oneOfGetter($oneOfFields = ["optionName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Option.prototype, "_optionHash", { + get: $util.oneOfGetter($oneOfFields = ["optionHash"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new Option instance using the specified properties. @@ -55292,6 +89431,8 @@ $root.proto = (function() { writer = $Writer.create(); if (message.optionName != null && Object.hasOwnProperty.call(message, "optionName")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.optionName); + if (message.optionHash != null && Object.hasOwnProperty.call(message, "optionHash")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.optionHash); return writer; }; @@ -55326,9 +89467,14 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.optionName = reader.string(); - break; + case 1: { + message.optionName = reader.string(); + break; + } + case 2: { + message.optionHash = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -55364,9 +89510,17 @@ $root.proto = (function() { Option.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.optionName != null && message.hasOwnProperty("optionName")) + var properties = {}; + if (message.optionName != null && message.hasOwnProperty("optionName")) { + properties._optionName = 1; if (!$util.isString(message.optionName)) return "optionName: string expected"; + } + if (message.optionHash != null && message.hasOwnProperty("optionHash")) { + properties._optionHash = 1; + if (!$util.isString(message.optionHash)) + return "optionHash: string expected"; + } return null; }; @@ -55384,6 +89538,8 @@ $root.proto = (function() { var message = new $root.proto.Message.PollCreationMessage.Option(); if (object.optionName != null) message.optionName = String(object.optionName); + if (object.optionHash != null) + message.optionHash = String(object.optionHash); return message; }; @@ -55400,10 +89556,16 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) - object.optionName = ""; - if (message.optionName != null && message.hasOwnProperty("optionName")) + if (message.optionName != null && message.hasOwnProperty("optionName")) { object.optionName = message.optionName; + if (options.oneofs) + object._optionName = "optionName"; + } + if (message.optionHash != null && message.hasOwnProperty("optionHash")) { + object.optionHash = message.optionHash; + if (options.oneofs) + object._optionHash = "optionHash"; + } return object; }; @@ -55418,9 +89580,38 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Option + * @function getTypeUrl + * @memberof proto.Message.PollCreationMessage.Option + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Option.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.PollCreationMessage.Option"; + }; + return Option; })(); + /** + * PollType enum. + * @name proto.Message.PollCreationMessage.PollType + * @enum {number} + * @property {number} POLL=0 POLL value + * @property {number} QUIZ=1 QUIZ value + */ + PollCreationMessage.PollType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "POLL"] = 0; + values[valuesById[1] = "QUIZ"] = 1; + return values; + })(); + return PollCreationMessage; })(); @@ -55451,19 +89642,34 @@ $root.proto = (function() { /** * PollEncValue encPayload. - * @member {Uint8Array} encPayload + * @member {Uint8Array|null|undefined} encPayload * @memberof proto.Message.PollEncValue * @instance */ - PollEncValue.prototype.encPayload = $util.newBuffer([]); + PollEncValue.prototype.encPayload = null; /** * PollEncValue encIv. - * @member {Uint8Array} encIv + * @member {Uint8Array|null|undefined} encIv * @memberof proto.Message.PollEncValue * @instance */ - PollEncValue.prototype.encIv = $util.newBuffer([]); + PollEncValue.prototype.encIv = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PollEncValue.prototype, "_encPayload", { + get: $util.oneOfGetter($oneOfFields = ["encPayload"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PollEncValue.prototype, "_encIv", { + get: $util.oneOfGetter($oneOfFields = ["encIv"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new PollEncValue instance using the specified properties. @@ -55527,12 +89733,14 @@ $root.proto = (function() { 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; + case 1: { + message.encPayload = reader.bytes(); + break; + } + case 2: { + message.encIv = reader.bytes(); + break; + } default: reader.skipType(tag & 7); break; @@ -55568,12 +89776,17 @@ $root.proto = (function() { PollEncValue.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.encPayload != null && message.hasOwnProperty("encPayload")) + var properties = {}; + if (message.encPayload != null && message.hasOwnProperty("encPayload")) { + properties._encPayload = 1; 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 != null && message.hasOwnProperty("encIv")) { + properties._encIv = 1; if (!(message.encIv && typeof message.encIv.length === "number" || $util.isString(message.encIv))) return "encIv: buffer expected"; + } return null; }; @@ -55592,12 +89805,12 @@ $root.proto = (function() { 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) + else if (object.encPayload.length >= 0) 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) + else if (object.encIv.length >= 0) message.encIv = object.encIv; return message; }; @@ -55615,26 +89828,16 @@ $root.proto = (function() { 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")) + 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")) + if (options.oneofs) + object._encPayload = "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; + if (options.oneofs) + object._encIv = "encIv"; + } return object; }; @@ -55649,9 +89852,583 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for PollEncValue + * @function getTypeUrl + * @memberof proto.Message.PollEncValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PollEncValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.PollEncValue"; + }; + return PollEncValue; })(); + Message.PollResultSnapshotMessage = (function() { + + /** + * Properties of a PollResultSnapshotMessage. + * @memberof proto.Message + * @interface IPollResultSnapshotMessage + * @property {string|null} [name] PollResultSnapshotMessage name + * @property {Array.|null} [pollVotes] PollResultSnapshotMessage pollVotes + * @property {proto.IContextInfo|null} [contextInfo] PollResultSnapshotMessage contextInfo + */ + + /** + * Constructs a new PollResultSnapshotMessage. + * @memberof proto.Message + * @classdesc Represents a PollResultSnapshotMessage. + * @implements IPollResultSnapshotMessage + * @constructor + * @param {proto.Message.IPollResultSnapshotMessage=} [properties] Properties to set + */ + function PollResultSnapshotMessage(properties) { + this.pollVotes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PollResultSnapshotMessage name. + * @member {string|null|undefined} name + * @memberof proto.Message.PollResultSnapshotMessage + * @instance + */ + PollResultSnapshotMessage.prototype.name = null; + + /** + * PollResultSnapshotMessage pollVotes. + * @member {Array.} pollVotes + * @memberof proto.Message.PollResultSnapshotMessage + * @instance + */ + PollResultSnapshotMessage.prototype.pollVotes = $util.emptyArray; + + /** + * PollResultSnapshotMessage contextInfo. + * @member {proto.IContextInfo|null|undefined} contextInfo + * @memberof proto.Message.PollResultSnapshotMessage + * @instance + */ + PollResultSnapshotMessage.prototype.contextInfo = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PollResultSnapshotMessage.prototype, "_name", { + get: $util.oneOfGetter($oneOfFields = ["name"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PollResultSnapshotMessage.prototype, "_contextInfo", { + get: $util.oneOfGetter($oneOfFields = ["contextInfo"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new PollResultSnapshotMessage instance using the specified properties. + * @function create + * @memberof proto.Message.PollResultSnapshotMessage + * @static + * @param {proto.Message.IPollResultSnapshotMessage=} [properties] Properties to set + * @returns {proto.Message.PollResultSnapshotMessage} PollResultSnapshotMessage instance + */ + PollResultSnapshotMessage.create = function create(properties) { + return new PollResultSnapshotMessage(properties); + }; + + /** + * Encodes the specified PollResultSnapshotMessage message. Does not implicitly {@link proto.Message.PollResultSnapshotMessage.verify|verify} messages. + * @function encode + * @memberof proto.Message.PollResultSnapshotMessage + * @static + * @param {proto.Message.IPollResultSnapshotMessage} message PollResultSnapshotMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PollResultSnapshotMessage.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.pollVotes != null && message.pollVotes.length) + for (var i = 0; i < message.pollVotes.length; ++i) + $root.proto.Message.PollResultSnapshotMessage.PollVote.encode(message.pollVotes[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 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PollResultSnapshotMessage message, length delimited. Does not implicitly {@link proto.Message.PollResultSnapshotMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.PollResultSnapshotMessage + * @static + * @param {proto.Message.IPollResultSnapshotMessage} message PollResultSnapshotMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PollResultSnapshotMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PollResultSnapshotMessage message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.PollResultSnapshotMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.PollResultSnapshotMessage} PollResultSnapshotMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PollResultSnapshotMessage.decode = function 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.PollResultSnapshotMessage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.pollVotes && message.pollVotes.length)) + message.pollVotes = []; + message.pollVotes.push($root.proto.Message.PollResultSnapshotMessage.PollVote.decode(reader, reader.uint32())); + break; + } + case 3: { + message.contextInfo = $root.proto.ContextInfo.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PollResultSnapshotMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.PollResultSnapshotMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.PollResultSnapshotMessage} PollResultSnapshotMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PollResultSnapshotMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PollResultSnapshotMessage message. + * @function verify + * @memberof proto.Message.PollResultSnapshotMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PollResultSnapshotMessage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) { + properties._name = 1; + if (!$util.isString(message.name)) + return "name: string expected"; + } + if (message.pollVotes != null && message.hasOwnProperty("pollVotes")) { + if (!Array.isArray(message.pollVotes)) + return "pollVotes: array expected"; + for (var i = 0; i < message.pollVotes.length; ++i) { + var error = $root.proto.Message.PollResultSnapshotMessage.PollVote.verify(message.pollVotes[i]); + if (error) + return "pollVotes." + error; + } + } + if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) { + properties._contextInfo = 1; + { + var error = $root.proto.ContextInfo.verify(message.contextInfo); + if (error) + return "contextInfo." + error; + } + } + return null; + }; + + /** + * Creates a PollResultSnapshotMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.PollResultSnapshotMessage + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.PollResultSnapshotMessage} PollResultSnapshotMessage + */ + PollResultSnapshotMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.PollResultSnapshotMessage) + return object; + var message = new $root.proto.Message.PollResultSnapshotMessage(); + if (object.name != null) + message.name = String(object.name); + if (object.pollVotes) { + if (!Array.isArray(object.pollVotes)) + throw TypeError(".proto.Message.PollResultSnapshotMessage.pollVotes: array expected"); + message.pollVotes = []; + for (var i = 0; i < object.pollVotes.length; ++i) { + if (typeof object.pollVotes[i] !== "object") + throw TypeError(".proto.Message.PollResultSnapshotMessage.pollVotes: object expected"); + message.pollVotes[i] = $root.proto.Message.PollResultSnapshotMessage.PollVote.fromObject(object.pollVotes[i]); + } + } + if (object.contextInfo != null) { + if (typeof object.contextInfo !== "object") + throw TypeError(".proto.Message.PollResultSnapshotMessage.contextInfo: object expected"); + message.contextInfo = $root.proto.ContextInfo.fromObject(object.contextInfo); + } + return message; + }; + + /** + * Creates a plain object from a PollResultSnapshotMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.PollResultSnapshotMessage + * @static + * @param {proto.Message.PollResultSnapshotMessage} message PollResultSnapshotMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PollResultSnapshotMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.pollVotes = []; + if (message.name != null && message.hasOwnProperty("name")) { + object.name = message.name; + if (options.oneofs) + object._name = "name"; + } + if (message.pollVotes && message.pollVotes.length) { + object.pollVotes = []; + for (var j = 0; j < message.pollVotes.length; ++j) + object.pollVotes[j] = $root.proto.Message.PollResultSnapshotMessage.PollVote.toObject(message.pollVotes[j], options); + } + if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) { + object.contextInfo = $root.proto.ContextInfo.toObject(message.contextInfo, options); + if (options.oneofs) + object._contextInfo = "contextInfo"; + } + return object; + }; + + /** + * Converts this PollResultSnapshotMessage to JSON. + * @function toJSON + * @memberof proto.Message.PollResultSnapshotMessage + * @instance + * @returns {Object.} JSON object + */ + PollResultSnapshotMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PollResultSnapshotMessage + * @function getTypeUrl + * @memberof proto.Message.PollResultSnapshotMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PollResultSnapshotMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.PollResultSnapshotMessage"; + }; + + PollResultSnapshotMessage.PollVote = (function() { + + /** + * Properties of a PollVote. + * @memberof proto.Message.PollResultSnapshotMessage + * @interface IPollVote + * @property {string|null} [optionName] PollVote optionName + * @property {number|Long|null} [optionVoteCount] PollVote optionVoteCount + */ + + /** + * Constructs a new PollVote. + * @memberof proto.Message.PollResultSnapshotMessage + * @classdesc Represents a PollVote. + * @implements IPollVote + * @constructor + * @param {proto.Message.PollResultSnapshotMessage.IPollVote=} [properties] Properties to set + */ + function PollVote(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PollVote optionName. + * @member {string|null|undefined} optionName + * @memberof proto.Message.PollResultSnapshotMessage.PollVote + * @instance + */ + PollVote.prototype.optionName = null; + + /** + * PollVote optionVoteCount. + * @member {number|Long|null|undefined} optionVoteCount + * @memberof proto.Message.PollResultSnapshotMessage.PollVote + * @instance + */ + PollVote.prototype.optionVoteCount = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PollVote.prototype, "_optionName", { + get: $util.oneOfGetter($oneOfFields = ["optionName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PollVote.prototype, "_optionVoteCount", { + get: $util.oneOfGetter($oneOfFields = ["optionVoteCount"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new PollVote instance using the specified properties. + * @function create + * @memberof proto.Message.PollResultSnapshotMessage.PollVote + * @static + * @param {proto.Message.PollResultSnapshotMessage.IPollVote=} [properties] Properties to set + * @returns {proto.Message.PollResultSnapshotMessage.PollVote} PollVote instance + */ + PollVote.create = function create(properties) { + return new PollVote(properties); + }; + + /** + * Encodes the specified PollVote message. Does not implicitly {@link proto.Message.PollResultSnapshotMessage.PollVote.verify|verify} messages. + * @function encode + * @memberof proto.Message.PollResultSnapshotMessage.PollVote + * @static + * @param {proto.Message.PollResultSnapshotMessage.IPollVote} message PollVote message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PollVote.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); + if (message.optionVoteCount != null && Object.hasOwnProperty.call(message, "optionVoteCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.optionVoteCount); + return writer; + }; + + /** + * Encodes the specified PollVote message, length delimited. Does not implicitly {@link proto.Message.PollResultSnapshotMessage.PollVote.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.PollResultSnapshotMessage.PollVote + * @static + * @param {proto.Message.PollResultSnapshotMessage.IPollVote} message PollVote message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PollVote.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PollVote message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.PollResultSnapshotMessage.PollVote + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.PollResultSnapshotMessage.PollVote} PollVote + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PollVote.decode = function 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.PollResultSnapshotMessage.PollVote(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.optionName = reader.string(); + break; + } + case 2: { + message.optionVoteCount = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PollVote message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.PollResultSnapshotMessage.PollVote + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.PollResultSnapshotMessage.PollVote} PollVote + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PollVote.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PollVote message. + * @function verify + * @memberof proto.Message.PollResultSnapshotMessage.PollVote + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PollVote.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.optionName != null && message.hasOwnProperty("optionName")) { + properties._optionName = 1; + if (!$util.isString(message.optionName)) + return "optionName: string expected"; + } + if (message.optionVoteCount != null && message.hasOwnProperty("optionVoteCount")) { + properties._optionVoteCount = 1; + if (!$util.isInteger(message.optionVoteCount) && !(message.optionVoteCount && $util.isInteger(message.optionVoteCount.low) && $util.isInteger(message.optionVoteCount.high))) + return "optionVoteCount: integer|Long expected"; + } + return null; + }; + + /** + * Creates a PollVote message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.PollResultSnapshotMessage.PollVote + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.PollResultSnapshotMessage.PollVote} PollVote + */ + PollVote.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.PollResultSnapshotMessage.PollVote) + return object; + var message = new $root.proto.Message.PollResultSnapshotMessage.PollVote(); + if (object.optionName != null) + message.optionName = String(object.optionName); + if (object.optionVoteCount != null) + if ($util.Long) + (message.optionVoteCount = $util.Long.fromValue(object.optionVoteCount)).unsigned = false; + else if (typeof object.optionVoteCount === "string") + message.optionVoteCount = parseInt(object.optionVoteCount, 10); + else if (typeof object.optionVoteCount === "number") + message.optionVoteCount = object.optionVoteCount; + else if (typeof object.optionVoteCount === "object") + message.optionVoteCount = new $util.LongBits(object.optionVoteCount.low >>> 0, object.optionVoteCount.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a PollVote message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.PollResultSnapshotMessage.PollVote + * @static + * @param {proto.Message.PollResultSnapshotMessage.PollVote} message PollVote + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PollVote.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.optionName != null && message.hasOwnProperty("optionName")) { + object.optionName = message.optionName; + if (options.oneofs) + object._optionName = "optionName"; + } + if (message.optionVoteCount != null && message.hasOwnProperty("optionVoteCount")) { + if (typeof message.optionVoteCount === "number") + object.optionVoteCount = options.longs === String ? String(message.optionVoteCount) : message.optionVoteCount; + else + object.optionVoteCount = options.longs === String ? $util.Long.prototype.toString.call(message.optionVoteCount) : options.longs === Number ? new $util.LongBits(message.optionVoteCount.low >>> 0, message.optionVoteCount.high >>> 0).toNumber() : message.optionVoteCount; + if (options.oneofs) + object._optionVoteCount = "optionVoteCount"; + } + return object; + }; + + /** + * Converts this PollVote to JSON. + * @function toJSON + * @memberof proto.Message.PollResultSnapshotMessage.PollVote + * @instance + * @returns {Object.} JSON object + */ + PollVote.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PollVote + * @function getTypeUrl + * @memberof proto.Message.PollResultSnapshotMessage.PollVote + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PollVote.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.PollResultSnapshotMessage.PollVote"; + }; + + return PollVote; + })(); + + return PollResultSnapshotMessage; + })(); + Message.PollUpdateMessage = (function() { /** @@ -55705,11 +90482,38 @@ $root.proto = (function() { /** * PollUpdateMessage senderTimestampMs. - * @member {number|Long} senderTimestampMs + * @member {number|Long|null|undefined} senderTimestampMs * @memberof proto.Message.PollUpdateMessage * @instance */ - PollUpdateMessage.prototype.senderTimestampMs = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + PollUpdateMessage.prototype.senderTimestampMs = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PollUpdateMessage.prototype, "_pollCreationMessageKey", { + get: $util.oneOfGetter($oneOfFields = ["pollCreationMessageKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PollUpdateMessage.prototype, "_vote", { + get: $util.oneOfGetter($oneOfFields = ["vote"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PollUpdateMessage.prototype, "_metadata", { + get: $util.oneOfGetter($oneOfFields = ["metadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PollUpdateMessage.prototype, "_senderTimestampMs", { + get: $util.oneOfGetter($oneOfFields = ["senderTimestampMs"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new PollUpdateMessage instance using the specified properties. @@ -55777,18 +90581,22 @@ $root.proto = (function() { 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; + 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; @@ -55824,24 +90632,36 @@ $root.proto = (function() { PollUpdateMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; if (message.pollCreationMessageKey != null && message.hasOwnProperty("pollCreationMessageKey")) { - var error = $root.proto.MessageKey.verify(message.pollCreationMessageKey); - if (error) - return "pollCreationMessageKey." + error; + properties._pollCreationMessageKey = 1; + { + 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; + properties._vote = 1; + { + 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; + properties._metadata = 1; + { + var error = $root.proto.Message.PollUpdateMessageMetadata.verify(message.metadata); + if (error) + return "metadata." + error; + } } - if (message.senderTimestampMs != null && message.hasOwnProperty("senderTimestampMs")) + if (message.senderTimestampMs != null && message.hasOwnProperty("senderTimestampMs")) { + properties._senderTimestampMs = 1; if (!$util.isInteger(message.senderTimestampMs) && !(message.senderTimestampMs && $util.isInteger(message.senderTimestampMs.low) && $util.isInteger(message.senderTimestampMs.high))) return "senderTimestampMs: integer|Long expected"; + } return null; }; @@ -55897,27 +90717,29 @@ $root.proto = (function() { 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")) + if (message.pollCreationMessageKey != null && message.hasOwnProperty("pollCreationMessageKey")) { object.pollCreationMessageKey = $root.proto.MessageKey.toObject(message.pollCreationMessageKey, options); - if (message.vote != null && message.hasOwnProperty("vote")) + if (options.oneofs) + object._pollCreationMessageKey = "pollCreationMessageKey"; + } + if (message.vote != null && message.hasOwnProperty("vote")) { object.vote = $root.proto.Message.PollEncValue.toObject(message.vote, options); - if (message.metadata != null && message.hasOwnProperty("metadata")) + if (options.oneofs) + object._vote = "vote"; + } + 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 (options.oneofs) + object._metadata = "metadata"; + } + 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 (options.oneofs) + object._senderTimestampMs = "senderTimestampMs"; + } return object; }; @@ -55932,6 +90754,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for PollUpdateMessage + * @function getTypeUrl + * @memberof proto.Message.PollUpdateMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PollUpdateMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.PollUpdateMessage"; + }; + return PollUpdateMessage; })(); @@ -56092,6 +90929,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for PollUpdateMessageMetadata + * @function getTypeUrl + * @memberof proto.Message.PollUpdateMessageMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PollUpdateMessageMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.PollUpdateMessageMetadata"; + }; + return PollUpdateMessageMetadata; })(); @@ -56189,11 +91041,12 @@ $root.proto = (function() { 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 1: { + if (!(message.selectedOptions && message.selectedOptions.length)) + message.selectedOptions = []; + message.selectedOptions.push(reader.bytes()); + break; + } default: reader.skipType(tag & 7); break; @@ -56258,7 +91111,7 @@ $root.proto = (function() { 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) + else if (object.selectedOptions[i].length >= 0) message.selectedOptions[i] = object.selectedOptions[i]; } return message; @@ -56298,6 +91151,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for PollVoteMessage + * @function getTypeUrl + * @memberof proto.Message.PollVoteMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PollVoteMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.PollVoteMessage"; + }; + return PollVoteMessage; })(); @@ -56340,11 +91208,11 @@ $root.proto = (function() { /** * ProductMessage businessOwnerJid. - * @member {string} businessOwnerJid + * @member {string|null|undefined} businessOwnerJid * @memberof proto.Message.ProductMessage * @instance */ - ProductMessage.prototype.businessOwnerJid = ""; + ProductMessage.prototype.businessOwnerJid = null; /** * ProductMessage catalog. @@ -56356,19 +91224,19 @@ $root.proto = (function() { /** * ProductMessage body. - * @member {string} body + * @member {string|null|undefined} body * @memberof proto.Message.ProductMessage * @instance */ - ProductMessage.prototype.body = ""; + ProductMessage.prototype.body = null; /** * ProductMessage footer. - * @member {string} footer + * @member {string|null|undefined} footer * @memberof proto.Message.ProductMessage * @instance */ - ProductMessage.prototype.footer = ""; + ProductMessage.prototype.footer = null; /** * ProductMessage contextInfo. @@ -56378,6 +91246,45 @@ $root.proto = (function() { */ ProductMessage.prototype.contextInfo = null; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ProductMessage.prototype, "_product", { + get: $util.oneOfGetter($oneOfFields = ["product"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ProductMessage.prototype, "_businessOwnerJid", { + get: $util.oneOfGetter($oneOfFields = ["businessOwnerJid"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ProductMessage.prototype, "_catalog", { + get: $util.oneOfGetter($oneOfFields = ["catalog"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ProductMessage.prototype, "_body", { + get: $util.oneOfGetter($oneOfFields = ["body"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ProductMessage.prototype, "_footer", { + get: $util.oneOfGetter($oneOfFields = ["footer"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ProductMessage.prototype, "_contextInfo", { + get: $util.oneOfGetter($oneOfFields = ["contextInfo"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new ProductMessage instance using the specified properties. * @function create @@ -56448,24 +91355,30 @@ $root.proto = (function() { 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; + 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; @@ -56501,29 +91414,45 @@ $root.proto = (function() { ProductMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; if (message.product != null && message.hasOwnProperty("product")) { - var error = $root.proto.Message.ProductMessage.ProductSnapshot.verify(message.product); - if (error) - return "product." + error; + properties._product = 1; + { + var error = $root.proto.Message.ProductMessage.ProductSnapshot.verify(message.product); + if (error) + return "product." + error; + } } - if (message.businessOwnerJid != null && message.hasOwnProperty("businessOwnerJid")) + if (message.businessOwnerJid != null && message.hasOwnProperty("businessOwnerJid")) { + properties._businessOwnerJid = 1; 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 (message.catalog != null && message.hasOwnProperty("catalog")) { + properties._catalog = 1; + { + var error = $root.proto.Message.ProductMessage.CatalogSnapshot.verify(message.catalog); + if (error) + return "catalog." + error; + } + } + if (message.body != null && message.hasOwnProperty("body")) { + properties._body = 1; if (!$util.isString(message.body)) return "body: string expected"; - if (message.footer != null && message.hasOwnProperty("footer")) + } + if (message.footer != null && message.hasOwnProperty("footer")) { + properties._footer = 1; 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; + properties._contextInfo = 1; + { + var error = $root.proto.ContextInfo.verify(message.contextInfo); + if (error) + return "contextInfo." + error; + } } return null; }; @@ -56577,26 +91506,36 @@ $root.proto = (function() { 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")) + 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")) + if (options.oneofs) + object._product = "product"; + } + if (message.businessOwnerJid != null && message.hasOwnProperty("businessOwnerJid")) { object.businessOwnerJid = message.businessOwnerJid; - if (message.catalog != null && message.hasOwnProperty("catalog")) + if (options.oneofs) + object._businessOwnerJid = "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")) + if (options.oneofs) + object._catalog = "catalog"; + } + if (message.body != null && message.hasOwnProperty("body")) { object.body = message.body; - if (message.footer != null && message.hasOwnProperty("footer")) + if (options.oneofs) + object._body = "body"; + } + if (message.footer != null && message.hasOwnProperty("footer")) { object.footer = message.footer; - if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) + if (options.oneofs) + object._footer = "footer"; + } + if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) { object.contextInfo = $root.proto.ContextInfo.toObject(message.contextInfo, options); + if (options.oneofs) + object._contextInfo = "contextInfo"; + } return object; }; @@ -56611,6 +91550,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ProductMessage + * @function getTypeUrl + * @memberof proto.Message.ProductMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ProductMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.ProductMessage"; + }; + ProductMessage.CatalogSnapshot = (function() { /** @@ -56647,19 +91601,40 @@ $root.proto = (function() { /** * CatalogSnapshot title. - * @member {string} title + * @member {string|null|undefined} title * @memberof proto.Message.ProductMessage.CatalogSnapshot * @instance */ - CatalogSnapshot.prototype.title = ""; + CatalogSnapshot.prototype.title = null; /** * CatalogSnapshot description. - * @member {string} description + * @member {string|null|undefined} description * @memberof proto.Message.ProductMessage.CatalogSnapshot * @instance */ - CatalogSnapshot.prototype.description = ""; + CatalogSnapshot.prototype.description = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CatalogSnapshot.prototype, "_catalogImage", { + get: $util.oneOfGetter($oneOfFields = ["catalogImage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CatalogSnapshot.prototype, "_title", { + get: $util.oneOfGetter($oneOfFields = ["title"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CatalogSnapshot.prototype, "_description", { + get: $util.oneOfGetter($oneOfFields = ["description"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new CatalogSnapshot instance using the specified properties. @@ -56725,15 +91700,18 @@ $root.proto = (function() { 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; + 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; @@ -56769,17 +91747,25 @@ $root.proto = (function() { CatalogSnapshot.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; if (message.catalogImage != null && message.hasOwnProperty("catalogImage")) { - var error = $root.proto.Message.ImageMessage.verify(message.catalogImage); - if (error) - return "catalogImage." + error; + properties._catalogImage = 1; + { + var error = $root.proto.Message.ImageMessage.verify(message.catalogImage); + if (error) + return "catalogImage." + error; + } } - if (message.title != null && message.hasOwnProperty("title")) + if (message.title != null && message.hasOwnProperty("title")) { + properties._title = 1; if (!$util.isString(message.title)) return "title: string expected"; - if (message.description != null && message.hasOwnProperty("description")) + } + if (message.description != null && message.hasOwnProperty("description")) { + properties._description = 1; if (!$util.isString(message.description)) return "description: string expected"; + } return null; }; @@ -56820,17 +91806,21 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.catalogImage = null; - object.title = ""; - object.description = ""; - } - if (message.catalogImage != null && message.hasOwnProperty("catalogImage")) + if (message.catalogImage != null && message.hasOwnProperty("catalogImage")) { object.catalogImage = $root.proto.Message.ImageMessage.toObject(message.catalogImage, options); - if (message.title != null && message.hasOwnProperty("title")) + if (options.oneofs) + object._catalogImage = "catalogImage"; + } + if (message.title != null && message.hasOwnProperty("title")) { object.title = message.title; - if (message.description != null && message.hasOwnProperty("description")) + if (options.oneofs) + object._title = "title"; + } + if (message.description != null && message.hasOwnProperty("description")) { object.description = message.description; + if (options.oneofs) + object._description = "description"; + } return object; }; @@ -56845,6 +91835,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CatalogSnapshot + * @function getTypeUrl + * @memberof proto.Message.ProductMessage.CatalogSnapshot + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CatalogSnapshot.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.ProductMessage.CatalogSnapshot"; + }; + return CatalogSnapshot; })(); @@ -56865,6 +91870,7 @@ $root.proto = (function() { * @property {number|null} [productImageCount] ProductSnapshot productImageCount * @property {string|null} [firstImageId] ProductSnapshot firstImageId * @property {number|Long|null} [salePriceAmount1000] ProductSnapshot salePriceAmount1000 + * @property {string|null} [signedUrl] ProductSnapshot signedUrl */ /** @@ -56892,83 +91898,166 @@ $root.proto = (function() { /** * ProductSnapshot productId. - * @member {string} productId + * @member {string|null|undefined} productId * @memberof proto.Message.ProductMessage.ProductSnapshot * @instance */ - ProductSnapshot.prototype.productId = ""; + ProductSnapshot.prototype.productId = null; /** * ProductSnapshot title. - * @member {string} title + * @member {string|null|undefined} title * @memberof proto.Message.ProductMessage.ProductSnapshot * @instance */ - ProductSnapshot.prototype.title = ""; + ProductSnapshot.prototype.title = null; /** * ProductSnapshot description. - * @member {string} description + * @member {string|null|undefined} description * @memberof proto.Message.ProductMessage.ProductSnapshot * @instance */ - ProductSnapshot.prototype.description = ""; + ProductSnapshot.prototype.description = null; /** * ProductSnapshot currencyCode. - * @member {string} currencyCode + * @member {string|null|undefined} currencyCode * @memberof proto.Message.ProductMessage.ProductSnapshot * @instance */ - ProductSnapshot.prototype.currencyCode = ""; + ProductSnapshot.prototype.currencyCode = null; /** * ProductSnapshot priceAmount1000. - * @member {number|Long} priceAmount1000 + * @member {number|Long|null|undefined} priceAmount1000 * @memberof proto.Message.ProductMessage.ProductSnapshot * @instance */ - ProductSnapshot.prototype.priceAmount1000 = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + ProductSnapshot.prototype.priceAmount1000 = null; /** * ProductSnapshot retailerId. - * @member {string} retailerId + * @member {string|null|undefined} retailerId * @memberof proto.Message.ProductMessage.ProductSnapshot * @instance */ - ProductSnapshot.prototype.retailerId = ""; + ProductSnapshot.prototype.retailerId = null; /** * ProductSnapshot url. - * @member {string} url + * @member {string|null|undefined} url * @memberof proto.Message.ProductMessage.ProductSnapshot * @instance */ - ProductSnapshot.prototype.url = ""; + ProductSnapshot.prototype.url = null; /** * ProductSnapshot productImageCount. - * @member {number} productImageCount + * @member {number|null|undefined} productImageCount * @memberof proto.Message.ProductMessage.ProductSnapshot * @instance */ - ProductSnapshot.prototype.productImageCount = 0; + ProductSnapshot.prototype.productImageCount = null; /** * ProductSnapshot firstImageId. - * @member {string} firstImageId + * @member {string|null|undefined} firstImageId * @memberof proto.Message.ProductMessage.ProductSnapshot * @instance */ - ProductSnapshot.prototype.firstImageId = ""; + ProductSnapshot.prototype.firstImageId = null; /** * ProductSnapshot salePriceAmount1000. - * @member {number|Long} salePriceAmount1000 + * @member {number|Long|null|undefined} salePriceAmount1000 * @memberof proto.Message.ProductMessage.ProductSnapshot * @instance */ - ProductSnapshot.prototype.salePriceAmount1000 = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + ProductSnapshot.prototype.salePriceAmount1000 = null; + + /** + * ProductSnapshot signedUrl. + * @member {string|null|undefined} signedUrl + * @memberof proto.Message.ProductMessage.ProductSnapshot + * @instance + */ + ProductSnapshot.prototype.signedUrl = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ProductSnapshot.prototype, "_productImage", { + get: $util.oneOfGetter($oneOfFields = ["productImage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ProductSnapshot.prototype, "_productId", { + get: $util.oneOfGetter($oneOfFields = ["productId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ProductSnapshot.prototype, "_title", { + get: $util.oneOfGetter($oneOfFields = ["title"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ProductSnapshot.prototype, "_description", { + get: $util.oneOfGetter($oneOfFields = ["description"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ProductSnapshot.prototype, "_currencyCode", { + get: $util.oneOfGetter($oneOfFields = ["currencyCode"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ProductSnapshot.prototype, "_priceAmount1000", { + get: $util.oneOfGetter($oneOfFields = ["priceAmount1000"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ProductSnapshot.prototype, "_retailerId", { + get: $util.oneOfGetter($oneOfFields = ["retailerId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ProductSnapshot.prototype, "_url", { + get: $util.oneOfGetter($oneOfFields = ["url"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ProductSnapshot.prototype, "_productImageCount", { + get: $util.oneOfGetter($oneOfFields = ["productImageCount"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ProductSnapshot.prototype, "_firstImageId", { + get: $util.oneOfGetter($oneOfFields = ["firstImageId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ProductSnapshot.prototype, "_salePriceAmount1000", { + get: $util.oneOfGetter($oneOfFields = ["salePriceAmount1000"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ProductSnapshot.prototype, "_signedUrl", { + get: $util.oneOfGetter($oneOfFields = ["signedUrl"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new ProductSnapshot instance using the specified properties. @@ -57016,6 +92105,8 @@ $root.proto = (function() { 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); + if (message.signedUrl != null && Object.hasOwnProperty.call(message, "signedUrl")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.signedUrl); return writer; }; @@ -57050,39 +92141,54 @@ $root.proto = (function() { 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; + 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; + } + case 13: { + message.signedUrl = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -57118,41 +92224,70 @@ $root.proto = (function() { ProductSnapshot.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; if (message.productImage != null && message.hasOwnProperty("productImage")) { - var error = $root.proto.Message.ImageMessage.verify(message.productImage); - if (error) - return "productImage." + error; + properties._productImage = 1; + { + var error = $root.proto.Message.ImageMessage.verify(message.productImage); + if (error) + return "productImage." + error; + } } - if (message.productId != null && message.hasOwnProperty("productId")) + if (message.productId != null && message.hasOwnProperty("productId")) { + properties._productId = 1; if (!$util.isString(message.productId)) return "productId: string expected"; - if (message.title != null && message.hasOwnProperty("title")) + } + if (message.title != null && message.hasOwnProperty("title")) { + properties._title = 1; if (!$util.isString(message.title)) return "title: string expected"; - if (message.description != null && message.hasOwnProperty("description")) + } + if (message.description != null && message.hasOwnProperty("description")) { + properties._description = 1; if (!$util.isString(message.description)) return "description: string expected"; - if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) + } + if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) { + properties._currencyCode = 1; if (!$util.isString(message.currencyCode)) return "currencyCode: string expected"; - if (message.priceAmount1000 != null && message.hasOwnProperty("priceAmount1000")) + } + if (message.priceAmount1000 != null && message.hasOwnProperty("priceAmount1000")) { + properties._priceAmount1000 = 1; 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 (message.retailerId != null && message.hasOwnProperty("retailerId")) { + properties._retailerId = 1; if (!$util.isString(message.retailerId)) return "retailerId: string expected"; - if (message.url != null && message.hasOwnProperty("url")) + } + if (message.url != null && message.hasOwnProperty("url")) { + properties._url = 1; if (!$util.isString(message.url)) return "url: string expected"; - if (message.productImageCount != null && message.hasOwnProperty("productImageCount")) + } + if (message.productImageCount != null && message.hasOwnProperty("productImageCount")) { + properties._productImageCount = 1; if (!$util.isInteger(message.productImageCount)) return "productImageCount: integer expected"; - if (message.firstImageId != null && message.hasOwnProperty("firstImageId")) + } + if (message.firstImageId != null && message.hasOwnProperty("firstImageId")) { + properties._firstImageId = 1; if (!$util.isString(message.firstImageId)) return "firstImageId: string expected"; - if (message.salePriceAmount1000 != null && message.hasOwnProperty("salePriceAmount1000")) + } + if (message.salePriceAmount1000 != null && message.hasOwnProperty("salePriceAmount1000")) { + properties._salePriceAmount1000 = 1; if (!$util.isInteger(message.salePriceAmount1000) && !(message.salePriceAmount1000 && $util.isInteger(message.salePriceAmount1000.low) && $util.isInteger(message.salePriceAmount1000.high))) return "salePriceAmount1000: integer|Long expected"; + } + if (message.signedUrl != null && message.hasOwnProperty("signedUrl")) { + properties._signedUrl = 1; + if (!$util.isString(message.signedUrl)) + return "signedUrl: string expected"; + } return null; }; @@ -57207,6 +92342,8 @@ $root.proto = (function() { message.salePriceAmount1000 = object.salePriceAmount1000; else if (typeof object.salePriceAmount1000 === "object") message.salePriceAmount1000 = new $util.LongBits(object.salePriceAmount1000.low >>> 0, object.salePriceAmount1000.high >>> 0).toNumber(); + if (object.signedUrl != null) + message.signedUrl = String(object.signedUrl); return message; }; @@ -57223,55 +92360,72 @@ $root.proto = (function() { 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")) + if (message.productImage != null && message.hasOwnProperty("productImage")) { object.productImage = $root.proto.Message.ImageMessage.toObject(message.productImage, options); - if (message.productId != null && message.hasOwnProperty("productId")) + if (options.oneofs) + object._productImage = "productImage"; + } + if (message.productId != null && message.hasOwnProperty("productId")) { object.productId = message.productId; - if (message.title != null && message.hasOwnProperty("title")) + if (options.oneofs) + object._productId = "productId"; + } + if (message.title != null && message.hasOwnProperty("title")) { object.title = message.title; - if (message.description != null && message.hasOwnProperty("description")) + if (options.oneofs) + object._title = "title"; + } + if (message.description != null && message.hasOwnProperty("description")) { object.description = message.description; - if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) + if (options.oneofs) + object._description = "description"; + } + if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) { object.currencyCode = message.currencyCode; - if (message.priceAmount1000 != null && message.hasOwnProperty("priceAmount1000")) + if (options.oneofs) + object._currencyCode = "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")) + if (options.oneofs) + object._priceAmount1000 = "priceAmount1000"; + } + if (message.retailerId != null && message.hasOwnProperty("retailerId")) { object.retailerId = message.retailerId; - if (message.url != null && message.hasOwnProperty("url")) + if (options.oneofs) + object._retailerId = "retailerId"; + } + if (message.url != null && message.hasOwnProperty("url")) { object.url = message.url; - if (message.productImageCount != null && message.hasOwnProperty("productImageCount")) + if (options.oneofs) + object._url = "url"; + } + if (message.productImageCount != null && message.hasOwnProperty("productImageCount")) { object.productImageCount = message.productImageCount; - if (message.firstImageId != null && message.hasOwnProperty("firstImageId")) + if (options.oneofs) + object._productImageCount = "productImageCount"; + } + if (message.firstImageId != null && message.hasOwnProperty("firstImageId")) { object.firstImageId = message.firstImageId; - if (message.salePriceAmount1000 != null && message.hasOwnProperty("salePriceAmount1000")) + if (options.oneofs) + object._firstImageId = "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; + if (options.oneofs) + object._salePriceAmount1000 = "salePriceAmount1000"; + } + if (message.signedUrl != null && message.hasOwnProperty("signedUrl")) { + object.signedUrl = message.signedUrl; + if (options.oneofs) + object._signedUrl = "signedUrl"; + } return object; }; @@ -57286,6 +92440,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ProductSnapshot + * @function getTypeUrl + * @memberof proto.Message.ProductMessage.ProductSnapshot + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ProductSnapshot.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.ProductMessage.ProductSnapshot"; + }; + return ProductSnapshot; })(); @@ -57316,6 +92485,9 @@ $root.proto = (function() { * @property {string|null} [invokerJid] ProtocolMessage invokerJid * @property {proto.Message.IRequestWelcomeMessageMetadata|null} [requestWelcomeMessageMetadata] ProtocolMessage requestWelcomeMessageMetadata * @property {proto.IMediaNotifyMessage|null} [mediaNotifyMessage] ProtocolMessage mediaNotifyMessage + * @property {proto.Message.ICloudAPIThreadControlNotification|null} [cloudApiThreadControlNotification] ProtocolMessage cloudApiThreadControlNotification + * @property {proto.ILIDMigrationMappingSyncMessage|null} [lidMigrationMappingSyncMessage] ProtocolMessage lidMigrationMappingSyncMessage + * @property {proto.ILimitSharing|null} [limitSharing] ProtocolMessage limitSharing */ /** @@ -57343,27 +92515,27 @@ $root.proto = (function() { /** * ProtocolMessage type. - * @member {proto.Message.ProtocolMessage.Type} type + * @member {proto.Message.ProtocolMessage.Type|null|undefined} type * @memberof proto.Message.ProtocolMessage * @instance */ - ProtocolMessage.prototype.type = 0; + ProtocolMessage.prototype.type = null; /** * ProtocolMessage ephemeralExpiration. - * @member {number} ephemeralExpiration + * @member {number|null|undefined} ephemeralExpiration * @memberof proto.Message.ProtocolMessage * @instance */ - ProtocolMessage.prototype.ephemeralExpiration = 0; + ProtocolMessage.prototype.ephemeralExpiration = null; /** * ProtocolMessage ephemeralSettingTimestamp. - * @member {number|Long} ephemeralSettingTimestamp + * @member {number|Long|null|undefined} ephemeralSettingTimestamp * @memberof proto.Message.ProtocolMessage * @instance */ - ProtocolMessage.prototype.ephemeralSettingTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + ProtocolMessage.prototype.ephemeralSettingTimestamp = null; /** * ProtocolMessage historySyncNotification. @@ -57423,11 +92595,11 @@ $root.proto = (function() { /** * ProtocolMessage timestampMs. - * @member {number|Long} timestampMs + * @member {number|Long|null|undefined} timestampMs * @memberof proto.Message.ProtocolMessage * @instance */ - ProtocolMessage.prototype.timestampMs = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + ProtocolMessage.prototype.timestampMs = null; /** * ProtocolMessage peerDataOperationRequestMessage. @@ -57455,11 +92627,11 @@ $root.proto = (function() { /** * ProtocolMessage invokerJid. - * @member {string} invokerJid + * @member {string|null|undefined} invokerJid * @memberof proto.Message.ProtocolMessage * @instance */ - ProtocolMessage.prototype.invokerJid = ""; + ProtocolMessage.prototype.invokerJid = null; /** * ProtocolMessage requestWelcomeMessageMetadata. @@ -57477,6 +92649,159 @@ $root.proto = (function() { */ ProtocolMessage.prototype.mediaNotifyMessage = null; + /** + * ProtocolMessage cloudApiThreadControlNotification. + * @member {proto.Message.ICloudAPIThreadControlNotification|null|undefined} cloudApiThreadControlNotification + * @memberof proto.Message.ProtocolMessage + * @instance + */ + ProtocolMessage.prototype.cloudApiThreadControlNotification = null; + + /** + * ProtocolMessage lidMigrationMappingSyncMessage. + * @member {proto.ILIDMigrationMappingSyncMessage|null|undefined} lidMigrationMappingSyncMessage + * @memberof proto.Message.ProtocolMessage + * @instance + */ + ProtocolMessage.prototype.lidMigrationMappingSyncMessage = null; + + /** + * ProtocolMessage limitSharing. + * @member {proto.ILimitSharing|null|undefined} limitSharing + * @memberof proto.Message.ProtocolMessage + * @instance + */ + ProtocolMessage.prototype.limitSharing = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ProtocolMessage.prototype, "_key", { + get: $util.oneOfGetter($oneOfFields = ["key"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ProtocolMessage.prototype, "_type", { + get: $util.oneOfGetter($oneOfFields = ["type"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ProtocolMessage.prototype, "_ephemeralExpiration", { + get: $util.oneOfGetter($oneOfFields = ["ephemeralExpiration"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ProtocolMessage.prototype, "_ephemeralSettingTimestamp", { + get: $util.oneOfGetter($oneOfFields = ["ephemeralSettingTimestamp"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ProtocolMessage.prototype, "_historySyncNotification", { + get: $util.oneOfGetter($oneOfFields = ["historySyncNotification"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ProtocolMessage.prototype, "_appStateSyncKeyShare", { + get: $util.oneOfGetter($oneOfFields = ["appStateSyncKeyShare"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ProtocolMessage.prototype, "_appStateSyncKeyRequest", { + get: $util.oneOfGetter($oneOfFields = ["appStateSyncKeyRequest"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ProtocolMessage.prototype, "_initialSecurityNotificationSettingSync", { + get: $util.oneOfGetter($oneOfFields = ["initialSecurityNotificationSettingSync"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ProtocolMessage.prototype, "_appStateFatalExceptionNotification", { + get: $util.oneOfGetter($oneOfFields = ["appStateFatalExceptionNotification"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ProtocolMessage.prototype, "_disappearingMode", { + get: $util.oneOfGetter($oneOfFields = ["disappearingMode"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ProtocolMessage.prototype, "_editedMessage", { + get: $util.oneOfGetter($oneOfFields = ["editedMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ProtocolMessage.prototype, "_timestampMs", { + get: $util.oneOfGetter($oneOfFields = ["timestampMs"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ProtocolMessage.prototype, "_peerDataOperationRequestMessage", { + get: $util.oneOfGetter($oneOfFields = ["peerDataOperationRequestMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ProtocolMessage.prototype, "_peerDataOperationRequestResponseMessage", { + get: $util.oneOfGetter($oneOfFields = ["peerDataOperationRequestResponseMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ProtocolMessage.prototype, "_botFeedbackMessage", { + get: $util.oneOfGetter($oneOfFields = ["botFeedbackMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ProtocolMessage.prototype, "_invokerJid", { + get: $util.oneOfGetter($oneOfFields = ["invokerJid"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ProtocolMessage.prototype, "_requestWelcomeMessageMetadata", { + get: $util.oneOfGetter($oneOfFields = ["requestWelcomeMessageMetadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ProtocolMessage.prototype, "_mediaNotifyMessage", { + get: $util.oneOfGetter($oneOfFields = ["mediaNotifyMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ProtocolMessage.prototype, "_cloudApiThreadControlNotification", { + get: $util.oneOfGetter($oneOfFields = ["cloudApiThreadControlNotification"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ProtocolMessage.prototype, "_lidMigrationMappingSyncMessage", { + get: $util.oneOfGetter($oneOfFields = ["lidMigrationMappingSyncMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ProtocolMessage.prototype, "_limitSharing", { + get: $util.oneOfGetter($oneOfFields = ["limitSharing"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new ProtocolMessage instance using the specified properties. * @function create @@ -57537,6 +92862,12 @@ $root.proto = (function() { $root.proto.Message.RequestWelcomeMessageMetadata.encode(message.requestWelcomeMessageMetadata, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); if (message.mediaNotifyMessage != null && Object.hasOwnProperty.call(message, "mediaNotifyMessage")) $root.proto.MediaNotifyMessage.encode(message.mediaNotifyMessage, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.cloudApiThreadControlNotification != null && Object.hasOwnProperty.call(message, "cloudApiThreadControlNotification")) + $root.proto.Message.CloudAPIThreadControlNotification.encode(message.cloudApiThreadControlNotification, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + if (message.lidMigrationMappingSyncMessage != null && Object.hasOwnProperty.call(message, "lidMigrationMappingSyncMessage")) + $root.proto.LIDMigrationMappingSyncMessage.encode(message.lidMigrationMappingSyncMessage, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + if (message.limitSharing != null && Object.hasOwnProperty.call(message, "limitSharing")) + $root.proto.LimitSharing.encode(message.limitSharing, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); return writer; }; @@ -57571,60 +92902,90 @@ $root.proto = (function() { 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 14: - message.editedMessage = $root.proto.Message.decode(reader, reader.uint32()); - break; - case 15: - message.timestampMs = reader.int64(); - break; - case 16: - message.peerDataOperationRequestMessage = $root.proto.Message.PeerDataOperationRequestMessage.decode(reader, reader.uint32()); - break; - case 17: - message.peerDataOperationRequestResponseMessage = $root.proto.Message.PeerDataOperationRequestResponseMessage.decode(reader, reader.uint32()); - break; - case 18: - message.botFeedbackMessage = $root.proto.Message.BotFeedbackMessage.decode(reader, reader.uint32()); - break; - case 19: - message.invokerJid = reader.string(); - break; - case 20: - message.requestWelcomeMessageMetadata = $root.proto.Message.RequestWelcomeMessageMetadata.decode(reader, reader.uint32()); - break; - case 21: - message.mediaNotifyMessage = $root.proto.MediaNotifyMessage.decode(reader, reader.uint32()); - break; + 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 14: { + message.editedMessage = $root.proto.Message.decode(reader, reader.uint32()); + break; + } + case 15: { + message.timestampMs = reader.int64(); + break; + } + case 16: { + message.peerDataOperationRequestMessage = $root.proto.Message.PeerDataOperationRequestMessage.decode(reader, reader.uint32()); + break; + } + case 17: { + message.peerDataOperationRequestResponseMessage = $root.proto.Message.PeerDataOperationRequestResponseMessage.decode(reader, reader.uint32()); + break; + } + case 18: { + message.botFeedbackMessage = $root.proto.Message.BotFeedbackMessage.decode(reader, reader.uint32()); + break; + } + case 19: { + message.invokerJid = reader.string(); + break; + } + case 20: { + message.requestWelcomeMessageMetadata = $root.proto.Message.RequestWelcomeMessageMetadata.decode(reader, reader.uint32()); + break; + } + case 21: { + message.mediaNotifyMessage = $root.proto.MediaNotifyMessage.decode(reader, reader.uint32()); + break; + } + case 22: { + message.cloudApiThreadControlNotification = $root.proto.Message.CloudAPIThreadControlNotification.decode(reader, reader.uint32()); + break; + } + case 23: { + message.lidMigrationMappingSyncMessage = $root.proto.LIDMigrationMappingSyncMessage.decode(reader, reader.uint32()); + break; + } + case 24: { + message.limitSharing = $root.proto.LimitSharing.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -57660,12 +93021,17 @@ $root.proto = (function() { ProtocolMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; if (message.key != null && message.hasOwnProperty("key")) { - var error = $root.proto.MessageKey.verify(message.key); - if (error) - return "key." + error; + properties._key = 1; + { + var error = $root.proto.MessageKey.verify(message.key); + if (error) + return "key." + error; + } } - if (message.type != null && message.hasOwnProperty("type")) + if (message.type != null && message.hasOwnProperty("type")) { + properties._type = 1; switch (message.type) { default: return "type: enum value expected"; @@ -57685,79 +93051,155 @@ $root.proto = (function() { case 18: case 19: case 20: + case 21: + case 22: + case 23: + case 24: + case 25: + case 26: + case 27: break; } - if (message.ephemeralExpiration != null && message.hasOwnProperty("ephemeralExpiration")) + } + if (message.ephemeralExpiration != null && message.hasOwnProperty("ephemeralExpiration")) { + properties._ephemeralExpiration = 1; if (!$util.isInteger(message.ephemeralExpiration)) return "ephemeralExpiration: integer expected"; - if (message.ephemeralSettingTimestamp != null && message.hasOwnProperty("ephemeralSettingTimestamp")) + } + if (message.ephemeralSettingTimestamp != null && message.hasOwnProperty("ephemeralSettingTimestamp")) { + properties._ephemeralSettingTimestamp = 1; 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; + properties._historySyncNotification = 1; + { + 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; + properties._appStateSyncKeyShare = 1; + { + 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; + properties._appStateSyncKeyRequest = 1; + { + 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; + properties._initialSecurityNotificationSettingSync = 1; + { + 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; + properties._appStateFatalExceptionNotification = 1; + { + 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; + properties._disappearingMode = 1; + { + var error = $root.proto.DisappearingMode.verify(message.disappearingMode); + if (error) + return "disappearingMode." + error; + } } if (message.editedMessage != null && message.hasOwnProperty("editedMessage")) { - var error = $root.proto.Message.verify(message.editedMessage); - if (error) - return "editedMessage." + error; + properties._editedMessage = 1; + { + var error = $root.proto.Message.verify(message.editedMessage); + if (error) + return "editedMessage." + error; + } } - if (message.timestampMs != null && message.hasOwnProperty("timestampMs")) + if (message.timestampMs != null && message.hasOwnProperty("timestampMs")) { + properties._timestampMs = 1; if (!$util.isInteger(message.timestampMs) && !(message.timestampMs && $util.isInteger(message.timestampMs.low) && $util.isInteger(message.timestampMs.high))) return "timestampMs: integer|Long expected"; + } if (message.peerDataOperationRequestMessage != null && message.hasOwnProperty("peerDataOperationRequestMessage")) { - var error = $root.proto.Message.PeerDataOperationRequestMessage.verify(message.peerDataOperationRequestMessage); - if (error) - return "peerDataOperationRequestMessage." + error; + properties._peerDataOperationRequestMessage = 1; + { + var error = $root.proto.Message.PeerDataOperationRequestMessage.verify(message.peerDataOperationRequestMessage); + if (error) + return "peerDataOperationRequestMessage." + error; + } } if (message.peerDataOperationRequestResponseMessage != null && message.hasOwnProperty("peerDataOperationRequestResponseMessage")) { - var error = $root.proto.Message.PeerDataOperationRequestResponseMessage.verify(message.peerDataOperationRequestResponseMessage); - if (error) - return "peerDataOperationRequestResponseMessage." + error; + properties._peerDataOperationRequestResponseMessage = 1; + { + var error = $root.proto.Message.PeerDataOperationRequestResponseMessage.verify(message.peerDataOperationRequestResponseMessage); + if (error) + return "peerDataOperationRequestResponseMessage." + error; + } } if (message.botFeedbackMessage != null && message.hasOwnProperty("botFeedbackMessage")) { - var error = $root.proto.Message.BotFeedbackMessage.verify(message.botFeedbackMessage); - if (error) - return "botFeedbackMessage." + error; + properties._botFeedbackMessage = 1; + { + var error = $root.proto.Message.BotFeedbackMessage.verify(message.botFeedbackMessage); + if (error) + return "botFeedbackMessage." + error; + } } - if (message.invokerJid != null && message.hasOwnProperty("invokerJid")) + if (message.invokerJid != null && message.hasOwnProperty("invokerJid")) { + properties._invokerJid = 1; if (!$util.isString(message.invokerJid)) return "invokerJid: string expected"; + } if (message.requestWelcomeMessageMetadata != null && message.hasOwnProperty("requestWelcomeMessageMetadata")) { - var error = $root.proto.Message.RequestWelcomeMessageMetadata.verify(message.requestWelcomeMessageMetadata); - if (error) - return "requestWelcomeMessageMetadata." + error; + properties._requestWelcomeMessageMetadata = 1; + { + var error = $root.proto.Message.RequestWelcomeMessageMetadata.verify(message.requestWelcomeMessageMetadata); + if (error) + return "requestWelcomeMessageMetadata." + error; + } } if (message.mediaNotifyMessage != null && message.hasOwnProperty("mediaNotifyMessage")) { - var error = $root.proto.MediaNotifyMessage.verify(message.mediaNotifyMessage); - if (error) - return "mediaNotifyMessage." + error; + properties._mediaNotifyMessage = 1; + { + var error = $root.proto.MediaNotifyMessage.verify(message.mediaNotifyMessage); + if (error) + return "mediaNotifyMessage." + error; + } + } + if (message.cloudApiThreadControlNotification != null && message.hasOwnProperty("cloudApiThreadControlNotification")) { + properties._cloudApiThreadControlNotification = 1; + { + var error = $root.proto.Message.CloudAPIThreadControlNotification.verify(message.cloudApiThreadControlNotification); + if (error) + return "cloudApiThreadControlNotification." + error; + } + } + if (message.lidMigrationMappingSyncMessage != null && message.hasOwnProperty("lidMigrationMappingSyncMessage")) { + properties._lidMigrationMappingSyncMessage = 1; + { + var error = $root.proto.LIDMigrationMappingSyncMessage.verify(message.lidMigrationMappingSyncMessage); + if (error) + return "lidMigrationMappingSyncMessage." + error; + } + } + if (message.limitSharing != null && message.hasOwnProperty("limitSharing")) { + properties._limitSharing = 1; + { + var error = $root.proto.LimitSharing.verify(message.limitSharing); + if (error) + return "limitSharing." + error; + } } return null; }; @@ -57780,6 +93222,12 @@ $root.proto = (function() { message.key = $root.proto.MessageKey.fromObject(object.key); } switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; case "REVOKE": case 0: message.type = 0; @@ -57844,6 +93292,34 @@ $root.proto = (function() { case 20: message.type = 20; break; + case "CLOUD_API_THREAD_CONTROL_NOTIFICATION": + case 21: + message.type = 21; + break; + case "LID_MIGRATION_MAPPING_SYNC": + case 22: + message.type = 22; + break; + case "REMINDER_MESSAGE": + case 23: + message.type = 23; + break; + case "BOT_MEMU_ONBOARDING_MESSAGE": + case 24: + message.type = 24; + break; + case "STATUS_MENTION_MESSAGE": + case 25: + message.type = 25; + break; + case "STOP_GENERATION_MESSAGE": + case 26: + message.type = 26; + break; + case "LIMIT_SHARING": + case 27: + message.type = 27; + break; } if (object.ephemeralExpiration != null) message.ephemeralExpiration = object.ephemeralExpiration >>> 0; @@ -57927,6 +93403,21 @@ $root.proto = (function() { throw TypeError(".proto.Message.ProtocolMessage.mediaNotifyMessage: object expected"); message.mediaNotifyMessage = $root.proto.MediaNotifyMessage.fromObject(object.mediaNotifyMessage); } + if (object.cloudApiThreadControlNotification != null) { + if (typeof object.cloudApiThreadControlNotification !== "object") + throw TypeError(".proto.Message.ProtocolMessage.cloudApiThreadControlNotification: object expected"); + message.cloudApiThreadControlNotification = $root.proto.Message.CloudAPIThreadControlNotification.fromObject(object.cloudApiThreadControlNotification); + } + if (object.lidMigrationMappingSyncMessage != null) { + if (typeof object.lidMigrationMappingSyncMessage !== "object") + throw TypeError(".proto.Message.ProtocolMessage.lidMigrationMappingSyncMessage: object expected"); + message.lidMigrationMappingSyncMessage = $root.proto.LIDMigrationMappingSyncMessage.fromObject(object.lidMigrationMappingSyncMessage); + } + if (object.limitSharing != null) { + if (typeof object.limitSharing !== "object") + throw TypeError(".proto.Message.ProtocolMessage.limitSharing: object expected"); + message.limitSharing = $root.proto.LimitSharing.fromObject(object.limitSharing); + } return message; }; @@ -57943,76 +93434,117 @@ $root.proto = (function() { 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.editedMessage = null; - 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; - object.peerDataOperationRequestMessage = null; - object.peerDataOperationRequestResponseMessage = null; - object.botFeedbackMessage = null; - object.invokerJid = ""; - object.requestWelcomeMessageMetadata = null; - object.mediaNotifyMessage = null; - } - if (message.key != null && message.hasOwnProperty("key")) + 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")) + if (options.oneofs) + object._key = "key"; + } + if (message.type != null && message.hasOwnProperty("type")) { + object.type = options.enums === String ? $root.proto.Message.ProtocolMessage.Type[message.type] === undefined ? message.type : $root.proto.Message.ProtocolMessage.Type[message.type] : message.type; + if (options.oneofs) + object._type = "type"; + } + if (message.ephemeralExpiration != null && message.hasOwnProperty("ephemeralExpiration")) { object.ephemeralExpiration = message.ephemeralExpiration; - if (message.ephemeralSettingTimestamp != null && message.hasOwnProperty("ephemeralSettingTimestamp")) + if (options.oneofs) + object._ephemeralExpiration = "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")) + if (options.oneofs) + object._ephemeralSettingTimestamp = "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")) + if (options.oneofs) + object._historySyncNotification = "historySyncNotification"; + } + if (message.appStateSyncKeyShare != null && message.hasOwnProperty("appStateSyncKeyShare")) { object.appStateSyncKeyShare = $root.proto.Message.AppStateSyncKeyShare.toObject(message.appStateSyncKeyShare, options); - if (message.appStateSyncKeyRequest != null && message.hasOwnProperty("appStateSyncKeyRequest")) + if (options.oneofs) + object._appStateSyncKeyShare = "appStateSyncKeyShare"; + } + if (message.appStateSyncKeyRequest != null && message.hasOwnProperty("appStateSyncKeyRequest")) { object.appStateSyncKeyRequest = $root.proto.Message.AppStateSyncKeyRequest.toObject(message.appStateSyncKeyRequest, options); - if (message.initialSecurityNotificationSettingSync != null && message.hasOwnProperty("initialSecurityNotificationSettingSync")) + if (options.oneofs) + object._appStateSyncKeyRequest = "appStateSyncKeyRequest"; + } + if (message.initialSecurityNotificationSettingSync != null && message.hasOwnProperty("initialSecurityNotificationSettingSync")) { object.initialSecurityNotificationSettingSync = $root.proto.Message.InitialSecurityNotificationSettingSync.toObject(message.initialSecurityNotificationSettingSync, options); - if (message.appStateFatalExceptionNotification != null && message.hasOwnProperty("appStateFatalExceptionNotification")) + if (options.oneofs) + object._initialSecurityNotificationSettingSync = "initialSecurityNotificationSettingSync"; + } + if (message.appStateFatalExceptionNotification != null && message.hasOwnProperty("appStateFatalExceptionNotification")) { object.appStateFatalExceptionNotification = $root.proto.Message.AppStateFatalExceptionNotification.toObject(message.appStateFatalExceptionNotification, options); - if (message.disappearingMode != null && message.hasOwnProperty("disappearingMode")) + if (options.oneofs) + object._appStateFatalExceptionNotification = "appStateFatalExceptionNotification"; + } + if (message.disappearingMode != null && message.hasOwnProperty("disappearingMode")) { object.disappearingMode = $root.proto.DisappearingMode.toObject(message.disappearingMode, options); - if (message.editedMessage != null && message.hasOwnProperty("editedMessage")) + if (options.oneofs) + object._disappearingMode = "disappearingMode"; + } + if (message.editedMessage != null && message.hasOwnProperty("editedMessage")) { object.editedMessage = $root.proto.Message.toObject(message.editedMessage, options); - if (message.timestampMs != null && message.hasOwnProperty("timestampMs")) + if (options.oneofs) + object._editedMessage = "editedMessage"; + } + 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; - if (message.peerDataOperationRequestMessage != null && message.hasOwnProperty("peerDataOperationRequestMessage")) + if (options.oneofs) + object._timestampMs = "timestampMs"; + } + if (message.peerDataOperationRequestMessage != null && message.hasOwnProperty("peerDataOperationRequestMessage")) { object.peerDataOperationRequestMessage = $root.proto.Message.PeerDataOperationRequestMessage.toObject(message.peerDataOperationRequestMessage, options); - if (message.peerDataOperationRequestResponseMessage != null && message.hasOwnProperty("peerDataOperationRequestResponseMessage")) + if (options.oneofs) + object._peerDataOperationRequestMessage = "peerDataOperationRequestMessage"; + } + if (message.peerDataOperationRequestResponseMessage != null && message.hasOwnProperty("peerDataOperationRequestResponseMessage")) { object.peerDataOperationRequestResponseMessage = $root.proto.Message.PeerDataOperationRequestResponseMessage.toObject(message.peerDataOperationRequestResponseMessage, options); - if (message.botFeedbackMessage != null && message.hasOwnProperty("botFeedbackMessage")) + if (options.oneofs) + object._peerDataOperationRequestResponseMessage = "peerDataOperationRequestResponseMessage"; + } + if (message.botFeedbackMessage != null && message.hasOwnProperty("botFeedbackMessage")) { object.botFeedbackMessage = $root.proto.Message.BotFeedbackMessage.toObject(message.botFeedbackMessage, options); - if (message.invokerJid != null && message.hasOwnProperty("invokerJid")) + if (options.oneofs) + object._botFeedbackMessage = "botFeedbackMessage"; + } + if (message.invokerJid != null && message.hasOwnProperty("invokerJid")) { object.invokerJid = message.invokerJid; - if (message.requestWelcomeMessageMetadata != null && message.hasOwnProperty("requestWelcomeMessageMetadata")) + if (options.oneofs) + object._invokerJid = "invokerJid"; + } + if (message.requestWelcomeMessageMetadata != null && message.hasOwnProperty("requestWelcomeMessageMetadata")) { object.requestWelcomeMessageMetadata = $root.proto.Message.RequestWelcomeMessageMetadata.toObject(message.requestWelcomeMessageMetadata, options); - if (message.mediaNotifyMessage != null && message.hasOwnProperty("mediaNotifyMessage")) + if (options.oneofs) + object._requestWelcomeMessageMetadata = "requestWelcomeMessageMetadata"; + } + if (message.mediaNotifyMessage != null && message.hasOwnProperty("mediaNotifyMessage")) { object.mediaNotifyMessage = $root.proto.MediaNotifyMessage.toObject(message.mediaNotifyMessage, options); + if (options.oneofs) + object._mediaNotifyMessage = "mediaNotifyMessage"; + } + if (message.cloudApiThreadControlNotification != null && message.hasOwnProperty("cloudApiThreadControlNotification")) { + object.cloudApiThreadControlNotification = $root.proto.Message.CloudAPIThreadControlNotification.toObject(message.cloudApiThreadControlNotification, options); + if (options.oneofs) + object._cloudApiThreadControlNotification = "cloudApiThreadControlNotification"; + } + if (message.lidMigrationMappingSyncMessage != null && message.hasOwnProperty("lidMigrationMappingSyncMessage")) { + object.lidMigrationMappingSyncMessage = $root.proto.LIDMigrationMappingSyncMessage.toObject(message.lidMigrationMappingSyncMessage, options); + if (options.oneofs) + object._lidMigrationMappingSyncMessage = "lidMigrationMappingSyncMessage"; + } + if (message.limitSharing != null && message.hasOwnProperty("limitSharing")) { + object.limitSharing = $root.proto.LimitSharing.toObject(message.limitSharing, options); + if (options.oneofs) + object._limitSharing = "limitSharing"; + } return object; }; @@ -58027,6 +93559,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ProtocolMessage + * @function getTypeUrl + * @memberof proto.Message.ProtocolMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ProtocolMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.ProtocolMessage"; + }; + /** * Type enum. * @name proto.Message.ProtocolMessage.Type @@ -58047,6 +93594,13 @@ $root.proto = (function() { * @property {number} REQUEST_WELCOME_MESSAGE=18 REQUEST_WELCOME_MESSAGE value * @property {number} BOT_FEEDBACK_MESSAGE=19 BOT_FEEDBACK_MESSAGE value * @property {number} MEDIA_NOTIFY_MESSAGE=20 MEDIA_NOTIFY_MESSAGE value + * @property {number} CLOUD_API_THREAD_CONTROL_NOTIFICATION=21 CLOUD_API_THREAD_CONTROL_NOTIFICATION value + * @property {number} LID_MIGRATION_MAPPING_SYNC=22 LID_MIGRATION_MAPPING_SYNC value + * @property {number} REMINDER_MESSAGE=23 REMINDER_MESSAGE value + * @property {number} BOT_MEMU_ONBOARDING_MESSAGE=24 BOT_MEMU_ONBOARDING_MESSAGE value + * @property {number} STATUS_MENTION_MESSAGE=25 STATUS_MENTION_MESSAGE value + * @property {number} STOP_GENERATION_MESSAGE=26 STOP_GENERATION_MESSAGE value + * @property {number} LIMIT_SHARING=27 LIMIT_SHARING value */ ProtocolMessage.Type = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -58066,6 +93620,13 @@ $root.proto = (function() { values[valuesById[18] = "REQUEST_WELCOME_MESSAGE"] = 18; values[valuesById[19] = "BOT_FEEDBACK_MESSAGE"] = 19; values[valuesById[20] = "MEDIA_NOTIFY_MESSAGE"] = 20; + values[valuesById[21] = "CLOUD_API_THREAD_CONTROL_NOTIFICATION"] = 21; + values[valuesById[22] = "LID_MIGRATION_MAPPING_SYNC"] = 22; + values[valuesById[23] = "REMINDER_MESSAGE"] = 23; + values[valuesById[24] = "BOT_MEMU_ONBOARDING_MESSAGE"] = 24; + values[valuesById[25] = "STATUS_MENTION_MESSAGE"] = 25; + values[valuesById[26] = "STOP_GENERATION_MESSAGE"] = 26; + values[valuesById[27] = "LIMIT_SHARING"] = 27; return values; })(); @@ -58109,27 +93670,54 @@ $root.proto = (function() { /** * ReactionMessage text. - * @member {string} text + * @member {string|null|undefined} text * @memberof proto.Message.ReactionMessage * @instance */ - ReactionMessage.prototype.text = ""; + ReactionMessage.prototype.text = null; /** * ReactionMessage groupingKey. - * @member {string} groupingKey + * @member {string|null|undefined} groupingKey * @memberof proto.Message.ReactionMessage * @instance */ - ReactionMessage.prototype.groupingKey = ""; + ReactionMessage.prototype.groupingKey = null; /** * ReactionMessage senderTimestampMs. - * @member {number|Long} senderTimestampMs + * @member {number|Long|null|undefined} senderTimestampMs * @memberof proto.Message.ReactionMessage * @instance */ - ReactionMessage.prototype.senderTimestampMs = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + ReactionMessage.prototype.senderTimestampMs = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ReactionMessage.prototype, "_key", { + get: $util.oneOfGetter($oneOfFields = ["key"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ReactionMessage.prototype, "_text", { + get: $util.oneOfGetter($oneOfFields = ["text"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ReactionMessage.prototype, "_groupingKey", { + get: $util.oneOfGetter($oneOfFields = ["groupingKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ReactionMessage.prototype, "_senderTimestampMs", { + get: $util.oneOfGetter($oneOfFields = ["senderTimestampMs"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new ReactionMessage instance using the specified properties. @@ -58197,18 +93785,22 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.key = $root.proto.MessageKey.decode(reader, reader.uint32()); - break; - case 2: - message.text = reader.string(); - break; - case 3: - message.groupingKey = reader.string(); - break; - case 4: - message.senderTimestampMs = reader.int64(); - break; + case 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; @@ -58244,20 +93836,30 @@ $root.proto = (function() { ReactionMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; if (message.key != null && message.hasOwnProperty("key")) { - var error = $root.proto.MessageKey.verify(message.key); - if (error) - return "key." + error; + properties._key = 1; + { + var error = $root.proto.MessageKey.verify(message.key); + if (error) + return "key." + error; + } } - if (message.text != null && message.hasOwnProperty("text")) + if (message.text != null && message.hasOwnProperty("text")) { + properties._text = 1; if (!$util.isString(message.text)) return "text: string expected"; - if (message.groupingKey != null && message.hasOwnProperty("groupingKey")) + } + if (message.groupingKey != null && message.hasOwnProperty("groupingKey")) { + properties._groupingKey = 1; if (!$util.isString(message.groupingKey)) return "groupingKey: string expected"; - if (message.senderTimestampMs != null && message.hasOwnProperty("senderTimestampMs")) + } + if (message.senderTimestampMs != null && message.hasOwnProperty("senderTimestampMs")) { + properties._senderTimestampMs = 1; if (!$util.isInteger(message.senderTimestampMs) && !(message.senderTimestampMs && $util.isInteger(message.senderTimestampMs.low) && $util.isInteger(message.senderTimestampMs.high))) return "senderTimestampMs: integer|Long expected"; + } return null; }; @@ -58307,27 +93909,29 @@ $root.proto = (function() { 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")) + if (message.key != null && message.hasOwnProperty("key")) { object.key = $root.proto.MessageKey.toObject(message.key, options); - if (message.text != null && message.hasOwnProperty("text")) + if (options.oneofs) + object._key = "key"; + } + if (message.text != null && message.hasOwnProperty("text")) { object.text = message.text; - if (message.groupingKey != null && message.hasOwnProperty("groupingKey")) + if (options.oneofs) + object._text = "text"; + } + if (message.groupingKey != null && message.hasOwnProperty("groupingKey")) { object.groupingKey = message.groupingKey; - if (message.senderTimestampMs != null && message.hasOwnProperty("senderTimestampMs")) + if (options.oneofs) + object._groupingKey = "groupingKey"; + } + if (message.senderTimestampMs != null && message.hasOwnProperty("senderTimestampMs")) { if (typeof message.senderTimestampMs === "number") object.senderTimestampMs = options.longs === String ? String(message.senderTimestampMs) : message.senderTimestampMs; else object.senderTimestampMs = options.longs === String ? $util.Long.prototype.toString.call(message.senderTimestampMs) : options.longs === Number ? new $util.LongBits(message.senderTimestampMs.low >>> 0, message.senderTimestampMs.high >>> 0).toNumber() : message.senderTimestampMs; + if (options.oneofs) + object._senderTimestampMs = "senderTimestampMs"; + } return object; }; @@ -58342,6 +93946,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ReactionMessage + * @function getTypeUrl + * @memberof proto.Message.ReactionMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReactionMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.ReactionMessage"; + }; + return ReactionMessage; })(); @@ -58385,35 +94004,35 @@ $root.proto = (function() { /** * RequestPaymentMessage currencyCodeIso4217. - * @member {string} currencyCodeIso4217 + * @member {string|null|undefined} currencyCodeIso4217 * @memberof proto.Message.RequestPaymentMessage * @instance */ - RequestPaymentMessage.prototype.currencyCodeIso4217 = ""; + RequestPaymentMessage.prototype.currencyCodeIso4217 = null; /** * RequestPaymentMessage amount1000. - * @member {number|Long} amount1000 + * @member {number|Long|null|undefined} amount1000 * @memberof proto.Message.RequestPaymentMessage * @instance */ - RequestPaymentMessage.prototype.amount1000 = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + RequestPaymentMessage.prototype.amount1000 = null; /** * RequestPaymentMessage requestFrom. - * @member {string} requestFrom + * @member {string|null|undefined} requestFrom * @memberof proto.Message.RequestPaymentMessage * @instance */ - RequestPaymentMessage.prototype.requestFrom = ""; + RequestPaymentMessage.prototype.requestFrom = null; /** * RequestPaymentMessage expiryTimestamp. - * @member {number|Long} expiryTimestamp + * @member {number|Long|null|undefined} expiryTimestamp * @memberof proto.Message.RequestPaymentMessage * @instance */ - RequestPaymentMessage.prototype.expiryTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + RequestPaymentMessage.prototype.expiryTimestamp = null; /** * RequestPaymentMessage amount. @@ -58431,6 +94050,51 @@ $root.proto = (function() { */ RequestPaymentMessage.prototype.background = null; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(RequestPaymentMessage.prototype, "_noteMessage", { + get: $util.oneOfGetter($oneOfFields = ["noteMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(RequestPaymentMessage.prototype, "_currencyCodeIso4217", { + get: $util.oneOfGetter($oneOfFields = ["currencyCodeIso4217"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(RequestPaymentMessage.prototype, "_amount1000", { + get: $util.oneOfGetter($oneOfFields = ["amount1000"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(RequestPaymentMessage.prototype, "_requestFrom", { + get: $util.oneOfGetter($oneOfFields = ["requestFrom"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(RequestPaymentMessage.prototype, "_expiryTimestamp", { + get: $util.oneOfGetter($oneOfFields = ["expiryTimestamp"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(RequestPaymentMessage.prototype, "_amount", { + get: $util.oneOfGetter($oneOfFields = ["amount"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(RequestPaymentMessage.prototype, "_background", { + get: $util.oneOfGetter($oneOfFields = ["background"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new RequestPaymentMessage instance using the specified properties. * @function create @@ -58503,27 +94167,34 @@ $root.proto = (function() { 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; + 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; @@ -58559,32 +94230,50 @@ $root.proto = (function() { RequestPaymentMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; if (message.noteMessage != null && message.hasOwnProperty("noteMessage")) { - var error = $root.proto.Message.verify(message.noteMessage); - if (error) - return "noteMessage." + error; + properties._noteMessage = 1; + { + var error = $root.proto.Message.verify(message.noteMessage); + if (error) + return "noteMessage." + error; + } } - if (message.currencyCodeIso4217 != null && message.hasOwnProperty("currencyCodeIso4217")) + if (message.currencyCodeIso4217 != null && message.hasOwnProperty("currencyCodeIso4217")) { + properties._currencyCodeIso4217 = 1; if (!$util.isString(message.currencyCodeIso4217)) return "currencyCodeIso4217: string expected"; - if (message.amount1000 != null && message.hasOwnProperty("amount1000")) + } + if (message.amount1000 != null && message.hasOwnProperty("amount1000")) { + properties._amount1000 = 1; 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 (message.requestFrom != null && message.hasOwnProperty("requestFrom")) { + properties._requestFrom = 1; if (!$util.isString(message.requestFrom)) return "requestFrom: string expected"; - if (message.expiryTimestamp != null && message.hasOwnProperty("expiryTimestamp")) + } + if (message.expiryTimestamp != null && message.hasOwnProperty("expiryTimestamp")) { + properties._expiryTimestamp = 1; 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; + properties._amount = 1; + { + 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; + properties._background = 1; + { + var error = $root.proto.PaymentBackground.verify(message.background); + if (error) + return "background." + error; + } } return null; }; @@ -58654,43 +94343,47 @@ $root.proto = (function() { 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")) + if (message.currencyCodeIso4217 != null && message.hasOwnProperty("currencyCodeIso4217")) { object.currencyCodeIso4217 = message.currencyCodeIso4217; - if (message.amount1000 != null && message.hasOwnProperty("amount1000")) + if (options.oneofs) + object._currencyCodeIso4217 = "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")) + if (options.oneofs) + object._amount1000 = "amount1000"; + } + if (message.requestFrom != null && message.hasOwnProperty("requestFrom")) { object.requestFrom = message.requestFrom; - if (message.noteMessage != null && message.hasOwnProperty("noteMessage")) + if (options.oneofs) + object._requestFrom = "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 (options.oneofs) + object._noteMessage = "noteMessage"; + } + 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")) + if (options.oneofs) + object._expiryTimestamp = "expiryTimestamp"; + } + if (message.amount != null && message.hasOwnProperty("amount")) { object.amount = $root.proto.Money.toObject(message.amount, options); - if (message.background != null && message.hasOwnProperty("background")) + if (options.oneofs) + object._amount = "amount"; + } + if (message.background != null && message.hasOwnProperty("background")) { object.background = $root.proto.PaymentBackground.toObject(message.background, options); + if (options.oneofs) + object._background = "background"; + } return object; }; @@ -58705,6 +94398,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for RequestPaymentMessage + * @function getTypeUrl + * @memberof proto.Message.RequestPaymentMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RequestPaymentMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.RequestPaymentMessage"; + }; + return RequestPaymentMessage; })(); @@ -58740,6 +94448,15 @@ $root.proto = (function() { */ RequestPhoneNumberMessage.prototype.contextInfo = null; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(RequestPhoneNumberMessage.prototype, "_contextInfo", { + get: $util.oneOfGetter($oneOfFields = ["contextInfo"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new RequestPhoneNumberMessage instance using the specified properties. * @function create @@ -58800,9 +94517,10 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.contextInfo = $root.proto.ContextInfo.decode(reader, reader.uint32()); - break; + case 1: { + message.contextInfo = $root.proto.ContextInfo.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -58838,10 +94556,14 @@ $root.proto = (function() { RequestPhoneNumberMessage.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; + properties._contextInfo = 1; + { + var error = $root.proto.ContextInfo.verify(message.contextInfo); + if (error) + return "contextInfo." + error; + } } return null; }; @@ -58879,10 +94601,11 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) - object.contextInfo = null; - if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) + if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) { object.contextInfo = $root.proto.ContextInfo.toObject(message.contextInfo, options); + if (options.oneofs) + object._contextInfo = "contextInfo"; + } return object; }; @@ -58897,6 +94620,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for RequestPhoneNumberMessage + * @function getTypeUrl + * @memberof proto.Message.RequestPhoneNumberMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RequestPhoneNumberMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.RequestPhoneNumberMessage"; + }; + return RequestPhoneNumberMessage; })(); @@ -58926,11 +94664,20 @@ $root.proto = (function() { /** * RequestWelcomeMessageMetadata localChatState. - * @member {proto.Message.RequestWelcomeMessageMetadata.LocalChatState} localChatState + * @member {proto.Message.RequestWelcomeMessageMetadata.LocalChatState|null|undefined} localChatState * @memberof proto.Message.RequestWelcomeMessageMetadata * @instance */ - RequestWelcomeMessageMetadata.prototype.localChatState = 0; + RequestWelcomeMessageMetadata.prototype.localChatState = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(RequestWelcomeMessageMetadata.prototype, "_localChatState", { + get: $util.oneOfGetter($oneOfFields = ["localChatState"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new RequestWelcomeMessageMetadata instance using the specified properties. @@ -58992,9 +94739,10 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.localChatState = reader.int32(); - break; + case 1: { + message.localChatState = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -59030,7 +94778,9 @@ $root.proto = (function() { RequestWelcomeMessageMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.localChatState != null && message.hasOwnProperty("localChatState")) + var properties = {}; + if (message.localChatState != null && message.hasOwnProperty("localChatState")) { + properties._localChatState = 1; switch (message.localChatState) { default: return "localChatState: enum value expected"; @@ -59038,6 +94788,7 @@ $root.proto = (function() { case 1: break; } + } return null; }; @@ -59054,6 +94805,12 @@ $root.proto = (function() { return object; var message = new $root.proto.Message.RequestWelcomeMessageMetadata(); switch (object.localChatState) { + default: + if (typeof object.localChatState === "number") { + message.localChatState = object.localChatState; + break; + } + break; case "EMPTY": case 0: message.localChatState = 0; @@ -59079,10 +94836,11 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) - object.localChatState = options.enums === String ? "EMPTY" : 0; - if (message.localChatState != null && message.hasOwnProperty("localChatState")) - object.localChatState = options.enums === String ? $root.proto.Message.RequestWelcomeMessageMetadata.LocalChatState[message.localChatState] : message.localChatState; + if (message.localChatState != null && message.hasOwnProperty("localChatState")) { + object.localChatState = options.enums === String ? $root.proto.Message.RequestWelcomeMessageMetadata.LocalChatState[message.localChatState] === undefined ? message.localChatState : $root.proto.Message.RequestWelcomeMessageMetadata.LocalChatState[message.localChatState] : message.localChatState; + if (options.oneofs) + object._localChatState = "localChatState"; + } return object; }; @@ -59097,6 +94855,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for RequestWelcomeMessageMetadata + * @function getTypeUrl + * @memberof proto.Message.RequestWelcomeMessageMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RequestWelcomeMessageMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.RequestWelcomeMessageMetadata"; + }; + /** * LocalChatState enum. * @name proto.Message.RequestWelcomeMessageMetadata.LocalChatState @@ -59142,27 +94915,48 @@ $root.proto = (function() { /** * ScheduledCallCreationMessage scheduledTimestampMs. - * @member {number|Long} scheduledTimestampMs + * @member {number|Long|null|undefined} scheduledTimestampMs * @memberof proto.Message.ScheduledCallCreationMessage * @instance */ - ScheduledCallCreationMessage.prototype.scheduledTimestampMs = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + ScheduledCallCreationMessage.prototype.scheduledTimestampMs = null; /** * ScheduledCallCreationMessage callType. - * @member {proto.Message.ScheduledCallCreationMessage.CallType} callType + * @member {proto.Message.ScheduledCallCreationMessage.CallType|null|undefined} callType * @memberof proto.Message.ScheduledCallCreationMessage * @instance */ - ScheduledCallCreationMessage.prototype.callType = 0; + ScheduledCallCreationMessage.prototype.callType = null; /** * ScheduledCallCreationMessage title. - * @member {string} title + * @member {string|null|undefined} title * @memberof proto.Message.ScheduledCallCreationMessage * @instance */ - ScheduledCallCreationMessage.prototype.title = ""; + ScheduledCallCreationMessage.prototype.title = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ScheduledCallCreationMessage.prototype, "_scheduledTimestampMs", { + get: $util.oneOfGetter($oneOfFields = ["scheduledTimestampMs"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ScheduledCallCreationMessage.prototype, "_callType", { + get: $util.oneOfGetter($oneOfFields = ["callType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ScheduledCallCreationMessage.prototype, "_title", { + get: $util.oneOfGetter($oneOfFields = ["title"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new ScheduledCallCreationMessage instance using the specified properties. @@ -59228,15 +95022,18 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.scheduledTimestampMs = reader.int64(); - break; - case 2: - message.callType = reader.int32(); - break; - case 3: - message.title = reader.string(); - break; + case 1: { + message.scheduledTimestampMs = reader.int64(); + break; + } + case 2: { + message.callType = reader.int32(); + break; + } + case 3: { + message.title = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -59272,10 +95069,14 @@ $root.proto = (function() { ScheduledCallCreationMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.scheduledTimestampMs != null && message.hasOwnProperty("scheduledTimestampMs")) + var properties = {}; + if (message.scheduledTimestampMs != null && message.hasOwnProperty("scheduledTimestampMs")) { + properties._scheduledTimestampMs = 1; if (!$util.isInteger(message.scheduledTimestampMs) && !(message.scheduledTimestampMs && $util.isInteger(message.scheduledTimestampMs.low) && $util.isInteger(message.scheduledTimestampMs.high))) return "scheduledTimestampMs: integer|Long expected"; - if (message.callType != null && message.hasOwnProperty("callType")) + } + if (message.callType != null && message.hasOwnProperty("callType")) { + properties._callType = 1; switch (message.callType) { default: return "callType: enum value expected"; @@ -59284,9 +95085,12 @@ $root.proto = (function() { case 2: break; } - if (message.title != null && message.hasOwnProperty("title")) + } + if (message.title != null && message.hasOwnProperty("title")) { + properties._title = 1; if (!$util.isString(message.title)) return "title: string expected"; + } return null; }; @@ -59312,6 +95116,12 @@ $root.proto = (function() { else if (typeof object.scheduledTimestampMs === "object") message.scheduledTimestampMs = new $util.LongBits(object.scheduledTimestampMs.low >>> 0, object.scheduledTimestampMs.high >>> 0).toNumber(); switch (object.callType) { + default: + if (typeof object.callType === "number") { + message.callType = object.callType; + break; + } + break; case "UNKNOWN": case 0: message.callType = 0; @@ -59343,24 +95153,24 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.scheduledTimestampMs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.scheduledTimestampMs = options.longs === String ? "0" : 0; - object.callType = options.enums === String ? "UNKNOWN" : 0; - object.title = ""; - } - if (message.scheduledTimestampMs != null && message.hasOwnProperty("scheduledTimestampMs")) + if (message.scheduledTimestampMs != null && message.hasOwnProperty("scheduledTimestampMs")) { if (typeof message.scheduledTimestampMs === "number") object.scheduledTimestampMs = options.longs === String ? String(message.scheduledTimestampMs) : message.scheduledTimestampMs; else object.scheduledTimestampMs = options.longs === String ? $util.Long.prototype.toString.call(message.scheduledTimestampMs) : options.longs === Number ? new $util.LongBits(message.scheduledTimestampMs.low >>> 0, message.scheduledTimestampMs.high >>> 0).toNumber() : message.scheduledTimestampMs; - if (message.callType != null && message.hasOwnProperty("callType")) - object.callType = options.enums === String ? $root.proto.Message.ScheduledCallCreationMessage.CallType[message.callType] : message.callType; - if (message.title != null && message.hasOwnProperty("title")) + if (options.oneofs) + object._scheduledTimestampMs = "scheduledTimestampMs"; + } + if (message.callType != null && message.hasOwnProperty("callType")) { + object.callType = options.enums === String ? $root.proto.Message.ScheduledCallCreationMessage.CallType[message.callType] === undefined ? message.callType : $root.proto.Message.ScheduledCallCreationMessage.CallType[message.callType] : message.callType; + if (options.oneofs) + object._callType = "callType"; + } + if (message.title != null && message.hasOwnProperty("title")) { object.title = message.title; + if (options.oneofs) + object._title = "title"; + } return object; }; @@ -59375,6 +95185,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ScheduledCallCreationMessage + * @function getTypeUrl + * @memberof proto.Message.ScheduledCallCreationMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ScheduledCallCreationMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.ScheduledCallCreationMessage"; + }; + /** * CallType enum. * @name proto.Message.ScheduledCallCreationMessage.CallType @@ -59429,11 +95254,26 @@ $root.proto = (function() { /** * ScheduledCallEditMessage editType. - * @member {proto.Message.ScheduledCallEditMessage.EditType} editType + * @member {proto.Message.ScheduledCallEditMessage.EditType|null|undefined} editType * @memberof proto.Message.ScheduledCallEditMessage * @instance */ - ScheduledCallEditMessage.prototype.editType = 0; + ScheduledCallEditMessage.prototype.editType = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ScheduledCallEditMessage.prototype, "_key", { + get: $util.oneOfGetter($oneOfFields = ["key"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ScheduledCallEditMessage.prototype, "_editType", { + get: $util.oneOfGetter($oneOfFields = ["editType"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new ScheduledCallEditMessage instance using the specified properties. @@ -59497,12 +95337,14 @@ $root.proto = (function() { 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.editType = reader.int32(); - break; + case 1: { + message.key = $root.proto.MessageKey.decode(reader, reader.uint32()); + break; + } + case 2: { + message.editType = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -59538,12 +95380,17 @@ $root.proto = (function() { ScheduledCallEditMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; if (message.key != null && message.hasOwnProperty("key")) { - var error = $root.proto.MessageKey.verify(message.key); - if (error) - return "key." + error; + properties._key = 1; + { + var error = $root.proto.MessageKey.verify(message.key); + if (error) + return "key." + error; + } } - if (message.editType != null && message.hasOwnProperty("editType")) + if (message.editType != null && message.hasOwnProperty("editType")) { + properties._editType = 1; switch (message.editType) { default: return "editType: enum value expected"; @@ -59551,6 +95398,7 @@ $root.proto = (function() { case 1: break; } + } return null; }; @@ -59572,6 +95420,12 @@ $root.proto = (function() { message.key = $root.proto.MessageKey.fromObject(object.key); } switch (object.editType) { + default: + if (typeof object.editType === "number") { + message.editType = object.editType; + break; + } + break; case "UNKNOWN": case 0: message.editType = 0; @@ -59597,14 +95451,16 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.key = null; - object.editType = options.enums === String ? "UNKNOWN" : 0; - } - if (message.key != null && message.hasOwnProperty("key")) + if (message.key != null && message.hasOwnProperty("key")) { object.key = $root.proto.MessageKey.toObject(message.key, options); - if (message.editType != null && message.hasOwnProperty("editType")) - object.editType = options.enums === String ? $root.proto.Message.ScheduledCallEditMessage.EditType[message.editType] : message.editType; + if (options.oneofs) + object._key = "key"; + } + if (message.editType != null && message.hasOwnProperty("editType")) { + object.editType = options.enums === String ? $root.proto.Message.ScheduledCallEditMessage.EditType[message.editType] === undefined ? message.editType : $root.proto.Message.ScheduledCallEditMessage.EditType[message.editType] : message.editType; + if (options.oneofs) + object._editType = "editType"; + } return object; }; @@ -59619,6 +95475,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ScheduledCallEditMessage + * @function getTypeUrl + * @memberof proto.Message.ScheduledCallEditMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ScheduledCallEditMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.ScheduledCallEditMessage"; + }; + /** * EditType enum. * @name proto.Message.ScheduledCallEditMessage.EditType @@ -59636,6 +95507,366 @@ $root.proto = (function() { return ScheduledCallEditMessage; })(); + Message.SecretEncryptedMessage = (function() { + + /** + * Properties of a SecretEncryptedMessage. + * @memberof proto.Message + * @interface ISecretEncryptedMessage + * @property {proto.IMessageKey|null} [targetMessageKey] SecretEncryptedMessage targetMessageKey + * @property {Uint8Array|null} [encPayload] SecretEncryptedMessage encPayload + * @property {Uint8Array|null} [encIv] SecretEncryptedMessage encIv + * @property {proto.Message.SecretEncryptedMessage.SecretEncType|null} [secretEncType] SecretEncryptedMessage secretEncType + */ + + /** + * Constructs a new SecretEncryptedMessage. + * @memberof proto.Message + * @classdesc Represents a SecretEncryptedMessage. + * @implements ISecretEncryptedMessage + * @constructor + * @param {proto.Message.ISecretEncryptedMessage=} [properties] Properties to set + */ + function SecretEncryptedMessage(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SecretEncryptedMessage targetMessageKey. + * @member {proto.IMessageKey|null|undefined} targetMessageKey + * @memberof proto.Message.SecretEncryptedMessage + * @instance + */ + SecretEncryptedMessage.prototype.targetMessageKey = null; + + /** + * SecretEncryptedMessage encPayload. + * @member {Uint8Array|null|undefined} encPayload + * @memberof proto.Message.SecretEncryptedMessage + * @instance + */ + SecretEncryptedMessage.prototype.encPayload = null; + + /** + * SecretEncryptedMessage encIv. + * @member {Uint8Array|null|undefined} encIv + * @memberof proto.Message.SecretEncryptedMessage + * @instance + */ + SecretEncryptedMessage.prototype.encIv = null; + + /** + * SecretEncryptedMessage secretEncType. + * @member {proto.Message.SecretEncryptedMessage.SecretEncType|null|undefined} secretEncType + * @memberof proto.Message.SecretEncryptedMessage + * @instance + */ + SecretEncryptedMessage.prototype.secretEncType = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SecretEncryptedMessage.prototype, "_targetMessageKey", { + get: $util.oneOfGetter($oneOfFields = ["targetMessageKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SecretEncryptedMessage.prototype, "_encPayload", { + get: $util.oneOfGetter($oneOfFields = ["encPayload"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SecretEncryptedMessage.prototype, "_encIv", { + get: $util.oneOfGetter($oneOfFields = ["encIv"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SecretEncryptedMessage.prototype, "_secretEncType", { + get: $util.oneOfGetter($oneOfFields = ["secretEncType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SecretEncryptedMessage instance using the specified properties. + * @function create + * @memberof proto.Message.SecretEncryptedMessage + * @static + * @param {proto.Message.ISecretEncryptedMessage=} [properties] Properties to set + * @returns {proto.Message.SecretEncryptedMessage} SecretEncryptedMessage instance + */ + SecretEncryptedMessage.create = function create(properties) { + return new SecretEncryptedMessage(properties); + }; + + /** + * Encodes the specified SecretEncryptedMessage message. Does not implicitly {@link proto.Message.SecretEncryptedMessage.verify|verify} messages. + * @function encode + * @memberof proto.Message.SecretEncryptedMessage + * @static + * @param {proto.Message.ISecretEncryptedMessage} message SecretEncryptedMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SecretEncryptedMessage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.targetMessageKey != null && Object.hasOwnProperty.call(message, "targetMessageKey")) + $root.proto.MessageKey.encode(message.targetMessageKey, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.encPayload != null && Object.hasOwnProperty.call(message, "encPayload")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.encPayload); + if (message.encIv != null && Object.hasOwnProperty.call(message, "encIv")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.encIv); + if (message.secretEncType != null && Object.hasOwnProperty.call(message, "secretEncType")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.secretEncType); + return writer; + }; + + /** + * Encodes the specified SecretEncryptedMessage message, length delimited. Does not implicitly {@link proto.Message.SecretEncryptedMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.SecretEncryptedMessage + * @static + * @param {proto.Message.ISecretEncryptedMessage} message SecretEncryptedMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SecretEncryptedMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SecretEncryptedMessage message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.SecretEncryptedMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.SecretEncryptedMessage} SecretEncryptedMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SecretEncryptedMessage.decode = function 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.SecretEncryptedMessage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.targetMessageKey = $root.proto.MessageKey.decode(reader, reader.uint32()); + break; + } + case 2: { + message.encPayload = reader.bytes(); + break; + } + case 3: { + message.encIv = reader.bytes(); + break; + } + case 4: { + message.secretEncType = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SecretEncryptedMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.SecretEncryptedMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.SecretEncryptedMessage} SecretEncryptedMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SecretEncryptedMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SecretEncryptedMessage message. + * @function verify + * @memberof proto.Message.SecretEncryptedMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SecretEncryptedMessage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.targetMessageKey != null && message.hasOwnProperty("targetMessageKey")) { + properties._targetMessageKey = 1; + { + var error = $root.proto.MessageKey.verify(message.targetMessageKey); + if (error) + return "targetMessageKey." + error; + } + } + if (message.encPayload != null && message.hasOwnProperty("encPayload")) { + properties._encPayload = 1; + if (!(message.encPayload && typeof message.encPayload.length === "number" || $util.isString(message.encPayload))) + return "encPayload: buffer expected"; + } + if (message.encIv != null && message.hasOwnProperty("encIv")) { + properties._encIv = 1; + if (!(message.encIv && typeof message.encIv.length === "number" || $util.isString(message.encIv))) + return "encIv: buffer expected"; + } + if (message.secretEncType != null && message.hasOwnProperty("secretEncType")) { + properties._secretEncType = 1; + switch (message.secretEncType) { + default: + return "secretEncType: enum value expected"; + case 0: + case 1: + break; + } + } + return null; + }; + + /** + * Creates a SecretEncryptedMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.SecretEncryptedMessage + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.SecretEncryptedMessage} SecretEncryptedMessage + */ + SecretEncryptedMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.SecretEncryptedMessage) + return object; + var message = new $root.proto.Message.SecretEncryptedMessage(); + if (object.targetMessageKey != null) { + if (typeof object.targetMessageKey !== "object") + throw TypeError(".proto.Message.SecretEncryptedMessage.targetMessageKey: object expected"); + message.targetMessageKey = $root.proto.MessageKey.fromObject(object.targetMessageKey); + } + 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 >= 0) + 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 >= 0) + message.encIv = object.encIv; + switch (object.secretEncType) { + default: + if (typeof object.secretEncType === "number") { + message.secretEncType = object.secretEncType; + break; + } + break; + case "UNKNOWN": + case 0: + message.secretEncType = 0; + break; + case "EVENT_EDIT": + case 1: + message.secretEncType = 1; + break; + } + return message; + }; + + /** + * Creates a plain object from a SecretEncryptedMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.SecretEncryptedMessage + * @static + * @param {proto.Message.SecretEncryptedMessage} message SecretEncryptedMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SecretEncryptedMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.targetMessageKey != null && message.hasOwnProperty("targetMessageKey")) { + object.targetMessageKey = $root.proto.MessageKey.toObject(message.targetMessageKey, options); + if (options.oneofs) + object._targetMessageKey = "targetMessageKey"; + } + 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 (options.oneofs) + object._encPayload = "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; + if (options.oneofs) + object._encIv = "encIv"; + } + if (message.secretEncType != null && message.hasOwnProperty("secretEncType")) { + object.secretEncType = options.enums === String ? $root.proto.Message.SecretEncryptedMessage.SecretEncType[message.secretEncType] === undefined ? message.secretEncType : $root.proto.Message.SecretEncryptedMessage.SecretEncType[message.secretEncType] : message.secretEncType; + if (options.oneofs) + object._secretEncType = "secretEncType"; + } + return object; + }; + + /** + * Converts this SecretEncryptedMessage to JSON. + * @function toJSON + * @memberof proto.Message.SecretEncryptedMessage + * @instance + * @returns {Object.} JSON object + */ + SecretEncryptedMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SecretEncryptedMessage + * @function getTypeUrl + * @memberof proto.Message.SecretEncryptedMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SecretEncryptedMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.SecretEncryptedMessage"; + }; + + /** + * SecretEncType enum. + * @name proto.Message.SecretEncryptedMessage.SecretEncType + * @enum {number} + * @property {number} UNKNOWN=0 UNKNOWN value + * @property {number} EVENT_EDIT=1 EVENT_EDIT value + */ + SecretEncryptedMessage.SecretEncType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNKNOWN"] = 0; + values[valuesById[1] = "EVENT_EDIT"] = 1; + return values; + })(); + + return SecretEncryptedMessage; + })(); + Message.SendPaymentMessage = (function() { /** @@ -59686,6 +95917,27 @@ $root.proto = (function() { */ SendPaymentMessage.prototype.background = null; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SendPaymentMessage.prototype, "_noteMessage", { + get: $util.oneOfGetter($oneOfFields = ["noteMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SendPaymentMessage.prototype, "_requestMessageKey", { + get: $util.oneOfGetter($oneOfFields = ["requestMessageKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SendPaymentMessage.prototype, "_background", { + get: $util.oneOfGetter($oneOfFields = ["background"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new SendPaymentMessage instance using the specified properties. * @function create @@ -59750,15 +96002,18 @@ $root.proto = (function() { 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; + 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; @@ -59794,20 +96049,30 @@ $root.proto = (function() { SendPaymentMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; if (message.noteMessage != null && message.hasOwnProperty("noteMessage")) { - var error = $root.proto.Message.verify(message.noteMessage); - if (error) - return "noteMessage." + error; + properties._noteMessage = 1; + { + 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; + properties._requestMessageKey = 1; + { + 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; + properties._background = 1; + { + var error = $root.proto.PaymentBackground.verify(message.background); + if (error) + return "background." + error; + } } return null; }; @@ -59855,17 +96120,21 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.noteMessage = null; - object.requestMessageKey = null; - object.background = null; - } - if (message.noteMessage != null && message.hasOwnProperty("noteMessage")) + if (message.noteMessage != null && message.hasOwnProperty("noteMessage")) { object.noteMessage = $root.proto.Message.toObject(message.noteMessage, options); - if (message.requestMessageKey != null && message.hasOwnProperty("requestMessageKey")) + if (options.oneofs) + object._noteMessage = "noteMessage"; + } + if (message.requestMessageKey != null && message.hasOwnProperty("requestMessageKey")) { object.requestMessageKey = $root.proto.MessageKey.toObject(message.requestMessageKey, options); - if (message.background != null && message.hasOwnProperty("background")) + if (options.oneofs) + object._requestMessageKey = "requestMessageKey"; + } + if (message.background != null && message.hasOwnProperty("background")) { object.background = $root.proto.PaymentBackground.toObject(message.background, options); + if (options.oneofs) + object._background = "background"; + } return object; }; @@ -59880,6 +96149,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for SendPaymentMessage + * @function getTypeUrl + * @memberof proto.Message.SendPaymentMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SendPaymentMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.SendPaymentMessage"; + }; + return SendPaymentMessage; })(); @@ -59910,19 +96194,34 @@ $root.proto = (function() { /** * SenderKeyDistributionMessage groupId. - * @member {string} groupId + * @member {string|null|undefined} groupId * @memberof proto.Message.SenderKeyDistributionMessage * @instance */ - SenderKeyDistributionMessage.prototype.groupId = ""; + SenderKeyDistributionMessage.prototype.groupId = null; /** * SenderKeyDistributionMessage axolotlSenderKeyDistributionMessage. - * @member {Uint8Array} axolotlSenderKeyDistributionMessage + * @member {Uint8Array|null|undefined} axolotlSenderKeyDistributionMessage * @memberof proto.Message.SenderKeyDistributionMessage * @instance */ - SenderKeyDistributionMessage.prototype.axolotlSenderKeyDistributionMessage = $util.newBuffer([]); + SenderKeyDistributionMessage.prototype.axolotlSenderKeyDistributionMessage = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SenderKeyDistributionMessage.prototype, "_groupId", { + get: $util.oneOfGetter($oneOfFields = ["groupId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SenderKeyDistributionMessage.prototype, "_axolotlSenderKeyDistributionMessage", { + get: $util.oneOfGetter($oneOfFields = ["axolotlSenderKeyDistributionMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new SenderKeyDistributionMessage instance using the specified properties. @@ -59986,12 +96285,14 @@ $root.proto = (function() { 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; + case 1: { + message.groupId = reader.string(); + break; + } + case 2: { + message.axolotlSenderKeyDistributionMessage = reader.bytes(); + break; + } default: reader.skipType(tag & 7); break; @@ -60027,12 +96328,17 @@ $root.proto = (function() { SenderKeyDistributionMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.groupId != null && message.hasOwnProperty("groupId")) + var properties = {}; + if (message.groupId != null && message.hasOwnProperty("groupId")) { + properties._groupId = 1; if (!$util.isString(message.groupId)) return "groupId: string expected"; - if (message.axolotlSenderKeyDistributionMessage != null && message.hasOwnProperty("axolotlSenderKeyDistributionMessage")) + } + if (message.axolotlSenderKeyDistributionMessage != null && message.hasOwnProperty("axolotlSenderKeyDistributionMessage")) { + properties._axolotlSenderKeyDistributionMessage = 1; if (!(message.axolotlSenderKeyDistributionMessage && typeof message.axolotlSenderKeyDistributionMessage.length === "number" || $util.isString(message.axolotlSenderKeyDistributionMessage))) return "axolotlSenderKeyDistributionMessage: buffer expected"; + } return null; }; @@ -60053,7 +96359,7 @@ $root.proto = (function() { 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) + else if (object.axolotlSenderKeyDistributionMessage.length >= 0) message.axolotlSenderKeyDistributionMessage = object.axolotlSenderKeyDistributionMessage; return message; }; @@ -60071,20 +96377,16 @@ $root.proto = (function() { 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")) + if (message.groupId != null && message.hasOwnProperty("groupId")) { object.groupId = message.groupId; - if (message.axolotlSenderKeyDistributionMessage != null && message.hasOwnProperty("axolotlSenderKeyDistributionMessage")) + if (options.oneofs) + object._groupId = "groupId"; + } + if (message.axolotlSenderKeyDistributionMessage != null && message.hasOwnProperty("axolotlSenderKeyDistributionMessage")) { object.axolotlSenderKeyDistributionMessage = options.bytes === String ? $util.base64.encode(message.axolotlSenderKeyDistributionMessage, 0, message.axolotlSenderKeyDistributionMessage.length) : options.bytes === Array ? Array.prototype.slice.call(message.axolotlSenderKeyDistributionMessage) : message.axolotlSenderKeyDistributionMessage; + if (options.oneofs) + object._axolotlSenderKeyDistributionMessage = "axolotlSenderKeyDistributionMessage"; + } return object; }; @@ -60099,9 +96401,358 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for SenderKeyDistributionMessage + * @function getTypeUrl + * @memberof proto.Message.SenderKeyDistributionMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SenderKeyDistributionMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.SenderKeyDistributionMessage"; + }; + return SenderKeyDistributionMessage; })(); + Message.StatusNotificationMessage = (function() { + + /** + * Properties of a StatusNotificationMessage. + * @memberof proto.Message + * @interface IStatusNotificationMessage + * @property {proto.IMessageKey|null} [responseMessageKey] StatusNotificationMessage responseMessageKey + * @property {proto.IMessageKey|null} [originalMessageKey] StatusNotificationMessage originalMessageKey + * @property {proto.Message.StatusNotificationMessage.StatusNotificationType|null} [type] StatusNotificationMessage type + */ + + /** + * Constructs a new StatusNotificationMessage. + * @memberof proto.Message + * @classdesc Represents a StatusNotificationMessage. + * @implements IStatusNotificationMessage + * @constructor + * @param {proto.Message.IStatusNotificationMessage=} [properties] Properties to set + */ + function StatusNotificationMessage(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StatusNotificationMessage responseMessageKey. + * @member {proto.IMessageKey|null|undefined} responseMessageKey + * @memberof proto.Message.StatusNotificationMessage + * @instance + */ + StatusNotificationMessage.prototype.responseMessageKey = null; + + /** + * StatusNotificationMessage originalMessageKey. + * @member {proto.IMessageKey|null|undefined} originalMessageKey + * @memberof proto.Message.StatusNotificationMessage + * @instance + */ + StatusNotificationMessage.prototype.originalMessageKey = null; + + /** + * StatusNotificationMessage type. + * @member {proto.Message.StatusNotificationMessage.StatusNotificationType|null|undefined} type + * @memberof proto.Message.StatusNotificationMessage + * @instance + */ + StatusNotificationMessage.prototype.type = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StatusNotificationMessage.prototype, "_responseMessageKey", { + get: $util.oneOfGetter($oneOfFields = ["responseMessageKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StatusNotificationMessage.prototype, "_originalMessageKey", { + get: $util.oneOfGetter($oneOfFields = ["originalMessageKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StatusNotificationMessage.prototype, "_type", { + get: $util.oneOfGetter($oneOfFields = ["type"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new StatusNotificationMessage instance using the specified properties. + * @function create + * @memberof proto.Message.StatusNotificationMessage + * @static + * @param {proto.Message.IStatusNotificationMessage=} [properties] Properties to set + * @returns {proto.Message.StatusNotificationMessage} StatusNotificationMessage instance + */ + StatusNotificationMessage.create = function create(properties) { + return new StatusNotificationMessage(properties); + }; + + /** + * Encodes the specified StatusNotificationMessage message. Does not implicitly {@link proto.Message.StatusNotificationMessage.verify|verify} messages. + * @function encode + * @memberof proto.Message.StatusNotificationMessage + * @static + * @param {proto.Message.IStatusNotificationMessage} message StatusNotificationMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StatusNotificationMessage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.responseMessageKey != null && Object.hasOwnProperty.call(message, "responseMessageKey")) + $root.proto.MessageKey.encode(message.responseMessageKey, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.originalMessageKey != null && Object.hasOwnProperty.call(message, "originalMessageKey")) + $root.proto.MessageKey.encode(message.originalMessageKey, 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); + return writer; + }; + + /** + * Encodes the specified StatusNotificationMessage message, length delimited. Does not implicitly {@link proto.Message.StatusNotificationMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.StatusNotificationMessage + * @static + * @param {proto.Message.IStatusNotificationMessage} message StatusNotificationMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StatusNotificationMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StatusNotificationMessage message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.StatusNotificationMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.StatusNotificationMessage} StatusNotificationMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StatusNotificationMessage.decode = function 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.StatusNotificationMessage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.responseMessageKey = $root.proto.MessageKey.decode(reader, reader.uint32()); + break; + } + case 2: { + message.originalMessageKey = $root.proto.MessageKey.decode(reader, reader.uint32()); + break; + } + case 3: { + message.type = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StatusNotificationMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.StatusNotificationMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.StatusNotificationMessage} StatusNotificationMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StatusNotificationMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StatusNotificationMessage message. + * @function verify + * @memberof proto.Message.StatusNotificationMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StatusNotificationMessage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.responseMessageKey != null && message.hasOwnProperty("responseMessageKey")) { + properties._responseMessageKey = 1; + { + var error = $root.proto.MessageKey.verify(message.responseMessageKey); + if (error) + return "responseMessageKey." + error; + } + } + if (message.originalMessageKey != null && message.hasOwnProperty("originalMessageKey")) { + properties._originalMessageKey = 1; + { + var error = $root.proto.MessageKey.verify(message.originalMessageKey); + if (error) + return "originalMessageKey." + error; + } + } + if (message.type != null && message.hasOwnProperty("type")) { + properties._type = 1; + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + return null; + }; + + /** + * Creates a StatusNotificationMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.StatusNotificationMessage + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.StatusNotificationMessage} StatusNotificationMessage + */ + StatusNotificationMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.StatusNotificationMessage) + return object; + var message = new $root.proto.Message.StatusNotificationMessage(); + if (object.responseMessageKey != null) { + if (typeof object.responseMessageKey !== "object") + throw TypeError(".proto.Message.StatusNotificationMessage.responseMessageKey: object expected"); + message.responseMessageKey = $root.proto.MessageKey.fromObject(object.responseMessageKey); + } + if (object.originalMessageKey != null) { + if (typeof object.originalMessageKey !== "object") + throw TypeError(".proto.Message.StatusNotificationMessage.originalMessageKey: object expected"); + message.originalMessageKey = $root.proto.MessageKey.fromObject(object.originalMessageKey); + } + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "UNKNOWN": + case 0: + message.type = 0; + break; + case "STATUS_ADD_YOURS": + case 1: + message.type = 1; + break; + case "STATUS_RESHARE": + case 2: + message.type = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a StatusNotificationMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.StatusNotificationMessage + * @static + * @param {proto.Message.StatusNotificationMessage} message StatusNotificationMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StatusNotificationMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.responseMessageKey != null && message.hasOwnProperty("responseMessageKey")) { + object.responseMessageKey = $root.proto.MessageKey.toObject(message.responseMessageKey, options); + if (options.oneofs) + object._responseMessageKey = "responseMessageKey"; + } + if (message.originalMessageKey != null && message.hasOwnProperty("originalMessageKey")) { + object.originalMessageKey = $root.proto.MessageKey.toObject(message.originalMessageKey, options); + if (options.oneofs) + object._originalMessageKey = "originalMessageKey"; + } + if (message.type != null && message.hasOwnProperty("type")) { + object.type = options.enums === String ? $root.proto.Message.StatusNotificationMessage.StatusNotificationType[message.type] === undefined ? message.type : $root.proto.Message.StatusNotificationMessage.StatusNotificationType[message.type] : message.type; + if (options.oneofs) + object._type = "type"; + } + return object; + }; + + /** + * Converts this StatusNotificationMessage to JSON. + * @function toJSON + * @memberof proto.Message.StatusNotificationMessage + * @instance + * @returns {Object.} JSON object + */ + StatusNotificationMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StatusNotificationMessage + * @function getTypeUrl + * @memberof proto.Message.StatusNotificationMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StatusNotificationMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.StatusNotificationMessage"; + }; + + /** + * StatusNotificationType enum. + * @name proto.Message.StatusNotificationMessage.StatusNotificationType + * @enum {number} + * @property {number} UNKNOWN=0 UNKNOWN value + * @property {number} STATUS_ADD_YOURS=1 STATUS_ADD_YOURS value + * @property {number} STATUS_RESHARE=2 STATUS_RESHARE value + */ + StatusNotificationMessage.StatusNotificationType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNKNOWN"] = 0; + values[valuesById[1] = "STATUS_ADD_YOURS"] = 1; + values[valuesById[2] = "STATUS_RESHARE"] = 2; + return values; + })(); + + return StatusNotificationMessage; + })(); + Message.StickerMessage = (function() { /** @@ -60127,6 +96778,7 @@ $root.proto = (function() { * @property {boolean|null} [isAvatar] StickerMessage isAvatar * @property {boolean|null} [isAiSticker] StickerMessage isAiSticker * @property {boolean|null} [isLottie] StickerMessage isLottie + * @property {string|null} [accessibilityLabel] StickerMessage accessibilityLabel */ /** @@ -60146,115 +96798,115 @@ $root.proto = (function() { /** * StickerMessage url. - * @member {string} url + * @member {string|null|undefined} url * @memberof proto.Message.StickerMessage * @instance */ - StickerMessage.prototype.url = ""; + StickerMessage.prototype.url = null; /** * StickerMessage fileSha256. - * @member {Uint8Array} fileSha256 + * @member {Uint8Array|null|undefined} fileSha256 * @memberof proto.Message.StickerMessage * @instance */ - StickerMessage.prototype.fileSha256 = $util.newBuffer([]); + StickerMessage.prototype.fileSha256 = null; /** * StickerMessage fileEncSha256. - * @member {Uint8Array} fileEncSha256 + * @member {Uint8Array|null|undefined} fileEncSha256 * @memberof proto.Message.StickerMessage * @instance */ - StickerMessage.prototype.fileEncSha256 = $util.newBuffer([]); + StickerMessage.prototype.fileEncSha256 = null; /** * StickerMessage mediaKey. - * @member {Uint8Array} mediaKey + * @member {Uint8Array|null|undefined} mediaKey * @memberof proto.Message.StickerMessage * @instance */ - StickerMessage.prototype.mediaKey = $util.newBuffer([]); + StickerMessage.prototype.mediaKey = null; /** * StickerMessage mimetype. - * @member {string} mimetype + * @member {string|null|undefined} mimetype * @memberof proto.Message.StickerMessage * @instance */ - StickerMessage.prototype.mimetype = ""; + StickerMessage.prototype.mimetype = null; /** * StickerMessage height. - * @member {number} height + * @member {number|null|undefined} height * @memberof proto.Message.StickerMessage * @instance */ - StickerMessage.prototype.height = 0; + StickerMessage.prototype.height = null; /** * StickerMessage width. - * @member {number} width + * @member {number|null|undefined} width * @memberof proto.Message.StickerMessage * @instance */ - StickerMessage.prototype.width = 0; + StickerMessage.prototype.width = null; /** * StickerMessage directPath. - * @member {string} directPath + * @member {string|null|undefined} directPath * @memberof proto.Message.StickerMessage * @instance */ - StickerMessage.prototype.directPath = ""; + StickerMessage.prototype.directPath = null; /** * StickerMessage fileLength. - * @member {number|Long} fileLength + * @member {number|Long|null|undefined} fileLength * @memberof proto.Message.StickerMessage * @instance */ - StickerMessage.prototype.fileLength = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + StickerMessage.prototype.fileLength = null; /** * StickerMessage mediaKeyTimestamp. - * @member {number|Long} mediaKeyTimestamp + * @member {number|Long|null|undefined} mediaKeyTimestamp * @memberof proto.Message.StickerMessage * @instance */ - StickerMessage.prototype.mediaKeyTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + StickerMessage.prototype.mediaKeyTimestamp = null; /** * StickerMessage firstFrameLength. - * @member {number} firstFrameLength + * @member {number|null|undefined} firstFrameLength * @memberof proto.Message.StickerMessage * @instance */ - StickerMessage.prototype.firstFrameLength = 0; + StickerMessage.prototype.firstFrameLength = null; /** * StickerMessage firstFrameSidecar. - * @member {Uint8Array} firstFrameSidecar + * @member {Uint8Array|null|undefined} firstFrameSidecar * @memberof proto.Message.StickerMessage * @instance */ - StickerMessage.prototype.firstFrameSidecar = $util.newBuffer([]); + StickerMessage.prototype.firstFrameSidecar = null; /** * StickerMessage isAnimated. - * @member {boolean} isAnimated + * @member {boolean|null|undefined} isAnimated * @memberof proto.Message.StickerMessage * @instance */ - StickerMessage.prototype.isAnimated = false; + StickerMessage.prototype.isAnimated = null; /** * StickerMessage pngThumbnail. - * @member {Uint8Array} pngThumbnail + * @member {Uint8Array|null|undefined} pngThumbnail * @memberof proto.Message.StickerMessage * @instance */ - StickerMessage.prototype.pngThumbnail = $util.newBuffer([]); + StickerMessage.prototype.pngThumbnail = null; /** * StickerMessage contextInfo. @@ -60266,35 +96918,166 @@ $root.proto = (function() { /** * StickerMessage stickerSentTs. - * @member {number|Long} stickerSentTs + * @member {number|Long|null|undefined} stickerSentTs * @memberof proto.Message.StickerMessage * @instance */ - StickerMessage.prototype.stickerSentTs = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + StickerMessage.prototype.stickerSentTs = null; /** * StickerMessage isAvatar. - * @member {boolean} isAvatar + * @member {boolean|null|undefined} isAvatar * @memberof proto.Message.StickerMessage * @instance */ - StickerMessage.prototype.isAvatar = false; + StickerMessage.prototype.isAvatar = null; /** * StickerMessage isAiSticker. - * @member {boolean} isAiSticker + * @member {boolean|null|undefined} isAiSticker * @memberof proto.Message.StickerMessage * @instance */ - StickerMessage.prototype.isAiSticker = false; + StickerMessage.prototype.isAiSticker = null; /** * StickerMessage isLottie. - * @member {boolean} isLottie + * @member {boolean|null|undefined} isLottie * @memberof proto.Message.StickerMessage * @instance */ - StickerMessage.prototype.isLottie = false; + StickerMessage.prototype.isLottie = null; + + /** + * StickerMessage accessibilityLabel. + * @member {string|null|undefined} accessibilityLabel + * @memberof proto.Message.StickerMessage + * @instance + */ + StickerMessage.prototype.accessibilityLabel = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StickerMessage.prototype, "_url", { + get: $util.oneOfGetter($oneOfFields = ["url"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StickerMessage.prototype, "_fileSha256", { + get: $util.oneOfGetter($oneOfFields = ["fileSha256"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StickerMessage.prototype, "_fileEncSha256", { + get: $util.oneOfGetter($oneOfFields = ["fileEncSha256"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StickerMessage.prototype, "_mediaKey", { + get: $util.oneOfGetter($oneOfFields = ["mediaKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StickerMessage.prototype, "_mimetype", { + get: $util.oneOfGetter($oneOfFields = ["mimetype"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StickerMessage.prototype, "_height", { + get: $util.oneOfGetter($oneOfFields = ["height"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StickerMessage.prototype, "_width", { + get: $util.oneOfGetter($oneOfFields = ["width"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StickerMessage.prototype, "_directPath", { + get: $util.oneOfGetter($oneOfFields = ["directPath"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StickerMessage.prototype, "_fileLength", { + get: $util.oneOfGetter($oneOfFields = ["fileLength"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StickerMessage.prototype, "_mediaKeyTimestamp", { + get: $util.oneOfGetter($oneOfFields = ["mediaKeyTimestamp"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StickerMessage.prototype, "_firstFrameLength", { + get: $util.oneOfGetter($oneOfFields = ["firstFrameLength"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StickerMessage.prototype, "_firstFrameSidecar", { + get: $util.oneOfGetter($oneOfFields = ["firstFrameSidecar"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StickerMessage.prototype, "_isAnimated", { + get: $util.oneOfGetter($oneOfFields = ["isAnimated"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StickerMessage.prototype, "_pngThumbnail", { + get: $util.oneOfGetter($oneOfFields = ["pngThumbnail"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StickerMessage.prototype, "_contextInfo", { + get: $util.oneOfGetter($oneOfFields = ["contextInfo"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StickerMessage.prototype, "_stickerSentTs", { + get: $util.oneOfGetter($oneOfFields = ["stickerSentTs"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StickerMessage.prototype, "_isAvatar", { + get: $util.oneOfGetter($oneOfFields = ["isAvatar"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StickerMessage.prototype, "_isAiSticker", { + get: $util.oneOfGetter($oneOfFields = ["isAiSticker"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StickerMessage.prototype, "_isLottie", { + get: $util.oneOfGetter($oneOfFields = ["isLottie"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StickerMessage.prototype, "_accessibilityLabel", { + get: $util.oneOfGetter($oneOfFields = ["accessibilityLabel"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new StickerMessage instance using the specified properties. @@ -60358,6 +97141,8 @@ $root.proto = (function() { writer.uint32(/* id 20, wireType 0 =*/160).bool(message.isAiSticker); if (message.isLottie != null && Object.hasOwnProperty.call(message, "isLottie")) writer.uint32(/* id 21, wireType 0 =*/168).bool(message.isLottie); + if (message.accessibilityLabel != null && Object.hasOwnProperty.call(message, "accessibilityLabel")) + writer.uint32(/* id 22, wireType 2 =*/178).string(message.accessibilityLabel); return writer; }; @@ -60392,63 +97177,86 @@ $root.proto = (function() { 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; - case 18: - message.stickerSentTs = reader.int64(); - break; - case 19: - message.isAvatar = reader.bool(); - break; - case 20: - message.isAiSticker = reader.bool(); - break; - case 21: - message.isLottie = reader.bool(); - break; + 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; + } + case 18: { + message.stickerSentTs = reader.int64(); + break; + } + case 19: { + message.isAvatar = reader.bool(); + break; + } + case 20: { + message.isAiSticker = reader.bool(); + break; + } + case 21: { + message.isLottie = reader.bool(); + break; + } + case 22: { + message.accessibilityLabel = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -60484,65 +97292,110 @@ $root.proto = (function() { StickerMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.url != null && message.hasOwnProperty("url")) + var properties = {}; + if (message.url != null && message.hasOwnProperty("url")) { + properties._url = 1; if (!$util.isString(message.url)) return "url: string expected"; - if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) + } + if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) { + properties._fileSha256 = 1; 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 != null && message.hasOwnProperty("fileEncSha256")) { + properties._fileEncSha256 = 1; 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 != null && message.hasOwnProperty("mediaKey")) { + properties._mediaKey = 1; if (!(message.mediaKey && typeof message.mediaKey.length === "number" || $util.isString(message.mediaKey))) return "mediaKey: buffer expected"; - if (message.mimetype != null && message.hasOwnProperty("mimetype")) + } + if (message.mimetype != null && message.hasOwnProperty("mimetype")) { + properties._mimetype = 1; if (!$util.isString(message.mimetype)) return "mimetype: string expected"; - if (message.height != null && message.hasOwnProperty("height")) + } + if (message.height != null && message.hasOwnProperty("height")) { + properties._height = 1; if (!$util.isInteger(message.height)) return "height: integer expected"; - if (message.width != null && message.hasOwnProperty("width")) + } + if (message.width != null && message.hasOwnProperty("width")) { + properties._width = 1; if (!$util.isInteger(message.width)) return "width: integer expected"; - if (message.directPath != null && message.hasOwnProperty("directPath")) + } + if (message.directPath != null && message.hasOwnProperty("directPath")) { + properties._directPath = 1; if (!$util.isString(message.directPath)) return "directPath: string expected"; - if (message.fileLength != null && message.hasOwnProperty("fileLength")) + } + if (message.fileLength != null && message.hasOwnProperty("fileLength")) { + properties._fileLength = 1; 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 (message.mediaKeyTimestamp != null && message.hasOwnProperty("mediaKeyTimestamp")) { + properties._mediaKeyTimestamp = 1; 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 (message.firstFrameLength != null && message.hasOwnProperty("firstFrameLength")) { + properties._firstFrameLength = 1; if (!$util.isInteger(message.firstFrameLength)) return "firstFrameLength: integer expected"; - if (message.firstFrameSidecar != null && message.hasOwnProperty("firstFrameSidecar")) + } + if (message.firstFrameSidecar != null && message.hasOwnProperty("firstFrameSidecar")) { + properties._firstFrameSidecar = 1; if (!(message.firstFrameSidecar && typeof message.firstFrameSidecar.length === "number" || $util.isString(message.firstFrameSidecar))) return "firstFrameSidecar: buffer expected"; - if (message.isAnimated != null && message.hasOwnProperty("isAnimated")) + } + if (message.isAnimated != null && message.hasOwnProperty("isAnimated")) { + properties._isAnimated = 1; if (typeof message.isAnimated !== "boolean") return "isAnimated: boolean expected"; - if (message.pngThumbnail != null && message.hasOwnProperty("pngThumbnail")) + } + if (message.pngThumbnail != null && message.hasOwnProperty("pngThumbnail")) { + properties._pngThumbnail = 1; 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.stickerSentTs != null && message.hasOwnProperty("stickerSentTs")) + if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) { + properties._contextInfo = 1; + { + var error = $root.proto.ContextInfo.verify(message.contextInfo); + if (error) + return "contextInfo." + error; + } + } + if (message.stickerSentTs != null && message.hasOwnProperty("stickerSentTs")) { + properties._stickerSentTs = 1; if (!$util.isInteger(message.stickerSentTs) && !(message.stickerSentTs && $util.isInteger(message.stickerSentTs.low) && $util.isInteger(message.stickerSentTs.high))) return "stickerSentTs: integer|Long expected"; - if (message.isAvatar != null && message.hasOwnProperty("isAvatar")) + } + if (message.isAvatar != null && message.hasOwnProperty("isAvatar")) { + properties._isAvatar = 1; if (typeof message.isAvatar !== "boolean") return "isAvatar: boolean expected"; - if (message.isAiSticker != null && message.hasOwnProperty("isAiSticker")) + } + if (message.isAiSticker != null && message.hasOwnProperty("isAiSticker")) { + properties._isAiSticker = 1; if (typeof message.isAiSticker !== "boolean") return "isAiSticker: boolean expected"; - if (message.isLottie != null && message.hasOwnProperty("isLottie")) + } + if (message.isLottie != null && message.hasOwnProperty("isLottie")) { + properties._isLottie = 1; if (typeof message.isLottie !== "boolean") return "isLottie: boolean expected"; + } + if (message.accessibilityLabel != null && message.hasOwnProperty("accessibilityLabel")) { + properties._accessibilityLabel = 1; + if (!$util.isString(message.accessibilityLabel)) + return "accessibilityLabel: string expected"; + } return null; }; @@ -60563,17 +97416,17 @@ $root.proto = (function() { 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) + else if (object.fileSha256.length >= 0) 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) + else if (object.fileEncSha256.length >= 0) 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) + else if (object.mediaKey.length >= 0) message.mediaKey = object.mediaKey; if (object.mimetype != null) message.mimetype = String(object.mimetype); @@ -60606,14 +97459,14 @@ $root.proto = (function() { 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) + else if (object.firstFrameSidecar.length >= 0) 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) + else if (object.pngThumbnail.length >= 0) message.pngThumbnail = object.pngThumbnail; if (object.contextInfo != null) { if (typeof object.contextInfo !== "object") @@ -60635,6 +97488,8 @@ $root.proto = (function() { message.isAiSticker = Boolean(object.isAiSticker); if (object.isLottie != null) message.isLottie = Boolean(object.isLottie); + if (object.accessibilityLabel != null) + message.accessibilityLabel = String(object.accessibilityLabel); return message; }; @@ -60651,116 +97506,115 @@ $root.proto = (function() { 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 ($util.Long) { - var long = new $util.Long(0, 0, false); - object.stickerSentTs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.stickerSentTs = options.longs === String ? "0" : 0; - object.isAvatar = false; - object.isAiSticker = false; - object.isLottie = false; - } - if (message.url != null && message.hasOwnProperty("url")) + if (message.url != null && message.hasOwnProperty("url")) { object.url = message.url; - if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) + if (options.oneofs) + object._url = "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")) + if (options.oneofs) + object._fileSha256 = "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")) + if (options.oneofs) + object._fileEncSha256 = "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")) + if (options.oneofs) + object._mediaKey = "mediaKey"; + } + if (message.mimetype != null && message.hasOwnProperty("mimetype")) { object.mimetype = message.mimetype; - if (message.height != null && message.hasOwnProperty("height")) + if (options.oneofs) + object._mimetype = "mimetype"; + } + if (message.height != null && message.hasOwnProperty("height")) { object.height = message.height; - if (message.width != null && message.hasOwnProperty("width")) + if (options.oneofs) + object._height = "height"; + } + if (message.width != null && message.hasOwnProperty("width")) { object.width = message.width; - if (message.directPath != null && message.hasOwnProperty("directPath")) + if (options.oneofs) + object._width = "width"; + } + if (message.directPath != null && message.hasOwnProperty("directPath")) { object.directPath = message.directPath; - if (message.fileLength != null && message.hasOwnProperty("fileLength")) + if (options.oneofs) + object._directPath = "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 (options.oneofs) + object._fileLength = "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")) + if (options.oneofs) + object._mediaKeyTimestamp = "mediaKeyTimestamp"; + } + if (message.firstFrameLength != null && message.hasOwnProperty("firstFrameLength")) { object.firstFrameLength = message.firstFrameLength; - if (message.firstFrameSidecar != null && message.hasOwnProperty("firstFrameSidecar")) + if (options.oneofs) + object._firstFrameLength = "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")) + if (options.oneofs) + object._firstFrameSidecar = "firstFrameSidecar"; + } + if (message.isAnimated != null && message.hasOwnProperty("isAnimated")) { object.isAnimated = message.isAnimated; - if (message.pngThumbnail != null && message.hasOwnProperty("pngThumbnail")) + if (options.oneofs) + object._isAnimated = "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")) + if (options.oneofs) + object._pngThumbnail = "pngThumbnail"; + } + if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) { object.contextInfo = $root.proto.ContextInfo.toObject(message.contextInfo, options); - if (message.stickerSentTs != null && message.hasOwnProperty("stickerSentTs")) + if (options.oneofs) + object._contextInfo = "contextInfo"; + } + if (message.stickerSentTs != null && message.hasOwnProperty("stickerSentTs")) { if (typeof message.stickerSentTs === "number") object.stickerSentTs = options.longs === String ? String(message.stickerSentTs) : message.stickerSentTs; else object.stickerSentTs = options.longs === String ? $util.Long.prototype.toString.call(message.stickerSentTs) : options.longs === Number ? new $util.LongBits(message.stickerSentTs.low >>> 0, message.stickerSentTs.high >>> 0).toNumber() : message.stickerSentTs; - if (message.isAvatar != null && message.hasOwnProperty("isAvatar")) + if (options.oneofs) + object._stickerSentTs = "stickerSentTs"; + } + if (message.isAvatar != null && message.hasOwnProperty("isAvatar")) { object.isAvatar = message.isAvatar; - if (message.isAiSticker != null && message.hasOwnProperty("isAiSticker")) + if (options.oneofs) + object._isAvatar = "isAvatar"; + } + if (message.isAiSticker != null && message.hasOwnProperty("isAiSticker")) { object.isAiSticker = message.isAiSticker; - if (message.isLottie != null && message.hasOwnProperty("isLottie")) + if (options.oneofs) + object._isAiSticker = "isAiSticker"; + } + if (message.isLottie != null && message.hasOwnProperty("isLottie")) { object.isLottie = message.isLottie; + if (options.oneofs) + object._isLottie = "isLottie"; + } + if (message.accessibilityLabel != null && message.hasOwnProperty("accessibilityLabel")) { + object.accessibilityLabel = message.accessibilityLabel; + if (options.oneofs) + object._accessibilityLabel = "accessibilityLabel"; + } return object; }; @@ -60775,9 +97629,1424 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for StickerMessage + * @function getTypeUrl + * @memberof proto.Message.StickerMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StickerMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.StickerMessage"; + }; + return StickerMessage; })(); + Message.StickerPackMessage = (function() { + + /** + * Properties of a StickerPackMessage. + * @memberof proto.Message + * @interface IStickerPackMessage + * @property {string|null} [stickerPackId] StickerPackMessage stickerPackId + * @property {string|null} [name] StickerPackMessage name + * @property {string|null} [publisher] StickerPackMessage publisher + * @property {Array.|null} [stickers] StickerPackMessage stickers + * @property {number|Long|null} [fileLength] StickerPackMessage fileLength + * @property {Uint8Array|null} [fileSha256] StickerPackMessage fileSha256 + * @property {Uint8Array|null} [fileEncSha256] StickerPackMessage fileEncSha256 + * @property {Uint8Array|null} [mediaKey] StickerPackMessage mediaKey + * @property {string|null} [directPath] StickerPackMessage directPath + * @property {string|null} [caption] StickerPackMessage caption + * @property {proto.IContextInfo|null} [contextInfo] StickerPackMessage contextInfo + * @property {string|null} [packDescription] StickerPackMessage packDescription + * @property {number|Long|null} [mediaKeyTimestamp] StickerPackMessage mediaKeyTimestamp + * @property {string|null} [trayIconFileName] StickerPackMessage trayIconFileName + * @property {string|null} [thumbnailDirectPath] StickerPackMessage thumbnailDirectPath + * @property {Uint8Array|null} [thumbnailSha256] StickerPackMessage thumbnailSha256 + * @property {Uint8Array|null} [thumbnailEncSha256] StickerPackMessage thumbnailEncSha256 + * @property {number|null} [thumbnailHeight] StickerPackMessage thumbnailHeight + * @property {number|null} [thumbnailWidth] StickerPackMessage thumbnailWidth + * @property {string|null} [imageDataHash] StickerPackMessage imageDataHash + * @property {number|Long|null} [stickerPackSize] StickerPackMessage stickerPackSize + * @property {proto.Message.StickerPackMessage.StickerPackOrigin|null} [stickerPackOrigin] StickerPackMessage stickerPackOrigin + */ + + /** + * Constructs a new StickerPackMessage. + * @memberof proto.Message + * @classdesc Represents a StickerPackMessage. + * @implements IStickerPackMessage + * @constructor + * @param {proto.Message.IStickerPackMessage=} [properties] Properties to set + */ + function StickerPackMessage(properties) { + this.stickers = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StickerPackMessage stickerPackId. + * @member {string|null|undefined} stickerPackId + * @memberof proto.Message.StickerPackMessage + * @instance + */ + StickerPackMessage.prototype.stickerPackId = null; + + /** + * StickerPackMessage name. + * @member {string|null|undefined} name + * @memberof proto.Message.StickerPackMessage + * @instance + */ + StickerPackMessage.prototype.name = null; + + /** + * StickerPackMessage publisher. + * @member {string|null|undefined} publisher + * @memberof proto.Message.StickerPackMessage + * @instance + */ + StickerPackMessage.prototype.publisher = null; + + /** + * StickerPackMessage stickers. + * @member {Array.} stickers + * @memberof proto.Message.StickerPackMessage + * @instance + */ + StickerPackMessage.prototype.stickers = $util.emptyArray; + + /** + * StickerPackMessage fileLength. + * @member {number|Long|null|undefined} fileLength + * @memberof proto.Message.StickerPackMessage + * @instance + */ + StickerPackMessage.prototype.fileLength = null; + + /** + * StickerPackMessage fileSha256. + * @member {Uint8Array|null|undefined} fileSha256 + * @memberof proto.Message.StickerPackMessage + * @instance + */ + StickerPackMessage.prototype.fileSha256 = null; + + /** + * StickerPackMessage fileEncSha256. + * @member {Uint8Array|null|undefined} fileEncSha256 + * @memberof proto.Message.StickerPackMessage + * @instance + */ + StickerPackMessage.prototype.fileEncSha256 = null; + + /** + * StickerPackMessage mediaKey. + * @member {Uint8Array|null|undefined} mediaKey + * @memberof proto.Message.StickerPackMessage + * @instance + */ + StickerPackMessage.prototype.mediaKey = null; + + /** + * StickerPackMessage directPath. + * @member {string|null|undefined} directPath + * @memberof proto.Message.StickerPackMessage + * @instance + */ + StickerPackMessage.prototype.directPath = null; + + /** + * StickerPackMessage caption. + * @member {string|null|undefined} caption + * @memberof proto.Message.StickerPackMessage + * @instance + */ + StickerPackMessage.prototype.caption = null; + + /** + * StickerPackMessage contextInfo. + * @member {proto.IContextInfo|null|undefined} contextInfo + * @memberof proto.Message.StickerPackMessage + * @instance + */ + StickerPackMessage.prototype.contextInfo = null; + + /** + * StickerPackMessage packDescription. + * @member {string|null|undefined} packDescription + * @memberof proto.Message.StickerPackMessage + * @instance + */ + StickerPackMessage.prototype.packDescription = null; + + /** + * StickerPackMessage mediaKeyTimestamp. + * @member {number|Long|null|undefined} mediaKeyTimestamp + * @memberof proto.Message.StickerPackMessage + * @instance + */ + StickerPackMessage.prototype.mediaKeyTimestamp = null; + + /** + * StickerPackMessage trayIconFileName. + * @member {string|null|undefined} trayIconFileName + * @memberof proto.Message.StickerPackMessage + * @instance + */ + StickerPackMessage.prototype.trayIconFileName = null; + + /** + * StickerPackMessage thumbnailDirectPath. + * @member {string|null|undefined} thumbnailDirectPath + * @memberof proto.Message.StickerPackMessage + * @instance + */ + StickerPackMessage.prototype.thumbnailDirectPath = null; + + /** + * StickerPackMessage thumbnailSha256. + * @member {Uint8Array|null|undefined} thumbnailSha256 + * @memberof proto.Message.StickerPackMessage + * @instance + */ + StickerPackMessage.prototype.thumbnailSha256 = null; + + /** + * StickerPackMessage thumbnailEncSha256. + * @member {Uint8Array|null|undefined} thumbnailEncSha256 + * @memberof proto.Message.StickerPackMessage + * @instance + */ + StickerPackMessage.prototype.thumbnailEncSha256 = null; + + /** + * StickerPackMessage thumbnailHeight. + * @member {number|null|undefined} thumbnailHeight + * @memberof proto.Message.StickerPackMessage + * @instance + */ + StickerPackMessage.prototype.thumbnailHeight = null; + + /** + * StickerPackMessage thumbnailWidth. + * @member {number|null|undefined} thumbnailWidth + * @memberof proto.Message.StickerPackMessage + * @instance + */ + StickerPackMessage.prototype.thumbnailWidth = null; + + /** + * StickerPackMessage imageDataHash. + * @member {string|null|undefined} imageDataHash + * @memberof proto.Message.StickerPackMessage + * @instance + */ + StickerPackMessage.prototype.imageDataHash = null; + + /** + * StickerPackMessage stickerPackSize. + * @member {number|Long|null|undefined} stickerPackSize + * @memberof proto.Message.StickerPackMessage + * @instance + */ + StickerPackMessage.prototype.stickerPackSize = null; + + /** + * StickerPackMessage stickerPackOrigin. + * @member {proto.Message.StickerPackMessage.StickerPackOrigin|null|undefined} stickerPackOrigin + * @memberof proto.Message.StickerPackMessage + * @instance + */ + StickerPackMessage.prototype.stickerPackOrigin = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StickerPackMessage.prototype, "_stickerPackId", { + get: $util.oneOfGetter($oneOfFields = ["stickerPackId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StickerPackMessage.prototype, "_name", { + get: $util.oneOfGetter($oneOfFields = ["name"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StickerPackMessage.prototype, "_publisher", { + get: $util.oneOfGetter($oneOfFields = ["publisher"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StickerPackMessage.prototype, "_fileLength", { + get: $util.oneOfGetter($oneOfFields = ["fileLength"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StickerPackMessage.prototype, "_fileSha256", { + get: $util.oneOfGetter($oneOfFields = ["fileSha256"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StickerPackMessage.prototype, "_fileEncSha256", { + get: $util.oneOfGetter($oneOfFields = ["fileEncSha256"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StickerPackMessage.prototype, "_mediaKey", { + get: $util.oneOfGetter($oneOfFields = ["mediaKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StickerPackMessage.prototype, "_directPath", { + get: $util.oneOfGetter($oneOfFields = ["directPath"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StickerPackMessage.prototype, "_caption", { + get: $util.oneOfGetter($oneOfFields = ["caption"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StickerPackMessage.prototype, "_contextInfo", { + get: $util.oneOfGetter($oneOfFields = ["contextInfo"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StickerPackMessage.prototype, "_packDescription", { + get: $util.oneOfGetter($oneOfFields = ["packDescription"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StickerPackMessage.prototype, "_mediaKeyTimestamp", { + get: $util.oneOfGetter($oneOfFields = ["mediaKeyTimestamp"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StickerPackMessage.prototype, "_trayIconFileName", { + get: $util.oneOfGetter($oneOfFields = ["trayIconFileName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StickerPackMessage.prototype, "_thumbnailDirectPath", { + get: $util.oneOfGetter($oneOfFields = ["thumbnailDirectPath"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StickerPackMessage.prototype, "_thumbnailSha256", { + get: $util.oneOfGetter($oneOfFields = ["thumbnailSha256"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StickerPackMessage.prototype, "_thumbnailEncSha256", { + get: $util.oneOfGetter($oneOfFields = ["thumbnailEncSha256"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StickerPackMessage.prototype, "_thumbnailHeight", { + get: $util.oneOfGetter($oneOfFields = ["thumbnailHeight"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StickerPackMessage.prototype, "_thumbnailWidth", { + get: $util.oneOfGetter($oneOfFields = ["thumbnailWidth"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StickerPackMessage.prototype, "_imageDataHash", { + get: $util.oneOfGetter($oneOfFields = ["imageDataHash"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StickerPackMessage.prototype, "_stickerPackSize", { + get: $util.oneOfGetter($oneOfFields = ["stickerPackSize"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StickerPackMessage.prototype, "_stickerPackOrigin", { + get: $util.oneOfGetter($oneOfFields = ["stickerPackOrigin"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new StickerPackMessage instance using the specified properties. + * @function create + * @memberof proto.Message.StickerPackMessage + * @static + * @param {proto.Message.IStickerPackMessage=} [properties] Properties to set + * @returns {proto.Message.StickerPackMessage} StickerPackMessage instance + */ + StickerPackMessage.create = function create(properties) { + return new StickerPackMessage(properties); + }; + + /** + * Encodes the specified StickerPackMessage message. Does not implicitly {@link proto.Message.StickerPackMessage.verify|verify} messages. + * @function encode + * @memberof proto.Message.StickerPackMessage + * @static + * @param {proto.Message.IStickerPackMessage} message StickerPackMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StickerPackMessage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.stickerPackId != null && Object.hasOwnProperty.call(message, "stickerPackId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.stickerPackId); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); + if (message.publisher != null && Object.hasOwnProperty.call(message, "publisher")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.publisher); + if (message.stickers != null && message.stickers.length) + for (var i = 0; i < message.stickers.length; ++i) + $root.proto.Message.StickerPackMessage.Sticker.encode(message.stickers[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.fileLength != null && Object.hasOwnProperty.call(message, "fileLength")) + writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.fileLength); + if (message.fileSha256 != null && Object.hasOwnProperty.call(message, "fileSha256")) + writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.fileSha256); + if (message.fileEncSha256 != null && Object.hasOwnProperty.call(message, "fileEncSha256")) + writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.fileEncSha256); + if (message.mediaKey != null && Object.hasOwnProperty.call(message, "mediaKey")) + writer.uint32(/* id 8, wireType 2 =*/66).bytes(message.mediaKey); + if (message.directPath != null && Object.hasOwnProperty.call(message, "directPath")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.directPath); + if (message.caption != null && Object.hasOwnProperty.call(message, "caption")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.caption); + if (message.contextInfo != null && Object.hasOwnProperty.call(message, "contextInfo")) + $root.proto.ContextInfo.encode(message.contextInfo, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.packDescription != null && Object.hasOwnProperty.call(message, "packDescription")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.packDescription); + if (message.mediaKeyTimestamp != null && Object.hasOwnProperty.call(message, "mediaKeyTimestamp")) + writer.uint32(/* id 13, wireType 0 =*/104).int64(message.mediaKeyTimestamp); + if (message.trayIconFileName != null && Object.hasOwnProperty.call(message, "trayIconFileName")) + writer.uint32(/* id 14, wireType 2 =*/114).string(message.trayIconFileName); + if (message.thumbnailDirectPath != null && Object.hasOwnProperty.call(message, "thumbnailDirectPath")) + writer.uint32(/* id 15, wireType 2 =*/122).string(message.thumbnailDirectPath); + if (message.thumbnailSha256 != null && Object.hasOwnProperty.call(message, "thumbnailSha256")) + writer.uint32(/* id 16, wireType 2 =*/130).bytes(message.thumbnailSha256); + if (message.thumbnailEncSha256 != null && Object.hasOwnProperty.call(message, "thumbnailEncSha256")) + writer.uint32(/* id 17, wireType 2 =*/138).bytes(message.thumbnailEncSha256); + 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.imageDataHash != null && Object.hasOwnProperty.call(message, "imageDataHash")) + writer.uint32(/* id 20, wireType 2 =*/162).string(message.imageDataHash); + if (message.stickerPackSize != null && Object.hasOwnProperty.call(message, "stickerPackSize")) + writer.uint32(/* id 21, wireType 0 =*/168).uint64(message.stickerPackSize); + if (message.stickerPackOrigin != null && Object.hasOwnProperty.call(message, "stickerPackOrigin")) + writer.uint32(/* id 22, wireType 0 =*/176).int32(message.stickerPackOrigin); + return writer; + }; + + /** + * Encodes the specified StickerPackMessage message, length delimited. Does not implicitly {@link proto.Message.StickerPackMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.StickerPackMessage + * @static + * @param {proto.Message.IStickerPackMessage} message StickerPackMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StickerPackMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StickerPackMessage message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.StickerPackMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.StickerPackMessage} StickerPackMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StickerPackMessage.decode = function 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.StickerPackMessage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.stickerPackId = reader.string(); + break; + } + case 2: { + message.name = reader.string(); + break; + } + case 3: { + message.publisher = reader.string(); + break; + } + case 4: { + if (!(message.stickers && message.stickers.length)) + message.stickers = []; + message.stickers.push($root.proto.Message.StickerPackMessage.Sticker.decode(reader, reader.uint32())); + break; + } + case 5: { + message.fileLength = reader.uint64(); + break; + } + case 6: { + message.fileSha256 = reader.bytes(); + break; + } + case 7: { + message.fileEncSha256 = reader.bytes(); + break; + } + case 8: { + message.mediaKey = reader.bytes(); + break; + } + case 9: { + message.directPath = reader.string(); + break; + } + case 10: { + message.caption = reader.string(); + break; + } + case 11: { + message.contextInfo = $root.proto.ContextInfo.decode(reader, reader.uint32()); + break; + } + case 12: { + message.packDescription = reader.string(); + break; + } + case 13: { + message.mediaKeyTimestamp = reader.int64(); + break; + } + case 14: { + message.trayIconFileName = reader.string(); + break; + } + case 15: { + message.thumbnailDirectPath = reader.string(); + break; + } + case 16: { + message.thumbnailSha256 = reader.bytes(); + break; + } + case 17: { + message.thumbnailEncSha256 = reader.bytes(); + break; + } + case 18: { + message.thumbnailHeight = reader.uint32(); + break; + } + case 19: { + message.thumbnailWidth = reader.uint32(); + break; + } + case 20: { + message.imageDataHash = reader.string(); + break; + } + case 21: { + message.stickerPackSize = reader.uint64(); + break; + } + case 22: { + message.stickerPackOrigin = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StickerPackMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.StickerPackMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.StickerPackMessage} StickerPackMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StickerPackMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StickerPackMessage message. + * @function verify + * @memberof proto.Message.StickerPackMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StickerPackMessage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.stickerPackId != null && message.hasOwnProperty("stickerPackId")) { + properties._stickerPackId = 1; + if (!$util.isString(message.stickerPackId)) + return "stickerPackId: string expected"; + } + if (message.name != null && message.hasOwnProperty("name")) { + properties._name = 1; + if (!$util.isString(message.name)) + return "name: string expected"; + } + if (message.publisher != null && message.hasOwnProperty("publisher")) { + properties._publisher = 1; + if (!$util.isString(message.publisher)) + return "publisher: string expected"; + } + if (message.stickers != null && message.hasOwnProperty("stickers")) { + if (!Array.isArray(message.stickers)) + return "stickers: array expected"; + for (var i = 0; i < message.stickers.length; ++i) { + var error = $root.proto.Message.StickerPackMessage.Sticker.verify(message.stickers[i]); + if (error) + return "stickers." + error; + } + } + if (message.fileLength != null && message.hasOwnProperty("fileLength")) { + properties._fileLength = 1; + if (!$util.isInteger(message.fileLength) && !(message.fileLength && $util.isInteger(message.fileLength.low) && $util.isInteger(message.fileLength.high))) + return "fileLength: integer|Long expected"; + } + if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) { + properties._fileSha256 = 1; + if (!(message.fileSha256 && typeof message.fileSha256.length === "number" || $util.isString(message.fileSha256))) + return "fileSha256: buffer expected"; + } + if (message.fileEncSha256 != null && message.hasOwnProperty("fileEncSha256")) { + properties._fileEncSha256 = 1; + if (!(message.fileEncSha256 && typeof message.fileEncSha256.length === "number" || $util.isString(message.fileEncSha256))) + return "fileEncSha256: buffer expected"; + } + if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) { + properties._mediaKey = 1; + if (!(message.mediaKey && typeof message.mediaKey.length === "number" || $util.isString(message.mediaKey))) + return "mediaKey: buffer expected"; + } + if (message.directPath != null && message.hasOwnProperty("directPath")) { + properties._directPath = 1; + if (!$util.isString(message.directPath)) + return "directPath: string expected"; + } + if (message.caption != null && message.hasOwnProperty("caption")) { + properties._caption = 1; + if (!$util.isString(message.caption)) + return "caption: string expected"; + } + if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) { + properties._contextInfo = 1; + { + var error = $root.proto.ContextInfo.verify(message.contextInfo); + if (error) + return "contextInfo." + error; + } + } + if (message.packDescription != null && message.hasOwnProperty("packDescription")) { + properties._packDescription = 1; + if (!$util.isString(message.packDescription)) + return "packDescription: string expected"; + } + if (message.mediaKeyTimestamp != null && message.hasOwnProperty("mediaKeyTimestamp")) { + properties._mediaKeyTimestamp = 1; + if (!$util.isInteger(message.mediaKeyTimestamp) && !(message.mediaKeyTimestamp && $util.isInteger(message.mediaKeyTimestamp.low) && $util.isInteger(message.mediaKeyTimestamp.high))) + return "mediaKeyTimestamp: integer|Long expected"; + } + if (message.trayIconFileName != null && message.hasOwnProperty("trayIconFileName")) { + properties._trayIconFileName = 1; + if (!$util.isString(message.trayIconFileName)) + return "trayIconFileName: string expected"; + } + if (message.thumbnailDirectPath != null && message.hasOwnProperty("thumbnailDirectPath")) { + properties._thumbnailDirectPath = 1; + if (!$util.isString(message.thumbnailDirectPath)) + return "thumbnailDirectPath: string expected"; + } + if (message.thumbnailSha256 != null && message.hasOwnProperty("thumbnailSha256")) { + properties._thumbnailSha256 = 1; + if (!(message.thumbnailSha256 && typeof message.thumbnailSha256.length === "number" || $util.isString(message.thumbnailSha256))) + return "thumbnailSha256: buffer expected"; + } + if (message.thumbnailEncSha256 != null && message.hasOwnProperty("thumbnailEncSha256")) { + properties._thumbnailEncSha256 = 1; + if (!(message.thumbnailEncSha256 && typeof message.thumbnailEncSha256.length === "number" || $util.isString(message.thumbnailEncSha256))) + return "thumbnailEncSha256: buffer expected"; + } + if (message.thumbnailHeight != null && message.hasOwnProperty("thumbnailHeight")) { + properties._thumbnailHeight = 1; + if (!$util.isInteger(message.thumbnailHeight)) + return "thumbnailHeight: integer expected"; + } + if (message.thumbnailWidth != null && message.hasOwnProperty("thumbnailWidth")) { + properties._thumbnailWidth = 1; + if (!$util.isInteger(message.thumbnailWidth)) + return "thumbnailWidth: integer expected"; + } + if (message.imageDataHash != null && message.hasOwnProperty("imageDataHash")) { + properties._imageDataHash = 1; + if (!$util.isString(message.imageDataHash)) + return "imageDataHash: string expected"; + } + if (message.stickerPackSize != null && message.hasOwnProperty("stickerPackSize")) { + properties._stickerPackSize = 1; + if (!$util.isInteger(message.stickerPackSize) && !(message.stickerPackSize && $util.isInteger(message.stickerPackSize.low) && $util.isInteger(message.stickerPackSize.high))) + return "stickerPackSize: integer|Long expected"; + } + if (message.stickerPackOrigin != null && message.hasOwnProperty("stickerPackOrigin")) { + properties._stickerPackOrigin = 1; + switch (message.stickerPackOrigin) { + default: + return "stickerPackOrigin: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + return null; + }; + + /** + * Creates a StickerPackMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.StickerPackMessage + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.StickerPackMessage} StickerPackMessage + */ + StickerPackMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.StickerPackMessage) + return object; + var message = new $root.proto.Message.StickerPackMessage(); + if (object.stickerPackId != null) + message.stickerPackId = String(object.stickerPackId); + if (object.name != null) + message.name = String(object.name); + if (object.publisher != null) + message.publisher = String(object.publisher); + if (object.stickers) { + if (!Array.isArray(object.stickers)) + throw TypeError(".proto.Message.StickerPackMessage.stickers: array expected"); + message.stickers = []; + for (var i = 0; i < object.stickers.length; ++i) { + if (typeof object.stickers[i] !== "object") + throw TypeError(".proto.Message.StickerPackMessage.stickers: object expected"); + message.stickers[i] = $root.proto.Message.StickerPackMessage.Sticker.fromObject(object.stickers[i]); + } + } + 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.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 >= 0) + 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 >= 0) + 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 >= 0) + message.mediaKey = object.mediaKey; + if (object.directPath != null) + message.directPath = String(object.directPath); + if (object.caption != null) + message.caption = String(object.caption); + if (object.contextInfo != null) { + if (typeof object.contextInfo !== "object") + throw TypeError(".proto.Message.StickerPackMessage.contextInfo: object expected"); + message.contextInfo = $root.proto.ContextInfo.fromObject(object.contextInfo); + } + if (object.packDescription != null) + message.packDescription = String(object.packDescription); + 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.trayIconFileName != null) + message.trayIconFileName = String(object.trayIconFileName); + 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 >= 0) + 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 >= 0) + message.thumbnailEncSha256 = object.thumbnailEncSha256; + if (object.thumbnailHeight != null) + message.thumbnailHeight = object.thumbnailHeight >>> 0; + if (object.thumbnailWidth != null) + message.thumbnailWidth = object.thumbnailWidth >>> 0; + if (object.imageDataHash != null) + message.imageDataHash = String(object.imageDataHash); + if (object.stickerPackSize != null) + if ($util.Long) + (message.stickerPackSize = $util.Long.fromValue(object.stickerPackSize)).unsigned = true; + else if (typeof object.stickerPackSize === "string") + message.stickerPackSize = parseInt(object.stickerPackSize, 10); + else if (typeof object.stickerPackSize === "number") + message.stickerPackSize = object.stickerPackSize; + else if (typeof object.stickerPackSize === "object") + message.stickerPackSize = new $util.LongBits(object.stickerPackSize.low >>> 0, object.stickerPackSize.high >>> 0).toNumber(true); + switch (object.stickerPackOrigin) { + default: + if (typeof object.stickerPackOrigin === "number") { + message.stickerPackOrigin = object.stickerPackOrigin; + break; + } + break; + case "FIRST_PARTY": + case 0: + message.stickerPackOrigin = 0; + break; + case "THIRD_PARTY": + case 1: + message.stickerPackOrigin = 1; + break; + case "USER_CREATED": + case 2: + message.stickerPackOrigin = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a StickerPackMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.StickerPackMessage + * @static + * @param {proto.Message.StickerPackMessage} message StickerPackMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StickerPackMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.stickers = []; + if (message.stickerPackId != null && message.hasOwnProperty("stickerPackId")) { + object.stickerPackId = message.stickerPackId; + if (options.oneofs) + object._stickerPackId = "stickerPackId"; + } + if (message.name != null && message.hasOwnProperty("name")) { + object.name = message.name; + if (options.oneofs) + object._name = "name"; + } + if (message.publisher != null && message.hasOwnProperty("publisher")) { + object.publisher = message.publisher; + if (options.oneofs) + object._publisher = "publisher"; + } + if (message.stickers && message.stickers.length) { + object.stickers = []; + for (var j = 0; j < message.stickers.length; ++j) + object.stickers[j] = $root.proto.Message.StickerPackMessage.Sticker.toObject(message.stickers[j], options); + } + 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 (options.oneofs) + object._fileLength = "fileLength"; + } + 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 (options.oneofs) + object._fileSha256 = "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 (options.oneofs) + object._fileEncSha256 = "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 (options.oneofs) + object._mediaKey = "mediaKey"; + } + if (message.directPath != null && message.hasOwnProperty("directPath")) { + object.directPath = message.directPath; + if (options.oneofs) + object._directPath = "directPath"; + } + if (message.caption != null && message.hasOwnProperty("caption")) { + object.caption = message.caption; + if (options.oneofs) + object._caption = "caption"; + } + if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) { + object.contextInfo = $root.proto.ContextInfo.toObject(message.contextInfo, options); + if (options.oneofs) + object._contextInfo = "contextInfo"; + } + if (message.packDescription != null && message.hasOwnProperty("packDescription")) { + object.packDescription = message.packDescription; + if (options.oneofs) + object._packDescription = "packDescription"; + } + 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 (options.oneofs) + object._mediaKeyTimestamp = "mediaKeyTimestamp"; + } + if (message.trayIconFileName != null && message.hasOwnProperty("trayIconFileName")) { + object.trayIconFileName = message.trayIconFileName; + if (options.oneofs) + object._trayIconFileName = "trayIconFileName"; + } + if (message.thumbnailDirectPath != null && message.hasOwnProperty("thumbnailDirectPath")) { + object.thumbnailDirectPath = message.thumbnailDirectPath; + if (options.oneofs) + object._thumbnailDirectPath = "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 (options.oneofs) + object._thumbnailSha256 = "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 (options.oneofs) + object._thumbnailEncSha256 = "thumbnailEncSha256"; + } + if (message.thumbnailHeight != null && message.hasOwnProperty("thumbnailHeight")) { + object.thumbnailHeight = message.thumbnailHeight; + if (options.oneofs) + object._thumbnailHeight = "thumbnailHeight"; + } + if (message.thumbnailWidth != null && message.hasOwnProperty("thumbnailWidth")) { + object.thumbnailWidth = message.thumbnailWidth; + if (options.oneofs) + object._thumbnailWidth = "thumbnailWidth"; + } + if (message.imageDataHash != null && message.hasOwnProperty("imageDataHash")) { + object.imageDataHash = message.imageDataHash; + if (options.oneofs) + object._imageDataHash = "imageDataHash"; + } + if (message.stickerPackSize != null && message.hasOwnProperty("stickerPackSize")) { + if (typeof message.stickerPackSize === "number") + object.stickerPackSize = options.longs === String ? String(message.stickerPackSize) : message.stickerPackSize; + else + object.stickerPackSize = options.longs === String ? $util.Long.prototype.toString.call(message.stickerPackSize) : options.longs === Number ? new $util.LongBits(message.stickerPackSize.low >>> 0, message.stickerPackSize.high >>> 0).toNumber(true) : message.stickerPackSize; + if (options.oneofs) + object._stickerPackSize = "stickerPackSize"; + } + if (message.stickerPackOrigin != null && message.hasOwnProperty("stickerPackOrigin")) { + object.stickerPackOrigin = options.enums === String ? $root.proto.Message.StickerPackMessage.StickerPackOrigin[message.stickerPackOrigin] === undefined ? message.stickerPackOrigin : $root.proto.Message.StickerPackMessage.StickerPackOrigin[message.stickerPackOrigin] : message.stickerPackOrigin; + if (options.oneofs) + object._stickerPackOrigin = "stickerPackOrigin"; + } + return object; + }; + + /** + * Converts this StickerPackMessage to JSON. + * @function toJSON + * @memberof proto.Message.StickerPackMessage + * @instance + * @returns {Object.} JSON object + */ + StickerPackMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StickerPackMessage + * @function getTypeUrl + * @memberof proto.Message.StickerPackMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StickerPackMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.StickerPackMessage"; + }; + + StickerPackMessage.Sticker = (function() { + + /** + * Properties of a Sticker. + * @memberof proto.Message.StickerPackMessage + * @interface ISticker + * @property {string|null} [fileName] Sticker fileName + * @property {boolean|null} [isAnimated] Sticker isAnimated + * @property {Array.|null} [emojis] Sticker emojis + * @property {string|null} [accessibilityLabel] Sticker accessibilityLabel + * @property {boolean|null} [isLottie] Sticker isLottie + * @property {string|null} [mimetype] Sticker mimetype + */ + + /** + * Constructs a new Sticker. + * @memberof proto.Message.StickerPackMessage + * @classdesc Represents a Sticker. + * @implements ISticker + * @constructor + * @param {proto.Message.StickerPackMessage.ISticker=} [properties] Properties to set + */ + function Sticker(properties) { + this.emojis = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Sticker fileName. + * @member {string|null|undefined} fileName + * @memberof proto.Message.StickerPackMessage.Sticker + * @instance + */ + Sticker.prototype.fileName = null; + + /** + * Sticker isAnimated. + * @member {boolean|null|undefined} isAnimated + * @memberof proto.Message.StickerPackMessage.Sticker + * @instance + */ + Sticker.prototype.isAnimated = null; + + /** + * Sticker emojis. + * @member {Array.} emojis + * @memberof proto.Message.StickerPackMessage.Sticker + * @instance + */ + Sticker.prototype.emojis = $util.emptyArray; + + /** + * Sticker accessibilityLabel. + * @member {string|null|undefined} accessibilityLabel + * @memberof proto.Message.StickerPackMessage.Sticker + * @instance + */ + Sticker.prototype.accessibilityLabel = null; + + /** + * Sticker isLottie. + * @member {boolean|null|undefined} isLottie + * @memberof proto.Message.StickerPackMessage.Sticker + * @instance + */ + Sticker.prototype.isLottie = null; + + /** + * Sticker mimetype. + * @member {string|null|undefined} mimetype + * @memberof proto.Message.StickerPackMessage.Sticker + * @instance + */ + Sticker.prototype.mimetype = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Sticker.prototype, "_fileName", { + get: $util.oneOfGetter($oneOfFields = ["fileName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Sticker.prototype, "_isAnimated", { + get: $util.oneOfGetter($oneOfFields = ["isAnimated"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Sticker.prototype, "_accessibilityLabel", { + get: $util.oneOfGetter($oneOfFields = ["accessibilityLabel"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Sticker.prototype, "_isLottie", { + get: $util.oneOfGetter($oneOfFields = ["isLottie"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Sticker.prototype, "_mimetype", { + get: $util.oneOfGetter($oneOfFields = ["mimetype"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Sticker instance using the specified properties. + * @function create + * @memberof proto.Message.StickerPackMessage.Sticker + * @static + * @param {proto.Message.StickerPackMessage.ISticker=} [properties] Properties to set + * @returns {proto.Message.StickerPackMessage.Sticker} Sticker instance + */ + Sticker.create = function create(properties) { + return new Sticker(properties); + }; + + /** + * Encodes the specified Sticker message. Does not implicitly {@link proto.Message.StickerPackMessage.Sticker.verify|verify} messages. + * @function encode + * @memberof proto.Message.StickerPackMessage.Sticker + * @static + * @param {proto.Message.StickerPackMessage.ISticker} message Sticker message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Sticker.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fileName != null && Object.hasOwnProperty.call(message, "fileName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.fileName); + if (message.isAnimated != null && Object.hasOwnProperty.call(message, "isAnimated")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isAnimated); + if (message.emojis != null && message.emojis.length) + for (var i = 0; i < message.emojis.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.emojis[i]); + if (message.accessibilityLabel != null && Object.hasOwnProperty.call(message, "accessibilityLabel")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.accessibilityLabel); + if (message.isLottie != null && Object.hasOwnProperty.call(message, "isLottie")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.isLottie); + if (message.mimetype != null && Object.hasOwnProperty.call(message, "mimetype")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.mimetype); + return writer; + }; + + /** + * Encodes the specified Sticker message, length delimited. Does not implicitly {@link proto.Message.StickerPackMessage.Sticker.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Message.StickerPackMessage.Sticker + * @static + * @param {proto.Message.StickerPackMessage.ISticker} message Sticker message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Sticker.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Sticker message from the specified reader or buffer. + * @function decode + * @memberof proto.Message.StickerPackMessage.Sticker + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Message.StickerPackMessage.Sticker} Sticker + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Sticker.decode = function 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.StickerPackMessage.Sticker(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.fileName = reader.string(); + break; + } + case 2: { + message.isAnimated = reader.bool(); + break; + } + case 3: { + if (!(message.emojis && message.emojis.length)) + message.emojis = []; + message.emojis.push(reader.string()); + break; + } + case 4: { + message.accessibilityLabel = reader.string(); + break; + } + case 5: { + message.isLottie = reader.bool(); + break; + } + case 6: { + message.mimetype = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Sticker message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Message.StickerPackMessage.Sticker + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Message.StickerPackMessage.Sticker} Sticker + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Sticker.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Sticker message. + * @function verify + * @memberof proto.Message.StickerPackMessage.Sticker + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Sticker.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.fileName != null && message.hasOwnProperty("fileName")) { + properties._fileName = 1; + if (!$util.isString(message.fileName)) + return "fileName: string expected"; + } + if (message.isAnimated != null && message.hasOwnProperty("isAnimated")) { + properties._isAnimated = 1; + if (typeof message.isAnimated !== "boolean") + return "isAnimated: boolean expected"; + } + if (message.emojis != null && message.hasOwnProperty("emojis")) { + if (!Array.isArray(message.emojis)) + return "emojis: array expected"; + for (var i = 0; i < message.emojis.length; ++i) + if (!$util.isString(message.emojis[i])) + return "emojis: string[] expected"; + } + if (message.accessibilityLabel != null && message.hasOwnProperty("accessibilityLabel")) { + properties._accessibilityLabel = 1; + if (!$util.isString(message.accessibilityLabel)) + return "accessibilityLabel: string expected"; + } + if (message.isLottie != null && message.hasOwnProperty("isLottie")) { + properties._isLottie = 1; + if (typeof message.isLottie !== "boolean") + return "isLottie: boolean expected"; + } + if (message.mimetype != null && message.hasOwnProperty("mimetype")) { + properties._mimetype = 1; + if (!$util.isString(message.mimetype)) + return "mimetype: string expected"; + } + return null; + }; + + /** + * Creates a Sticker message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Message.StickerPackMessage.Sticker + * @static + * @param {Object.} object Plain object + * @returns {proto.Message.StickerPackMessage.Sticker} Sticker + */ + Sticker.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Message.StickerPackMessage.Sticker) + return object; + var message = new $root.proto.Message.StickerPackMessage.Sticker(); + if (object.fileName != null) + message.fileName = String(object.fileName); + if (object.isAnimated != null) + message.isAnimated = Boolean(object.isAnimated); + if (object.emojis) { + if (!Array.isArray(object.emojis)) + throw TypeError(".proto.Message.StickerPackMessage.Sticker.emojis: array expected"); + message.emojis = []; + for (var i = 0; i < object.emojis.length; ++i) + message.emojis[i] = String(object.emojis[i]); + } + if (object.accessibilityLabel != null) + message.accessibilityLabel = String(object.accessibilityLabel); + if (object.isLottie != null) + message.isLottie = Boolean(object.isLottie); + if (object.mimetype != null) + message.mimetype = String(object.mimetype); + return message; + }; + + /** + * Creates a plain object from a Sticker message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Message.StickerPackMessage.Sticker + * @static + * @param {proto.Message.StickerPackMessage.Sticker} message Sticker + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Sticker.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.emojis = []; + if (message.fileName != null && message.hasOwnProperty("fileName")) { + object.fileName = message.fileName; + if (options.oneofs) + object._fileName = "fileName"; + } + if (message.isAnimated != null && message.hasOwnProperty("isAnimated")) { + object.isAnimated = message.isAnimated; + if (options.oneofs) + object._isAnimated = "isAnimated"; + } + if (message.emojis && message.emojis.length) { + object.emojis = []; + for (var j = 0; j < message.emojis.length; ++j) + object.emojis[j] = message.emojis[j]; + } + if (message.accessibilityLabel != null && message.hasOwnProperty("accessibilityLabel")) { + object.accessibilityLabel = message.accessibilityLabel; + if (options.oneofs) + object._accessibilityLabel = "accessibilityLabel"; + } + if (message.isLottie != null && message.hasOwnProperty("isLottie")) { + object.isLottie = message.isLottie; + if (options.oneofs) + object._isLottie = "isLottie"; + } + if (message.mimetype != null && message.hasOwnProperty("mimetype")) { + object.mimetype = message.mimetype; + if (options.oneofs) + object._mimetype = "mimetype"; + } + return object; + }; + + /** + * Converts this Sticker to JSON. + * @function toJSON + * @memberof proto.Message.StickerPackMessage.Sticker + * @instance + * @returns {Object.} JSON object + */ + Sticker.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Sticker + * @function getTypeUrl + * @memberof proto.Message.StickerPackMessage.Sticker + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Sticker.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.StickerPackMessage.Sticker"; + }; + + return Sticker; + })(); + + /** + * StickerPackOrigin enum. + * @name proto.Message.StickerPackMessage.StickerPackOrigin + * @enum {number} + * @property {number} FIRST_PARTY=0 FIRST_PARTY value + * @property {number} THIRD_PARTY=1 THIRD_PARTY value + * @property {number} USER_CREATED=2 USER_CREATED value + */ + StickerPackMessage.StickerPackOrigin = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIRST_PARTY"] = 0; + values[valuesById[1] = "THIRD_PARTY"] = 1; + values[valuesById[2] = "USER_CREATED"] = 2; + return values; + })(); + + return StickerPackMessage; + })(); + Message.StickerSyncRMRMessage = (function() { /** @@ -60815,19 +99084,34 @@ $root.proto = (function() { /** * StickerSyncRMRMessage rmrSource. - * @member {string} rmrSource + * @member {string|null|undefined} rmrSource * @memberof proto.Message.StickerSyncRMRMessage * @instance */ - StickerSyncRMRMessage.prototype.rmrSource = ""; + StickerSyncRMRMessage.prototype.rmrSource = null; /** * StickerSyncRMRMessage requestTimestamp. - * @member {number|Long} requestTimestamp + * @member {number|Long|null|undefined} requestTimestamp * @memberof proto.Message.StickerSyncRMRMessage * @instance */ - StickerSyncRMRMessage.prototype.requestTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + StickerSyncRMRMessage.prototype.requestTimestamp = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StickerSyncRMRMessage.prototype, "_rmrSource", { + get: $util.oneOfGetter($oneOfFields = ["rmrSource"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StickerSyncRMRMessage.prototype, "_requestTimestamp", { + get: $util.oneOfGetter($oneOfFields = ["requestTimestamp"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new StickerSyncRMRMessage instance using the specified properties. @@ -60894,17 +99178,20 @@ $root.proto = (function() { 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; + 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; @@ -60940,6 +99227,7 @@ $root.proto = (function() { StickerSyncRMRMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; if (message.filehash != null && message.hasOwnProperty("filehash")) { if (!Array.isArray(message.filehash)) return "filehash: array expected"; @@ -60947,12 +99235,16 @@ $root.proto = (function() { if (!$util.isString(message.filehash[i])) return "filehash: string[] expected"; } - if (message.rmrSource != null && message.hasOwnProperty("rmrSource")) + if (message.rmrSource != null && message.hasOwnProperty("rmrSource")) { + properties._rmrSource = 1; if (!$util.isString(message.rmrSource)) return "rmrSource: string expected"; - if (message.requestTimestamp != null && message.hasOwnProperty("requestTimestamp")) + } + if (message.requestTimestamp != null && message.hasOwnProperty("requestTimestamp")) { + properties._requestTimestamp = 1; if (!$util.isInteger(message.requestTimestamp) && !(message.requestTimestamp && $util.isInteger(message.requestTimestamp.low) && $util.isInteger(message.requestTimestamp.high))) return "requestTimestamp: integer|Long expected"; + } return null; }; @@ -61004,26 +99296,24 @@ $root.proto = (function() { 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")) + if (message.rmrSource != null && message.hasOwnProperty("rmrSource")) { object.rmrSource = message.rmrSource; - if (message.requestTimestamp != null && message.hasOwnProperty("requestTimestamp")) + if (options.oneofs) + object._rmrSource = "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; + if (options.oneofs) + object._requestTimestamp = "requestTimestamp"; + } return object; }; @@ -61038,6 +99328,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for StickerSyncRMRMessage + * @function getTypeUrl + * @memberof proto.Message.StickerSyncRMRMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StickerSyncRMRMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.StickerSyncRMRMessage"; + }; + return StickerSyncRMRMessage; })(); @@ -61071,19 +99376,19 @@ $root.proto = (function() { /** * TemplateButtonReplyMessage selectedId. - * @member {string} selectedId + * @member {string|null|undefined} selectedId * @memberof proto.Message.TemplateButtonReplyMessage * @instance */ - TemplateButtonReplyMessage.prototype.selectedId = ""; + TemplateButtonReplyMessage.prototype.selectedId = null; /** * TemplateButtonReplyMessage selectedDisplayText. - * @member {string} selectedDisplayText + * @member {string|null|undefined} selectedDisplayText * @memberof proto.Message.TemplateButtonReplyMessage * @instance */ - TemplateButtonReplyMessage.prototype.selectedDisplayText = ""; + TemplateButtonReplyMessage.prototype.selectedDisplayText = null; /** * TemplateButtonReplyMessage contextInfo. @@ -61095,19 +99400,52 @@ $root.proto = (function() { /** * TemplateButtonReplyMessage selectedIndex. - * @member {number} selectedIndex + * @member {number|null|undefined} selectedIndex * @memberof proto.Message.TemplateButtonReplyMessage * @instance */ - TemplateButtonReplyMessage.prototype.selectedIndex = 0; + TemplateButtonReplyMessage.prototype.selectedIndex = null; /** * TemplateButtonReplyMessage selectedCarouselCardIndex. - * @member {number} selectedCarouselCardIndex + * @member {number|null|undefined} selectedCarouselCardIndex * @memberof proto.Message.TemplateButtonReplyMessage * @instance */ - TemplateButtonReplyMessage.prototype.selectedCarouselCardIndex = 0; + TemplateButtonReplyMessage.prototype.selectedCarouselCardIndex = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(TemplateButtonReplyMessage.prototype, "_selectedId", { + get: $util.oneOfGetter($oneOfFields = ["selectedId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(TemplateButtonReplyMessage.prototype, "_selectedDisplayText", { + get: $util.oneOfGetter($oneOfFields = ["selectedDisplayText"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(TemplateButtonReplyMessage.prototype, "_contextInfo", { + get: $util.oneOfGetter($oneOfFields = ["contextInfo"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(TemplateButtonReplyMessage.prototype, "_selectedIndex", { + get: $util.oneOfGetter($oneOfFields = ["selectedIndex"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(TemplateButtonReplyMessage.prototype, "_selectedCarouselCardIndex", { + get: $util.oneOfGetter($oneOfFields = ["selectedCarouselCardIndex"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new TemplateButtonReplyMessage instance using the specified properties. @@ -61177,21 +99515,26 @@ $root.proto = (function() { 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; - case 5: - message.selectedCarouselCardIndex = reader.uint32(); - break; + 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; + } + case 5: { + message.selectedCarouselCardIndex = reader.uint32(); + break; + } default: reader.skipType(tag & 7); break; @@ -61227,23 +99570,35 @@ $root.proto = (function() { TemplateButtonReplyMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.selectedId != null && message.hasOwnProperty("selectedId")) + var properties = {}; + if (message.selectedId != null && message.hasOwnProperty("selectedId")) { + properties._selectedId = 1; if (!$util.isString(message.selectedId)) return "selectedId: string expected"; - if (message.selectedDisplayText != null && message.hasOwnProperty("selectedDisplayText")) + } + if (message.selectedDisplayText != null && message.hasOwnProperty("selectedDisplayText")) { + properties._selectedDisplayText = 1; 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 (message.contextInfo != null && message.hasOwnProperty("contextInfo")) { + properties._contextInfo = 1; + { + var error = $root.proto.ContextInfo.verify(message.contextInfo); + if (error) + return "contextInfo." + error; + } + } + if (message.selectedIndex != null && message.hasOwnProperty("selectedIndex")) { + properties._selectedIndex = 1; if (!$util.isInteger(message.selectedIndex)) return "selectedIndex: integer expected"; - if (message.selectedCarouselCardIndex != null && message.hasOwnProperty("selectedCarouselCardIndex")) + } + if (message.selectedCarouselCardIndex != null && message.hasOwnProperty("selectedCarouselCardIndex")) { + properties._selectedCarouselCardIndex = 1; if (!$util.isInteger(message.selectedCarouselCardIndex)) return "selectedCarouselCardIndex: integer expected"; + } return null; }; @@ -61288,23 +99643,31 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.selectedId = ""; - object.selectedDisplayText = ""; - object.contextInfo = null; - object.selectedIndex = 0; - object.selectedCarouselCardIndex = 0; - } - if (message.selectedId != null && message.hasOwnProperty("selectedId")) + if (message.selectedId != null && message.hasOwnProperty("selectedId")) { object.selectedId = message.selectedId; - if (message.selectedDisplayText != null && message.hasOwnProperty("selectedDisplayText")) + if (options.oneofs) + object._selectedId = "selectedId"; + } + if (message.selectedDisplayText != null && message.hasOwnProperty("selectedDisplayText")) { object.selectedDisplayText = message.selectedDisplayText; - if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) + if (options.oneofs) + object._selectedDisplayText = "selectedDisplayText"; + } + if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) { object.contextInfo = $root.proto.ContextInfo.toObject(message.contextInfo, options); - if (message.selectedIndex != null && message.hasOwnProperty("selectedIndex")) + if (options.oneofs) + object._contextInfo = "contextInfo"; + } + if (message.selectedIndex != null && message.hasOwnProperty("selectedIndex")) { object.selectedIndex = message.selectedIndex; - if (message.selectedCarouselCardIndex != null && message.hasOwnProperty("selectedCarouselCardIndex")) + if (options.oneofs) + object._selectedIndex = "selectedIndex"; + } + if (message.selectedCarouselCardIndex != null && message.hasOwnProperty("selectedCarouselCardIndex")) { object.selectedCarouselCardIndex = message.selectedCarouselCardIndex; + if (options.oneofs) + object._selectedCarouselCardIndex = "selectedCarouselCardIndex"; + } return object; }; @@ -61319,6 +99682,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for TemplateButtonReplyMessage + * @function getTypeUrl + * @memberof proto.Message.TemplateButtonReplyMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TemplateButtonReplyMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.TemplateButtonReplyMessage"; + }; + return TemplateButtonReplyMessage; })(); @@ -61369,11 +99747,11 @@ $root.proto = (function() { /** * TemplateMessage templateId. - * @member {string} templateId + * @member {string|null|undefined} templateId * @memberof proto.Message.TemplateMessage * @instance */ - TemplateMessage.prototype.templateId = ""; + TemplateMessage.prototype.templateId = null; /** * TemplateMessage fourRowTemplate. @@ -61402,6 +99780,24 @@ $root.proto = (function() { // OneOf field names bound to virtual getters and setters var $oneOfFields; + // Virtual OneOf for proto3 optional field + Object.defineProperty(TemplateMessage.prototype, "_contextInfo", { + get: $util.oneOfGetter($oneOfFields = ["contextInfo"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(TemplateMessage.prototype, "_hydratedTemplate", { + get: $util.oneOfGetter($oneOfFields = ["hydratedTemplate"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(TemplateMessage.prototype, "_templateId", { + get: $util.oneOfGetter($oneOfFields = ["templateId"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * TemplateMessage format. * @member {"fourRowTemplate"|"hydratedFourRowTemplate"|"interactiveMessageTemplate"|undefined} format @@ -61483,24 +99879,30 @@ $root.proto = (function() { 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 9: - message.templateId = reader.string(); - 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; - case 5: - message.interactiveMessageTemplate = $root.proto.Message.InteractiveMessage.decode(reader, reader.uint32()); - break; + 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 9: { + message.templateId = reader.string(); + 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; + } + case 5: { + message.interactiveMessageTemplate = $root.proto.Message.InteractiveMessage.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -61538,18 +99940,26 @@ $root.proto = (function() { 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; + properties._contextInfo = 1; + { + 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; + properties._hydratedTemplate = 1; + { + var error = $root.proto.Message.TemplateMessage.HydratedFourRowTemplate.verify(message.hydratedTemplate); + if (error) + return "hydratedTemplate." + error; + } } - if (message.templateId != null && message.hasOwnProperty("templateId")) + if (message.templateId != null && message.hasOwnProperty("templateId")) { + properties._templateId = 1; if (!$util.isString(message.templateId)) return "templateId: string expected"; + } if (message.fourRowTemplate != null && message.hasOwnProperty("fourRowTemplate")) { properties.format = 1; { @@ -61636,11 +100046,6 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.contextInfo = null; - object.hydratedTemplate = null; - object.templateId = ""; - } if (message.fourRowTemplate != null && message.hasOwnProperty("fourRowTemplate")) { object.fourRowTemplate = $root.proto.Message.TemplateMessage.FourRowTemplate.toObject(message.fourRowTemplate, options); if (options.oneofs) @@ -61651,17 +100056,26 @@ $root.proto = (function() { if (options.oneofs) object.format = "hydratedFourRowTemplate"; } - if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) + if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) { object.contextInfo = $root.proto.ContextInfo.toObject(message.contextInfo, options); - if (message.hydratedTemplate != null && message.hasOwnProperty("hydratedTemplate")) + if (options.oneofs) + object._contextInfo = "contextInfo"; + } + if (message.hydratedTemplate != null && message.hasOwnProperty("hydratedTemplate")) { object.hydratedTemplate = $root.proto.Message.TemplateMessage.HydratedFourRowTemplate.toObject(message.hydratedTemplate, options); + if (options.oneofs) + object._hydratedTemplate = "hydratedTemplate"; + } if (message.interactiveMessageTemplate != null && message.hasOwnProperty("interactiveMessageTemplate")) { object.interactiveMessageTemplate = $root.proto.Message.InteractiveMessage.toObject(message.interactiveMessageTemplate, options); if (options.oneofs) object.format = "interactiveMessageTemplate"; } - if (message.templateId != null && message.hasOwnProperty("templateId")) + if (message.templateId != null && message.hasOwnProperty("templateId")) { object.templateId = message.templateId; + if (options.oneofs) + object._templateId = "templateId"; + } return object; }; @@ -61676,6 +100090,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for TemplateMessage + * @function getTypeUrl + * @memberof proto.Message.TemplateMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TemplateMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.TemplateMessage"; + }; + TemplateMessage.FourRowTemplate = (function() { /** @@ -61775,6 +100204,18 @@ $root.proto = (function() { // OneOf field names bound to virtual getters and setters var $oneOfFields; + // Virtual OneOf for proto3 optional field + Object.defineProperty(FourRowTemplate.prototype, "_content", { + get: $util.oneOfGetter($oneOfFields = ["content"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(FourRowTemplate.prototype, "_footer", { + get: $util.oneOfGetter($oneOfFields = ["footer"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * FourRowTemplate title. * @member {"documentMessage"|"highlyStructuredMessage"|"imageMessage"|"videoMessage"|"locationMessage"|undefined} title @@ -61861,32 +100302,40 @@ $root.proto = (function() { 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; + 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; @@ -61924,14 +100373,20 @@ $root.proto = (function() { 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; + properties._content = 1; + { + 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; + properties._footer = 1; + { + 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)) @@ -62068,10 +100523,6 @@ $root.proto = (function() { 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) @@ -62097,10 +100548,16 @@ $root.proto = (function() { if (options.oneofs) object.title = "locationMessage"; } - if (message.content != null && message.hasOwnProperty("content")) + if (message.content != null && message.hasOwnProperty("content")) { object.content = $root.proto.Message.HighlyStructuredMessage.toObject(message.content, options); - if (message.footer != null && message.hasOwnProperty("footer")) + if (options.oneofs) + object._content = "content"; + } + if (message.footer != null && message.hasOwnProperty("footer")) { object.footer = $root.proto.Message.HighlyStructuredMessage.toObject(message.footer, options); + if (options.oneofs) + object._footer = "footer"; + } if (message.buttons && message.buttons.length) { object.buttons = []; for (var j = 0; j < message.buttons.length; ++j) @@ -62120,6 +100577,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FourRowTemplate + * @function getTypeUrl + * @memberof proto.Message.TemplateMessage.FourRowTemplate + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FourRowTemplate.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.TemplateMessage.FourRowTemplate"; + }; + return FourRowTemplate; })(); @@ -62159,19 +100631,19 @@ $root.proto = (function() { /** * HydratedFourRowTemplate hydratedContentText. - * @member {string} hydratedContentText + * @member {string|null|undefined} hydratedContentText * @memberof proto.Message.TemplateMessage.HydratedFourRowTemplate * @instance */ - HydratedFourRowTemplate.prototype.hydratedContentText = ""; + HydratedFourRowTemplate.prototype.hydratedContentText = null; /** * HydratedFourRowTemplate hydratedFooterText. - * @member {string} hydratedFooterText + * @member {string|null|undefined} hydratedFooterText * @memberof proto.Message.TemplateMessage.HydratedFourRowTemplate * @instance */ - HydratedFourRowTemplate.prototype.hydratedFooterText = ""; + HydratedFourRowTemplate.prototype.hydratedFooterText = null; /** * HydratedFourRowTemplate hydratedButtons. @@ -62183,19 +100655,19 @@ $root.proto = (function() { /** * HydratedFourRowTemplate templateId. - * @member {string} templateId + * @member {string|null|undefined} templateId * @memberof proto.Message.TemplateMessage.HydratedFourRowTemplate * @instance */ - HydratedFourRowTemplate.prototype.templateId = ""; + HydratedFourRowTemplate.prototype.templateId = null; /** * HydratedFourRowTemplate maskLinkedDevices. - * @member {boolean} maskLinkedDevices + * @member {boolean|null|undefined} maskLinkedDevices * @memberof proto.Message.TemplateMessage.HydratedFourRowTemplate * @instance */ - HydratedFourRowTemplate.prototype.maskLinkedDevices = false; + HydratedFourRowTemplate.prototype.maskLinkedDevices = null; /** * HydratedFourRowTemplate documentMessage. @@ -62240,6 +100712,30 @@ $root.proto = (function() { // OneOf field names bound to virtual getters and setters var $oneOfFields; + // Virtual OneOf for proto3 optional field + Object.defineProperty(HydratedFourRowTemplate.prototype, "_hydratedContentText", { + get: $util.oneOfGetter($oneOfFields = ["hydratedContentText"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HydratedFourRowTemplate.prototype, "_hydratedFooterText", { + get: $util.oneOfGetter($oneOfFields = ["hydratedFooterText"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HydratedFourRowTemplate.prototype, "_templateId", { + get: $util.oneOfGetter($oneOfFields = ["templateId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HydratedFourRowTemplate.prototype, "_maskLinkedDevices", { + get: $util.oneOfGetter($oneOfFields = ["maskLinkedDevices"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * HydratedFourRowTemplate title. * @member {"documentMessage"|"hydratedTitleText"|"imageMessage"|"videoMessage"|"locationMessage"|undefined} title @@ -62330,38 +100826,48 @@ $root.proto = (function() { 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 10: - message.maskLinkedDevices = reader.bool(); - 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; + 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 10: { + message.maskLinkedDevices = reader.bool(); + 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; @@ -62398,12 +100904,16 @@ $root.proto = (function() { if (typeof message !== "object" || message === null) return "object expected"; var properties = {}; - if (message.hydratedContentText != null && message.hasOwnProperty("hydratedContentText")) + if (message.hydratedContentText != null && message.hasOwnProperty("hydratedContentText")) { + properties._hydratedContentText = 1; if (!$util.isString(message.hydratedContentText)) return "hydratedContentText: string expected"; - if (message.hydratedFooterText != null && message.hasOwnProperty("hydratedFooterText")) + } + if (message.hydratedFooterText != null && message.hasOwnProperty("hydratedFooterText")) { + properties._hydratedFooterText = 1; 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"; @@ -62413,12 +100923,16 @@ $root.proto = (function() { return "hydratedButtons." + error; } } - if (message.templateId != null && message.hasOwnProperty("templateId")) + if (message.templateId != null && message.hasOwnProperty("templateId")) { + properties._templateId = 1; if (!$util.isString(message.templateId)) return "templateId: string expected"; - if (message.maskLinkedDevices != null && message.hasOwnProperty("maskLinkedDevices")) + } + if (message.maskLinkedDevices != null && message.hasOwnProperty("maskLinkedDevices")) { + properties._maskLinkedDevices = 1; if (typeof message.maskLinkedDevices !== "boolean") return "maskLinkedDevices: boolean expected"; + } if (message.documentMessage != null && message.hasOwnProperty("documentMessage")) { properties.title = 1; { @@ -62537,12 +101051,6 @@ $root.proto = (function() { var object = {}; if (options.arrays || options.defaults) object.hydratedButtons = []; - if (options.defaults) { - object.hydratedContentText = ""; - object.hydratedFooterText = ""; - object.templateId = ""; - object.maskLinkedDevices = false; - } if (message.documentMessage != null && message.hasOwnProperty("documentMessage")) { object.documentMessage = $root.proto.Message.DocumentMessage.toObject(message.documentMessage, options); if (options.oneofs) @@ -62568,19 +101076,31 @@ $root.proto = (function() { if (options.oneofs) object.title = "locationMessage"; } - if (message.hydratedContentText != null && message.hasOwnProperty("hydratedContentText")) + if (message.hydratedContentText != null && message.hasOwnProperty("hydratedContentText")) { object.hydratedContentText = message.hydratedContentText; - if (message.hydratedFooterText != null && message.hasOwnProperty("hydratedFooterText")) + if (options.oneofs) + object._hydratedContentText = "hydratedContentText"; + } + if (message.hydratedFooterText != null && message.hasOwnProperty("hydratedFooterText")) { object.hydratedFooterText = message.hydratedFooterText; + if (options.oneofs) + object._hydratedFooterText = "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")) + if (message.templateId != null && message.hasOwnProperty("templateId")) { object.templateId = message.templateId; - if (message.maskLinkedDevices != null && message.hasOwnProperty("maskLinkedDevices")) + if (options.oneofs) + object._templateId = "templateId"; + } + if (message.maskLinkedDevices != null && message.hasOwnProperty("maskLinkedDevices")) { object.maskLinkedDevices = message.maskLinkedDevices; + if (options.oneofs) + object._maskLinkedDevices = "maskLinkedDevices"; + } return object; }; @@ -62595,6 +101115,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for HydratedFourRowTemplate + * @function getTypeUrl + * @memberof proto.Message.TemplateMessage.HydratedFourRowTemplate + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HydratedFourRowTemplate.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.TemplateMessage.HydratedFourRowTemplate"; + }; + return HydratedFourRowTemplate; })(); @@ -62631,6 +101166,9 @@ $root.proto = (function() { * @property {Uint8Array|null} [thumbnailEncSha256] VideoMessage thumbnailEncSha256 * @property {string|null} [staticUrl] VideoMessage staticUrl * @property {Array.|null} [annotations] VideoMessage annotations + * @property {string|null} [accessibilityLabel] VideoMessage accessibilityLabel + * @property {Array.|null} [processedVideos] VideoMessage processedVideos + * @property {number|null} [externalShareFullVideoDurationInSeconds] VideoMessage externalShareFullVideoDurationInSeconds */ /** @@ -62644,6 +101182,7 @@ $root.proto = (function() { function VideoMessage(properties) { this.interactiveAnnotations = []; this.annotations = []; + this.processedVideos = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -62652,91 +101191,91 @@ $root.proto = (function() { /** * VideoMessage url. - * @member {string} url + * @member {string|null|undefined} url * @memberof proto.Message.VideoMessage * @instance */ - VideoMessage.prototype.url = ""; + VideoMessage.prototype.url = null; /** * VideoMessage mimetype. - * @member {string} mimetype + * @member {string|null|undefined} mimetype * @memberof proto.Message.VideoMessage * @instance */ - VideoMessage.prototype.mimetype = ""; + VideoMessage.prototype.mimetype = null; /** * VideoMessage fileSha256. - * @member {Uint8Array} fileSha256 + * @member {Uint8Array|null|undefined} fileSha256 * @memberof proto.Message.VideoMessage * @instance */ - VideoMessage.prototype.fileSha256 = $util.newBuffer([]); + VideoMessage.prototype.fileSha256 = null; /** * VideoMessage fileLength. - * @member {number|Long} fileLength + * @member {number|Long|null|undefined} fileLength * @memberof proto.Message.VideoMessage * @instance */ - VideoMessage.prototype.fileLength = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + VideoMessage.prototype.fileLength = null; /** * VideoMessage seconds. - * @member {number} seconds + * @member {number|null|undefined} seconds * @memberof proto.Message.VideoMessage * @instance */ - VideoMessage.prototype.seconds = 0; + VideoMessage.prototype.seconds = null; /** * VideoMessage mediaKey. - * @member {Uint8Array} mediaKey + * @member {Uint8Array|null|undefined} mediaKey * @memberof proto.Message.VideoMessage * @instance */ - VideoMessage.prototype.mediaKey = $util.newBuffer([]); + VideoMessage.prototype.mediaKey = null; /** * VideoMessage caption. - * @member {string} caption + * @member {string|null|undefined} caption * @memberof proto.Message.VideoMessage * @instance */ - VideoMessage.prototype.caption = ""; + VideoMessage.prototype.caption = null; /** * VideoMessage gifPlayback. - * @member {boolean} gifPlayback + * @member {boolean|null|undefined} gifPlayback * @memberof proto.Message.VideoMessage * @instance */ - VideoMessage.prototype.gifPlayback = false; + VideoMessage.prototype.gifPlayback = null; /** * VideoMessage height. - * @member {number} height + * @member {number|null|undefined} height * @memberof proto.Message.VideoMessage * @instance */ - VideoMessage.prototype.height = 0; + VideoMessage.prototype.height = null; /** * VideoMessage width. - * @member {number} width + * @member {number|null|undefined} width * @memberof proto.Message.VideoMessage * @instance */ - VideoMessage.prototype.width = 0; + VideoMessage.prototype.width = null; /** * VideoMessage fileEncSha256. - * @member {Uint8Array} fileEncSha256 + * @member {Uint8Array|null|undefined} fileEncSha256 * @memberof proto.Message.VideoMessage * @instance */ - VideoMessage.prototype.fileEncSha256 = $util.newBuffer([]); + VideoMessage.prototype.fileEncSha256 = null; /** * VideoMessage interactiveAnnotations. @@ -62748,27 +101287,27 @@ $root.proto = (function() { /** * VideoMessage directPath. - * @member {string} directPath + * @member {string|null|undefined} directPath * @memberof proto.Message.VideoMessage * @instance */ - VideoMessage.prototype.directPath = ""; + VideoMessage.prototype.directPath = null; /** * VideoMessage mediaKeyTimestamp. - * @member {number|Long} mediaKeyTimestamp + * @member {number|Long|null|undefined} mediaKeyTimestamp * @memberof proto.Message.VideoMessage * @instance */ - VideoMessage.prototype.mediaKeyTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + VideoMessage.prototype.mediaKeyTimestamp = null; /** * VideoMessage jpegThumbnail. - * @member {Uint8Array} jpegThumbnail + * @member {Uint8Array|null|undefined} jpegThumbnail * @memberof proto.Message.VideoMessage * @instance */ - VideoMessage.prototype.jpegThumbnail = $util.newBuffer([]); + VideoMessage.prototype.jpegThumbnail = null; /** * VideoMessage contextInfo. @@ -62780,59 +101319,59 @@ $root.proto = (function() { /** * VideoMessage streamingSidecar. - * @member {Uint8Array} streamingSidecar + * @member {Uint8Array|null|undefined} streamingSidecar * @memberof proto.Message.VideoMessage * @instance */ - VideoMessage.prototype.streamingSidecar = $util.newBuffer([]); + VideoMessage.prototype.streamingSidecar = null; /** * VideoMessage gifAttribution. - * @member {proto.Message.VideoMessage.Attribution} gifAttribution + * @member {proto.Message.VideoMessage.Attribution|null|undefined} gifAttribution * @memberof proto.Message.VideoMessage * @instance */ - VideoMessage.prototype.gifAttribution = 0; + VideoMessage.prototype.gifAttribution = null; /** * VideoMessage viewOnce. - * @member {boolean} viewOnce + * @member {boolean|null|undefined} viewOnce * @memberof proto.Message.VideoMessage * @instance */ - VideoMessage.prototype.viewOnce = false; + VideoMessage.prototype.viewOnce = null; /** * VideoMessage thumbnailDirectPath. - * @member {string} thumbnailDirectPath + * @member {string|null|undefined} thumbnailDirectPath * @memberof proto.Message.VideoMessage * @instance */ - VideoMessage.prototype.thumbnailDirectPath = ""; + VideoMessage.prototype.thumbnailDirectPath = null; /** * VideoMessage thumbnailSha256. - * @member {Uint8Array} thumbnailSha256 + * @member {Uint8Array|null|undefined} thumbnailSha256 * @memberof proto.Message.VideoMessage * @instance */ - VideoMessage.prototype.thumbnailSha256 = $util.newBuffer([]); + VideoMessage.prototype.thumbnailSha256 = null; /** * VideoMessage thumbnailEncSha256. - * @member {Uint8Array} thumbnailEncSha256 + * @member {Uint8Array|null|undefined} thumbnailEncSha256 * @memberof proto.Message.VideoMessage * @instance */ - VideoMessage.prototype.thumbnailEncSha256 = $util.newBuffer([]); + VideoMessage.prototype.thumbnailEncSha256 = null; /** * VideoMessage staticUrl. - * @member {string} staticUrl + * @member {string|null|undefined} staticUrl * @memberof proto.Message.VideoMessage * @instance */ - VideoMessage.prototype.staticUrl = ""; + VideoMessage.prototype.staticUrl = null; /** * VideoMessage annotations. @@ -62842,6 +101381,177 @@ $root.proto = (function() { */ VideoMessage.prototype.annotations = $util.emptyArray; + /** + * VideoMessage accessibilityLabel. + * @member {string|null|undefined} accessibilityLabel + * @memberof proto.Message.VideoMessage + * @instance + */ + VideoMessage.prototype.accessibilityLabel = null; + + /** + * VideoMessage processedVideos. + * @member {Array.} processedVideos + * @memberof proto.Message.VideoMessage + * @instance + */ + VideoMessage.prototype.processedVideos = $util.emptyArray; + + /** + * VideoMessage externalShareFullVideoDurationInSeconds. + * @member {number|null|undefined} externalShareFullVideoDurationInSeconds + * @memberof proto.Message.VideoMessage + * @instance + */ + VideoMessage.prototype.externalShareFullVideoDurationInSeconds = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(VideoMessage.prototype, "_url", { + get: $util.oneOfGetter($oneOfFields = ["url"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(VideoMessage.prototype, "_mimetype", { + get: $util.oneOfGetter($oneOfFields = ["mimetype"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(VideoMessage.prototype, "_fileSha256", { + get: $util.oneOfGetter($oneOfFields = ["fileSha256"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(VideoMessage.prototype, "_fileLength", { + get: $util.oneOfGetter($oneOfFields = ["fileLength"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(VideoMessage.prototype, "_seconds", { + get: $util.oneOfGetter($oneOfFields = ["seconds"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(VideoMessage.prototype, "_mediaKey", { + get: $util.oneOfGetter($oneOfFields = ["mediaKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(VideoMessage.prototype, "_caption", { + get: $util.oneOfGetter($oneOfFields = ["caption"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(VideoMessage.prototype, "_gifPlayback", { + get: $util.oneOfGetter($oneOfFields = ["gifPlayback"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(VideoMessage.prototype, "_height", { + get: $util.oneOfGetter($oneOfFields = ["height"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(VideoMessage.prototype, "_width", { + get: $util.oneOfGetter($oneOfFields = ["width"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(VideoMessage.prototype, "_fileEncSha256", { + get: $util.oneOfGetter($oneOfFields = ["fileEncSha256"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(VideoMessage.prototype, "_directPath", { + get: $util.oneOfGetter($oneOfFields = ["directPath"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(VideoMessage.prototype, "_mediaKeyTimestamp", { + get: $util.oneOfGetter($oneOfFields = ["mediaKeyTimestamp"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(VideoMessage.prototype, "_jpegThumbnail", { + get: $util.oneOfGetter($oneOfFields = ["jpegThumbnail"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(VideoMessage.prototype, "_contextInfo", { + get: $util.oneOfGetter($oneOfFields = ["contextInfo"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(VideoMessage.prototype, "_streamingSidecar", { + get: $util.oneOfGetter($oneOfFields = ["streamingSidecar"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(VideoMessage.prototype, "_gifAttribution", { + get: $util.oneOfGetter($oneOfFields = ["gifAttribution"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(VideoMessage.prototype, "_viewOnce", { + get: $util.oneOfGetter($oneOfFields = ["viewOnce"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(VideoMessage.prototype, "_thumbnailDirectPath", { + get: $util.oneOfGetter($oneOfFields = ["thumbnailDirectPath"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(VideoMessage.prototype, "_thumbnailSha256", { + get: $util.oneOfGetter($oneOfFields = ["thumbnailSha256"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(VideoMessage.prototype, "_thumbnailEncSha256", { + get: $util.oneOfGetter($oneOfFields = ["thumbnailEncSha256"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(VideoMessage.prototype, "_staticUrl", { + get: $util.oneOfGetter($oneOfFields = ["staticUrl"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(VideoMessage.prototype, "_accessibilityLabel", { + get: $util.oneOfGetter($oneOfFields = ["accessibilityLabel"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(VideoMessage.prototype, "_externalShareFullVideoDurationInSeconds", { + get: $util.oneOfGetter($oneOfFields = ["externalShareFullVideoDurationInSeconds"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new VideoMessage instance using the specified properties. * @function create @@ -62916,6 +101626,13 @@ $root.proto = (function() { if (message.annotations != null && message.annotations.length) for (var i = 0; i < message.annotations.length; ++i) $root.proto.InteractiveAnnotation.encode(message.annotations[i], writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); + if (message.accessibilityLabel != null && Object.hasOwnProperty.call(message, "accessibilityLabel")) + writer.uint32(/* id 26, wireType 2 =*/210).string(message.accessibilityLabel); + if (message.processedVideos != null && message.processedVideos.length) + for (var i = 0; i < message.processedVideos.length; ++i) + $root.proto.ProcessedVideo.encode(message.processedVideos[i], writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); + if (message.externalShareFullVideoDurationInSeconds != null && Object.hasOwnProperty.call(message, "externalShareFullVideoDurationInSeconds")) + writer.uint32(/* id 28, wireType 0 =*/224).uint32(message.externalShareFullVideoDurationInSeconds); return writer; }; @@ -62950,82 +101667,120 @@ $root.proto = (function() { 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; - case 25: - if (!(message.annotations && message.annotations.length)) - message.annotations = []; - message.annotations.push($root.proto.InteractiveAnnotation.decode(reader, reader.uint32())); - break; + 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; + } + case 25: { + if (!(message.annotations && message.annotations.length)) + message.annotations = []; + message.annotations.push($root.proto.InteractiveAnnotation.decode(reader, reader.uint32())); + break; + } + case 26: { + message.accessibilityLabel = reader.string(); + break; + } + case 27: { + if (!(message.processedVideos && message.processedVideos.length)) + message.processedVideos = []; + message.processedVideos.push($root.proto.ProcessedVideo.decode(reader, reader.uint32())); + break; + } + case 28: { + message.externalShareFullVideoDurationInSeconds = reader.uint32(); + break; + } default: reader.skipType(tag & 7); break; @@ -63061,39 +101816,62 @@ $root.proto = (function() { VideoMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.url != null && message.hasOwnProperty("url")) + var properties = {}; + if (message.url != null && message.hasOwnProperty("url")) { + properties._url = 1; if (!$util.isString(message.url)) return "url: string expected"; - if (message.mimetype != null && message.hasOwnProperty("mimetype")) + } + if (message.mimetype != null && message.hasOwnProperty("mimetype")) { + properties._mimetype = 1; if (!$util.isString(message.mimetype)) return "mimetype: string expected"; - if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) + } + if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) { + properties._fileSha256 = 1; if (!(message.fileSha256 && typeof message.fileSha256.length === "number" || $util.isString(message.fileSha256))) return "fileSha256: buffer expected"; - if (message.fileLength != null && message.hasOwnProperty("fileLength")) + } + if (message.fileLength != null && message.hasOwnProperty("fileLength")) { + properties._fileLength = 1; 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 (message.seconds != null && message.hasOwnProperty("seconds")) { + properties._seconds = 1; if (!$util.isInteger(message.seconds)) return "seconds: integer expected"; - if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) + } + if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) { + properties._mediaKey = 1; if (!(message.mediaKey && typeof message.mediaKey.length === "number" || $util.isString(message.mediaKey))) return "mediaKey: buffer expected"; - if (message.caption != null && message.hasOwnProperty("caption")) + } + if (message.caption != null && message.hasOwnProperty("caption")) { + properties._caption = 1; if (!$util.isString(message.caption)) return "caption: string expected"; - if (message.gifPlayback != null && message.hasOwnProperty("gifPlayback")) + } + if (message.gifPlayback != null && message.hasOwnProperty("gifPlayback")) { + properties._gifPlayback = 1; if (typeof message.gifPlayback !== "boolean") return "gifPlayback: boolean expected"; - if (message.height != null && message.hasOwnProperty("height")) + } + if (message.height != null && message.hasOwnProperty("height")) { + properties._height = 1; if (!$util.isInteger(message.height)) return "height: integer expected"; - if (message.width != null && message.hasOwnProperty("width")) + } + if (message.width != null && message.hasOwnProperty("width")) { + properties._width = 1; if (!$util.isInteger(message.width)) return "width: integer expected"; - if (message.fileEncSha256 != null && message.hasOwnProperty("fileEncSha256")) + } + if (message.fileEncSha256 != null && message.hasOwnProperty("fileEncSha256")) { + properties._fileEncSha256 = 1; 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"; @@ -63103,24 +101881,36 @@ $root.proto = (function() { return "interactiveAnnotations." + error; } } - if (message.directPath != null && message.hasOwnProperty("directPath")) + if (message.directPath != null && message.hasOwnProperty("directPath")) { + properties._directPath = 1; if (!$util.isString(message.directPath)) return "directPath: string expected"; - if (message.mediaKeyTimestamp != null && message.hasOwnProperty("mediaKeyTimestamp")) + } + if (message.mediaKeyTimestamp != null && message.hasOwnProperty("mediaKeyTimestamp")) { + properties._mediaKeyTimestamp = 1; 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 != null && message.hasOwnProperty("jpegThumbnail")) { + properties._jpegThumbnail = 1; 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.contextInfo != null && message.hasOwnProperty("contextInfo")) { + properties._contextInfo = 1; + { + var error = $root.proto.ContextInfo.verify(message.contextInfo); + if (error) + return "contextInfo." + error; + } + } + if (message.streamingSidecar != null && message.hasOwnProperty("streamingSidecar")) { + properties._streamingSidecar = 1; if (!(message.streamingSidecar && typeof message.streamingSidecar.length === "number" || $util.isString(message.streamingSidecar))) return "streamingSidecar: buffer expected"; - if (message.gifAttribution != null && message.hasOwnProperty("gifAttribution")) + } + if (message.gifAttribution != null && message.hasOwnProperty("gifAttribution")) { + properties._gifAttribution = 1; switch (message.gifAttribution) { default: return "gifAttribution: enum value expected"; @@ -63129,21 +101919,32 @@ $root.proto = (function() { case 2: break; } - if (message.viewOnce != null && message.hasOwnProperty("viewOnce")) + } + if (message.viewOnce != null && message.hasOwnProperty("viewOnce")) { + properties._viewOnce = 1; if (typeof message.viewOnce !== "boolean") return "viewOnce: boolean expected"; - if (message.thumbnailDirectPath != null && message.hasOwnProperty("thumbnailDirectPath")) + } + if (message.thumbnailDirectPath != null && message.hasOwnProperty("thumbnailDirectPath")) { + properties._thumbnailDirectPath = 1; if (!$util.isString(message.thumbnailDirectPath)) return "thumbnailDirectPath: string expected"; - if (message.thumbnailSha256 != null && message.hasOwnProperty("thumbnailSha256")) + } + if (message.thumbnailSha256 != null && message.hasOwnProperty("thumbnailSha256")) { + properties._thumbnailSha256 = 1; 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 != null && message.hasOwnProperty("thumbnailEncSha256")) { + properties._thumbnailEncSha256 = 1; if (!(message.thumbnailEncSha256 && typeof message.thumbnailEncSha256.length === "number" || $util.isString(message.thumbnailEncSha256))) return "thumbnailEncSha256: buffer expected"; - if (message.staticUrl != null && message.hasOwnProperty("staticUrl")) + } + if (message.staticUrl != null && message.hasOwnProperty("staticUrl")) { + properties._staticUrl = 1; if (!$util.isString(message.staticUrl)) return "staticUrl: string expected"; + } if (message.annotations != null && message.hasOwnProperty("annotations")) { if (!Array.isArray(message.annotations)) return "annotations: array expected"; @@ -63153,6 +101954,25 @@ $root.proto = (function() { return "annotations." + error; } } + if (message.accessibilityLabel != null && message.hasOwnProperty("accessibilityLabel")) { + properties._accessibilityLabel = 1; + if (!$util.isString(message.accessibilityLabel)) + return "accessibilityLabel: string expected"; + } + if (message.processedVideos != null && message.hasOwnProperty("processedVideos")) { + if (!Array.isArray(message.processedVideos)) + return "processedVideos: array expected"; + for (var i = 0; i < message.processedVideos.length; ++i) { + var error = $root.proto.ProcessedVideo.verify(message.processedVideos[i]); + if (error) + return "processedVideos." + error; + } + } + if (message.externalShareFullVideoDurationInSeconds != null && message.hasOwnProperty("externalShareFullVideoDurationInSeconds")) { + properties._externalShareFullVideoDurationInSeconds = 1; + if (!$util.isInteger(message.externalShareFullVideoDurationInSeconds)) + return "externalShareFullVideoDurationInSeconds: integer expected"; + } return null; }; @@ -63175,7 +101995,7 @@ $root.proto = (function() { 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) + else if (object.fileSha256.length >= 0) message.fileSha256 = object.fileSha256; if (object.fileLength != null) if ($util.Long) @@ -63191,7 +102011,7 @@ $root.proto = (function() { 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) + else if (object.mediaKey.length >= 0) message.mediaKey = object.mediaKey; if (object.caption != null) message.caption = String(object.caption); @@ -63204,7 +102024,7 @@ $root.proto = (function() { 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) + else if (object.fileEncSha256.length >= 0) message.fileEncSha256 = object.fileEncSha256; if (object.interactiveAnnotations) { if (!Array.isArray(object.interactiveAnnotations)) @@ -63230,7 +102050,7 @@ $root.proto = (function() { 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) + else if (object.jpegThumbnail.length >= 0) message.jpegThumbnail = object.jpegThumbnail; if (object.contextInfo != null) { if (typeof object.contextInfo !== "object") @@ -63240,9 +102060,15 @@ $root.proto = (function() { 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) + else if (object.streamingSidecar.length >= 0) message.streamingSidecar = object.streamingSidecar; switch (object.gifAttribution) { + default: + if (typeof object.gifAttribution === "number") { + message.gifAttribution = object.gifAttribution; + break; + } + break; case "NONE": case 0: message.gifAttribution = 0; @@ -63263,12 +102089,12 @@ $root.proto = (function() { 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) + else if (object.thumbnailSha256.length >= 0) 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) + else if (object.thumbnailEncSha256.length >= 0) message.thumbnailEncSha256 = object.thumbnailEncSha256; if (object.staticUrl != null) message.staticUrl = String(object.staticUrl); @@ -63282,6 +102108,20 @@ $root.proto = (function() { message.annotations[i] = $root.proto.InteractiveAnnotation.fromObject(object.annotations[i]); } } + if (object.accessibilityLabel != null) + message.accessibilityLabel = String(object.accessibilityLabel); + if (object.processedVideos) { + if (!Array.isArray(object.processedVideos)) + throw TypeError(".proto.Message.VideoMessage.processedVideos: array expected"); + message.processedVideos = []; + for (var i = 0; i < object.processedVideos.length; ++i) { + if (typeof object.processedVideos[i] !== "object") + throw TypeError(".proto.Message.VideoMessage.processedVideos: object expected"); + message.processedVideos[i] = $root.proto.ProcessedVideo.fromObject(object.processedVideos[i]); + } + } + if (object.externalShareFullVideoDurationInSeconds != null) + message.externalShareFullVideoDurationInSeconds = object.externalShareFullVideoDurationInSeconds >>> 0; return message; }; @@ -63301,141 +102141,149 @@ $root.proto = (function() { if (options.arrays || options.defaults) { object.interactiveAnnotations = []; object.annotations = []; + object.processedVideos = []; } - 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")) + if (message.url != null && message.hasOwnProperty("url")) { object.url = message.url; - if (message.mimetype != null && message.hasOwnProperty("mimetype")) + if (options.oneofs) + object._url = "url"; + } + if (message.mimetype != null && message.hasOwnProperty("mimetype")) { object.mimetype = message.mimetype; - if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) + if (options.oneofs) + object._mimetype = "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 (options.oneofs) + object._fileSha256 = "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")) + if (options.oneofs) + object._fileLength = "fileLength"; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) { object.seconds = message.seconds; - if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) + if (options.oneofs) + object._seconds = "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")) + if (options.oneofs) + object._mediaKey = "mediaKey"; + } + if (message.caption != null && message.hasOwnProperty("caption")) { object.caption = message.caption; - if (message.gifPlayback != null && message.hasOwnProperty("gifPlayback")) + if (options.oneofs) + object._caption = "caption"; + } + if (message.gifPlayback != null && message.hasOwnProperty("gifPlayback")) { object.gifPlayback = message.gifPlayback; - if (message.height != null && message.hasOwnProperty("height")) + if (options.oneofs) + object._gifPlayback = "gifPlayback"; + } + if (message.height != null && message.hasOwnProperty("height")) { object.height = message.height; - if (message.width != null && message.hasOwnProperty("width")) + if (options.oneofs) + object._height = "height"; + } + if (message.width != null && message.hasOwnProperty("width")) { object.width = message.width; - if (message.fileEncSha256 != null && message.hasOwnProperty("fileEncSha256")) + if (options.oneofs) + object._width = "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 (options.oneofs) + object._fileEncSha256 = "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")) + if (message.directPath != null && message.hasOwnProperty("directPath")) { object.directPath = message.directPath; - if (message.mediaKeyTimestamp != null && message.hasOwnProperty("mediaKeyTimestamp")) + if (options.oneofs) + object._directPath = "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")) + if (options.oneofs) + object._mediaKeyTimestamp = "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")) + if (options.oneofs) + object._jpegThumbnail = "jpegThumbnail"; + } + if (message.contextInfo != null && message.hasOwnProperty("contextInfo")) { object.contextInfo = $root.proto.ContextInfo.toObject(message.contextInfo, options); - if (message.streamingSidecar != null && message.hasOwnProperty("streamingSidecar")) + if (options.oneofs) + object._contextInfo = "contextInfo"; + } + 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")) + if (options.oneofs) + object._streamingSidecar = "streamingSidecar"; + } + if (message.gifAttribution != null && message.hasOwnProperty("gifAttribution")) { + object.gifAttribution = options.enums === String ? $root.proto.Message.VideoMessage.Attribution[message.gifAttribution] === undefined ? message.gifAttribution : $root.proto.Message.VideoMessage.Attribution[message.gifAttribution] : message.gifAttribution; + if (options.oneofs) + object._gifAttribution = "gifAttribution"; + } + if (message.viewOnce != null && message.hasOwnProperty("viewOnce")) { object.viewOnce = message.viewOnce; - if (message.thumbnailDirectPath != null && message.hasOwnProperty("thumbnailDirectPath")) + if (options.oneofs) + object._viewOnce = "viewOnce"; + } + if (message.thumbnailDirectPath != null && message.hasOwnProperty("thumbnailDirectPath")) { object.thumbnailDirectPath = message.thumbnailDirectPath; - if (message.thumbnailSha256 != null && message.hasOwnProperty("thumbnailSha256")) + if (options.oneofs) + object._thumbnailDirectPath = "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")) + if (options.oneofs) + object._thumbnailSha256 = "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")) + if (options.oneofs) + object._thumbnailEncSha256 = "thumbnailEncSha256"; + } + if (message.staticUrl != null && message.hasOwnProperty("staticUrl")) { object.staticUrl = message.staticUrl; + if (options.oneofs) + object._staticUrl = "staticUrl"; + } if (message.annotations && message.annotations.length) { object.annotations = []; for (var j = 0; j < message.annotations.length; ++j) object.annotations[j] = $root.proto.InteractiveAnnotation.toObject(message.annotations[j], options); } + if (message.accessibilityLabel != null && message.hasOwnProperty("accessibilityLabel")) { + object.accessibilityLabel = message.accessibilityLabel; + if (options.oneofs) + object._accessibilityLabel = "accessibilityLabel"; + } + if (message.processedVideos && message.processedVideos.length) { + object.processedVideos = []; + for (var j = 0; j < message.processedVideos.length; ++j) + object.processedVideos[j] = $root.proto.ProcessedVideo.toObject(message.processedVideos[j], options); + } + if (message.externalShareFullVideoDurationInSeconds != null && message.hasOwnProperty("externalShareFullVideoDurationInSeconds")) { + object.externalShareFullVideoDurationInSeconds = message.externalShareFullVideoDurationInSeconds; + if (options.oneofs) + object._externalShareFullVideoDurationInSeconds = "externalShareFullVideoDurationInSeconds"; + } return object; }; @@ -63450,6 +102298,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for VideoMessage + * @function getTypeUrl + * @memberof proto.Message.VideoMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VideoMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Message.VideoMessage"; + }; + /** * Attribution enum. * @name proto.Message.VideoMessage.Attribution @@ -63472,6 +102335,590 @@ $root.proto = (function() { return Message; })(); + proto.MessageAddOn = (function() { + + /** + * Properties of a MessageAddOn. + * @memberof proto + * @interface IMessageAddOn + * @property {proto.MessageAddOn.MessageAddOnType|null} [messageAddOnType] MessageAddOn messageAddOnType + * @property {proto.IMessage|null} [messageAddOn] MessageAddOn messageAddOn + * @property {number|Long|null} [senderTimestampMs] MessageAddOn senderTimestampMs + * @property {number|Long|null} [serverTimestampMs] MessageAddOn serverTimestampMs + * @property {proto.WebMessageInfo.Status|null} [status] MessageAddOn status + * @property {proto.IMessageAddOnContextInfo|null} [addOnContextInfo] MessageAddOn addOnContextInfo + * @property {proto.IMessageKey|null} [messageAddOnKey] MessageAddOn messageAddOnKey + * @property {proto.ILegacyMessage|null} [legacyMessage] MessageAddOn legacyMessage + */ + + /** + * Constructs a new MessageAddOn. + * @memberof proto + * @classdesc Represents a MessageAddOn. + * @implements IMessageAddOn + * @constructor + * @param {proto.IMessageAddOn=} [properties] Properties to set + */ + function MessageAddOn(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MessageAddOn messageAddOnType. + * @member {proto.MessageAddOn.MessageAddOnType|null|undefined} messageAddOnType + * @memberof proto.MessageAddOn + * @instance + */ + MessageAddOn.prototype.messageAddOnType = null; + + /** + * MessageAddOn messageAddOn. + * @member {proto.IMessage|null|undefined} messageAddOn + * @memberof proto.MessageAddOn + * @instance + */ + MessageAddOn.prototype.messageAddOn = null; + + /** + * MessageAddOn senderTimestampMs. + * @member {number|Long|null|undefined} senderTimestampMs + * @memberof proto.MessageAddOn + * @instance + */ + MessageAddOn.prototype.senderTimestampMs = null; + + /** + * MessageAddOn serverTimestampMs. + * @member {number|Long|null|undefined} serverTimestampMs + * @memberof proto.MessageAddOn + * @instance + */ + MessageAddOn.prototype.serverTimestampMs = null; + + /** + * MessageAddOn status. + * @member {proto.WebMessageInfo.Status|null|undefined} status + * @memberof proto.MessageAddOn + * @instance + */ + MessageAddOn.prototype.status = null; + + /** + * MessageAddOn addOnContextInfo. + * @member {proto.IMessageAddOnContextInfo|null|undefined} addOnContextInfo + * @memberof proto.MessageAddOn + * @instance + */ + MessageAddOn.prototype.addOnContextInfo = null; + + /** + * MessageAddOn messageAddOnKey. + * @member {proto.IMessageKey|null|undefined} messageAddOnKey + * @memberof proto.MessageAddOn + * @instance + */ + MessageAddOn.prototype.messageAddOnKey = null; + + /** + * MessageAddOn legacyMessage. + * @member {proto.ILegacyMessage|null|undefined} legacyMessage + * @memberof proto.MessageAddOn + * @instance + */ + MessageAddOn.prototype.legacyMessage = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MessageAddOn.prototype, "_messageAddOnType", { + get: $util.oneOfGetter($oneOfFields = ["messageAddOnType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MessageAddOn.prototype, "_messageAddOn", { + get: $util.oneOfGetter($oneOfFields = ["messageAddOn"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MessageAddOn.prototype, "_senderTimestampMs", { + get: $util.oneOfGetter($oneOfFields = ["senderTimestampMs"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MessageAddOn.prototype, "_serverTimestampMs", { + get: $util.oneOfGetter($oneOfFields = ["serverTimestampMs"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MessageAddOn.prototype, "_status", { + get: $util.oneOfGetter($oneOfFields = ["status"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MessageAddOn.prototype, "_addOnContextInfo", { + get: $util.oneOfGetter($oneOfFields = ["addOnContextInfo"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MessageAddOn.prototype, "_messageAddOnKey", { + get: $util.oneOfGetter($oneOfFields = ["messageAddOnKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MessageAddOn.prototype, "_legacyMessage", { + get: $util.oneOfGetter($oneOfFields = ["legacyMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new MessageAddOn instance using the specified properties. + * @function create + * @memberof proto.MessageAddOn + * @static + * @param {proto.IMessageAddOn=} [properties] Properties to set + * @returns {proto.MessageAddOn} MessageAddOn instance + */ + MessageAddOn.create = function create(properties) { + return new MessageAddOn(properties); + }; + + /** + * Encodes the specified MessageAddOn message. Does not implicitly {@link proto.MessageAddOn.verify|verify} messages. + * @function encode + * @memberof proto.MessageAddOn + * @static + * @param {proto.IMessageAddOn} message MessageAddOn message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageAddOn.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.messageAddOnType != null && Object.hasOwnProperty.call(message, "messageAddOnType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.messageAddOnType); + if (message.messageAddOn != null && Object.hasOwnProperty.call(message, "messageAddOn")) + $root.proto.Message.encode(message.messageAddOn, 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); + if (message.serverTimestampMs != null && Object.hasOwnProperty.call(message, "serverTimestampMs")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.serverTimestampMs); + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.status); + if (message.addOnContextInfo != null && Object.hasOwnProperty.call(message, "addOnContextInfo")) + $root.proto.MessageAddOnContextInfo.encode(message.addOnContextInfo, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.messageAddOnKey != null && Object.hasOwnProperty.call(message, "messageAddOnKey")) + $root.proto.MessageKey.encode(message.messageAddOnKey, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.legacyMessage != null && Object.hasOwnProperty.call(message, "legacyMessage")) + $root.proto.LegacyMessage.encode(message.legacyMessage, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MessageAddOn message, length delimited. Does not implicitly {@link proto.MessageAddOn.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.MessageAddOn + * @static + * @param {proto.IMessageAddOn} message MessageAddOn message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageAddOn.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MessageAddOn message from the specified reader or buffer. + * @function decode + * @memberof proto.MessageAddOn + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.MessageAddOn} MessageAddOn + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageAddOn.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.MessageAddOn(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.messageAddOnType = reader.int32(); + break; + } + case 2: { + message.messageAddOn = $root.proto.Message.decode(reader, reader.uint32()); + break; + } + case 3: { + message.senderTimestampMs = reader.int64(); + break; + } + case 4: { + message.serverTimestampMs = reader.int64(); + break; + } + case 5: { + message.status = reader.int32(); + break; + } + case 6: { + message.addOnContextInfo = $root.proto.MessageAddOnContextInfo.decode(reader, reader.uint32()); + break; + } + case 7: { + message.messageAddOnKey = $root.proto.MessageKey.decode(reader, reader.uint32()); + break; + } + case 8: { + message.legacyMessage = $root.proto.LegacyMessage.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MessageAddOn message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.MessageAddOn + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.MessageAddOn} MessageAddOn + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageAddOn.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MessageAddOn message. + * @function verify + * @memberof proto.MessageAddOn + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MessageAddOn.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.messageAddOnType != null && message.hasOwnProperty("messageAddOnType")) { + properties._messageAddOnType = 1; + switch (message.messageAddOnType) { + default: + return "messageAddOnType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + } + if (message.messageAddOn != null && message.hasOwnProperty("messageAddOn")) { + properties._messageAddOn = 1; + { + var error = $root.proto.Message.verify(message.messageAddOn); + if (error) + return "messageAddOn." + error; + } + } + if (message.senderTimestampMs != null && message.hasOwnProperty("senderTimestampMs")) { + properties._senderTimestampMs = 1; + if (!$util.isInteger(message.senderTimestampMs) && !(message.senderTimestampMs && $util.isInteger(message.senderTimestampMs.low) && $util.isInteger(message.senderTimestampMs.high))) + return "senderTimestampMs: integer|Long expected"; + } + if (message.serverTimestampMs != null && message.hasOwnProperty("serverTimestampMs")) { + properties._serverTimestampMs = 1; + if (!$util.isInteger(message.serverTimestampMs) && !(message.serverTimestampMs && $util.isInteger(message.serverTimestampMs.low) && $util.isInteger(message.serverTimestampMs.high))) + return "serverTimestampMs: integer|Long expected"; + } + if (message.status != null && message.hasOwnProperty("status")) { + properties._status = 1; + switch (message.status) { + default: + return "status: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + } + if (message.addOnContextInfo != null && message.hasOwnProperty("addOnContextInfo")) { + properties._addOnContextInfo = 1; + { + var error = $root.proto.MessageAddOnContextInfo.verify(message.addOnContextInfo); + if (error) + return "addOnContextInfo." + error; + } + } + if (message.messageAddOnKey != null && message.hasOwnProperty("messageAddOnKey")) { + properties._messageAddOnKey = 1; + { + var error = $root.proto.MessageKey.verify(message.messageAddOnKey); + if (error) + return "messageAddOnKey." + error; + } + } + if (message.legacyMessage != null && message.hasOwnProperty("legacyMessage")) { + properties._legacyMessage = 1; + { + var error = $root.proto.LegacyMessage.verify(message.legacyMessage); + if (error) + return "legacyMessage." + error; + } + } + return null; + }; + + /** + * Creates a MessageAddOn message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.MessageAddOn + * @static + * @param {Object.} object Plain object + * @returns {proto.MessageAddOn} MessageAddOn + */ + MessageAddOn.fromObject = function fromObject(object) { + if (object instanceof $root.proto.MessageAddOn) + return object; + var message = new $root.proto.MessageAddOn(); + switch (object.messageAddOnType) { + default: + if (typeof object.messageAddOnType === "number") { + message.messageAddOnType = object.messageAddOnType; + break; + } + break; + case "UNDEFINED": + case 0: + message.messageAddOnType = 0; + break; + case "REACTION": + case 1: + message.messageAddOnType = 1; + break; + case "EVENT_RESPONSE": + case 2: + message.messageAddOnType = 2; + break; + case "POLL_UPDATE": + case 3: + message.messageAddOnType = 3; + break; + case "PIN_IN_CHAT": + case 4: + message.messageAddOnType = 4; + break; + } + if (object.messageAddOn != null) { + if (typeof object.messageAddOn !== "object") + throw TypeError(".proto.MessageAddOn.messageAddOn: object expected"); + message.messageAddOn = $root.proto.Message.fromObject(object.messageAddOn); + } + 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.serverTimestampMs != null) + if ($util.Long) + (message.serverTimestampMs = $util.Long.fromValue(object.serverTimestampMs)).unsigned = false; + else if (typeof object.serverTimestampMs === "string") + message.serverTimestampMs = parseInt(object.serverTimestampMs, 10); + else if (typeof object.serverTimestampMs === "number") + message.serverTimestampMs = object.serverTimestampMs; + else if (typeof object.serverTimestampMs === "object") + message.serverTimestampMs = new $util.LongBits(object.serverTimestampMs.low >>> 0, object.serverTimestampMs.high >>> 0).toNumber(); + switch (object.status) { + default: + if (typeof object.status === "number") { + message.status = object.status; + break; + } + break; + case "ERROR": + case 0: + message.status = 0; + break; + case "PENDING": + case 1: + message.status = 1; + break; + case "SERVER_ACK": + case 2: + message.status = 2; + break; + case "DELIVERY_ACK": + case 3: + message.status = 3; + break; + case "READ": + case 4: + message.status = 4; + break; + case "PLAYED": + case 5: + message.status = 5; + break; + } + if (object.addOnContextInfo != null) { + if (typeof object.addOnContextInfo !== "object") + throw TypeError(".proto.MessageAddOn.addOnContextInfo: object expected"); + message.addOnContextInfo = $root.proto.MessageAddOnContextInfo.fromObject(object.addOnContextInfo); + } + if (object.messageAddOnKey != null) { + if (typeof object.messageAddOnKey !== "object") + throw TypeError(".proto.MessageAddOn.messageAddOnKey: object expected"); + message.messageAddOnKey = $root.proto.MessageKey.fromObject(object.messageAddOnKey); + } + if (object.legacyMessage != null) { + if (typeof object.legacyMessage !== "object") + throw TypeError(".proto.MessageAddOn.legacyMessage: object expected"); + message.legacyMessage = $root.proto.LegacyMessage.fromObject(object.legacyMessage); + } + return message; + }; + + /** + * Creates a plain object from a MessageAddOn message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.MessageAddOn + * @static + * @param {proto.MessageAddOn} message MessageAddOn + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MessageAddOn.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.messageAddOnType != null && message.hasOwnProperty("messageAddOnType")) { + object.messageAddOnType = options.enums === String ? $root.proto.MessageAddOn.MessageAddOnType[message.messageAddOnType] === undefined ? message.messageAddOnType : $root.proto.MessageAddOn.MessageAddOnType[message.messageAddOnType] : message.messageAddOnType; + if (options.oneofs) + object._messageAddOnType = "messageAddOnType"; + } + if (message.messageAddOn != null && message.hasOwnProperty("messageAddOn")) { + object.messageAddOn = $root.proto.Message.toObject(message.messageAddOn, options); + if (options.oneofs) + object._messageAddOn = "messageAddOn"; + } + 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 (options.oneofs) + object._senderTimestampMs = "senderTimestampMs"; + } + if (message.serverTimestampMs != null && message.hasOwnProperty("serverTimestampMs")) { + if (typeof message.serverTimestampMs === "number") + object.serverTimestampMs = options.longs === String ? String(message.serverTimestampMs) : message.serverTimestampMs; + else + object.serverTimestampMs = options.longs === String ? $util.Long.prototype.toString.call(message.serverTimestampMs) : options.longs === Number ? new $util.LongBits(message.serverTimestampMs.low >>> 0, message.serverTimestampMs.high >>> 0).toNumber() : message.serverTimestampMs; + if (options.oneofs) + object._serverTimestampMs = "serverTimestampMs"; + } + if (message.status != null && message.hasOwnProperty("status")) { + object.status = options.enums === String ? $root.proto.WebMessageInfo.Status[message.status] === undefined ? message.status : $root.proto.WebMessageInfo.Status[message.status] : message.status; + if (options.oneofs) + object._status = "status"; + } + if (message.addOnContextInfo != null && message.hasOwnProperty("addOnContextInfo")) { + object.addOnContextInfo = $root.proto.MessageAddOnContextInfo.toObject(message.addOnContextInfo, options); + if (options.oneofs) + object._addOnContextInfo = "addOnContextInfo"; + } + if (message.messageAddOnKey != null && message.hasOwnProperty("messageAddOnKey")) { + object.messageAddOnKey = $root.proto.MessageKey.toObject(message.messageAddOnKey, options); + if (options.oneofs) + object._messageAddOnKey = "messageAddOnKey"; + } + if (message.legacyMessage != null && message.hasOwnProperty("legacyMessage")) { + object.legacyMessage = $root.proto.LegacyMessage.toObject(message.legacyMessage, options); + if (options.oneofs) + object._legacyMessage = "legacyMessage"; + } + return object; + }; + + /** + * Converts this MessageAddOn to JSON. + * @function toJSON + * @memberof proto.MessageAddOn + * @instance + * @returns {Object.} JSON object + */ + MessageAddOn.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MessageAddOn + * @function getTypeUrl + * @memberof proto.MessageAddOn + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MessageAddOn.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.MessageAddOn"; + }; + + /** + * MessageAddOnType enum. + * @name proto.MessageAddOn.MessageAddOnType + * @enum {number} + * @property {number} UNDEFINED=0 UNDEFINED value + * @property {number} REACTION=1 REACTION value + * @property {number} EVENT_RESPONSE=2 EVENT_RESPONSE value + * @property {number} POLL_UPDATE=3 POLL_UPDATE value + * @property {number} PIN_IN_CHAT=4 PIN_IN_CHAT value + */ + MessageAddOn.MessageAddOnType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNDEFINED"] = 0; + values[valuesById[1] = "REACTION"] = 1; + values[valuesById[2] = "EVENT_RESPONSE"] = 2; + values[valuesById[3] = "POLL_UPDATE"] = 3; + values[valuesById[4] = "PIN_IN_CHAT"] = 4; + return values; + })(); + + return MessageAddOn; + })(); + proto.MessageAddOnContextInfo = (function() { /** @@ -63479,6 +102926,7 @@ $root.proto = (function() { * @memberof proto * @interface IMessageAddOnContextInfo * @property {number|null} [messageAddOnDurationInSecs] MessageAddOnContextInfo messageAddOnDurationInSecs + * @property {proto.MessageContextInfo.MessageAddonExpiryType|null} [messageAddOnExpiryType] MessageAddOnContextInfo messageAddOnExpiryType */ /** @@ -63498,11 +102946,34 @@ $root.proto = (function() { /** * MessageAddOnContextInfo messageAddOnDurationInSecs. - * @member {number} messageAddOnDurationInSecs + * @member {number|null|undefined} messageAddOnDurationInSecs * @memberof proto.MessageAddOnContextInfo * @instance */ - MessageAddOnContextInfo.prototype.messageAddOnDurationInSecs = 0; + MessageAddOnContextInfo.prototype.messageAddOnDurationInSecs = null; + + /** + * MessageAddOnContextInfo messageAddOnExpiryType. + * @member {proto.MessageContextInfo.MessageAddonExpiryType|null|undefined} messageAddOnExpiryType + * @memberof proto.MessageAddOnContextInfo + * @instance + */ + MessageAddOnContextInfo.prototype.messageAddOnExpiryType = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MessageAddOnContextInfo.prototype, "_messageAddOnDurationInSecs", { + get: $util.oneOfGetter($oneOfFields = ["messageAddOnDurationInSecs"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MessageAddOnContextInfo.prototype, "_messageAddOnExpiryType", { + get: $util.oneOfGetter($oneOfFields = ["messageAddOnExpiryType"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new MessageAddOnContextInfo instance using the specified properties. @@ -63530,6 +103001,8 @@ $root.proto = (function() { writer = $Writer.create(); if (message.messageAddOnDurationInSecs != null && Object.hasOwnProperty.call(message, "messageAddOnDurationInSecs")) writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.messageAddOnDurationInSecs); + if (message.messageAddOnExpiryType != null && Object.hasOwnProperty.call(message, "messageAddOnExpiryType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.messageAddOnExpiryType); return writer; }; @@ -63564,9 +103037,14 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.messageAddOnDurationInSecs = reader.uint32(); - break; + case 1: { + message.messageAddOnDurationInSecs = reader.uint32(); + break; + } + case 2: { + message.messageAddOnExpiryType = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -63602,9 +103080,22 @@ $root.proto = (function() { MessageAddOnContextInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.messageAddOnDurationInSecs != null && message.hasOwnProperty("messageAddOnDurationInSecs")) + var properties = {}; + if (message.messageAddOnDurationInSecs != null && message.hasOwnProperty("messageAddOnDurationInSecs")) { + properties._messageAddOnDurationInSecs = 1; if (!$util.isInteger(message.messageAddOnDurationInSecs)) return "messageAddOnDurationInSecs: integer expected"; + } + if (message.messageAddOnExpiryType != null && message.hasOwnProperty("messageAddOnExpiryType")) { + properties._messageAddOnExpiryType = 1; + switch (message.messageAddOnExpiryType) { + default: + return "messageAddOnExpiryType: enum value expected"; + case 1: + case 2: + break; + } + } return null; }; @@ -63622,6 +103113,22 @@ $root.proto = (function() { var message = new $root.proto.MessageAddOnContextInfo(); if (object.messageAddOnDurationInSecs != null) message.messageAddOnDurationInSecs = object.messageAddOnDurationInSecs >>> 0; + switch (object.messageAddOnExpiryType) { + default: + if (typeof object.messageAddOnExpiryType === "number") { + message.messageAddOnExpiryType = object.messageAddOnExpiryType; + break; + } + break; + case "STATIC": + case 1: + message.messageAddOnExpiryType = 1; + break; + case "DEPENDENT_ON_PARENT": + case 2: + message.messageAddOnExpiryType = 2; + break; + } return message; }; @@ -63638,10 +103145,16 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) - object.messageAddOnDurationInSecs = 0; - if (message.messageAddOnDurationInSecs != null && message.hasOwnProperty("messageAddOnDurationInSecs")) + if (message.messageAddOnDurationInSecs != null && message.hasOwnProperty("messageAddOnDurationInSecs")) { object.messageAddOnDurationInSecs = message.messageAddOnDurationInSecs; + if (options.oneofs) + object._messageAddOnDurationInSecs = "messageAddOnDurationInSecs"; + } + if (message.messageAddOnExpiryType != null && message.hasOwnProperty("messageAddOnExpiryType")) { + object.messageAddOnExpiryType = options.enums === String ? $root.proto.MessageContextInfo.MessageAddonExpiryType[message.messageAddOnExpiryType] === undefined ? message.messageAddOnExpiryType : $root.proto.MessageContextInfo.MessageAddonExpiryType[message.messageAddOnExpiryType] : message.messageAddOnExpiryType; + if (options.oneofs) + object._messageAddOnExpiryType = "messageAddOnExpiryType"; + } return object; }; @@ -63656,9 +103169,415 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for MessageAddOnContextInfo + * @function getTypeUrl + * @memberof proto.MessageAddOnContextInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MessageAddOnContextInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.MessageAddOnContextInfo"; + }; + return MessageAddOnContextInfo; })(); + proto.MessageAssociation = (function() { + + /** + * Properties of a MessageAssociation. + * @memberof proto + * @interface IMessageAssociation + * @property {proto.MessageAssociation.AssociationType|null} [associationType] MessageAssociation associationType + * @property {proto.IMessageKey|null} [parentMessageKey] MessageAssociation parentMessageKey + * @property {number|null} [messageIndex] MessageAssociation messageIndex + */ + + /** + * Constructs a new MessageAssociation. + * @memberof proto + * @classdesc Represents a MessageAssociation. + * @implements IMessageAssociation + * @constructor + * @param {proto.IMessageAssociation=} [properties] Properties to set + */ + function MessageAssociation(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MessageAssociation associationType. + * @member {proto.MessageAssociation.AssociationType|null|undefined} associationType + * @memberof proto.MessageAssociation + * @instance + */ + MessageAssociation.prototype.associationType = null; + + /** + * MessageAssociation parentMessageKey. + * @member {proto.IMessageKey|null|undefined} parentMessageKey + * @memberof proto.MessageAssociation + * @instance + */ + MessageAssociation.prototype.parentMessageKey = null; + + /** + * MessageAssociation messageIndex. + * @member {number|null|undefined} messageIndex + * @memberof proto.MessageAssociation + * @instance + */ + MessageAssociation.prototype.messageIndex = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MessageAssociation.prototype, "_associationType", { + get: $util.oneOfGetter($oneOfFields = ["associationType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MessageAssociation.prototype, "_parentMessageKey", { + get: $util.oneOfGetter($oneOfFields = ["parentMessageKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MessageAssociation.prototype, "_messageIndex", { + get: $util.oneOfGetter($oneOfFields = ["messageIndex"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new MessageAssociation instance using the specified properties. + * @function create + * @memberof proto.MessageAssociation + * @static + * @param {proto.IMessageAssociation=} [properties] Properties to set + * @returns {proto.MessageAssociation} MessageAssociation instance + */ + MessageAssociation.create = function create(properties) { + return new MessageAssociation(properties); + }; + + /** + * Encodes the specified MessageAssociation message. Does not implicitly {@link proto.MessageAssociation.verify|verify} messages. + * @function encode + * @memberof proto.MessageAssociation + * @static + * @param {proto.IMessageAssociation} message MessageAssociation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageAssociation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.associationType != null && Object.hasOwnProperty.call(message, "associationType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.associationType); + if (message.parentMessageKey != null && Object.hasOwnProperty.call(message, "parentMessageKey")) + $root.proto.MessageKey.encode(message.parentMessageKey, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.messageIndex != null && Object.hasOwnProperty.call(message, "messageIndex")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.messageIndex); + return writer; + }; + + /** + * Encodes the specified MessageAssociation message, length delimited. Does not implicitly {@link proto.MessageAssociation.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.MessageAssociation + * @static + * @param {proto.IMessageAssociation} message MessageAssociation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageAssociation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MessageAssociation message from the specified reader or buffer. + * @function decode + * @memberof proto.MessageAssociation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.MessageAssociation} MessageAssociation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageAssociation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.MessageAssociation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.associationType = reader.int32(); + break; + } + case 2: { + message.parentMessageKey = $root.proto.MessageKey.decode(reader, reader.uint32()); + break; + } + case 3: { + message.messageIndex = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MessageAssociation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.MessageAssociation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.MessageAssociation} MessageAssociation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageAssociation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MessageAssociation message. + * @function verify + * @memberof proto.MessageAssociation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MessageAssociation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.associationType != null && message.hasOwnProperty("associationType")) { + properties._associationType = 1; + switch (message.associationType) { + default: + return "associationType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + break; + } + } + if (message.parentMessageKey != null && message.hasOwnProperty("parentMessageKey")) { + properties._parentMessageKey = 1; + { + var error = $root.proto.MessageKey.verify(message.parentMessageKey); + if (error) + return "parentMessageKey." + error; + } + } + if (message.messageIndex != null && message.hasOwnProperty("messageIndex")) { + properties._messageIndex = 1; + if (!$util.isInteger(message.messageIndex)) + return "messageIndex: integer expected"; + } + return null; + }; + + /** + * Creates a MessageAssociation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.MessageAssociation + * @static + * @param {Object.} object Plain object + * @returns {proto.MessageAssociation} MessageAssociation + */ + MessageAssociation.fromObject = function fromObject(object) { + if (object instanceof $root.proto.MessageAssociation) + return object; + var message = new $root.proto.MessageAssociation(); + switch (object.associationType) { + default: + if (typeof object.associationType === "number") { + message.associationType = object.associationType; + break; + } + break; + case "UNKNOWN": + case 0: + message.associationType = 0; + break; + case "MEDIA_ALBUM": + case 1: + message.associationType = 1; + break; + case "BOT_PLUGIN": + case 2: + message.associationType = 2; + break; + case "EVENT_COVER_IMAGE": + case 3: + message.associationType = 3; + break; + case "STATUS_POLL": + case 4: + message.associationType = 4; + break; + case "HD_VIDEO_DUAL_UPLOAD": + case 5: + message.associationType = 5; + break; + case "STATUS_TAPPABLE_MESSAGE": + case 6: + message.associationType = 6; + break; + case "MEDIA_POLL": + case 7: + message.associationType = 7; + break; + case "STATUS_ADD_YOURS": + case 8: + message.associationType = 8; + break; + case "STATUS_NOTIFICATION": + case 9: + message.associationType = 9; + break; + case "HD_IMAGE_DUAL_UPLOAD": + case 10: + message.associationType = 10; + break; + case "STICKER_ANNOTATION": + case 11: + message.associationType = 11; + break; + } + if (object.parentMessageKey != null) { + if (typeof object.parentMessageKey !== "object") + throw TypeError(".proto.MessageAssociation.parentMessageKey: object expected"); + message.parentMessageKey = $root.proto.MessageKey.fromObject(object.parentMessageKey); + } + if (object.messageIndex != null) + message.messageIndex = object.messageIndex | 0; + return message; + }; + + /** + * Creates a plain object from a MessageAssociation message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.MessageAssociation + * @static + * @param {proto.MessageAssociation} message MessageAssociation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MessageAssociation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.associationType != null && message.hasOwnProperty("associationType")) { + object.associationType = options.enums === String ? $root.proto.MessageAssociation.AssociationType[message.associationType] === undefined ? message.associationType : $root.proto.MessageAssociation.AssociationType[message.associationType] : message.associationType; + if (options.oneofs) + object._associationType = "associationType"; + } + if (message.parentMessageKey != null && message.hasOwnProperty("parentMessageKey")) { + object.parentMessageKey = $root.proto.MessageKey.toObject(message.parentMessageKey, options); + if (options.oneofs) + object._parentMessageKey = "parentMessageKey"; + } + if (message.messageIndex != null && message.hasOwnProperty("messageIndex")) { + object.messageIndex = message.messageIndex; + if (options.oneofs) + object._messageIndex = "messageIndex"; + } + return object; + }; + + /** + * Converts this MessageAssociation to JSON. + * @function toJSON + * @memberof proto.MessageAssociation + * @instance + * @returns {Object.} JSON object + */ + MessageAssociation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MessageAssociation + * @function getTypeUrl + * @memberof proto.MessageAssociation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MessageAssociation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.MessageAssociation"; + }; + + /** + * AssociationType enum. + * @name proto.MessageAssociation.AssociationType + * @enum {number} + * @property {number} UNKNOWN=0 UNKNOWN value + * @property {number} MEDIA_ALBUM=1 MEDIA_ALBUM value + * @property {number} BOT_PLUGIN=2 BOT_PLUGIN value + * @property {number} EVENT_COVER_IMAGE=3 EVENT_COVER_IMAGE value + * @property {number} STATUS_POLL=4 STATUS_POLL value + * @property {number} HD_VIDEO_DUAL_UPLOAD=5 HD_VIDEO_DUAL_UPLOAD value + * @property {number} STATUS_TAPPABLE_MESSAGE=6 STATUS_TAPPABLE_MESSAGE value + * @property {number} MEDIA_POLL=7 MEDIA_POLL value + * @property {number} STATUS_ADD_YOURS=8 STATUS_ADD_YOURS value + * @property {number} STATUS_NOTIFICATION=9 STATUS_NOTIFICATION value + * @property {number} HD_IMAGE_DUAL_UPLOAD=10 HD_IMAGE_DUAL_UPLOAD value + * @property {number} STICKER_ANNOTATION=11 STICKER_ANNOTATION value + */ + MessageAssociation.AssociationType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNKNOWN"] = 0; + values[valuesById[1] = "MEDIA_ALBUM"] = 1; + values[valuesById[2] = "BOT_PLUGIN"] = 2; + values[valuesById[3] = "EVENT_COVER_IMAGE"] = 3; + values[valuesById[4] = "STATUS_POLL"] = 4; + values[valuesById[5] = "HD_VIDEO_DUAL_UPLOAD"] = 5; + values[valuesById[6] = "STATUS_TAPPABLE_MESSAGE"] = 6; + values[valuesById[7] = "MEDIA_POLL"] = 7; + values[valuesById[8] = "STATUS_ADD_YOURS"] = 8; + values[valuesById[9] = "STATUS_NOTIFICATION"] = 9; + values[valuesById[10] = "HD_IMAGE_DUAL_UPLOAD"] = 10; + values[valuesById[11] = "STICKER_ANNOTATION"] = 11; + return values; + })(); + + return MessageAssociation; + })(); + proto.MessageContextInfo = (function() { /** @@ -63673,6 +103592,10 @@ $root.proto = (function() { * @property {Uint8Array|null} [botMessageSecret] MessageContextInfo botMessageSecret * @property {proto.IBotMetadata|null} [botMetadata] MessageContextInfo botMetadata * @property {number|null} [reportingTokenVersion] MessageContextInfo reportingTokenVersion + * @property {proto.MessageContextInfo.MessageAddonExpiryType|null} [messageAddOnExpiryType] MessageContextInfo messageAddOnExpiryType + * @property {proto.IMessageAssociation|null} [messageAssociation] MessageContextInfo messageAssociation + * @property {boolean|null} [capiCreatedGroup] MessageContextInfo capiCreatedGroup + * @property {string|null} [supportPayload] MessageContextInfo supportPayload */ /** @@ -63700,43 +103623,43 @@ $root.proto = (function() { /** * MessageContextInfo deviceListMetadataVersion. - * @member {number} deviceListMetadataVersion + * @member {number|null|undefined} deviceListMetadataVersion * @memberof proto.MessageContextInfo * @instance */ - MessageContextInfo.prototype.deviceListMetadataVersion = 0; + MessageContextInfo.prototype.deviceListMetadataVersion = null; /** * MessageContextInfo messageSecret. - * @member {Uint8Array} messageSecret + * @member {Uint8Array|null|undefined} messageSecret * @memberof proto.MessageContextInfo * @instance */ - MessageContextInfo.prototype.messageSecret = $util.newBuffer([]); + MessageContextInfo.prototype.messageSecret = null; /** * MessageContextInfo paddingBytes. - * @member {Uint8Array} paddingBytes + * @member {Uint8Array|null|undefined} paddingBytes * @memberof proto.MessageContextInfo * @instance */ - MessageContextInfo.prototype.paddingBytes = $util.newBuffer([]); + MessageContextInfo.prototype.paddingBytes = null; /** * MessageContextInfo messageAddOnDurationInSecs. - * @member {number} messageAddOnDurationInSecs + * @member {number|null|undefined} messageAddOnDurationInSecs * @memberof proto.MessageContextInfo * @instance */ - MessageContextInfo.prototype.messageAddOnDurationInSecs = 0; + MessageContextInfo.prototype.messageAddOnDurationInSecs = null; /** * MessageContextInfo botMessageSecret. - * @member {Uint8Array} botMessageSecret + * @member {Uint8Array|null|undefined} botMessageSecret * @memberof proto.MessageContextInfo * @instance */ - MessageContextInfo.prototype.botMessageSecret = $util.newBuffer([]); + MessageContextInfo.prototype.botMessageSecret = null; /** * MessageContextInfo botMetadata. @@ -63748,11 +103671,118 @@ $root.proto = (function() { /** * MessageContextInfo reportingTokenVersion. - * @member {number} reportingTokenVersion + * @member {number|null|undefined} reportingTokenVersion * @memberof proto.MessageContextInfo * @instance */ - MessageContextInfo.prototype.reportingTokenVersion = 0; + MessageContextInfo.prototype.reportingTokenVersion = null; + + /** + * MessageContextInfo messageAddOnExpiryType. + * @member {proto.MessageContextInfo.MessageAddonExpiryType|null|undefined} messageAddOnExpiryType + * @memberof proto.MessageContextInfo + * @instance + */ + MessageContextInfo.prototype.messageAddOnExpiryType = null; + + /** + * MessageContextInfo messageAssociation. + * @member {proto.IMessageAssociation|null|undefined} messageAssociation + * @memberof proto.MessageContextInfo + * @instance + */ + MessageContextInfo.prototype.messageAssociation = null; + + /** + * MessageContextInfo capiCreatedGroup. + * @member {boolean|null|undefined} capiCreatedGroup + * @memberof proto.MessageContextInfo + * @instance + */ + MessageContextInfo.prototype.capiCreatedGroup = null; + + /** + * MessageContextInfo supportPayload. + * @member {string|null|undefined} supportPayload + * @memberof proto.MessageContextInfo + * @instance + */ + MessageContextInfo.prototype.supportPayload = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MessageContextInfo.prototype, "_deviceListMetadata", { + get: $util.oneOfGetter($oneOfFields = ["deviceListMetadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MessageContextInfo.prototype, "_deviceListMetadataVersion", { + get: $util.oneOfGetter($oneOfFields = ["deviceListMetadataVersion"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MessageContextInfo.prototype, "_messageSecret", { + get: $util.oneOfGetter($oneOfFields = ["messageSecret"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MessageContextInfo.prototype, "_paddingBytes", { + get: $util.oneOfGetter($oneOfFields = ["paddingBytes"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MessageContextInfo.prototype, "_messageAddOnDurationInSecs", { + get: $util.oneOfGetter($oneOfFields = ["messageAddOnDurationInSecs"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MessageContextInfo.prototype, "_botMessageSecret", { + get: $util.oneOfGetter($oneOfFields = ["botMessageSecret"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MessageContextInfo.prototype, "_botMetadata", { + get: $util.oneOfGetter($oneOfFields = ["botMetadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MessageContextInfo.prototype, "_reportingTokenVersion", { + get: $util.oneOfGetter($oneOfFields = ["reportingTokenVersion"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MessageContextInfo.prototype, "_messageAddOnExpiryType", { + get: $util.oneOfGetter($oneOfFields = ["messageAddOnExpiryType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MessageContextInfo.prototype, "_messageAssociation", { + get: $util.oneOfGetter($oneOfFields = ["messageAssociation"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MessageContextInfo.prototype, "_capiCreatedGroup", { + get: $util.oneOfGetter($oneOfFields = ["capiCreatedGroup"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MessageContextInfo.prototype, "_supportPayload", { + get: $util.oneOfGetter($oneOfFields = ["supportPayload"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new MessageContextInfo instance using the specified properties. @@ -63794,6 +103824,14 @@ $root.proto = (function() { $root.proto.BotMetadata.encode(message.botMetadata, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); if (message.reportingTokenVersion != null && Object.hasOwnProperty.call(message, "reportingTokenVersion")) writer.uint32(/* id 8, wireType 0 =*/64).int32(message.reportingTokenVersion); + if (message.messageAddOnExpiryType != null && Object.hasOwnProperty.call(message, "messageAddOnExpiryType")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.messageAddOnExpiryType); + if (message.messageAssociation != null && Object.hasOwnProperty.call(message, "messageAssociation")) + $root.proto.MessageAssociation.encode(message.messageAssociation, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.capiCreatedGroup != null && Object.hasOwnProperty.call(message, "capiCreatedGroup")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.capiCreatedGroup); + if (message.supportPayload != null && Object.hasOwnProperty.call(message, "supportPayload")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.supportPayload); return writer; }; @@ -63828,30 +103866,54 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.deviceListMetadata = $root.proto.DeviceListMetadata.decode(reader, reader.uint32()); - break; - case 2: - message.deviceListMetadataVersion = reader.int32(); - break; - case 3: - message.messageSecret = reader.bytes(); - break; - case 4: - message.paddingBytes = reader.bytes(); - break; - case 5: - message.messageAddOnDurationInSecs = reader.uint32(); - break; - case 6: - message.botMessageSecret = reader.bytes(); - break; - case 7: - message.botMetadata = $root.proto.BotMetadata.decode(reader, reader.uint32()); - break; - case 8: - message.reportingTokenVersion = reader.int32(); - break; + case 1: { + message.deviceListMetadata = $root.proto.DeviceListMetadata.decode(reader, reader.uint32()); + break; + } + case 2: { + message.deviceListMetadataVersion = reader.int32(); + break; + } + case 3: { + message.messageSecret = reader.bytes(); + break; + } + case 4: { + message.paddingBytes = reader.bytes(); + break; + } + case 5: { + message.messageAddOnDurationInSecs = reader.uint32(); + break; + } + case 6: { + message.botMessageSecret = reader.bytes(); + break; + } + case 7: { + message.botMetadata = $root.proto.BotMetadata.decode(reader, reader.uint32()); + break; + } + case 8: { + message.reportingTokenVersion = reader.int32(); + break; + } + case 9: { + message.messageAddOnExpiryType = reader.int32(); + break; + } + case 10: { + message.messageAssociation = $root.proto.MessageAssociation.decode(reader, reader.uint32()); + break; + } + case 11: { + message.capiCreatedGroup = reader.bool(); + break; + } + case 12: { + message.supportPayload = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -63887,34 +103949,81 @@ $root.proto = (function() { MessageContextInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; if (message.deviceListMetadata != null && message.hasOwnProperty("deviceListMetadata")) { - var error = $root.proto.DeviceListMetadata.verify(message.deviceListMetadata); - if (error) - return "deviceListMetadata." + error; + properties._deviceListMetadata = 1; + { + var error = $root.proto.DeviceListMetadata.verify(message.deviceListMetadata); + if (error) + return "deviceListMetadata." + error; + } } - if (message.deviceListMetadataVersion != null && message.hasOwnProperty("deviceListMetadataVersion")) + if (message.deviceListMetadataVersion != null && message.hasOwnProperty("deviceListMetadataVersion")) { + properties._deviceListMetadataVersion = 1; if (!$util.isInteger(message.deviceListMetadataVersion)) return "deviceListMetadataVersion: integer expected"; - if (message.messageSecret != null && message.hasOwnProperty("messageSecret")) + } + if (message.messageSecret != null && message.hasOwnProperty("messageSecret")) { + properties._messageSecret = 1; if (!(message.messageSecret && typeof message.messageSecret.length === "number" || $util.isString(message.messageSecret))) return "messageSecret: buffer expected"; - if (message.paddingBytes != null && message.hasOwnProperty("paddingBytes")) + } + if (message.paddingBytes != null && message.hasOwnProperty("paddingBytes")) { + properties._paddingBytes = 1; if (!(message.paddingBytes && typeof message.paddingBytes.length === "number" || $util.isString(message.paddingBytes))) return "paddingBytes: buffer expected"; - if (message.messageAddOnDurationInSecs != null && message.hasOwnProperty("messageAddOnDurationInSecs")) + } + if (message.messageAddOnDurationInSecs != null && message.hasOwnProperty("messageAddOnDurationInSecs")) { + properties._messageAddOnDurationInSecs = 1; if (!$util.isInteger(message.messageAddOnDurationInSecs)) return "messageAddOnDurationInSecs: integer expected"; - if (message.botMessageSecret != null && message.hasOwnProperty("botMessageSecret")) + } + if (message.botMessageSecret != null && message.hasOwnProperty("botMessageSecret")) { + properties._botMessageSecret = 1; if (!(message.botMessageSecret && typeof message.botMessageSecret.length === "number" || $util.isString(message.botMessageSecret))) return "botMessageSecret: buffer expected"; - if (message.botMetadata != null && message.hasOwnProperty("botMetadata")) { - var error = $root.proto.BotMetadata.verify(message.botMetadata); - if (error) - return "botMetadata." + error; } - if (message.reportingTokenVersion != null && message.hasOwnProperty("reportingTokenVersion")) + if (message.botMetadata != null && message.hasOwnProperty("botMetadata")) { + properties._botMetadata = 1; + { + var error = $root.proto.BotMetadata.verify(message.botMetadata); + if (error) + return "botMetadata." + error; + } + } + if (message.reportingTokenVersion != null && message.hasOwnProperty("reportingTokenVersion")) { + properties._reportingTokenVersion = 1; if (!$util.isInteger(message.reportingTokenVersion)) return "reportingTokenVersion: integer expected"; + } + if (message.messageAddOnExpiryType != null && message.hasOwnProperty("messageAddOnExpiryType")) { + properties._messageAddOnExpiryType = 1; + switch (message.messageAddOnExpiryType) { + default: + return "messageAddOnExpiryType: enum value expected"; + case 1: + case 2: + break; + } + } + if (message.messageAssociation != null && message.hasOwnProperty("messageAssociation")) { + properties._messageAssociation = 1; + { + var error = $root.proto.MessageAssociation.verify(message.messageAssociation); + if (error) + return "messageAssociation." + error; + } + } + if (message.capiCreatedGroup != null && message.hasOwnProperty("capiCreatedGroup")) { + properties._capiCreatedGroup = 1; + if (typeof message.capiCreatedGroup !== "boolean") + return "capiCreatedGroup: boolean expected"; + } + if (message.supportPayload != null && message.hasOwnProperty("supportPayload")) { + properties._supportPayload = 1; + if (!$util.isString(message.supportPayload)) + return "supportPayload: string expected"; + } return null; }; @@ -63940,19 +104049,19 @@ $root.proto = (function() { if (object.messageSecret != null) if (typeof object.messageSecret === "string") $util.base64.decode(object.messageSecret, message.messageSecret = $util.newBuffer($util.base64.length(object.messageSecret)), 0); - else if (object.messageSecret.length) + else if (object.messageSecret.length >= 0) message.messageSecret = object.messageSecret; if (object.paddingBytes != null) if (typeof object.paddingBytes === "string") $util.base64.decode(object.paddingBytes, message.paddingBytes = $util.newBuffer($util.base64.length(object.paddingBytes)), 0); - else if (object.paddingBytes.length) + else if (object.paddingBytes.length >= 0) message.paddingBytes = object.paddingBytes; if (object.messageAddOnDurationInSecs != null) message.messageAddOnDurationInSecs = object.messageAddOnDurationInSecs >>> 0; if (object.botMessageSecret != null) if (typeof object.botMessageSecret === "string") $util.base64.decode(object.botMessageSecret, message.botMessageSecret = $util.newBuffer($util.base64.length(object.botMessageSecret)), 0); - else if (object.botMessageSecret.length) + else if (object.botMessageSecret.length >= 0) message.botMessageSecret = object.botMessageSecret; if (object.botMetadata != null) { if (typeof object.botMetadata !== "object") @@ -63961,6 +104070,31 @@ $root.proto = (function() { } if (object.reportingTokenVersion != null) message.reportingTokenVersion = object.reportingTokenVersion | 0; + switch (object.messageAddOnExpiryType) { + default: + if (typeof object.messageAddOnExpiryType === "number") { + message.messageAddOnExpiryType = object.messageAddOnExpiryType; + break; + } + break; + case "STATIC": + case 1: + message.messageAddOnExpiryType = 1; + break; + case "DEPENDENT_ON_PARENT": + case 2: + message.messageAddOnExpiryType = 2; + break; + } + if (object.messageAssociation != null) { + if (typeof object.messageAssociation !== "object") + throw TypeError(".proto.MessageContextInfo.messageAssociation: object expected"); + message.messageAssociation = $root.proto.MessageAssociation.fromObject(object.messageAssociation); + } + if (object.capiCreatedGroup != null) + message.capiCreatedGroup = Boolean(object.capiCreatedGroup); + if (object.supportPayload != null) + message.supportPayload = String(object.supportPayload); return message; }; @@ -63977,50 +104111,66 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.deviceListMetadata = null; - object.deviceListMetadataVersion = 0; - if (options.bytes === String) - object.messageSecret = ""; - else { - object.messageSecret = []; - if (options.bytes !== Array) - object.messageSecret = $util.newBuffer(object.messageSecret); - } - if (options.bytes === String) - object.paddingBytes = ""; - else { - object.paddingBytes = []; - if (options.bytes !== Array) - object.paddingBytes = $util.newBuffer(object.paddingBytes); - } - object.messageAddOnDurationInSecs = 0; - if (options.bytes === String) - object.botMessageSecret = ""; - else { - object.botMessageSecret = []; - if (options.bytes !== Array) - object.botMessageSecret = $util.newBuffer(object.botMessageSecret); - } - object.botMetadata = null; - object.reportingTokenVersion = 0; - } - if (message.deviceListMetadata != null && message.hasOwnProperty("deviceListMetadata")) + if (message.deviceListMetadata != null && message.hasOwnProperty("deviceListMetadata")) { object.deviceListMetadata = $root.proto.DeviceListMetadata.toObject(message.deviceListMetadata, options); - if (message.deviceListMetadataVersion != null && message.hasOwnProperty("deviceListMetadataVersion")) + if (options.oneofs) + object._deviceListMetadata = "deviceListMetadata"; + } + if (message.deviceListMetadataVersion != null && message.hasOwnProperty("deviceListMetadataVersion")) { object.deviceListMetadataVersion = message.deviceListMetadataVersion; - if (message.messageSecret != null && message.hasOwnProperty("messageSecret")) + if (options.oneofs) + object._deviceListMetadataVersion = "deviceListMetadataVersion"; + } + if (message.messageSecret != null && message.hasOwnProperty("messageSecret")) { object.messageSecret = options.bytes === String ? $util.base64.encode(message.messageSecret, 0, message.messageSecret.length) : options.bytes === Array ? Array.prototype.slice.call(message.messageSecret) : message.messageSecret; - if (message.paddingBytes != null && message.hasOwnProperty("paddingBytes")) + if (options.oneofs) + object._messageSecret = "messageSecret"; + } + if (message.paddingBytes != null && message.hasOwnProperty("paddingBytes")) { object.paddingBytes = options.bytes === String ? $util.base64.encode(message.paddingBytes, 0, message.paddingBytes.length) : options.bytes === Array ? Array.prototype.slice.call(message.paddingBytes) : message.paddingBytes; - if (message.messageAddOnDurationInSecs != null && message.hasOwnProperty("messageAddOnDurationInSecs")) + if (options.oneofs) + object._paddingBytes = "paddingBytes"; + } + if (message.messageAddOnDurationInSecs != null && message.hasOwnProperty("messageAddOnDurationInSecs")) { object.messageAddOnDurationInSecs = message.messageAddOnDurationInSecs; - if (message.botMessageSecret != null && message.hasOwnProperty("botMessageSecret")) + if (options.oneofs) + object._messageAddOnDurationInSecs = "messageAddOnDurationInSecs"; + } + if (message.botMessageSecret != null && message.hasOwnProperty("botMessageSecret")) { object.botMessageSecret = options.bytes === String ? $util.base64.encode(message.botMessageSecret, 0, message.botMessageSecret.length) : options.bytes === Array ? Array.prototype.slice.call(message.botMessageSecret) : message.botMessageSecret; - if (message.botMetadata != null && message.hasOwnProperty("botMetadata")) + if (options.oneofs) + object._botMessageSecret = "botMessageSecret"; + } + if (message.botMetadata != null && message.hasOwnProperty("botMetadata")) { object.botMetadata = $root.proto.BotMetadata.toObject(message.botMetadata, options); - if (message.reportingTokenVersion != null && message.hasOwnProperty("reportingTokenVersion")) + if (options.oneofs) + object._botMetadata = "botMetadata"; + } + if (message.reportingTokenVersion != null && message.hasOwnProperty("reportingTokenVersion")) { object.reportingTokenVersion = message.reportingTokenVersion; + if (options.oneofs) + object._reportingTokenVersion = "reportingTokenVersion"; + } + if (message.messageAddOnExpiryType != null && message.hasOwnProperty("messageAddOnExpiryType")) { + object.messageAddOnExpiryType = options.enums === String ? $root.proto.MessageContextInfo.MessageAddonExpiryType[message.messageAddOnExpiryType] === undefined ? message.messageAddOnExpiryType : $root.proto.MessageContextInfo.MessageAddonExpiryType[message.messageAddOnExpiryType] : message.messageAddOnExpiryType; + if (options.oneofs) + object._messageAddOnExpiryType = "messageAddOnExpiryType"; + } + if (message.messageAssociation != null && message.hasOwnProperty("messageAssociation")) { + object.messageAssociation = $root.proto.MessageAssociation.toObject(message.messageAssociation, options); + if (options.oneofs) + object._messageAssociation = "messageAssociation"; + } + if (message.capiCreatedGroup != null && message.hasOwnProperty("capiCreatedGroup")) { + object.capiCreatedGroup = message.capiCreatedGroup; + if (options.oneofs) + object._capiCreatedGroup = "capiCreatedGroup"; + } + if (message.supportPayload != null && message.hasOwnProperty("supportPayload")) { + object.supportPayload = message.supportPayload; + if (options.oneofs) + object._supportPayload = "supportPayload"; + } return object; }; @@ -64035,6 +104185,35 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for MessageContextInfo + * @function getTypeUrl + * @memberof proto.MessageContextInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MessageContextInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.MessageContextInfo"; + }; + + /** + * MessageAddonExpiryType enum. + * @name proto.MessageContextInfo.MessageAddonExpiryType + * @enum {number} + * @property {number} STATIC=1 STATIC value + * @property {number} DEPENDENT_ON_PARENT=2 DEPENDENT_ON_PARENT value + */ + MessageContextInfo.MessageAddonExpiryType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "STATIC"] = 1; + values[valuesById[2] = "DEPENDENT_ON_PARENT"] = 2; + return values; + })(); + return MessageContextInfo; })(); @@ -64067,35 +104246,62 @@ $root.proto = (function() { /** * MessageKey remoteJid. - * @member {string} remoteJid + * @member {string|null|undefined} remoteJid * @memberof proto.MessageKey * @instance */ - MessageKey.prototype.remoteJid = ""; + MessageKey.prototype.remoteJid = null; /** * MessageKey fromMe. - * @member {boolean} fromMe + * @member {boolean|null|undefined} fromMe * @memberof proto.MessageKey * @instance */ - MessageKey.prototype.fromMe = false; + MessageKey.prototype.fromMe = null; /** * MessageKey id. - * @member {string} id + * @member {string|null|undefined} id * @memberof proto.MessageKey * @instance */ - MessageKey.prototype.id = ""; + MessageKey.prototype.id = null; /** * MessageKey participant. - * @member {string} participant + * @member {string|null|undefined} participant * @memberof proto.MessageKey * @instance */ - MessageKey.prototype.participant = ""; + MessageKey.prototype.participant = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MessageKey.prototype, "_remoteJid", { + get: $util.oneOfGetter($oneOfFields = ["remoteJid"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MessageKey.prototype, "_fromMe", { + get: $util.oneOfGetter($oneOfFields = ["fromMe"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MessageKey.prototype, "_id", { + get: $util.oneOfGetter($oneOfFields = ["id"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MessageKey.prototype, "_participant", { + get: $util.oneOfGetter($oneOfFields = ["participant"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new MessageKey instance using the specified properties. @@ -64163,18 +104369,22 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.remoteJid = reader.string(); - break; - case 2: - message.fromMe = reader.bool(); - break; - case 3: - message.id = reader.string(); - break; - case 4: - message.participant = reader.string(); - break; + case 1: { + message.remoteJid = reader.string(); + break; + } + case 2: { + message.fromMe = reader.bool(); + break; + } + case 3: { + message.id = reader.string(); + break; + } + case 4: { + message.participant = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -64210,18 +104420,27 @@ $root.proto = (function() { MessageKey.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.remoteJid != null && message.hasOwnProperty("remoteJid")) + var properties = {}; + if (message.remoteJid != null && message.hasOwnProperty("remoteJid")) { + properties._remoteJid = 1; if (!$util.isString(message.remoteJid)) return "remoteJid: string expected"; - if (message.fromMe != null && message.hasOwnProperty("fromMe")) + } + if (message.fromMe != null && message.hasOwnProperty("fromMe")) { + properties._fromMe = 1; if (typeof message.fromMe !== "boolean") return "fromMe: boolean expected"; - if (message.id != null && message.hasOwnProperty("id")) + } + if (message.id != null && message.hasOwnProperty("id")) { + properties._id = 1; if (!$util.isString(message.id)) return "id: string expected"; - if (message.participant != null && message.hasOwnProperty("participant")) + } + if (message.participant != null && message.hasOwnProperty("participant")) { + properties._participant = 1; if (!$util.isString(message.participant)) return "participant: string expected"; + } return null; }; @@ -64261,20 +104480,26 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.remoteJid = ""; - object.fromMe = false; - object.id = ""; - object.participant = ""; - } - if (message.remoteJid != null && message.hasOwnProperty("remoteJid")) + if (message.remoteJid != null && message.hasOwnProperty("remoteJid")) { object.remoteJid = message.remoteJid; - if (message.fromMe != null && message.hasOwnProperty("fromMe")) + if (options.oneofs) + object._remoteJid = "remoteJid"; + } + if (message.fromMe != null && message.hasOwnProperty("fromMe")) { object.fromMe = message.fromMe; - if (message.id != null && message.hasOwnProperty("id")) + if (options.oneofs) + object._fromMe = "fromMe"; + } + if (message.id != null && message.hasOwnProperty("id")) { object.id = message.id; - if (message.participant != null && message.hasOwnProperty("participant")) + if (options.oneofs) + object._id = "id"; + } + if (message.participant != null && message.hasOwnProperty("participant")) { object.participant = message.participant; + if (options.oneofs) + object._participant = "participant"; + } return object; }; @@ -64289,6 +104514,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for MessageKey + * @function getTypeUrl + * @memberof proto.MessageKey + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MessageKey.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.MessageKey"; + }; + return MessageKey; })(); @@ -64320,27 +104560,48 @@ $root.proto = (function() { /** * MessageSecretMessage version. - * @member {number} version + * @member {number|null|undefined} version * @memberof proto.MessageSecretMessage * @instance */ - MessageSecretMessage.prototype.version = 0; + MessageSecretMessage.prototype.version = null; /** * MessageSecretMessage encIv. - * @member {Uint8Array} encIv + * @member {Uint8Array|null|undefined} encIv * @memberof proto.MessageSecretMessage * @instance */ - MessageSecretMessage.prototype.encIv = $util.newBuffer([]); + MessageSecretMessage.prototype.encIv = null; /** * MessageSecretMessage encPayload. - * @member {Uint8Array} encPayload + * @member {Uint8Array|null|undefined} encPayload * @memberof proto.MessageSecretMessage * @instance */ - MessageSecretMessage.prototype.encPayload = $util.newBuffer([]); + MessageSecretMessage.prototype.encPayload = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MessageSecretMessage.prototype, "_version", { + get: $util.oneOfGetter($oneOfFields = ["version"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MessageSecretMessage.prototype, "_encIv", { + get: $util.oneOfGetter($oneOfFields = ["encIv"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MessageSecretMessage.prototype, "_encPayload", { + get: $util.oneOfGetter($oneOfFields = ["encPayload"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new MessageSecretMessage instance using the specified properties. @@ -64406,15 +104667,18 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.version = reader.sfixed32(); - break; - case 2: - message.encIv = reader.bytes(); - break; - case 3: - message.encPayload = reader.bytes(); - break; + case 1: { + message.version = reader.sfixed32(); + break; + } + case 2: { + message.encIv = reader.bytes(); + break; + } + case 3: { + message.encPayload = reader.bytes(); + break; + } default: reader.skipType(tag & 7); break; @@ -64450,15 +104714,22 @@ $root.proto = (function() { MessageSecretMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.version != null && message.hasOwnProperty("version")) + var properties = {}; + if (message.version != null && message.hasOwnProperty("version")) { + properties._version = 1; if (!$util.isInteger(message.version)) return "version: integer expected"; - if (message.encIv != null && message.hasOwnProperty("encIv")) + } + if (message.encIv != null && message.hasOwnProperty("encIv")) { + properties._encIv = 1; if (!(message.encIv && typeof message.encIv.length === "number" || $util.isString(message.encIv))) return "encIv: buffer expected"; - if (message.encPayload != null && message.hasOwnProperty("encPayload")) + } + if (message.encPayload != null && message.hasOwnProperty("encPayload")) { + properties._encPayload = 1; if (!(message.encPayload && typeof message.encPayload.length === "number" || $util.isString(message.encPayload))) return "encPayload: buffer expected"; + } return null; }; @@ -64479,12 +104750,12 @@ $root.proto = (function() { 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) + else if (object.encIv.length >= 0) message.encIv = object.encIv; 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) + else if (object.encPayload.length >= 0) message.encPayload = object.encPayload; return message; }; @@ -64502,29 +104773,21 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.version = 0; - if (options.bytes === String) - object.encIv = ""; - else { - object.encIv = []; - if (options.bytes !== Array) - object.encIv = $util.newBuffer(object.encIv); - } - if (options.bytes === String) - object.encPayload = ""; - else { - object.encPayload = []; - if (options.bytes !== Array) - object.encPayload = $util.newBuffer(object.encPayload); - } - } - if (message.version != null && message.hasOwnProperty("version")) + if (message.version != null && message.hasOwnProperty("version")) { object.version = message.version; - if (message.encIv != null && message.hasOwnProperty("encIv")) + if (options.oneofs) + object._version = "version"; + } + 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; - if (message.encPayload != null && message.hasOwnProperty("encPayload")) + if (options.oneofs) + object._encIv = "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 (options.oneofs) + object._encPayload = "encPayload"; + } return object; }; @@ -64539,6 +104802,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for MessageSecretMessage + * @function getTypeUrl + * @memberof proto.MessageSecretMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MessageSecretMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.MessageSecretMessage"; + }; + return MessageSecretMessage; })(); @@ -64570,27 +104848,48 @@ $root.proto = (function() { /** * Money value. - * @member {number|Long} value + * @member {number|Long|null|undefined} value * @memberof proto.Money * @instance */ - Money.prototype.value = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + Money.prototype.value = null; /** * Money offset. - * @member {number} offset + * @member {number|null|undefined} offset * @memberof proto.Money * @instance */ - Money.prototype.offset = 0; + Money.prototype.offset = null; /** * Money currencyCode. - * @member {string} currencyCode + * @member {string|null|undefined} currencyCode * @memberof proto.Money * @instance */ - Money.prototype.currencyCode = ""; + Money.prototype.currencyCode = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Money.prototype, "_value", { + get: $util.oneOfGetter($oneOfFields = ["value"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Money.prototype, "_offset", { + get: $util.oneOfGetter($oneOfFields = ["offset"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Money.prototype, "_currencyCode", { + get: $util.oneOfGetter($oneOfFields = ["currencyCode"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new Money instance using the specified properties. @@ -64656,15 +104955,18 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.value = reader.int64(); - break; - case 2: - message.offset = reader.uint32(); - break; - case 3: - message.currencyCode = reader.string(); - break; + case 1: { + message.value = reader.int64(); + break; + } + case 2: { + message.offset = reader.uint32(); + break; + } + case 3: { + message.currencyCode = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -64700,15 +105002,22 @@ $root.proto = (function() { Money.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) + var properties = {}; + if (message.value != null && message.hasOwnProperty("value")) { + properties._value = 1; if (!$util.isInteger(message.value) && !(message.value && $util.isInteger(message.value.low) && $util.isInteger(message.value.high))) return "value: integer|Long expected"; - if (message.offset != null && message.hasOwnProperty("offset")) + } + if (message.offset != null && message.hasOwnProperty("offset")) { + properties._offset = 1; if (!$util.isInteger(message.offset)) return "offset: integer expected"; - if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) + } + if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) { + properties._currencyCode = 1; if (!$util.isString(message.currencyCode)) return "currencyCode: string expected"; + } return null; }; @@ -64753,24 +105062,24 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.value = options.longs === String ? "0" : 0; - object.offset = 0; - object.currencyCode = ""; - } - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && message.hasOwnProperty("value")) { if (typeof message.value === "number") object.value = options.longs === String ? String(message.value) : message.value; else object.value = options.longs === String ? $util.Long.prototype.toString.call(message.value) : options.longs === Number ? new $util.LongBits(message.value.low >>> 0, message.value.high >>> 0).toNumber() : message.value; - if (message.offset != null && message.hasOwnProperty("offset")) + if (options.oneofs) + object._value = "value"; + } + if (message.offset != null && message.hasOwnProperty("offset")) { object.offset = message.offset; - if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) + if (options.oneofs) + object._offset = "offset"; + } + if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) { object.currencyCode = message.currencyCode; + if (options.oneofs) + object._currencyCode = "currencyCode"; + } return object; }; @@ -64785,6 +105094,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Money + * @function getTypeUrl + * @memberof proto.Money + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Money.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Money"; + }; + return Money; })(); @@ -64801,7 +105125,6 @@ $root.proto = (function() { * @property {number|null} [lat] MsgOpaqueData lat * @property {number|null} [paymentAmount1000] MsgOpaqueData paymentAmount1000 * @property {string|null} [paymentNoteMsgBody] MsgOpaqueData paymentNoteMsgBody - * @property {string|null} [canonicalUrl] MsgOpaqueData canonicalUrl * @property {string|null} [matchedText] MsgOpaqueData matchedText * @property {string|null} [title] MsgOpaqueData title * @property {string|null} [description] MsgOpaqueData description @@ -64817,6 +105140,8 @@ $root.proto = (function() { * @property {string|null} [pollUpdateParentKey] MsgOpaqueData pollUpdateParentKey * @property {proto.IPollEncValue|null} [encPollVote] MsgOpaqueData encPollVote * @property {boolean|null} [isSentCagPollCreation] MsgOpaqueData isSentCagPollCreation + * @property {proto.MsgOpaqueData.PollContentType|null} [pollContentType] MsgOpaqueData pollContentType + * @property {proto.MsgOpaqueData.IPollVotesSnapshot|null} [pollVotesSnapshot] MsgOpaqueData pollVotesSnapshot * @property {string|null} [encReactionTargetMessageKey] MsgOpaqueData encReactionTargetMessageKey * @property {Uint8Array|null} [encReactionEncPayload] MsgOpaqueData encReactionEncPayload * @property {Uint8Array|null} [encReactionEncIv] MsgOpaqueData encReactionEncIv @@ -64824,6 +105149,13 @@ $root.proto = (function() { * @property {string|null} [targetMessageKey] MsgOpaqueData targetMessageKey * @property {Uint8Array|null} [encPayload] MsgOpaqueData encPayload * @property {Uint8Array|null} [encIv] MsgOpaqueData encIv + * @property {string|null} [eventName] MsgOpaqueData eventName + * @property {boolean|null} [isEventCanceled] MsgOpaqueData isEventCanceled + * @property {string|null} [eventDescription] MsgOpaqueData eventDescription + * @property {string|null} [eventJoinLink] MsgOpaqueData eventJoinLink + * @property {number|Long|null} [eventStartTime] MsgOpaqueData eventStartTime + * @property {proto.MsgOpaqueData.IEventLocation|null} [eventLocation] MsgOpaqueData eventLocation + * @property {number|Long|null} [eventEndTime] MsgOpaqueData eventEndTime */ /** @@ -64844,123 +105176,115 @@ $root.proto = (function() { /** * MsgOpaqueData body. - * @member {string} body + * @member {string|null|undefined} body * @memberof proto.MsgOpaqueData * @instance */ - MsgOpaqueData.prototype.body = ""; + MsgOpaqueData.prototype.body = null; /** * MsgOpaqueData caption. - * @member {string} caption + * @member {string|null|undefined} caption * @memberof proto.MsgOpaqueData * @instance */ - MsgOpaqueData.prototype.caption = ""; + MsgOpaqueData.prototype.caption = null; /** * MsgOpaqueData lng. - * @member {number} lng + * @member {number|null|undefined} lng * @memberof proto.MsgOpaqueData * @instance */ - MsgOpaqueData.prototype.lng = 0; + MsgOpaqueData.prototype.lng = null; /** * MsgOpaqueData isLive. - * @member {boolean} isLive + * @member {boolean|null|undefined} isLive * @memberof proto.MsgOpaqueData * @instance */ - MsgOpaqueData.prototype.isLive = false; + MsgOpaqueData.prototype.isLive = null; /** * MsgOpaqueData lat. - * @member {number} lat + * @member {number|null|undefined} lat * @memberof proto.MsgOpaqueData * @instance */ - MsgOpaqueData.prototype.lat = 0; + MsgOpaqueData.prototype.lat = null; /** * MsgOpaqueData paymentAmount1000. - * @member {number} paymentAmount1000 + * @member {number|null|undefined} paymentAmount1000 * @memberof proto.MsgOpaqueData * @instance */ - MsgOpaqueData.prototype.paymentAmount1000 = 0; + MsgOpaqueData.prototype.paymentAmount1000 = null; /** * MsgOpaqueData paymentNoteMsgBody. - * @member {string} paymentNoteMsgBody + * @member {string|null|undefined} paymentNoteMsgBody * @memberof proto.MsgOpaqueData * @instance */ - MsgOpaqueData.prototype.paymentNoteMsgBody = ""; - - /** - * MsgOpaqueData canonicalUrl. - * @member {string} canonicalUrl - * @memberof proto.MsgOpaqueData - * @instance - */ - MsgOpaqueData.prototype.canonicalUrl = ""; + MsgOpaqueData.prototype.paymentNoteMsgBody = null; /** * MsgOpaqueData matchedText. - * @member {string} matchedText + * @member {string|null|undefined} matchedText * @memberof proto.MsgOpaqueData * @instance */ - MsgOpaqueData.prototype.matchedText = ""; + MsgOpaqueData.prototype.matchedText = null; /** * MsgOpaqueData title. - * @member {string} title + * @member {string|null|undefined} title * @memberof proto.MsgOpaqueData * @instance */ - MsgOpaqueData.prototype.title = ""; + MsgOpaqueData.prototype.title = null; /** * MsgOpaqueData description. - * @member {string} description + * @member {string|null|undefined} description * @memberof proto.MsgOpaqueData * @instance */ - MsgOpaqueData.prototype.description = ""; + MsgOpaqueData.prototype.description = null; /** * MsgOpaqueData futureproofBuffer. - * @member {Uint8Array} futureproofBuffer + * @member {Uint8Array|null|undefined} futureproofBuffer * @memberof proto.MsgOpaqueData * @instance */ - MsgOpaqueData.prototype.futureproofBuffer = $util.newBuffer([]); + MsgOpaqueData.prototype.futureproofBuffer = null; /** * MsgOpaqueData clientUrl. - * @member {string} clientUrl + * @member {string|null|undefined} clientUrl * @memberof proto.MsgOpaqueData * @instance */ - MsgOpaqueData.prototype.clientUrl = ""; + MsgOpaqueData.prototype.clientUrl = null; /** * MsgOpaqueData loc. - * @member {string} loc + * @member {string|null|undefined} loc * @memberof proto.MsgOpaqueData * @instance */ - MsgOpaqueData.prototype.loc = ""; + MsgOpaqueData.prototype.loc = null; /** * MsgOpaqueData pollName. - * @member {string} pollName + * @member {string|null|undefined} pollName * @memberof proto.MsgOpaqueData * @instance */ - MsgOpaqueData.prototype.pollName = ""; + MsgOpaqueData.prototype.pollName = null; /** * MsgOpaqueData pollOptions. @@ -64972,43 +105296,43 @@ $root.proto = (function() { /** * MsgOpaqueData pollSelectableOptionsCount. - * @member {number} pollSelectableOptionsCount + * @member {number|null|undefined} pollSelectableOptionsCount * @memberof proto.MsgOpaqueData * @instance */ - MsgOpaqueData.prototype.pollSelectableOptionsCount = 0; + MsgOpaqueData.prototype.pollSelectableOptionsCount = null; /** * MsgOpaqueData messageSecret. - * @member {Uint8Array} messageSecret + * @member {Uint8Array|null|undefined} messageSecret * @memberof proto.MsgOpaqueData * @instance */ - MsgOpaqueData.prototype.messageSecret = $util.newBuffer([]); + MsgOpaqueData.prototype.messageSecret = null; /** * MsgOpaqueData originalSelfAuthor. - * @member {string} originalSelfAuthor + * @member {string|null|undefined} originalSelfAuthor * @memberof proto.MsgOpaqueData * @instance */ - MsgOpaqueData.prototype.originalSelfAuthor = ""; + MsgOpaqueData.prototype.originalSelfAuthor = null; /** * MsgOpaqueData senderTimestampMs. - * @member {number|Long} senderTimestampMs + * @member {number|Long|null|undefined} senderTimestampMs * @memberof proto.MsgOpaqueData * @instance */ - MsgOpaqueData.prototype.senderTimestampMs = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + MsgOpaqueData.prototype.senderTimestampMs = null; /** * MsgOpaqueData pollUpdateParentKey. - * @member {string} pollUpdateParentKey + * @member {string|null|undefined} pollUpdateParentKey * @memberof proto.MsgOpaqueData * @instance */ - MsgOpaqueData.prototype.pollUpdateParentKey = ""; + MsgOpaqueData.prototype.pollUpdateParentKey = null; /** * MsgOpaqueData encPollVote. @@ -65020,67 +105344,364 @@ $root.proto = (function() { /** * MsgOpaqueData isSentCagPollCreation. - * @member {boolean} isSentCagPollCreation + * @member {boolean|null|undefined} isSentCagPollCreation * @memberof proto.MsgOpaqueData * @instance */ - MsgOpaqueData.prototype.isSentCagPollCreation = false; + MsgOpaqueData.prototype.isSentCagPollCreation = null; + + /** + * MsgOpaqueData pollContentType. + * @member {proto.MsgOpaqueData.PollContentType|null|undefined} pollContentType + * @memberof proto.MsgOpaqueData + * @instance + */ + MsgOpaqueData.prototype.pollContentType = null; + + /** + * MsgOpaqueData pollVotesSnapshot. + * @member {proto.MsgOpaqueData.IPollVotesSnapshot|null|undefined} pollVotesSnapshot + * @memberof proto.MsgOpaqueData + * @instance + */ + MsgOpaqueData.prototype.pollVotesSnapshot = null; /** * MsgOpaqueData encReactionTargetMessageKey. - * @member {string} encReactionTargetMessageKey + * @member {string|null|undefined} encReactionTargetMessageKey * @memberof proto.MsgOpaqueData * @instance */ - MsgOpaqueData.prototype.encReactionTargetMessageKey = ""; + MsgOpaqueData.prototype.encReactionTargetMessageKey = null; /** * MsgOpaqueData encReactionEncPayload. - * @member {Uint8Array} encReactionEncPayload + * @member {Uint8Array|null|undefined} encReactionEncPayload * @memberof proto.MsgOpaqueData * @instance */ - MsgOpaqueData.prototype.encReactionEncPayload = $util.newBuffer([]); + MsgOpaqueData.prototype.encReactionEncPayload = null; /** * MsgOpaqueData encReactionEncIv. - * @member {Uint8Array} encReactionEncIv + * @member {Uint8Array|null|undefined} encReactionEncIv * @memberof proto.MsgOpaqueData * @instance */ - MsgOpaqueData.prototype.encReactionEncIv = $util.newBuffer([]); + MsgOpaqueData.prototype.encReactionEncIv = null; /** * MsgOpaqueData botMessageSecret. - * @member {Uint8Array} botMessageSecret + * @member {Uint8Array|null|undefined} botMessageSecret * @memberof proto.MsgOpaqueData * @instance */ - MsgOpaqueData.prototype.botMessageSecret = $util.newBuffer([]); + MsgOpaqueData.prototype.botMessageSecret = null; /** * MsgOpaqueData targetMessageKey. - * @member {string} targetMessageKey + * @member {string|null|undefined} targetMessageKey * @memberof proto.MsgOpaqueData * @instance */ - MsgOpaqueData.prototype.targetMessageKey = ""; + MsgOpaqueData.prototype.targetMessageKey = null; /** * MsgOpaqueData encPayload. - * @member {Uint8Array} encPayload + * @member {Uint8Array|null|undefined} encPayload * @memberof proto.MsgOpaqueData * @instance */ - MsgOpaqueData.prototype.encPayload = $util.newBuffer([]); + MsgOpaqueData.prototype.encPayload = null; /** * MsgOpaqueData encIv. - * @member {Uint8Array} encIv + * @member {Uint8Array|null|undefined} encIv * @memberof proto.MsgOpaqueData * @instance */ - MsgOpaqueData.prototype.encIv = $util.newBuffer([]); + MsgOpaqueData.prototype.encIv = null; + + /** + * MsgOpaqueData eventName. + * @member {string|null|undefined} eventName + * @memberof proto.MsgOpaqueData + * @instance + */ + MsgOpaqueData.prototype.eventName = null; + + /** + * MsgOpaqueData isEventCanceled. + * @member {boolean|null|undefined} isEventCanceled + * @memberof proto.MsgOpaqueData + * @instance + */ + MsgOpaqueData.prototype.isEventCanceled = null; + + /** + * MsgOpaqueData eventDescription. + * @member {string|null|undefined} eventDescription + * @memberof proto.MsgOpaqueData + * @instance + */ + MsgOpaqueData.prototype.eventDescription = null; + + /** + * MsgOpaqueData eventJoinLink. + * @member {string|null|undefined} eventJoinLink + * @memberof proto.MsgOpaqueData + * @instance + */ + MsgOpaqueData.prototype.eventJoinLink = null; + + /** + * MsgOpaqueData eventStartTime. + * @member {number|Long|null|undefined} eventStartTime + * @memberof proto.MsgOpaqueData + * @instance + */ + MsgOpaqueData.prototype.eventStartTime = null; + + /** + * MsgOpaqueData eventLocation. + * @member {proto.MsgOpaqueData.IEventLocation|null|undefined} eventLocation + * @memberof proto.MsgOpaqueData + * @instance + */ + MsgOpaqueData.prototype.eventLocation = null; + + /** + * MsgOpaqueData eventEndTime. + * @member {number|Long|null|undefined} eventEndTime + * @memberof proto.MsgOpaqueData + * @instance + */ + MsgOpaqueData.prototype.eventEndTime = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MsgOpaqueData.prototype, "_body", { + get: $util.oneOfGetter($oneOfFields = ["body"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MsgOpaqueData.prototype, "_caption", { + get: $util.oneOfGetter($oneOfFields = ["caption"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MsgOpaqueData.prototype, "_lng", { + get: $util.oneOfGetter($oneOfFields = ["lng"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MsgOpaqueData.prototype, "_isLive", { + get: $util.oneOfGetter($oneOfFields = ["isLive"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MsgOpaqueData.prototype, "_lat", { + get: $util.oneOfGetter($oneOfFields = ["lat"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MsgOpaqueData.prototype, "_paymentAmount1000", { + get: $util.oneOfGetter($oneOfFields = ["paymentAmount1000"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MsgOpaqueData.prototype, "_paymentNoteMsgBody", { + get: $util.oneOfGetter($oneOfFields = ["paymentNoteMsgBody"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MsgOpaqueData.prototype, "_matchedText", { + get: $util.oneOfGetter($oneOfFields = ["matchedText"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MsgOpaqueData.prototype, "_title", { + get: $util.oneOfGetter($oneOfFields = ["title"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MsgOpaqueData.prototype, "_description", { + get: $util.oneOfGetter($oneOfFields = ["description"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MsgOpaqueData.prototype, "_futureproofBuffer", { + get: $util.oneOfGetter($oneOfFields = ["futureproofBuffer"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MsgOpaqueData.prototype, "_clientUrl", { + get: $util.oneOfGetter($oneOfFields = ["clientUrl"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MsgOpaqueData.prototype, "_loc", { + get: $util.oneOfGetter($oneOfFields = ["loc"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MsgOpaqueData.prototype, "_pollName", { + get: $util.oneOfGetter($oneOfFields = ["pollName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MsgOpaqueData.prototype, "_pollSelectableOptionsCount", { + get: $util.oneOfGetter($oneOfFields = ["pollSelectableOptionsCount"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MsgOpaqueData.prototype, "_messageSecret", { + get: $util.oneOfGetter($oneOfFields = ["messageSecret"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MsgOpaqueData.prototype, "_originalSelfAuthor", { + get: $util.oneOfGetter($oneOfFields = ["originalSelfAuthor"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MsgOpaqueData.prototype, "_senderTimestampMs", { + get: $util.oneOfGetter($oneOfFields = ["senderTimestampMs"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MsgOpaqueData.prototype, "_pollUpdateParentKey", { + get: $util.oneOfGetter($oneOfFields = ["pollUpdateParentKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MsgOpaqueData.prototype, "_encPollVote", { + get: $util.oneOfGetter($oneOfFields = ["encPollVote"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MsgOpaqueData.prototype, "_isSentCagPollCreation", { + get: $util.oneOfGetter($oneOfFields = ["isSentCagPollCreation"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MsgOpaqueData.prototype, "_pollContentType", { + get: $util.oneOfGetter($oneOfFields = ["pollContentType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MsgOpaqueData.prototype, "_pollVotesSnapshot", { + get: $util.oneOfGetter($oneOfFields = ["pollVotesSnapshot"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MsgOpaqueData.prototype, "_encReactionTargetMessageKey", { + get: $util.oneOfGetter($oneOfFields = ["encReactionTargetMessageKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MsgOpaqueData.prototype, "_encReactionEncPayload", { + get: $util.oneOfGetter($oneOfFields = ["encReactionEncPayload"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MsgOpaqueData.prototype, "_encReactionEncIv", { + get: $util.oneOfGetter($oneOfFields = ["encReactionEncIv"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MsgOpaqueData.prototype, "_botMessageSecret", { + get: $util.oneOfGetter($oneOfFields = ["botMessageSecret"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MsgOpaqueData.prototype, "_targetMessageKey", { + get: $util.oneOfGetter($oneOfFields = ["targetMessageKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MsgOpaqueData.prototype, "_encPayload", { + get: $util.oneOfGetter($oneOfFields = ["encPayload"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MsgOpaqueData.prototype, "_encIv", { + get: $util.oneOfGetter($oneOfFields = ["encIv"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MsgOpaqueData.prototype, "_eventName", { + get: $util.oneOfGetter($oneOfFields = ["eventName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MsgOpaqueData.prototype, "_isEventCanceled", { + get: $util.oneOfGetter($oneOfFields = ["isEventCanceled"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MsgOpaqueData.prototype, "_eventDescription", { + get: $util.oneOfGetter($oneOfFields = ["eventDescription"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MsgOpaqueData.prototype, "_eventJoinLink", { + get: $util.oneOfGetter($oneOfFields = ["eventJoinLink"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MsgOpaqueData.prototype, "_eventStartTime", { + get: $util.oneOfGetter($oneOfFields = ["eventStartTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MsgOpaqueData.prototype, "_eventLocation", { + get: $util.oneOfGetter($oneOfFields = ["eventLocation"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MsgOpaqueData.prototype, "_eventEndTime", { + get: $util.oneOfGetter($oneOfFields = ["eventEndTime"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new MsgOpaqueData instance using the specified properties. @@ -65120,8 +105741,6 @@ $root.proto = (function() { writer.uint32(/* id 8, wireType 0 =*/64).int32(message.paymentAmount1000); if (message.paymentNoteMsgBody != null && Object.hasOwnProperty.call(message, "paymentNoteMsgBody")) writer.uint32(/* id 9, wireType 2 =*/74).string(message.paymentNoteMsgBody); - if (message.canonicalUrl != null && Object.hasOwnProperty.call(message, "canonicalUrl")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.canonicalUrl); if (message.matchedText != null && Object.hasOwnProperty.call(message, "matchedText")) writer.uint32(/* id 11, wireType 2 =*/90).string(message.matchedText); if (message.title != null && Object.hasOwnProperty.call(message, "title")) @@ -65165,6 +105784,24 @@ $root.proto = (function() { writer.uint32(/* id 31, wireType 2 =*/250).bytes(message.encPayload); if (message.encIv != null && Object.hasOwnProperty.call(message, "encIv")) writer.uint32(/* id 32, wireType 2 =*/258).bytes(message.encIv); + if (message.eventName != null && Object.hasOwnProperty.call(message, "eventName")) + writer.uint32(/* id 33, wireType 2 =*/266).string(message.eventName); + if (message.isEventCanceled != null && Object.hasOwnProperty.call(message, "isEventCanceled")) + writer.uint32(/* id 34, wireType 0 =*/272).bool(message.isEventCanceled); + if (message.eventDescription != null && Object.hasOwnProperty.call(message, "eventDescription")) + writer.uint32(/* id 35, wireType 2 =*/282).string(message.eventDescription); + if (message.eventJoinLink != null && Object.hasOwnProperty.call(message, "eventJoinLink")) + writer.uint32(/* id 36, wireType 2 =*/290).string(message.eventJoinLink); + if (message.eventStartTime != null && Object.hasOwnProperty.call(message, "eventStartTime")) + writer.uint32(/* id 37, wireType 0 =*/296).int64(message.eventStartTime); + if (message.eventLocation != null && Object.hasOwnProperty.call(message, "eventLocation")) + $root.proto.MsgOpaqueData.EventLocation.encode(message.eventLocation, writer.uint32(/* id 38, wireType 2 =*/306).fork()).ldelim(); + if (message.eventEndTime != null && Object.hasOwnProperty.call(message, "eventEndTime")) + writer.uint32(/* id 40, wireType 0 =*/320).int64(message.eventEndTime); + if (message.pollVotesSnapshot != null && Object.hasOwnProperty.call(message, "pollVotesSnapshot")) + $root.proto.MsgOpaqueData.PollVotesSnapshot.encode(message.pollVotesSnapshot, writer.uint32(/* id 41, wireType 2 =*/330).fork()).ldelim(); + if (message.pollContentType != null && Object.hasOwnProperty.call(message, "pollContentType")) + writer.uint32(/* id 42, wireType 0 =*/336).int32(message.pollContentType); if (message.originalSelfAuthor != null && Object.hasOwnProperty.call(message, "originalSelfAuthor")) writer.uint32(/* id 51, wireType 2 =*/410).string(message.originalSelfAuthor); return writer; @@ -65201,98 +105838,160 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.body = reader.string(); - break; - case 3: - message.caption = reader.string(); - break; - case 5: - message.lng = reader.double(); - break; - case 6: - message.isLive = reader.bool(); - break; - case 7: - message.lat = reader.double(); - break; - case 8: - message.paymentAmount1000 = reader.int32(); - break; - case 9: - message.paymentNoteMsgBody = reader.string(); - break; - case 10: - message.canonicalUrl = reader.string(); - break; - case 11: - message.matchedText = reader.string(); - break; - case 12: - message.title = reader.string(); - break; - case 13: - message.description = reader.string(); - break; - case 14: - message.futureproofBuffer = reader.bytes(); - break; - case 15: - message.clientUrl = reader.string(); - break; - case 16: - message.loc = reader.string(); - break; - case 17: - message.pollName = reader.string(); - break; - case 18: - if (!(message.pollOptions && message.pollOptions.length)) - message.pollOptions = []; - message.pollOptions.push($root.proto.MsgOpaqueData.PollOption.decode(reader, reader.uint32())); - break; - case 20: - message.pollSelectableOptionsCount = reader.uint32(); - break; - case 21: - message.messageSecret = reader.bytes(); - break; - case 51: - message.originalSelfAuthor = reader.string(); - 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; - case 28: - message.isSentCagPollCreation = reader.bool(); - break; - case 25: - message.encReactionTargetMessageKey = reader.string(); - break; - case 26: - message.encReactionEncPayload = reader.bytes(); - break; - case 27: - message.encReactionEncIv = reader.bytes(); - break; - case 29: - message.botMessageSecret = reader.bytes(); - break; - case 30: - message.targetMessageKey = reader.string(); - break; - case 31: - message.encPayload = reader.bytes(); - break; - case 32: - message.encIv = reader.bytes(); - break; + case 1: { + message.body = reader.string(); + break; + } + case 3: { + message.caption = reader.string(); + break; + } + case 5: { + message.lng = reader.double(); + break; + } + case 6: { + message.isLive = reader.bool(); + break; + } + case 7: { + message.lat = reader.double(); + break; + } + case 8: { + message.paymentAmount1000 = reader.int32(); + break; + } + case 9: { + message.paymentNoteMsgBody = reader.string(); + break; + } + case 11: { + message.matchedText = reader.string(); + break; + } + case 12: { + message.title = reader.string(); + break; + } + case 13: { + message.description = reader.string(); + break; + } + case 14: { + message.futureproofBuffer = reader.bytes(); + break; + } + case 15: { + message.clientUrl = reader.string(); + break; + } + case 16: { + message.loc = reader.string(); + break; + } + case 17: { + message.pollName = reader.string(); + break; + } + case 18: { + if (!(message.pollOptions && message.pollOptions.length)) + message.pollOptions = []; + message.pollOptions.push($root.proto.MsgOpaqueData.PollOption.decode(reader, reader.uint32())); + break; + } + case 20: { + message.pollSelectableOptionsCount = reader.uint32(); + break; + } + case 21: { + message.messageSecret = reader.bytes(); + break; + } + case 51: { + message.originalSelfAuthor = reader.string(); + 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; + } + case 28: { + message.isSentCagPollCreation = reader.bool(); + break; + } + case 42: { + message.pollContentType = reader.int32(); + break; + } + case 41: { + message.pollVotesSnapshot = $root.proto.MsgOpaqueData.PollVotesSnapshot.decode(reader, reader.uint32()); + break; + } + case 25: { + message.encReactionTargetMessageKey = reader.string(); + break; + } + case 26: { + message.encReactionEncPayload = reader.bytes(); + break; + } + case 27: { + message.encReactionEncIv = reader.bytes(); + break; + } + case 29: { + message.botMessageSecret = reader.bytes(); + break; + } + case 30: { + message.targetMessageKey = reader.string(); + break; + } + case 31: { + message.encPayload = reader.bytes(); + break; + } + case 32: { + message.encIv = reader.bytes(); + break; + } + case 33: { + message.eventName = reader.string(); + break; + } + case 34: { + message.isEventCanceled = reader.bool(); + break; + } + case 35: { + message.eventDescription = reader.string(); + break; + } + case 36: { + message.eventJoinLink = reader.string(); + break; + } + case 37: { + message.eventStartTime = reader.int64(); + break; + } + case 38: { + message.eventLocation = $root.proto.MsgOpaqueData.EventLocation.decode(reader, reader.uint32()); + break; + } + case 40: { + message.eventEndTime = reader.int64(); + break; + } default: reader.skipType(tag & 7); break; @@ -65328,51 +106027,77 @@ $root.proto = (function() { MsgOpaqueData.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.body != null && message.hasOwnProperty("body")) + var properties = {}; + if (message.body != null && message.hasOwnProperty("body")) { + properties._body = 1; if (!$util.isString(message.body)) return "body: string expected"; - if (message.caption != null && message.hasOwnProperty("caption")) + } + if (message.caption != null && message.hasOwnProperty("caption")) { + properties._caption = 1; if (!$util.isString(message.caption)) return "caption: string expected"; - if (message.lng != null && message.hasOwnProperty("lng")) + } + if (message.lng != null && message.hasOwnProperty("lng")) { + properties._lng = 1; if (typeof message.lng !== "number") return "lng: number expected"; - if (message.isLive != null && message.hasOwnProperty("isLive")) + } + if (message.isLive != null && message.hasOwnProperty("isLive")) { + properties._isLive = 1; if (typeof message.isLive !== "boolean") return "isLive: boolean expected"; - if (message.lat != null && message.hasOwnProperty("lat")) + } + if (message.lat != null && message.hasOwnProperty("lat")) { + properties._lat = 1; if (typeof message.lat !== "number") return "lat: number expected"; - if (message.paymentAmount1000 != null && message.hasOwnProperty("paymentAmount1000")) + } + if (message.paymentAmount1000 != null && message.hasOwnProperty("paymentAmount1000")) { + properties._paymentAmount1000 = 1; if (!$util.isInteger(message.paymentAmount1000)) return "paymentAmount1000: integer expected"; - if (message.paymentNoteMsgBody != null && message.hasOwnProperty("paymentNoteMsgBody")) + } + if (message.paymentNoteMsgBody != null && message.hasOwnProperty("paymentNoteMsgBody")) { + properties._paymentNoteMsgBody = 1; if (!$util.isString(message.paymentNoteMsgBody)) return "paymentNoteMsgBody: string expected"; - if (message.canonicalUrl != null && message.hasOwnProperty("canonicalUrl")) - if (!$util.isString(message.canonicalUrl)) - return "canonicalUrl: string expected"; - if (message.matchedText != null && message.hasOwnProperty("matchedText")) + } + if (message.matchedText != null && message.hasOwnProperty("matchedText")) { + properties._matchedText = 1; if (!$util.isString(message.matchedText)) return "matchedText: string expected"; - if (message.title != null && message.hasOwnProperty("title")) + } + if (message.title != null && message.hasOwnProperty("title")) { + properties._title = 1; if (!$util.isString(message.title)) return "title: string expected"; - if (message.description != null && message.hasOwnProperty("description")) + } + if (message.description != null && message.hasOwnProperty("description")) { + properties._description = 1; if (!$util.isString(message.description)) return "description: string expected"; - if (message.futureproofBuffer != null && message.hasOwnProperty("futureproofBuffer")) + } + if (message.futureproofBuffer != null && message.hasOwnProperty("futureproofBuffer")) { + properties._futureproofBuffer = 1; if (!(message.futureproofBuffer && typeof message.futureproofBuffer.length === "number" || $util.isString(message.futureproofBuffer))) return "futureproofBuffer: buffer expected"; - if (message.clientUrl != null && message.hasOwnProperty("clientUrl")) + } + if (message.clientUrl != null && message.hasOwnProperty("clientUrl")) { + properties._clientUrl = 1; if (!$util.isString(message.clientUrl)) return "clientUrl: string expected"; - if (message.loc != null && message.hasOwnProperty("loc")) + } + if (message.loc != null && message.hasOwnProperty("loc")) { + properties._loc = 1; if (!$util.isString(message.loc)) return "loc: string expected"; - if (message.pollName != null && message.hasOwnProperty("pollName")) + } + if (message.pollName != null && message.hasOwnProperty("pollName")) { + properties._pollName = 1; if (!$util.isString(message.pollName)) return "pollName: string expected"; + } if (message.pollOptions != null && message.hasOwnProperty("pollOptions")) { if (!Array.isArray(message.pollOptions)) return "pollOptions: array expected"; @@ -65382,50 +106107,136 @@ $root.proto = (function() { return "pollOptions." + error; } } - if (message.pollSelectableOptionsCount != null && message.hasOwnProperty("pollSelectableOptionsCount")) + if (message.pollSelectableOptionsCount != null && message.hasOwnProperty("pollSelectableOptionsCount")) { + properties._pollSelectableOptionsCount = 1; if (!$util.isInteger(message.pollSelectableOptionsCount)) return "pollSelectableOptionsCount: integer expected"; - if (message.messageSecret != null && message.hasOwnProperty("messageSecret")) + } + if (message.messageSecret != null && message.hasOwnProperty("messageSecret")) { + properties._messageSecret = 1; if (!(message.messageSecret && typeof message.messageSecret.length === "number" || $util.isString(message.messageSecret))) return "messageSecret: buffer expected"; - if (message.originalSelfAuthor != null && message.hasOwnProperty("originalSelfAuthor")) + } + if (message.originalSelfAuthor != null && message.hasOwnProperty("originalSelfAuthor")) { + properties._originalSelfAuthor = 1; if (!$util.isString(message.originalSelfAuthor)) return "originalSelfAuthor: string expected"; - if (message.senderTimestampMs != null && message.hasOwnProperty("senderTimestampMs")) + } + if (message.senderTimestampMs != null && message.hasOwnProperty("senderTimestampMs")) { + properties._senderTimestampMs = 1; 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 (message.pollUpdateParentKey != null && message.hasOwnProperty("pollUpdateParentKey")) { + properties._pollUpdateParentKey = 1; 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; } - if (message.isSentCagPollCreation != null && message.hasOwnProperty("isSentCagPollCreation")) + if (message.encPollVote != null && message.hasOwnProperty("encPollVote")) { + properties._encPollVote = 1; + { + var error = $root.proto.PollEncValue.verify(message.encPollVote); + if (error) + return "encPollVote." + error; + } + } + if (message.isSentCagPollCreation != null && message.hasOwnProperty("isSentCagPollCreation")) { + properties._isSentCagPollCreation = 1; if (typeof message.isSentCagPollCreation !== "boolean") return "isSentCagPollCreation: boolean expected"; - if (message.encReactionTargetMessageKey != null && message.hasOwnProperty("encReactionTargetMessageKey")) + } + if (message.pollContentType != null && message.hasOwnProperty("pollContentType")) { + properties._pollContentType = 1; + switch (message.pollContentType) { + default: + return "pollContentType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.pollVotesSnapshot != null && message.hasOwnProperty("pollVotesSnapshot")) { + properties._pollVotesSnapshot = 1; + { + var error = $root.proto.MsgOpaqueData.PollVotesSnapshot.verify(message.pollVotesSnapshot); + if (error) + return "pollVotesSnapshot." + error; + } + } + if (message.encReactionTargetMessageKey != null && message.hasOwnProperty("encReactionTargetMessageKey")) { + properties._encReactionTargetMessageKey = 1; if (!$util.isString(message.encReactionTargetMessageKey)) return "encReactionTargetMessageKey: string expected"; - if (message.encReactionEncPayload != null && message.hasOwnProperty("encReactionEncPayload")) + } + if (message.encReactionEncPayload != null && message.hasOwnProperty("encReactionEncPayload")) { + properties._encReactionEncPayload = 1; if (!(message.encReactionEncPayload && typeof message.encReactionEncPayload.length === "number" || $util.isString(message.encReactionEncPayload))) return "encReactionEncPayload: buffer expected"; - if (message.encReactionEncIv != null && message.hasOwnProperty("encReactionEncIv")) + } + if (message.encReactionEncIv != null && message.hasOwnProperty("encReactionEncIv")) { + properties._encReactionEncIv = 1; if (!(message.encReactionEncIv && typeof message.encReactionEncIv.length === "number" || $util.isString(message.encReactionEncIv))) return "encReactionEncIv: buffer expected"; - if (message.botMessageSecret != null && message.hasOwnProperty("botMessageSecret")) + } + if (message.botMessageSecret != null && message.hasOwnProperty("botMessageSecret")) { + properties._botMessageSecret = 1; if (!(message.botMessageSecret && typeof message.botMessageSecret.length === "number" || $util.isString(message.botMessageSecret))) return "botMessageSecret: buffer expected"; - if (message.targetMessageKey != null && message.hasOwnProperty("targetMessageKey")) + } + if (message.targetMessageKey != null && message.hasOwnProperty("targetMessageKey")) { + properties._targetMessageKey = 1; if (!$util.isString(message.targetMessageKey)) return "targetMessageKey: string expected"; - if (message.encPayload != null && message.hasOwnProperty("encPayload")) + } + if (message.encPayload != null && message.hasOwnProperty("encPayload")) { + properties._encPayload = 1; 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 != null && message.hasOwnProperty("encIv")) { + properties._encIv = 1; if (!(message.encIv && typeof message.encIv.length === "number" || $util.isString(message.encIv))) return "encIv: buffer expected"; + } + if (message.eventName != null && message.hasOwnProperty("eventName")) { + properties._eventName = 1; + if (!$util.isString(message.eventName)) + return "eventName: string expected"; + } + if (message.isEventCanceled != null && message.hasOwnProperty("isEventCanceled")) { + properties._isEventCanceled = 1; + if (typeof message.isEventCanceled !== "boolean") + return "isEventCanceled: boolean expected"; + } + if (message.eventDescription != null && message.hasOwnProperty("eventDescription")) { + properties._eventDescription = 1; + if (!$util.isString(message.eventDescription)) + return "eventDescription: string expected"; + } + if (message.eventJoinLink != null && message.hasOwnProperty("eventJoinLink")) { + properties._eventJoinLink = 1; + if (!$util.isString(message.eventJoinLink)) + return "eventJoinLink: string expected"; + } + if (message.eventStartTime != null && message.hasOwnProperty("eventStartTime")) { + properties._eventStartTime = 1; + if (!$util.isInteger(message.eventStartTime) && !(message.eventStartTime && $util.isInteger(message.eventStartTime.low) && $util.isInteger(message.eventStartTime.high))) + return "eventStartTime: integer|Long expected"; + } + if (message.eventLocation != null && message.hasOwnProperty("eventLocation")) { + properties._eventLocation = 1; + { + var error = $root.proto.MsgOpaqueData.EventLocation.verify(message.eventLocation); + if (error) + return "eventLocation." + error; + } + } + if (message.eventEndTime != null && message.hasOwnProperty("eventEndTime")) { + properties._eventEndTime = 1; + if (!$util.isInteger(message.eventEndTime) && !(message.eventEndTime && $util.isInteger(message.eventEndTime.low) && $util.isInteger(message.eventEndTime.high))) + return "eventEndTime: integer|Long expected"; + } return null; }; @@ -65455,8 +106266,6 @@ $root.proto = (function() { message.paymentAmount1000 = object.paymentAmount1000 | 0; if (object.paymentNoteMsgBody != null) message.paymentNoteMsgBody = String(object.paymentNoteMsgBody); - if (object.canonicalUrl != null) - message.canonicalUrl = String(object.canonicalUrl); if (object.matchedText != null) message.matchedText = String(object.matchedText); if (object.title != null) @@ -65466,7 +106275,7 @@ $root.proto = (function() { if (object.futureproofBuffer != null) if (typeof object.futureproofBuffer === "string") $util.base64.decode(object.futureproofBuffer, message.futureproofBuffer = $util.newBuffer($util.base64.length(object.futureproofBuffer)), 0); - else if (object.futureproofBuffer.length) + else if (object.futureproofBuffer.length >= 0) message.futureproofBuffer = object.futureproofBuffer; if (object.clientUrl != null) message.clientUrl = String(object.clientUrl); @@ -65489,7 +106298,7 @@ $root.proto = (function() { if (object.messageSecret != null) if (typeof object.messageSecret === "string") $util.base64.decode(object.messageSecret, message.messageSecret = $util.newBuffer($util.base64.length(object.messageSecret)), 0); - else if (object.messageSecret.length) + else if (object.messageSecret.length >= 0) message.messageSecret = object.messageSecret; if (object.originalSelfAuthor != null) message.originalSelfAuthor = String(object.originalSelfAuthor); @@ -65511,35 +106320,91 @@ $root.proto = (function() { } if (object.isSentCagPollCreation != null) message.isSentCagPollCreation = Boolean(object.isSentCagPollCreation); + switch (object.pollContentType) { + default: + if (typeof object.pollContentType === "number") { + message.pollContentType = object.pollContentType; + break; + } + break; + case "UNKNOWN": + case 0: + message.pollContentType = 0; + break; + case "TEXT": + case 1: + message.pollContentType = 1; + break; + case "IMAGE": + case 2: + message.pollContentType = 2; + break; + } + if (object.pollVotesSnapshot != null) { + if (typeof object.pollVotesSnapshot !== "object") + throw TypeError(".proto.MsgOpaqueData.pollVotesSnapshot: object expected"); + message.pollVotesSnapshot = $root.proto.MsgOpaqueData.PollVotesSnapshot.fromObject(object.pollVotesSnapshot); + } if (object.encReactionTargetMessageKey != null) message.encReactionTargetMessageKey = String(object.encReactionTargetMessageKey); if (object.encReactionEncPayload != null) if (typeof object.encReactionEncPayload === "string") $util.base64.decode(object.encReactionEncPayload, message.encReactionEncPayload = $util.newBuffer($util.base64.length(object.encReactionEncPayload)), 0); - else if (object.encReactionEncPayload.length) + else if (object.encReactionEncPayload.length >= 0) message.encReactionEncPayload = object.encReactionEncPayload; if (object.encReactionEncIv != null) if (typeof object.encReactionEncIv === "string") $util.base64.decode(object.encReactionEncIv, message.encReactionEncIv = $util.newBuffer($util.base64.length(object.encReactionEncIv)), 0); - else if (object.encReactionEncIv.length) + else if (object.encReactionEncIv.length >= 0) message.encReactionEncIv = object.encReactionEncIv; if (object.botMessageSecret != null) if (typeof object.botMessageSecret === "string") $util.base64.decode(object.botMessageSecret, message.botMessageSecret = $util.newBuffer($util.base64.length(object.botMessageSecret)), 0); - else if (object.botMessageSecret.length) + else if (object.botMessageSecret.length >= 0) message.botMessageSecret = object.botMessageSecret; if (object.targetMessageKey != null) message.targetMessageKey = String(object.targetMessageKey); 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) + else if (object.encPayload.length >= 0) 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) + else if (object.encIv.length >= 0) message.encIv = object.encIv; + if (object.eventName != null) + message.eventName = String(object.eventName); + if (object.isEventCanceled != null) + message.isEventCanceled = Boolean(object.isEventCanceled); + if (object.eventDescription != null) + message.eventDescription = String(object.eventDescription); + if (object.eventJoinLink != null) + message.eventJoinLink = String(object.eventJoinLink); + if (object.eventStartTime != null) + if ($util.Long) + (message.eventStartTime = $util.Long.fromValue(object.eventStartTime)).unsigned = false; + else if (typeof object.eventStartTime === "string") + message.eventStartTime = parseInt(object.eventStartTime, 10); + else if (typeof object.eventStartTime === "number") + message.eventStartTime = object.eventStartTime; + else if (typeof object.eventStartTime === "object") + message.eventStartTime = new $util.LongBits(object.eventStartTime.low >>> 0, object.eventStartTime.high >>> 0).toNumber(); + if (object.eventLocation != null) { + if (typeof object.eventLocation !== "object") + throw TypeError(".proto.MsgOpaqueData.eventLocation: object expected"); + message.eventLocation = $root.proto.MsgOpaqueData.EventLocation.fromObject(object.eventLocation); + } + if (object.eventEndTime != null) + if ($util.Long) + (message.eventEndTime = $util.Long.fromValue(object.eventEndTime)).unsigned = false; + else if (typeof object.eventEndTime === "string") + message.eventEndTime = parseInt(object.eventEndTime, 10); + else if (typeof object.eventEndTime === "number") + message.eventEndTime = object.eventEndTime; + else if (typeof object.eventEndTime === "object") + message.eventEndTime = new $util.LongBits(object.eventEndTime.low >>> 0, object.eventEndTime.high >>> 0).toNumber(); return message; }; @@ -65558,149 +106423,205 @@ $root.proto = (function() { var object = {}; if (options.arrays || options.defaults) object.pollOptions = []; - if (options.defaults) { - object.body = ""; - object.caption = ""; - object.lng = 0; - object.isLive = false; - object.lat = 0; - object.paymentAmount1000 = 0; - object.paymentNoteMsgBody = ""; - object.canonicalUrl = ""; - object.matchedText = ""; - object.title = ""; - object.description = ""; - if (options.bytes === String) - object.futureproofBuffer = ""; - else { - object.futureproofBuffer = []; - if (options.bytes !== Array) - object.futureproofBuffer = $util.newBuffer(object.futureproofBuffer); - } - object.clientUrl = ""; - object.loc = ""; - object.pollName = ""; - object.pollSelectableOptionsCount = 0; - if (options.bytes === String) - object.messageSecret = ""; - else { - object.messageSecret = []; - if (options.bytes !== Array) - object.messageSecret = $util.newBuffer(object.messageSecret); - } - if ($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; - object.encReactionTargetMessageKey = ""; - if (options.bytes === String) - object.encReactionEncPayload = ""; - else { - object.encReactionEncPayload = []; - if (options.bytes !== Array) - object.encReactionEncPayload = $util.newBuffer(object.encReactionEncPayload); - } - if (options.bytes === String) - object.encReactionEncIv = ""; - else { - object.encReactionEncIv = []; - if (options.bytes !== Array) - object.encReactionEncIv = $util.newBuffer(object.encReactionEncIv); - } - object.isSentCagPollCreation = false; - if (options.bytes === String) - object.botMessageSecret = ""; - else { - object.botMessageSecret = []; - if (options.bytes !== Array) - object.botMessageSecret = $util.newBuffer(object.botMessageSecret); - } - object.targetMessageKey = ""; - 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); - } - object.originalSelfAuthor = ""; - } - if (message.body != null && message.hasOwnProperty("body")) + if (message.body != null && message.hasOwnProperty("body")) { object.body = message.body; - if (message.caption != null && message.hasOwnProperty("caption")) + if (options.oneofs) + object._body = "body"; + } + if (message.caption != null && message.hasOwnProperty("caption")) { object.caption = message.caption; - if (message.lng != null && message.hasOwnProperty("lng")) + if (options.oneofs) + object._caption = "caption"; + } + if (message.lng != null && message.hasOwnProperty("lng")) { object.lng = options.json && !isFinite(message.lng) ? String(message.lng) : message.lng; - if (message.isLive != null && message.hasOwnProperty("isLive")) + if (options.oneofs) + object._lng = "lng"; + } + if (message.isLive != null && message.hasOwnProperty("isLive")) { object.isLive = message.isLive; - if (message.lat != null && message.hasOwnProperty("lat")) + if (options.oneofs) + object._isLive = "isLive"; + } + if (message.lat != null && message.hasOwnProperty("lat")) { object.lat = options.json && !isFinite(message.lat) ? String(message.lat) : message.lat; - if (message.paymentAmount1000 != null && message.hasOwnProperty("paymentAmount1000")) + if (options.oneofs) + object._lat = "lat"; + } + if (message.paymentAmount1000 != null && message.hasOwnProperty("paymentAmount1000")) { object.paymentAmount1000 = message.paymentAmount1000; - if (message.paymentNoteMsgBody != null && message.hasOwnProperty("paymentNoteMsgBody")) + if (options.oneofs) + object._paymentAmount1000 = "paymentAmount1000"; + } + if (message.paymentNoteMsgBody != null && message.hasOwnProperty("paymentNoteMsgBody")) { object.paymentNoteMsgBody = message.paymentNoteMsgBody; - if (message.canonicalUrl != null && message.hasOwnProperty("canonicalUrl")) - object.canonicalUrl = message.canonicalUrl; - if (message.matchedText != null && message.hasOwnProperty("matchedText")) + if (options.oneofs) + object._paymentNoteMsgBody = "paymentNoteMsgBody"; + } + if (message.matchedText != null && message.hasOwnProperty("matchedText")) { object.matchedText = message.matchedText; - if (message.title != null && message.hasOwnProperty("title")) + if (options.oneofs) + object._matchedText = "matchedText"; + } + if (message.title != null && message.hasOwnProperty("title")) { object.title = message.title; - if (message.description != null && message.hasOwnProperty("description")) + if (options.oneofs) + object._title = "title"; + } + if (message.description != null && message.hasOwnProperty("description")) { object.description = message.description; - if (message.futureproofBuffer != null && message.hasOwnProperty("futureproofBuffer")) + if (options.oneofs) + object._description = "description"; + } + if (message.futureproofBuffer != null && message.hasOwnProperty("futureproofBuffer")) { object.futureproofBuffer = options.bytes === String ? $util.base64.encode(message.futureproofBuffer, 0, message.futureproofBuffer.length) : options.bytes === Array ? Array.prototype.slice.call(message.futureproofBuffer) : message.futureproofBuffer; - if (message.clientUrl != null && message.hasOwnProperty("clientUrl")) + if (options.oneofs) + object._futureproofBuffer = "futureproofBuffer"; + } + if (message.clientUrl != null && message.hasOwnProperty("clientUrl")) { object.clientUrl = message.clientUrl; - if (message.loc != null && message.hasOwnProperty("loc")) + if (options.oneofs) + object._clientUrl = "clientUrl"; + } + if (message.loc != null && message.hasOwnProperty("loc")) { object.loc = message.loc; - if (message.pollName != null && message.hasOwnProperty("pollName")) + if (options.oneofs) + object._loc = "loc"; + } + if (message.pollName != null && message.hasOwnProperty("pollName")) { object.pollName = message.pollName; + if (options.oneofs) + object._pollName = "pollName"; + } if (message.pollOptions && message.pollOptions.length) { object.pollOptions = []; for (var j = 0; j < message.pollOptions.length; ++j) object.pollOptions[j] = $root.proto.MsgOpaqueData.PollOption.toObject(message.pollOptions[j], options); } - if (message.pollSelectableOptionsCount != null && message.hasOwnProperty("pollSelectableOptionsCount")) + if (message.pollSelectableOptionsCount != null && message.hasOwnProperty("pollSelectableOptionsCount")) { object.pollSelectableOptionsCount = message.pollSelectableOptionsCount; - if (message.messageSecret != null && message.hasOwnProperty("messageSecret")) + if (options.oneofs) + object._pollSelectableOptionsCount = "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 (options.oneofs) + object._messageSecret = "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")) + if (options.oneofs) + object._senderTimestampMs = "senderTimestampMs"; + } + if (message.pollUpdateParentKey != null && message.hasOwnProperty("pollUpdateParentKey")) { object.pollUpdateParentKey = message.pollUpdateParentKey; - if (message.encPollVote != null && message.hasOwnProperty("encPollVote")) + if (options.oneofs) + object._pollUpdateParentKey = "pollUpdateParentKey"; + } + if (message.encPollVote != null && message.hasOwnProperty("encPollVote")) { object.encPollVote = $root.proto.PollEncValue.toObject(message.encPollVote, options); - if (message.encReactionTargetMessageKey != null && message.hasOwnProperty("encReactionTargetMessageKey")) + if (options.oneofs) + object._encPollVote = "encPollVote"; + } + if (message.encReactionTargetMessageKey != null && message.hasOwnProperty("encReactionTargetMessageKey")) { object.encReactionTargetMessageKey = message.encReactionTargetMessageKey; - if (message.encReactionEncPayload != null && message.hasOwnProperty("encReactionEncPayload")) + if (options.oneofs) + object._encReactionTargetMessageKey = "encReactionTargetMessageKey"; + } + if (message.encReactionEncPayload != null && message.hasOwnProperty("encReactionEncPayload")) { object.encReactionEncPayload = options.bytes === String ? $util.base64.encode(message.encReactionEncPayload, 0, message.encReactionEncPayload.length) : options.bytes === Array ? Array.prototype.slice.call(message.encReactionEncPayload) : message.encReactionEncPayload; - if (message.encReactionEncIv != null && message.hasOwnProperty("encReactionEncIv")) + if (options.oneofs) + object._encReactionEncPayload = "encReactionEncPayload"; + } + if (message.encReactionEncIv != null && message.hasOwnProperty("encReactionEncIv")) { object.encReactionEncIv = options.bytes === String ? $util.base64.encode(message.encReactionEncIv, 0, message.encReactionEncIv.length) : options.bytes === Array ? Array.prototype.slice.call(message.encReactionEncIv) : message.encReactionEncIv; - if (message.isSentCagPollCreation != null && message.hasOwnProperty("isSentCagPollCreation")) + if (options.oneofs) + object._encReactionEncIv = "encReactionEncIv"; + } + if (message.isSentCagPollCreation != null && message.hasOwnProperty("isSentCagPollCreation")) { object.isSentCagPollCreation = message.isSentCagPollCreation; - if (message.botMessageSecret != null && message.hasOwnProperty("botMessageSecret")) + if (options.oneofs) + object._isSentCagPollCreation = "isSentCagPollCreation"; + } + if (message.botMessageSecret != null && message.hasOwnProperty("botMessageSecret")) { object.botMessageSecret = options.bytes === String ? $util.base64.encode(message.botMessageSecret, 0, message.botMessageSecret.length) : options.bytes === Array ? Array.prototype.slice.call(message.botMessageSecret) : message.botMessageSecret; - if (message.targetMessageKey != null && message.hasOwnProperty("targetMessageKey")) + if (options.oneofs) + object._botMessageSecret = "botMessageSecret"; + } + if (message.targetMessageKey != null && message.hasOwnProperty("targetMessageKey")) { object.targetMessageKey = message.targetMessageKey; - if (message.encPayload != null && message.hasOwnProperty("encPayload")) + if (options.oneofs) + object._targetMessageKey = "targetMessageKey"; + } + 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")) + if (options.oneofs) + object._encPayload = "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; - if (message.originalSelfAuthor != null && message.hasOwnProperty("originalSelfAuthor")) + if (options.oneofs) + object._encIv = "encIv"; + } + if (message.eventName != null && message.hasOwnProperty("eventName")) { + object.eventName = message.eventName; + if (options.oneofs) + object._eventName = "eventName"; + } + if (message.isEventCanceled != null && message.hasOwnProperty("isEventCanceled")) { + object.isEventCanceled = message.isEventCanceled; + if (options.oneofs) + object._isEventCanceled = "isEventCanceled"; + } + if (message.eventDescription != null && message.hasOwnProperty("eventDescription")) { + object.eventDescription = message.eventDescription; + if (options.oneofs) + object._eventDescription = "eventDescription"; + } + if (message.eventJoinLink != null && message.hasOwnProperty("eventJoinLink")) { + object.eventJoinLink = message.eventJoinLink; + if (options.oneofs) + object._eventJoinLink = "eventJoinLink"; + } + if (message.eventStartTime != null && message.hasOwnProperty("eventStartTime")) { + if (typeof message.eventStartTime === "number") + object.eventStartTime = options.longs === String ? String(message.eventStartTime) : message.eventStartTime; + else + object.eventStartTime = options.longs === String ? $util.Long.prototype.toString.call(message.eventStartTime) : options.longs === Number ? new $util.LongBits(message.eventStartTime.low >>> 0, message.eventStartTime.high >>> 0).toNumber() : message.eventStartTime; + if (options.oneofs) + object._eventStartTime = "eventStartTime"; + } + if (message.eventLocation != null && message.hasOwnProperty("eventLocation")) { + object.eventLocation = $root.proto.MsgOpaqueData.EventLocation.toObject(message.eventLocation, options); + if (options.oneofs) + object._eventLocation = "eventLocation"; + } + if (message.eventEndTime != null && message.hasOwnProperty("eventEndTime")) { + if (typeof message.eventEndTime === "number") + object.eventEndTime = options.longs === String ? String(message.eventEndTime) : message.eventEndTime; + else + object.eventEndTime = options.longs === String ? $util.Long.prototype.toString.call(message.eventEndTime) : options.longs === Number ? new $util.LongBits(message.eventEndTime.low >>> 0, message.eventEndTime.high >>> 0).toNumber() : message.eventEndTime; + if (options.oneofs) + object._eventEndTime = "eventEndTime"; + } + if (message.pollVotesSnapshot != null && message.hasOwnProperty("pollVotesSnapshot")) { + object.pollVotesSnapshot = $root.proto.MsgOpaqueData.PollVotesSnapshot.toObject(message.pollVotesSnapshot, options); + if (options.oneofs) + object._pollVotesSnapshot = "pollVotesSnapshot"; + } + if (message.pollContentType != null && message.hasOwnProperty("pollContentType")) { + object.pollContentType = options.enums === String ? $root.proto.MsgOpaqueData.PollContentType[message.pollContentType] === undefined ? message.pollContentType : $root.proto.MsgOpaqueData.PollContentType[message.pollContentType] : message.pollContentType; + if (options.oneofs) + object._pollContentType = "pollContentType"; + } + if (message.originalSelfAuthor != null && message.hasOwnProperty("originalSelfAuthor")) { object.originalSelfAuthor = message.originalSelfAuthor; + if (options.oneofs) + object._originalSelfAuthor = "originalSelfAuthor"; + } return object; }; @@ -65715,6 +106636,421 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for MsgOpaqueData + * @function getTypeUrl + * @memberof proto.MsgOpaqueData + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MsgOpaqueData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.MsgOpaqueData"; + }; + + MsgOpaqueData.EventLocation = (function() { + + /** + * Properties of an EventLocation. + * @memberof proto.MsgOpaqueData + * @interface IEventLocation + * @property {number|null} [degreesLatitude] EventLocation degreesLatitude + * @property {number|null} [degreesLongitude] EventLocation degreesLongitude + * @property {string|null} [name] EventLocation name + * @property {string|null} [address] EventLocation address + * @property {string|null} [url] EventLocation url + * @property {Uint8Array|null} [jpegThumbnail] EventLocation jpegThumbnail + */ + + /** + * Constructs a new EventLocation. + * @memberof proto.MsgOpaqueData + * @classdesc Represents an EventLocation. + * @implements IEventLocation + * @constructor + * @param {proto.MsgOpaqueData.IEventLocation=} [properties] Properties to set + */ + function EventLocation(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EventLocation degreesLatitude. + * @member {number|null|undefined} degreesLatitude + * @memberof proto.MsgOpaqueData.EventLocation + * @instance + */ + EventLocation.prototype.degreesLatitude = null; + + /** + * EventLocation degreesLongitude. + * @member {number|null|undefined} degreesLongitude + * @memberof proto.MsgOpaqueData.EventLocation + * @instance + */ + EventLocation.prototype.degreesLongitude = null; + + /** + * EventLocation name. + * @member {string|null|undefined} name + * @memberof proto.MsgOpaqueData.EventLocation + * @instance + */ + EventLocation.prototype.name = null; + + /** + * EventLocation address. + * @member {string|null|undefined} address + * @memberof proto.MsgOpaqueData.EventLocation + * @instance + */ + EventLocation.prototype.address = null; + + /** + * EventLocation url. + * @member {string|null|undefined} url + * @memberof proto.MsgOpaqueData.EventLocation + * @instance + */ + EventLocation.prototype.url = null; + + /** + * EventLocation jpegThumbnail. + * @member {Uint8Array|null|undefined} jpegThumbnail + * @memberof proto.MsgOpaqueData.EventLocation + * @instance + */ + EventLocation.prototype.jpegThumbnail = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(EventLocation.prototype, "_degreesLatitude", { + get: $util.oneOfGetter($oneOfFields = ["degreesLatitude"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(EventLocation.prototype, "_degreesLongitude", { + get: $util.oneOfGetter($oneOfFields = ["degreesLongitude"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(EventLocation.prototype, "_name", { + get: $util.oneOfGetter($oneOfFields = ["name"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(EventLocation.prototype, "_address", { + get: $util.oneOfGetter($oneOfFields = ["address"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(EventLocation.prototype, "_url", { + get: $util.oneOfGetter($oneOfFields = ["url"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(EventLocation.prototype, "_jpegThumbnail", { + get: $util.oneOfGetter($oneOfFields = ["jpegThumbnail"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new EventLocation instance using the specified properties. + * @function create + * @memberof proto.MsgOpaqueData.EventLocation + * @static + * @param {proto.MsgOpaqueData.IEventLocation=} [properties] Properties to set + * @returns {proto.MsgOpaqueData.EventLocation} EventLocation instance + */ + EventLocation.create = function create(properties) { + return new EventLocation(properties); + }; + + /** + * Encodes the specified EventLocation message. Does not implicitly {@link proto.MsgOpaqueData.EventLocation.verify|verify} messages. + * @function encode + * @memberof proto.MsgOpaqueData.EventLocation + * @static + * @param {proto.MsgOpaqueData.IEventLocation} message EventLocation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EventLocation.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.jpegThumbnail != null && Object.hasOwnProperty.call(message, "jpegThumbnail")) + writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.jpegThumbnail); + return writer; + }; + + /** + * Encodes the specified EventLocation message, length delimited. Does not implicitly {@link proto.MsgOpaqueData.EventLocation.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.MsgOpaqueData.EventLocation + * @static + * @param {proto.MsgOpaqueData.IEventLocation} message EventLocation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EventLocation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EventLocation message from the specified reader or buffer. + * @function decode + * @memberof proto.MsgOpaqueData.EventLocation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.MsgOpaqueData.EventLocation} EventLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EventLocation.decode = function 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.EventLocation(); + 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.jpegThumbnail = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EventLocation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.MsgOpaqueData.EventLocation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.MsgOpaqueData.EventLocation} EventLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EventLocation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EventLocation message. + * @function verify + * @memberof proto.MsgOpaqueData.EventLocation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EventLocation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.degreesLatitude != null && message.hasOwnProperty("degreesLatitude")) { + properties._degreesLatitude = 1; + if (typeof message.degreesLatitude !== "number") + return "degreesLatitude: number expected"; + } + if (message.degreesLongitude != null && message.hasOwnProperty("degreesLongitude")) { + properties._degreesLongitude = 1; + if (typeof message.degreesLongitude !== "number") + return "degreesLongitude: number expected"; + } + if (message.name != null && message.hasOwnProperty("name")) { + properties._name = 1; + if (!$util.isString(message.name)) + return "name: string expected"; + } + if (message.address != null && message.hasOwnProperty("address")) { + properties._address = 1; + if (!$util.isString(message.address)) + return "address: string expected"; + } + if (message.url != null && message.hasOwnProperty("url")) { + properties._url = 1; + if (!$util.isString(message.url)) + return "url: string expected"; + } + if (message.jpegThumbnail != null && message.hasOwnProperty("jpegThumbnail")) { + properties._jpegThumbnail = 1; + if (!(message.jpegThumbnail && typeof message.jpegThumbnail.length === "number" || $util.isString(message.jpegThumbnail))) + return "jpegThumbnail: buffer expected"; + } + return null; + }; + + /** + * Creates an EventLocation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.MsgOpaqueData.EventLocation + * @static + * @param {Object.} object Plain object + * @returns {proto.MsgOpaqueData.EventLocation} EventLocation + */ + EventLocation.fromObject = function fromObject(object) { + if (object instanceof $root.proto.MsgOpaqueData.EventLocation) + return object; + var message = new $root.proto.MsgOpaqueData.EventLocation(); + 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.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 >= 0) + message.jpegThumbnail = object.jpegThumbnail; + return message; + }; + + /** + * Creates a plain object from an EventLocation message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.MsgOpaqueData.EventLocation + * @static + * @param {proto.MsgOpaqueData.EventLocation} message EventLocation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EventLocation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.degreesLatitude != null && message.hasOwnProperty("degreesLatitude")) { + object.degreesLatitude = options.json && !isFinite(message.degreesLatitude) ? String(message.degreesLatitude) : message.degreesLatitude; + if (options.oneofs) + object._degreesLatitude = "degreesLatitude"; + } + if (message.degreesLongitude != null && message.hasOwnProperty("degreesLongitude")) { + object.degreesLongitude = options.json && !isFinite(message.degreesLongitude) ? String(message.degreesLongitude) : message.degreesLongitude; + if (options.oneofs) + object._degreesLongitude = "degreesLongitude"; + } + if (message.name != null && message.hasOwnProperty("name")) { + object.name = message.name; + if (options.oneofs) + object._name = "name"; + } + if (message.address != null && message.hasOwnProperty("address")) { + object.address = message.address; + if (options.oneofs) + object._address = "address"; + } + if (message.url != null && message.hasOwnProperty("url")) { + object.url = message.url; + if (options.oneofs) + object._url = "url"; + } + 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._jpegThumbnail = "jpegThumbnail"; + } + return object; + }; + + /** + * Converts this EventLocation to JSON. + * @function toJSON + * @memberof proto.MsgOpaqueData.EventLocation + * @instance + * @returns {Object.} JSON object + */ + EventLocation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EventLocation + * @function getTypeUrl + * @memberof proto.MsgOpaqueData.EventLocation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EventLocation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.MsgOpaqueData.EventLocation"; + }; + + return EventLocation; + })(); + + /** + * PollContentType enum. + * @name proto.MsgOpaqueData.PollContentType + * @enum {number} + * @property {number} UNKNOWN=0 UNKNOWN value + * @property {number} TEXT=1 TEXT value + * @property {number} IMAGE=2 IMAGE value + */ + MsgOpaqueData.PollContentType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNKNOWN"] = 0; + values[valuesById[1] = "TEXT"] = 1; + values[valuesById[2] = "IMAGE"] = 2; + return values; + })(); + MsgOpaqueData.PollOption = (function() { /** @@ -65722,6 +107058,7 @@ $root.proto = (function() { * @memberof proto.MsgOpaqueData * @interface IPollOption * @property {string|null} [name] PollOption name + * @property {string|null} [hash] PollOption hash */ /** @@ -65741,11 +107078,34 @@ $root.proto = (function() { /** * PollOption name. - * @member {string} name + * @member {string|null|undefined} name * @memberof proto.MsgOpaqueData.PollOption * @instance */ - PollOption.prototype.name = ""; + PollOption.prototype.name = null; + + /** + * PollOption hash. + * @member {string|null|undefined} hash + * @memberof proto.MsgOpaqueData.PollOption + * @instance + */ + PollOption.prototype.hash = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PollOption.prototype, "_name", { + get: $util.oneOfGetter($oneOfFields = ["name"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PollOption.prototype, "_hash", { + get: $util.oneOfGetter($oneOfFields = ["hash"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new PollOption instance using the specified properties. @@ -65773,6 +107133,8 @@ $root.proto = (function() { writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.hash != null && Object.hasOwnProperty.call(message, "hash")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.hash); return writer; }; @@ -65807,9 +107169,14 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.hash = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -65845,9 +107212,17 @@ $root.proto = (function() { PollOption.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) { + properties._name = 1; if (!$util.isString(message.name)) return "name: string expected"; + } + if (message.hash != null && message.hasOwnProperty("hash")) { + properties._hash = 1; + if (!$util.isString(message.hash)) + return "hash: string expected"; + } return null; }; @@ -65865,6 +107240,8 @@ $root.proto = (function() { var message = new $root.proto.MsgOpaqueData.PollOption(); if (object.name != null) message.name = String(object.name); + if (object.hash != null) + message.hash = String(object.hash); return message; }; @@ -65881,10 +107258,16 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && message.hasOwnProperty("name")) { object.name = message.name; + if (options.oneofs) + object._name = "name"; + } + if (message.hash != null && message.hasOwnProperty("hash")) { + object.hash = message.hash; + if (options.oneofs) + object._hash = "hash"; + } return object; }; @@ -65899,9 +107282,503 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for PollOption + * @function getTypeUrl + * @memberof proto.MsgOpaqueData.PollOption + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PollOption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.MsgOpaqueData.PollOption"; + }; + return PollOption; })(); + MsgOpaqueData.PollVoteSnapshot = (function() { + + /** + * Properties of a PollVoteSnapshot. + * @memberof proto.MsgOpaqueData + * @interface IPollVoteSnapshot + * @property {proto.MsgOpaqueData.IPollOption|null} [option] PollVoteSnapshot option + * @property {number|null} [optionVoteCount] PollVoteSnapshot optionVoteCount + */ + + /** + * Constructs a new PollVoteSnapshot. + * @memberof proto.MsgOpaqueData + * @classdesc Represents a PollVoteSnapshot. + * @implements IPollVoteSnapshot + * @constructor + * @param {proto.MsgOpaqueData.IPollVoteSnapshot=} [properties] Properties to set + */ + function PollVoteSnapshot(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PollVoteSnapshot option. + * @member {proto.MsgOpaqueData.IPollOption|null|undefined} option + * @memberof proto.MsgOpaqueData.PollVoteSnapshot + * @instance + */ + PollVoteSnapshot.prototype.option = null; + + /** + * PollVoteSnapshot optionVoteCount. + * @member {number|null|undefined} optionVoteCount + * @memberof proto.MsgOpaqueData.PollVoteSnapshot + * @instance + */ + PollVoteSnapshot.prototype.optionVoteCount = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PollVoteSnapshot.prototype, "_option", { + get: $util.oneOfGetter($oneOfFields = ["option"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PollVoteSnapshot.prototype, "_optionVoteCount", { + get: $util.oneOfGetter($oneOfFields = ["optionVoteCount"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new PollVoteSnapshot instance using the specified properties. + * @function create + * @memberof proto.MsgOpaqueData.PollVoteSnapshot + * @static + * @param {proto.MsgOpaqueData.IPollVoteSnapshot=} [properties] Properties to set + * @returns {proto.MsgOpaqueData.PollVoteSnapshot} PollVoteSnapshot instance + */ + PollVoteSnapshot.create = function create(properties) { + return new PollVoteSnapshot(properties); + }; + + /** + * Encodes the specified PollVoteSnapshot message. Does not implicitly {@link proto.MsgOpaqueData.PollVoteSnapshot.verify|verify} messages. + * @function encode + * @memberof proto.MsgOpaqueData.PollVoteSnapshot + * @static + * @param {proto.MsgOpaqueData.IPollVoteSnapshot} message PollVoteSnapshot message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PollVoteSnapshot.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.option != null && Object.hasOwnProperty.call(message, "option")) + $root.proto.MsgOpaqueData.PollOption.encode(message.option, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.optionVoteCount != null && Object.hasOwnProperty.call(message, "optionVoteCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.optionVoteCount); + return writer; + }; + + /** + * Encodes the specified PollVoteSnapshot message, length delimited. Does not implicitly {@link proto.MsgOpaqueData.PollVoteSnapshot.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.MsgOpaqueData.PollVoteSnapshot + * @static + * @param {proto.MsgOpaqueData.IPollVoteSnapshot} message PollVoteSnapshot message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PollVoteSnapshot.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PollVoteSnapshot message from the specified reader or buffer. + * @function decode + * @memberof proto.MsgOpaqueData.PollVoteSnapshot + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.MsgOpaqueData.PollVoteSnapshot} PollVoteSnapshot + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PollVoteSnapshot.decode = function 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.PollVoteSnapshot(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.option = $root.proto.MsgOpaqueData.PollOption.decode(reader, reader.uint32()); + break; + } + case 2: { + message.optionVoteCount = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PollVoteSnapshot message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.MsgOpaqueData.PollVoteSnapshot + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.MsgOpaqueData.PollVoteSnapshot} PollVoteSnapshot + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PollVoteSnapshot.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PollVoteSnapshot message. + * @function verify + * @memberof proto.MsgOpaqueData.PollVoteSnapshot + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PollVoteSnapshot.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.option != null && message.hasOwnProperty("option")) { + properties._option = 1; + { + var error = $root.proto.MsgOpaqueData.PollOption.verify(message.option); + if (error) + return "option." + error; + } + } + if (message.optionVoteCount != null && message.hasOwnProperty("optionVoteCount")) { + properties._optionVoteCount = 1; + if (!$util.isInteger(message.optionVoteCount)) + return "optionVoteCount: integer expected"; + } + return null; + }; + + /** + * Creates a PollVoteSnapshot message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.MsgOpaqueData.PollVoteSnapshot + * @static + * @param {Object.} object Plain object + * @returns {proto.MsgOpaqueData.PollVoteSnapshot} PollVoteSnapshot + */ + PollVoteSnapshot.fromObject = function fromObject(object) { + if (object instanceof $root.proto.MsgOpaqueData.PollVoteSnapshot) + return object; + var message = new $root.proto.MsgOpaqueData.PollVoteSnapshot(); + if (object.option != null) { + if (typeof object.option !== "object") + throw TypeError(".proto.MsgOpaqueData.PollVoteSnapshot.option: object expected"); + message.option = $root.proto.MsgOpaqueData.PollOption.fromObject(object.option); + } + if (object.optionVoteCount != null) + message.optionVoteCount = object.optionVoteCount | 0; + return message; + }; + + /** + * Creates a plain object from a PollVoteSnapshot message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.MsgOpaqueData.PollVoteSnapshot + * @static + * @param {proto.MsgOpaqueData.PollVoteSnapshot} message PollVoteSnapshot + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PollVoteSnapshot.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.option != null && message.hasOwnProperty("option")) { + object.option = $root.proto.MsgOpaqueData.PollOption.toObject(message.option, options); + if (options.oneofs) + object._option = "option"; + } + if (message.optionVoteCount != null && message.hasOwnProperty("optionVoteCount")) { + object.optionVoteCount = message.optionVoteCount; + if (options.oneofs) + object._optionVoteCount = "optionVoteCount"; + } + return object; + }; + + /** + * Converts this PollVoteSnapshot to JSON. + * @function toJSON + * @memberof proto.MsgOpaqueData.PollVoteSnapshot + * @instance + * @returns {Object.} JSON object + */ + PollVoteSnapshot.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PollVoteSnapshot + * @function getTypeUrl + * @memberof proto.MsgOpaqueData.PollVoteSnapshot + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PollVoteSnapshot.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.MsgOpaqueData.PollVoteSnapshot"; + }; + + return PollVoteSnapshot; + })(); + + MsgOpaqueData.PollVotesSnapshot = (function() { + + /** + * Properties of a PollVotesSnapshot. + * @memberof proto.MsgOpaqueData + * @interface IPollVotesSnapshot + * @property {Array.|null} [pollVotes] PollVotesSnapshot pollVotes + */ + + /** + * Constructs a new PollVotesSnapshot. + * @memberof proto.MsgOpaqueData + * @classdesc Represents a PollVotesSnapshot. + * @implements IPollVotesSnapshot + * @constructor + * @param {proto.MsgOpaqueData.IPollVotesSnapshot=} [properties] Properties to set + */ + function PollVotesSnapshot(properties) { + this.pollVotes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PollVotesSnapshot pollVotes. + * @member {Array.} pollVotes + * @memberof proto.MsgOpaqueData.PollVotesSnapshot + * @instance + */ + PollVotesSnapshot.prototype.pollVotes = $util.emptyArray; + + /** + * Creates a new PollVotesSnapshot instance using the specified properties. + * @function create + * @memberof proto.MsgOpaqueData.PollVotesSnapshot + * @static + * @param {proto.MsgOpaqueData.IPollVotesSnapshot=} [properties] Properties to set + * @returns {proto.MsgOpaqueData.PollVotesSnapshot} PollVotesSnapshot instance + */ + PollVotesSnapshot.create = function create(properties) { + return new PollVotesSnapshot(properties); + }; + + /** + * Encodes the specified PollVotesSnapshot message. Does not implicitly {@link proto.MsgOpaqueData.PollVotesSnapshot.verify|verify} messages. + * @function encode + * @memberof proto.MsgOpaqueData.PollVotesSnapshot + * @static + * @param {proto.MsgOpaqueData.IPollVotesSnapshot} message PollVotesSnapshot message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PollVotesSnapshot.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.pollVotes != null && message.pollVotes.length) + for (var i = 0; i < message.pollVotes.length; ++i) + $root.proto.MsgOpaqueData.PollVoteSnapshot.encode(message.pollVotes[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PollVotesSnapshot message, length delimited. Does not implicitly {@link proto.MsgOpaqueData.PollVotesSnapshot.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.MsgOpaqueData.PollVotesSnapshot + * @static + * @param {proto.MsgOpaqueData.IPollVotesSnapshot} message PollVotesSnapshot message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PollVotesSnapshot.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PollVotesSnapshot message from the specified reader or buffer. + * @function decode + * @memberof proto.MsgOpaqueData.PollVotesSnapshot + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.MsgOpaqueData.PollVotesSnapshot} PollVotesSnapshot + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PollVotesSnapshot.decode = function 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.PollVotesSnapshot(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.pollVotes && message.pollVotes.length)) + message.pollVotes = []; + message.pollVotes.push($root.proto.MsgOpaqueData.PollVoteSnapshot.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PollVotesSnapshot message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.MsgOpaqueData.PollVotesSnapshot + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.MsgOpaqueData.PollVotesSnapshot} PollVotesSnapshot + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PollVotesSnapshot.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PollVotesSnapshot message. + * @function verify + * @memberof proto.MsgOpaqueData.PollVotesSnapshot + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PollVotesSnapshot.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.pollVotes != null && message.hasOwnProperty("pollVotes")) { + if (!Array.isArray(message.pollVotes)) + return "pollVotes: array expected"; + for (var i = 0; i < message.pollVotes.length; ++i) { + var error = $root.proto.MsgOpaqueData.PollVoteSnapshot.verify(message.pollVotes[i]); + if (error) + return "pollVotes." + error; + } + } + return null; + }; + + /** + * Creates a PollVotesSnapshot message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.MsgOpaqueData.PollVotesSnapshot + * @static + * @param {Object.} object Plain object + * @returns {proto.MsgOpaqueData.PollVotesSnapshot} PollVotesSnapshot + */ + PollVotesSnapshot.fromObject = function fromObject(object) { + if (object instanceof $root.proto.MsgOpaqueData.PollVotesSnapshot) + return object; + var message = new $root.proto.MsgOpaqueData.PollVotesSnapshot(); + if (object.pollVotes) { + if (!Array.isArray(object.pollVotes)) + throw TypeError(".proto.MsgOpaqueData.PollVotesSnapshot.pollVotes: array expected"); + message.pollVotes = []; + for (var i = 0; i < object.pollVotes.length; ++i) { + if (typeof object.pollVotes[i] !== "object") + throw TypeError(".proto.MsgOpaqueData.PollVotesSnapshot.pollVotes: object expected"); + message.pollVotes[i] = $root.proto.MsgOpaqueData.PollVoteSnapshot.fromObject(object.pollVotes[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a PollVotesSnapshot message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.MsgOpaqueData.PollVotesSnapshot + * @static + * @param {proto.MsgOpaqueData.PollVotesSnapshot} message PollVotesSnapshot + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PollVotesSnapshot.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.pollVotes = []; + if (message.pollVotes && message.pollVotes.length) { + object.pollVotes = []; + for (var j = 0; j < message.pollVotes.length; ++j) + object.pollVotes[j] = $root.proto.MsgOpaqueData.PollVoteSnapshot.toObject(message.pollVotes[j], options); + } + return object; + }; + + /** + * Converts this PollVotesSnapshot to JSON. + * @function toJSON + * @memberof proto.MsgOpaqueData.PollVotesSnapshot + * @instance + * @returns {Object.} JSON object + */ + PollVotesSnapshot.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PollVotesSnapshot + * @function getTypeUrl + * @memberof proto.MsgOpaqueData.PollVotesSnapshot + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PollVotesSnapshot.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.MsgOpaqueData.PollVotesSnapshot"; + }; + + return PollVotesSnapshot; + })(); + return MsgOpaqueData; })(); @@ -65946,6 +107823,21 @@ $root.proto = (function() { */ MsgRowOpaqueData.prototype.quotedMsg = null; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MsgRowOpaqueData.prototype, "_currentMsg", { + get: $util.oneOfGetter($oneOfFields = ["currentMsg"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MsgRowOpaqueData.prototype, "_quotedMsg", { + get: $util.oneOfGetter($oneOfFields = ["quotedMsg"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new MsgRowOpaqueData instance using the specified properties. * @function create @@ -66008,12 +107900,14 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.currentMsg = $root.proto.MsgOpaqueData.decode(reader, reader.uint32()); - break; - case 2: - message.quotedMsg = $root.proto.MsgOpaqueData.decode(reader, reader.uint32()); - break; + case 1: { + message.currentMsg = $root.proto.MsgOpaqueData.decode(reader, reader.uint32()); + break; + } + case 2: { + message.quotedMsg = $root.proto.MsgOpaqueData.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -66049,15 +107943,22 @@ $root.proto = (function() { MsgRowOpaqueData.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; if (message.currentMsg != null && message.hasOwnProperty("currentMsg")) { - var error = $root.proto.MsgOpaqueData.verify(message.currentMsg); - if (error) - return "currentMsg." + error; + properties._currentMsg = 1; + { + var error = $root.proto.MsgOpaqueData.verify(message.currentMsg); + if (error) + return "currentMsg." + error; + } } if (message.quotedMsg != null && message.hasOwnProperty("quotedMsg")) { - var error = $root.proto.MsgOpaqueData.verify(message.quotedMsg); - if (error) - return "quotedMsg." + error; + properties._quotedMsg = 1; + { + var error = $root.proto.MsgOpaqueData.verify(message.quotedMsg); + if (error) + return "quotedMsg." + error; + } } return null; }; @@ -66100,14 +108001,16 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.currentMsg = null; - object.quotedMsg = null; - } - if (message.currentMsg != null && message.hasOwnProperty("currentMsg")) + if (message.currentMsg != null && message.hasOwnProperty("currentMsg")) { object.currentMsg = $root.proto.MsgOpaqueData.toObject(message.currentMsg, options); - if (message.quotedMsg != null && message.hasOwnProperty("quotedMsg")) + if (options.oneofs) + object._currentMsg = "currentMsg"; + } + if (message.quotedMsg != null && message.hasOwnProperty("quotedMsg")) { object.quotedMsg = $root.proto.MsgOpaqueData.toObject(message.quotedMsg, options); + if (options.oneofs) + object._quotedMsg = "quotedMsg"; + } return object; }; @@ -66122,6 +108025,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for MsgRowOpaqueData + * @function getTypeUrl + * @memberof proto.MsgRowOpaqueData + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MsgRowOpaqueData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.MsgRowOpaqueData"; + }; + return MsgRowOpaqueData; })(); @@ -66152,19 +108070,34 @@ $root.proto = (function() { /** * NoiseCertificate details. - * @member {Uint8Array} details + * @member {Uint8Array|null|undefined} details * @memberof proto.NoiseCertificate * @instance */ - NoiseCertificate.prototype.details = $util.newBuffer([]); + NoiseCertificate.prototype.details = null; /** * NoiseCertificate signature. - * @member {Uint8Array} signature + * @member {Uint8Array|null|undefined} signature * @memberof proto.NoiseCertificate * @instance */ - NoiseCertificate.prototype.signature = $util.newBuffer([]); + NoiseCertificate.prototype.signature = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(NoiseCertificate.prototype, "_details", { + get: $util.oneOfGetter($oneOfFields = ["details"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(NoiseCertificate.prototype, "_signature", { + get: $util.oneOfGetter($oneOfFields = ["signature"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new NoiseCertificate instance using the specified properties. @@ -66228,12 +108161,14 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.details = reader.bytes(); - break; - case 2: - message.signature = reader.bytes(); - break; + case 1: { + message.details = reader.bytes(); + break; + } + case 2: { + message.signature = reader.bytes(); + break; + } default: reader.skipType(tag & 7); break; @@ -66269,12 +108204,17 @@ $root.proto = (function() { NoiseCertificate.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.details != null && message.hasOwnProperty("details")) + var properties = {}; + if (message.details != null && message.hasOwnProperty("details")) { + properties._details = 1; 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 != null && message.hasOwnProperty("signature")) { + properties._signature = 1; if (!(message.signature && typeof message.signature.length === "number" || $util.isString(message.signature))) return "signature: buffer expected"; + } return null; }; @@ -66293,12 +108233,12 @@ $root.proto = (function() { 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) + else if (object.details.length >= 0) 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) + else if (object.signature.length >= 0) message.signature = object.signature; return message; }; @@ -66316,26 +108256,16 @@ $root.proto = (function() { 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")) + 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")) + if (options.oneofs) + object._details = "details"; + } + if (message.signature != null && message.hasOwnProperty("signature")) { object.signature = options.bytes === String ? $util.base64.encode(message.signature, 0, message.signature.length) : options.bytes === Array ? Array.prototype.slice.call(message.signature) : message.signature; + if (options.oneofs) + object._signature = "signature"; + } return object; }; @@ -66350,6 +108280,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for NoiseCertificate + * @function getTypeUrl + * @memberof proto.NoiseCertificate + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NoiseCertificate.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.NoiseCertificate"; + }; + NoiseCertificate.Details = (function() { /** @@ -66380,43 +108325,76 @@ $root.proto = (function() { /** * Details serial. - * @member {number} serial + * @member {number|null|undefined} serial * @memberof proto.NoiseCertificate.Details * @instance */ - Details.prototype.serial = 0; + Details.prototype.serial = null; /** * Details issuer. - * @member {string} issuer + * @member {string|null|undefined} issuer * @memberof proto.NoiseCertificate.Details * @instance */ - Details.prototype.issuer = ""; + Details.prototype.issuer = null; /** * Details expires. - * @member {number|Long} expires + * @member {number|Long|null|undefined} expires * @memberof proto.NoiseCertificate.Details * @instance */ - Details.prototype.expires = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + Details.prototype.expires = null; /** * Details subject. - * @member {string} subject + * @member {string|null|undefined} subject * @memberof proto.NoiseCertificate.Details * @instance */ - Details.prototype.subject = ""; + Details.prototype.subject = null; /** * Details key. - * @member {Uint8Array} key + * @member {Uint8Array|null|undefined} key * @memberof proto.NoiseCertificate.Details * @instance */ - Details.prototype.key = $util.newBuffer([]); + Details.prototype.key = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Details.prototype, "_serial", { + get: $util.oneOfGetter($oneOfFields = ["serial"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Details.prototype, "_issuer", { + get: $util.oneOfGetter($oneOfFields = ["issuer"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Details.prototype, "_expires", { + get: $util.oneOfGetter($oneOfFields = ["expires"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Details.prototype, "_subject", { + get: $util.oneOfGetter($oneOfFields = ["subject"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Details.prototype, "_key", { + get: $util.oneOfGetter($oneOfFields = ["key"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new Details instance using the specified properties. @@ -66486,21 +108464,26 @@ $root.proto = (function() { 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; + 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; @@ -66536,21 +108519,32 @@ $root.proto = (function() { Details.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.serial != null && message.hasOwnProperty("serial")) + var properties = {}; + if (message.serial != null && message.hasOwnProperty("serial")) { + properties._serial = 1; if (!$util.isInteger(message.serial)) return "serial: integer expected"; - if (message.issuer != null && message.hasOwnProperty("issuer")) + } + if (message.issuer != null && message.hasOwnProperty("issuer")) { + properties._issuer = 1; if (!$util.isString(message.issuer)) return "issuer: string expected"; - if (message.expires != null && message.hasOwnProperty("expires")) + } + if (message.expires != null && message.hasOwnProperty("expires")) { + properties._expires = 1; 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 (message.subject != null && message.hasOwnProperty("subject")) { + properties._subject = 1; if (!$util.isString(message.subject)) return "subject: string expected"; - if (message.key != null && message.hasOwnProperty("key")) + } + if (message.key != null && message.hasOwnProperty("key")) { + properties._key = 1; if (!(message.key && typeof message.key.length === "number" || $util.isString(message.key))) return "key: buffer expected"; + } return null; }; @@ -66584,7 +108578,7 @@ $root.proto = (function() { 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) + else if (object.key.length >= 0) message.key = object.key; return message; }; @@ -66602,36 +108596,34 @@ $root.proto = (function() { 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")) + if (message.serial != null && message.hasOwnProperty("serial")) { object.serial = message.serial; - if (message.issuer != null && message.hasOwnProperty("issuer")) + if (options.oneofs) + object._serial = "serial"; + } + if (message.issuer != null && message.hasOwnProperty("issuer")) { object.issuer = message.issuer; - if (message.expires != null && message.hasOwnProperty("expires")) + if (options.oneofs) + object._issuer = "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")) + if (options.oneofs) + object._expires = "expires"; + } + if (message.subject != null && message.hasOwnProperty("subject")) { object.subject = message.subject; - if (message.key != null && message.hasOwnProperty("key")) + if (options.oneofs) + object._subject = "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; + if (options.oneofs) + object._key = "key"; + } return object; }; @@ -66646,6 +108638,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Details + * @function getTypeUrl + * @memberof proto.NoiseCertificate.Details + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Details.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.NoiseCertificate.Details"; + }; + return Details; })(); @@ -66697,19 +108704,46 @@ $root.proto = (function() { /** * NotificationMessageInfo messageTimestamp. - * @member {number|Long} messageTimestamp + * @member {number|Long|null|undefined} messageTimestamp * @memberof proto.NotificationMessageInfo * @instance */ - NotificationMessageInfo.prototype.messageTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + NotificationMessageInfo.prototype.messageTimestamp = null; /** * NotificationMessageInfo participant. - * @member {string} participant + * @member {string|null|undefined} participant * @memberof proto.NotificationMessageInfo * @instance */ - NotificationMessageInfo.prototype.participant = ""; + NotificationMessageInfo.prototype.participant = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(NotificationMessageInfo.prototype, "_key", { + get: $util.oneOfGetter($oneOfFields = ["key"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(NotificationMessageInfo.prototype, "_message", { + get: $util.oneOfGetter($oneOfFields = ["message"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(NotificationMessageInfo.prototype, "_messageTimestamp", { + get: $util.oneOfGetter($oneOfFields = ["messageTimestamp"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(NotificationMessageInfo.prototype, "_participant", { + get: $util.oneOfGetter($oneOfFields = ["participant"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new NotificationMessageInfo instance using the specified properties. @@ -66777,18 +108811,22 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.key = $root.proto.MessageKey.decode(reader, reader.uint32()); - break; - case 2: - message.message = $root.proto.Message.decode(reader, reader.uint32()); - break; - case 3: - message.messageTimestamp = reader.uint64(); - break; - case 4: - message.participant = reader.string(); - break; + case 1: { + message.key = $root.proto.MessageKey.decode(reader, reader.uint32()); + break; + } + case 2: { + message.message = $root.proto.Message.decode(reader, reader.uint32()); + break; + } + case 3: { + message.messageTimestamp = reader.uint64(); + break; + } + case 4: { + message.participant = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -66824,22 +108862,33 @@ $root.proto = (function() { NotificationMessageInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; if (message.key != null && message.hasOwnProperty("key")) { - var error = $root.proto.MessageKey.verify(message.key); - if (error) - return "key." + error; + properties._key = 1; + { + var error = $root.proto.MessageKey.verify(message.key); + if (error) + return "key." + error; + } } if (message.message != null && message.hasOwnProperty("message")) { - var error = $root.proto.Message.verify(message.message); - if (error) - return "message." + error; + properties._message = 1; + { + var error = $root.proto.Message.verify(message.message); + if (error) + return "message." + error; + } } - if (message.messageTimestamp != null && message.hasOwnProperty("messageTimestamp")) + if (message.messageTimestamp != null && message.hasOwnProperty("messageTimestamp")) { + properties._messageTimestamp = 1; if (!$util.isInteger(message.messageTimestamp) && !(message.messageTimestamp && $util.isInteger(message.messageTimestamp.low) && $util.isInteger(message.messageTimestamp.high))) return "messageTimestamp: integer|Long expected"; - if (message.participant != null && message.hasOwnProperty("participant")) + } + if (message.participant != null && message.hasOwnProperty("participant")) { + properties._participant = 1; if (!$util.isString(message.participant)) return "participant: string expected"; + } return null; }; @@ -66892,27 +108941,29 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.key = null; - object.message = null; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.messageTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.messageTimestamp = options.longs === String ? "0" : 0; - object.participant = ""; - } - if (message.key != null && message.hasOwnProperty("key")) + if (message.key != null && message.hasOwnProperty("key")) { object.key = $root.proto.MessageKey.toObject(message.key, options); - if (message.message != null && message.hasOwnProperty("message")) + if (options.oneofs) + object._key = "key"; + } + if (message.message != null && message.hasOwnProperty("message")) { object.message = $root.proto.Message.toObject(message.message, options); - if (message.messageTimestamp != null && message.hasOwnProperty("messageTimestamp")) + if (options.oneofs) + object._message = "message"; + } + if (message.messageTimestamp != null && message.hasOwnProperty("messageTimestamp")) { if (typeof message.messageTimestamp === "number") object.messageTimestamp = options.longs === String ? String(message.messageTimestamp) : message.messageTimestamp; else object.messageTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.messageTimestamp) : options.longs === Number ? new $util.LongBits(message.messageTimestamp.low >>> 0, message.messageTimestamp.high >>> 0).toNumber(true) : message.messageTimestamp; - if (message.participant != null && message.hasOwnProperty("participant")) + if (options.oneofs) + object._messageTimestamp = "messageTimestamp"; + } + if (message.participant != null && message.hasOwnProperty("participant")) { object.participant = message.participant; + if (options.oneofs) + object._participant = "participant"; + } return object; }; @@ -66927,6 +108978,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for NotificationMessageInfo + * @function getTypeUrl + * @memberof proto.NotificationMessageInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NotificationMessageInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.NotificationMessageInfo"; + }; + return NotificationMessageInfo; })(); @@ -66961,51 +109027,90 @@ $root.proto = (function() { /** * NotificationSettings messageVibrate. - * @member {string} messageVibrate + * @member {string|null|undefined} messageVibrate * @memberof proto.NotificationSettings * @instance */ - NotificationSettings.prototype.messageVibrate = ""; + NotificationSettings.prototype.messageVibrate = null; /** * NotificationSettings messagePopup. - * @member {string} messagePopup + * @member {string|null|undefined} messagePopup * @memberof proto.NotificationSettings * @instance */ - NotificationSettings.prototype.messagePopup = ""; + NotificationSettings.prototype.messagePopup = null; /** * NotificationSettings messageLight. - * @member {string} messageLight + * @member {string|null|undefined} messageLight * @memberof proto.NotificationSettings * @instance */ - NotificationSettings.prototype.messageLight = ""; + NotificationSettings.prototype.messageLight = null; /** * NotificationSettings lowPriorityNotifications. - * @member {boolean} lowPriorityNotifications + * @member {boolean|null|undefined} lowPriorityNotifications * @memberof proto.NotificationSettings * @instance */ - NotificationSettings.prototype.lowPriorityNotifications = false; + NotificationSettings.prototype.lowPriorityNotifications = null; /** * NotificationSettings reactionsMuted. - * @member {boolean} reactionsMuted + * @member {boolean|null|undefined} reactionsMuted * @memberof proto.NotificationSettings * @instance */ - NotificationSettings.prototype.reactionsMuted = false; + NotificationSettings.prototype.reactionsMuted = null; /** * NotificationSettings callVibrate. - * @member {string} callVibrate + * @member {string|null|undefined} callVibrate * @memberof proto.NotificationSettings * @instance */ - NotificationSettings.prototype.callVibrate = ""; + NotificationSettings.prototype.callVibrate = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(NotificationSettings.prototype, "_messageVibrate", { + get: $util.oneOfGetter($oneOfFields = ["messageVibrate"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(NotificationSettings.prototype, "_messagePopup", { + get: $util.oneOfGetter($oneOfFields = ["messagePopup"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(NotificationSettings.prototype, "_messageLight", { + get: $util.oneOfGetter($oneOfFields = ["messageLight"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(NotificationSettings.prototype, "_lowPriorityNotifications", { + get: $util.oneOfGetter($oneOfFields = ["lowPriorityNotifications"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(NotificationSettings.prototype, "_reactionsMuted", { + get: $util.oneOfGetter($oneOfFields = ["reactionsMuted"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(NotificationSettings.prototype, "_callVibrate", { + get: $util.oneOfGetter($oneOfFields = ["callVibrate"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new NotificationSettings instance using the specified properties. @@ -67077,24 +109182,30 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.messageVibrate = reader.string(); - break; - case 2: - message.messagePopup = reader.string(); - break; - case 3: - message.messageLight = reader.string(); - break; - case 4: - message.lowPriorityNotifications = reader.bool(); - break; - case 5: - message.reactionsMuted = reader.bool(); - break; - case 6: - message.callVibrate = reader.string(); - break; + case 1: { + message.messageVibrate = reader.string(); + break; + } + case 2: { + message.messagePopup = reader.string(); + break; + } + case 3: { + message.messageLight = reader.string(); + break; + } + case 4: { + message.lowPriorityNotifications = reader.bool(); + break; + } + case 5: { + message.reactionsMuted = reader.bool(); + break; + } + case 6: { + message.callVibrate = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -67130,24 +109241,37 @@ $root.proto = (function() { NotificationSettings.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.messageVibrate != null && message.hasOwnProperty("messageVibrate")) + var properties = {}; + if (message.messageVibrate != null && message.hasOwnProperty("messageVibrate")) { + properties._messageVibrate = 1; if (!$util.isString(message.messageVibrate)) return "messageVibrate: string expected"; - if (message.messagePopup != null && message.hasOwnProperty("messagePopup")) + } + if (message.messagePopup != null && message.hasOwnProperty("messagePopup")) { + properties._messagePopup = 1; if (!$util.isString(message.messagePopup)) return "messagePopup: string expected"; - if (message.messageLight != null && message.hasOwnProperty("messageLight")) + } + if (message.messageLight != null && message.hasOwnProperty("messageLight")) { + properties._messageLight = 1; if (!$util.isString(message.messageLight)) return "messageLight: string expected"; - if (message.lowPriorityNotifications != null && message.hasOwnProperty("lowPriorityNotifications")) + } + if (message.lowPriorityNotifications != null && message.hasOwnProperty("lowPriorityNotifications")) { + properties._lowPriorityNotifications = 1; if (typeof message.lowPriorityNotifications !== "boolean") return "lowPriorityNotifications: boolean expected"; - if (message.reactionsMuted != null && message.hasOwnProperty("reactionsMuted")) + } + if (message.reactionsMuted != null && message.hasOwnProperty("reactionsMuted")) { + properties._reactionsMuted = 1; if (typeof message.reactionsMuted !== "boolean") return "reactionsMuted: boolean expected"; - if (message.callVibrate != null && message.hasOwnProperty("callVibrate")) + } + if (message.callVibrate != null && message.hasOwnProperty("callVibrate")) { + properties._callVibrate = 1; if (!$util.isString(message.callVibrate)) return "callVibrate: string expected"; + } return null; }; @@ -67191,26 +109315,36 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.messageVibrate = ""; - object.messagePopup = ""; - object.messageLight = ""; - object.lowPriorityNotifications = false; - object.reactionsMuted = false; - object.callVibrate = ""; - } - if (message.messageVibrate != null && message.hasOwnProperty("messageVibrate")) + if (message.messageVibrate != null && message.hasOwnProperty("messageVibrate")) { object.messageVibrate = message.messageVibrate; - if (message.messagePopup != null && message.hasOwnProperty("messagePopup")) + if (options.oneofs) + object._messageVibrate = "messageVibrate"; + } + if (message.messagePopup != null && message.hasOwnProperty("messagePopup")) { object.messagePopup = message.messagePopup; - if (message.messageLight != null && message.hasOwnProperty("messageLight")) + if (options.oneofs) + object._messagePopup = "messagePopup"; + } + if (message.messageLight != null && message.hasOwnProperty("messageLight")) { object.messageLight = message.messageLight; - if (message.lowPriorityNotifications != null && message.hasOwnProperty("lowPriorityNotifications")) + if (options.oneofs) + object._messageLight = "messageLight"; + } + if (message.lowPriorityNotifications != null && message.hasOwnProperty("lowPriorityNotifications")) { object.lowPriorityNotifications = message.lowPriorityNotifications; - if (message.reactionsMuted != null && message.hasOwnProperty("reactionsMuted")) + if (options.oneofs) + object._lowPriorityNotifications = "lowPriorityNotifications"; + } + if (message.reactionsMuted != null && message.hasOwnProperty("reactionsMuted")) { object.reactionsMuted = message.reactionsMuted; - if (message.callVibrate != null && message.hasOwnProperty("callVibrate")) + if (options.oneofs) + object._reactionsMuted = "reactionsMuted"; + } + if (message.callVibrate != null && message.hasOwnProperty("callVibrate")) { object.callVibrate = message.callVibrate; + if (options.oneofs) + object._callVibrate = "callVibrate"; + } return object; }; @@ -67225,9 +109359,315 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for NotificationSettings + * @function getTypeUrl + * @memberof proto.NotificationSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NotificationSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.NotificationSettings"; + }; + return NotificationSettings; })(); + proto.PairingRequest = (function() { + + /** + * Properties of a PairingRequest. + * @memberof proto + * @interface IPairingRequest + * @property {Uint8Array|null} [companionPublicKey] PairingRequest companionPublicKey + * @property {Uint8Array|null} [companionIdentityKey] PairingRequest companionIdentityKey + * @property {Uint8Array|null} [advSecret] PairingRequest advSecret + */ + + /** + * Constructs a new PairingRequest. + * @memberof proto + * @classdesc Represents a PairingRequest. + * @implements IPairingRequest + * @constructor + * @param {proto.IPairingRequest=} [properties] Properties to set + */ + function PairingRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PairingRequest companionPublicKey. + * @member {Uint8Array|null|undefined} companionPublicKey + * @memberof proto.PairingRequest + * @instance + */ + PairingRequest.prototype.companionPublicKey = null; + + /** + * PairingRequest companionIdentityKey. + * @member {Uint8Array|null|undefined} companionIdentityKey + * @memberof proto.PairingRequest + * @instance + */ + PairingRequest.prototype.companionIdentityKey = null; + + /** + * PairingRequest advSecret. + * @member {Uint8Array|null|undefined} advSecret + * @memberof proto.PairingRequest + * @instance + */ + PairingRequest.prototype.advSecret = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PairingRequest.prototype, "_companionPublicKey", { + get: $util.oneOfGetter($oneOfFields = ["companionPublicKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PairingRequest.prototype, "_companionIdentityKey", { + get: $util.oneOfGetter($oneOfFields = ["companionIdentityKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PairingRequest.prototype, "_advSecret", { + get: $util.oneOfGetter($oneOfFields = ["advSecret"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new PairingRequest instance using the specified properties. + * @function create + * @memberof proto.PairingRequest + * @static + * @param {proto.IPairingRequest=} [properties] Properties to set + * @returns {proto.PairingRequest} PairingRequest instance + */ + PairingRequest.create = function create(properties) { + return new PairingRequest(properties); + }; + + /** + * Encodes the specified PairingRequest message. Does not implicitly {@link proto.PairingRequest.verify|verify} messages. + * @function encode + * @memberof proto.PairingRequest + * @static + * @param {proto.IPairingRequest} message PairingRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PairingRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.companionPublicKey != null && Object.hasOwnProperty.call(message, "companionPublicKey")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.companionPublicKey); + if (message.companionIdentityKey != null && Object.hasOwnProperty.call(message, "companionIdentityKey")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.companionIdentityKey); + if (message.advSecret != null && Object.hasOwnProperty.call(message, "advSecret")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.advSecret); + return writer; + }; + + /** + * Encodes the specified PairingRequest message, length delimited. Does not implicitly {@link proto.PairingRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.PairingRequest + * @static + * @param {proto.IPairingRequest} message PairingRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PairingRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PairingRequest message from the specified reader or buffer. + * @function decode + * @memberof proto.PairingRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.PairingRequest} PairingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PairingRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.PairingRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.companionPublicKey = reader.bytes(); + break; + } + case 2: { + message.companionIdentityKey = reader.bytes(); + break; + } + case 3: { + message.advSecret = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PairingRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.PairingRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.PairingRequest} PairingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PairingRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PairingRequest message. + * @function verify + * @memberof proto.PairingRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PairingRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.companionPublicKey != null && message.hasOwnProperty("companionPublicKey")) { + properties._companionPublicKey = 1; + if (!(message.companionPublicKey && typeof message.companionPublicKey.length === "number" || $util.isString(message.companionPublicKey))) + return "companionPublicKey: buffer expected"; + } + if (message.companionIdentityKey != null && message.hasOwnProperty("companionIdentityKey")) { + properties._companionIdentityKey = 1; + if (!(message.companionIdentityKey && typeof message.companionIdentityKey.length === "number" || $util.isString(message.companionIdentityKey))) + return "companionIdentityKey: buffer expected"; + } + if (message.advSecret != null && message.hasOwnProperty("advSecret")) { + properties._advSecret = 1; + if (!(message.advSecret && typeof message.advSecret.length === "number" || $util.isString(message.advSecret))) + return "advSecret: buffer expected"; + } + return null; + }; + + /** + * Creates a PairingRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.PairingRequest + * @static + * @param {Object.} object Plain object + * @returns {proto.PairingRequest} PairingRequest + */ + PairingRequest.fromObject = function fromObject(object) { + if (object instanceof $root.proto.PairingRequest) + return object; + var message = new $root.proto.PairingRequest(); + if (object.companionPublicKey != null) + if (typeof object.companionPublicKey === "string") + $util.base64.decode(object.companionPublicKey, message.companionPublicKey = $util.newBuffer($util.base64.length(object.companionPublicKey)), 0); + else if (object.companionPublicKey.length >= 0) + message.companionPublicKey = object.companionPublicKey; + if (object.companionIdentityKey != null) + if (typeof object.companionIdentityKey === "string") + $util.base64.decode(object.companionIdentityKey, message.companionIdentityKey = $util.newBuffer($util.base64.length(object.companionIdentityKey)), 0); + else if (object.companionIdentityKey.length >= 0) + message.companionIdentityKey = object.companionIdentityKey; + if (object.advSecret != null) + if (typeof object.advSecret === "string") + $util.base64.decode(object.advSecret, message.advSecret = $util.newBuffer($util.base64.length(object.advSecret)), 0); + else if (object.advSecret.length >= 0) + message.advSecret = object.advSecret; + return message; + }; + + /** + * Creates a plain object from a PairingRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.PairingRequest + * @static + * @param {proto.PairingRequest} message PairingRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PairingRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.companionPublicKey != null && message.hasOwnProperty("companionPublicKey")) { + object.companionPublicKey = options.bytes === String ? $util.base64.encode(message.companionPublicKey, 0, message.companionPublicKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.companionPublicKey) : message.companionPublicKey; + if (options.oneofs) + object._companionPublicKey = "companionPublicKey"; + } + if (message.companionIdentityKey != null && message.hasOwnProperty("companionIdentityKey")) { + object.companionIdentityKey = options.bytes === String ? $util.base64.encode(message.companionIdentityKey, 0, message.companionIdentityKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.companionIdentityKey) : message.companionIdentityKey; + if (options.oneofs) + object._companionIdentityKey = "companionIdentityKey"; + } + if (message.advSecret != null && message.hasOwnProperty("advSecret")) { + object.advSecret = options.bytes === String ? $util.base64.encode(message.advSecret, 0, message.advSecret.length) : options.bytes === Array ? Array.prototype.slice.call(message.advSecret) : message.advSecret; + if (options.oneofs) + object._advSecret = "advSecret"; + } + return object; + }; + + /** + * Converts this PairingRequest to JSON. + * @function toJSON + * @memberof proto.PairingRequest + * @instance + * @returns {Object.} JSON object + */ + PairingRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PairingRequest + * @function getTypeUrl + * @memberof proto.PairingRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PairingRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.PairingRequest"; + }; + + return PairingRequest; + })(); + proto.PastParticipant = (function() { /** @@ -67256,27 +109696,48 @@ $root.proto = (function() { /** * PastParticipant userJid. - * @member {string} userJid + * @member {string|null|undefined} userJid * @memberof proto.PastParticipant * @instance */ - PastParticipant.prototype.userJid = ""; + PastParticipant.prototype.userJid = null; /** * PastParticipant leaveReason. - * @member {proto.PastParticipant.LeaveReason} leaveReason + * @member {proto.PastParticipant.LeaveReason|null|undefined} leaveReason * @memberof proto.PastParticipant * @instance */ - PastParticipant.prototype.leaveReason = 0; + PastParticipant.prototype.leaveReason = null; /** * PastParticipant leaveTs. - * @member {number|Long} leaveTs + * @member {number|Long|null|undefined} leaveTs * @memberof proto.PastParticipant * @instance */ - PastParticipant.prototype.leaveTs = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + PastParticipant.prototype.leaveTs = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PastParticipant.prototype, "_userJid", { + get: $util.oneOfGetter($oneOfFields = ["userJid"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PastParticipant.prototype, "_leaveReason", { + get: $util.oneOfGetter($oneOfFields = ["leaveReason"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PastParticipant.prototype, "_leaveTs", { + get: $util.oneOfGetter($oneOfFields = ["leaveTs"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new PastParticipant instance using the specified properties. @@ -67342,15 +109803,18 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.userJid = reader.string(); - break; - case 2: - message.leaveReason = reader.int32(); - break; - case 3: - message.leaveTs = reader.uint64(); - break; + case 1: { + message.userJid = reader.string(); + break; + } + case 2: { + message.leaveReason = reader.int32(); + break; + } + case 3: { + message.leaveTs = reader.uint64(); + break; + } default: reader.skipType(tag & 7); break; @@ -67386,10 +109850,14 @@ $root.proto = (function() { PastParticipant.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.userJid != null && message.hasOwnProperty("userJid")) + var properties = {}; + if (message.userJid != null && message.hasOwnProperty("userJid")) { + properties._userJid = 1; if (!$util.isString(message.userJid)) return "userJid: string expected"; - if (message.leaveReason != null && message.hasOwnProperty("leaveReason")) + } + if (message.leaveReason != null && message.hasOwnProperty("leaveReason")) { + properties._leaveReason = 1; switch (message.leaveReason) { default: return "leaveReason: enum value expected"; @@ -67397,9 +109865,12 @@ $root.proto = (function() { case 1: break; } - if (message.leaveTs != null && message.hasOwnProperty("leaveTs")) + } + if (message.leaveTs != null && message.hasOwnProperty("leaveTs")) { + properties._leaveTs = 1; if (!$util.isInteger(message.leaveTs) && !(message.leaveTs && $util.isInteger(message.leaveTs.low) && $util.isInteger(message.leaveTs.high))) return "leaveTs: integer|Long expected"; + } return null; }; @@ -67418,6 +109889,12 @@ $root.proto = (function() { if (object.userJid != null) message.userJid = String(object.userJid); switch (object.leaveReason) { + default: + if (typeof object.leaveReason === "number") { + message.leaveReason = object.leaveReason; + break; + } + break; case "LEFT": case 0: message.leaveReason = 0; @@ -67452,24 +109929,24 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.userJid = ""; - object.leaveReason = options.enums === String ? "LEFT" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.leaveTs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.leaveTs = options.longs === String ? "0" : 0; - } - if (message.userJid != null && message.hasOwnProperty("userJid")) + 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 (options.oneofs) + object._userJid = "userJid"; + } + if (message.leaveReason != null && message.hasOwnProperty("leaveReason")) { + object.leaveReason = options.enums === String ? $root.proto.PastParticipant.LeaveReason[message.leaveReason] === undefined ? message.leaveReason : $root.proto.PastParticipant.LeaveReason[message.leaveReason] : message.leaveReason; + if (options.oneofs) + object._leaveReason = "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.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; + if (options.oneofs) + object._leaveTs = "leaveTs"; + } return object; }; @@ -67484,6 +109961,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for PastParticipant + * @function getTypeUrl + * @memberof proto.PastParticipant + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PastParticipant.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.PastParticipant"; + }; + /** * LeaveReason enum. * @name proto.PastParticipant.LeaveReason @@ -67529,11 +110021,11 @@ $root.proto = (function() { /** * PastParticipants groupJid. - * @member {string} groupJid + * @member {string|null|undefined} groupJid * @memberof proto.PastParticipants * @instance */ - PastParticipants.prototype.groupJid = ""; + PastParticipants.prototype.groupJid = null; /** * PastParticipants pastParticipants. @@ -67543,6 +110035,15 @@ $root.proto = (function() { */ PastParticipants.prototype.pastParticipants = $util.emptyArray; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PastParticipants.prototype, "_groupJid", { + get: $util.oneOfGetter($oneOfFields = ["groupJid"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new PastParticipants instance using the specified properties. * @function create @@ -67606,14 +110107,16 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.groupJid = reader.string(); - break; - case 2: - if (!(message.pastParticipants && message.pastParticipants.length)) - message.pastParticipants = []; - message.pastParticipants.push($root.proto.PastParticipant.decode(reader, reader.uint32())); - break; + case 1: { + message.groupJid = reader.string(); + break; + } + case 2: { + 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; @@ -67649,9 +110152,12 @@ $root.proto = (function() { PastParticipants.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.groupJid != null && message.hasOwnProperty("groupJid")) + var properties = {}; + if (message.groupJid != null && message.hasOwnProperty("groupJid")) { + properties._groupJid = 1; 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"; @@ -67706,10 +110212,11 @@ $root.proto = (function() { var object = {}; if (options.arrays || options.defaults) object.pastParticipants = []; - if (options.defaults) - object.groupJid = ""; - if (message.groupJid != null && message.hasOwnProperty("groupJid")) + if (message.groupJid != null && message.hasOwnProperty("groupJid")) { object.groupJid = message.groupJid; + if (options.oneofs) + object._groupJid = "groupJid"; + } if (message.pastParticipants && message.pastParticipants.length) { object.pastParticipants = []; for (var j = 0; j < message.pastParticipants.length; ++j) @@ -67729,6 +110236,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for PastParticipants + * @function getTypeUrl + * @memberof proto.PastParticipants + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PastParticipants.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.PastParticipants"; + }; + return PastParticipants; })(); @@ -67768,91 +110290,160 @@ $root.proto = (function() { /** * PatchDebugData currentLthash. - * @member {Uint8Array} currentLthash + * @member {Uint8Array|null|undefined} currentLthash * @memberof proto.PatchDebugData * @instance */ - PatchDebugData.prototype.currentLthash = $util.newBuffer([]); + PatchDebugData.prototype.currentLthash = null; /** * PatchDebugData newLthash. - * @member {Uint8Array} newLthash + * @member {Uint8Array|null|undefined} newLthash * @memberof proto.PatchDebugData * @instance */ - PatchDebugData.prototype.newLthash = $util.newBuffer([]); + PatchDebugData.prototype.newLthash = null; /** * PatchDebugData patchVersion. - * @member {Uint8Array} patchVersion + * @member {Uint8Array|null|undefined} patchVersion * @memberof proto.PatchDebugData * @instance */ - PatchDebugData.prototype.patchVersion = $util.newBuffer([]); + PatchDebugData.prototype.patchVersion = null; /** * PatchDebugData collectionName. - * @member {Uint8Array} collectionName + * @member {Uint8Array|null|undefined} collectionName * @memberof proto.PatchDebugData * @instance */ - PatchDebugData.prototype.collectionName = $util.newBuffer([]); + PatchDebugData.prototype.collectionName = null; /** * PatchDebugData firstFourBytesFromAHashOfSnapshotMacKey. - * @member {Uint8Array} firstFourBytesFromAHashOfSnapshotMacKey + * @member {Uint8Array|null|undefined} firstFourBytesFromAHashOfSnapshotMacKey * @memberof proto.PatchDebugData * @instance */ - PatchDebugData.prototype.firstFourBytesFromAHashOfSnapshotMacKey = $util.newBuffer([]); + PatchDebugData.prototype.firstFourBytesFromAHashOfSnapshotMacKey = null; /** * PatchDebugData newLthashSubtract. - * @member {Uint8Array} newLthashSubtract + * @member {Uint8Array|null|undefined} newLthashSubtract * @memberof proto.PatchDebugData * @instance */ - PatchDebugData.prototype.newLthashSubtract = $util.newBuffer([]); + PatchDebugData.prototype.newLthashSubtract = null; /** * PatchDebugData numberAdd. - * @member {number} numberAdd + * @member {number|null|undefined} numberAdd * @memberof proto.PatchDebugData * @instance */ - PatchDebugData.prototype.numberAdd = 0; + PatchDebugData.prototype.numberAdd = null; /** * PatchDebugData numberRemove. - * @member {number} numberRemove + * @member {number|null|undefined} numberRemove * @memberof proto.PatchDebugData * @instance */ - PatchDebugData.prototype.numberRemove = 0; + PatchDebugData.prototype.numberRemove = null; /** * PatchDebugData numberOverride. - * @member {number} numberOverride + * @member {number|null|undefined} numberOverride * @memberof proto.PatchDebugData * @instance */ - PatchDebugData.prototype.numberOverride = 0; + PatchDebugData.prototype.numberOverride = null; /** * PatchDebugData senderPlatform. - * @member {proto.PatchDebugData.Platform} senderPlatform + * @member {proto.PatchDebugData.Platform|null|undefined} senderPlatform * @memberof proto.PatchDebugData * @instance */ - PatchDebugData.prototype.senderPlatform = 0; + PatchDebugData.prototype.senderPlatform = null; /** * PatchDebugData isSenderPrimary. - * @member {boolean} isSenderPrimary + * @member {boolean|null|undefined} isSenderPrimary * @memberof proto.PatchDebugData * @instance */ - PatchDebugData.prototype.isSenderPrimary = false; + PatchDebugData.prototype.isSenderPrimary = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PatchDebugData.prototype, "_currentLthash", { + get: $util.oneOfGetter($oneOfFields = ["currentLthash"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PatchDebugData.prototype, "_newLthash", { + get: $util.oneOfGetter($oneOfFields = ["newLthash"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PatchDebugData.prototype, "_patchVersion", { + get: $util.oneOfGetter($oneOfFields = ["patchVersion"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PatchDebugData.prototype, "_collectionName", { + get: $util.oneOfGetter($oneOfFields = ["collectionName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PatchDebugData.prototype, "_firstFourBytesFromAHashOfSnapshotMacKey", { + get: $util.oneOfGetter($oneOfFields = ["firstFourBytesFromAHashOfSnapshotMacKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PatchDebugData.prototype, "_newLthashSubtract", { + get: $util.oneOfGetter($oneOfFields = ["newLthashSubtract"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PatchDebugData.prototype, "_numberAdd", { + get: $util.oneOfGetter($oneOfFields = ["numberAdd"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PatchDebugData.prototype, "_numberRemove", { + get: $util.oneOfGetter($oneOfFields = ["numberRemove"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PatchDebugData.prototype, "_numberOverride", { + get: $util.oneOfGetter($oneOfFields = ["numberOverride"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PatchDebugData.prototype, "_senderPlatform", { + get: $util.oneOfGetter($oneOfFields = ["senderPlatform"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PatchDebugData.prototype, "_isSenderPrimary", { + get: $util.oneOfGetter($oneOfFields = ["isSenderPrimary"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new PatchDebugData instance using the specified properties. @@ -67934,39 +110525,50 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.currentLthash = reader.bytes(); - break; - case 2: - message.newLthash = reader.bytes(); - break; - case 3: - message.patchVersion = reader.bytes(); - break; - case 4: - message.collectionName = reader.bytes(); - break; - case 5: - message.firstFourBytesFromAHashOfSnapshotMacKey = reader.bytes(); - break; - case 6: - message.newLthashSubtract = reader.bytes(); - break; - case 7: - message.numberAdd = reader.int32(); - break; - case 8: - message.numberRemove = reader.int32(); - break; - case 9: - message.numberOverride = reader.int32(); - break; - case 10: - message.senderPlatform = reader.int32(); - break; - case 11: - message.isSenderPrimary = reader.bool(); - break; + case 1: { + message.currentLthash = reader.bytes(); + break; + } + case 2: { + message.newLthash = reader.bytes(); + break; + } + case 3: { + message.patchVersion = reader.bytes(); + break; + } + case 4: { + message.collectionName = reader.bytes(); + break; + } + case 5: { + message.firstFourBytesFromAHashOfSnapshotMacKey = reader.bytes(); + break; + } + case 6: { + message.newLthashSubtract = reader.bytes(); + break; + } + case 7: { + message.numberAdd = reader.int32(); + break; + } + case 8: { + message.numberRemove = reader.int32(); + break; + } + case 9: { + message.numberOverride = reader.int32(); + break; + } + case 10: { + message.senderPlatform = reader.int32(); + break; + } + case 11: { + message.isSenderPrimary = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -68002,34 +110604,54 @@ $root.proto = (function() { PatchDebugData.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.currentLthash != null && message.hasOwnProperty("currentLthash")) + var properties = {}; + if (message.currentLthash != null && message.hasOwnProperty("currentLthash")) { + properties._currentLthash = 1; if (!(message.currentLthash && typeof message.currentLthash.length === "number" || $util.isString(message.currentLthash))) return "currentLthash: buffer expected"; - if (message.newLthash != null && message.hasOwnProperty("newLthash")) + } + if (message.newLthash != null && message.hasOwnProperty("newLthash")) { + properties._newLthash = 1; if (!(message.newLthash && typeof message.newLthash.length === "number" || $util.isString(message.newLthash))) return "newLthash: buffer expected"; - if (message.patchVersion != null && message.hasOwnProperty("patchVersion")) + } + if (message.patchVersion != null && message.hasOwnProperty("patchVersion")) { + properties._patchVersion = 1; if (!(message.patchVersion && typeof message.patchVersion.length === "number" || $util.isString(message.patchVersion))) return "patchVersion: buffer expected"; - if (message.collectionName != null && message.hasOwnProperty("collectionName")) + } + if (message.collectionName != null && message.hasOwnProperty("collectionName")) { + properties._collectionName = 1; if (!(message.collectionName && typeof message.collectionName.length === "number" || $util.isString(message.collectionName))) return "collectionName: buffer expected"; - if (message.firstFourBytesFromAHashOfSnapshotMacKey != null && message.hasOwnProperty("firstFourBytesFromAHashOfSnapshotMacKey")) + } + if (message.firstFourBytesFromAHashOfSnapshotMacKey != null && message.hasOwnProperty("firstFourBytesFromAHashOfSnapshotMacKey")) { + properties._firstFourBytesFromAHashOfSnapshotMacKey = 1; if (!(message.firstFourBytesFromAHashOfSnapshotMacKey && typeof message.firstFourBytesFromAHashOfSnapshotMacKey.length === "number" || $util.isString(message.firstFourBytesFromAHashOfSnapshotMacKey))) return "firstFourBytesFromAHashOfSnapshotMacKey: buffer expected"; - if (message.newLthashSubtract != null && message.hasOwnProperty("newLthashSubtract")) + } + if (message.newLthashSubtract != null && message.hasOwnProperty("newLthashSubtract")) { + properties._newLthashSubtract = 1; if (!(message.newLthashSubtract && typeof message.newLthashSubtract.length === "number" || $util.isString(message.newLthashSubtract))) return "newLthashSubtract: buffer expected"; - if (message.numberAdd != null && message.hasOwnProperty("numberAdd")) + } + if (message.numberAdd != null && message.hasOwnProperty("numberAdd")) { + properties._numberAdd = 1; if (!$util.isInteger(message.numberAdd)) return "numberAdd: integer expected"; - if (message.numberRemove != null && message.hasOwnProperty("numberRemove")) + } + if (message.numberRemove != null && message.hasOwnProperty("numberRemove")) { + properties._numberRemove = 1; if (!$util.isInteger(message.numberRemove)) return "numberRemove: integer expected"; - if (message.numberOverride != null && message.hasOwnProperty("numberOverride")) + } + if (message.numberOverride != null && message.hasOwnProperty("numberOverride")) { + properties._numberOverride = 1; if (!$util.isInteger(message.numberOverride)) return "numberOverride: integer expected"; - if (message.senderPlatform != null && message.hasOwnProperty("senderPlatform")) + } + if (message.senderPlatform != null && message.hasOwnProperty("senderPlatform")) { + properties._senderPlatform = 1; switch (message.senderPlatform) { default: return "senderPlatform: enum value expected"; @@ -68040,11 +110662,16 @@ $root.proto = (function() { case 4: case 5: case 6: + case 7: + case 8: break; } - if (message.isSenderPrimary != null && message.hasOwnProperty("isSenderPrimary")) + } + if (message.isSenderPrimary != null && message.hasOwnProperty("isSenderPrimary")) { + properties._isSenderPrimary = 1; if (typeof message.isSenderPrimary !== "boolean") return "isSenderPrimary: boolean expected"; + } return null; }; @@ -68063,32 +110690,32 @@ $root.proto = (function() { if (object.currentLthash != null) if (typeof object.currentLthash === "string") $util.base64.decode(object.currentLthash, message.currentLthash = $util.newBuffer($util.base64.length(object.currentLthash)), 0); - else if (object.currentLthash.length) + else if (object.currentLthash.length >= 0) message.currentLthash = object.currentLthash; if (object.newLthash != null) if (typeof object.newLthash === "string") $util.base64.decode(object.newLthash, message.newLthash = $util.newBuffer($util.base64.length(object.newLthash)), 0); - else if (object.newLthash.length) + else if (object.newLthash.length >= 0) message.newLthash = object.newLthash; if (object.patchVersion != null) if (typeof object.patchVersion === "string") $util.base64.decode(object.patchVersion, message.patchVersion = $util.newBuffer($util.base64.length(object.patchVersion)), 0); - else if (object.patchVersion.length) + else if (object.patchVersion.length >= 0) message.patchVersion = object.patchVersion; if (object.collectionName != null) if (typeof object.collectionName === "string") $util.base64.decode(object.collectionName, message.collectionName = $util.newBuffer($util.base64.length(object.collectionName)), 0); - else if (object.collectionName.length) + else if (object.collectionName.length >= 0) message.collectionName = object.collectionName; if (object.firstFourBytesFromAHashOfSnapshotMacKey != null) if (typeof object.firstFourBytesFromAHashOfSnapshotMacKey === "string") $util.base64.decode(object.firstFourBytesFromAHashOfSnapshotMacKey, message.firstFourBytesFromAHashOfSnapshotMacKey = $util.newBuffer($util.base64.length(object.firstFourBytesFromAHashOfSnapshotMacKey)), 0); - else if (object.firstFourBytesFromAHashOfSnapshotMacKey.length) + else if (object.firstFourBytesFromAHashOfSnapshotMacKey.length >= 0) message.firstFourBytesFromAHashOfSnapshotMacKey = object.firstFourBytesFromAHashOfSnapshotMacKey; if (object.newLthashSubtract != null) if (typeof object.newLthashSubtract === "string") $util.base64.decode(object.newLthashSubtract, message.newLthashSubtract = $util.newBuffer($util.base64.length(object.newLthashSubtract)), 0); - else if (object.newLthashSubtract.length) + else if (object.newLthashSubtract.length >= 0) message.newLthashSubtract = object.newLthashSubtract; if (object.numberAdd != null) message.numberAdd = object.numberAdd | 0; @@ -68097,6 +110724,12 @@ $root.proto = (function() { if (object.numberOverride != null) message.numberOverride = object.numberOverride | 0; switch (object.senderPlatform) { + default: + if (typeof object.senderPlatform === "number") { + message.senderPlatform = object.senderPlatform; + break; + } + break; case "ANDROID": case 0: message.senderPlatform = 0; @@ -68125,6 +110758,14 @@ $root.proto = (function() { case 6: message.senderPlatform = 6; break; + case "IPAD": + case 7: + message.senderPlatform = 7; + break; + case "WEAROS": + case 8: + message.senderPlatform = 8; + break; } if (object.isSenderPrimary != null) message.isSenderPrimary = Boolean(object.isSenderPrimary); @@ -68144,77 +110785,61 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - if (options.bytes === String) - object.currentLthash = ""; - else { - object.currentLthash = []; - if (options.bytes !== Array) - object.currentLthash = $util.newBuffer(object.currentLthash); - } - if (options.bytes === String) - object.newLthash = ""; - else { - object.newLthash = []; - if (options.bytes !== Array) - object.newLthash = $util.newBuffer(object.newLthash); - } - if (options.bytes === String) - object.patchVersion = ""; - else { - object.patchVersion = []; - if (options.bytes !== Array) - object.patchVersion = $util.newBuffer(object.patchVersion); - } - if (options.bytes === String) - object.collectionName = ""; - else { - object.collectionName = []; - if (options.bytes !== Array) - object.collectionName = $util.newBuffer(object.collectionName); - } - if (options.bytes === String) - object.firstFourBytesFromAHashOfSnapshotMacKey = ""; - else { - object.firstFourBytesFromAHashOfSnapshotMacKey = []; - if (options.bytes !== Array) - object.firstFourBytesFromAHashOfSnapshotMacKey = $util.newBuffer(object.firstFourBytesFromAHashOfSnapshotMacKey); - } - if (options.bytes === String) - object.newLthashSubtract = ""; - else { - object.newLthashSubtract = []; - if (options.bytes !== Array) - object.newLthashSubtract = $util.newBuffer(object.newLthashSubtract); - } - object.numberAdd = 0; - object.numberRemove = 0; - object.numberOverride = 0; - object.senderPlatform = options.enums === String ? "ANDROID" : 0; - object.isSenderPrimary = false; - } - if (message.currentLthash != null && message.hasOwnProperty("currentLthash")) + if (message.currentLthash != null && message.hasOwnProperty("currentLthash")) { object.currentLthash = options.bytes === String ? $util.base64.encode(message.currentLthash, 0, message.currentLthash.length) : options.bytes === Array ? Array.prototype.slice.call(message.currentLthash) : message.currentLthash; - if (message.newLthash != null && message.hasOwnProperty("newLthash")) + if (options.oneofs) + object._currentLthash = "currentLthash"; + } + if (message.newLthash != null && message.hasOwnProperty("newLthash")) { object.newLthash = options.bytes === String ? $util.base64.encode(message.newLthash, 0, message.newLthash.length) : options.bytes === Array ? Array.prototype.slice.call(message.newLthash) : message.newLthash; - if (message.patchVersion != null && message.hasOwnProperty("patchVersion")) + if (options.oneofs) + object._newLthash = "newLthash"; + } + if (message.patchVersion != null && message.hasOwnProperty("patchVersion")) { object.patchVersion = options.bytes === String ? $util.base64.encode(message.patchVersion, 0, message.patchVersion.length) : options.bytes === Array ? Array.prototype.slice.call(message.patchVersion) : message.patchVersion; - if (message.collectionName != null && message.hasOwnProperty("collectionName")) + if (options.oneofs) + object._patchVersion = "patchVersion"; + } + if (message.collectionName != null && message.hasOwnProperty("collectionName")) { object.collectionName = options.bytes === String ? $util.base64.encode(message.collectionName, 0, message.collectionName.length) : options.bytes === Array ? Array.prototype.slice.call(message.collectionName) : message.collectionName; - if (message.firstFourBytesFromAHashOfSnapshotMacKey != null && message.hasOwnProperty("firstFourBytesFromAHashOfSnapshotMacKey")) + if (options.oneofs) + object._collectionName = "collectionName"; + } + if (message.firstFourBytesFromAHashOfSnapshotMacKey != null && message.hasOwnProperty("firstFourBytesFromAHashOfSnapshotMacKey")) { object.firstFourBytesFromAHashOfSnapshotMacKey = options.bytes === String ? $util.base64.encode(message.firstFourBytesFromAHashOfSnapshotMacKey, 0, message.firstFourBytesFromAHashOfSnapshotMacKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.firstFourBytesFromAHashOfSnapshotMacKey) : message.firstFourBytesFromAHashOfSnapshotMacKey; - if (message.newLthashSubtract != null && message.hasOwnProperty("newLthashSubtract")) + if (options.oneofs) + object._firstFourBytesFromAHashOfSnapshotMacKey = "firstFourBytesFromAHashOfSnapshotMacKey"; + } + if (message.newLthashSubtract != null && message.hasOwnProperty("newLthashSubtract")) { object.newLthashSubtract = options.bytes === String ? $util.base64.encode(message.newLthashSubtract, 0, message.newLthashSubtract.length) : options.bytes === Array ? Array.prototype.slice.call(message.newLthashSubtract) : message.newLthashSubtract; - if (message.numberAdd != null && message.hasOwnProperty("numberAdd")) + if (options.oneofs) + object._newLthashSubtract = "newLthashSubtract"; + } + if (message.numberAdd != null && message.hasOwnProperty("numberAdd")) { object.numberAdd = message.numberAdd; - if (message.numberRemove != null && message.hasOwnProperty("numberRemove")) + if (options.oneofs) + object._numberAdd = "numberAdd"; + } + if (message.numberRemove != null && message.hasOwnProperty("numberRemove")) { object.numberRemove = message.numberRemove; - if (message.numberOverride != null && message.hasOwnProperty("numberOverride")) + if (options.oneofs) + object._numberRemove = "numberRemove"; + } + if (message.numberOverride != null && message.hasOwnProperty("numberOverride")) { object.numberOverride = message.numberOverride; - if (message.senderPlatform != null && message.hasOwnProperty("senderPlatform")) - object.senderPlatform = options.enums === String ? $root.proto.PatchDebugData.Platform[message.senderPlatform] : message.senderPlatform; - if (message.isSenderPrimary != null && message.hasOwnProperty("isSenderPrimary")) + if (options.oneofs) + object._numberOverride = "numberOverride"; + } + if (message.senderPlatform != null && message.hasOwnProperty("senderPlatform")) { + object.senderPlatform = options.enums === String ? $root.proto.PatchDebugData.Platform[message.senderPlatform] === undefined ? message.senderPlatform : $root.proto.PatchDebugData.Platform[message.senderPlatform] : message.senderPlatform; + if (options.oneofs) + object._senderPlatform = "senderPlatform"; + } + if (message.isSenderPrimary != null && message.hasOwnProperty("isSenderPrimary")) { object.isSenderPrimary = message.isSenderPrimary; + if (options.oneofs) + object._isSenderPrimary = "isSenderPrimary"; + } return object; }; @@ -68229,6 +110854,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for PatchDebugData + * @function getTypeUrl + * @memberof proto.PatchDebugData + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PatchDebugData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.PatchDebugData"; + }; + /** * Platform enum. * @name proto.PatchDebugData.Platform @@ -68240,6 +110880,8 @@ $root.proto = (function() { * @property {number} WEB=4 WEB value * @property {number} UWP=5 UWP value * @property {number} DARWIN=6 DARWIN value + * @property {number} IPAD=7 IPAD value + * @property {number} WEAROS=8 WEAROS value */ PatchDebugData.Platform = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -68250,6 +110892,8 @@ $root.proto = (function() { values[valuesById[4] = "WEB"] = 4; values[valuesById[5] = "UWP"] = 5; values[valuesById[6] = "DARWIN"] = 6; + values[valuesById[7] = "IPAD"] = 7; + values[valuesById[8] = "WEAROS"] = 8; return values; })(); @@ -68291,67 +110935,67 @@ $root.proto = (function() { /** * PaymentBackground id. - * @member {string} id + * @member {string|null|undefined} id * @memberof proto.PaymentBackground * @instance */ - PaymentBackground.prototype.id = ""; + PaymentBackground.prototype.id = null; /** * PaymentBackground fileLength. - * @member {number|Long} fileLength + * @member {number|Long|null|undefined} fileLength * @memberof proto.PaymentBackground * @instance */ - PaymentBackground.prototype.fileLength = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + PaymentBackground.prototype.fileLength = null; /** * PaymentBackground width. - * @member {number} width + * @member {number|null|undefined} width * @memberof proto.PaymentBackground * @instance */ - PaymentBackground.prototype.width = 0; + PaymentBackground.prototype.width = null; /** * PaymentBackground height. - * @member {number} height + * @member {number|null|undefined} height * @memberof proto.PaymentBackground * @instance */ - PaymentBackground.prototype.height = 0; + PaymentBackground.prototype.height = null; /** * PaymentBackground mimetype. - * @member {string} mimetype + * @member {string|null|undefined} mimetype * @memberof proto.PaymentBackground * @instance */ - PaymentBackground.prototype.mimetype = ""; + PaymentBackground.prototype.mimetype = null; /** * PaymentBackground placeholderArgb. - * @member {number} placeholderArgb + * @member {number|null|undefined} placeholderArgb * @memberof proto.PaymentBackground * @instance */ - PaymentBackground.prototype.placeholderArgb = 0; + PaymentBackground.prototype.placeholderArgb = null; /** * PaymentBackground textArgb. - * @member {number} textArgb + * @member {number|null|undefined} textArgb * @memberof proto.PaymentBackground * @instance */ - PaymentBackground.prototype.textArgb = 0; + PaymentBackground.prototype.textArgb = null; /** * PaymentBackground subtextArgb. - * @member {number} subtextArgb + * @member {number|null|undefined} subtextArgb * @memberof proto.PaymentBackground * @instance */ - PaymentBackground.prototype.subtextArgb = 0; + PaymentBackground.prototype.subtextArgb = null; /** * PaymentBackground mediaData. @@ -68363,11 +111007,74 @@ $root.proto = (function() { /** * PaymentBackground type. - * @member {proto.PaymentBackground.Type} type + * @member {proto.PaymentBackground.Type|null|undefined} type * @memberof proto.PaymentBackground * @instance */ - PaymentBackground.prototype.type = 0; + PaymentBackground.prototype.type = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PaymentBackground.prototype, "_id", { + get: $util.oneOfGetter($oneOfFields = ["id"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PaymentBackground.prototype, "_fileLength", { + get: $util.oneOfGetter($oneOfFields = ["fileLength"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PaymentBackground.prototype, "_width", { + get: $util.oneOfGetter($oneOfFields = ["width"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PaymentBackground.prototype, "_height", { + get: $util.oneOfGetter($oneOfFields = ["height"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PaymentBackground.prototype, "_mimetype", { + get: $util.oneOfGetter($oneOfFields = ["mimetype"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PaymentBackground.prototype, "_placeholderArgb", { + get: $util.oneOfGetter($oneOfFields = ["placeholderArgb"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PaymentBackground.prototype, "_textArgb", { + get: $util.oneOfGetter($oneOfFields = ["textArgb"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PaymentBackground.prototype, "_subtextArgb", { + get: $util.oneOfGetter($oneOfFields = ["subtextArgb"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PaymentBackground.prototype, "_mediaData", { + get: $util.oneOfGetter($oneOfFields = ["mediaData"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PaymentBackground.prototype, "_type", { + get: $util.oneOfGetter($oneOfFields = ["type"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new PaymentBackground instance using the specified properties. @@ -68447,36 +111154,46 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.id = reader.string(); - break; - case 2: - message.fileLength = reader.uint64(); - break; - case 3: - message.width = reader.uint32(); - break; - case 4: - message.height = reader.uint32(); - break; - case 5: - message.mimetype = reader.string(); - break; - case 6: - message.placeholderArgb = reader.fixed32(); - break; - case 7: - message.textArgb = reader.fixed32(); - break; - case 8: - message.subtextArgb = reader.fixed32(); - break; - case 9: - message.mediaData = $root.proto.PaymentBackground.MediaData.decode(reader, reader.uint32()); - break; - case 10: - message.type = reader.int32(); - break; + case 1: { + message.id = reader.string(); + break; + } + case 2: { + message.fileLength = reader.uint64(); + break; + } + case 3: { + message.width = reader.uint32(); + break; + } + case 4: { + message.height = reader.uint32(); + break; + } + case 5: { + message.mimetype = reader.string(); + break; + } + case 6: { + message.placeholderArgb = reader.fixed32(); + break; + } + case 7: { + message.textArgb = reader.fixed32(); + break; + } + case 8: { + message.subtextArgb = reader.fixed32(); + break; + } + case 9: { + message.mediaData = $root.proto.PaymentBackground.MediaData.decode(reader, reader.uint32()); + break; + } + case 10: { + message.type = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -68512,36 +111229,57 @@ $root.proto = (function() { PaymentBackground.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.id != null && message.hasOwnProperty("id")) + var properties = {}; + if (message.id != null && message.hasOwnProperty("id")) { + properties._id = 1; if (!$util.isString(message.id)) return "id: string expected"; - if (message.fileLength != null && message.hasOwnProperty("fileLength")) + } + if (message.fileLength != null && message.hasOwnProperty("fileLength")) { + properties._fileLength = 1; if (!$util.isInteger(message.fileLength) && !(message.fileLength && $util.isInteger(message.fileLength.low) && $util.isInteger(message.fileLength.high))) return "fileLength: integer|Long expected"; - if (message.width != null && message.hasOwnProperty("width")) + } + if (message.width != null && message.hasOwnProperty("width")) { + properties._width = 1; if (!$util.isInteger(message.width)) return "width: integer expected"; - if (message.height != null && message.hasOwnProperty("height")) + } + if (message.height != null && message.hasOwnProperty("height")) { + properties._height = 1; if (!$util.isInteger(message.height)) return "height: integer expected"; - if (message.mimetype != null && message.hasOwnProperty("mimetype")) + } + if (message.mimetype != null && message.hasOwnProperty("mimetype")) { + properties._mimetype = 1; if (!$util.isString(message.mimetype)) return "mimetype: string expected"; - if (message.placeholderArgb != null && message.hasOwnProperty("placeholderArgb")) + } + if (message.placeholderArgb != null && message.hasOwnProperty("placeholderArgb")) { + properties._placeholderArgb = 1; if (!$util.isInteger(message.placeholderArgb)) return "placeholderArgb: integer expected"; - if (message.textArgb != null && message.hasOwnProperty("textArgb")) + } + if (message.textArgb != null && message.hasOwnProperty("textArgb")) { + properties._textArgb = 1; if (!$util.isInteger(message.textArgb)) return "textArgb: integer expected"; - if (message.subtextArgb != null && message.hasOwnProperty("subtextArgb")) + } + if (message.subtextArgb != null && message.hasOwnProperty("subtextArgb")) { + properties._subtextArgb = 1; if (!$util.isInteger(message.subtextArgb)) return "subtextArgb: integer expected"; - if (message.mediaData != null && message.hasOwnProperty("mediaData")) { - var error = $root.proto.PaymentBackground.MediaData.verify(message.mediaData); - if (error) - return "mediaData." + error; } - if (message.type != null && message.hasOwnProperty("type")) + if (message.mediaData != null && message.hasOwnProperty("mediaData")) { + properties._mediaData = 1; + { + var error = $root.proto.PaymentBackground.MediaData.verify(message.mediaData); + if (error) + return "mediaData." + error; + } + } + if (message.type != null && message.hasOwnProperty("type")) { + properties._type = 1; switch (message.type) { default: return "type: enum value expected"; @@ -68549,6 +111287,7 @@ $root.proto = (function() { case 1: break; } + } return null; }; @@ -68593,6 +111332,12 @@ $root.proto = (function() { message.mediaData = $root.proto.PaymentBackground.MediaData.fromObject(object.mediaData); } switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; case "UNKNOWN": case 0: message.type = 0; @@ -68618,45 +111363,59 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.id = ""; - 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.width = 0; - object.height = 0; - object.mimetype = ""; - object.placeholderArgb = 0; - object.textArgb = 0; - object.subtextArgb = 0; - object.mediaData = null; - object.type = options.enums === String ? "UNKNOWN" : 0; - } - if (message.id != null && message.hasOwnProperty("id")) + if (message.id != null && message.hasOwnProperty("id")) { object.id = message.id; - if (message.fileLength != null && message.hasOwnProperty("fileLength")) + if (options.oneofs) + object._id = "id"; + } + 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.width != null && message.hasOwnProperty("width")) + if (options.oneofs) + object._fileLength = "fileLength"; + } + if (message.width != null && message.hasOwnProperty("width")) { object.width = message.width; - if (message.height != null && message.hasOwnProperty("height")) + if (options.oneofs) + object._width = "width"; + } + if (message.height != null && message.hasOwnProperty("height")) { object.height = message.height; - if (message.mimetype != null && message.hasOwnProperty("mimetype")) + if (options.oneofs) + object._height = "height"; + } + if (message.mimetype != null && message.hasOwnProperty("mimetype")) { object.mimetype = message.mimetype; - if (message.placeholderArgb != null && message.hasOwnProperty("placeholderArgb")) + if (options.oneofs) + object._mimetype = "mimetype"; + } + if (message.placeholderArgb != null && message.hasOwnProperty("placeholderArgb")) { object.placeholderArgb = message.placeholderArgb; - if (message.textArgb != null && message.hasOwnProperty("textArgb")) + if (options.oneofs) + object._placeholderArgb = "placeholderArgb"; + } + if (message.textArgb != null && message.hasOwnProperty("textArgb")) { object.textArgb = message.textArgb; - if (message.subtextArgb != null && message.hasOwnProperty("subtextArgb")) + if (options.oneofs) + object._textArgb = "textArgb"; + } + if (message.subtextArgb != null && message.hasOwnProperty("subtextArgb")) { object.subtextArgb = message.subtextArgb; - if (message.mediaData != null && message.hasOwnProperty("mediaData")) + if (options.oneofs) + object._subtextArgb = "subtextArgb"; + } + if (message.mediaData != null && message.hasOwnProperty("mediaData")) { 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.Type[message.type] : message.type; + if (options.oneofs) + object._mediaData = "mediaData"; + } + if (message.type != null && message.hasOwnProperty("type")) { + object.type = options.enums === String ? $root.proto.PaymentBackground.Type[message.type] === undefined ? message.type : $root.proto.PaymentBackground.Type[message.type] : message.type; + if (options.oneofs) + object._type = "type"; + } return object; }; @@ -68671,6 +111430,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for PaymentBackground + * @function getTypeUrl + * @memberof proto.PaymentBackground + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PaymentBackground.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.PaymentBackground"; + }; + PaymentBackground.MediaData = (function() { /** @@ -68701,43 +111475,76 @@ $root.proto = (function() { /** * MediaData mediaKey. - * @member {Uint8Array} mediaKey + * @member {Uint8Array|null|undefined} mediaKey * @memberof proto.PaymentBackground.MediaData * @instance */ - MediaData.prototype.mediaKey = $util.newBuffer([]); + MediaData.prototype.mediaKey = null; /** * MediaData mediaKeyTimestamp. - * @member {number|Long} mediaKeyTimestamp + * @member {number|Long|null|undefined} mediaKeyTimestamp * @memberof proto.PaymentBackground.MediaData * @instance */ - MediaData.prototype.mediaKeyTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + MediaData.prototype.mediaKeyTimestamp = null; /** * MediaData fileSha256. - * @member {Uint8Array} fileSha256 + * @member {Uint8Array|null|undefined} fileSha256 * @memberof proto.PaymentBackground.MediaData * @instance */ - MediaData.prototype.fileSha256 = $util.newBuffer([]); + MediaData.prototype.fileSha256 = null; /** * MediaData fileEncSha256. - * @member {Uint8Array} fileEncSha256 + * @member {Uint8Array|null|undefined} fileEncSha256 * @memberof proto.PaymentBackground.MediaData * @instance */ - MediaData.prototype.fileEncSha256 = $util.newBuffer([]); + MediaData.prototype.fileEncSha256 = null; /** * MediaData directPath. - * @member {string} directPath + * @member {string|null|undefined} directPath * @memberof proto.PaymentBackground.MediaData * @instance */ - MediaData.prototype.directPath = ""; + MediaData.prototype.directPath = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MediaData.prototype, "_mediaKey", { + get: $util.oneOfGetter($oneOfFields = ["mediaKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MediaData.prototype, "_mediaKeyTimestamp", { + get: $util.oneOfGetter($oneOfFields = ["mediaKeyTimestamp"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MediaData.prototype, "_fileSha256", { + get: $util.oneOfGetter($oneOfFields = ["fileSha256"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MediaData.prototype, "_fileEncSha256", { + get: $util.oneOfGetter($oneOfFields = ["fileEncSha256"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MediaData.prototype, "_directPath", { + get: $util.oneOfGetter($oneOfFields = ["directPath"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new MediaData instance using the specified properties. @@ -68807,21 +111614,26 @@ $root.proto = (function() { 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; + 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; @@ -68857,21 +111669,32 @@ $root.proto = (function() { MediaData.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) + var properties = {}; + if (message.mediaKey != null && message.hasOwnProperty("mediaKey")) { + properties._mediaKey = 1; if (!(message.mediaKey && typeof message.mediaKey.length === "number" || $util.isString(message.mediaKey))) return "mediaKey: buffer expected"; - if (message.mediaKeyTimestamp != null && message.hasOwnProperty("mediaKeyTimestamp")) + } + if (message.mediaKeyTimestamp != null && message.hasOwnProperty("mediaKeyTimestamp")) { + properties._mediaKeyTimestamp = 1; 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 != null && message.hasOwnProperty("fileSha256")) { + properties._fileSha256 = 1; 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 != null && message.hasOwnProperty("fileEncSha256")) { + properties._fileEncSha256 = 1; if (!(message.fileEncSha256 && typeof message.fileEncSha256.length === "number" || $util.isString(message.fileEncSha256))) return "fileEncSha256: buffer expected"; - if (message.directPath != null && message.hasOwnProperty("directPath")) + } + if (message.directPath != null && message.hasOwnProperty("directPath")) { + properties._directPath = 1; if (!$util.isString(message.directPath)) return "directPath: string expected"; + } return null; }; @@ -68890,7 +111713,7 @@ $root.proto = (function() { 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) + else if (object.mediaKey.length >= 0) message.mediaKey = object.mediaKey; if (object.mediaKeyTimestamp != null) if ($util.Long) @@ -68904,12 +111727,12 @@ $root.proto = (function() { 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) + else if (object.fileSha256.length >= 0) 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) + else if (object.fileEncSha256.length >= 0) message.fileEncSha256 = object.fileEncSha256; if (object.directPath != null) message.directPath = String(object.directPath); @@ -68929,48 +111752,34 @@ $root.proto = (function() { 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")) + 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 (options.oneofs) + object._mediaKey = "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")) + if (options.oneofs) + object._mediaKeyTimestamp = "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")) + if (options.oneofs) + object._fileSha256 = "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")) + if (options.oneofs) + object._fileEncSha256 = "fileEncSha256"; + } + if (message.directPath != null && message.hasOwnProperty("directPath")) { object.directPath = message.directPath; + if (options.oneofs) + object._directPath = "directPath"; + } return object; }; @@ -68985,6 +111794,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for MediaData + * @function getTypeUrl + * @memberof proto.PaymentBackground.MediaData + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MediaData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.PaymentBackground.MediaData"; + }; + return MediaData; })(); @@ -69043,43 +111867,43 @@ $root.proto = (function() { /** * PaymentInfo currencyDeprecated. - * @member {proto.PaymentInfo.Currency} currencyDeprecated + * @member {proto.PaymentInfo.Currency|null|undefined} currencyDeprecated * @memberof proto.PaymentInfo * @instance */ - PaymentInfo.prototype.currencyDeprecated = 0; + PaymentInfo.prototype.currencyDeprecated = null; /** * PaymentInfo amount1000. - * @member {number|Long} amount1000 + * @member {number|Long|null|undefined} amount1000 * @memberof proto.PaymentInfo * @instance */ - PaymentInfo.prototype.amount1000 = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + PaymentInfo.prototype.amount1000 = null; /** * PaymentInfo receiverJid. - * @member {string} receiverJid + * @member {string|null|undefined} receiverJid * @memberof proto.PaymentInfo * @instance */ - PaymentInfo.prototype.receiverJid = ""; + PaymentInfo.prototype.receiverJid = null; /** * PaymentInfo status. - * @member {proto.PaymentInfo.Status} status + * @member {proto.PaymentInfo.Status|null|undefined} status * @memberof proto.PaymentInfo * @instance */ - PaymentInfo.prototype.status = 0; + PaymentInfo.prototype.status = null; /** * PaymentInfo transactionTimestamp. - * @member {number|Long} transactionTimestamp + * @member {number|Long|null|undefined} transactionTimestamp * @memberof proto.PaymentInfo * @instance */ - PaymentInfo.prototype.transactionTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + PaymentInfo.prototype.transactionTimestamp = null; /** * PaymentInfo requestMessageKey. @@ -69091,43 +111915,43 @@ $root.proto = (function() { /** * PaymentInfo expiryTimestamp. - * @member {number|Long} expiryTimestamp + * @member {number|Long|null|undefined} expiryTimestamp * @memberof proto.PaymentInfo * @instance */ - PaymentInfo.prototype.expiryTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + PaymentInfo.prototype.expiryTimestamp = null; /** * PaymentInfo futureproofed. - * @member {boolean} futureproofed + * @member {boolean|null|undefined} futureproofed * @memberof proto.PaymentInfo * @instance */ - PaymentInfo.prototype.futureproofed = false; + PaymentInfo.prototype.futureproofed = null; /** * PaymentInfo currency. - * @member {string} currency + * @member {string|null|undefined} currency * @memberof proto.PaymentInfo * @instance */ - PaymentInfo.prototype.currency = ""; + PaymentInfo.prototype.currency = null; /** * PaymentInfo txnStatus. - * @member {proto.PaymentInfo.TxnStatus} txnStatus + * @member {proto.PaymentInfo.TxnStatus|null|undefined} txnStatus * @memberof proto.PaymentInfo * @instance */ - PaymentInfo.prototype.txnStatus = 0; + PaymentInfo.prototype.txnStatus = null; /** * PaymentInfo useNoviFiatFormat. - * @member {boolean} useNoviFiatFormat + * @member {boolean|null|undefined} useNoviFiatFormat * @memberof proto.PaymentInfo * @instance */ - PaymentInfo.prototype.useNoviFiatFormat = false; + PaymentInfo.prototype.useNoviFiatFormat = null; /** * PaymentInfo primaryAmount. @@ -69145,6 +111969,87 @@ $root.proto = (function() { */ PaymentInfo.prototype.exchangeAmount = null; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PaymentInfo.prototype, "_currencyDeprecated", { + get: $util.oneOfGetter($oneOfFields = ["currencyDeprecated"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PaymentInfo.prototype, "_amount1000", { + get: $util.oneOfGetter($oneOfFields = ["amount1000"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PaymentInfo.prototype, "_receiverJid", { + get: $util.oneOfGetter($oneOfFields = ["receiverJid"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PaymentInfo.prototype, "_status", { + get: $util.oneOfGetter($oneOfFields = ["status"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PaymentInfo.prototype, "_transactionTimestamp", { + get: $util.oneOfGetter($oneOfFields = ["transactionTimestamp"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PaymentInfo.prototype, "_requestMessageKey", { + get: $util.oneOfGetter($oneOfFields = ["requestMessageKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PaymentInfo.prototype, "_expiryTimestamp", { + get: $util.oneOfGetter($oneOfFields = ["expiryTimestamp"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PaymentInfo.prototype, "_futureproofed", { + get: $util.oneOfGetter($oneOfFields = ["futureproofed"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PaymentInfo.prototype, "_currency", { + get: $util.oneOfGetter($oneOfFields = ["currency"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PaymentInfo.prototype, "_txnStatus", { + get: $util.oneOfGetter($oneOfFields = ["txnStatus"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PaymentInfo.prototype, "_useNoviFiatFormat", { + get: $util.oneOfGetter($oneOfFields = ["useNoviFiatFormat"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PaymentInfo.prototype, "_primaryAmount", { + get: $util.oneOfGetter($oneOfFields = ["primaryAmount"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PaymentInfo.prototype, "_exchangeAmount", { + get: $util.oneOfGetter($oneOfFields = ["exchangeAmount"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new PaymentInfo instance using the specified properties. * @function create @@ -69229,45 +112134,58 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.currencyDeprecated = reader.int32(); - break; - case 2: - message.amount1000 = reader.uint64(); - break; - case 3: - message.receiverJid = reader.string(); - break; - case 4: - message.status = reader.int32(); - break; - case 5: - message.transactionTimestamp = reader.uint64(); - break; - case 6: - message.requestMessageKey = $root.proto.MessageKey.decode(reader, reader.uint32()); - break; - case 7: - message.expiryTimestamp = reader.uint64(); - break; - case 8: - message.futureproofed = reader.bool(); - break; - case 9: - message.currency = reader.string(); - break; - case 10: - message.txnStatus = reader.int32(); - break; - case 11: - message.useNoviFiatFormat = reader.bool(); - break; - case 12: - message.primaryAmount = $root.proto.Money.decode(reader, reader.uint32()); - break; - case 13: - message.exchangeAmount = $root.proto.Money.decode(reader, reader.uint32()); - break; + case 1: { + message.currencyDeprecated = reader.int32(); + break; + } + case 2: { + message.amount1000 = reader.uint64(); + break; + } + case 3: { + message.receiverJid = reader.string(); + break; + } + case 4: { + message.status = reader.int32(); + break; + } + case 5: { + message.transactionTimestamp = reader.uint64(); + break; + } + case 6: { + message.requestMessageKey = $root.proto.MessageKey.decode(reader, reader.uint32()); + break; + } + case 7: { + message.expiryTimestamp = reader.uint64(); + break; + } + case 8: { + message.futureproofed = reader.bool(); + break; + } + case 9: { + message.currency = reader.string(); + break; + } + case 10: { + message.txnStatus = reader.int32(); + break; + } + case 11: { + message.useNoviFiatFormat = reader.bool(); + break; + } + case 12: { + message.primaryAmount = $root.proto.Money.decode(reader, reader.uint32()); + break; + } + case 13: { + message.exchangeAmount = $root.proto.Money.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -69303,7 +112221,9 @@ $root.proto = (function() { PaymentInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.currencyDeprecated != null && message.hasOwnProperty("currencyDeprecated")) + var properties = {}; + if (message.currencyDeprecated != null && message.hasOwnProperty("currencyDeprecated")) { + properties._currencyDeprecated = 1; switch (message.currencyDeprecated) { default: return "currencyDeprecated: enum value expected"; @@ -69311,13 +112231,19 @@ $root.proto = (function() { case 1: break; } - if (message.amount1000 != null && message.hasOwnProperty("amount1000")) + } + if (message.amount1000 != null && message.hasOwnProperty("amount1000")) { + properties._amount1000 = 1; if (!$util.isInteger(message.amount1000) && !(message.amount1000 && $util.isInteger(message.amount1000.low) && $util.isInteger(message.amount1000.high))) return "amount1000: integer|Long expected"; - if (message.receiverJid != null && message.hasOwnProperty("receiverJid")) + } + if (message.receiverJid != null && message.hasOwnProperty("receiverJid")) { + properties._receiverJid = 1; if (!$util.isString(message.receiverJid)) return "receiverJid: string expected"; - if (message.status != null && message.hasOwnProperty("status")) + } + if (message.status != null && message.hasOwnProperty("status")) { + properties._status = 1; switch (message.status) { default: return "status: enum value expected"; @@ -69335,24 +112261,37 @@ $root.proto = (function() { case 11: break; } - if (message.transactionTimestamp != null && message.hasOwnProperty("transactionTimestamp")) + } + if (message.transactionTimestamp != null && message.hasOwnProperty("transactionTimestamp")) { + properties._transactionTimestamp = 1; if (!$util.isInteger(message.transactionTimestamp) && !(message.transactionTimestamp && $util.isInteger(message.transactionTimestamp.low) && $util.isInteger(message.transactionTimestamp.high))) return "transactionTimestamp: integer|Long expected"; - if (message.requestMessageKey != null && message.hasOwnProperty("requestMessageKey")) { - var error = $root.proto.MessageKey.verify(message.requestMessageKey); - if (error) - return "requestMessageKey." + error; } - if (message.expiryTimestamp != null && message.hasOwnProperty("expiryTimestamp")) + if (message.requestMessageKey != null && message.hasOwnProperty("requestMessageKey")) { + properties._requestMessageKey = 1; + { + var error = $root.proto.MessageKey.verify(message.requestMessageKey); + if (error) + return "requestMessageKey." + error; + } + } + if (message.expiryTimestamp != null && message.hasOwnProperty("expiryTimestamp")) { + properties._expiryTimestamp = 1; if (!$util.isInteger(message.expiryTimestamp) && !(message.expiryTimestamp && $util.isInteger(message.expiryTimestamp.low) && $util.isInteger(message.expiryTimestamp.high))) return "expiryTimestamp: integer|Long expected"; - if (message.futureproofed != null && message.hasOwnProperty("futureproofed")) + } + if (message.futureproofed != null && message.hasOwnProperty("futureproofed")) { + properties._futureproofed = 1; if (typeof message.futureproofed !== "boolean") return "futureproofed: boolean expected"; - if (message.currency != null && message.hasOwnProperty("currency")) + } + if (message.currency != null && message.hasOwnProperty("currency")) { + properties._currency = 1; if (!$util.isString(message.currency)) return "currency: string expected"; - if (message.txnStatus != null && message.hasOwnProperty("txnStatus")) + } + if (message.txnStatus != null && message.hasOwnProperty("txnStatus")) { + properties._txnStatus = 1; switch (message.txnStatus) { default: return "txnStatus: enum value expected"; @@ -69390,18 +112329,27 @@ $root.proto = (function() { case 31: break; } - if (message.useNoviFiatFormat != null && message.hasOwnProperty("useNoviFiatFormat")) + } + if (message.useNoviFiatFormat != null && message.hasOwnProperty("useNoviFiatFormat")) { + properties._useNoviFiatFormat = 1; if (typeof message.useNoviFiatFormat !== "boolean") return "useNoviFiatFormat: boolean expected"; + } if (message.primaryAmount != null && message.hasOwnProperty("primaryAmount")) { - var error = $root.proto.Money.verify(message.primaryAmount); - if (error) - return "primaryAmount." + error; + properties._primaryAmount = 1; + { + var error = $root.proto.Money.verify(message.primaryAmount); + if (error) + return "primaryAmount." + error; + } } if (message.exchangeAmount != null && message.hasOwnProperty("exchangeAmount")) { - var error = $root.proto.Money.verify(message.exchangeAmount); - if (error) - return "exchangeAmount." + error; + properties._exchangeAmount = 1; + { + var error = $root.proto.Money.verify(message.exchangeAmount); + if (error) + return "exchangeAmount." + error; + } } return null; }; @@ -69419,6 +112367,12 @@ $root.proto = (function() { return object; var message = new $root.proto.PaymentInfo(); switch (object.currencyDeprecated) { + default: + if (typeof object.currencyDeprecated === "number") { + message.currencyDeprecated = object.currencyDeprecated; + break; + } + break; case "UNKNOWN_CURRENCY": case 0: message.currencyDeprecated = 0; @@ -69440,6 +112394,12 @@ $root.proto = (function() { if (object.receiverJid != null) message.receiverJid = String(object.receiverJid); switch (object.status) { + default: + if (typeof object.status === "number") { + message.status = object.status; + break; + } + break; case "UNKNOWN_STATUS": case 0: message.status = 0; @@ -69517,6 +112477,12 @@ $root.proto = (function() { if (object.currency != null) message.currency = String(object.currency); switch (object.txnStatus) { + default: + if (typeof object.txnStatus === "number") { + message.txnStatus = object.txnStatus; + break; + } + break; case "UNKNOWN": case 0: message.txnStatus = 0; @@ -69674,68 +112640,80 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.currencyDeprecated = options.enums === String ? "UNKNOWN_CURRENCY" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.amount1000 = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.amount1000 = options.longs === String ? "0" : 0; - object.receiverJid = ""; - object.status = options.enums === String ? "UNKNOWN_STATUS" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.transactionTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.transactionTimestamp = options.longs === String ? "0" : 0; - object.requestMessageKey = null; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.expiryTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.expiryTimestamp = options.longs === String ? "0" : 0; - object.futureproofed = false; - object.currency = ""; - object.txnStatus = options.enums === String ? "UNKNOWN" : 0; - object.useNoviFiatFormat = false; - object.primaryAmount = null; - object.exchangeAmount = null; + if (message.currencyDeprecated != null && message.hasOwnProperty("currencyDeprecated")) { + object.currencyDeprecated = options.enums === String ? $root.proto.PaymentInfo.Currency[message.currencyDeprecated] === undefined ? message.currencyDeprecated : $root.proto.PaymentInfo.Currency[message.currencyDeprecated] : message.currencyDeprecated; + if (options.oneofs) + object._currencyDeprecated = "currencyDeprecated"; } - if (message.currencyDeprecated != null && message.hasOwnProperty("currencyDeprecated")) - object.currencyDeprecated = options.enums === String ? $root.proto.PaymentInfo.Currency[message.currencyDeprecated] : message.currencyDeprecated; - if (message.amount1000 != null && message.hasOwnProperty("amount1000")) + if (message.amount1000 != null && message.hasOwnProperty("amount1000")) { if (typeof message.amount1000 === "number") object.amount1000 = options.longs === String ? String(message.amount1000) : message.amount1000; else object.amount1000 = options.longs === String ? $util.Long.prototype.toString.call(message.amount1000) : options.longs === Number ? new $util.LongBits(message.amount1000.low >>> 0, message.amount1000.high >>> 0).toNumber(true) : message.amount1000; - if (message.receiverJid != null && message.hasOwnProperty("receiverJid")) + if (options.oneofs) + object._amount1000 = "amount1000"; + } + if (message.receiverJid != null && message.hasOwnProperty("receiverJid")) { object.receiverJid = message.receiverJid; - if (message.status != null && message.hasOwnProperty("status")) - object.status = options.enums === String ? $root.proto.PaymentInfo.Status[message.status] : message.status; - if (message.transactionTimestamp != null && message.hasOwnProperty("transactionTimestamp")) + if (options.oneofs) + object._receiverJid = "receiverJid"; + } + if (message.status != null && message.hasOwnProperty("status")) { + object.status = options.enums === String ? $root.proto.PaymentInfo.Status[message.status] === undefined ? message.status : $root.proto.PaymentInfo.Status[message.status] : message.status; + if (options.oneofs) + object._status = "status"; + } + if (message.transactionTimestamp != null && message.hasOwnProperty("transactionTimestamp")) { if (typeof message.transactionTimestamp === "number") object.transactionTimestamp = options.longs === String ? String(message.transactionTimestamp) : message.transactionTimestamp; else object.transactionTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.transactionTimestamp) : options.longs === Number ? new $util.LongBits(message.transactionTimestamp.low >>> 0, message.transactionTimestamp.high >>> 0).toNumber(true) : message.transactionTimestamp; - if (message.requestMessageKey != null && message.hasOwnProperty("requestMessageKey")) + if (options.oneofs) + object._transactionTimestamp = "transactionTimestamp"; + } + if (message.requestMessageKey != null && message.hasOwnProperty("requestMessageKey")) { object.requestMessageKey = $root.proto.MessageKey.toObject(message.requestMessageKey, options); - if (message.expiryTimestamp != null && message.hasOwnProperty("expiryTimestamp")) + if (options.oneofs) + object._requestMessageKey = "requestMessageKey"; + } + if (message.expiryTimestamp != null && message.hasOwnProperty("expiryTimestamp")) { if (typeof message.expiryTimestamp === "number") object.expiryTimestamp = options.longs === String ? String(message.expiryTimestamp) : message.expiryTimestamp; else object.expiryTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.expiryTimestamp) : options.longs === Number ? new $util.LongBits(message.expiryTimestamp.low >>> 0, message.expiryTimestamp.high >>> 0).toNumber(true) : message.expiryTimestamp; - if (message.futureproofed != null && message.hasOwnProperty("futureproofed")) + if (options.oneofs) + object._expiryTimestamp = "expiryTimestamp"; + } + if (message.futureproofed != null && message.hasOwnProperty("futureproofed")) { object.futureproofed = message.futureproofed; - if (message.currency != null && message.hasOwnProperty("currency")) + if (options.oneofs) + object._futureproofed = "futureproofed"; + } + if (message.currency != null && message.hasOwnProperty("currency")) { object.currency = message.currency; - if (message.txnStatus != null && message.hasOwnProperty("txnStatus")) - object.txnStatus = options.enums === String ? $root.proto.PaymentInfo.TxnStatus[message.txnStatus] : message.txnStatus; - if (message.useNoviFiatFormat != null && message.hasOwnProperty("useNoviFiatFormat")) + if (options.oneofs) + object._currency = "currency"; + } + if (message.txnStatus != null && message.hasOwnProperty("txnStatus")) { + object.txnStatus = options.enums === String ? $root.proto.PaymentInfo.TxnStatus[message.txnStatus] === undefined ? message.txnStatus : $root.proto.PaymentInfo.TxnStatus[message.txnStatus] : message.txnStatus; + if (options.oneofs) + object._txnStatus = "txnStatus"; + } + if (message.useNoviFiatFormat != null && message.hasOwnProperty("useNoviFiatFormat")) { object.useNoviFiatFormat = message.useNoviFiatFormat; - if (message.primaryAmount != null && message.hasOwnProperty("primaryAmount")) + if (options.oneofs) + object._useNoviFiatFormat = "useNoviFiatFormat"; + } + if (message.primaryAmount != null && message.hasOwnProperty("primaryAmount")) { object.primaryAmount = $root.proto.Money.toObject(message.primaryAmount, options); - if (message.exchangeAmount != null && message.hasOwnProperty("exchangeAmount")) + if (options.oneofs) + object._primaryAmount = "primaryAmount"; + } + if (message.exchangeAmount != null && message.hasOwnProperty("exchangeAmount")) { object.exchangeAmount = $root.proto.Money.toObject(message.exchangeAmount, options); + if (options.oneofs) + object._exchangeAmount = "exchangeAmount"; + } return object; }; @@ -69750,6 +112728,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for PaymentInfo + * @function getTypeUrl + * @memberof proto.PaymentInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PaymentInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.PaymentInfo"; + }; + /** * Currency enum. * @name proto.PaymentInfo.Currency @@ -69902,19 +112895,34 @@ $root.proto = (function() { /** * PhoneNumberToLIDMapping pnJid. - * @member {string} pnJid + * @member {string|null|undefined} pnJid * @memberof proto.PhoneNumberToLIDMapping * @instance */ - PhoneNumberToLIDMapping.prototype.pnJid = ""; + PhoneNumberToLIDMapping.prototype.pnJid = null; /** * PhoneNumberToLIDMapping lidJid. - * @member {string} lidJid + * @member {string|null|undefined} lidJid * @memberof proto.PhoneNumberToLIDMapping * @instance */ - PhoneNumberToLIDMapping.prototype.lidJid = ""; + PhoneNumberToLIDMapping.prototype.lidJid = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PhoneNumberToLIDMapping.prototype, "_pnJid", { + get: $util.oneOfGetter($oneOfFields = ["pnJid"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PhoneNumberToLIDMapping.prototype, "_lidJid", { + get: $util.oneOfGetter($oneOfFields = ["lidJid"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new PhoneNumberToLIDMapping instance using the specified properties. @@ -69978,12 +112986,14 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.pnJid = reader.string(); - break; - case 2: - message.lidJid = reader.string(); - break; + case 1: { + message.pnJid = reader.string(); + break; + } + case 2: { + message.lidJid = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -70019,12 +113029,17 @@ $root.proto = (function() { PhoneNumberToLIDMapping.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.pnJid != null && message.hasOwnProperty("pnJid")) + var properties = {}; + if (message.pnJid != null && message.hasOwnProperty("pnJid")) { + properties._pnJid = 1; if (!$util.isString(message.pnJid)) return "pnJid: string expected"; - if (message.lidJid != null && message.hasOwnProperty("lidJid")) + } + if (message.lidJid != null && message.hasOwnProperty("lidJid")) { + properties._lidJid = 1; if (!$util.isString(message.lidJid)) return "lidJid: string expected"; + } return null; }; @@ -70060,14 +113075,16 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.pnJid = ""; - object.lidJid = ""; - } - if (message.pnJid != null && message.hasOwnProperty("pnJid")) + if (message.pnJid != null && message.hasOwnProperty("pnJid")) { object.pnJid = message.pnJid; - if (message.lidJid != null && message.hasOwnProperty("lidJid")) + if (options.oneofs) + object._pnJid = "pnJid"; + } + if (message.lidJid != null && message.hasOwnProperty("lidJid")) { object.lidJid = message.lidJid; + if (options.oneofs) + object._lidJid = "lidJid"; + } return object; }; @@ -70082,6 +113099,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for PhoneNumberToLIDMapping + * @function getTypeUrl + * @memberof proto.PhoneNumberToLIDMapping + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PhoneNumberToLIDMapping.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.PhoneNumberToLIDMapping"; + }; + return PhoneNumberToLIDMapping; })(); @@ -70113,27 +113145,48 @@ $root.proto = (function() { /** * PhotoChange oldPhoto. - * @member {Uint8Array} oldPhoto + * @member {Uint8Array|null|undefined} oldPhoto * @memberof proto.PhotoChange * @instance */ - PhotoChange.prototype.oldPhoto = $util.newBuffer([]); + PhotoChange.prototype.oldPhoto = null; /** * PhotoChange newPhoto. - * @member {Uint8Array} newPhoto + * @member {Uint8Array|null|undefined} newPhoto * @memberof proto.PhotoChange * @instance */ - PhotoChange.prototype.newPhoto = $util.newBuffer([]); + PhotoChange.prototype.newPhoto = null; /** * PhotoChange newPhotoId. - * @member {number} newPhotoId + * @member {number|null|undefined} newPhotoId * @memberof proto.PhotoChange * @instance */ - PhotoChange.prototype.newPhotoId = 0; + PhotoChange.prototype.newPhotoId = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PhotoChange.prototype, "_oldPhoto", { + get: $util.oneOfGetter($oneOfFields = ["oldPhoto"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PhotoChange.prototype, "_newPhoto", { + get: $util.oneOfGetter($oneOfFields = ["newPhoto"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PhotoChange.prototype, "_newPhotoId", { + get: $util.oneOfGetter($oneOfFields = ["newPhotoId"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new PhotoChange instance using the specified properties. @@ -70199,15 +113252,18 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.oldPhoto = reader.bytes(); - break; - case 2: - message.newPhoto = reader.bytes(); - break; - case 3: - message.newPhotoId = reader.uint32(); - break; + case 1: { + message.oldPhoto = reader.bytes(); + break; + } + case 2: { + message.newPhoto = reader.bytes(); + break; + } + case 3: { + message.newPhotoId = reader.uint32(); + break; + } default: reader.skipType(tag & 7); break; @@ -70243,15 +113299,22 @@ $root.proto = (function() { PhotoChange.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.oldPhoto != null && message.hasOwnProperty("oldPhoto")) + var properties = {}; + if (message.oldPhoto != null && message.hasOwnProperty("oldPhoto")) { + properties._oldPhoto = 1; if (!(message.oldPhoto && typeof message.oldPhoto.length === "number" || $util.isString(message.oldPhoto))) return "oldPhoto: buffer expected"; - if (message.newPhoto != null && message.hasOwnProperty("newPhoto")) + } + if (message.newPhoto != null && message.hasOwnProperty("newPhoto")) { + properties._newPhoto = 1; if (!(message.newPhoto && typeof message.newPhoto.length === "number" || $util.isString(message.newPhoto))) return "newPhoto: buffer expected"; - if (message.newPhotoId != null && message.hasOwnProperty("newPhotoId")) + } + if (message.newPhotoId != null && message.hasOwnProperty("newPhotoId")) { + properties._newPhotoId = 1; if (!$util.isInteger(message.newPhotoId)) return "newPhotoId: integer expected"; + } return null; }; @@ -70270,12 +113333,12 @@ $root.proto = (function() { if (object.oldPhoto != null) if (typeof object.oldPhoto === "string") $util.base64.decode(object.oldPhoto, message.oldPhoto = $util.newBuffer($util.base64.length(object.oldPhoto)), 0); - else if (object.oldPhoto.length) + else if (object.oldPhoto.length >= 0) message.oldPhoto = object.oldPhoto; if (object.newPhoto != null) if (typeof object.newPhoto === "string") $util.base64.decode(object.newPhoto, message.newPhoto = $util.newBuffer($util.base64.length(object.newPhoto)), 0); - else if (object.newPhoto.length) + else if (object.newPhoto.length >= 0) message.newPhoto = object.newPhoto; if (object.newPhotoId != null) message.newPhotoId = object.newPhotoId >>> 0; @@ -70295,29 +113358,21 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - if (options.bytes === String) - object.oldPhoto = ""; - else { - object.oldPhoto = []; - if (options.bytes !== Array) - object.oldPhoto = $util.newBuffer(object.oldPhoto); - } - if (options.bytes === String) - object.newPhoto = ""; - else { - object.newPhoto = []; - if (options.bytes !== Array) - object.newPhoto = $util.newBuffer(object.newPhoto); - } - object.newPhotoId = 0; - } - if (message.oldPhoto != null && message.hasOwnProperty("oldPhoto")) + if (message.oldPhoto != null && message.hasOwnProperty("oldPhoto")) { object.oldPhoto = options.bytes === String ? $util.base64.encode(message.oldPhoto, 0, message.oldPhoto.length) : options.bytes === Array ? Array.prototype.slice.call(message.oldPhoto) : message.oldPhoto; - if (message.newPhoto != null && message.hasOwnProperty("newPhoto")) + if (options.oneofs) + object._oldPhoto = "oldPhoto"; + } + if (message.newPhoto != null && message.hasOwnProperty("newPhoto")) { object.newPhoto = options.bytes === String ? $util.base64.encode(message.newPhoto, 0, message.newPhoto.length) : options.bytes === Array ? Array.prototype.slice.call(message.newPhoto) : message.newPhoto; - if (message.newPhotoId != null && message.hasOwnProperty("newPhotoId")) + if (options.oneofs) + object._newPhoto = "newPhoto"; + } + if (message.newPhotoId != null && message.hasOwnProperty("newPhotoId")) { object.newPhotoId = message.newPhotoId; + if (options.oneofs) + object._newPhotoId = "newPhotoId"; + } return object; }; @@ -70332,6 +113387,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for PhotoChange + * @function getTypeUrl + * @memberof proto.PhotoChange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PhotoChange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.PhotoChange"; + }; + return PhotoChange; })(); @@ -70365,11 +113435,11 @@ $root.proto = (function() { /** * PinInChat type. - * @member {proto.PinInChat.Type} type + * @member {proto.PinInChat.Type|null|undefined} type * @memberof proto.PinInChat * @instance */ - PinInChat.prototype.type = 0; + PinInChat.prototype.type = null; /** * PinInChat key. @@ -70381,19 +113451,19 @@ $root.proto = (function() { /** * PinInChat senderTimestampMs. - * @member {number|Long} senderTimestampMs + * @member {number|Long|null|undefined} senderTimestampMs * @memberof proto.PinInChat * @instance */ - PinInChat.prototype.senderTimestampMs = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + PinInChat.prototype.senderTimestampMs = null; /** * PinInChat serverTimestampMs. - * @member {number|Long} serverTimestampMs + * @member {number|Long|null|undefined} serverTimestampMs * @memberof proto.PinInChat * @instance */ - PinInChat.prototype.serverTimestampMs = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + PinInChat.prototype.serverTimestampMs = null; /** * PinInChat messageAddOnContextInfo. @@ -70403,6 +113473,39 @@ $root.proto = (function() { */ PinInChat.prototype.messageAddOnContextInfo = null; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PinInChat.prototype, "_type", { + get: $util.oneOfGetter($oneOfFields = ["type"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PinInChat.prototype, "_key", { + get: $util.oneOfGetter($oneOfFields = ["key"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PinInChat.prototype, "_senderTimestampMs", { + get: $util.oneOfGetter($oneOfFields = ["senderTimestampMs"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PinInChat.prototype, "_serverTimestampMs", { + get: $util.oneOfGetter($oneOfFields = ["serverTimestampMs"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PinInChat.prototype, "_messageAddOnContextInfo", { + get: $util.oneOfGetter($oneOfFields = ["messageAddOnContextInfo"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new PinInChat instance using the specified properties. * @function create @@ -70471,21 +113574,26 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.type = reader.int32(); - break; - case 2: - message.key = $root.proto.MessageKey.decode(reader, reader.uint32()); - break; - case 3: - message.senderTimestampMs = reader.int64(); - break; - case 4: - message.serverTimestampMs = reader.int64(); - break; - case 5: - message.messageAddOnContextInfo = $root.proto.MessageAddOnContextInfo.decode(reader, reader.uint32()); - break; + case 1: { + message.type = reader.int32(); + break; + } + case 2: { + message.key = $root.proto.MessageKey.decode(reader, reader.uint32()); + break; + } + case 3: { + message.senderTimestampMs = reader.int64(); + break; + } + case 4: { + message.serverTimestampMs = reader.int64(); + break; + } + case 5: { + message.messageAddOnContextInfo = $root.proto.MessageAddOnContextInfo.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -70521,7 +113629,9 @@ $root.proto = (function() { PinInChat.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) + var properties = {}; + if (message.type != null && message.hasOwnProperty("type")) { + properties._type = 1; switch (message.type) { default: return "type: enum value expected"; @@ -70530,21 +113640,32 @@ $root.proto = (function() { case 2: break; } - if (message.key != null && message.hasOwnProperty("key")) { - var error = $root.proto.MessageKey.verify(message.key); - if (error) - return "key." + error; } - if (message.senderTimestampMs != null && message.hasOwnProperty("senderTimestampMs")) + if (message.key != null && message.hasOwnProperty("key")) { + properties._key = 1; + { + var error = $root.proto.MessageKey.verify(message.key); + if (error) + return "key." + error; + } + } + if (message.senderTimestampMs != null && message.hasOwnProperty("senderTimestampMs")) { + properties._senderTimestampMs = 1; if (!$util.isInteger(message.senderTimestampMs) && !(message.senderTimestampMs && $util.isInteger(message.senderTimestampMs.low) && $util.isInteger(message.senderTimestampMs.high))) return "senderTimestampMs: integer|Long expected"; - if (message.serverTimestampMs != null && message.hasOwnProperty("serverTimestampMs")) + } + if (message.serverTimestampMs != null && message.hasOwnProperty("serverTimestampMs")) { + properties._serverTimestampMs = 1; if (!$util.isInteger(message.serverTimestampMs) && !(message.serverTimestampMs && $util.isInteger(message.serverTimestampMs.low) && $util.isInteger(message.serverTimestampMs.high))) return "serverTimestampMs: integer|Long expected"; + } if (message.messageAddOnContextInfo != null && message.hasOwnProperty("messageAddOnContextInfo")) { - var error = $root.proto.MessageAddOnContextInfo.verify(message.messageAddOnContextInfo); - if (error) - return "messageAddOnContextInfo." + error; + properties._messageAddOnContextInfo = 1; + { + var error = $root.proto.MessageAddOnContextInfo.verify(message.messageAddOnContextInfo); + if (error) + return "messageAddOnContextInfo." + error; + } } return null; }; @@ -70562,6 +113683,12 @@ $root.proto = (function() { return object; var message = new $root.proto.PinInChat(); switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; case "UNKNOWN_TYPE": case 0: message.type = 0; @@ -70619,37 +113746,37 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.type = options.enums === String ? "UNKNOWN_TYPE" : 0; - object.key = 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 ($util.Long) { - var long = new $util.Long(0, 0, false); - object.serverTimestampMs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.serverTimestampMs = options.longs === String ? "0" : 0; - object.messageAddOnContextInfo = null; + if (message.type != null && message.hasOwnProperty("type")) { + object.type = options.enums === String ? $root.proto.PinInChat.Type[message.type] === undefined ? message.type : $root.proto.PinInChat.Type[message.type] : message.type; + if (options.oneofs) + object._type = "type"; } - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.proto.PinInChat.Type[message.type] : message.type; - if (message.key != null && message.hasOwnProperty("key")) + if (message.key != null && message.hasOwnProperty("key")) { object.key = $root.proto.MessageKey.toObject(message.key, options); - if (message.senderTimestampMs != null && message.hasOwnProperty("senderTimestampMs")) + if (options.oneofs) + object._key = "key"; + } + 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.serverTimestampMs != null && message.hasOwnProperty("serverTimestampMs")) + if (options.oneofs) + object._senderTimestampMs = "senderTimestampMs"; + } + if (message.serverTimestampMs != null && message.hasOwnProperty("serverTimestampMs")) { if (typeof message.serverTimestampMs === "number") object.serverTimestampMs = options.longs === String ? String(message.serverTimestampMs) : message.serverTimestampMs; else object.serverTimestampMs = options.longs === String ? $util.Long.prototype.toString.call(message.serverTimestampMs) : options.longs === Number ? new $util.LongBits(message.serverTimestampMs.low >>> 0, message.serverTimestampMs.high >>> 0).toNumber() : message.serverTimestampMs; - if (message.messageAddOnContextInfo != null && message.hasOwnProperty("messageAddOnContextInfo")) + if (options.oneofs) + object._serverTimestampMs = "serverTimestampMs"; + } + if (message.messageAddOnContextInfo != null && message.hasOwnProperty("messageAddOnContextInfo")) { object.messageAddOnContextInfo = $root.proto.MessageAddOnContextInfo.toObject(message.messageAddOnContextInfo, options); + if (options.oneofs) + object._messageAddOnContextInfo = "messageAddOnContextInfo"; + } return object; }; @@ -70664,6 +113791,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for PinInChat + * @function getTypeUrl + * @memberof proto.PinInChat + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PinInChat.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.PinInChat"; + }; + /** * Type enum. * @name proto.PinInChat.Type @@ -70712,35 +113854,62 @@ $root.proto = (function() { /** * Point xDeprecated. - * @member {number} xDeprecated + * @member {number|null|undefined} xDeprecated * @memberof proto.Point * @instance */ - Point.prototype.xDeprecated = 0; + Point.prototype.xDeprecated = null; /** * Point yDeprecated. - * @member {number} yDeprecated + * @member {number|null|undefined} yDeprecated * @memberof proto.Point * @instance */ - Point.prototype.yDeprecated = 0; + Point.prototype.yDeprecated = null; /** * Point x. - * @member {number} x + * @member {number|null|undefined} x * @memberof proto.Point * @instance */ - Point.prototype.x = 0; + Point.prototype.x = null; /** * Point y. - * @member {number} y + * @member {number|null|undefined} y * @memberof proto.Point * @instance */ - Point.prototype.y = 0; + Point.prototype.y = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Point.prototype, "_xDeprecated", { + get: $util.oneOfGetter($oneOfFields = ["xDeprecated"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Point.prototype, "_yDeprecated", { + get: $util.oneOfGetter($oneOfFields = ["yDeprecated"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Point.prototype, "_x", { + get: $util.oneOfGetter($oneOfFields = ["x"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Point.prototype, "_y", { + get: $util.oneOfGetter($oneOfFields = ["y"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new Point instance using the specified properties. @@ -70808,18 +113977,22 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.xDeprecated = reader.int32(); - break; - case 2: - message.yDeprecated = reader.int32(); - break; - case 3: - message.x = reader.double(); - break; - case 4: - message.y = reader.double(); - break; + case 1: { + message.xDeprecated = reader.int32(); + break; + } + case 2: { + message.yDeprecated = reader.int32(); + break; + } + case 3: { + message.x = reader.double(); + break; + } + case 4: { + message.y = reader.double(); + break; + } default: reader.skipType(tag & 7); break; @@ -70855,18 +114028,27 @@ $root.proto = (function() { Point.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.xDeprecated != null && message.hasOwnProperty("xDeprecated")) + var properties = {}; + if (message.xDeprecated != null && message.hasOwnProperty("xDeprecated")) { + properties._xDeprecated = 1; if (!$util.isInteger(message.xDeprecated)) return "xDeprecated: integer expected"; - if (message.yDeprecated != null && message.hasOwnProperty("yDeprecated")) + } + if (message.yDeprecated != null && message.hasOwnProperty("yDeprecated")) { + properties._yDeprecated = 1; if (!$util.isInteger(message.yDeprecated)) return "yDeprecated: integer expected"; - if (message.x != null && message.hasOwnProperty("x")) + } + if (message.x != null && message.hasOwnProperty("x")) { + properties._x = 1; if (typeof message.x !== "number") return "x: number expected"; - if (message.y != null && message.hasOwnProperty("y")) + } + if (message.y != null && message.hasOwnProperty("y")) { + properties._y = 1; if (typeof message.y !== "number") return "y: number expected"; + } return null; }; @@ -70906,20 +114088,26 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.xDeprecated = 0; - object.yDeprecated = 0; - object.x = 0; - object.y = 0; - } - if (message.xDeprecated != null && message.hasOwnProperty("xDeprecated")) + if (message.xDeprecated != null && message.hasOwnProperty("xDeprecated")) { object.xDeprecated = message.xDeprecated; - if (message.yDeprecated != null && message.hasOwnProperty("yDeprecated")) + if (options.oneofs) + object._xDeprecated = "xDeprecated"; + } + if (message.yDeprecated != null && message.hasOwnProperty("yDeprecated")) { object.yDeprecated = message.yDeprecated; - if (message.x != null && message.hasOwnProperty("x")) + if (options.oneofs) + object._yDeprecated = "yDeprecated"; + } + if (message.x != null && message.hasOwnProperty("x")) { object.x = options.json && !isFinite(message.x) ? String(message.x) : message.x; - if (message.y != null && message.hasOwnProperty("y")) + if (options.oneofs) + object._x = "x"; + } + if (message.y != null && message.hasOwnProperty("y")) { object.y = options.json && !isFinite(message.y) ? String(message.y) : message.y; + if (options.oneofs) + object._y = "y"; + } return object; }; @@ -70934,6 +114122,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Point + * @function getTypeUrl + * @memberof proto.Point + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Point.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Point"; + }; + return Point; })(); @@ -70963,11 +114166,20 @@ $root.proto = (function() { /** * PollAdditionalMetadata pollInvalidated. - * @member {boolean} pollInvalidated + * @member {boolean|null|undefined} pollInvalidated * @memberof proto.PollAdditionalMetadata * @instance */ - PollAdditionalMetadata.prototype.pollInvalidated = false; + PollAdditionalMetadata.prototype.pollInvalidated = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PollAdditionalMetadata.prototype, "_pollInvalidated", { + get: $util.oneOfGetter($oneOfFields = ["pollInvalidated"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new PollAdditionalMetadata instance using the specified properties. @@ -71029,9 +114241,10 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.pollInvalidated = reader.bool(); - break; + case 1: { + message.pollInvalidated = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -71067,9 +114280,12 @@ $root.proto = (function() { PollAdditionalMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.pollInvalidated != null && message.hasOwnProperty("pollInvalidated")) + var properties = {}; + if (message.pollInvalidated != null && message.hasOwnProperty("pollInvalidated")) { + properties._pollInvalidated = 1; if (typeof message.pollInvalidated !== "boolean") return "pollInvalidated: boolean expected"; + } return null; }; @@ -71103,10 +114319,11 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) - object.pollInvalidated = false; - if (message.pollInvalidated != null && message.hasOwnProperty("pollInvalidated")) + if (message.pollInvalidated != null && message.hasOwnProperty("pollInvalidated")) { object.pollInvalidated = message.pollInvalidated; + if (options.oneofs) + object._pollInvalidated = "pollInvalidated"; + } return object; }; @@ -71121,6 +114338,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for PollAdditionalMetadata + * @function getTypeUrl + * @memberof proto.PollAdditionalMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PollAdditionalMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.PollAdditionalMetadata"; + }; + return PollAdditionalMetadata; })(); @@ -71151,19 +114383,34 @@ $root.proto = (function() { /** * PollEncValue encPayload. - * @member {Uint8Array} encPayload + * @member {Uint8Array|null|undefined} encPayload * @memberof proto.PollEncValue * @instance */ - PollEncValue.prototype.encPayload = $util.newBuffer([]); + PollEncValue.prototype.encPayload = null; /** * PollEncValue encIv. - * @member {Uint8Array} encIv + * @member {Uint8Array|null|undefined} encIv * @memberof proto.PollEncValue * @instance */ - PollEncValue.prototype.encIv = $util.newBuffer([]); + PollEncValue.prototype.encIv = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PollEncValue.prototype, "_encPayload", { + get: $util.oneOfGetter($oneOfFields = ["encPayload"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PollEncValue.prototype, "_encIv", { + get: $util.oneOfGetter($oneOfFields = ["encIv"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new PollEncValue instance using the specified properties. @@ -71227,12 +114474,14 @@ $root.proto = (function() { 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; + case 1: { + message.encPayload = reader.bytes(); + break; + } + case 2: { + message.encIv = reader.bytes(); + break; + } default: reader.skipType(tag & 7); break; @@ -71268,12 +114517,17 @@ $root.proto = (function() { PollEncValue.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.encPayload != null && message.hasOwnProperty("encPayload")) + var properties = {}; + if (message.encPayload != null && message.hasOwnProperty("encPayload")) { + properties._encPayload = 1; 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 != null && message.hasOwnProperty("encIv")) { + properties._encIv = 1; if (!(message.encIv && typeof message.encIv.length === "number" || $util.isString(message.encIv))) return "encIv: buffer expected"; + } return null; }; @@ -71292,12 +114546,12 @@ $root.proto = (function() { 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) + else if (object.encPayload.length >= 0) 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) + else if (object.encIv.length >= 0) message.encIv = object.encIv; return message; }; @@ -71315,26 +114569,16 @@ $root.proto = (function() { 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")) + 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")) + if (options.oneofs) + object._encPayload = "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; + if (options.oneofs) + object._encIv = "encIv"; + } return object; }; @@ -71349,6 +114593,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for PollEncValue + * @function getTypeUrl + * @memberof proto.PollEncValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PollEncValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.PollEncValue"; + }; + return PollEncValue; })(); @@ -71398,27 +114657,60 @@ $root.proto = (function() { /** * PollUpdate senderTimestampMs. - * @member {number|Long} senderTimestampMs + * @member {number|Long|null|undefined} senderTimestampMs * @memberof proto.PollUpdate * @instance */ - PollUpdate.prototype.senderTimestampMs = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + PollUpdate.prototype.senderTimestampMs = null; /** * PollUpdate serverTimestampMs. - * @member {number|Long} serverTimestampMs + * @member {number|Long|null|undefined} serverTimestampMs * @memberof proto.PollUpdate * @instance */ - PollUpdate.prototype.serverTimestampMs = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + PollUpdate.prototype.serverTimestampMs = null; /** * PollUpdate unread. - * @member {boolean} unread + * @member {boolean|null|undefined} unread * @memberof proto.PollUpdate * @instance */ - PollUpdate.prototype.unread = false; + PollUpdate.prototype.unread = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PollUpdate.prototype, "_pollUpdateMessageKey", { + get: $util.oneOfGetter($oneOfFields = ["pollUpdateMessageKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PollUpdate.prototype, "_vote", { + get: $util.oneOfGetter($oneOfFields = ["vote"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PollUpdate.prototype, "_senderTimestampMs", { + get: $util.oneOfGetter($oneOfFields = ["senderTimestampMs"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PollUpdate.prototype, "_serverTimestampMs", { + get: $util.oneOfGetter($oneOfFields = ["serverTimestampMs"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PollUpdate.prototype, "_unread", { + get: $util.oneOfGetter($oneOfFields = ["unread"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new PollUpdate instance using the specified properties. @@ -71488,21 +114780,26 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.pollUpdateMessageKey = $root.proto.MessageKey.decode(reader, reader.uint32()); - break; - case 2: - message.vote = $root.proto.Message.PollVoteMessage.decode(reader, reader.uint32()); - break; - case 3: - message.senderTimestampMs = reader.int64(); - break; - case 4: - message.serverTimestampMs = reader.int64(); - break; - case 5: - message.unread = reader.bool(); - break; + case 1: { + message.pollUpdateMessageKey = $root.proto.MessageKey.decode(reader, reader.uint32()); + break; + } + case 2: { + message.vote = $root.proto.Message.PollVoteMessage.decode(reader, reader.uint32()); + break; + } + case 3: { + message.senderTimestampMs = reader.int64(); + break; + } + case 4: { + message.serverTimestampMs = reader.int64(); + break; + } + case 5: { + message.unread = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -71538,25 +114835,38 @@ $root.proto = (function() { PollUpdate.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; if (message.pollUpdateMessageKey != null && message.hasOwnProperty("pollUpdateMessageKey")) { - var error = $root.proto.MessageKey.verify(message.pollUpdateMessageKey); - if (error) - return "pollUpdateMessageKey." + error; + properties._pollUpdateMessageKey = 1; + { + var error = $root.proto.MessageKey.verify(message.pollUpdateMessageKey); + if (error) + return "pollUpdateMessageKey." + error; + } } if (message.vote != null && message.hasOwnProperty("vote")) { - var error = $root.proto.Message.PollVoteMessage.verify(message.vote); - if (error) - return "vote." + error; + properties._vote = 1; + { + var error = $root.proto.Message.PollVoteMessage.verify(message.vote); + if (error) + return "vote." + error; + } } - if (message.senderTimestampMs != null && message.hasOwnProperty("senderTimestampMs")) + if (message.senderTimestampMs != null && message.hasOwnProperty("senderTimestampMs")) { + properties._senderTimestampMs = 1; if (!$util.isInteger(message.senderTimestampMs) && !(message.senderTimestampMs && $util.isInteger(message.senderTimestampMs.low) && $util.isInteger(message.senderTimestampMs.high))) return "senderTimestampMs: integer|Long expected"; - if (message.serverTimestampMs != null && message.hasOwnProperty("serverTimestampMs")) + } + if (message.serverTimestampMs != null && message.hasOwnProperty("serverTimestampMs")) { + properties._serverTimestampMs = 1; if (!$util.isInteger(message.serverTimestampMs) && !(message.serverTimestampMs && $util.isInteger(message.serverTimestampMs.low) && $util.isInteger(message.serverTimestampMs.high))) return "serverTimestampMs: integer|Long expected"; - if (message.unread != null && message.hasOwnProperty("unread")) + } + if (message.unread != null && message.hasOwnProperty("unread")) { + properties._unread = 1; if (typeof message.unread !== "boolean") return "unread: boolean expected"; + } return null; }; @@ -71618,37 +114928,37 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - 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 ($util.Long) { - var long = new $util.Long(0, 0, false); - object.serverTimestampMs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.serverTimestampMs = options.longs === String ? "0" : 0; - object.unread = false; - } - if (message.pollUpdateMessageKey != null && message.hasOwnProperty("pollUpdateMessageKey")) + if (message.pollUpdateMessageKey != null && message.hasOwnProperty("pollUpdateMessageKey")) { object.pollUpdateMessageKey = $root.proto.MessageKey.toObject(message.pollUpdateMessageKey, options); - if (message.vote != null && message.hasOwnProperty("vote")) + if (options.oneofs) + object._pollUpdateMessageKey = "pollUpdateMessageKey"; + } + if (message.vote != null && message.hasOwnProperty("vote")) { object.vote = $root.proto.Message.PollVoteMessage.toObject(message.vote, options); - if (message.senderTimestampMs != null && message.hasOwnProperty("senderTimestampMs")) + if (options.oneofs) + object._vote = "vote"; + } + 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.serverTimestampMs != null && message.hasOwnProperty("serverTimestampMs")) + if (options.oneofs) + object._senderTimestampMs = "senderTimestampMs"; + } + if (message.serverTimestampMs != null && message.hasOwnProperty("serverTimestampMs")) { if (typeof message.serverTimestampMs === "number") object.serverTimestampMs = options.longs === String ? String(message.serverTimestampMs) : message.serverTimestampMs; else object.serverTimestampMs = options.longs === String ? $util.Long.prototype.toString.call(message.serverTimestampMs) : options.longs === Number ? new $util.LongBits(message.serverTimestampMs.low >>> 0, message.serverTimestampMs.high >>> 0).toNumber() : message.serverTimestampMs; - if (message.unread != null && message.hasOwnProperty("unread")) + if (options.oneofs) + object._serverTimestampMs = "serverTimestampMs"; + } + if (message.unread != null && message.hasOwnProperty("unread")) { object.unread = message.unread; + if (options.oneofs) + object._unread = "unread"; + } return object; }; @@ -71663,6 +114973,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for PollUpdate + * @function getTypeUrl + * @memberof proto.PollUpdate + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PollUpdate.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.PollUpdate"; + }; + return PollUpdate; })(); @@ -71694,27 +115019,48 @@ $root.proto = (function() { /** * PreKeyRecordStructure id. - * @member {number} id + * @member {number|null|undefined} id * @memberof proto.PreKeyRecordStructure * @instance */ - PreKeyRecordStructure.prototype.id = 0; + PreKeyRecordStructure.prototype.id = null; /** * PreKeyRecordStructure publicKey. - * @member {Uint8Array} publicKey + * @member {Uint8Array|null|undefined} publicKey * @memberof proto.PreKeyRecordStructure * @instance */ - PreKeyRecordStructure.prototype.publicKey = $util.newBuffer([]); + PreKeyRecordStructure.prototype.publicKey = null; /** * PreKeyRecordStructure privateKey. - * @member {Uint8Array} privateKey + * @member {Uint8Array|null|undefined} privateKey * @memberof proto.PreKeyRecordStructure * @instance */ - PreKeyRecordStructure.prototype.privateKey = $util.newBuffer([]); + PreKeyRecordStructure.prototype.privateKey = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PreKeyRecordStructure.prototype, "_id", { + get: $util.oneOfGetter($oneOfFields = ["id"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PreKeyRecordStructure.prototype, "_publicKey", { + get: $util.oneOfGetter($oneOfFields = ["publicKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PreKeyRecordStructure.prototype, "_privateKey", { + get: $util.oneOfGetter($oneOfFields = ["privateKey"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new PreKeyRecordStructure instance using the specified properties. @@ -71780,15 +115126,18 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.id = reader.uint32(); - break; - case 2: - message.publicKey = reader.bytes(); - break; - case 3: - message.privateKey = reader.bytes(); - break; + case 1: { + message.id = reader.uint32(); + break; + } + case 2: { + message.publicKey = reader.bytes(); + break; + } + case 3: { + message.privateKey = reader.bytes(); + break; + } default: reader.skipType(tag & 7); break; @@ -71824,15 +115173,22 @@ $root.proto = (function() { PreKeyRecordStructure.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.id != null && message.hasOwnProperty("id")) + var properties = {}; + if (message.id != null && message.hasOwnProperty("id")) { + properties._id = 1; if (!$util.isInteger(message.id)) return "id: integer expected"; - if (message.publicKey != null && message.hasOwnProperty("publicKey")) + } + if (message.publicKey != null && message.hasOwnProperty("publicKey")) { + properties._publicKey = 1; if (!(message.publicKey && typeof message.publicKey.length === "number" || $util.isString(message.publicKey))) return "publicKey: buffer expected"; - if (message.privateKey != null && message.hasOwnProperty("privateKey")) + } + if (message.privateKey != null && message.hasOwnProperty("privateKey")) { + properties._privateKey = 1; if (!(message.privateKey && typeof message.privateKey.length === "number" || $util.isString(message.privateKey))) return "privateKey: buffer expected"; + } return null; }; @@ -71853,12 +115209,12 @@ $root.proto = (function() { if (object.publicKey != null) if (typeof object.publicKey === "string") $util.base64.decode(object.publicKey, message.publicKey = $util.newBuffer($util.base64.length(object.publicKey)), 0); - else if (object.publicKey.length) + else if (object.publicKey.length >= 0) message.publicKey = object.publicKey; if (object.privateKey != null) if (typeof object.privateKey === "string") $util.base64.decode(object.privateKey, message.privateKey = $util.newBuffer($util.base64.length(object.privateKey)), 0); - else if (object.privateKey.length) + else if (object.privateKey.length >= 0) message.privateKey = object.privateKey; return message; }; @@ -71876,29 +115232,21 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.id = 0; - if (options.bytes === String) - object.publicKey = ""; - else { - object.publicKey = []; - if (options.bytes !== Array) - object.publicKey = $util.newBuffer(object.publicKey); - } - if (options.bytes === String) - object.privateKey = ""; - else { - object.privateKey = []; - if (options.bytes !== Array) - object.privateKey = $util.newBuffer(object.privateKey); - } - } - if (message.id != null && message.hasOwnProperty("id")) + if (message.id != null && message.hasOwnProperty("id")) { object.id = message.id; - if (message.publicKey != null && message.hasOwnProperty("publicKey")) + if (options.oneofs) + object._id = "id"; + } + if (message.publicKey != null && message.hasOwnProperty("publicKey")) { object.publicKey = options.bytes === String ? $util.base64.encode(message.publicKey, 0, message.publicKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.publicKey) : message.publicKey; - if (message.privateKey != null && message.hasOwnProperty("privateKey")) + if (options.oneofs) + object._publicKey = "publicKey"; + } + if (message.privateKey != null && message.hasOwnProperty("privateKey")) { object.privateKey = options.bytes === String ? $util.base64.encode(message.privateKey, 0, message.privateKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.privateKey) : message.privateKey; + if (options.oneofs) + object._privateKey = "privateKey"; + } return object; }; @@ -71913,6 +115261,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for PreKeyRecordStructure + * @function getTypeUrl + * @memberof proto.PreKeyRecordStructure + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PreKeyRecordStructure.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.PreKeyRecordStructure"; + }; + return PreKeyRecordStructure; })(); @@ -71947,51 +115310,90 @@ $root.proto = (function() { /** * PreKeySignalMessage registrationId. - * @member {number} registrationId + * @member {number|null|undefined} registrationId * @memberof proto.PreKeySignalMessage * @instance */ - PreKeySignalMessage.prototype.registrationId = 0; + PreKeySignalMessage.prototype.registrationId = null; /** * PreKeySignalMessage preKeyId. - * @member {number} preKeyId + * @member {number|null|undefined} preKeyId * @memberof proto.PreKeySignalMessage * @instance */ - PreKeySignalMessage.prototype.preKeyId = 0; + PreKeySignalMessage.prototype.preKeyId = null; /** * PreKeySignalMessage signedPreKeyId. - * @member {number} signedPreKeyId + * @member {number|null|undefined} signedPreKeyId * @memberof proto.PreKeySignalMessage * @instance */ - PreKeySignalMessage.prototype.signedPreKeyId = 0; + PreKeySignalMessage.prototype.signedPreKeyId = null; /** * PreKeySignalMessage baseKey. - * @member {Uint8Array} baseKey + * @member {Uint8Array|null|undefined} baseKey * @memberof proto.PreKeySignalMessage * @instance */ - PreKeySignalMessage.prototype.baseKey = $util.newBuffer([]); + PreKeySignalMessage.prototype.baseKey = null; /** * PreKeySignalMessage identityKey. - * @member {Uint8Array} identityKey + * @member {Uint8Array|null|undefined} identityKey * @memberof proto.PreKeySignalMessage * @instance */ - PreKeySignalMessage.prototype.identityKey = $util.newBuffer([]); + PreKeySignalMessage.prototype.identityKey = null; /** * PreKeySignalMessage message. - * @member {Uint8Array} message + * @member {Uint8Array|null|undefined} message * @memberof proto.PreKeySignalMessage * @instance */ - PreKeySignalMessage.prototype.message = $util.newBuffer([]); + PreKeySignalMessage.prototype.message = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PreKeySignalMessage.prototype, "_registrationId", { + get: $util.oneOfGetter($oneOfFields = ["registrationId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PreKeySignalMessage.prototype, "_preKeyId", { + get: $util.oneOfGetter($oneOfFields = ["preKeyId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PreKeySignalMessage.prototype, "_signedPreKeyId", { + get: $util.oneOfGetter($oneOfFields = ["signedPreKeyId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PreKeySignalMessage.prototype, "_baseKey", { + get: $util.oneOfGetter($oneOfFields = ["baseKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PreKeySignalMessage.prototype, "_identityKey", { + get: $util.oneOfGetter($oneOfFields = ["identityKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PreKeySignalMessage.prototype, "_message", { + get: $util.oneOfGetter($oneOfFields = ["message"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new PreKeySignalMessage instance using the specified properties. @@ -72063,24 +115465,30 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 5: - message.registrationId = reader.uint32(); - break; - case 1: - message.preKeyId = reader.uint32(); - break; - case 6: - message.signedPreKeyId = reader.uint32(); - break; - case 2: - message.baseKey = reader.bytes(); - break; - case 3: - message.identityKey = reader.bytes(); - break; - case 4: - message.message = reader.bytes(); - break; + case 5: { + message.registrationId = reader.uint32(); + break; + } + case 1: { + message.preKeyId = reader.uint32(); + break; + } + case 6: { + message.signedPreKeyId = reader.uint32(); + break; + } + case 2: { + message.baseKey = reader.bytes(); + break; + } + case 3: { + message.identityKey = reader.bytes(); + break; + } + case 4: { + message.message = reader.bytes(); + break; + } default: reader.skipType(tag & 7); break; @@ -72116,24 +115524,37 @@ $root.proto = (function() { PreKeySignalMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.registrationId != null && message.hasOwnProperty("registrationId")) + var properties = {}; + if (message.registrationId != null && message.hasOwnProperty("registrationId")) { + properties._registrationId = 1; if (!$util.isInteger(message.registrationId)) return "registrationId: integer expected"; - if (message.preKeyId != null && message.hasOwnProperty("preKeyId")) + } + if (message.preKeyId != null && message.hasOwnProperty("preKeyId")) { + properties._preKeyId = 1; if (!$util.isInteger(message.preKeyId)) return "preKeyId: integer expected"; - if (message.signedPreKeyId != null && message.hasOwnProperty("signedPreKeyId")) + } + if (message.signedPreKeyId != null && message.hasOwnProperty("signedPreKeyId")) { + properties._signedPreKeyId = 1; if (!$util.isInteger(message.signedPreKeyId)) return "signedPreKeyId: integer expected"; - if (message.baseKey != null && message.hasOwnProperty("baseKey")) + } + if (message.baseKey != null && message.hasOwnProperty("baseKey")) { + properties._baseKey = 1; if (!(message.baseKey && typeof message.baseKey.length === "number" || $util.isString(message.baseKey))) return "baseKey: buffer expected"; - if (message.identityKey != null && message.hasOwnProperty("identityKey")) + } + if (message.identityKey != null && message.hasOwnProperty("identityKey")) { + properties._identityKey = 1; if (!(message.identityKey && typeof message.identityKey.length === "number" || $util.isString(message.identityKey))) return "identityKey: buffer expected"; - if (message.message != null && message.hasOwnProperty("message")) + } + if (message.message != null && message.hasOwnProperty("message")) { + properties._message = 1; if (!(message.message && typeof message.message.length === "number" || $util.isString(message.message))) return "message: buffer expected"; + } return null; }; @@ -72158,17 +115579,17 @@ $root.proto = (function() { if (object.baseKey != null) if (typeof object.baseKey === "string") $util.base64.decode(object.baseKey, message.baseKey = $util.newBuffer($util.base64.length(object.baseKey)), 0); - else if (object.baseKey.length) + else if (object.baseKey.length >= 0) message.baseKey = object.baseKey; if (object.identityKey != null) if (typeof object.identityKey === "string") $util.base64.decode(object.identityKey, message.identityKey = $util.newBuffer($util.base64.length(object.identityKey)), 0); - else if (object.identityKey.length) + else if (object.identityKey.length >= 0) message.identityKey = object.identityKey; if (object.message != null) if (typeof object.message === "string") $util.base64.decode(object.message, message.message = $util.newBuffer($util.base64.length(object.message)), 0); - else if (object.message.length) + else if (object.message.length >= 0) message.message = object.message; return message; }; @@ -72186,44 +115607,36 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.preKeyId = 0; - if (options.bytes === String) - object.baseKey = ""; - else { - object.baseKey = []; - if (options.bytes !== Array) - object.baseKey = $util.newBuffer(object.baseKey); - } - if (options.bytes === String) - object.identityKey = ""; - else { - object.identityKey = []; - if (options.bytes !== Array) - object.identityKey = $util.newBuffer(object.identityKey); - } - if (options.bytes === String) - object.message = ""; - else { - object.message = []; - if (options.bytes !== Array) - object.message = $util.newBuffer(object.message); - } - object.registrationId = 0; - object.signedPreKeyId = 0; - } - if (message.preKeyId != null && message.hasOwnProperty("preKeyId")) + if (message.preKeyId != null && message.hasOwnProperty("preKeyId")) { object.preKeyId = message.preKeyId; - if (message.baseKey != null && message.hasOwnProperty("baseKey")) + if (options.oneofs) + object._preKeyId = "preKeyId"; + } + if (message.baseKey != null && message.hasOwnProperty("baseKey")) { object.baseKey = options.bytes === String ? $util.base64.encode(message.baseKey, 0, message.baseKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.baseKey) : message.baseKey; - if (message.identityKey != null && message.hasOwnProperty("identityKey")) + if (options.oneofs) + object._baseKey = "baseKey"; + } + if (message.identityKey != null && message.hasOwnProperty("identityKey")) { object.identityKey = options.bytes === String ? $util.base64.encode(message.identityKey, 0, message.identityKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.identityKey) : message.identityKey; - if (message.message != null && message.hasOwnProperty("message")) + if (options.oneofs) + object._identityKey = "identityKey"; + } + if (message.message != null && message.hasOwnProperty("message")) { object.message = options.bytes === String ? $util.base64.encode(message.message, 0, message.message.length) : options.bytes === Array ? Array.prototype.slice.call(message.message) : message.message; - if (message.registrationId != null && message.hasOwnProperty("registrationId")) + if (options.oneofs) + object._message = "message"; + } + if (message.registrationId != null && message.hasOwnProperty("registrationId")) { object.registrationId = message.registrationId; - if (message.signedPreKeyId != null && message.hasOwnProperty("signedPreKeyId")) + if (options.oneofs) + object._registrationId = "registrationId"; + } + if (message.signedPreKeyId != null && message.hasOwnProperty("signedPreKeyId")) { object.signedPreKeyId = message.signedPreKeyId; + if (options.oneofs) + object._signedPreKeyId = "signedPreKeyId"; + } return object; }; @@ -72238,6 +115651,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for PreKeySignalMessage + * @function getTypeUrl + * @memberof proto.PreKeySignalMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PreKeySignalMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.PreKeySignalMessage"; + }; + return PreKeySignalMessage; })(); @@ -72267,11 +115695,20 @@ $root.proto = (function() { /** * PremiumMessageInfo serverCampaignId. - * @member {string} serverCampaignId + * @member {string|null|undefined} serverCampaignId * @memberof proto.PremiumMessageInfo * @instance */ - PremiumMessageInfo.prototype.serverCampaignId = ""; + PremiumMessageInfo.prototype.serverCampaignId = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PremiumMessageInfo.prototype, "_serverCampaignId", { + get: $util.oneOfGetter($oneOfFields = ["serverCampaignId"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new PremiumMessageInfo instance using the specified properties. @@ -72333,9 +115770,10 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.serverCampaignId = reader.string(); - break; + case 1: { + message.serverCampaignId = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -72371,9 +115809,12 @@ $root.proto = (function() { PremiumMessageInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.serverCampaignId != null && message.hasOwnProperty("serverCampaignId")) + var properties = {}; + if (message.serverCampaignId != null && message.hasOwnProperty("serverCampaignId")) { + properties._serverCampaignId = 1; if (!$util.isString(message.serverCampaignId)) return "serverCampaignId: string expected"; + } return null; }; @@ -72407,10 +115848,11 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) - object.serverCampaignId = ""; - if (message.serverCampaignId != null && message.hasOwnProperty("serverCampaignId")) + if (message.serverCampaignId != null && message.hasOwnProperty("serverCampaignId")) { object.serverCampaignId = message.serverCampaignId; + if (options.oneofs) + object._serverCampaignId = "serverCampaignId"; + } return object; }; @@ -72425,9 +115867,1067 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for PremiumMessageInfo + * @function getTypeUrl + * @memberof proto.PremiumMessageInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PremiumMessageInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.PremiumMessageInfo"; + }; + return PremiumMessageInfo; })(); + proto.PrimaryEphemeralIdentity = (function() { + + /** + * Properties of a PrimaryEphemeralIdentity. + * @memberof proto + * @interface IPrimaryEphemeralIdentity + * @property {Uint8Array|null} [publicKey] PrimaryEphemeralIdentity publicKey + * @property {Uint8Array|null} [nonce] PrimaryEphemeralIdentity nonce + */ + + /** + * Constructs a new PrimaryEphemeralIdentity. + * @memberof proto + * @classdesc Represents a PrimaryEphemeralIdentity. + * @implements IPrimaryEphemeralIdentity + * @constructor + * @param {proto.IPrimaryEphemeralIdentity=} [properties] Properties to set + */ + function PrimaryEphemeralIdentity(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PrimaryEphemeralIdentity publicKey. + * @member {Uint8Array|null|undefined} publicKey + * @memberof proto.PrimaryEphemeralIdentity + * @instance + */ + PrimaryEphemeralIdentity.prototype.publicKey = null; + + /** + * PrimaryEphemeralIdentity nonce. + * @member {Uint8Array|null|undefined} nonce + * @memberof proto.PrimaryEphemeralIdentity + * @instance + */ + PrimaryEphemeralIdentity.prototype.nonce = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PrimaryEphemeralIdentity.prototype, "_publicKey", { + get: $util.oneOfGetter($oneOfFields = ["publicKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PrimaryEphemeralIdentity.prototype, "_nonce", { + get: $util.oneOfGetter($oneOfFields = ["nonce"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new PrimaryEphemeralIdentity instance using the specified properties. + * @function create + * @memberof proto.PrimaryEphemeralIdentity + * @static + * @param {proto.IPrimaryEphemeralIdentity=} [properties] Properties to set + * @returns {proto.PrimaryEphemeralIdentity} PrimaryEphemeralIdentity instance + */ + PrimaryEphemeralIdentity.create = function create(properties) { + return new PrimaryEphemeralIdentity(properties); + }; + + /** + * Encodes the specified PrimaryEphemeralIdentity message. Does not implicitly {@link proto.PrimaryEphemeralIdentity.verify|verify} messages. + * @function encode + * @memberof proto.PrimaryEphemeralIdentity + * @static + * @param {proto.IPrimaryEphemeralIdentity} message PrimaryEphemeralIdentity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PrimaryEphemeralIdentity.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.publicKey != null && Object.hasOwnProperty.call(message, "publicKey")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.publicKey); + if (message.nonce != null && Object.hasOwnProperty.call(message, "nonce")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.nonce); + return writer; + }; + + /** + * Encodes the specified PrimaryEphemeralIdentity message, length delimited. Does not implicitly {@link proto.PrimaryEphemeralIdentity.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.PrimaryEphemeralIdentity + * @static + * @param {proto.IPrimaryEphemeralIdentity} message PrimaryEphemeralIdentity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PrimaryEphemeralIdentity.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PrimaryEphemeralIdentity message from the specified reader or buffer. + * @function decode + * @memberof proto.PrimaryEphemeralIdentity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.PrimaryEphemeralIdentity} PrimaryEphemeralIdentity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PrimaryEphemeralIdentity.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.PrimaryEphemeralIdentity(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.publicKey = reader.bytes(); + break; + } + case 2: { + message.nonce = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PrimaryEphemeralIdentity message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.PrimaryEphemeralIdentity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.PrimaryEphemeralIdentity} PrimaryEphemeralIdentity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PrimaryEphemeralIdentity.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PrimaryEphemeralIdentity message. + * @function verify + * @memberof proto.PrimaryEphemeralIdentity + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PrimaryEphemeralIdentity.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.publicKey != null && message.hasOwnProperty("publicKey")) { + properties._publicKey = 1; + if (!(message.publicKey && typeof message.publicKey.length === "number" || $util.isString(message.publicKey))) + return "publicKey: buffer expected"; + } + if (message.nonce != null && message.hasOwnProperty("nonce")) { + properties._nonce = 1; + if (!(message.nonce && typeof message.nonce.length === "number" || $util.isString(message.nonce))) + return "nonce: buffer expected"; + } + return null; + }; + + /** + * Creates a PrimaryEphemeralIdentity message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.PrimaryEphemeralIdentity + * @static + * @param {Object.} object Plain object + * @returns {proto.PrimaryEphemeralIdentity} PrimaryEphemeralIdentity + */ + PrimaryEphemeralIdentity.fromObject = function fromObject(object) { + if (object instanceof $root.proto.PrimaryEphemeralIdentity) + return object; + var message = new $root.proto.PrimaryEphemeralIdentity(); + if (object.publicKey != null) + if (typeof object.publicKey === "string") + $util.base64.decode(object.publicKey, message.publicKey = $util.newBuffer($util.base64.length(object.publicKey)), 0); + else if (object.publicKey.length >= 0) + message.publicKey = object.publicKey; + if (object.nonce != null) + if (typeof object.nonce === "string") + $util.base64.decode(object.nonce, message.nonce = $util.newBuffer($util.base64.length(object.nonce)), 0); + else if (object.nonce.length >= 0) + message.nonce = object.nonce; + return message; + }; + + /** + * Creates a plain object from a PrimaryEphemeralIdentity message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.PrimaryEphemeralIdentity + * @static + * @param {proto.PrimaryEphemeralIdentity} message PrimaryEphemeralIdentity + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PrimaryEphemeralIdentity.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.publicKey != null && message.hasOwnProperty("publicKey")) { + object.publicKey = options.bytes === String ? $util.base64.encode(message.publicKey, 0, message.publicKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.publicKey) : message.publicKey; + if (options.oneofs) + object._publicKey = "publicKey"; + } + if (message.nonce != null && message.hasOwnProperty("nonce")) { + object.nonce = options.bytes === String ? $util.base64.encode(message.nonce, 0, message.nonce.length) : options.bytes === Array ? Array.prototype.slice.call(message.nonce) : message.nonce; + if (options.oneofs) + object._nonce = "nonce"; + } + return object; + }; + + /** + * Converts this PrimaryEphemeralIdentity to JSON. + * @function toJSON + * @memberof proto.PrimaryEphemeralIdentity + * @instance + * @returns {Object.} JSON object + */ + PrimaryEphemeralIdentity.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PrimaryEphemeralIdentity + * @function getTypeUrl + * @memberof proto.PrimaryEphemeralIdentity + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PrimaryEphemeralIdentity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.PrimaryEphemeralIdentity"; + }; + + return PrimaryEphemeralIdentity; + })(); + + /** + * PrivacySystemMessage enum. + * @name proto.PrivacySystemMessage + * @enum {number} + * @property {number} E2EE_MSG=1 E2EE_MSG value + * @property {number} NE2EE_SELF=2 NE2EE_SELF value + * @property {number} NE2EE_OTHER=3 NE2EE_OTHER value + */ + proto.PrivacySystemMessage = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "E2EE_MSG"] = 1; + values[valuesById[2] = "NE2EE_SELF"] = 2; + values[valuesById[3] = "NE2EE_OTHER"] = 3; + return values; + })(); + + proto.ProcessedVideo = (function() { + + /** + * Properties of a ProcessedVideo. + * @memberof proto + * @interface IProcessedVideo + * @property {string|null} [directPath] ProcessedVideo directPath + * @property {Uint8Array|null} [fileSha256] ProcessedVideo fileSha256 + * @property {number|null} [height] ProcessedVideo height + * @property {number|null} [width] ProcessedVideo width + * @property {number|Long|null} [fileLength] ProcessedVideo fileLength + * @property {number|null} [bitrate] ProcessedVideo bitrate + * @property {proto.ProcessedVideo.VideoQuality|null} [quality] ProcessedVideo quality + * @property {Array.|null} [capabilities] ProcessedVideo capabilities + */ + + /** + * Constructs a new ProcessedVideo. + * @memberof proto + * @classdesc Represents a ProcessedVideo. + * @implements IProcessedVideo + * @constructor + * @param {proto.IProcessedVideo=} [properties] Properties to set + */ + function ProcessedVideo(properties) { + this.capabilities = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ProcessedVideo directPath. + * @member {string|null|undefined} directPath + * @memberof proto.ProcessedVideo + * @instance + */ + ProcessedVideo.prototype.directPath = null; + + /** + * ProcessedVideo fileSha256. + * @member {Uint8Array|null|undefined} fileSha256 + * @memberof proto.ProcessedVideo + * @instance + */ + ProcessedVideo.prototype.fileSha256 = null; + + /** + * ProcessedVideo height. + * @member {number|null|undefined} height + * @memberof proto.ProcessedVideo + * @instance + */ + ProcessedVideo.prototype.height = null; + + /** + * ProcessedVideo width. + * @member {number|null|undefined} width + * @memberof proto.ProcessedVideo + * @instance + */ + ProcessedVideo.prototype.width = null; + + /** + * ProcessedVideo fileLength. + * @member {number|Long|null|undefined} fileLength + * @memberof proto.ProcessedVideo + * @instance + */ + ProcessedVideo.prototype.fileLength = null; + + /** + * ProcessedVideo bitrate. + * @member {number|null|undefined} bitrate + * @memberof proto.ProcessedVideo + * @instance + */ + ProcessedVideo.prototype.bitrate = null; + + /** + * ProcessedVideo quality. + * @member {proto.ProcessedVideo.VideoQuality|null|undefined} quality + * @memberof proto.ProcessedVideo + * @instance + */ + ProcessedVideo.prototype.quality = null; + + /** + * ProcessedVideo capabilities. + * @member {Array.} capabilities + * @memberof proto.ProcessedVideo + * @instance + */ + ProcessedVideo.prototype.capabilities = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ProcessedVideo.prototype, "_directPath", { + get: $util.oneOfGetter($oneOfFields = ["directPath"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ProcessedVideo.prototype, "_fileSha256", { + get: $util.oneOfGetter($oneOfFields = ["fileSha256"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ProcessedVideo.prototype, "_height", { + get: $util.oneOfGetter($oneOfFields = ["height"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ProcessedVideo.prototype, "_width", { + get: $util.oneOfGetter($oneOfFields = ["width"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ProcessedVideo.prototype, "_fileLength", { + get: $util.oneOfGetter($oneOfFields = ["fileLength"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ProcessedVideo.prototype, "_bitrate", { + get: $util.oneOfGetter($oneOfFields = ["bitrate"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ProcessedVideo.prototype, "_quality", { + get: $util.oneOfGetter($oneOfFields = ["quality"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ProcessedVideo instance using the specified properties. + * @function create + * @memberof proto.ProcessedVideo + * @static + * @param {proto.IProcessedVideo=} [properties] Properties to set + * @returns {proto.ProcessedVideo} ProcessedVideo instance + */ + ProcessedVideo.create = function create(properties) { + return new ProcessedVideo(properties); + }; + + /** + * Encodes the specified ProcessedVideo message. Does not implicitly {@link proto.ProcessedVideo.verify|verify} messages. + * @function encode + * @memberof proto.ProcessedVideo + * @static + * @param {proto.IProcessedVideo} message ProcessedVideo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProcessedVideo.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.fileSha256 != null && Object.hasOwnProperty.call(message, "fileSha256")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.fileSha256); + if (message.height != null && Object.hasOwnProperty.call(message, "height")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.height); + if (message.width != null && Object.hasOwnProperty.call(message, "width")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.width); + if (message.fileLength != null && Object.hasOwnProperty.call(message, "fileLength")) + writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.fileLength); + if (message.bitrate != null && Object.hasOwnProperty.call(message, "bitrate")) + writer.uint32(/* id 6, wireType 0 =*/48).uint32(message.bitrate); + if (message.quality != null && Object.hasOwnProperty.call(message, "quality")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.quality); + if (message.capabilities != null && message.capabilities.length) + for (var i = 0; i < message.capabilities.length; ++i) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.capabilities[i]); + return writer; + }; + + /** + * Encodes the specified ProcessedVideo message, length delimited. Does not implicitly {@link proto.ProcessedVideo.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.ProcessedVideo + * @static + * @param {proto.IProcessedVideo} message ProcessedVideo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProcessedVideo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ProcessedVideo message from the specified reader or buffer. + * @function decode + * @memberof proto.ProcessedVideo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.ProcessedVideo} ProcessedVideo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProcessedVideo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.ProcessedVideo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.directPath = reader.string(); + break; + } + case 2: { + message.fileSha256 = reader.bytes(); + break; + } + case 3: { + message.height = reader.uint32(); + break; + } + case 4: { + message.width = reader.uint32(); + break; + } + case 5: { + message.fileLength = reader.uint64(); + break; + } + case 6: { + message.bitrate = reader.uint32(); + break; + } + case 7: { + message.quality = reader.int32(); + break; + } + case 8: { + if (!(message.capabilities && message.capabilities.length)) + message.capabilities = []; + message.capabilities.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ProcessedVideo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.ProcessedVideo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.ProcessedVideo} ProcessedVideo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProcessedVideo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ProcessedVideo message. + * @function verify + * @memberof proto.ProcessedVideo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ProcessedVideo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.directPath != null && message.hasOwnProperty("directPath")) { + properties._directPath = 1; + if (!$util.isString(message.directPath)) + return "directPath: string expected"; + } + if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) { + properties._fileSha256 = 1; + if (!(message.fileSha256 && typeof message.fileSha256.length === "number" || $util.isString(message.fileSha256))) + return "fileSha256: buffer expected"; + } + if (message.height != null && message.hasOwnProperty("height")) { + properties._height = 1; + if (!$util.isInteger(message.height)) + return "height: integer expected"; + } + if (message.width != null && message.hasOwnProperty("width")) { + properties._width = 1; + if (!$util.isInteger(message.width)) + return "width: integer expected"; + } + if (message.fileLength != null && message.hasOwnProperty("fileLength")) { + properties._fileLength = 1; + if (!$util.isInteger(message.fileLength) && !(message.fileLength && $util.isInteger(message.fileLength.low) && $util.isInteger(message.fileLength.high))) + return "fileLength: integer|Long expected"; + } + if (message.bitrate != null && message.hasOwnProperty("bitrate")) { + properties._bitrate = 1; + if (!$util.isInteger(message.bitrate)) + return "bitrate: integer expected"; + } + if (message.quality != null && message.hasOwnProperty("quality")) { + properties._quality = 1; + switch (message.quality) { + default: + return "quality: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + } + if (message.capabilities != null && message.hasOwnProperty("capabilities")) { + if (!Array.isArray(message.capabilities)) + return "capabilities: array expected"; + for (var i = 0; i < message.capabilities.length; ++i) + if (!$util.isString(message.capabilities[i])) + return "capabilities: string[] expected"; + } + return null; + }; + + /** + * Creates a ProcessedVideo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.ProcessedVideo + * @static + * @param {Object.} object Plain object + * @returns {proto.ProcessedVideo} ProcessedVideo + */ + ProcessedVideo.fromObject = function fromObject(object) { + if (object instanceof $root.proto.ProcessedVideo) + return object; + var message = new $root.proto.ProcessedVideo(); + if (object.directPath != null) + message.directPath = String(object.directPath); + 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 >= 0) + message.fileSha256 = object.fileSha256; + if (object.height != null) + message.height = object.height >>> 0; + if (object.width != null) + message.width = object.width >>> 0; + 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.bitrate != null) + message.bitrate = object.bitrate >>> 0; + switch (object.quality) { + default: + if (typeof object.quality === "number") { + message.quality = object.quality; + break; + } + break; + case "UNDEFINED": + case 0: + message.quality = 0; + break; + case "LOW": + case 1: + message.quality = 1; + break; + case "MID": + case 2: + message.quality = 2; + break; + case "HIGH": + case 3: + message.quality = 3; + break; + } + if (object.capabilities) { + if (!Array.isArray(object.capabilities)) + throw TypeError(".proto.ProcessedVideo.capabilities: array expected"); + message.capabilities = []; + for (var i = 0; i < object.capabilities.length; ++i) + message.capabilities[i] = String(object.capabilities[i]); + } + return message; + }; + + /** + * Creates a plain object from a ProcessedVideo message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.ProcessedVideo + * @static + * @param {proto.ProcessedVideo} message ProcessedVideo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ProcessedVideo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.capabilities = []; + if (message.directPath != null && message.hasOwnProperty("directPath")) { + object.directPath = message.directPath; + if (options.oneofs) + object._directPath = "directPath"; + } + 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 (options.oneofs) + object._fileSha256 = "fileSha256"; + } + if (message.height != null && message.hasOwnProperty("height")) { + object.height = message.height; + if (options.oneofs) + object._height = "height"; + } + if (message.width != null && message.hasOwnProperty("width")) { + object.width = message.width; + if (options.oneofs) + object._width = "width"; + } + 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 (options.oneofs) + object._fileLength = "fileLength"; + } + if (message.bitrate != null && message.hasOwnProperty("bitrate")) { + object.bitrate = message.bitrate; + if (options.oneofs) + object._bitrate = "bitrate"; + } + if (message.quality != null && message.hasOwnProperty("quality")) { + object.quality = options.enums === String ? $root.proto.ProcessedVideo.VideoQuality[message.quality] === undefined ? message.quality : $root.proto.ProcessedVideo.VideoQuality[message.quality] : message.quality; + if (options.oneofs) + object._quality = "quality"; + } + if (message.capabilities && message.capabilities.length) { + object.capabilities = []; + for (var j = 0; j < message.capabilities.length; ++j) + object.capabilities[j] = message.capabilities[j]; + } + return object; + }; + + /** + * Converts this ProcessedVideo to JSON. + * @function toJSON + * @memberof proto.ProcessedVideo + * @instance + * @returns {Object.} JSON object + */ + ProcessedVideo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ProcessedVideo + * @function getTypeUrl + * @memberof proto.ProcessedVideo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ProcessedVideo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.ProcessedVideo"; + }; + + /** + * VideoQuality enum. + * @name proto.ProcessedVideo.VideoQuality + * @enum {number} + * @property {number} UNDEFINED=0 UNDEFINED value + * @property {number} LOW=1 LOW value + * @property {number} MID=2 MID value + * @property {number} HIGH=3 HIGH value + */ + ProcessedVideo.VideoQuality = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNDEFINED"] = 0; + values[valuesById[1] = "LOW"] = 1; + values[valuesById[2] = "MID"] = 2; + values[valuesById[3] = "HIGH"] = 3; + return values; + })(); + + return ProcessedVideo; + })(); + + proto.ProloguePayload = (function() { + + /** + * Properties of a ProloguePayload. + * @memberof proto + * @interface IProloguePayload + * @property {Uint8Array|null} [companionEphemeralIdentity] ProloguePayload companionEphemeralIdentity + * @property {proto.ICompanionCommitment|null} [commitment] ProloguePayload commitment + */ + + /** + * Constructs a new ProloguePayload. + * @memberof proto + * @classdesc Represents a ProloguePayload. + * @implements IProloguePayload + * @constructor + * @param {proto.IProloguePayload=} [properties] Properties to set + */ + function ProloguePayload(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ProloguePayload companionEphemeralIdentity. + * @member {Uint8Array|null|undefined} companionEphemeralIdentity + * @memberof proto.ProloguePayload + * @instance + */ + ProloguePayload.prototype.companionEphemeralIdentity = null; + + /** + * ProloguePayload commitment. + * @member {proto.ICompanionCommitment|null|undefined} commitment + * @memberof proto.ProloguePayload + * @instance + */ + ProloguePayload.prototype.commitment = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ProloguePayload.prototype, "_companionEphemeralIdentity", { + get: $util.oneOfGetter($oneOfFields = ["companionEphemeralIdentity"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ProloguePayload.prototype, "_commitment", { + get: $util.oneOfGetter($oneOfFields = ["commitment"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ProloguePayload instance using the specified properties. + * @function create + * @memberof proto.ProloguePayload + * @static + * @param {proto.IProloguePayload=} [properties] Properties to set + * @returns {proto.ProloguePayload} ProloguePayload instance + */ + ProloguePayload.create = function create(properties) { + return new ProloguePayload(properties); + }; + + /** + * Encodes the specified ProloguePayload message. Does not implicitly {@link proto.ProloguePayload.verify|verify} messages. + * @function encode + * @memberof proto.ProloguePayload + * @static + * @param {proto.IProloguePayload} message ProloguePayload message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProloguePayload.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.companionEphemeralIdentity != null && Object.hasOwnProperty.call(message, "companionEphemeralIdentity")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.companionEphemeralIdentity); + if (message.commitment != null && Object.hasOwnProperty.call(message, "commitment")) + $root.proto.CompanionCommitment.encode(message.commitment, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ProloguePayload message, length delimited. Does not implicitly {@link proto.ProloguePayload.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.ProloguePayload + * @static + * @param {proto.IProloguePayload} message ProloguePayload message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProloguePayload.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ProloguePayload message from the specified reader or buffer. + * @function decode + * @memberof proto.ProloguePayload + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.ProloguePayload} ProloguePayload + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProloguePayload.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.ProloguePayload(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.companionEphemeralIdentity = reader.bytes(); + break; + } + case 2: { + message.commitment = $root.proto.CompanionCommitment.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ProloguePayload message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.ProloguePayload + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.ProloguePayload} ProloguePayload + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProloguePayload.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ProloguePayload message. + * @function verify + * @memberof proto.ProloguePayload + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ProloguePayload.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.companionEphemeralIdentity != null && message.hasOwnProperty("companionEphemeralIdentity")) { + properties._companionEphemeralIdentity = 1; + if (!(message.companionEphemeralIdentity && typeof message.companionEphemeralIdentity.length === "number" || $util.isString(message.companionEphemeralIdentity))) + return "companionEphemeralIdentity: buffer expected"; + } + if (message.commitment != null && message.hasOwnProperty("commitment")) { + properties._commitment = 1; + { + var error = $root.proto.CompanionCommitment.verify(message.commitment); + if (error) + return "commitment." + error; + } + } + return null; + }; + + /** + * Creates a ProloguePayload message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.ProloguePayload + * @static + * @param {Object.} object Plain object + * @returns {proto.ProloguePayload} ProloguePayload + */ + ProloguePayload.fromObject = function fromObject(object) { + if (object instanceof $root.proto.ProloguePayload) + return object; + var message = new $root.proto.ProloguePayload(); + if (object.companionEphemeralIdentity != null) + if (typeof object.companionEphemeralIdentity === "string") + $util.base64.decode(object.companionEphemeralIdentity, message.companionEphemeralIdentity = $util.newBuffer($util.base64.length(object.companionEphemeralIdentity)), 0); + else if (object.companionEphemeralIdentity.length >= 0) + message.companionEphemeralIdentity = object.companionEphemeralIdentity; + if (object.commitment != null) { + if (typeof object.commitment !== "object") + throw TypeError(".proto.ProloguePayload.commitment: object expected"); + message.commitment = $root.proto.CompanionCommitment.fromObject(object.commitment); + } + return message; + }; + + /** + * Creates a plain object from a ProloguePayload message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.ProloguePayload + * @static + * @param {proto.ProloguePayload} message ProloguePayload + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ProloguePayload.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.companionEphemeralIdentity != null && message.hasOwnProperty("companionEphemeralIdentity")) { + object.companionEphemeralIdentity = options.bytes === String ? $util.base64.encode(message.companionEphemeralIdentity, 0, message.companionEphemeralIdentity.length) : options.bytes === Array ? Array.prototype.slice.call(message.companionEphemeralIdentity) : message.companionEphemeralIdentity; + if (options.oneofs) + object._companionEphemeralIdentity = "companionEphemeralIdentity"; + } + if (message.commitment != null && message.hasOwnProperty("commitment")) { + object.commitment = $root.proto.CompanionCommitment.toObject(message.commitment, options); + if (options.oneofs) + object._commitment = "commitment"; + } + return object; + }; + + /** + * Converts this ProloguePayload to JSON. + * @function toJSON + * @memberof proto.ProloguePayload + * @instance + * @returns {Object.} JSON object + */ + ProloguePayload.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ProloguePayload + * @function getTypeUrl + * @memberof proto.ProloguePayload + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ProloguePayload.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.ProloguePayload"; + }; + + return ProloguePayload; + })(); + proto.Pushname = (function() { /** @@ -72455,19 +116955,34 @@ $root.proto = (function() { /** * Pushname id. - * @member {string} id + * @member {string|null|undefined} id * @memberof proto.Pushname * @instance */ - Pushname.prototype.id = ""; + Pushname.prototype.id = null; /** * Pushname pushname. - * @member {string} pushname + * @member {string|null|undefined} pushname * @memberof proto.Pushname * @instance */ - Pushname.prototype.pushname = ""; + Pushname.prototype.pushname = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Pushname.prototype, "_id", { + get: $util.oneOfGetter($oneOfFields = ["id"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Pushname.prototype, "_pushname", { + get: $util.oneOfGetter($oneOfFields = ["pushname"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new Pushname instance using the specified properties. @@ -72531,12 +117046,14 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.id = reader.string(); - break; - case 2: - message.pushname = reader.string(); - break; + case 1: { + message.id = reader.string(); + break; + } + case 2: { + message.pushname = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -72572,12 +117089,17 @@ $root.proto = (function() { Pushname.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.id != null && message.hasOwnProperty("id")) + var properties = {}; + if (message.id != null && message.hasOwnProperty("id")) { + properties._id = 1; if (!$util.isString(message.id)) return "id: string expected"; - if (message.pushname != null && message.hasOwnProperty("pushname")) + } + if (message.pushname != null && message.hasOwnProperty("pushname")) { + properties._pushname = 1; if (!$util.isString(message.pushname)) return "pushname: string expected"; + } return null; }; @@ -72613,14 +117135,16 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.id = ""; - object.pushname = ""; - } - if (message.id != null && message.hasOwnProperty("id")) + if (message.id != null && message.hasOwnProperty("id")) { object.id = message.id; - if (message.pushname != null && message.hasOwnProperty("pushname")) + if (options.oneofs) + object._id = "id"; + } + if (message.pushname != null && message.hasOwnProperty("pushname")) { object.pushname = message.pushname; + if (options.oneofs) + object._pushname = "pushname"; + } return object; }; @@ -72635,1025 +117159,24 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Pushname + * @function getTypeUrl + * @memberof proto.Pushname + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Pushname.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Pushname"; + }; + return Pushname; })(); - proto.QP = (function() { - - /** - * Properties of a QP. - * @memberof proto - * @interface IQP - */ - - /** - * Constructs a new QP. - * @memberof proto - * @classdesc Represents a QP. - * @implements IQP - * @constructor - * @param {proto.IQP=} [properties] Properties to set - */ - function QP(properties) { - if (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 QP instance using the specified properties. - * @function create - * @memberof proto.QP - * @static - * @param {proto.IQP=} [properties] Properties to set - * @returns {proto.QP} QP instance - */ - QP.create = function create(properties) { - return new QP(properties); - }; - - /** - * Encodes the specified QP message. Does not implicitly {@link proto.QP.verify|verify} messages. - * @function encode - * @memberof proto.QP - * @static - * @param {proto.IQP} message QP message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QP.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified QP message, length delimited. Does not implicitly {@link proto.QP.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.QP - * @static - * @param {proto.IQP} message QP message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QP.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QP message from the specified reader or buffer. - * @function decode - * @memberof proto.QP - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.QP} QP - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QP.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.QP(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QP message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.QP - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.QP} QP - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QP.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QP message. - * @function verify - * @memberof proto.QP - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QP.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a QP message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.QP - * @static - * @param {Object.} object Plain object - * @returns {proto.QP} QP - */ - QP.fromObject = function fromObject(object) { - if (object instanceof $root.proto.QP) - return object; - return new $root.proto.QP(); - }; - - /** - * Creates a plain object from a QP message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.QP - * @static - * @param {proto.QP} message QP - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QP.toObject = function toObject() { - return {}; - }; - - /** - * Converts this QP to JSON. - * @function toJSON - * @memberof proto.QP - * @instance - * @returns {Object.} JSON object - */ - QP.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * ClauseType enum. - * @name proto.QP.ClauseType - * @enum {number} - * @property {number} AND=1 AND value - * @property {number} OR=2 OR value - * @property {number} NOR=3 NOR value - */ - QP.ClauseType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[1] = "AND"] = 1; - values[valuesById[2] = "OR"] = 2; - values[valuesById[3] = "NOR"] = 3; - return values; - })(); - - QP.Filter = (function() { - - /** - * Properties of a Filter. - * @memberof proto.QP - * @interface IFilter - * @property {string} filterName Filter filterName - * @property {Array.|null} [parameters] Filter parameters - * @property {proto.QP.FilterResult|null} [filterResult] Filter filterResult - * @property {proto.QP.FilterClientNotSupportedConfig} clientNotSupportedConfig Filter clientNotSupportedConfig - */ - - /** - * Constructs a new Filter. - * @memberof proto.QP - * @classdesc Represents a Filter. - * @implements IFilter - * @constructor - * @param {proto.QP.IFilter=} [properties] Properties to set - */ - function Filter(properties) { - this.parameters = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Filter filterName. - * @member {string} filterName - * @memberof proto.QP.Filter - * @instance - */ - Filter.prototype.filterName = ""; - - /** - * Filter parameters. - * @member {Array.} parameters - * @memberof proto.QP.Filter - * @instance - */ - Filter.prototype.parameters = $util.emptyArray; - - /** - * Filter filterResult. - * @member {proto.QP.FilterResult} filterResult - * @memberof proto.QP.Filter - * @instance - */ - Filter.prototype.filterResult = 1; - - /** - * Filter clientNotSupportedConfig. - * @member {proto.QP.FilterClientNotSupportedConfig} clientNotSupportedConfig - * @memberof proto.QP.Filter - * @instance - */ - Filter.prototype.clientNotSupportedConfig = 1; - - /** - * Creates a new Filter instance using the specified properties. - * @function create - * @memberof proto.QP.Filter - * @static - * @param {proto.QP.IFilter=} [properties] Properties to set - * @returns {proto.QP.Filter} Filter instance - */ - Filter.create = function create(properties) { - return new Filter(properties); - }; - - /** - * Encodes the specified Filter message. Does not implicitly {@link proto.QP.Filter.verify|verify} messages. - * @function encode - * @memberof proto.QP.Filter - * @static - * @param {proto.QP.IFilter} message Filter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Filter.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - writer.uint32(/* id 1, wireType 2 =*/10).string(message.filterName); - if (message.parameters != null && message.parameters.length) - for (var i = 0; i < message.parameters.length; ++i) - $root.proto.QP.FilterParameters.encode(message.parameters[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.filterResult != null && Object.hasOwnProperty.call(message, "filterResult")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.filterResult); - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.clientNotSupportedConfig); - return writer; - }; - - /** - * Encodes the specified Filter message, length delimited. Does not implicitly {@link proto.QP.Filter.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.QP.Filter - * @static - * @param {proto.QP.IFilter} message Filter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Filter.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Filter message from the specified reader or buffer. - * @function decode - * @memberof proto.QP.Filter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.QP.Filter} Filter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Filter.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.QP.Filter(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.filterName = reader.string(); - break; - case 2: - if (!(message.parameters && message.parameters.length)) - message.parameters = []; - message.parameters.push($root.proto.QP.FilterParameters.decode(reader, reader.uint32())); - break; - case 3: - message.filterResult = reader.int32(); - break; - case 4: - message.clientNotSupportedConfig = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - if (!message.hasOwnProperty("filterName")) - throw $util.ProtocolError("missing required 'filterName'", { instance: message }); - if (!message.hasOwnProperty("clientNotSupportedConfig")) - throw $util.ProtocolError("missing required 'clientNotSupportedConfig'", { instance: message }); - return message; - }; - - /** - * Decodes a Filter message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.QP.Filter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.QP.Filter} Filter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Filter.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Filter message. - * @function verify - * @memberof proto.QP.Filter - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Filter.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (!$util.isString(message.filterName)) - return "filterName: string expected"; - if (message.parameters != null && message.hasOwnProperty("parameters")) { - if (!Array.isArray(message.parameters)) - return "parameters: array expected"; - for (var i = 0; i < message.parameters.length; ++i) { - var error = $root.proto.QP.FilterParameters.verify(message.parameters[i]); - if (error) - return "parameters." + error; - } - } - if (message.filterResult != null && message.hasOwnProperty("filterResult")) - switch (message.filterResult) { - default: - return "filterResult: enum value expected"; - case 1: - case 2: - case 3: - break; - } - switch (message.clientNotSupportedConfig) { - default: - return "clientNotSupportedConfig: enum value expected"; - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates a Filter message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.QP.Filter - * @static - * @param {Object.} object Plain object - * @returns {proto.QP.Filter} Filter - */ - Filter.fromObject = function fromObject(object) { - if (object instanceof $root.proto.QP.Filter) - return object; - var message = new $root.proto.QP.Filter(); - if (object.filterName != null) - message.filterName = String(object.filterName); - if (object.parameters) { - if (!Array.isArray(object.parameters)) - throw TypeError(".proto.QP.Filter.parameters: array expected"); - message.parameters = []; - for (var i = 0; i < object.parameters.length; ++i) { - if (typeof object.parameters[i] !== "object") - throw TypeError(".proto.QP.Filter.parameters: object expected"); - message.parameters[i] = $root.proto.QP.FilterParameters.fromObject(object.parameters[i]); - } - } - switch (object.filterResult) { - case "TRUE": - case 1: - message.filterResult = 1; - break; - case "FALSE": - case 2: - message.filterResult = 2; - break; - case "UNKNOWN": - case 3: - message.filterResult = 3; - break; - } - switch (object.clientNotSupportedConfig) { - case "PASS_BY_DEFAULT": - case 1: - message.clientNotSupportedConfig = 1; - break; - case "FAIL_BY_DEFAULT": - case 2: - message.clientNotSupportedConfig = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a Filter message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.QP.Filter - * @static - * @param {proto.QP.Filter} message Filter - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Filter.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.parameters = []; - if (options.defaults) { - object.filterName = ""; - object.filterResult = options.enums === String ? "TRUE" : 1; - object.clientNotSupportedConfig = options.enums === String ? "PASS_BY_DEFAULT" : 1; - } - if (message.filterName != null && message.hasOwnProperty("filterName")) - object.filterName = message.filterName; - if (message.parameters && message.parameters.length) { - object.parameters = []; - for (var j = 0; j < message.parameters.length; ++j) - object.parameters[j] = $root.proto.QP.FilterParameters.toObject(message.parameters[j], options); - } - if (message.filterResult != null && message.hasOwnProperty("filterResult")) - object.filterResult = options.enums === String ? $root.proto.QP.FilterResult[message.filterResult] : message.filterResult; - if (message.clientNotSupportedConfig != null && message.hasOwnProperty("clientNotSupportedConfig")) - object.clientNotSupportedConfig = options.enums === String ? $root.proto.QP.FilterClientNotSupportedConfig[message.clientNotSupportedConfig] : message.clientNotSupportedConfig; - return object; - }; - - /** - * Converts this Filter to JSON. - * @function toJSON - * @memberof proto.QP.Filter - * @instance - * @returns {Object.} JSON object - */ - Filter.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Filter; - })(); - - QP.FilterClause = (function() { - - /** - * Properties of a FilterClause. - * @memberof proto.QP - * @interface IFilterClause - * @property {proto.QP.ClauseType} clauseType FilterClause clauseType - * @property {Array.|null} [clauses] FilterClause clauses - * @property {Array.|null} [filters] FilterClause filters - */ - - /** - * Constructs a new FilterClause. - * @memberof proto.QP - * @classdesc Represents a FilterClause. - * @implements IFilterClause - * @constructor - * @param {proto.QP.IFilterClause=} [properties] Properties to set - */ - function FilterClause(properties) { - this.clauses = []; - this.filters = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FilterClause clauseType. - * @member {proto.QP.ClauseType} clauseType - * @memberof proto.QP.FilterClause - * @instance - */ - FilterClause.prototype.clauseType = 1; - - /** - * FilterClause clauses. - * @member {Array.} clauses - * @memberof proto.QP.FilterClause - * @instance - */ - FilterClause.prototype.clauses = $util.emptyArray; - - /** - * FilterClause filters. - * @member {Array.} filters - * @memberof proto.QP.FilterClause - * @instance - */ - FilterClause.prototype.filters = $util.emptyArray; - - /** - * Creates a new FilterClause instance using the specified properties. - * @function create - * @memberof proto.QP.FilterClause - * @static - * @param {proto.QP.IFilterClause=} [properties] Properties to set - * @returns {proto.QP.FilterClause} FilterClause instance - */ - FilterClause.create = function create(properties) { - return new FilterClause(properties); - }; - - /** - * Encodes the specified FilterClause message. Does not implicitly {@link proto.QP.FilterClause.verify|verify} messages. - * @function encode - * @memberof proto.QP.FilterClause - * @static - * @param {proto.QP.IFilterClause} message FilterClause message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FilterClause.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.clauseType); - if (message.clauses != null && message.clauses.length) - for (var i = 0; i < message.clauses.length; ++i) - $root.proto.QP.FilterClause.encode(message.clauses[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.filters != null && message.filters.length) - for (var i = 0; i < message.filters.length; ++i) - $root.proto.QP.Filter.encode(message.filters[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FilterClause message, length delimited. Does not implicitly {@link proto.QP.FilterClause.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.QP.FilterClause - * @static - * @param {proto.QP.IFilterClause} message FilterClause message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FilterClause.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FilterClause message from the specified reader or buffer. - * @function decode - * @memberof proto.QP.FilterClause - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.QP.FilterClause} FilterClause - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FilterClause.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.QP.FilterClause(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.clauseType = reader.int32(); - break; - case 2: - if (!(message.clauses && message.clauses.length)) - message.clauses = []; - message.clauses.push($root.proto.QP.FilterClause.decode(reader, reader.uint32())); - break; - case 3: - if (!(message.filters && message.filters.length)) - message.filters = []; - message.filters.push($root.proto.QP.Filter.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - if (!message.hasOwnProperty("clauseType")) - throw $util.ProtocolError("missing required 'clauseType'", { instance: message }); - return message; - }; - - /** - * Decodes a FilterClause message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.QP.FilterClause - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.QP.FilterClause} FilterClause - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FilterClause.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FilterClause message. - * @function verify - * @memberof proto.QP.FilterClause - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FilterClause.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - switch (message.clauseType) { - default: - return "clauseType: enum value expected"; - case 1: - case 2: - case 3: - break; - } - if (message.clauses != null && message.hasOwnProperty("clauses")) { - if (!Array.isArray(message.clauses)) - return "clauses: array expected"; - for (var i = 0; i < message.clauses.length; ++i) { - var error = $root.proto.QP.FilterClause.verify(message.clauses[i]); - if (error) - return "clauses." + error; - } - } - if (message.filters != null && message.hasOwnProperty("filters")) { - if (!Array.isArray(message.filters)) - return "filters: array expected"; - for (var i = 0; i < message.filters.length; ++i) { - var error = $root.proto.QP.Filter.verify(message.filters[i]); - if (error) - return "filters." + error; - } - } - return null; - }; - - /** - * Creates a FilterClause message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.QP.FilterClause - * @static - * @param {Object.} object Plain object - * @returns {proto.QP.FilterClause} FilterClause - */ - FilterClause.fromObject = function fromObject(object) { - if (object instanceof $root.proto.QP.FilterClause) - return object; - var message = new $root.proto.QP.FilterClause(); - switch (object.clauseType) { - case "AND": - case 1: - message.clauseType = 1; - break; - case "OR": - case 2: - message.clauseType = 2; - break; - case "NOR": - case 3: - message.clauseType = 3; - break; - } - if (object.clauses) { - if (!Array.isArray(object.clauses)) - throw TypeError(".proto.QP.FilterClause.clauses: array expected"); - message.clauses = []; - for (var i = 0; i < object.clauses.length; ++i) { - if (typeof object.clauses[i] !== "object") - throw TypeError(".proto.QP.FilterClause.clauses: object expected"); - message.clauses[i] = $root.proto.QP.FilterClause.fromObject(object.clauses[i]); - } - } - if (object.filters) { - if (!Array.isArray(object.filters)) - throw TypeError(".proto.QP.FilterClause.filters: array expected"); - message.filters = []; - for (var i = 0; i < object.filters.length; ++i) { - if (typeof object.filters[i] !== "object") - throw TypeError(".proto.QP.FilterClause.filters: object expected"); - message.filters[i] = $root.proto.QP.Filter.fromObject(object.filters[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a FilterClause message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.QP.FilterClause - * @static - * @param {proto.QP.FilterClause} message FilterClause - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FilterClause.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.clauses = []; - object.filters = []; - } - if (options.defaults) - object.clauseType = options.enums === String ? "AND" : 1; - if (message.clauseType != null && message.hasOwnProperty("clauseType")) - object.clauseType = options.enums === String ? $root.proto.QP.ClauseType[message.clauseType] : message.clauseType; - if (message.clauses && message.clauses.length) { - object.clauses = []; - for (var j = 0; j < message.clauses.length; ++j) - object.clauses[j] = $root.proto.QP.FilterClause.toObject(message.clauses[j], options); - } - if (message.filters && message.filters.length) { - object.filters = []; - for (var j = 0; j < message.filters.length; ++j) - object.filters[j] = $root.proto.QP.Filter.toObject(message.filters[j], options); - } - return object; - }; - - /** - * Converts this FilterClause to JSON. - * @function toJSON - * @memberof proto.QP.FilterClause - * @instance - * @returns {Object.} JSON object - */ - FilterClause.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return FilterClause; - })(); - - /** - * FilterClientNotSupportedConfig enum. - * @name proto.QP.FilterClientNotSupportedConfig - * @enum {number} - * @property {number} PASS_BY_DEFAULT=1 PASS_BY_DEFAULT value - * @property {number} FAIL_BY_DEFAULT=2 FAIL_BY_DEFAULT value - */ - QP.FilterClientNotSupportedConfig = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[1] = "PASS_BY_DEFAULT"] = 1; - values[valuesById[2] = "FAIL_BY_DEFAULT"] = 2; - return values; - })(); - - QP.FilterParameters = (function() { - - /** - * Properties of a FilterParameters. - * @memberof proto.QP - * @interface IFilterParameters - * @property {string|null} [key] FilterParameters key - * @property {string|null} [value] FilterParameters value - */ - - /** - * Constructs a new FilterParameters. - * @memberof proto.QP - * @classdesc Represents a FilterParameters. - * @implements IFilterParameters - * @constructor - * @param {proto.QP.IFilterParameters=} [properties] Properties to set - */ - function FilterParameters(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FilterParameters key. - * @member {string} key - * @memberof proto.QP.FilterParameters - * @instance - */ - FilterParameters.prototype.key = ""; - - /** - * FilterParameters value. - * @member {string} value - * @memberof proto.QP.FilterParameters - * @instance - */ - FilterParameters.prototype.value = ""; - - /** - * Creates a new FilterParameters instance using the specified properties. - * @function create - * @memberof proto.QP.FilterParameters - * @static - * @param {proto.QP.IFilterParameters=} [properties] Properties to set - * @returns {proto.QP.FilterParameters} FilterParameters instance - */ - FilterParameters.create = function create(properties) { - return new FilterParameters(properties); - }; - - /** - * Encodes the specified FilterParameters message. Does not implicitly {@link proto.QP.FilterParameters.verify|verify} messages. - * @function encode - * @memberof proto.QP.FilterParameters - * @static - * @param {proto.QP.IFilterParameters} message FilterParameters message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FilterParameters.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.key != null && Object.hasOwnProperty.call(message, "key")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); - return writer; - }; - - /** - * Encodes the specified FilterParameters message, length delimited. Does not implicitly {@link proto.QP.FilterParameters.verify|verify} messages. - * @function encodeDelimited - * @memberof proto.QP.FilterParameters - * @static - * @param {proto.QP.IFilterParameters} message FilterParameters message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FilterParameters.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FilterParameters message from the specified reader or buffer. - * @function decode - * @memberof proto.QP.FilterParameters - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {proto.QP.FilterParameters} FilterParameters - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FilterParameters.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.QP.FilterParameters(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.string(); - break; - case 2: - message.value = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FilterParameters message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof proto.QP.FilterParameters - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {proto.QP.FilterParameters} FilterParameters - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FilterParameters.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FilterParameters message. - * @function verify - * @memberof proto.QP.FilterParameters - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FilterParameters.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.key != null && message.hasOwnProperty("key")) - if (!$util.isString(message.key)) - return "key: string expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isString(message.value)) - return "value: string expected"; - return null; - }; - - /** - * Creates a FilterParameters message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof proto.QP.FilterParameters - * @static - * @param {Object.} object Plain object - * @returns {proto.QP.FilterParameters} FilterParameters - */ - FilterParameters.fromObject = function fromObject(object) { - if (object instanceof $root.proto.QP.FilterParameters) - return object; - var message = new $root.proto.QP.FilterParameters(); - if (object.key != null) - message.key = String(object.key); - if (object.value != null) - message.value = String(object.value); - return message; - }; - - /** - * Creates a plain object from a FilterParameters message. Also converts values to other types if specified. - * @function toObject - * @memberof proto.QP.FilterParameters - * @static - * @param {proto.QP.FilterParameters} message FilterParameters - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FilterParameters.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.key = ""; - object.value = ""; - } - if (message.key != null && message.hasOwnProperty("key")) - object.key = message.key; - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; - return object; - }; - - /** - * Converts this FilterParameters to JSON. - * @function toJSON - * @memberof proto.QP.FilterParameters - * @instance - * @returns {Object.} JSON object - */ - FilterParameters.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return FilterParameters; - })(); - - /** - * FilterResult enum. - * @name proto.QP.FilterResult - * @enum {number} - * @property {number} TRUE=1 TRUE value - * @property {number} FALSE=2 FALSE value - * @property {number} UNKNOWN=3 UNKNOWN value - */ - QP.FilterResult = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[1] = "TRUE"] = 1; - values[valuesById[2] = "FALSE"] = 2; - values[valuesById[3] = "UNKNOWN"] = 3; - return values; - })(); - - return QP; - })(); - proto.Reaction = (function() { /** @@ -73692,35 +117215,68 @@ $root.proto = (function() { /** * Reaction text. - * @member {string} text + * @member {string|null|undefined} text * @memberof proto.Reaction * @instance */ - Reaction.prototype.text = ""; + Reaction.prototype.text = null; /** * Reaction groupingKey. - * @member {string} groupingKey + * @member {string|null|undefined} groupingKey * @memberof proto.Reaction * @instance */ - Reaction.prototype.groupingKey = ""; + Reaction.prototype.groupingKey = null; /** * Reaction senderTimestampMs. - * @member {number|Long} senderTimestampMs + * @member {number|Long|null|undefined} senderTimestampMs * @memberof proto.Reaction * @instance */ - Reaction.prototype.senderTimestampMs = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + Reaction.prototype.senderTimestampMs = null; /** * Reaction unread. - * @member {boolean} unread + * @member {boolean|null|undefined} unread * @memberof proto.Reaction * @instance */ - Reaction.prototype.unread = false; + Reaction.prototype.unread = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Reaction.prototype, "_key", { + get: $util.oneOfGetter($oneOfFields = ["key"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Reaction.prototype, "_text", { + get: $util.oneOfGetter($oneOfFields = ["text"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Reaction.prototype, "_groupingKey", { + get: $util.oneOfGetter($oneOfFields = ["groupingKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Reaction.prototype, "_senderTimestampMs", { + get: $util.oneOfGetter($oneOfFields = ["senderTimestampMs"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Reaction.prototype, "_unread", { + get: $util.oneOfGetter($oneOfFields = ["unread"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new Reaction instance using the specified properties. @@ -73790,21 +117346,26 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.key = $root.proto.MessageKey.decode(reader, reader.uint32()); - break; - case 2: - message.text = reader.string(); - break; - case 3: - message.groupingKey = reader.string(); - break; - case 4: - message.senderTimestampMs = reader.int64(); - break; - case 5: - message.unread = reader.bool(); - break; + case 1: { + message.key = $root.proto.MessageKey.decode(reader, reader.uint32()); + break; + } + case 2: { + message.text = reader.string(); + break; + } + case 3: { + message.groupingKey = reader.string(); + break; + } + case 4: { + message.senderTimestampMs = reader.int64(); + break; + } + case 5: { + message.unread = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -73840,23 +117401,35 @@ $root.proto = (function() { Reaction.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; if (message.key != null && message.hasOwnProperty("key")) { - var error = $root.proto.MessageKey.verify(message.key); - if (error) - return "key." + error; + properties._key = 1; + { + var error = $root.proto.MessageKey.verify(message.key); + if (error) + return "key." + error; + } } - if (message.text != null && message.hasOwnProperty("text")) + if (message.text != null && message.hasOwnProperty("text")) { + properties._text = 1; if (!$util.isString(message.text)) return "text: string expected"; - if (message.groupingKey != null && message.hasOwnProperty("groupingKey")) + } + if (message.groupingKey != null && message.hasOwnProperty("groupingKey")) { + properties._groupingKey = 1; if (!$util.isString(message.groupingKey)) return "groupingKey: string expected"; - if (message.senderTimestampMs != null && message.hasOwnProperty("senderTimestampMs")) + } + if (message.senderTimestampMs != null && message.hasOwnProperty("senderTimestampMs")) { + properties._senderTimestampMs = 1; if (!$util.isInteger(message.senderTimestampMs) && !(message.senderTimestampMs && $util.isInteger(message.senderTimestampMs.low) && $util.isInteger(message.senderTimestampMs.high))) return "senderTimestampMs: integer|Long expected"; - if (message.unread != null && message.hasOwnProperty("unread")) + } + if (message.unread != null && message.hasOwnProperty("unread")) { + properties._unread = 1; if (typeof message.unread !== "boolean") return "unread: boolean expected"; + } return null; }; @@ -73908,30 +117481,34 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.key = null; - object.text = ""; - object.groupingKey = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.senderTimestampMs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.senderTimestampMs = options.longs === String ? "0" : 0; - object.unread = false; - } - if (message.key != null && message.hasOwnProperty("key")) + if (message.key != null && message.hasOwnProperty("key")) { object.key = $root.proto.MessageKey.toObject(message.key, options); - if (message.text != null && message.hasOwnProperty("text")) + if (options.oneofs) + object._key = "key"; + } + if (message.text != null && message.hasOwnProperty("text")) { object.text = message.text; - if (message.groupingKey != null && message.hasOwnProperty("groupingKey")) + if (options.oneofs) + object._text = "text"; + } + if (message.groupingKey != null && message.hasOwnProperty("groupingKey")) { object.groupingKey = message.groupingKey; - if (message.senderTimestampMs != null && message.hasOwnProperty("senderTimestampMs")) + if (options.oneofs) + object._groupingKey = "groupingKey"; + } + if (message.senderTimestampMs != null && message.hasOwnProperty("senderTimestampMs")) { if (typeof message.senderTimestampMs === "number") object.senderTimestampMs = options.longs === String ? String(message.senderTimestampMs) : message.senderTimestampMs; else object.senderTimestampMs = options.longs === String ? $util.Long.prototype.toString.call(message.senderTimestampMs) : options.longs === Number ? new $util.LongBits(message.senderTimestampMs.low >>> 0, message.senderTimestampMs.high >>> 0).toNumber() : message.senderTimestampMs; - if (message.unread != null && message.hasOwnProperty("unread")) + if (options.oneofs) + object._senderTimestampMs = "senderTimestampMs"; + } + if (message.unread != null && message.hasOwnProperty("unread")) { object.unread = message.unread; + if (options.oneofs) + object._unread = "unread"; + } return object; }; @@ -73946,6 +117523,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Reaction + * @function getTypeUrl + * @memberof proto.Reaction + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Reaction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Reaction"; + }; + return Reaction; })(); @@ -73976,19 +117568,34 @@ $root.proto = (function() { /** * RecentEmojiWeight emoji. - * @member {string} emoji + * @member {string|null|undefined} emoji * @memberof proto.RecentEmojiWeight * @instance */ - RecentEmojiWeight.prototype.emoji = ""; + RecentEmojiWeight.prototype.emoji = null; /** * RecentEmojiWeight weight. - * @member {number} weight + * @member {number|null|undefined} weight * @memberof proto.RecentEmojiWeight * @instance */ - RecentEmojiWeight.prototype.weight = 0; + RecentEmojiWeight.prototype.weight = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(RecentEmojiWeight.prototype, "_emoji", { + get: $util.oneOfGetter($oneOfFields = ["emoji"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(RecentEmojiWeight.prototype, "_weight", { + get: $util.oneOfGetter($oneOfFields = ["weight"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new RecentEmojiWeight instance using the specified properties. @@ -74052,12 +117659,14 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.emoji = reader.string(); - break; - case 2: - message.weight = reader.float(); - break; + case 1: { + message.emoji = reader.string(); + break; + } + case 2: { + message.weight = reader.float(); + break; + } default: reader.skipType(tag & 7); break; @@ -74093,12 +117702,17 @@ $root.proto = (function() { RecentEmojiWeight.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.emoji != null && message.hasOwnProperty("emoji")) + var properties = {}; + if (message.emoji != null && message.hasOwnProperty("emoji")) { + properties._emoji = 1; if (!$util.isString(message.emoji)) return "emoji: string expected"; - if (message.weight != null && message.hasOwnProperty("weight")) + } + if (message.weight != null && message.hasOwnProperty("weight")) { + properties._weight = 1; if (typeof message.weight !== "number") return "weight: number expected"; + } return null; }; @@ -74134,14 +117748,16 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.emoji = ""; - object.weight = 0; - } - if (message.emoji != null && message.hasOwnProperty("emoji")) + if (message.emoji != null && message.hasOwnProperty("emoji")) { object.emoji = message.emoji; - if (message.weight != null && message.hasOwnProperty("weight")) + if (options.oneofs) + object._emoji = "emoji"; + } + if (message.weight != null && message.hasOwnProperty("weight")) { object.weight = options.json && !isFinite(message.weight) ? String(message.weight) : message.weight; + if (options.oneofs) + object._weight = "weight"; + } return object; }; @@ -74156,6 +117772,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for RecentEmojiWeight + * @function getTypeUrl + * @memberof proto.RecentEmojiWeight + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RecentEmojiWeight.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.RecentEmojiWeight"; + }; + return RecentEmojiWeight; })(); @@ -74201,6 +117832,15 @@ $root.proto = (function() { */ RecordStructure.prototype.previousSessions = $util.emptyArray; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(RecordStructure.prototype, "_currentSession", { + get: $util.oneOfGetter($oneOfFields = ["currentSession"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new RecordStructure instance using the specified properties. * @function create @@ -74264,14 +117904,16 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.currentSession = $root.proto.SessionStructure.decode(reader, reader.uint32()); - break; - case 2: - if (!(message.previousSessions && message.previousSessions.length)) - message.previousSessions = []; - message.previousSessions.push($root.proto.SessionStructure.decode(reader, reader.uint32())); - break; + case 1: { + message.currentSession = $root.proto.SessionStructure.decode(reader, reader.uint32()); + break; + } + case 2: { + if (!(message.previousSessions && message.previousSessions.length)) + message.previousSessions = []; + message.previousSessions.push($root.proto.SessionStructure.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -74307,10 +117949,14 @@ $root.proto = (function() { RecordStructure.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; if (message.currentSession != null && message.hasOwnProperty("currentSession")) { - var error = $root.proto.SessionStructure.verify(message.currentSession); - if (error) - return "currentSession." + error; + properties._currentSession = 1; + { + var error = $root.proto.SessionStructure.verify(message.currentSession); + if (error) + return "currentSession." + error; + } } if (message.previousSessions != null && message.hasOwnProperty("previousSessions")) { if (!Array.isArray(message.previousSessions)) @@ -74369,10 +118015,11 @@ $root.proto = (function() { var object = {}; if (options.arrays || options.defaults) object.previousSessions = []; - if (options.defaults) - object.currentSession = null; - if (message.currentSession != null && message.hasOwnProperty("currentSession")) + if (message.currentSession != null && message.hasOwnProperty("currentSession")) { object.currentSession = $root.proto.SessionStructure.toObject(message.currentSession, options); + if (options.oneofs) + object._currentSession = "currentSession"; + } if (message.previousSessions && message.previousSessions.length) { object.previousSessions = []; for (var j = 0; j < message.previousSessions.length; ++j) @@ -74392,9 +118039,339 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for RecordStructure + * @function getTypeUrl + * @memberof proto.RecordStructure + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RecordStructure.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.RecordStructure"; + }; + return RecordStructure; })(); + proto.Reportable = (function() { + + /** + * Properties of a Reportable. + * @memberof proto + * @interface IReportable + * @property {number|null} [minVersion] Reportable minVersion + * @property {number|null} [maxVersion] Reportable maxVersion + * @property {number|null} [notReportableMinVersion] Reportable notReportableMinVersion + * @property {boolean|null} [never] Reportable never + */ + + /** + * Constructs a new Reportable. + * @memberof proto + * @classdesc Represents a Reportable. + * @implements IReportable + * @constructor + * @param {proto.IReportable=} [properties] Properties to set + */ + function Reportable(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Reportable minVersion. + * @member {number|null|undefined} minVersion + * @memberof proto.Reportable + * @instance + */ + Reportable.prototype.minVersion = null; + + /** + * Reportable maxVersion. + * @member {number|null|undefined} maxVersion + * @memberof proto.Reportable + * @instance + */ + Reportable.prototype.maxVersion = null; + + /** + * Reportable notReportableMinVersion. + * @member {number|null|undefined} notReportableMinVersion + * @memberof proto.Reportable + * @instance + */ + Reportable.prototype.notReportableMinVersion = null; + + /** + * Reportable never. + * @member {boolean|null|undefined} never + * @memberof proto.Reportable + * @instance + */ + Reportable.prototype.never = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Reportable.prototype, "_minVersion", { + get: $util.oneOfGetter($oneOfFields = ["minVersion"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Reportable.prototype, "_maxVersion", { + get: $util.oneOfGetter($oneOfFields = ["maxVersion"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Reportable.prototype, "_notReportableMinVersion", { + get: $util.oneOfGetter($oneOfFields = ["notReportableMinVersion"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Reportable.prototype, "_never", { + get: $util.oneOfGetter($oneOfFields = ["never"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Reportable instance using the specified properties. + * @function create + * @memberof proto.Reportable + * @static + * @param {proto.IReportable=} [properties] Properties to set + * @returns {proto.Reportable} Reportable instance + */ + Reportable.create = function create(properties) { + return new Reportable(properties); + }; + + /** + * Encodes the specified Reportable message. Does not implicitly {@link proto.Reportable.verify|verify} messages. + * @function encode + * @memberof proto.Reportable + * @static + * @param {proto.IReportable} message Reportable message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Reportable.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.minVersion != null && Object.hasOwnProperty.call(message, "minVersion")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.minVersion); + if (message.maxVersion != null && Object.hasOwnProperty.call(message, "maxVersion")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.maxVersion); + if (message.notReportableMinVersion != null && Object.hasOwnProperty.call(message, "notReportableMinVersion")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.notReportableMinVersion); + if (message.never != null && Object.hasOwnProperty.call(message, "never")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.never); + return writer; + }; + + /** + * Encodes the specified Reportable message, length delimited. Does not implicitly {@link proto.Reportable.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.Reportable + * @static + * @param {proto.IReportable} message Reportable message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Reportable.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Reportable message from the specified reader or buffer. + * @function decode + * @memberof proto.Reportable + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.Reportable} Reportable + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Reportable.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.Reportable(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.minVersion = reader.uint32(); + break; + } + case 2: { + message.maxVersion = reader.uint32(); + break; + } + case 3: { + message.notReportableMinVersion = reader.uint32(); + break; + } + case 4: { + message.never = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Reportable message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.Reportable + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.Reportable} Reportable + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Reportable.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Reportable message. + * @function verify + * @memberof proto.Reportable + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Reportable.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.minVersion != null && message.hasOwnProperty("minVersion")) { + properties._minVersion = 1; + if (!$util.isInteger(message.minVersion)) + return "minVersion: integer expected"; + } + if (message.maxVersion != null && message.hasOwnProperty("maxVersion")) { + properties._maxVersion = 1; + if (!$util.isInteger(message.maxVersion)) + return "maxVersion: integer expected"; + } + if (message.notReportableMinVersion != null && message.hasOwnProperty("notReportableMinVersion")) { + properties._notReportableMinVersion = 1; + if (!$util.isInteger(message.notReportableMinVersion)) + return "notReportableMinVersion: integer expected"; + } + if (message.never != null && message.hasOwnProperty("never")) { + properties._never = 1; + if (typeof message.never !== "boolean") + return "never: boolean expected"; + } + return null; + }; + + /** + * Creates a Reportable message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.Reportable + * @static + * @param {Object.} object Plain object + * @returns {proto.Reportable} Reportable + */ + Reportable.fromObject = function fromObject(object) { + if (object instanceof $root.proto.Reportable) + return object; + var message = new $root.proto.Reportable(); + if (object.minVersion != null) + message.minVersion = object.minVersion >>> 0; + if (object.maxVersion != null) + message.maxVersion = object.maxVersion >>> 0; + if (object.notReportableMinVersion != null) + message.notReportableMinVersion = object.notReportableMinVersion >>> 0; + if (object.never != null) + message.never = Boolean(object.never); + return message; + }; + + /** + * Creates a plain object from a Reportable message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.Reportable + * @static + * @param {proto.Reportable} message Reportable + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Reportable.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.minVersion != null && message.hasOwnProperty("minVersion")) { + object.minVersion = message.minVersion; + if (options.oneofs) + object._minVersion = "minVersion"; + } + if (message.maxVersion != null && message.hasOwnProperty("maxVersion")) { + object.maxVersion = message.maxVersion; + if (options.oneofs) + object._maxVersion = "maxVersion"; + } + if (message.notReportableMinVersion != null && message.hasOwnProperty("notReportableMinVersion")) { + object.notReportableMinVersion = message.notReportableMinVersion; + if (options.oneofs) + object._notReportableMinVersion = "notReportableMinVersion"; + } + if (message.never != null && message.hasOwnProperty("never")) { + object.never = message.never; + if (options.oneofs) + object._never = "never"; + } + return object; + }; + + /** + * Converts this Reportable to JSON. + * @function toJSON + * @memberof proto.Reportable + * @instance + * @returns {Object.} JSON object + */ + Reportable.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Reportable + * @function getTypeUrl + * @memberof proto.Reportable + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Reportable.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.Reportable"; + }; + + return Reportable; + })(); + proto.ReportingTokenInfo = (function() { /** @@ -74421,11 +118398,20 @@ $root.proto = (function() { /** * ReportingTokenInfo reportingTag. - * @member {Uint8Array} reportingTag + * @member {Uint8Array|null|undefined} reportingTag * @memberof proto.ReportingTokenInfo * @instance */ - ReportingTokenInfo.prototype.reportingTag = $util.newBuffer([]); + ReportingTokenInfo.prototype.reportingTag = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ReportingTokenInfo.prototype, "_reportingTag", { + get: $util.oneOfGetter($oneOfFields = ["reportingTag"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new ReportingTokenInfo instance using the specified properties. @@ -74487,9 +118473,10 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.reportingTag = reader.bytes(); - break; + case 1: { + message.reportingTag = reader.bytes(); + break; + } default: reader.skipType(tag & 7); break; @@ -74525,9 +118512,12 @@ $root.proto = (function() { ReportingTokenInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.reportingTag != null && message.hasOwnProperty("reportingTag")) + var properties = {}; + if (message.reportingTag != null && message.hasOwnProperty("reportingTag")) { + properties._reportingTag = 1; if (!(message.reportingTag && typeof message.reportingTag.length === "number" || $util.isString(message.reportingTag))) return "reportingTag: buffer expected"; + } return null; }; @@ -74546,7 +118536,7 @@ $root.proto = (function() { if (object.reportingTag != null) if (typeof object.reportingTag === "string") $util.base64.decode(object.reportingTag, message.reportingTag = $util.newBuffer($util.base64.length(object.reportingTag)), 0); - else if (object.reportingTag.length) + else if (object.reportingTag.length >= 0) message.reportingTag = object.reportingTag; return message; }; @@ -74564,16 +118554,11 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) - if (options.bytes === String) - object.reportingTag = ""; - else { - object.reportingTag = []; - if (options.bytes !== Array) - object.reportingTag = $util.newBuffer(object.reportingTag); - } - if (message.reportingTag != null && message.hasOwnProperty("reportingTag")) + if (message.reportingTag != null && message.hasOwnProperty("reportingTag")) { object.reportingTag = options.bytes === String ? $util.base64.encode(message.reportingTag, 0, message.reportingTag.length) : options.bytes === Array ? Array.prototype.slice.call(message.reportingTag) : message.reportingTag; + if (options.oneofs) + object._reportingTag = "reportingTag"; + } return object; }; @@ -74588,6 +118573,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ReportingTokenInfo + * @function getTypeUrl + * @memberof proto.ReportingTokenInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReportingTokenInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.ReportingTokenInfo"; + }; + return ReportingTokenInfo; })(); @@ -74620,35 +118620,62 @@ $root.proto = (function() { /** * SenderKeyDistributionMessage id. - * @member {number} id + * @member {number|null|undefined} id * @memberof proto.SenderKeyDistributionMessage * @instance */ - SenderKeyDistributionMessage.prototype.id = 0; + SenderKeyDistributionMessage.prototype.id = null; /** * SenderKeyDistributionMessage iteration. - * @member {number} iteration + * @member {number|null|undefined} iteration * @memberof proto.SenderKeyDistributionMessage * @instance */ - SenderKeyDistributionMessage.prototype.iteration = 0; + SenderKeyDistributionMessage.prototype.iteration = null; /** * SenderKeyDistributionMessage chainKey. - * @member {Uint8Array} chainKey + * @member {Uint8Array|null|undefined} chainKey * @memberof proto.SenderKeyDistributionMessage * @instance */ - SenderKeyDistributionMessage.prototype.chainKey = $util.newBuffer([]); + SenderKeyDistributionMessage.prototype.chainKey = null; /** * SenderKeyDistributionMessage signingKey. - * @member {Uint8Array} signingKey + * @member {Uint8Array|null|undefined} signingKey * @memberof proto.SenderKeyDistributionMessage * @instance */ - SenderKeyDistributionMessage.prototype.signingKey = $util.newBuffer([]); + SenderKeyDistributionMessage.prototype.signingKey = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SenderKeyDistributionMessage.prototype, "_id", { + get: $util.oneOfGetter($oneOfFields = ["id"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SenderKeyDistributionMessage.prototype, "_iteration", { + get: $util.oneOfGetter($oneOfFields = ["iteration"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SenderKeyDistributionMessage.prototype, "_chainKey", { + get: $util.oneOfGetter($oneOfFields = ["chainKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SenderKeyDistributionMessage.prototype, "_signingKey", { + get: $util.oneOfGetter($oneOfFields = ["signingKey"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new SenderKeyDistributionMessage instance using the specified properties. @@ -74716,18 +118743,22 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.id = reader.uint32(); - break; - case 2: - message.iteration = reader.uint32(); - break; - case 3: - message.chainKey = reader.bytes(); - break; - case 4: - message.signingKey = reader.bytes(); - break; + case 1: { + message.id = reader.uint32(); + break; + } + case 2: { + message.iteration = reader.uint32(); + break; + } + case 3: { + message.chainKey = reader.bytes(); + break; + } + case 4: { + message.signingKey = reader.bytes(); + break; + } default: reader.skipType(tag & 7); break; @@ -74763,18 +118794,27 @@ $root.proto = (function() { SenderKeyDistributionMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.id != null && message.hasOwnProperty("id")) + var properties = {}; + if (message.id != null && message.hasOwnProperty("id")) { + properties._id = 1; if (!$util.isInteger(message.id)) return "id: integer expected"; - if (message.iteration != null && message.hasOwnProperty("iteration")) + } + if (message.iteration != null && message.hasOwnProperty("iteration")) { + properties._iteration = 1; if (!$util.isInteger(message.iteration)) return "iteration: integer expected"; - if (message.chainKey != null && message.hasOwnProperty("chainKey")) + } + if (message.chainKey != null && message.hasOwnProperty("chainKey")) { + properties._chainKey = 1; if (!(message.chainKey && typeof message.chainKey.length === "number" || $util.isString(message.chainKey))) return "chainKey: buffer expected"; - if (message.signingKey != null && message.hasOwnProperty("signingKey")) + } + if (message.signingKey != null && message.hasOwnProperty("signingKey")) { + properties._signingKey = 1; if (!(message.signingKey && typeof message.signingKey.length === "number" || $util.isString(message.signingKey))) return "signingKey: buffer expected"; + } return null; }; @@ -74797,12 +118837,12 @@ $root.proto = (function() { if (object.chainKey != null) if (typeof object.chainKey === "string") $util.base64.decode(object.chainKey, message.chainKey = $util.newBuffer($util.base64.length(object.chainKey)), 0); - else if (object.chainKey.length) + else if (object.chainKey.length >= 0) message.chainKey = object.chainKey; if (object.signingKey != null) if (typeof object.signingKey === "string") $util.base64.decode(object.signingKey, message.signingKey = $util.newBuffer($util.base64.length(object.signingKey)), 0); - else if (object.signingKey.length) + else if (object.signingKey.length >= 0) message.signingKey = object.signingKey; return message; }; @@ -74820,32 +118860,26 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.id = 0; - object.iteration = 0; - if (options.bytes === String) - object.chainKey = ""; - else { - object.chainKey = []; - if (options.bytes !== Array) - object.chainKey = $util.newBuffer(object.chainKey); - } - if (options.bytes === String) - object.signingKey = ""; - else { - object.signingKey = []; - if (options.bytes !== Array) - object.signingKey = $util.newBuffer(object.signingKey); - } - } - if (message.id != null && message.hasOwnProperty("id")) + if (message.id != null && message.hasOwnProperty("id")) { object.id = message.id; - if (message.iteration != null && message.hasOwnProperty("iteration")) + if (options.oneofs) + object._id = "id"; + } + if (message.iteration != null && message.hasOwnProperty("iteration")) { object.iteration = message.iteration; - if (message.chainKey != null && message.hasOwnProperty("chainKey")) + if (options.oneofs) + object._iteration = "iteration"; + } + if (message.chainKey != null && message.hasOwnProperty("chainKey")) { object.chainKey = options.bytes === String ? $util.base64.encode(message.chainKey, 0, message.chainKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.chainKey) : message.chainKey; - if (message.signingKey != null && message.hasOwnProperty("signingKey")) + if (options.oneofs) + object._chainKey = "chainKey"; + } + if (message.signingKey != null && message.hasOwnProperty("signingKey")) { object.signingKey = options.bytes === String ? $util.base64.encode(message.signingKey, 0, message.signingKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.signingKey) : message.signingKey; + if (options.oneofs) + object._signingKey = "signingKey"; + } return object; }; @@ -74860,6 +118894,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for SenderKeyDistributionMessage + * @function getTypeUrl + * @memberof proto.SenderKeyDistributionMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SenderKeyDistributionMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.SenderKeyDistributionMessage"; + }; + return SenderKeyDistributionMessage; })(); @@ -74891,27 +118940,48 @@ $root.proto = (function() { /** * SenderKeyMessage id. - * @member {number} id + * @member {number|null|undefined} id * @memberof proto.SenderKeyMessage * @instance */ - SenderKeyMessage.prototype.id = 0; + SenderKeyMessage.prototype.id = null; /** * SenderKeyMessage iteration. - * @member {number} iteration + * @member {number|null|undefined} iteration * @memberof proto.SenderKeyMessage * @instance */ - SenderKeyMessage.prototype.iteration = 0; + SenderKeyMessage.prototype.iteration = null; /** * SenderKeyMessage ciphertext. - * @member {Uint8Array} ciphertext + * @member {Uint8Array|null|undefined} ciphertext * @memberof proto.SenderKeyMessage * @instance */ - SenderKeyMessage.prototype.ciphertext = $util.newBuffer([]); + SenderKeyMessage.prototype.ciphertext = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SenderKeyMessage.prototype, "_id", { + get: $util.oneOfGetter($oneOfFields = ["id"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SenderKeyMessage.prototype, "_iteration", { + get: $util.oneOfGetter($oneOfFields = ["iteration"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SenderKeyMessage.prototype, "_ciphertext", { + get: $util.oneOfGetter($oneOfFields = ["ciphertext"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new SenderKeyMessage instance using the specified properties. @@ -74977,15 +119047,18 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.id = reader.uint32(); - break; - case 2: - message.iteration = reader.uint32(); - break; - case 3: - message.ciphertext = reader.bytes(); - break; + case 1: { + message.id = reader.uint32(); + break; + } + case 2: { + message.iteration = reader.uint32(); + break; + } + case 3: { + message.ciphertext = reader.bytes(); + break; + } default: reader.skipType(tag & 7); break; @@ -75021,15 +119094,22 @@ $root.proto = (function() { SenderKeyMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.id != null && message.hasOwnProperty("id")) + var properties = {}; + if (message.id != null && message.hasOwnProperty("id")) { + properties._id = 1; if (!$util.isInteger(message.id)) return "id: integer expected"; - if (message.iteration != null && message.hasOwnProperty("iteration")) + } + if (message.iteration != null && message.hasOwnProperty("iteration")) { + properties._iteration = 1; if (!$util.isInteger(message.iteration)) return "iteration: integer expected"; - if (message.ciphertext != null && message.hasOwnProperty("ciphertext")) + } + if (message.ciphertext != null && message.hasOwnProperty("ciphertext")) { + properties._ciphertext = 1; if (!(message.ciphertext && typeof message.ciphertext.length === "number" || $util.isString(message.ciphertext))) return "ciphertext: buffer expected"; + } return null; }; @@ -75052,7 +119132,7 @@ $root.proto = (function() { if (object.ciphertext != null) if (typeof object.ciphertext === "string") $util.base64.decode(object.ciphertext, message.ciphertext = $util.newBuffer($util.base64.length(object.ciphertext)), 0); - else if (object.ciphertext.length) + else if (object.ciphertext.length >= 0) message.ciphertext = object.ciphertext; return message; }; @@ -75070,23 +119150,21 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.id = 0; - object.iteration = 0; - if (options.bytes === String) - object.ciphertext = ""; - else { - object.ciphertext = []; - if (options.bytes !== Array) - object.ciphertext = $util.newBuffer(object.ciphertext); - } - } - if (message.id != null && message.hasOwnProperty("id")) + if (message.id != null && message.hasOwnProperty("id")) { object.id = message.id; - if (message.iteration != null && message.hasOwnProperty("iteration")) + if (options.oneofs) + object._id = "id"; + } + if (message.iteration != null && message.hasOwnProperty("iteration")) { object.iteration = message.iteration; - if (message.ciphertext != null && message.hasOwnProperty("ciphertext")) + if (options.oneofs) + object._iteration = "iteration"; + } + if (message.ciphertext != null && message.hasOwnProperty("ciphertext")) { object.ciphertext = options.bytes === String ? $util.base64.encode(message.ciphertext, 0, message.ciphertext.length) : options.bytes === Array ? Array.prototype.slice.call(message.ciphertext) : message.ciphertext; + if (options.oneofs) + object._ciphertext = "ciphertext"; + } return object; }; @@ -75101,6 +119179,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for SenderKeyMessage + * @function getTypeUrl + * @memberof proto.SenderKeyMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SenderKeyMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.SenderKeyMessage"; + }; + return SenderKeyMessage; })(); @@ -75198,11 +119291,12 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.senderKeyStates && message.senderKeyStates.length)) - message.senderKeyStates = []; - message.senderKeyStates.push($root.proto.SenderKeyStateStructure.decode(reader, reader.uint32())); - break; + case 1: { + if (!(message.senderKeyStates && message.senderKeyStates.length)) + message.senderKeyStates = []; + message.senderKeyStates.push($root.proto.SenderKeyStateStructure.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -75309,6 +119403,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for SenderKeyRecordStructure + * @function getTypeUrl + * @memberof proto.SenderKeyRecordStructure + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SenderKeyRecordStructure.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.SenderKeyRecordStructure"; + }; + return SenderKeyRecordStructure; })(); @@ -75342,11 +119451,11 @@ $root.proto = (function() { /** * SenderKeyStateStructure senderKeyId. - * @member {number} senderKeyId + * @member {number|null|undefined} senderKeyId * @memberof proto.SenderKeyStateStructure * @instance */ - SenderKeyStateStructure.prototype.senderKeyId = 0; + SenderKeyStateStructure.prototype.senderKeyId = null; /** * SenderKeyStateStructure senderChainKey. @@ -75372,6 +119481,27 @@ $root.proto = (function() { */ SenderKeyStateStructure.prototype.senderMessageKeys = $util.emptyArray; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SenderKeyStateStructure.prototype, "_senderKeyId", { + get: $util.oneOfGetter($oneOfFields = ["senderKeyId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SenderKeyStateStructure.prototype, "_senderChainKey", { + get: $util.oneOfGetter($oneOfFields = ["senderChainKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SenderKeyStateStructure.prototype, "_senderSigningKey", { + get: $util.oneOfGetter($oneOfFields = ["senderSigningKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new SenderKeyStateStructure instance using the specified properties. * @function create @@ -75439,20 +119569,24 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.senderKeyId = reader.uint32(); - break; - case 2: - message.senderChainKey = $root.proto.SenderKeyStateStructure.SenderChainKey.decode(reader, reader.uint32()); - break; - case 3: - message.senderSigningKey = $root.proto.SenderKeyStateStructure.SenderSigningKey.decode(reader, reader.uint32()); - break; - case 4: - if (!(message.senderMessageKeys && message.senderMessageKeys.length)) - message.senderMessageKeys = []; - message.senderMessageKeys.push($root.proto.SenderKeyStateStructure.SenderMessageKey.decode(reader, reader.uint32())); - break; + case 1: { + message.senderKeyId = reader.uint32(); + break; + } + case 2: { + message.senderChainKey = $root.proto.SenderKeyStateStructure.SenderChainKey.decode(reader, reader.uint32()); + break; + } + case 3: { + message.senderSigningKey = $root.proto.SenderKeyStateStructure.SenderSigningKey.decode(reader, reader.uint32()); + break; + } + case 4: { + if (!(message.senderMessageKeys && message.senderMessageKeys.length)) + message.senderMessageKeys = []; + message.senderMessageKeys.push($root.proto.SenderKeyStateStructure.SenderMessageKey.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -75488,18 +119622,27 @@ $root.proto = (function() { SenderKeyStateStructure.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.senderKeyId != null && message.hasOwnProperty("senderKeyId")) + var properties = {}; + if (message.senderKeyId != null && message.hasOwnProperty("senderKeyId")) { + properties._senderKeyId = 1; if (!$util.isInteger(message.senderKeyId)) return "senderKeyId: integer expected"; + } if (message.senderChainKey != null && message.hasOwnProperty("senderChainKey")) { - var error = $root.proto.SenderKeyStateStructure.SenderChainKey.verify(message.senderChainKey); - if (error) - return "senderChainKey." + error; + properties._senderChainKey = 1; + { + var error = $root.proto.SenderKeyStateStructure.SenderChainKey.verify(message.senderChainKey); + if (error) + return "senderChainKey." + error; + } } if (message.senderSigningKey != null && message.hasOwnProperty("senderSigningKey")) { - var error = $root.proto.SenderKeyStateStructure.SenderSigningKey.verify(message.senderSigningKey); - if (error) - return "senderSigningKey." + error; + properties._senderSigningKey = 1; + { + var error = $root.proto.SenderKeyStateStructure.SenderSigningKey.verify(message.senderSigningKey); + if (error) + return "senderSigningKey." + error; + } } if (message.senderMessageKeys != null && message.hasOwnProperty("senderMessageKeys")) { if (!Array.isArray(message.senderMessageKeys)) @@ -75565,17 +119708,21 @@ $root.proto = (function() { var object = {}; if (options.arrays || options.defaults) object.senderMessageKeys = []; - if (options.defaults) { - object.senderKeyId = 0; - object.senderChainKey = null; - object.senderSigningKey = null; - } - if (message.senderKeyId != null && message.hasOwnProperty("senderKeyId")) + if (message.senderKeyId != null && message.hasOwnProperty("senderKeyId")) { object.senderKeyId = message.senderKeyId; - if (message.senderChainKey != null && message.hasOwnProperty("senderChainKey")) + if (options.oneofs) + object._senderKeyId = "senderKeyId"; + } + if (message.senderChainKey != null && message.hasOwnProperty("senderChainKey")) { object.senderChainKey = $root.proto.SenderKeyStateStructure.SenderChainKey.toObject(message.senderChainKey, options); - if (message.senderSigningKey != null && message.hasOwnProperty("senderSigningKey")) + if (options.oneofs) + object._senderChainKey = "senderChainKey"; + } + if (message.senderSigningKey != null && message.hasOwnProperty("senderSigningKey")) { object.senderSigningKey = $root.proto.SenderKeyStateStructure.SenderSigningKey.toObject(message.senderSigningKey, options); + if (options.oneofs) + object._senderSigningKey = "senderSigningKey"; + } if (message.senderMessageKeys && message.senderMessageKeys.length) { object.senderMessageKeys = []; for (var j = 0; j < message.senderMessageKeys.length; ++j) @@ -75595,6 +119742,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for SenderKeyStateStructure + * @function getTypeUrl + * @memberof proto.SenderKeyStateStructure + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SenderKeyStateStructure.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.SenderKeyStateStructure"; + }; + SenderKeyStateStructure.SenderChainKey = (function() { /** @@ -75622,19 +119784,34 @@ $root.proto = (function() { /** * SenderChainKey iteration. - * @member {number} iteration + * @member {number|null|undefined} iteration * @memberof proto.SenderKeyStateStructure.SenderChainKey * @instance */ - SenderChainKey.prototype.iteration = 0; + SenderChainKey.prototype.iteration = null; /** * SenderChainKey seed. - * @member {Uint8Array} seed + * @member {Uint8Array|null|undefined} seed * @memberof proto.SenderKeyStateStructure.SenderChainKey * @instance */ - SenderChainKey.prototype.seed = $util.newBuffer([]); + SenderChainKey.prototype.seed = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SenderChainKey.prototype, "_iteration", { + get: $util.oneOfGetter($oneOfFields = ["iteration"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SenderChainKey.prototype, "_seed", { + get: $util.oneOfGetter($oneOfFields = ["seed"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new SenderChainKey instance using the specified properties. @@ -75698,12 +119875,14 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.iteration = reader.uint32(); - break; - case 2: - message.seed = reader.bytes(); - break; + case 1: { + message.iteration = reader.uint32(); + break; + } + case 2: { + message.seed = reader.bytes(); + break; + } default: reader.skipType(tag & 7); break; @@ -75739,12 +119918,17 @@ $root.proto = (function() { SenderChainKey.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.iteration != null && message.hasOwnProperty("iteration")) + var properties = {}; + if (message.iteration != null && message.hasOwnProperty("iteration")) { + properties._iteration = 1; if (!$util.isInteger(message.iteration)) return "iteration: integer expected"; - if (message.seed != null && message.hasOwnProperty("seed")) + } + if (message.seed != null && message.hasOwnProperty("seed")) { + properties._seed = 1; if (!(message.seed && typeof message.seed.length === "number" || $util.isString(message.seed))) return "seed: buffer expected"; + } return null; }; @@ -75765,7 +119949,7 @@ $root.proto = (function() { if (object.seed != null) if (typeof object.seed === "string") $util.base64.decode(object.seed, message.seed = $util.newBuffer($util.base64.length(object.seed)), 0); - else if (object.seed.length) + else if (object.seed.length >= 0) message.seed = object.seed; return message; }; @@ -75783,20 +119967,16 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.iteration = 0; - if (options.bytes === String) - object.seed = ""; - else { - object.seed = []; - if (options.bytes !== Array) - object.seed = $util.newBuffer(object.seed); - } - } - if (message.iteration != null && message.hasOwnProperty("iteration")) + if (message.iteration != null && message.hasOwnProperty("iteration")) { object.iteration = message.iteration; - if (message.seed != null && message.hasOwnProperty("seed")) + if (options.oneofs) + object._iteration = "iteration"; + } + if (message.seed != null && message.hasOwnProperty("seed")) { object.seed = options.bytes === String ? $util.base64.encode(message.seed, 0, message.seed.length) : options.bytes === Array ? Array.prototype.slice.call(message.seed) : message.seed; + if (options.oneofs) + object._seed = "seed"; + } return object; }; @@ -75811,6 +119991,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for SenderChainKey + * @function getTypeUrl + * @memberof proto.SenderKeyStateStructure.SenderChainKey + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SenderChainKey.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.SenderKeyStateStructure.SenderChainKey"; + }; + return SenderChainKey; })(); @@ -75841,19 +120036,34 @@ $root.proto = (function() { /** * SenderMessageKey iteration. - * @member {number} iteration + * @member {number|null|undefined} iteration * @memberof proto.SenderKeyStateStructure.SenderMessageKey * @instance */ - SenderMessageKey.prototype.iteration = 0; + SenderMessageKey.prototype.iteration = null; /** * SenderMessageKey seed. - * @member {Uint8Array} seed + * @member {Uint8Array|null|undefined} seed * @memberof proto.SenderKeyStateStructure.SenderMessageKey * @instance */ - SenderMessageKey.prototype.seed = $util.newBuffer([]); + SenderMessageKey.prototype.seed = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SenderMessageKey.prototype, "_iteration", { + get: $util.oneOfGetter($oneOfFields = ["iteration"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SenderMessageKey.prototype, "_seed", { + get: $util.oneOfGetter($oneOfFields = ["seed"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new SenderMessageKey instance using the specified properties. @@ -75917,12 +120127,14 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.iteration = reader.uint32(); - break; - case 2: - message.seed = reader.bytes(); - break; + case 1: { + message.iteration = reader.uint32(); + break; + } + case 2: { + message.seed = reader.bytes(); + break; + } default: reader.skipType(tag & 7); break; @@ -75958,12 +120170,17 @@ $root.proto = (function() { SenderMessageKey.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.iteration != null && message.hasOwnProperty("iteration")) + var properties = {}; + if (message.iteration != null && message.hasOwnProperty("iteration")) { + properties._iteration = 1; if (!$util.isInteger(message.iteration)) return "iteration: integer expected"; - if (message.seed != null && message.hasOwnProperty("seed")) + } + if (message.seed != null && message.hasOwnProperty("seed")) { + properties._seed = 1; if (!(message.seed && typeof message.seed.length === "number" || $util.isString(message.seed))) return "seed: buffer expected"; + } return null; }; @@ -75984,7 +120201,7 @@ $root.proto = (function() { if (object.seed != null) if (typeof object.seed === "string") $util.base64.decode(object.seed, message.seed = $util.newBuffer($util.base64.length(object.seed)), 0); - else if (object.seed.length) + else if (object.seed.length >= 0) message.seed = object.seed; return message; }; @@ -76002,20 +120219,16 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.iteration = 0; - if (options.bytes === String) - object.seed = ""; - else { - object.seed = []; - if (options.bytes !== Array) - object.seed = $util.newBuffer(object.seed); - } - } - if (message.iteration != null && message.hasOwnProperty("iteration")) + if (message.iteration != null && message.hasOwnProperty("iteration")) { object.iteration = message.iteration; - if (message.seed != null && message.hasOwnProperty("seed")) + if (options.oneofs) + object._iteration = "iteration"; + } + if (message.seed != null && message.hasOwnProperty("seed")) { object.seed = options.bytes === String ? $util.base64.encode(message.seed, 0, message.seed.length) : options.bytes === Array ? Array.prototype.slice.call(message.seed) : message.seed; + if (options.oneofs) + object._seed = "seed"; + } return object; }; @@ -76030,6 +120243,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for SenderMessageKey + * @function getTypeUrl + * @memberof proto.SenderKeyStateStructure.SenderMessageKey + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SenderMessageKey.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.SenderKeyStateStructure.SenderMessageKey"; + }; + return SenderMessageKey; })(); @@ -76060,19 +120288,34 @@ $root.proto = (function() { /** * SenderSigningKey public. - * @member {Uint8Array} public + * @member {Uint8Array|null|undefined} public * @memberof proto.SenderKeyStateStructure.SenderSigningKey * @instance */ - SenderSigningKey.prototype["public"] = $util.newBuffer([]); + SenderSigningKey.prototype["public"] = null; /** * SenderSigningKey private. - * @member {Uint8Array} private + * @member {Uint8Array|null|undefined} private * @memberof proto.SenderKeyStateStructure.SenderSigningKey * @instance */ - SenderSigningKey.prototype["private"] = $util.newBuffer([]); + SenderSigningKey.prototype["private"] = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SenderSigningKey.prototype, "_public", { + get: $util.oneOfGetter($oneOfFields = ["public"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SenderSigningKey.prototype, "_private", { + get: $util.oneOfGetter($oneOfFields = ["private"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new SenderSigningKey instance using the specified properties. @@ -76136,12 +120379,14 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message["public"] = reader.bytes(); - break; - case 2: - message["private"] = reader.bytes(); - break; + case 1: { + message["public"] = reader.bytes(); + break; + } + case 2: { + message["private"] = reader.bytes(); + break; + } default: reader.skipType(tag & 7); break; @@ -76177,12 +120422,17 @@ $root.proto = (function() { SenderSigningKey.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message["public"] != null && message.hasOwnProperty("public")) + var properties = {}; + if (message["public"] != null && message.hasOwnProperty("public")) { + properties._public = 1; if (!(message["public"] && typeof message["public"].length === "number" || $util.isString(message["public"]))) return "public: buffer expected"; - if (message["private"] != null && message.hasOwnProperty("private")) + } + if (message["private"] != null && message.hasOwnProperty("private")) { + properties._private = 1; if (!(message["private"] && typeof message["private"].length === "number" || $util.isString(message["private"]))) return "private: buffer expected"; + } return null; }; @@ -76201,12 +120451,12 @@ $root.proto = (function() { if (object["public"] != null) if (typeof object["public"] === "string") $util.base64.decode(object["public"], message["public"] = $util.newBuffer($util.base64.length(object["public"])), 0); - else if (object["public"].length) + else if (object["public"].length >= 0) message["public"] = object["public"]; if (object["private"] != null) if (typeof object["private"] === "string") $util.base64.decode(object["private"], message["private"] = $util.newBuffer($util.base64.length(object["private"])), 0); - else if (object["private"].length) + else if (object["private"].length >= 0) message["private"] = object["private"]; return message; }; @@ -76224,26 +120474,16 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - if (options.bytes === String) - object["public"] = ""; - else { - object["public"] = []; - if (options.bytes !== Array) - object["public"] = $util.newBuffer(object["public"]); - } - if (options.bytes === String) - object["private"] = ""; - else { - object["private"] = []; - if (options.bytes !== Array) - object["private"] = $util.newBuffer(object["private"]); - } - } - if (message["public"] != null && message.hasOwnProperty("public")) + if (message["public"] != null && message.hasOwnProperty("public")) { object["public"] = options.bytes === String ? $util.base64.encode(message["public"], 0, message["public"].length) : options.bytes === Array ? Array.prototype.slice.call(message["public"]) : message["public"]; - if (message["private"] != null && message.hasOwnProperty("private")) + if (options.oneofs) + object._public = "public"; + } + if (message["private"] != null && message.hasOwnProperty("private")) { object["private"] = options.bytes === String ? $util.base64.encode(message["private"], 0, message["private"].length) : options.bytes === Array ? Array.prototype.slice.call(message["private"]) : message["private"]; + if (options.oneofs) + object._private = "private"; + } return object; }; @@ -76258,6 +120498,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for SenderSigningKey + * @function getTypeUrl + * @memberof proto.SenderKeyStateStructure.SenderSigningKey + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SenderSigningKey.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.SenderKeyStateStructure.SenderSigningKey"; + }; + return SenderSigningKey; })(); @@ -76290,11 +120545,20 @@ $root.proto = (function() { /** * ServerErrorReceipt stanzaId. - * @member {string} stanzaId + * @member {string|null|undefined} stanzaId * @memberof proto.ServerErrorReceipt * @instance */ - ServerErrorReceipt.prototype.stanzaId = ""; + ServerErrorReceipt.prototype.stanzaId = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ServerErrorReceipt.prototype, "_stanzaId", { + get: $util.oneOfGetter($oneOfFields = ["stanzaId"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new ServerErrorReceipt instance using the specified properties. @@ -76356,9 +120620,10 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.stanzaId = reader.string(); - break; + case 1: { + message.stanzaId = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -76394,9 +120659,12 @@ $root.proto = (function() { ServerErrorReceipt.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.stanzaId != null && message.hasOwnProperty("stanzaId")) + var properties = {}; + if (message.stanzaId != null && message.hasOwnProperty("stanzaId")) { + properties._stanzaId = 1; if (!$util.isString(message.stanzaId)) return "stanzaId: string expected"; + } return null; }; @@ -76430,10 +120698,11 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) - object.stanzaId = ""; - if (message.stanzaId != null && message.hasOwnProperty("stanzaId")) + if (message.stanzaId != null && message.hasOwnProperty("stanzaId")) { object.stanzaId = message.stanzaId; + if (options.oneofs) + object._stanzaId = "stanzaId"; + } return object; }; @@ -76448,6 +120717,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ServerErrorReceipt + * @function getTypeUrl + * @memberof proto.ServerErrorReceipt + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServerErrorReceipt.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.ServerErrorReceipt"; + }; + return ServerErrorReceipt; })(); @@ -76490,43 +120774,43 @@ $root.proto = (function() { /** * SessionStructure sessionVersion. - * @member {number} sessionVersion + * @member {number|null|undefined} sessionVersion * @memberof proto.SessionStructure * @instance */ - SessionStructure.prototype.sessionVersion = 0; + SessionStructure.prototype.sessionVersion = null; /** * SessionStructure localIdentityPublic. - * @member {Uint8Array} localIdentityPublic + * @member {Uint8Array|null|undefined} localIdentityPublic * @memberof proto.SessionStructure * @instance */ - SessionStructure.prototype.localIdentityPublic = $util.newBuffer([]); + SessionStructure.prototype.localIdentityPublic = null; /** * SessionStructure remoteIdentityPublic. - * @member {Uint8Array} remoteIdentityPublic + * @member {Uint8Array|null|undefined} remoteIdentityPublic * @memberof proto.SessionStructure * @instance */ - SessionStructure.prototype.remoteIdentityPublic = $util.newBuffer([]); + SessionStructure.prototype.remoteIdentityPublic = null; /** * SessionStructure rootKey. - * @member {Uint8Array} rootKey + * @member {Uint8Array|null|undefined} rootKey * @memberof proto.SessionStructure * @instance */ - SessionStructure.prototype.rootKey = $util.newBuffer([]); + SessionStructure.prototype.rootKey = null; /** * SessionStructure previousCounter. - * @member {number} previousCounter + * @member {number|null|undefined} previousCounter * @memberof proto.SessionStructure * @instance */ - SessionStructure.prototype.previousCounter = 0; + SessionStructure.prototype.previousCounter = null; /** * SessionStructure senderChain. @@ -76562,35 +120846,110 @@ $root.proto = (function() { /** * SessionStructure remoteRegistrationId. - * @member {number} remoteRegistrationId + * @member {number|null|undefined} remoteRegistrationId * @memberof proto.SessionStructure * @instance */ - SessionStructure.prototype.remoteRegistrationId = 0; + SessionStructure.prototype.remoteRegistrationId = null; /** * SessionStructure localRegistrationId. - * @member {number} localRegistrationId + * @member {number|null|undefined} localRegistrationId * @memberof proto.SessionStructure * @instance */ - SessionStructure.prototype.localRegistrationId = 0; + SessionStructure.prototype.localRegistrationId = null; /** * SessionStructure needsRefresh. - * @member {boolean} needsRefresh + * @member {boolean|null|undefined} needsRefresh * @memberof proto.SessionStructure * @instance */ - SessionStructure.prototype.needsRefresh = false; + SessionStructure.prototype.needsRefresh = null; /** * SessionStructure aliceBaseKey. - * @member {Uint8Array} aliceBaseKey + * @member {Uint8Array|null|undefined} aliceBaseKey * @memberof proto.SessionStructure * @instance */ - SessionStructure.prototype.aliceBaseKey = $util.newBuffer([]); + SessionStructure.prototype.aliceBaseKey = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SessionStructure.prototype, "_sessionVersion", { + get: $util.oneOfGetter($oneOfFields = ["sessionVersion"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SessionStructure.prototype, "_localIdentityPublic", { + get: $util.oneOfGetter($oneOfFields = ["localIdentityPublic"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SessionStructure.prototype, "_remoteIdentityPublic", { + get: $util.oneOfGetter($oneOfFields = ["remoteIdentityPublic"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SessionStructure.prototype, "_rootKey", { + get: $util.oneOfGetter($oneOfFields = ["rootKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SessionStructure.prototype, "_previousCounter", { + get: $util.oneOfGetter($oneOfFields = ["previousCounter"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SessionStructure.prototype, "_senderChain", { + get: $util.oneOfGetter($oneOfFields = ["senderChain"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SessionStructure.prototype, "_pendingKeyExchange", { + get: $util.oneOfGetter($oneOfFields = ["pendingKeyExchange"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SessionStructure.prototype, "_pendingPreKey", { + get: $util.oneOfGetter($oneOfFields = ["pendingPreKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SessionStructure.prototype, "_remoteRegistrationId", { + get: $util.oneOfGetter($oneOfFields = ["remoteRegistrationId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SessionStructure.prototype, "_localRegistrationId", { + get: $util.oneOfGetter($oneOfFields = ["localRegistrationId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SessionStructure.prototype, "_needsRefresh", { + get: $util.oneOfGetter($oneOfFields = ["needsRefresh"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SessionStructure.prototype, "_aliceBaseKey", { + get: $util.oneOfGetter($oneOfFields = ["aliceBaseKey"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new SessionStructure instance using the specified properties. @@ -76677,47 +121036,60 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.sessionVersion = reader.uint32(); - break; - case 2: - message.localIdentityPublic = reader.bytes(); - break; - case 3: - message.remoteIdentityPublic = reader.bytes(); - break; - case 4: - message.rootKey = reader.bytes(); - break; - case 5: - message.previousCounter = reader.uint32(); - break; - case 6: - message.senderChain = $root.proto.SessionStructure.Chain.decode(reader, reader.uint32()); - break; - case 7: - if (!(message.receiverChains && message.receiverChains.length)) - message.receiverChains = []; - message.receiverChains.push($root.proto.SessionStructure.Chain.decode(reader, reader.uint32())); - break; - case 8: - message.pendingKeyExchange = $root.proto.SessionStructure.PendingKeyExchange.decode(reader, reader.uint32()); - break; - case 9: - message.pendingPreKey = $root.proto.SessionStructure.PendingPreKey.decode(reader, reader.uint32()); - break; - case 10: - message.remoteRegistrationId = reader.uint32(); - break; - case 11: - message.localRegistrationId = reader.uint32(); - break; - case 12: - message.needsRefresh = reader.bool(); - break; - case 13: - message.aliceBaseKey = reader.bytes(); - break; + case 1: { + message.sessionVersion = reader.uint32(); + break; + } + case 2: { + message.localIdentityPublic = reader.bytes(); + break; + } + case 3: { + message.remoteIdentityPublic = reader.bytes(); + break; + } + case 4: { + message.rootKey = reader.bytes(); + break; + } + case 5: { + message.previousCounter = reader.uint32(); + break; + } + case 6: { + message.senderChain = $root.proto.SessionStructure.Chain.decode(reader, reader.uint32()); + break; + } + case 7: { + if (!(message.receiverChains && message.receiverChains.length)) + message.receiverChains = []; + message.receiverChains.push($root.proto.SessionStructure.Chain.decode(reader, reader.uint32())); + break; + } + case 8: { + message.pendingKeyExchange = $root.proto.SessionStructure.PendingKeyExchange.decode(reader, reader.uint32()); + break; + } + case 9: { + message.pendingPreKey = $root.proto.SessionStructure.PendingPreKey.decode(reader, reader.uint32()); + break; + } + case 10: { + message.remoteRegistrationId = reader.uint32(); + break; + } + case 11: { + message.localRegistrationId = reader.uint32(); + break; + } + case 12: { + message.needsRefresh = reader.bool(); + break; + } + case 13: { + message.aliceBaseKey = reader.bytes(); + break; + } default: reader.skipType(tag & 7); break; @@ -76753,25 +121125,39 @@ $root.proto = (function() { SessionStructure.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.sessionVersion != null && message.hasOwnProperty("sessionVersion")) + var properties = {}; + if (message.sessionVersion != null && message.hasOwnProperty("sessionVersion")) { + properties._sessionVersion = 1; if (!$util.isInteger(message.sessionVersion)) return "sessionVersion: integer expected"; - if (message.localIdentityPublic != null && message.hasOwnProperty("localIdentityPublic")) + } + if (message.localIdentityPublic != null && message.hasOwnProperty("localIdentityPublic")) { + properties._localIdentityPublic = 1; if (!(message.localIdentityPublic && typeof message.localIdentityPublic.length === "number" || $util.isString(message.localIdentityPublic))) return "localIdentityPublic: buffer expected"; - if (message.remoteIdentityPublic != null && message.hasOwnProperty("remoteIdentityPublic")) + } + if (message.remoteIdentityPublic != null && message.hasOwnProperty("remoteIdentityPublic")) { + properties._remoteIdentityPublic = 1; if (!(message.remoteIdentityPublic && typeof message.remoteIdentityPublic.length === "number" || $util.isString(message.remoteIdentityPublic))) return "remoteIdentityPublic: buffer expected"; - if (message.rootKey != null && message.hasOwnProperty("rootKey")) + } + if (message.rootKey != null && message.hasOwnProperty("rootKey")) { + properties._rootKey = 1; if (!(message.rootKey && typeof message.rootKey.length === "number" || $util.isString(message.rootKey))) return "rootKey: buffer expected"; - if (message.previousCounter != null && message.hasOwnProperty("previousCounter")) + } + if (message.previousCounter != null && message.hasOwnProperty("previousCounter")) { + properties._previousCounter = 1; if (!$util.isInteger(message.previousCounter)) return "previousCounter: integer expected"; + } if (message.senderChain != null && message.hasOwnProperty("senderChain")) { - var error = $root.proto.SessionStructure.Chain.verify(message.senderChain); - if (error) - return "senderChain." + error; + properties._senderChain = 1; + { + var error = $root.proto.SessionStructure.Chain.verify(message.senderChain); + if (error) + return "senderChain." + error; + } } if (message.receiverChains != null && message.hasOwnProperty("receiverChains")) { if (!Array.isArray(message.receiverChains)) @@ -76783,27 +121169,41 @@ $root.proto = (function() { } } if (message.pendingKeyExchange != null && message.hasOwnProperty("pendingKeyExchange")) { - var error = $root.proto.SessionStructure.PendingKeyExchange.verify(message.pendingKeyExchange); - if (error) - return "pendingKeyExchange." + error; + properties._pendingKeyExchange = 1; + { + var error = $root.proto.SessionStructure.PendingKeyExchange.verify(message.pendingKeyExchange); + if (error) + return "pendingKeyExchange." + error; + } } if (message.pendingPreKey != null && message.hasOwnProperty("pendingPreKey")) { - var error = $root.proto.SessionStructure.PendingPreKey.verify(message.pendingPreKey); - if (error) - return "pendingPreKey." + error; + properties._pendingPreKey = 1; + { + var error = $root.proto.SessionStructure.PendingPreKey.verify(message.pendingPreKey); + if (error) + return "pendingPreKey." + error; + } } - if (message.remoteRegistrationId != null && message.hasOwnProperty("remoteRegistrationId")) + if (message.remoteRegistrationId != null && message.hasOwnProperty("remoteRegistrationId")) { + properties._remoteRegistrationId = 1; if (!$util.isInteger(message.remoteRegistrationId)) return "remoteRegistrationId: integer expected"; - if (message.localRegistrationId != null && message.hasOwnProperty("localRegistrationId")) + } + if (message.localRegistrationId != null && message.hasOwnProperty("localRegistrationId")) { + properties._localRegistrationId = 1; if (!$util.isInteger(message.localRegistrationId)) return "localRegistrationId: integer expected"; - if (message.needsRefresh != null && message.hasOwnProperty("needsRefresh")) + } + if (message.needsRefresh != null && message.hasOwnProperty("needsRefresh")) { + properties._needsRefresh = 1; if (typeof message.needsRefresh !== "boolean") return "needsRefresh: boolean expected"; - if (message.aliceBaseKey != null && message.hasOwnProperty("aliceBaseKey")) + } + if (message.aliceBaseKey != null && message.hasOwnProperty("aliceBaseKey")) { + properties._aliceBaseKey = 1; if (!(message.aliceBaseKey && typeof message.aliceBaseKey.length === "number" || $util.isString(message.aliceBaseKey))) return "aliceBaseKey: buffer expected"; + } return null; }; @@ -76824,17 +121224,17 @@ $root.proto = (function() { if (object.localIdentityPublic != null) if (typeof object.localIdentityPublic === "string") $util.base64.decode(object.localIdentityPublic, message.localIdentityPublic = $util.newBuffer($util.base64.length(object.localIdentityPublic)), 0); - else if (object.localIdentityPublic.length) + else if (object.localIdentityPublic.length >= 0) message.localIdentityPublic = object.localIdentityPublic; if (object.remoteIdentityPublic != null) if (typeof object.remoteIdentityPublic === "string") $util.base64.decode(object.remoteIdentityPublic, message.remoteIdentityPublic = $util.newBuffer($util.base64.length(object.remoteIdentityPublic)), 0); - else if (object.remoteIdentityPublic.length) + else if (object.remoteIdentityPublic.length >= 0) message.remoteIdentityPublic = object.remoteIdentityPublic; if (object.rootKey != null) if (typeof object.rootKey === "string") $util.base64.decode(object.rootKey, message.rootKey = $util.newBuffer($util.base64.length(object.rootKey)), 0); - else if (object.rootKey.length) + else if (object.rootKey.length >= 0) message.rootKey = object.rootKey; if (object.previousCounter != null) message.previousCounter = object.previousCounter >>> 0; @@ -76872,7 +121272,7 @@ $root.proto = (function() { if (object.aliceBaseKey != null) if (typeof object.aliceBaseKey === "string") $util.base64.decode(object.aliceBaseKey, message.aliceBaseKey = $util.newBuffer($util.base64.length(object.aliceBaseKey)), 0); - else if (object.aliceBaseKey.length) + else if (object.aliceBaseKey.length >= 0) message.aliceBaseKey = object.aliceBaseKey; return message; }; @@ -76892,73 +121292,71 @@ $root.proto = (function() { var object = {}; if (options.arrays || options.defaults) object.receiverChains = []; - if (options.defaults) { - object.sessionVersion = 0; - if (options.bytes === String) - object.localIdentityPublic = ""; - else { - object.localIdentityPublic = []; - if (options.bytes !== Array) - object.localIdentityPublic = $util.newBuffer(object.localIdentityPublic); - } - if (options.bytes === String) - object.remoteIdentityPublic = ""; - else { - object.remoteIdentityPublic = []; - if (options.bytes !== Array) - object.remoteIdentityPublic = $util.newBuffer(object.remoteIdentityPublic); - } - if (options.bytes === String) - object.rootKey = ""; - else { - object.rootKey = []; - if (options.bytes !== Array) - object.rootKey = $util.newBuffer(object.rootKey); - } - object.previousCounter = 0; - object.senderChain = null; - object.pendingKeyExchange = null; - object.pendingPreKey = null; - object.remoteRegistrationId = 0; - object.localRegistrationId = 0; - object.needsRefresh = false; - if (options.bytes === String) - object.aliceBaseKey = ""; - else { - object.aliceBaseKey = []; - if (options.bytes !== Array) - object.aliceBaseKey = $util.newBuffer(object.aliceBaseKey); - } - } - if (message.sessionVersion != null && message.hasOwnProperty("sessionVersion")) + if (message.sessionVersion != null && message.hasOwnProperty("sessionVersion")) { object.sessionVersion = message.sessionVersion; - if (message.localIdentityPublic != null && message.hasOwnProperty("localIdentityPublic")) + if (options.oneofs) + object._sessionVersion = "sessionVersion"; + } + if (message.localIdentityPublic != null && message.hasOwnProperty("localIdentityPublic")) { object.localIdentityPublic = options.bytes === String ? $util.base64.encode(message.localIdentityPublic, 0, message.localIdentityPublic.length) : options.bytes === Array ? Array.prototype.slice.call(message.localIdentityPublic) : message.localIdentityPublic; - if (message.remoteIdentityPublic != null && message.hasOwnProperty("remoteIdentityPublic")) + if (options.oneofs) + object._localIdentityPublic = "localIdentityPublic"; + } + if (message.remoteIdentityPublic != null && message.hasOwnProperty("remoteIdentityPublic")) { object.remoteIdentityPublic = options.bytes === String ? $util.base64.encode(message.remoteIdentityPublic, 0, message.remoteIdentityPublic.length) : options.bytes === Array ? Array.prototype.slice.call(message.remoteIdentityPublic) : message.remoteIdentityPublic; - if (message.rootKey != null && message.hasOwnProperty("rootKey")) + if (options.oneofs) + object._remoteIdentityPublic = "remoteIdentityPublic"; + } + if (message.rootKey != null && message.hasOwnProperty("rootKey")) { object.rootKey = options.bytes === String ? $util.base64.encode(message.rootKey, 0, message.rootKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.rootKey) : message.rootKey; - if (message.previousCounter != null && message.hasOwnProperty("previousCounter")) + if (options.oneofs) + object._rootKey = "rootKey"; + } + if (message.previousCounter != null && message.hasOwnProperty("previousCounter")) { object.previousCounter = message.previousCounter; - if (message.senderChain != null && message.hasOwnProperty("senderChain")) + if (options.oneofs) + object._previousCounter = "previousCounter"; + } + if (message.senderChain != null && message.hasOwnProperty("senderChain")) { object.senderChain = $root.proto.SessionStructure.Chain.toObject(message.senderChain, options); + if (options.oneofs) + object._senderChain = "senderChain"; + } if (message.receiverChains && message.receiverChains.length) { object.receiverChains = []; for (var j = 0; j < message.receiverChains.length; ++j) object.receiverChains[j] = $root.proto.SessionStructure.Chain.toObject(message.receiverChains[j], options); } - if (message.pendingKeyExchange != null && message.hasOwnProperty("pendingKeyExchange")) + if (message.pendingKeyExchange != null && message.hasOwnProperty("pendingKeyExchange")) { object.pendingKeyExchange = $root.proto.SessionStructure.PendingKeyExchange.toObject(message.pendingKeyExchange, options); - if (message.pendingPreKey != null && message.hasOwnProperty("pendingPreKey")) + if (options.oneofs) + object._pendingKeyExchange = "pendingKeyExchange"; + } + if (message.pendingPreKey != null && message.hasOwnProperty("pendingPreKey")) { object.pendingPreKey = $root.proto.SessionStructure.PendingPreKey.toObject(message.pendingPreKey, options); - if (message.remoteRegistrationId != null && message.hasOwnProperty("remoteRegistrationId")) + if (options.oneofs) + object._pendingPreKey = "pendingPreKey"; + } + if (message.remoteRegistrationId != null && message.hasOwnProperty("remoteRegistrationId")) { object.remoteRegistrationId = message.remoteRegistrationId; - if (message.localRegistrationId != null && message.hasOwnProperty("localRegistrationId")) + if (options.oneofs) + object._remoteRegistrationId = "remoteRegistrationId"; + } + if (message.localRegistrationId != null && message.hasOwnProperty("localRegistrationId")) { object.localRegistrationId = message.localRegistrationId; - if (message.needsRefresh != null && message.hasOwnProperty("needsRefresh")) + if (options.oneofs) + object._localRegistrationId = "localRegistrationId"; + } + if (message.needsRefresh != null && message.hasOwnProperty("needsRefresh")) { object.needsRefresh = message.needsRefresh; - if (message.aliceBaseKey != null && message.hasOwnProperty("aliceBaseKey")) + if (options.oneofs) + object._needsRefresh = "needsRefresh"; + } + if (message.aliceBaseKey != null && message.hasOwnProperty("aliceBaseKey")) { object.aliceBaseKey = options.bytes === String ? $util.base64.encode(message.aliceBaseKey, 0, message.aliceBaseKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.aliceBaseKey) : message.aliceBaseKey; + if (options.oneofs) + object._aliceBaseKey = "aliceBaseKey"; + } return object; }; @@ -76973,6 +121371,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for SessionStructure + * @function getTypeUrl + * @memberof proto.SessionStructure + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SessionStructure.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.SessionStructure"; + }; + SessionStructure.Chain = (function() { /** @@ -77003,19 +121416,19 @@ $root.proto = (function() { /** * Chain senderRatchetKey. - * @member {Uint8Array} senderRatchetKey + * @member {Uint8Array|null|undefined} senderRatchetKey * @memberof proto.SessionStructure.Chain * @instance */ - Chain.prototype.senderRatchetKey = $util.newBuffer([]); + Chain.prototype.senderRatchetKey = null; /** * Chain senderRatchetKeyPrivate. - * @member {Uint8Array} senderRatchetKeyPrivate + * @member {Uint8Array|null|undefined} senderRatchetKeyPrivate * @memberof proto.SessionStructure.Chain * @instance */ - Chain.prototype.senderRatchetKeyPrivate = $util.newBuffer([]); + Chain.prototype.senderRatchetKeyPrivate = null; /** * Chain chainKey. @@ -77033,6 +121446,27 @@ $root.proto = (function() { */ Chain.prototype.messageKeys = $util.emptyArray; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Chain.prototype, "_senderRatchetKey", { + get: $util.oneOfGetter($oneOfFields = ["senderRatchetKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Chain.prototype, "_senderRatchetKeyPrivate", { + get: $util.oneOfGetter($oneOfFields = ["senderRatchetKeyPrivate"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Chain.prototype, "_chainKey", { + get: $util.oneOfGetter($oneOfFields = ["chainKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new Chain instance using the specified properties. * @function create @@ -77100,20 +121534,24 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.senderRatchetKey = reader.bytes(); - break; - case 2: - message.senderRatchetKeyPrivate = reader.bytes(); - break; - case 3: - message.chainKey = $root.proto.SessionStructure.Chain.ChainKey.decode(reader, reader.uint32()); - break; - case 4: - if (!(message.messageKeys && message.messageKeys.length)) - message.messageKeys = []; - message.messageKeys.push($root.proto.SessionStructure.Chain.MessageKey.decode(reader, reader.uint32())); - break; + case 1: { + message.senderRatchetKey = reader.bytes(); + break; + } + case 2: { + message.senderRatchetKeyPrivate = reader.bytes(); + break; + } + case 3: { + message.chainKey = $root.proto.SessionStructure.Chain.ChainKey.decode(reader, reader.uint32()); + break; + } + case 4: { + if (!(message.messageKeys && message.messageKeys.length)) + message.messageKeys = []; + message.messageKeys.push($root.proto.SessionStructure.Chain.MessageKey.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -77149,16 +121587,24 @@ $root.proto = (function() { Chain.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.senderRatchetKey != null && message.hasOwnProperty("senderRatchetKey")) + var properties = {}; + if (message.senderRatchetKey != null && message.hasOwnProperty("senderRatchetKey")) { + properties._senderRatchetKey = 1; if (!(message.senderRatchetKey && typeof message.senderRatchetKey.length === "number" || $util.isString(message.senderRatchetKey))) return "senderRatchetKey: buffer expected"; - if (message.senderRatchetKeyPrivate != null && message.hasOwnProperty("senderRatchetKeyPrivate")) + } + if (message.senderRatchetKeyPrivate != null && message.hasOwnProperty("senderRatchetKeyPrivate")) { + properties._senderRatchetKeyPrivate = 1; if (!(message.senderRatchetKeyPrivate && typeof message.senderRatchetKeyPrivate.length === "number" || $util.isString(message.senderRatchetKeyPrivate))) return "senderRatchetKeyPrivate: buffer expected"; + } if (message.chainKey != null && message.hasOwnProperty("chainKey")) { - var error = $root.proto.SessionStructure.Chain.ChainKey.verify(message.chainKey); - if (error) - return "chainKey." + error; + properties._chainKey = 1; + { + var error = $root.proto.SessionStructure.Chain.ChainKey.verify(message.chainKey); + if (error) + return "chainKey." + error; + } } if (message.messageKeys != null && message.hasOwnProperty("messageKeys")) { if (!Array.isArray(message.messageKeys)) @@ -77187,12 +121633,12 @@ $root.proto = (function() { if (object.senderRatchetKey != null) if (typeof object.senderRatchetKey === "string") $util.base64.decode(object.senderRatchetKey, message.senderRatchetKey = $util.newBuffer($util.base64.length(object.senderRatchetKey)), 0); - else if (object.senderRatchetKey.length) + else if (object.senderRatchetKey.length >= 0) message.senderRatchetKey = object.senderRatchetKey; if (object.senderRatchetKeyPrivate != null) if (typeof object.senderRatchetKeyPrivate === "string") $util.base64.decode(object.senderRatchetKeyPrivate, message.senderRatchetKeyPrivate = $util.newBuffer($util.base64.length(object.senderRatchetKeyPrivate)), 0); - else if (object.senderRatchetKeyPrivate.length) + else if (object.senderRatchetKeyPrivate.length >= 0) message.senderRatchetKeyPrivate = object.senderRatchetKeyPrivate; if (object.chainKey != null) { if (typeof object.chainKey !== "object") @@ -77227,29 +121673,21 @@ $root.proto = (function() { var object = {}; if (options.arrays || options.defaults) object.messageKeys = []; - if (options.defaults) { - if (options.bytes === String) - object.senderRatchetKey = ""; - else { - object.senderRatchetKey = []; - if (options.bytes !== Array) - object.senderRatchetKey = $util.newBuffer(object.senderRatchetKey); - } - if (options.bytes === String) - object.senderRatchetKeyPrivate = ""; - else { - object.senderRatchetKeyPrivate = []; - if (options.bytes !== Array) - object.senderRatchetKeyPrivate = $util.newBuffer(object.senderRatchetKeyPrivate); - } - object.chainKey = null; - } - if (message.senderRatchetKey != null && message.hasOwnProperty("senderRatchetKey")) + if (message.senderRatchetKey != null && message.hasOwnProperty("senderRatchetKey")) { object.senderRatchetKey = options.bytes === String ? $util.base64.encode(message.senderRatchetKey, 0, message.senderRatchetKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.senderRatchetKey) : message.senderRatchetKey; - if (message.senderRatchetKeyPrivate != null && message.hasOwnProperty("senderRatchetKeyPrivate")) + if (options.oneofs) + object._senderRatchetKey = "senderRatchetKey"; + } + if (message.senderRatchetKeyPrivate != null && message.hasOwnProperty("senderRatchetKeyPrivate")) { object.senderRatchetKeyPrivate = options.bytes === String ? $util.base64.encode(message.senderRatchetKeyPrivate, 0, message.senderRatchetKeyPrivate.length) : options.bytes === Array ? Array.prototype.slice.call(message.senderRatchetKeyPrivate) : message.senderRatchetKeyPrivate; - if (message.chainKey != null && message.hasOwnProperty("chainKey")) + if (options.oneofs) + object._senderRatchetKeyPrivate = "senderRatchetKeyPrivate"; + } + if (message.chainKey != null && message.hasOwnProperty("chainKey")) { object.chainKey = $root.proto.SessionStructure.Chain.ChainKey.toObject(message.chainKey, options); + if (options.oneofs) + object._chainKey = "chainKey"; + } if (message.messageKeys && message.messageKeys.length) { object.messageKeys = []; for (var j = 0; j < message.messageKeys.length; ++j) @@ -77269,6 +121707,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Chain + * @function getTypeUrl + * @memberof proto.SessionStructure.Chain + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Chain.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.SessionStructure.Chain"; + }; + Chain.ChainKey = (function() { /** @@ -77296,19 +121749,34 @@ $root.proto = (function() { /** * ChainKey index. - * @member {number} index + * @member {number|null|undefined} index * @memberof proto.SessionStructure.Chain.ChainKey * @instance */ - ChainKey.prototype.index = 0; + ChainKey.prototype.index = null; /** * ChainKey key. - * @member {Uint8Array} key + * @member {Uint8Array|null|undefined} key * @memberof proto.SessionStructure.Chain.ChainKey * @instance */ - ChainKey.prototype.key = $util.newBuffer([]); + ChainKey.prototype.key = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ChainKey.prototype, "_index", { + get: $util.oneOfGetter($oneOfFields = ["index"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ChainKey.prototype, "_key", { + get: $util.oneOfGetter($oneOfFields = ["key"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new ChainKey instance using the specified properties. @@ -77372,12 +121840,14 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.index = reader.uint32(); - break; - case 2: - message.key = reader.bytes(); - break; + case 1: { + message.index = reader.uint32(); + break; + } + case 2: { + message.key = reader.bytes(); + break; + } default: reader.skipType(tag & 7); break; @@ -77413,12 +121883,17 @@ $root.proto = (function() { ChainKey.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.index != null && message.hasOwnProperty("index")) + var properties = {}; + if (message.index != null && message.hasOwnProperty("index")) { + properties._index = 1; if (!$util.isInteger(message.index)) return "index: integer expected"; - if (message.key != null && message.hasOwnProperty("key")) + } + if (message.key != null && message.hasOwnProperty("key")) { + properties._key = 1; if (!(message.key && typeof message.key.length === "number" || $util.isString(message.key))) return "key: buffer expected"; + } return null; }; @@ -77439,7 +121914,7 @@ $root.proto = (function() { 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) + else if (object.key.length >= 0) message.key = object.key; return message; }; @@ -77457,20 +121932,16 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.index = 0; - if (options.bytes === String) - object.key = ""; - else { - object.key = []; - if (options.bytes !== Array) - object.key = $util.newBuffer(object.key); - } - } - if (message.index != null && message.hasOwnProperty("index")) + if (message.index != null && message.hasOwnProperty("index")) { object.index = message.index; - if (message.key != null && message.hasOwnProperty("key")) + if (options.oneofs) + object._index = "index"; + } + if (message.key != null && message.hasOwnProperty("key")) { object.key = options.bytes === String ? $util.base64.encode(message.key, 0, message.key.length) : options.bytes === Array ? Array.prototype.slice.call(message.key) : message.key; + if (options.oneofs) + object._key = "key"; + } return object; }; @@ -77485,6 +121956,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ChainKey + * @function getTypeUrl + * @memberof proto.SessionStructure.Chain.ChainKey + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ChainKey.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.SessionStructure.Chain.ChainKey"; + }; + return ChainKey; })(); @@ -77517,35 +122003,62 @@ $root.proto = (function() { /** * MessageKey index. - * @member {number} index + * @member {number|null|undefined} index * @memberof proto.SessionStructure.Chain.MessageKey * @instance */ - MessageKey.prototype.index = 0; + MessageKey.prototype.index = null; /** * MessageKey cipherKey. - * @member {Uint8Array} cipherKey + * @member {Uint8Array|null|undefined} cipherKey * @memberof proto.SessionStructure.Chain.MessageKey * @instance */ - MessageKey.prototype.cipherKey = $util.newBuffer([]); + MessageKey.prototype.cipherKey = null; /** * MessageKey macKey. - * @member {Uint8Array} macKey + * @member {Uint8Array|null|undefined} macKey * @memberof proto.SessionStructure.Chain.MessageKey * @instance */ - MessageKey.prototype.macKey = $util.newBuffer([]); + MessageKey.prototype.macKey = null; /** * MessageKey iv. - * @member {Uint8Array} iv + * @member {Uint8Array|null|undefined} iv * @memberof proto.SessionStructure.Chain.MessageKey * @instance */ - MessageKey.prototype.iv = $util.newBuffer([]); + MessageKey.prototype.iv = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MessageKey.prototype, "_index", { + get: $util.oneOfGetter($oneOfFields = ["index"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MessageKey.prototype, "_cipherKey", { + get: $util.oneOfGetter($oneOfFields = ["cipherKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MessageKey.prototype, "_macKey", { + get: $util.oneOfGetter($oneOfFields = ["macKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MessageKey.prototype, "_iv", { + get: $util.oneOfGetter($oneOfFields = ["iv"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new MessageKey instance using the specified properties. @@ -77613,18 +122126,22 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.index = reader.uint32(); - break; - case 2: - message.cipherKey = reader.bytes(); - break; - case 3: - message.macKey = reader.bytes(); - break; - case 4: - message.iv = reader.bytes(); - break; + case 1: { + message.index = reader.uint32(); + break; + } + case 2: { + message.cipherKey = reader.bytes(); + break; + } + case 3: { + message.macKey = reader.bytes(); + break; + } + case 4: { + message.iv = reader.bytes(); + break; + } default: reader.skipType(tag & 7); break; @@ -77660,18 +122177,27 @@ $root.proto = (function() { MessageKey.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.index != null && message.hasOwnProperty("index")) + var properties = {}; + if (message.index != null && message.hasOwnProperty("index")) { + properties._index = 1; if (!$util.isInteger(message.index)) return "index: integer expected"; - if (message.cipherKey != null && message.hasOwnProperty("cipherKey")) + } + if (message.cipherKey != null && message.hasOwnProperty("cipherKey")) { + properties._cipherKey = 1; if (!(message.cipherKey && typeof message.cipherKey.length === "number" || $util.isString(message.cipherKey))) return "cipherKey: buffer expected"; - if (message.macKey != null && message.hasOwnProperty("macKey")) + } + if (message.macKey != null && message.hasOwnProperty("macKey")) { + properties._macKey = 1; if (!(message.macKey && typeof message.macKey.length === "number" || $util.isString(message.macKey))) return "macKey: buffer expected"; - if (message.iv != null && message.hasOwnProperty("iv")) + } + if (message.iv != null && message.hasOwnProperty("iv")) { + properties._iv = 1; if (!(message.iv && typeof message.iv.length === "number" || $util.isString(message.iv))) return "iv: buffer expected"; + } return null; }; @@ -77692,17 +122218,17 @@ $root.proto = (function() { if (object.cipherKey != null) if (typeof object.cipherKey === "string") $util.base64.decode(object.cipherKey, message.cipherKey = $util.newBuffer($util.base64.length(object.cipherKey)), 0); - else if (object.cipherKey.length) + else if (object.cipherKey.length >= 0) message.cipherKey = object.cipherKey; if (object.macKey != null) if (typeof object.macKey === "string") $util.base64.decode(object.macKey, message.macKey = $util.newBuffer($util.base64.length(object.macKey)), 0); - else if (object.macKey.length) + else if (object.macKey.length >= 0) message.macKey = object.macKey; if (object.iv != null) if (typeof object.iv === "string") $util.base64.decode(object.iv, message.iv = $util.newBuffer($util.base64.length(object.iv)), 0); - else if (object.iv.length) + else if (object.iv.length >= 0) message.iv = object.iv; return message; }; @@ -77720,38 +122246,26 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.index = 0; - if (options.bytes === String) - object.cipherKey = ""; - else { - object.cipherKey = []; - if (options.bytes !== Array) - object.cipherKey = $util.newBuffer(object.cipherKey); - } - if (options.bytes === String) - object.macKey = ""; - else { - object.macKey = []; - if (options.bytes !== Array) - object.macKey = $util.newBuffer(object.macKey); - } - if (options.bytes === String) - object.iv = ""; - else { - object.iv = []; - if (options.bytes !== Array) - object.iv = $util.newBuffer(object.iv); - } - } - if (message.index != null && message.hasOwnProperty("index")) + if (message.index != null && message.hasOwnProperty("index")) { object.index = message.index; - if (message.cipherKey != null && message.hasOwnProperty("cipherKey")) + if (options.oneofs) + object._index = "index"; + } + if (message.cipherKey != null && message.hasOwnProperty("cipherKey")) { object.cipherKey = options.bytes === String ? $util.base64.encode(message.cipherKey, 0, message.cipherKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.cipherKey) : message.cipherKey; - if (message.macKey != null && message.hasOwnProperty("macKey")) + if (options.oneofs) + object._cipherKey = "cipherKey"; + } + if (message.macKey != null && message.hasOwnProperty("macKey")) { object.macKey = options.bytes === String ? $util.base64.encode(message.macKey, 0, message.macKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.macKey) : message.macKey; - if (message.iv != null && message.hasOwnProperty("iv")) + if (options.oneofs) + object._macKey = "macKey"; + } + if (message.iv != null && message.hasOwnProperty("iv")) { object.iv = options.bytes === String ? $util.base64.encode(message.iv, 0, message.iv.length) : options.bytes === Array ? Array.prototype.slice.call(message.iv) : message.iv; + if (options.oneofs) + object._iv = "iv"; + } return object; }; @@ -77766,6 +122280,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for MessageKey + * @function getTypeUrl + * @memberof proto.SessionStructure.Chain.MessageKey + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MessageKey.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.SessionStructure.Chain.MessageKey"; + }; + return MessageKey; })(); @@ -77804,59 +122333,104 @@ $root.proto = (function() { /** * PendingKeyExchange sequence. - * @member {number} sequence + * @member {number|null|undefined} sequence * @memberof proto.SessionStructure.PendingKeyExchange * @instance */ - PendingKeyExchange.prototype.sequence = 0; + PendingKeyExchange.prototype.sequence = null; /** * PendingKeyExchange localBaseKey. - * @member {Uint8Array} localBaseKey + * @member {Uint8Array|null|undefined} localBaseKey * @memberof proto.SessionStructure.PendingKeyExchange * @instance */ - PendingKeyExchange.prototype.localBaseKey = $util.newBuffer([]); + PendingKeyExchange.prototype.localBaseKey = null; /** * PendingKeyExchange localBaseKeyPrivate. - * @member {Uint8Array} localBaseKeyPrivate + * @member {Uint8Array|null|undefined} localBaseKeyPrivate * @memberof proto.SessionStructure.PendingKeyExchange * @instance */ - PendingKeyExchange.prototype.localBaseKeyPrivate = $util.newBuffer([]); + PendingKeyExchange.prototype.localBaseKeyPrivate = null; /** * PendingKeyExchange localRatchetKey. - * @member {Uint8Array} localRatchetKey + * @member {Uint8Array|null|undefined} localRatchetKey * @memberof proto.SessionStructure.PendingKeyExchange * @instance */ - PendingKeyExchange.prototype.localRatchetKey = $util.newBuffer([]); + PendingKeyExchange.prototype.localRatchetKey = null; /** * PendingKeyExchange localRatchetKeyPrivate. - * @member {Uint8Array} localRatchetKeyPrivate + * @member {Uint8Array|null|undefined} localRatchetKeyPrivate * @memberof proto.SessionStructure.PendingKeyExchange * @instance */ - PendingKeyExchange.prototype.localRatchetKeyPrivate = $util.newBuffer([]); + PendingKeyExchange.prototype.localRatchetKeyPrivate = null; /** * PendingKeyExchange localIdentityKey. - * @member {Uint8Array} localIdentityKey + * @member {Uint8Array|null|undefined} localIdentityKey * @memberof proto.SessionStructure.PendingKeyExchange * @instance */ - PendingKeyExchange.prototype.localIdentityKey = $util.newBuffer([]); + PendingKeyExchange.prototype.localIdentityKey = null; /** * PendingKeyExchange localIdentityKeyPrivate. - * @member {Uint8Array} localIdentityKeyPrivate + * @member {Uint8Array|null|undefined} localIdentityKeyPrivate * @memberof proto.SessionStructure.PendingKeyExchange * @instance */ - PendingKeyExchange.prototype.localIdentityKeyPrivate = $util.newBuffer([]); + PendingKeyExchange.prototype.localIdentityKeyPrivate = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PendingKeyExchange.prototype, "_sequence", { + get: $util.oneOfGetter($oneOfFields = ["sequence"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PendingKeyExchange.prototype, "_localBaseKey", { + get: $util.oneOfGetter($oneOfFields = ["localBaseKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PendingKeyExchange.prototype, "_localBaseKeyPrivate", { + get: $util.oneOfGetter($oneOfFields = ["localBaseKeyPrivate"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PendingKeyExchange.prototype, "_localRatchetKey", { + get: $util.oneOfGetter($oneOfFields = ["localRatchetKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PendingKeyExchange.prototype, "_localRatchetKeyPrivate", { + get: $util.oneOfGetter($oneOfFields = ["localRatchetKeyPrivate"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PendingKeyExchange.prototype, "_localIdentityKey", { + get: $util.oneOfGetter($oneOfFields = ["localIdentityKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PendingKeyExchange.prototype, "_localIdentityKeyPrivate", { + get: $util.oneOfGetter($oneOfFields = ["localIdentityKeyPrivate"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new PendingKeyExchange instance using the specified properties. @@ -77930,27 +122504,34 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.sequence = reader.uint32(); - break; - case 2: - message.localBaseKey = reader.bytes(); - break; - case 3: - message.localBaseKeyPrivate = reader.bytes(); - break; - case 4: - message.localRatchetKey = reader.bytes(); - break; - case 5: - message.localRatchetKeyPrivate = reader.bytes(); - break; - case 7: - message.localIdentityKey = reader.bytes(); - break; - case 8: - message.localIdentityKeyPrivate = reader.bytes(); - break; + case 1: { + message.sequence = reader.uint32(); + break; + } + case 2: { + message.localBaseKey = reader.bytes(); + break; + } + case 3: { + message.localBaseKeyPrivate = reader.bytes(); + break; + } + case 4: { + message.localRatchetKey = reader.bytes(); + break; + } + case 5: { + message.localRatchetKeyPrivate = reader.bytes(); + break; + } + case 7: { + message.localIdentityKey = reader.bytes(); + break; + } + case 8: { + message.localIdentityKeyPrivate = reader.bytes(); + break; + } default: reader.skipType(tag & 7); break; @@ -77986,27 +122567,42 @@ $root.proto = (function() { PendingKeyExchange.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.sequence != null && message.hasOwnProperty("sequence")) + var properties = {}; + if (message.sequence != null && message.hasOwnProperty("sequence")) { + properties._sequence = 1; if (!$util.isInteger(message.sequence)) return "sequence: integer expected"; - if (message.localBaseKey != null && message.hasOwnProperty("localBaseKey")) + } + if (message.localBaseKey != null && message.hasOwnProperty("localBaseKey")) { + properties._localBaseKey = 1; if (!(message.localBaseKey && typeof message.localBaseKey.length === "number" || $util.isString(message.localBaseKey))) return "localBaseKey: buffer expected"; - if (message.localBaseKeyPrivate != null && message.hasOwnProperty("localBaseKeyPrivate")) + } + if (message.localBaseKeyPrivate != null && message.hasOwnProperty("localBaseKeyPrivate")) { + properties._localBaseKeyPrivate = 1; if (!(message.localBaseKeyPrivate && typeof message.localBaseKeyPrivate.length === "number" || $util.isString(message.localBaseKeyPrivate))) return "localBaseKeyPrivate: buffer expected"; - if (message.localRatchetKey != null && message.hasOwnProperty("localRatchetKey")) + } + if (message.localRatchetKey != null && message.hasOwnProperty("localRatchetKey")) { + properties._localRatchetKey = 1; if (!(message.localRatchetKey && typeof message.localRatchetKey.length === "number" || $util.isString(message.localRatchetKey))) return "localRatchetKey: buffer expected"; - if (message.localRatchetKeyPrivate != null && message.hasOwnProperty("localRatchetKeyPrivate")) + } + if (message.localRatchetKeyPrivate != null && message.hasOwnProperty("localRatchetKeyPrivate")) { + properties._localRatchetKeyPrivate = 1; if (!(message.localRatchetKeyPrivate && typeof message.localRatchetKeyPrivate.length === "number" || $util.isString(message.localRatchetKeyPrivate))) return "localRatchetKeyPrivate: buffer expected"; - if (message.localIdentityKey != null && message.hasOwnProperty("localIdentityKey")) + } + if (message.localIdentityKey != null && message.hasOwnProperty("localIdentityKey")) { + properties._localIdentityKey = 1; if (!(message.localIdentityKey && typeof message.localIdentityKey.length === "number" || $util.isString(message.localIdentityKey))) return "localIdentityKey: buffer expected"; - if (message.localIdentityKeyPrivate != null && message.hasOwnProperty("localIdentityKeyPrivate")) + } + if (message.localIdentityKeyPrivate != null && message.hasOwnProperty("localIdentityKeyPrivate")) { + properties._localIdentityKeyPrivate = 1; if (!(message.localIdentityKeyPrivate && typeof message.localIdentityKeyPrivate.length === "number" || $util.isString(message.localIdentityKeyPrivate))) return "localIdentityKeyPrivate: buffer expected"; + } return null; }; @@ -78027,32 +122623,32 @@ $root.proto = (function() { if (object.localBaseKey != null) if (typeof object.localBaseKey === "string") $util.base64.decode(object.localBaseKey, message.localBaseKey = $util.newBuffer($util.base64.length(object.localBaseKey)), 0); - else if (object.localBaseKey.length) + else if (object.localBaseKey.length >= 0) message.localBaseKey = object.localBaseKey; if (object.localBaseKeyPrivate != null) if (typeof object.localBaseKeyPrivate === "string") $util.base64.decode(object.localBaseKeyPrivate, message.localBaseKeyPrivate = $util.newBuffer($util.base64.length(object.localBaseKeyPrivate)), 0); - else if (object.localBaseKeyPrivate.length) + else if (object.localBaseKeyPrivate.length >= 0) message.localBaseKeyPrivate = object.localBaseKeyPrivate; if (object.localRatchetKey != null) if (typeof object.localRatchetKey === "string") $util.base64.decode(object.localRatchetKey, message.localRatchetKey = $util.newBuffer($util.base64.length(object.localRatchetKey)), 0); - else if (object.localRatchetKey.length) + else if (object.localRatchetKey.length >= 0) message.localRatchetKey = object.localRatchetKey; if (object.localRatchetKeyPrivate != null) if (typeof object.localRatchetKeyPrivate === "string") $util.base64.decode(object.localRatchetKeyPrivate, message.localRatchetKeyPrivate = $util.newBuffer($util.base64.length(object.localRatchetKeyPrivate)), 0); - else if (object.localRatchetKeyPrivate.length) + else if (object.localRatchetKeyPrivate.length >= 0) message.localRatchetKeyPrivate = object.localRatchetKeyPrivate; if (object.localIdentityKey != null) if (typeof object.localIdentityKey === "string") $util.base64.decode(object.localIdentityKey, message.localIdentityKey = $util.newBuffer($util.base64.length(object.localIdentityKey)), 0); - else if (object.localIdentityKey.length) + else if (object.localIdentityKey.length >= 0) message.localIdentityKey = object.localIdentityKey; if (object.localIdentityKeyPrivate != null) if (typeof object.localIdentityKeyPrivate === "string") $util.base64.decode(object.localIdentityKeyPrivate, message.localIdentityKeyPrivate = $util.newBuffer($util.base64.length(object.localIdentityKeyPrivate)), 0); - else if (object.localIdentityKeyPrivate.length) + else if (object.localIdentityKeyPrivate.length >= 0) message.localIdentityKeyPrivate = object.localIdentityKeyPrivate; return message; }; @@ -78070,65 +122666,41 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.sequence = 0; - if (options.bytes === String) - object.localBaseKey = ""; - else { - object.localBaseKey = []; - if (options.bytes !== Array) - object.localBaseKey = $util.newBuffer(object.localBaseKey); - } - if (options.bytes === String) - object.localBaseKeyPrivate = ""; - else { - object.localBaseKeyPrivate = []; - if (options.bytes !== Array) - object.localBaseKeyPrivate = $util.newBuffer(object.localBaseKeyPrivate); - } - if (options.bytes === String) - object.localRatchetKey = ""; - else { - object.localRatchetKey = []; - if (options.bytes !== Array) - object.localRatchetKey = $util.newBuffer(object.localRatchetKey); - } - if (options.bytes === String) - object.localRatchetKeyPrivate = ""; - else { - object.localRatchetKeyPrivate = []; - if (options.bytes !== Array) - object.localRatchetKeyPrivate = $util.newBuffer(object.localRatchetKeyPrivate); - } - if (options.bytes === String) - object.localIdentityKey = ""; - else { - object.localIdentityKey = []; - if (options.bytes !== Array) - object.localIdentityKey = $util.newBuffer(object.localIdentityKey); - } - if (options.bytes === String) - object.localIdentityKeyPrivate = ""; - else { - object.localIdentityKeyPrivate = []; - if (options.bytes !== Array) - object.localIdentityKeyPrivate = $util.newBuffer(object.localIdentityKeyPrivate); - } - } - if (message.sequence != null && message.hasOwnProperty("sequence")) + if (message.sequence != null && message.hasOwnProperty("sequence")) { object.sequence = message.sequence; - if (message.localBaseKey != null && message.hasOwnProperty("localBaseKey")) + if (options.oneofs) + object._sequence = "sequence"; + } + if (message.localBaseKey != null && message.hasOwnProperty("localBaseKey")) { object.localBaseKey = options.bytes === String ? $util.base64.encode(message.localBaseKey, 0, message.localBaseKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.localBaseKey) : message.localBaseKey; - if (message.localBaseKeyPrivate != null && message.hasOwnProperty("localBaseKeyPrivate")) + if (options.oneofs) + object._localBaseKey = "localBaseKey"; + } + if (message.localBaseKeyPrivate != null && message.hasOwnProperty("localBaseKeyPrivate")) { object.localBaseKeyPrivate = options.bytes === String ? $util.base64.encode(message.localBaseKeyPrivate, 0, message.localBaseKeyPrivate.length) : options.bytes === Array ? Array.prototype.slice.call(message.localBaseKeyPrivate) : message.localBaseKeyPrivate; - if (message.localRatchetKey != null && message.hasOwnProperty("localRatchetKey")) + if (options.oneofs) + object._localBaseKeyPrivate = "localBaseKeyPrivate"; + } + if (message.localRatchetKey != null && message.hasOwnProperty("localRatchetKey")) { object.localRatchetKey = options.bytes === String ? $util.base64.encode(message.localRatchetKey, 0, message.localRatchetKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.localRatchetKey) : message.localRatchetKey; - if (message.localRatchetKeyPrivate != null && message.hasOwnProperty("localRatchetKeyPrivate")) + if (options.oneofs) + object._localRatchetKey = "localRatchetKey"; + } + if (message.localRatchetKeyPrivate != null && message.hasOwnProperty("localRatchetKeyPrivate")) { object.localRatchetKeyPrivate = options.bytes === String ? $util.base64.encode(message.localRatchetKeyPrivate, 0, message.localRatchetKeyPrivate.length) : options.bytes === Array ? Array.prototype.slice.call(message.localRatchetKeyPrivate) : message.localRatchetKeyPrivate; - if (message.localIdentityKey != null && message.hasOwnProperty("localIdentityKey")) + if (options.oneofs) + object._localRatchetKeyPrivate = "localRatchetKeyPrivate"; + } + if (message.localIdentityKey != null && message.hasOwnProperty("localIdentityKey")) { object.localIdentityKey = options.bytes === String ? $util.base64.encode(message.localIdentityKey, 0, message.localIdentityKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.localIdentityKey) : message.localIdentityKey; - if (message.localIdentityKeyPrivate != null && message.hasOwnProperty("localIdentityKeyPrivate")) + if (options.oneofs) + object._localIdentityKey = "localIdentityKey"; + } + if (message.localIdentityKeyPrivate != null && message.hasOwnProperty("localIdentityKeyPrivate")) { object.localIdentityKeyPrivate = options.bytes === String ? $util.base64.encode(message.localIdentityKeyPrivate, 0, message.localIdentityKeyPrivate.length) : options.bytes === Array ? Array.prototype.slice.call(message.localIdentityKeyPrivate) : message.localIdentityKeyPrivate; + if (options.oneofs) + object._localIdentityKeyPrivate = "localIdentityKeyPrivate"; + } return object; }; @@ -78143,6 +122715,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for PendingKeyExchange + * @function getTypeUrl + * @memberof proto.SessionStructure.PendingKeyExchange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PendingKeyExchange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.SessionStructure.PendingKeyExchange"; + }; + return PendingKeyExchange; })(); @@ -78174,27 +122761,48 @@ $root.proto = (function() { /** * PendingPreKey preKeyId. - * @member {number} preKeyId + * @member {number|null|undefined} preKeyId * @memberof proto.SessionStructure.PendingPreKey * @instance */ - PendingPreKey.prototype.preKeyId = 0; + PendingPreKey.prototype.preKeyId = null; /** * PendingPreKey signedPreKeyId. - * @member {number} signedPreKeyId + * @member {number|null|undefined} signedPreKeyId * @memberof proto.SessionStructure.PendingPreKey * @instance */ - PendingPreKey.prototype.signedPreKeyId = 0; + PendingPreKey.prototype.signedPreKeyId = null; /** * PendingPreKey baseKey. - * @member {Uint8Array} baseKey + * @member {Uint8Array|null|undefined} baseKey * @memberof proto.SessionStructure.PendingPreKey * @instance */ - PendingPreKey.prototype.baseKey = $util.newBuffer([]); + PendingPreKey.prototype.baseKey = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PendingPreKey.prototype, "_preKeyId", { + get: $util.oneOfGetter($oneOfFields = ["preKeyId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PendingPreKey.prototype, "_signedPreKeyId", { + get: $util.oneOfGetter($oneOfFields = ["signedPreKeyId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PendingPreKey.prototype, "_baseKey", { + get: $util.oneOfGetter($oneOfFields = ["baseKey"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new PendingPreKey instance using the specified properties. @@ -78260,15 +122868,18 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.preKeyId = reader.uint32(); - break; - case 3: - message.signedPreKeyId = reader.int32(); - break; - case 2: - message.baseKey = reader.bytes(); - break; + case 1: { + message.preKeyId = reader.uint32(); + break; + } + case 3: { + message.signedPreKeyId = reader.int32(); + break; + } + case 2: { + message.baseKey = reader.bytes(); + break; + } default: reader.skipType(tag & 7); break; @@ -78304,15 +122915,22 @@ $root.proto = (function() { PendingPreKey.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.preKeyId != null && message.hasOwnProperty("preKeyId")) + var properties = {}; + if (message.preKeyId != null && message.hasOwnProperty("preKeyId")) { + properties._preKeyId = 1; if (!$util.isInteger(message.preKeyId)) return "preKeyId: integer expected"; - if (message.signedPreKeyId != null && message.hasOwnProperty("signedPreKeyId")) + } + if (message.signedPreKeyId != null && message.hasOwnProperty("signedPreKeyId")) { + properties._signedPreKeyId = 1; if (!$util.isInteger(message.signedPreKeyId)) return "signedPreKeyId: integer expected"; - if (message.baseKey != null && message.hasOwnProperty("baseKey")) + } + if (message.baseKey != null && message.hasOwnProperty("baseKey")) { + properties._baseKey = 1; if (!(message.baseKey && typeof message.baseKey.length === "number" || $util.isString(message.baseKey))) return "baseKey: buffer expected"; + } return null; }; @@ -78335,7 +122953,7 @@ $root.proto = (function() { if (object.baseKey != null) if (typeof object.baseKey === "string") $util.base64.decode(object.baseKey, message.baseKey = $util.newBuffer($util.base64.length(object.baseKey)), 0); - else if (object.baseKey.length) + else if (object.baseKey.length >= 0) message.baseKey = object.baseKey; return message; }; @@ -78353,23 +122971,21 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.preKeyId = 0; - if (options.bytes === String) - object.baseKey = ""; - else { - object.baseKey = []; - if (options.bytes !== Array) - object.baseKey = $util.newBuffer(object.baseKey); - } - object.signedPreKeyId = 0; - } - if (message.preKeyId != null && message.hasOwnProperty("preKeyId")) + if (message.preKeyId != null && message.hasOwnProperty("preKeyId")) { object.preKeyId = message.preKeyId; - if (message.baseKey != null && message.hasOwnProperty("baseKey")) + if (options.oneofs) + object._preKeyId = "preKeyId"; + } + if (message.baseKey != null && message.hasOwnProperty("baseKey")) { object.baseKey = options.bytes === String ? $util.base64.encode(message.baseKey, 0, message.baseKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.baseKey) : message.baseKey; - if (message.signedPreKeyId != null && message.hasOwnProperty("signedPreKeyId")) + if (options.oneofs) + object._baseKey = "baseKey"; + } + if (message.signedPreKeyId != null && message.hasOwnProperty("signedPreKeyId")) { object.signedPreKeyId = message.signedPreKeyId; + if (options.oneofs) + object._signedPreKeyId = "signedPreKeyId"; + } return object; }; @@ -78384,6 +123000,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for PendingPreKey + * @function getTypeUrl + * @memberof proto.SessionStructure.PendingPreKey + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PendingPreKey.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.SessionStructure.PendingPreKey"; + }; + return PendingPreKey; })(); @@ -78419,35 +123050,62 @@ $root.proto = (function() { /** * SignalMessage ratchetKey. - * @member {Uint8Array} ratchetKey + * @member {Uint8Array|null|undefined} ratchetKey * @memberof proto.SignalMessage * @instance */ - SignalMessage.prototype.ratchetKey = $util.newBuffer([]); + SignalMessage.prototype.ratchetKey = null; /** * SignalMessage counter. - * @member {number} counter + * @member {number|null|undefined} counter * @memberof proto.SignalMessage * @instance */ - SignalMessage.prototype.counter = 0; + SignalMessage.prototype.counter = null; /** * SignalMessage previousCounter. - * @member {number} previousCounter + * @member {number|null|undefined} previousCounter * @memberof proto.SignalMessage * @instance */ - SignalMessage.prototype.previousCounter = 0; + SignalMessage.prototype.previousCounter = null; /** * SignalMessage ciphertext. - * @member {Uint8Array} ciphertext + * @member {Uint8Array|null|undefined} ciphertext * @memberof proto.SignalMessage * @instance */ - SignalMessage.prototype.ciphertext = $util.newBuffer([]); + SignalMessage.prototype.ciphertext = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SignalMessage.prototype, "_ratchetKey", { + get: $util.oneOfGetter($oneOfFields = ["ratchetKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SignalMessage.prototype, "_counter", { + get: $util.oneOfGetter($oneOfFields = ["counter"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SignalMessage.prototype, "_previousCounter", { + get: $util.oneOfGetter($oneOfFields = ["previousCounter"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SignalMessage.prototype, "_ciphertext", { + get: $util.oneOfGetter($oneOfFields = ["ciphertext"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new SignalMessage instance using the specified properties. @@ -78515,18 +123173,22 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.ratchetKey = reader.bytes(); - break; - case 2: - message.counter = reader.uint32(); - break; - case 3: - message.previousCounter = reader.uint32(); - break; - case 4: - message.ciphertext = reader.bytes(); - break; + case 1: { + message.ratchetKey = reader.bytes(); + break; + } + case 2: { + message.counter = reader.uint32(); + break; + } + case 3: { + message.previousCounter = reader.uint32(); + break; + } + case 4: { + message.ciphertext = reader.bytes(); + break; + } default: reader.skipType(tag & 7); break; @@ -78562,18 +123224,27 @@ $root.proto = (function() { SignalMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.ratchetKey != null && message.hasOwnProperty("ratchetKey")) + var properties = {}; + if (message.ratchetKey != null && message.hasOwnProperty("ratchetKey")) { + properties._ratchetKey = 1; if (!(message.ratchetKey && typeof message.ratchetKey.length === "number" || $util.isString(message.ratchetKey))) return "ratchetKey: buffer expected"; - if (message.counter != null && message.hasOwnProperty("counter")) + } + if (message.counter != null && message.hasOwnProperty("counter")) { + properties._counter = 1; if (!$util.isInteger(message.counter)) return "counter: integer expected"; - if (message.previousCounter != null && message.hasOwnProperty("previousCounter")) + } + if (message.previousCounter != null && message.hasOwnProperty("previousCounter")) { + properties._previousCounter = 1; if (!$util.isInteger(message.previousCounter)) return "previousCounter: integer expected"; - if (message.ciphertext != null && message.hasOwnProperty("ciphertext")) + } + if (message.ciphertext != null && message.hasOwnProperty("ciphertext")) { + properties._ciphertext = 1; if (!(message.ciphertext && typeof message.ciphertext.length === "number" || $util.isString(message.ciphertext))) return "ciphertext: buffer expected"; + } return null; }; @@ -78592,7 +123263,7 @@ $root.proto = (function() { if (object.ratchetKey != null) if (typeof object.ratchetKey === "string") $util.base64.decode(object.ratchetKey, message.ratchetKey = $util.newBuffer($util.base64.length(object.ratchetKey)), 0); - else if (object.ratchetKey.length) + else if (object.ratchetKey.length >= 0) message.ratchetKey = object.ratchetKey; if (object.counter != null) message.counter = object.counter >>> 0; @@ -78601,7 +123272,7 @@ $root.proto = (function() { if (object.ciphertext != null) if (typeof object.ciphertext === "string") $util.base64.decode(object.ciphertext, message.ciphertext = $util.newBuffer($util.base64.length(object.ciphertext)), 0); - else if (object.ciphertext.length) + else if (object.ciphertext.length >= 0) message.ciphertext = object.ciphertext; return message; }; @@ -78619,32 +123290,26 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - if (options.bytes === String) - object.ratchetKey = ""; - else { - object.ratchetKey = []; - if (options.bytes !== Array) - object.ratchetKey = $util.newBuffer(object.ratchetKey); - } - object.counter = 0; - object.previousCounter = 0; - if (options.bytes === String) - object.ciphertext = ""; - else { - object.ciphertext = []; - if (options.bytes !== Array) - object.ciphertext = $util.newBuffer(object.ciphertext); - } - } - if (message.ratchetKey != null && message.hasOwnProperty("ratchetKey")) + if (message.ratchetKey != null && message.hasOwnProperty("ratchetKey")) { object.ratchetKey = options.bytes === String ? $util.base64.encode(message.ratchetKey, 0, message.ratchetKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.ratchetKey) : message.ratchetKey; - if (message.counter != null && message.hasOwnProperty("counter")) + if (options.oneofs) + object._ratchetKey = "ratchetKey"; + } + if (message.counter != null && message.hasOwnProperty("counter")) { object.counter = message.counter; - if (message.previousCounter != null && message.hasOwnProperty("previousCounter")) + if (options.oneofs) + object._counter = "counter"; + } + if (message.previousCounter != null && message.hasOwnProperty("previousCounter")) { object.previousCounter = message.previousCounter; - if (message.ciphertext != null && message.hasOwnProperty("ciphertext")) + if (options.oneofs) + object._previousCounter = "previousCounter"; + } + if (message.ciphertext != null && message.hasOwnProperty("ciphertext")) { object.ciphertext = options.bytes === String ? $util.base64.encode(message.ciphertext, 0, message.ciphertext.length) : options.bytes === Array ? Array.prototype.slice.call(message.ciphertext) : message.ciphertext; + if (options.oneofs) + object._ciphertext = "ciphertext"; + } return object; }; @@ -78659,6 +123324,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for SignalMessage + * @function getTypeUrl + * @memberof proto.SignalMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SignalMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.SignalMessage"; + }; + return SignalMessage; })(); @@ -78692,43 +123372,76 @@ $root.proto = (function() { /** * SignedPreKeyRecordStructure id. - * @member {number} id + * @member {number|null|undefined} id * @memberof proto.SignedPreKeyRecordStructure * @instance */ - SignedPreKeyRecordStructure.prototype.id = 0; + SignedPreKeyRecordStructure.prototype.id = null; /** * SignedPreKeyRecordStructure publicKey. - * @member {Uint8Array} publicKey + * @member {Uint8Array|null|undefined} publicKey * @memberof proto.SignedPreKeyRecordStructure * @instance */ - SignedPreKeyRecordStructure.prototype.publicKey = $util.newBuffer([]); + SignedPreKeyRecordStructure.prototype.publicKey = null; /** * SignedPreKeyRecordStructure privateKey. - * @member {Uint8Array} privateKey + * @member {Uint8Array|null|undefined} privateKey * @memberof proto.SignedPreKeyRecordStructure * @instance */ - SignedPreKeyRecordStructure.prototype.privateKey = $util.newBuffer([]); + SignedPreKeyRecordStructure.prototype.privateKey = null; /** * SignedPreKeyRecordStructure signature. - * @member {Uint8Array} signature + * @member {Uint8Array|null|undefined} signature * @memberof proto.SignedPreKeyRecordStructure * @instance */ - SignedPreKeyRecordStructure.prototype.signature = $util.newBuffer([]); + SignedPreKeyRecordStructure.prototype.signature = null; /** * SignedPreKeyRecordStructure timestamp. - * @member {number|Long} timestamp + * @member {number|Long|null|undefined} timestamp * @memberof proto.SignedPreKeyRecordStructure * @instance */ - SignedPreKeyRecordStructure.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + SignedPreKeyRecordStructure.prototype.timestamp = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SignedPreKeyRecordStructure.prototype, "_id", { + get: $util.oneOfGetter($oneOfFields = ["id"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SignedPreKeyRecordStructure.prototype, "_publicKey", { + get: $util.oneOfGetter($oneOfFields = ["publicKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SignedPreKeyRecordStructure.prototype, "_privateKey", { + get: $util.oneOfGetter($oneOfFields = ["privateKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SignedPreKeyRecordStructure.prototype, "_signature", { + get: $util.oneOfGetter($oneOfFields = ["signature"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SignedPreKeyRecordStructure.prototype, "_timestamp", { + get: $util.oneOfGetter($oneOfFields = ["timestamp"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new SignedPreKeyRecordStructure instance using the specified properties. @@ -78798,21 +123511,26 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.id = reader.uint32(); - break; - case 2: - message.publicKey = reader.bytes(); - break; - case 3: - message.privateKey = reader.bytes(); - break; - case 4: - message.signature = reader.bytes(); - break; - case 5: - message.timestamp = reader.fixed64(); - break; + case 1: { + message.id = reader.uint32(); + break; + } + case 2: { + message.publicKey = reader.bytes(); + break; + } + case 3: { + message.privateKey = reader.bytes(); + break; + } + case 4: { + message.signature = reader.bytes(); + break; + } + case 5: { + message.timestamp = reader.fixed64(); + break; + } default: reader.skipType(tag & 7); break; @@ -78848,21 +123566,32 @@ $root.proto = (function() { SignedPreKeyRecordStructure.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.id != null && message.hasOwnProperty("id")) + var properties = {}; + if (message.id != null && message.hasOwnProperty("id")) { + properties._id = 1; if (!$util.isInteger(message.id)) return "id: integer expected"; - if (message.publicKey != null && message.hasOwnProperty("publicKey")) + } + if (message.publicKey != null && message.hasOwnProperty("publicKey")) { + properties._publicKey = 1; if (!(message.publicKey && typeof message.publicKey.length === "number" || $util.isString(message.publicKey))) return "publicKey: buffer expected"; - if (message.privateKey != null && message.hasOwnProperty("privateKey")) + } + if (message.privateKey != null && message.hasOwnProperty("privateKey")) { + properties._privateKey = 1; if (!(message.privateKey && typeof message.privateKey.length === "number" || $util.isString(message.privateKey))) return "privateKey: buffer expected"; - if (message.signature != null && message.hasOwnProperty("signature")) + } + if (message.signature != null && message.hasOwnProperty("signature")) { + properties._signature = 1; if (!(message.signature && typeof message.signature.length === "number" || $util.isString(message.signature))) return "signature: buffer expected"; - if (message.timestamp != null && message.hasOwnProperty("timestamp")) + } + if (message.timestamp != null && message.hasOwnProperty("timestamp")) { + properties._timestamp = 1; if (!$util.isInteger(message.timestamp) && !(message.timestamp && $util.isInteger(message.timestamp.low) && $util.isInteger(message.timestamp.high))) return "timestamp: integer|Long expected"; + } return null; }; @@ -78883,17 +123612,17 @@ $root.proto = (function() { if (object.publicKey != null) if (typeof object.publicKey === "string") $util.base64.decode(object.publicKey, message.publicKey = $util.newBuffer($util.base64.length(object.publicKey)), 0); - else if (object.publicKey.length) + else if (object.publicKey.length >= 0) message.publicKey = object.publicKey; if (object.privateKey != null) if (typeof object.privateKey === "string") $util.base64.decode(object.privateKey, message.privateKey = $util.newBuffer($util.base64.length(object.privateKey)), 0); - else if (object.privateKey.length) + else if (object.privateKey.length >= 0) message.privateKey = object.privateKey; if (object.signature != null) if (typeof object.signature === "string") $util.base64.decode(object.signature, message.signature = $util.newBuffer($util.base64.length(object.signature)), 0); - else if (object.signature.length) + else if (object.signature.length >= 0) message.signature = object.signature; if (object.timestamp != null) if ($util.Long) @@ -78920,48 +123649,34 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.id = 0; - if (options.bytes === String) - object.publicKey = ""; - else { - object.publicKey = []; - if (options.bytes !== Array) - object.publicKey = $util.newBuffer(object.publicKey); - } - if (options.bytes === String) - object.privateKey = ""; - else { - object.privateKey = []; - if (options.bytes !== Array) - object.privateKey = $util.newBuffer(object.privateKey); - } - if (options.bytes === String) - object.signature = ""; - else { - object.signature = []; - if (options.bytes !== Array) - object.signature = $util.newBuffer(object.signature); - } - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.timestamp = options.longs === String ? "0" : 0; - } - if (message.id != null && message.hasOwnProperty("id")) + if (message.id != null && message.hasOwnProperty("id")) { object.id = message.id; - if (message.publicKey != null && message.hasOwnProperty("publicKey")) + if (options.oneofs) + object._id = "id"; + } + if (message.publicKey != null && message.hasOwnProperty("publicKey")) { object.publicKey = options.bytes === String ? $util.base64.encode(message.publicKey, 0, message.publicKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.publicKey) : message.publicKey; - if (message.privateKey != null && message.hasOwnProperty("privateKey")) + if (options.oneofs) + object._publicKey = "publicKey"; + } + if (message.privateKey != null && message.hasOwnProperty("privateKey")) { object.privateKey = options.bytes === String ? $util.base64.encode(message.privateKey, 0, message.privateKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.privateKey) : message.privateKey; - if (message.signature != null && message.hasOwnProperty("signature")) + if (options.oneofs) + object._privateKey = "privateKey"; + } + if (message.signature != null && message.hasOwnProperty("signature")) { object.signature = options.bytes === String ? $util.base64.encode(message.signature, 0, message.signature.length) : options.bytes === Array ? Array.prototype.slice.call(message.signature) : message.signature; - if (message.timestamp != null && message.hasOwnProperty("timestamp")) + if (options.oneofs) + object._signature = "signature"; + } + if (message.timestamp != null && message.hasOwnProperty("timestamp")) { if (typeof message.timestamp === "number") object.timestamp = options.longs === String ? String(message.timestamp) : message.timestamp; else object.timestamp = options.longs === String ? $util.Long.prototype.toString.call(message.timestamp) : options.longs === Number ? new $util.LongBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0).toNumber() : message.timestamp; + if (options.oneofs) + object._timestamp = "timestamp"; + } return object; }; @@ -78976,9 +123691,246 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for SignedPreKeyRecordStructure + * @function getTypeUrl + * @memberof proto.SignedPreKeyRecordStructure + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SignedPreKeyRecordStructure.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.SignedPreKeyRecordStructure"; + }; + return SignedPreKeyRecordStructure; })(); + proto.StatusMentionMessage = (function() { + + /** + * Properties of a StatusMentionMessage. + * @memberof proto + * @interface IStatusMentionMessage + * @property {proto.IMessage|null} [quotedStatus] StatusMentionMessage quotedStatus + */ + + /** + * Constructs a new StatusMentionMessage. + * @memberof proto + * @classdesc Represents a StatusMentionMessage. + * @implements IStatusMentionMessage + * @constructor + * @param {proto.IStatusMentionMessage=} [properties] Properties to set + */ + function StatusMentionMessage(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StatusMentionMessage quotedStatus. + * @member {proto.IMessage|null|undefined} quotedStatus + * @memberof proto.StatusMentionMessage + * @instance + */ + StatusMentionMessage.prototype.quotedStatus = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StatusMentionMessage.prototype, "_quotedStatus", { + get: $util.oneOfGetter($oneOfFields = ["quotedStatus"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new StatusMentionMessage instance using the specified properties. + * @function create + * @memberof proto.StatusMentionMessage + * @static + * @param {proto.IStatusMentionMessage=} [properties] Properties to set + * @returns {proto.StatusMentionMessage} StatusMentionMessage instance + */ + StatusMentionMessage.create = function create(properties) { + return new StatusMentionMessage(properties); + }; + + /** + * Encodes the specified StatusMentionMessage message. Does not implicitly {@link proto.StatusMentionMessage.verify|verify} messages. + * @function encode + * @memberof proto.StatusMentionMessage + * @static + * @param {proto.IStatusMentionMessage} message StatusMentionMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StatusMentionMessage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.quotedStatus != null && Object.hasOwnProperty.call(message, "quotedStatus")) + $root.proto.Message.encode(message.quotedStatus, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified StatusMentionMessage message, length delimited. Does not implicitly {@link proto.StatusMentionMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.StatusMentionMessage + * @static + * @param {proto.IStatusMentionMessage} message StatusMentionMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StatusMentionMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StatusMentionMessage message from the specified reader or buffer. + * @function decode + * @memberof proto.StatusMentionMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.StatusMentionMessage} StatusMentionMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StatusMentionMessage.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.StatusMentionMessage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.quotedStatus = $root.proto.Message.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StatusMentionMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.StatusMentionMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.StatusMentionMessage} StatusMentionMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StatusMentionMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StatusMentionMessage message. + * @function verify + * @memberof proto.StatusMentionMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StatusMentionMessage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.quotedStatus != null && message.hasOwnProperty("quotedStatus")) { + properties._quotedStatus = 1; + { + var error = $root.proto.Message.verify(message.quotedStatus); + if (error) + return "quotedStatus." + error; + } + } + return null; + }; + + /** + * Creates a StatusMentionMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.StatusMentionMessage + * @static + * @param {Object.} object Plain object + * @returns {proto.StatusMentionMessage} StatusMentionMessage + */ + StatusMentionMessage.fromObject = function fromObject(object) { + if (object instanceof $root.proto.StatusMentionMessage) + return object; + var message = new $root.proto.StatusMentionMessage(); + if (object.quotedStatus != null) { + if (typeof object.quotedStatus !== "object") + throw TypeError(".proto.StatusMentionMessage.quotedStatus: object expected"); + message.quotedStatus = $root.proto.Message.fromObject(object.quotedStatus); + } + return message; + }; + + /** + * Creates a plain object from a StatusMentionMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.StatusMentionMessage + * @static + * @param {proto.StatusMentionMessage} message StatusMentionMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StatusMentionMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.quotedStatus != null && message.hasOwnProperty("quotedStatus")) { + object.quotedStatus = $root.proto.Message.toObject(message.quotedStatus, options); + if (options.oneofs) + object._quotedStatus = "quotedStatus"; + } + return object; + }; + + /** + * Converts this StatusMentionMessage to JSON. + * @function toJSON + * @memberof proto.StatusMentionMessage + * @instance + * @returns {Object.} JSON object + */ + StatusMentionMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StatusMentionMessage + * @function getTypeUrl + * @memberof proto.StatusMentionMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StatusMentionMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.StatusMentionMessage"; + }; + + return StatusMentionMessage; + })(); + proto.StatusPSA = (function() { /** @@ -79014,11 +123966,20 @@ $root.proto = (function() { /** * StatusPSA campaignExpirationTimestamp. - * @member {number|Long} campaignExpirationTimestamp + * @member {number|Long|null|undefined} campaignExpirationTimestamp * @memberof proto.StatusPSA * @instance */ - StatusPSA.prototype.campaignExpirationTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + StatusPSA.prototype.campaignExpirationTimestamp = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StatusPSA.prototype, "_campaignExpirationTimestamp", { + get: $util.oneOfGetter($oneOfFields = ["campaignExpirationTimestamp"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new StatusPSA instance using the specified properties. @@ -79081,12 +124042,14 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 44: - message.campaignId = reader.uint64(); - break; - case 45: - message.campaignExpirationTimestamp = reader.uint64(); - break; + case 44: { + message.campaignId = reader.uint64(); + break; + } + case 45: { + message.campaignExpirationTimestamp = reader.uint64(); + break; + } default: reader.skipType(tag & 7); break; @@ -79124,11 +124087,14 @@ $root.proto = (function() { StatusPSA.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; if (!$util.isInteger(message.campaignId) && !(message.campaignId && $util.isInteger(message.campaignId.low) && $util.isInteger(message.campaignId.high))) return "campaignId: integer|Long expected"; - if (message.campaignExpirationTimestamp != null && message.hasOwnProperty("campaignExpirationTimestamp")) + if (message.campaignExpirationTimestamp != null && message.hasOwnProperty("campaignExpirationTimestamp")) { + properties._campaignExpirationTimestamp = 1; if (!$util.isInteger(message.campaignExpirationTimestamp) && !(message.campaignExpirationTimestamp && $util.isInteger(message.campaignExpirationTimestamp.low) && $util.isInteger(message.campaignExpirationTimestamp.high))) return "campaignExpirationTimestamp: integer|Long expected"; + } return null; }; @@ -79178,28 +124144,25 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { + if (options.defaults) if ($util.Long) { var long = new $util.Long(0, 0, true); object.campaignId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.campaignId = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.campaignExpirationTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.campaignExpirationTimestamp = options.longs === String ? "0" : 0; - } if (message.campaignId != null && message.hasOwnProperty("campaignId")) if (typeof message.campaignId === "number") object.campaignId = options.longs === String ? String(message.campaignId) : message.campaignId; else object.campaignId = options.longs === String ? $util.Long.prototype.toString.call(message.campaignId) : options.longs === Number ? new $util.LongBits(message.campaignId.low >>> 0, message.campaignId.high >>> 0).toNumber(true) : message.campaignId; - if (message.campaignExpirationTimestamp != null && message.hasOwnProperty("campaignExpirationTimestamp")) + if (message.campaignExpirationTimestamp != null && message.hasOwnProperty("campaignExpirationTimestamp")) { if (typeof message.campaignExpirationTimestamp === "number") object.campaignExpirationTimestamp = options.longs === String ? String(message.campaignExpirationTimestamp) : message.campaignExpirationTimestamp; else object.campaignExpirationTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.campaignExpirationTimestamp) : options.longs === Number ? new $util.LongBits(message.campaignExpirationTimestamp.low >>> 0, message.campaignExpirationTimestamp.high >>> 0).toNumber(true) : message.campaignExpirationTimestamp; + if (options.oneofs) + object._campaignExpirationTimestamp = "campaignExpirationTimestamp"; + } return object; }; @@ -79214,6 +124177,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for StatusPSA + * @function getTypeUrl + * @memberof proto.StatusPSA + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StatusPSA.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.StatusPSA"; + }; + return StatusPSA; })(); @@ -79234,6 +124212,7 @@ $root.proto = (function() { * @property {number|Long|null} [fileLength] StickerMetadata fileLength * @property {number|null} [weight] StickerMetadata weight * @property {number|Long|null} [lastStickerSentTs] StickerMetadata lastStickerSentTs + * @property {boolean|null} [isLottie] StickerMetadata isLottie */ /** @@ -79253,91 +124232,174 @@ $root.proto = (function() { /** * StickerMetadata url. - * @member {string} url + * @member {string|null|undefined} url * @memberof proto.StickerMetadata * @instance */ - StickerMetadata.prototype.url = ""; + StickerMetadata.prototype.url = null; /** * StickerMetadata fileSha256. - * @member {Uint8Array} fileSha256 + * @member {Uint8Array|null|undefined} fileSha256 * @memberof proto.StickerMetadata * @instance */ - StickerMetadata.prototype.fileSha256 = $util.newBuffer([]); + StickerMetadata.prototype.fileSha256 = null; /** * StickerMetadata fileEncSha256. - * @member {Uint8Array} fileEncSha256 + * @member {Uint8Array|null|undefined} fileEncSha256 * @memberof proto.StickerMetadata * @instance */ - StickerMetadata.prototype.fileEncSha256 = $util.newBuffer([]); + StickerMetadata.prototype.fileEncSha256 = null; /** * StickerMetadata mediaKey. - * @member {Uint8Array} mediaKey + * @member {Uint8Array|null|undefined} mediaKey * @memberof proto.StickerMetadata * @instance */ - StickerMetadata.prototype.mediaKey = $util.newBuffer([]); + StickerMetadata.prototype.mediaKey = null; /** * StickerMetadata mimetype. - * @member {string} mimetype + * @member {string|null|undefined} mimetype * @memberof proto.StickerMetadata * @instance */ - StickerMetadata.prototype.mimetype = ""; + StickerMetadata.prototype.mimetype = null; /** * StickerMetadata height. - * @member {number} height + * @member {number|null|undefined} height * @memberof proto.StickerMetadata * @instance */ - StickerMetadata.prototype.height = 0; + StickerMetadata.prototype.height = null; /** * StickerMetadata width. - * @member {number} width + * @member {number|null|undefined} width * @memberof proto.StickerMetadata * @instance */ - StickerMetadata.prototype.width = 0; + StickerMetadata.prototype.width = null; /** * StickerMetadata directPath. - * @member {string} directPath + * @member {string|null|undefined} directPath * @memberof proto.StickerMetadata * @instance */ - StickerMetadata.prototype.directPath = ""; + StickerMetadata.prototype.directPath = null; /** * StickerMetadata fileLength. - * @member {number|Long} fileLength + * @member {number|Long|null|undefined} fileLength * @memberof proto.StickerMetadata * @instance */ - StickerMetadata.prototype.fileLength = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + StickerMetadata.prototype.fileLength = null; /** * StickerMetadata weight. - * @member {number} weight + * @member {number|null|undefined} weight * @memberof proto.StickerMetadata * @instance */ - StickerMetadata.prototype.weight = 0; + StickerMetadata.prototype.weight = null; /** * StickerMetadata lastStickerSentTs. - * @member {number|Long} lastStickerSentTs + * @member {number|Long|null|undefined} lastStickerSentTs * @memberof proto.StickerMetadata * @instance */ - StickerMetadata.prototype.lastStickerSentTs = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + StickerMetadata.prototype.lastStickerSentTs = null; + + /** + * StickerMetadata isLottie. + * @member {boolean|null|undefined} isLottie + * @memberof proto.StickerMetadata + * @instance + */ + StickerMetadata.prototype.isLottie = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StickerMetadata.prototype, "_url", { + get: $util.oneOfGetter($oneOfFields = ["url"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StickerMetadata.prototype, "_fileSha256", { + get: $util.oneOfGetter($oneOfFields = ["fileSha256"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StickerMetadata.prototype, "_fileEncSha256", { + get: $util.oneOfGetter($oneOfFields = ["fileEncSha256"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StickerMetadata.prototype, "_mediaKey", { + get: $util.oneOfGetter($oneOfFields = ["mediaKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StickerMetadata.prototype, "_mimetype", { + get: $util.oneOfGetter($oneOfFields = ["mimetype"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StickerMetadata.prototype, "_height", { + get: $util.oneOfGetter($oneOfFields = ["height"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StickerMetadata.prototype, "_width", { + get: $util.oneOfGetter($oneOfFields = ["width"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StickerMetadata.prototype, "_directPath", { + get: $util.oneOfGetter($oneOfFields = ["directPath"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StickerMetadata.prototype, "_fileLength", { + get: $util.oneOfGetter($oneOfFields = ["fileLength"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StickerMetadata.prototype, "_weight", { + get: $util.oneOfGetter($oneOfFields = ["weight"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StickerMetadata.prototype, "_lastStickerSentTs", { + get: $util.oneOfGetter($oneOfFields = ["lastStickerSentTs"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StickerMetadata.prototype, "_isLottie", { + get: $util.oneOfGetter($oneOfFields = ["isLottie"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new StickerMetadata instance using the specified properties. @@ -79385,6 +124447,8 @@ $root.proto = (function() { writer.uint32(/* id 10, wireType 5 =*/85).float(message.weight); if (message.lastStickerSentTs != null && Object.hasOwnProperty.call(message, "lastStickerSentTs")) writer.uint32(/* id 11, wireType 0 =*/88).int64(message.lastStickerSentTs); + if (message.isLottie != null && Object.hasOwnProperty.call(message, "isLottie")) + writer.uint32(/* id 12, wireType 0 =*/96).bool(message.isLottie); return writer; }; @@ -79419,39 +124483,54 @@ $root.proto = (function() { 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.weight = reader.float(); - break; - case 11: - message.lastStickerSentTs = reader.int64(); - break; + 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.weight = reader.float(); + break; + } + case 11: { + message.lastStickerSentTs = reader.int64(); + break; + } + case 12: { + message.isLottie = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -79487,39 +124566,67 @@ $root.proto = (function() { StickerMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.url != null && message.hasOwnProperty("url")) + var properties = {}; + if (message.url != null && message.hasOwnProperty("url")) { + properties._url = 1; if (!$util.isString(message.url)) return "url: string expected"; - if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) + } + if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) { + properties._fileSha256 = 1; 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 != null && message.hasOwnProperty("fileEncSha256")) { + properties._fileEncSha256 = 1; 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 != null && message.hasOwnProperty("mediaKey")) { + properties._mediaKey = 1; if (!(message.mediaKey && typeof message.mediaKey.length === "number" || $util.isString(message.mediaKey))) return "mediaKey: buffer expected"; - if (message.mimetype != null && message.hasOwnProperty("mimetype")) + } + if (message.mimetype != null && message.hasOwnProperty("mimetype")) { + properties._mimetype = 1; if (!$util.isString(message.mimetype)) return "mimetype: string expected"; - if (message.height != null && message.hasOwnProperty("height")) + } + if (message.height != null && message.hasOwnProperty("height")) { + properties._height = 1; if (!$util.isInteger(message.height)) return "height: integer expected"; - if (message.width != null && message.hasOwnProperty("width")) + } + if (message.width != null && message.hasOwnProperty("width")) { + properties._width = 1; if (!$util.isInteger(message.width)) return "width: integer expected"; - if (message.directPath != null && message.hasOwnProperty("directPath")) + } + if (message.directPath != null && message.hasOwnProperty("directPath")) { + properties._directPath = 1; if (!$util.isString(message.directPath)) return "directPath: string expected"; - if (message.fileLength != null && message.hasOwnProperty("fileLength")) + } + if (message.fileLength != null && message.hasOwnProperty("fileLength")) { + properties._fileLength = 1; if (!$util.isInteger(message.fileLength) && !(message.fileLength && $util.isInteger(message.fileLength.low) && $util.isInteger(message.fileLength.high))) return "fileLength: integer|Long expected"; - if (message.weight != null && message.hasOwnProperty("weight")) + } + if (message.weight != null && message.hasOwnProperty("weight")) { + properties._weight = 1; if (typeof message.weight !== "number") return "weight: number expected"; - if (message.lastStickerSentTs != null && message.hasOwnProperty("lastStickerSentTs")) + } + if (message.lastStickerSentTs != null && message.hasOwnProperty("lastStickerSentTs")) { + properties._lastStickerSentTs = 1; if (!$util.isInteger(message.lastStickerSentTs) && !(message.lastStickerSentTs && $util.isInteger(message.lastStickerSentTs.low) && $util.isInteger(message.lastStickerSentTs.high))) return "lastStickerSentTs: integer|Long expected"; + } + if (message.isLottie != null && message.hasOwnProperty("isLottie")) { + properties._isLottie = 1; + if (typeof message.isLottie !== "boolean") + return "isLottie: boolean expected"; + } return null; }; @@ -79540,17 +124647,17 @@ $root.proto = (function() { 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) + else if (object.fileSha256.length >= 0) 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) + else if (object.fileEncSha256.length >= 0) 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) + else if (object.mediaKey.length >= 0) message.mediaKey = object.mediaKey; if (object.mimetype != null) message.mimetype = String(object.mimetype); @@ -79580,6 +124687,8 @@ $root.proto = (function() { message.lastStickerSentTs = object.lastStickerSentTs; else if (typeof object.lastStickerSentTs === "object") message.lastStickerSentTs = new $util.LongBits(object.lastStickerSentTs.low >>> 0, object.lastStickerSentTs.high >>> 0).toNumber(); + if (object.isLottie != null) + message.isLottie = Boolean(object.isLottie); return message; }; @@ -79596,73 +124705,72 @@ $root.proto = (function() { 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; - object.weight = 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.lastStickerSentTs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.lastStickerSentTs = options.longs === String ? "0" : 0; - } - if (message.url != null && message.hasOwnProperty("url")) + if (message.url != null && message.hasOwnProperty("url")) { object.url = message.url; - if (message.fileSha256 != null && message.hasOwnProperty("fileSha256")) + if (options.oneofs) + object._url = "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")) + if (options.oneofs) + object._fileSha256 = "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")) + if (options.oneofs) + object._fileEncSha256 = "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")) + if (options.oneofs) + object._mediaKey = "mediaKey"; + } + if (message.mimetype != null && message.hasOwnProperty("mimetype")) { object.mimetype = message.mimetype; - if (message.height != null && message.hasOwnProperty("height")) + if (options.oneofs) + object._mimetype = "mimetype"; + } + if (message.height != null && message.hasOwnProperty("height")) { object.height = message.height; - if (message.width != null && message.hasOwnProperty("width")) + if (options.oneofs) + object._height = "height"; + } + if (message.width != null && message.hasOwnProperty("width")) { object.width = message.width; - if (message.directPath != null && message.hasOwnProperty("directPath")) + if (options.oneofs) + object._width = "width"; + } + if (message.directPath != null && message.hasOwnProperty("directPath")) { object.directPath = message.directPath; - if (message.fileLength != null && message.hasOwnProperty("fileLength")) + if (options.oneofs) + object._directPath = "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.weight != null && message.hasOwnProperty("weight")) + if (options.oneofs) + object._fileLength = "fileLength"; + } + if (message.weight != null && message.hasOwnProperty("weight")) { object.weight = options.json && !isFinite(message.weight) ? String(message.weight) : message.weight; - if (message.lastStickerSentTs != null && message.hasOwnProperty("lastStickerSentTs")) + if (options.oneofs) + object._weight = "weight"; + } + if (message.lastStickerSentTs != null && message.hasOwnProperty("lastStickerSentTs")) { if (typeof message.lastStickerSentTs === "number") object.lastStickerSentTs = options.longs === String ? String(message.lastStickerSentTs) : message.lastStickerSentTs; else object.lastStickerSentTs = options.longs === String ? $util.Long.prototype.toString.call(message.lastStickerSentTs) : options.longs === Number ? new $util.LongBits(message.lastStickerSentTs.low >>> 0, message.lastStickerSentTs.high >>> 0).toNumber() : message.lastStickerSentTs; + if (options.oneofs) + object._lastStickerSentTs = "lastStickerSentTs"; + } + if (message.isLottie != null && message.hasOwnProperty("isLottie")) { + object.isLottie = message.isLottie; + if (options.oneofs) + object._isLottie = "isLottie"; + } return object; }; @@ -79677,6 +124785,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for StickerMetadata + * @function getTypeUrl + * @memberof proto.StickerMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StickerMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.StickerMetadata"; + }; + return StickerMetadata; })(); @@ -79709,11 +124832,11 @@ $root.proto = (function() { /** * SyncActionData index. - * @member {Uint8Array} index + * @member {Uint8Array|null|undefined} index * @memberof proto.SyncActionData * @instance */ - SyncActionData.prototype.index = $util.newBuffer([]); + SyncActionData.prototype.index = null; /** * SyncActionData value. @@ -79725,19 +124848,46 @@ $root.proto = (function() { /** * SyncActionData padding. - * @member {Uint8Array} padding + * @member {Uint8Array|null|undefined} padding * @memberof proto.SyncActionData * @instance */ - SyncActionData.prototype.padding = $util.newBuffer([]); + SyncActionData.prototype.padding = null; /** * SyncActionData version. - * @member {number} version + * @member {number|null|undefined} version * @memberof proto.SyncActionData * @instance */ - SyncActionData.prototype.version = 0; + SyncActionData.prototype.version = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncActionData.prototype, "_index", { + get: $util.oneOfGetter($oneOfFields = ["index"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncActionData.prototype, "_value", { + get: $util.oneOfGetter($oneOfFields = ["value"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncActionData.prototype, "_padding", { + get: $util.oneOfGetter($oneOfFields = ["padding"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncActionData.prototype, "_version", { + get: $util.oneOfGetter($oneOfFields = ["version"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new SyncActionData instance using the specified properties. @@ -79805,18 +124955,22 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.index = reader.bytes(); - break; - case 2: - message.value = $root.proto.SyncActionValue.decode(reader, reader.uint32()); - break; - case 3: - message.padding = reader.bytes(); - break; - case 4: - message.version = reader.int32(); - break; + case 1: { + message.index = reader.bytes(); + break; + } + case 2: { + message.value = $root.proto.SyncActionValue.decode(reader, reader.uint32()); + break; + } + case 3: { + message.padding = reader.bytes(); + break; + } + case 4: { + message.version = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -79852,20 +125006,30 @@ $root.proto = (function() { SyncActionData.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.index != null && message.hasOwnProperty("index")) + var properties = {}; + if (message.index != null && message.hasOwnProperty("index")) { + properties._index = 1; if (!(message.index && typeof message.index.length === "number" || $util.isString(message.index))) return "index: buffer expected"; - if (message.value != null && message.hasOwnProperty("value")) { - var error = $root.proto.SyncActionValue.verify(message.value); - if (error) - return "value." + error; } - if (message.padding != null && message.hasOwnProperty("padding")) + if (message.value != null && message.hasOwnProperty("value")) { + properties._value = 1; + { + var error = $root.proto.SyncActionValue.verify(message.value); + if (error) + return "value." + error; + } + } + if (message.padding != null && message.hasOwnProperty("padding")) { + properties._padding = 1; if (!(message.padding && typeof message.padding.length === "number" || $util.isString(message.padding))) return "padding: buffer expected"; - if (message.version != null && message.hasOwnProperty("version")) + } + if (message.version != null && message.hasOwnProperty("version")) { + properties._version = 1; if (!$util.isInteger(message.version)) return "version: integer expected"; + } return null; }; @@ -79884,7 +125048,7 @@ $root.proto = (function() { if (object.index != null) if (typeof object.index === "string") $util.base64.decode(object.index, message.index = $util.newBuffer($util.base64.length(object.index)), 0); - else if (object.index.length) + else if (object.index.length >= 0) message.index = object.index; if (object.value != null) { if (typeof object.value !== "object") @@ -79894,7 +125058,7 @@ $root.proto = (function() { if (object.padding != null) if (typeof object.padding === "string") $util.base64.decode(object.padding, message.padding = $util.newBuffer($util.base64.length(object.padding)), 0); - else if (object.padding.length) + else if (object.padding.length >= 0) message.padding = object.padding; if (object.version != null) message.version = object.version | 0; @@ -79914,32 +125078,26 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - if (options.bytes === String) - object.index = ""; - else { - object.index = []; - if (options.bytes !== Array) - object.index = $util.newBuffer(object.index); - } - object.value = null; - if (options.bytes === String) - object.padding = ""; - else { - object.padding = []; - if (options.bytes !== Array) - object.padding = $util.newBuffer(object.padding); - } - object.version = 0; - } - if (message.index != null && message.hasOwnProperty("index")) + if (message.index != null && message.hasOwnProperty("index")) { object.index = options.bytes === String ? $util.base64.encode(message.index, 0, message.index.length) : options.bytes === Array ? Array.prototype.slice.call(message.index) : message.index; - if (message.value != null && message.hasOwnProperty("value")) + if (options.oneofs) + object._index = "index"; + } + if (message.value != null && message.hasOwnProperty("value")) { object.value = $root.proto.SyncActionValue.toObject(message.value, options); - if (message.padding != null && message.hasOwnProperty("padding")) + if (options.oneofs) + object._value = "value"; + } + if (message.padding != null && message.hasOwnProperty("padding")) { object.padding = options.bytes === String ? $util.base64.encode(message.padding, 0, message.padding.length) : options.bytes === Array ? Array.prototype.slice.call(message.padding) : message.padding; - if (message.version != null && message.hasOwnProperty("version")) + if (options.oneofs) + object._padding = "padding"; + } + if (message.version != null && message.hasOwnProperty("version")) { object.version = message.version; + if (options.oneofs) + object._version = "version"; + } return object; }; @@ -79954,6 +125112,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for SyncActionData + * @function getTypeUrl + * @memberof proto.SyncActionData + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SyncActionData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.SyncActionData"; + }; + return SyncActionData; })(); @@ -80006,6 +125179,17 @@ $root.proto = (function() { * @property {proto.SyncActionValue.ILabelReorderingAction|null} [labelReorderingAction] SyncActionValue labelReorderingAction * @property {proto.SyncActionValue.IPaymentInfoAction|null} [paymentInfoAction] SyncActionValue paymentInfoAction * @property {proto.SyncActionValue.ICustomPaymentMethodsAction|null} [customPaymentMethodsAction] SyncActionValue customPaymentMethodsAction + * @property {proto.SyncActionValue.ILockChatAction|null} [lockChatAction] SyncActionValue lockChatAction + * @property {proto.IChatLockSettings|null} [chatLockSettings] SyncActionValue chatLockSettings + * @property {proto.SyncActionValue.IWamoUserIdentifierAction|null} [wamoUserIdentifierAction] SyncActionValue wamoUserIdentifierAction + * @property {proto.SyncActionValue.IPrivacySettingDisableLinkPreviewsAction|null} [privacySettingDisableLinkPreviewsAction] SyncActionValue privacySettingDisableLinkPreviewsAction + * @property {proto.IDeviceCapabilities|null} [deviceCapabilities] SyncActionValue deviceCapabilities + * @property {proto.SyncActionValue.INoteEditAction|null} [noteEditAction] SyncActionValue noteEditAction + * @property {proto.SyncActionValue.IFavoritesAction|null} [favoritesAction] SyncActionValue favoritesAction + * @property {proto.SyncActionValue.IMerchantPaymentPartnerAction|null} [merchantPaymentPartnerAction] SyncActionValue merchantPaymentPartnerAction + * @property {proto.SyncActionValue.IWaffleAccountLinkStateAction|null} [waffleAccountLinkStateAction] SyncActionValue waffleAccountLinkStateAction + * @property {proto.SyncActionValue.IUsernameChatStartModeAction|null} [usernameChatStartMode] SyncActionValue usernameChatStartMode + * @property {proto.SyncActionValue.INotificationActivitySettingAction|null} [notificationActivitySettingAction] SyncActionValue notificationActivitySettingAction */ /** @@ -80025,11 +125209,11 @@ $root.proto = (function() { /** * SyncActionValue timestamp. - * @member {number|Long} timestamp + * @member {number|Long|null|undefined} timestamp * @memberof proto.SyncActionValue * @instance */ - SyncActionValue.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + SyncActionValue.prototype.timestamp = null; /** * SyncActionValue starAction. @@ -80367,6 +125551,421 @@ $root.proto = (function() { */ SyncActionValue.prototype.customPaymentMethodsAction = null; + /** + * SyncActionValue lockChatAction. + * @member {proto.SyncActionValue.ILockChatAction|null|undefined} lockChatAction + * @memberof proto.SyncActionValue + * @instance + */ + SyncActionValue.prototype.lockChatAction = null; + + /** + * SyncActionValue chatLockSettings. + * @member {proto.IChatLockSettings|null|undefined} chatLockSettings + * @memberof proto.SyncActionValue + * @instance + */ + SyncActionValue.prototype.chatLockSettings = null; + + /** + * SyncActionValue wamoUserIdentifierAction. + * @member {proto.SyncActionValue.IWamoUserIdentifierAction|null|undefined} wamoUserIdentifierAction + * @memberof proto.SyncActionValue + * @instance + */ + SyncActionValue.prototype.wamoUserIdentifierAction = null; + + /** + * SyncActionValue privacySettingDisableLinkPreviewsAction. + * @member {proto.SyncActionValue.IPrivacySettingDisableLinkPreviewsAction|null|undefined} privacySettingDisableLinkPreviewsAction + * @memberof proto.SyncActionValue + * @instance + */ + SyncActionValue.prototype.privacySettingDisableLinkPreviewsAction = null; + + /** + * SyncActionValue deviceCapabilities. + * @member {proto.IDeviceCapabilities|null|undefined} deviceCapabilities + * @memberof proto.SyncActionValue + * @instance + */ + SyncActionValue.prototype.deviceCapabilities = null; + + /** + * SyncActionValue noteEditAction. + * @member {proto.SyncActionValue.INoteEditAction|null|undefined} noteEditAction + * @memberof proto.SyncActionValue + * @instance + */ + SyncActionValue.prototype.noteEditAction = null; + + /** + * SyncActionValue favoritesAction. + * @member {proto.SyncActionValue.IFavoritesAction|null|undefined} favoritesAction + * @memberof proto.SyncActionValue + * @instance + */ + SyncActionValue.prototype.favoritesAction = null; + + /** + * SyncActionValue merchantPaymentPartnerAction. + * @member {proto.SyncActionValue.IMerchantPaymentPartnerAction|null|undefined} merchantPaymentPartnerAction + * @memberof proto.SyncActionValue + * @instance + */ + SyncActionValue.prototype.merchantPaymentPartnerAction = null; + + /** + * SyncActionValue waffleAccountLinkStateAction. + * @member {proto.SyncActionValue.IWaffleAccountLinkStateAction|null|undefined} waffleAccountLinkStateAction + * @memberof proto.SyncActionValue + * @instance + */ + SyncActionValue.prototype.waffleAccountLinkStateAction = null; + + /** + * SyncActionValue usernameChatStartMode. + * @member {proto.SyncActionValue.IUsernameChatStartModeAction|null|undefined} usernameChatStartMode + * @memberof proto.SyncActionValue + * @instance + */ + SyncActionValue.prototype.usernameChatStartMode = null; + + /** + * SyncActionValue notificationActivitySettingAction. + * @member {proto.SyncActionValue.INotificationActivitySettingAction|null|undefined} notificationActivitySettingAction + * @memberof proto.SyncActionValue + * @instance + */ + SyncActionValue.prototype.notificationActivitySettingAction = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncActionValue.prototype, "_timestamp", { + get: $util.oneOfGetter($oneOfFields = ["timestamp"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncActionValue.prototype, "_starAction", { + get: $util.oneOfGetter($oneOfFields = ["starAction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncActionValue.prototype, "_contactAction", { + get: $util.oneOfGetter($oneOfFields = ["contactAction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncActionValue.prototype, "_muteAction", { + get: $util.oneOfGetter($oneOfFields = ["muteAction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncActionValue.prototype, "_pinAction", { + get: $util.oneOfGetter($oneOfFields = ["pinAction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncActionValue.prototype, "_securityNotificationSetting", { + get: $util.oneOfGetter($oneOfFields = ["securityNotificationSetting"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncActionValue.prototype, "_pushNameSetting", { + get: $util.oneOfGetter($oneOfFields = ["pushNameSetting"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncActionValue.prototype, "_quickReplyAction", { + get: $util.oneOfGetter($oneOfFields = ["quickReplyAction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncActionValue.prototype, "_recentEmojiWeightsAction", { + get: $util.oneOfGetter($oneOfFields = ["recentEmojiWeightsAction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncActionValue.prototype, "_labelEditAction", { + get: $util.oneOfGetter($oneOfFields = ["labelEditAction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncActionValue.prototype, "_labelAssociationAction", { + get: $util.oneOfGetter($oneOfFields = ["labelAssociationAction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncActionValue.prototype, "_localeSetting", { + get: $util.oneOfGetter($oneOfFields = ["localeSetting"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncActionValue.prototype, "_archiveChatAction", { + get: $util.oneOfGetter($oneOfFields = ["archiveChatAction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncActionValue.prototype, "_deleteMessageForMeAction", { + get: $util.oneOfGetter($oneOfFields = ["deleteMessageForMeAction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncActionValue.prototype, "_keyExpiration", { + get: $util.oneOfGetter($oneOfFields = ["keyExpiration"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncActionValue.prototype, "_markChatAsReadAction", { + get: $util.oneOfGetter($oneOfFields = ["markChatAsReadAction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncActionValue.prototype, "_clearChatAction", { + get: $util.oneOfGetter($oneOfFields = ["clearChatAction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncActionValue.prototype, "_deleteChatAction", { + get: $util.oneOfGetter($oneOfFields = ["deleteChatAction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncActionValue.prototype, "_unarchiveChatsSetting", { + get: $util.oneOfGetter($oneOfFields = ["unarchiveChatsSetting"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncActionValue.prototype, "_primaryFeature", { + get: $util.oneOfGetter($oneOfFields = ["primaryFeature"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncActionValue.prototype, "_androidUnsupportedActions", { + get: $util.oneOfGetter($oneOfFields = ["androidUnsupportedActions"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncActionValue.prototype, "_agentAction", { + get: $util.oneOfGetter($oneOfFields = ["agentAction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncActionValue.prototype, "_subscriptionAction", { + get: $util.oneOfGetter($oneOfFields = ["subscriptionAction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncActionValue.prototype, "_userStatusMuteAction", { + get: $util.oneOfGetter($oneOfFields = ["userStatusMuteAction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncActionValue.prototype, "_timeFormatAction", { + get: $util.oneOfGetter($oneOfFields = ["timeFormatAction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncActionValue.prototype, "_nuxAction", { + get: $util.oneOfGetter($oneOfFields = ["nuxAction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncActionValue.prototype, "_primaryVersionAction", { + get: $util.oneOfGetter($oneOfFields = ["primaryVersionAction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncActionValue.prototype, "_stickerAction", { + get: $util.oneOfGetter($oneOfFields = ["stickerAction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncActionValue.prototype, "_removeRecentStickerAction", { + get: $util.oneOfGetter($oneOfFields = ["removeRecentStickerAction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncActionValue.prototype, "_chatAssignment", { + get: $util.oneOfGetter($oneOfFields = ["chatAssignment"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncActionValue.prototype, "_chatAssignmentOpenedStatus", { + get: $util.oneOfGetter($oneOfFields = ["chatAssignmentOpenedStatus"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncActionValue.prototype, "_pnForLidChatAction", { + get: $util.oneOfGetter($oneOfFields = ["pnForLidChatAction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncActionValue.prototype, "_marketingMessageAction", { + get: $util.oneOfGetter($oneOfFields = ["marketingMessageAction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncActionValue.prototype, "_marketingMessageBroadcastAction", { + get: $util.oneOfGetter($oneOfFields = ["marketingMessageBroadcastAction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncActionValue.prototype, "_externalWebBetaAction", { + get: $util.oneOfGetter($oneOfFields = ["externalWebBetaAction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncActionValue.prototype, "_privacySettingRelayAllCalls", { + get: $util.oneOfGetter($oneOfFields = ["privacySettingRelayAllCalls"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncActionValue.prototype, "_callLogAction", { + get: $util.oneOfGetter($oneOfFields = ["callLogAction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncActionValue.prototype, "_statusPrivacy", { + get: $util.oneOfGetter($oneOfFields = ["statusPrivacy"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncActionValue.prototype, "_botWelcomeRequestAction", { + get: $util.oneOfGetter($oneOfFields = ["botWelcomeRequestAction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncActionValue.prototype, "_deleteIndividualCallLog", { + get: $util.oneOfGetter($oneOfFields = ["deleteIndividualCallLog"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncActionValue.prototype, "_labelReorderingAction", { + get: $util.oneOfGetter($oneOfFields = ["labelReorderingAction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncActionValue.prototype, "_paymentInfoAction", { + get: $util.oneOfGetter($oneOfFields = ["paymentInfoAction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncActionValue.prototype, "_customPaymentMethodsAction", { + get: $util.oneOfGetter($oneOfFields = ["customPaymentMethodsAction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncActionValue.prototype, "_lockChatAction", { + get: $util.oneOfGetter($oneOfFields = ["lockChatAction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncActionValue.prototype, "_chatLockSettings", { + get: $util.oneOfGetter($oneOfFields = ["chatLockSettings"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncActionValue.prototype, "_wamoUserIdentifierAction", { + get: $util.oneOfGetter($oneOfFields = ["wamoUserIdentifierAction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncActionValue.prototype, "_privacySettingDisableLinkPreviewsAction", { + get: $util.oneOfGetter($oneOfFields = ["privacySettingDisableLinkPreviewsAction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncActionValue.prototype, "_deviceCapabilities", { + get: $util.oneOfGetter($oneOfFields = ["deviceCapabilities"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncActionValue.prototype, "_noteEditAction", { + get: $util.oneOfGetter($oneOfFields = ["noteEditAction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncActionValue.prototype, "_favoritesAction", { + get: $util.oneOfGetter($oneOfFields = ["favoritesAction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncActionValue.prototype, "_merchantPaymentPartnerAction", { + get: $util.oneOfGetter($oneOfFields = ["merchantPaymentPartnerAction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncActionValue.prototype, "_waffleAccountLinkStateAction", { + get: $util.oneOfGetter($oneOfFields = ["waffleAccountLinkStateAction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncActionValue.prototype, "_usernameChatStartMode", { + get: $util.oneOfGetter($oneOfFields = ["usernameChatStartMode"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncActionValue.prototype, "_notificationActivitySettingAction", { + get: $util.oneOfGetter($oneOfFields = ["notificationActivitySettingAction"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new SyncActionValue instance using the specified properties. * @function create @@ -80477,6 +126076,28 @@ $root.proto = (function() { $root.proto.SyncActionValue.PaymentInfoAction.encode(message.paymentInfoAction, writer.uint32(/* id 48, wireType 2 =*/386).fork()).ldelim(); if (message.customPaymentMethodsAction != null && Object.hasOwnProperty.call(message, "customPaymentMethodsAction")) $root.proto.SyncActionValue.CustomPaymentMethodsAction.encode(message.customPaymentMethodsAction, writer.uint32(/* id 49, wireType 2 =*/394).fork()).ldelim(); + if (message.lockChatAction != null && Object.hasOwnProperty.call(message, "lockChatAction")) + $root.proto.SyncActionValue.LockChatAction.encode(message.lockChatAction, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); + if (message.chatLockSettings != null && Object.hasOwnProperty.call(message, "chatLockSettings")) + $root.proto.ChatLockSettings.encode(message.chatLockSettings, writer.uint32(/* id 51, wireType 2 =*/410).fork()).ldelim(); + if (message.wamoUserIdentifierAction != null && Object.hasOwnProperty.call(message, "wamoUserIdentifierAction")) + $root.proto.SyncActionValue.WamoUserIdentifierAction.encode(message.wamoUserIdentifierAction, writer.uint32(/* id 52, wireType 2 =*/418).fork()).ldelim(); + if (message.privacySettingDisableLinkPreviewsAction != null && Object.hasOwnProperty.call(message, "privacySettingDisableLinkPreviewsAction")) + $root.proto.SyncActionValue.PrivacySettingDisableLinkPreviewsAction.encode(message.privacySettingDisableLinkPreviewsAction, writer.uint32(/* id 53, wireType 2 =*/426).fork()).ldelim(); + if (message.deviceCapabilities != null && Object.hasOwnProperty.call(message, "deviceCapabilities")) + $root.proto.DeviceCapabilities.encode(message.deviceCapabilities, writer.uint32(/* id 54, wireType 2 =*/434).fork()).ldelim(); + if (message.noteEditAction != null && Object.hasOwnProperty.call(message, "noteEditAction")) + $root.proto.SyncActionValue.NoteEditAction.encode(message.noteEditAction, writer.uint32(/* id 55, wireType 2 =*/442).fork()).ldelim(); + if (message.favoritesAction != null && Object.hasOwnProperty.call(message, "favoritesAction")) + $root.proto.SyncActionValue.FavoritesAction.encode(message.favoritesAction, writer.uint32(/* id 56, wireType 2 =*/450).fork()).ldelim(); + if (message.merchantPaymentPartnerAction != null && Object.hasOwnProperty.call(message, "merchantPaymentPartnerAction")) + $root.proto.SyncActionValue.MerchantPaymentPartnerAction.encode(message.merchantPaymentPartnerAction, writer.uint32(/* id 57, wireType 2 =*/458).fork()).ldelim(); + if (message.waffleAccountLinkStateAction != null && Object.hasOwnProperty.call(message, "waffleAccountLinkStateAction")) + $root.proto.SyncActionValue.WaffleAccountLinkStateAction.encode(message.waffleAccountLinkStateAction, writer.uint32(/* id 58, wireType 2 =*/466).fork()).ldelim(); + if (message.usernameChatStartMode != null && Object.hasOwnProperty.call(message, "usernameChatStartMode")) + $root.proto.SyncActionValue.UsernameChatStartModeAction.encode(message.usernameChatStartMode, writer.uint32(/* id 59, wireType 2 =*/474).fork()).ldelim(); + if (message.notificationActivitySettingAction != null && Object.hasOwnProperty.call(message, "notificationActivitySettingAction")) + $root.proto.SyncActionValue.NotificationActivitySettingAction.encode(message.notificationActivitySettingAction, writer.uint32(/* id 60, wireType 2 =*/482).fork()).ldelim(); return writer; }; @@ -80511,135 +126132,222 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.timestamp = reader.int64(); - break; - case 2: - message.starAction = $root.proto.SyncActionValue.StarAction.decode(reader, reader.uint32()); - break; - case 3: - message.contactAction = $root.proto.SyncActionValue.ContactAction.decode(reader, reader.uint32()); - break; - case 4: - message.muteAction = $root.proto.SyncActionValue.MuteAction.decode(reader, reader.uint32()); - break; - case 5: - message.pinAction = $root.proto.SyncActionValue.PinAction.decode(reader, reader.uint32()); - break; - case 6: - message.securityNotificationSetting = $root.proto.SyncActionValue.SecurityNotificationSetting.decode(reader, reader.uint32()); - break; - case 7: - message.pushNameSetting = $root.proto.SyncActionValue.PushNameSetting.decode(reader, reader.uint32()); - break; - case 8: - message.quickReplyAction = $root.proto.SyncActionValue.QuickReplyAction.decode(reader, reader.uint32()); - break; - case 11: - message.recentEmojiWeightsAction = $root.proto.SyncActionValue.RecentEmojiWeightsAction.decode(reader, reader.uint32()); - break; - case 14: - message.labelEditAction = $root.proto.SyncActionValue.LabelEditAction.decode(reader, reader.uint32()); - break; - case 15: - message.labelAssociationAction = $root.proto.SyncActionValue.LabelAssociationAction.decode(reader, reader.uint32()); - break; - case 16: - message.localeSetting = $root.proto.SyncActionValue.LocaleSetting.decode(reader, reader.uint32()); - break; - case 17: - message.archiveChatAction = $root.proto.SyncActionValue.ArchiveChatAction.decode(reader, reader.uint32()); - break; - case 18: - message.deleteMessageForMeAction = $root.proto.SyncActionValue.DeleteMessageForMeAction.decode(reader, reader.uint32()); - break; - case 19: - message.keyExpiration = $root.proto.SyncActionValue.KeyExpiration.decode(reader, reader.uint32()); - break; - case 20: - message.markChatAsReadAction = $root.proto.SyncActionValue.MarkChatAsReadAction.decode(reader, reader.uint32()); - break; - case 21: - message.clearChatAction = $root.proto.SyncActionValue.ClearChatAction.decode(reader, reader.uint32()); - break; - case 22: - message.deleteChatAction = $root.proto.SyncActionValue.DeleteChatAction.decode(reader, reader.uint32()); - break; - case 23: - message.unarchiveChatsSetting = $root.proto.SyncActionValue.UnarchiveChatsSetting.decode(reader, reader.uint32()); - break; - case 24: - message.primaryFeature = $root.proto.SyncActionValue.PrimaryFeature.decode(reader, reader.uint32()); - break; - case 26: - message.androidUnsupportedActions = $root.proto.SyncActionValue.AndroidUnsupportedActions.decode(reader, reader.uint32()); - break; - case 27: - message.agentAction = $root.proto.SyncActionValue.AgentAction.decode(reader, reader.uint32()); - break; - case 28: - message.subscriptionAction = $root.proto.SyncActionValue.SubscriptionAction.decode(reader, reader.uint32()); - break; - case 29: - message.userStatusMuteAction = $root.proto.SyncActionValue.UserStatusMuteAction.decode(reader, reader.uint32()); - break; - case 30: - message.timeFormatAction = $root.proto.SyncActionValue.TimeFormatAction.decode(reader, reader.uint32()); - break; - case 31: - 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; - case 34: - message.removeRecentStickerAction = $root.proto.SyncActionValue.RemoveRecentStickerAction.decode(reader, reader.uint32()); - break; - case 35: - message.chatAssignment = $root.proto.SyncActionValue.ChatAssignmentAction.decode(reader, reader.uint32()); - break; - case 36: - message.chatAssignmentOpenedStatus = $root.proto.SyncActionValue.ChatAssignmentOpenedStatusAction.decode(reader, reader.uint32()); - break; - case 37: - message.pnForLidChatAction = $root.proto.SyncActionValue.PnForLidChatAction.decode(reader, reader.uint32()); - break; - case 38: - message.marketingMessageAction = $root.proto.SyncActionValue.MarketingMessageAction.decode(reader, reader.uint32()); - break; - case 39: - message.marketingMessageBroadcastAction = $root.proto.SyncActionValue.MarketingMessageBroadcastAction.decode(reader, reader.uint32()); - break; - case 40: - message.externalWebBetaAction = $root.proto.SyncActionValue.ExternalWebBetaAction.decode(reader, reader.uint32()); - break; - case 41: - message.privacySettingRelayAllCalls = $root.proto.SyncActionValue.PrivacySettingRelayAllCalls.decode(reader, reader.uint32()); - break; - case 42: - message.callLogAction = $root.proto.SyncActionValue.CallLogAction.decode(reader, reader.uint32()); - break; - case 44: - message.statusPrivacy = $root.proto.SyncActionValue.StatusPrivacyAction.decode(reader, reader.uint32()); - break; - case 45: - message.botWelcomeRequestAction = $root.proto.SyncActionValue.BotWelcomeRequestAction.decode(reader, reader.uint32()); - break; - case 46: - message.deleteIndividualCallLog = $root.proto.SyncActionValue.DeleteIndividualCallLogAction.decode(reader, reader.uint32()); - break; - case 47: - message.labelReorderingAction = $root.proto.SyncActionValue.LabelReorderingAction.decode(reader, reader.uint32()); - break; - case 48: - message.paymentInfoAction = $root.proto.SyncActionValue.PaymentInfoAction.decode(reader, reader.uint32()); - break; - case 49: - message.customPaymentMethodsAction = $root.proto.SyncActionValue.CustomPaymentMethodsAction.decode(reader, reader.uint32()); - break; + case 1: { + message.timestamp = reader.int64(); + break; + } + case 2: { + message.starAction = $root.proto.SyncActionValue.StarAction.decode(reader, reader.uint32()); + break; + } + case 3: { + message.contactAction = $root.proto.SyncActionValue.ContactAction.decode(reader, reader.uint32()); + break; + } + case 4: { + message.muteAction = $root.proto.SyncActionValue.MuteAction.decode(reader, reader.uint32()); + break; + } + case 5: { + message.pinAction = $root.proto.SyncActionValue.PinAction.decode(reader, reader.uint32()); + break; + } + case 6: { + message.securityNotificationSetting = $root.proto.SyncActionValue.SecurityNotificationSetting.decode(reader, reader.uint32()); + break; + } + case 7: { + message.pushNameSetting = $root.proto.SyncActionValue.PushNameSetting.decode(reader, reader.uint32()); + break; + } + case 8: { + message.quickReplyAction = $root.proto.SyncActionValue.QuickReplyAction.decode(reader, reader.uint32()); + break; + } + case 11: { + message.recentEmojiWeightsAction = $root.proto.SyncActionValue.RecentEmojiWeightsAction.decode(reader, reader.uint32()); + break; + } + case 14: { + message.labelEditAction = $root.proto.SyncActionValue.LabelEditAction.decode(reader, reader.uint32()); + break; + } + case 15: { + message.labelAssociationAction = $root.proto.SyncActionValue.LabelAssociationAction.decode(reader, reader.uint32()); + break; + } + case 16: { + message.localeSetting = $root.proto.SyncActionValue.LocaleSetting.decode(reader, reader.uint32()); + break; + } + case 17: { + message.archiveChatAction = $root.proto.SyncActionValue.ArchiveChatAction.decode(reader, reader.uint32()); + break; + } + case 18: { + message.deleteMessageForMeAction = $root.proto.SyncActionValue.DeleteMessageForMeAction.decode(reader, reader.uint32()); + break; + } + case 19: { + message.keyExpiration = $root.proto.SyncActionValue.KeyExpiration.decode(reader, reader.uint32()); + break; + } + case 20: { + message.markChatAsReadAction = $root.proto.SyncActionValue.MarkChatAsReadAction.decode(reader, reader.uint32()); + break; + } + case 21: { + message.clearChatAction = $root.proto.SyncActionValue.ClearChatAction.decode(reader, reader.uint32()); + break; + } + case 22: { + message.deleteChatAction = $root.proto.SyncActionValue.DeleteChatAction.decode(reader, reader.uint32()); + break; + } + case 23: { + message.unarchiveChatsSetting = $root.proto.SyncActionValue.UnarchiveChatsSetting.decode(reader, reader.uint32()); + break; + } + case 24: { + message.primaryFeature = $root.proto.SyncActionValue.PrimaryFeature.decode(reader, reader.uint32()); + break; + } + case 26: { + message.androidUnsupportedActions = $root.proto.SyncActionValue.AndroidUnsupportedActions.decode(reader, reader.uint32()); + break; + } + case 27: { + message.agentAction = $root.proto.SyncActionValue.AgentAction.decode(reader, reader.uint32()); + break; + } + case 28: { + message.subscriptionAction = $root.proto.SyncActionValue.SubscriptionAction.decode(reader, reader.uint32()); + break; + } + case 29: { + message.userStatusMuteAction = $root.proto.SyncActionValue.UserStatusMuteAction.decode(reader, reader.uint32()); + break; + } + case 30: { + message.timeFormatAction = $root.proto.SyncActionValue.TimeFormatAction.decode(reader, reader.uint32()); + break; + } + case 31: { + 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; + } + case 34: { + message.removeRecentStickerAction = $root.proto.SyncActionValue.RemoveRecentStickerAction.decode(reader, reader.uint32()); + break; + } + case 35: { + message.chatAssignment = $root.proto.SyncActionValue.ChatAssignmentAction.decode(reader, reader.uint32()); + break; + } + case 36: { + message.chatAssignmentOpenedStatus = $root.proto.SyncActionValue.ChatAssignmentOpenedStatusAction.decode(reader, reader.uint32()); + break; + } + case 37: { + message.pnForLidChatAction = $root.proto.SyncActionValue.PnForLidChatAction.decode(reader, reader.uint32()); + break; + } + case 38: { + message.marketingMessageAction = $root.proto.SyncActionValue.MarketingMessageAction.decode(reader, reader.uint32()); + break; + } + case 39: { + message.marketingMessageBroadcastAction = $root.proto.SyncActionValue.MarketingMessageBroadcastAction.decode(reader, reader.uint32()); + break; + } + case 40: { + message.externalWebBetaAction = $root.proto.SyncActionValue.ExternalWebBetaAction.decode(reader, reader.uint32()); + break; + } + case 41: { + message.privacySettingRelayAllCalls = $root.proto.SyncActionValue.PrivacySettingRelayAllCalls.decode(reader, reader.uint32()); + break; + } + case 42: { + message.callLogAction = $root.proto.SyncActionValue.CallLogAction.decode(reader, reader.uint32()); + break; + } + case 44: { + message.statusPrivacy = $root.proto.SyncActionValue.StatusPrivacyAction.decode(reader, reader.uint32()); + break; + } + case 45: { + message.botWelcomeRequestAction = $root.proto.SyncActionValue.BotWelcomeRequestAction.decode(reader, reader.uint32()); + break; + } + case 46: { + message.deleteIndividualCallLog = $root.proto.SyncActionValue.DeleteIndividualCallLogAction.decode(reader, reader.uint32()); + break; + } + case 47: { + message.labelReorderingAction = $root.proto.SyncActionValue.LabelReorderingAction.decode(reader, reader.uint32()); + break; + } + case 48: { + message.paymentInfoAction = $root.proto.SyncActionValue.PaymentInfoAction.decode(reader, reader.uint32()); + break; + } + case 49: { + message.customPaymentMethodsAction = $root.proto.SyncActionValue.CustomPaymentMethodsAction.decode(reader, reader.uint32()); + break; + } + case 50: { + message.lockChatAction = $root.proto.SyncActionValue.LockChatAction.decode(reader, reader.uint32()); + break; + } + case 51: { + message.chatLockSettings = $root.proto.ChatLockSettings.decode(reader, reader.uint32()); + break; + } + case 52: { + message.wamoUserIdentifierAction = $root.proto.SyncActionValue.WamoUserIdentifierAction.decode(reader, reader.uint32()); + break; + } + case 53: { + message.privacySettingDisableLinkPreviewsAction = $root.proto.SyncActionValue.PrivacySettingDisableLinkPreviewsAction.decode(reader, reader.uint32()); + break; + } + case 54: { + message.deviceCapabilities = $root.proto.DeviceCapabilities.decode(reader, reader.uint32()); + break; + } + case 55: { + message.noteEditAction = $root.proto.SyncActionValue.NoteEditAction.decode(reader, reader.uint32()); + break; + } + case 56: { + message.favoritesAction = $root.proto.SyncActionValue.FavoritesAction.decode(reader, reader.uint32()); + break; + } + case 57: { + message.merchantPaymentPartnerAction = $root.proto.SyncActionValue.MerchantPaymentPartnerAction.decode(reader, reader.uint32()); + break; + } + case 58: { + message.waffleAccountLinkStateAction = $root.proto.SyncActionValue.WaffleAccountLinkStateAction.decode(reader, reader.uint32()); + break; + } + case 59: { + message.usernameChatStartMode = $root.proto.SyncActionValue.UsernameChatStartModeAction.decode(reader, reader.uint32()); + break; + } + case 60: { + message.notificationActivitySettingAction = $root.proto.SyncActionValue.NotificationActivitySettingAction.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -80675,218 +126383,435 @@ $root.proto = (function() { SyncActionValue.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.timestamp != null && message.hasOwnProperty("timestamp")) + var properties = {}; + if (message.timestamp != null && message.hasOwnProperty("timestamp")) { + properties._timestamp = 1; 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.SyncActionValue.StarAction.verify(message.starAction); - if (error) - return "starAction." + error; + properties._starAction = 1; + { + 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.SyncActionValue.ContactAction.verify(message.contactAction); - if (error) - return "contactAction." + error; + properties._contactAction = 1; + { + 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.SyncActionValue.MuteAction.verify(message.muteAction); - if (error) - return "muteAction." + error; + properties._muteAction = 1; + { + 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.SyncActionValue.PinAction.verify(message.pinAction); - if (error) - return "pinAction." + error; + properties._pinAction = 1; + { + 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.SyncActionValue.SecurityNotificationSetting.verify(message.securityNotificationSetting); - if (error) - return "securityNotificationSetting." + error; + properties._securityNotificationSetting = 1; + { + 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.SyncActionValue.PushNameSetting.verify(message.pushNameSetting); - if (error) - return "pushNameSetting." + error; + properties._pushNameSetting = 1; + { + 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.SyncActionValue.QuickReplyAction.verify(message.quickReplyAction); - if (error) - return "quickReplyAction." + error; + properties._quickReplyAction = 1; + { + var error = $root.proto.SyncActionValue.QuickReplyAction.verify(message.quickReplyAction); + if (error) + return "quickReplyAction." + error; + } } if (message.recentEmojiWeightsAction != null && message.hasOwnProperty("recentEmojiWeightsAction")) { - var error = $root.proto.SyncActionValue.RecentEmojiWeightsAction.verify(message.recentEmojiWeightsAction); - if (error) - return "recentEmojiWeightsAction." + error; + properties._recentEmojiWeightsAction = 1; + { + 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.SyncActionValue.LabelEditAction.verify(message.labelEditAction); - if (error) - return "labelEditAction." + error; + properties._labelEditAction = 1; + { + 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.SyncActionValue.LabelAssociationAction.verify(message.labelAssociationAction); - if (error) - return "labelAssociationAction." + error; + properties._labelAssociationAction = 1; + { + 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.SyncActionValue.LocaleSetting.verify(message.localeSetting); - if (error) - return "localeSetting." + error; + properties._localeSetting = 1; + { + 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.SyncActionValue.ArchiveChatAction.verify(message.archiveChatAction); - if (error) - return "archiveChatAction." + error; + properties._archiveChatAction = 1; + { + 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.SyncActionValue.DeleteMessageForMeAction.verify(message.deleteMessageForMeAction); - if (error) - return "deleteMessageForMeAction." + error; + properties._deleteMessageForMeAction = 1; + { + 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.SyncActionValue.KeyExpiration.verify(message.keyExpiration); - if (error) - return "keyExpiration." + error; + properties._keyExpiration = 1; + { + 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.SyncActionValue.MarkChatAsReadAction.verify(message.markChatAsReadAction); - if (error) - return "markChatAsReadAction." + error; + properties._markChatAsReadAction = 1; + { + 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.SyncActionValue.ClearChatAction.verify(message.clearChatAction); - if (error) - return "clearChatAction." + error; + properties._clearChatAction = 1; + { + 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.SyncActionValue.DeleteChatAction.verify(message.deleteChatAction); - if (error) - return "deleteChatAction." + error; + properties._deleteChatAction = 1; + { + 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.SyncActionValue.UnarchiveChatsSetting.verify(message.unarchiveChatsSetting); - if (error) - return "unarchiveChatsSetting." + error; + properties._unarchiveChatsSetting = 1; + { + 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.SyncActionValue.PrimaryFeature.verify(message.primaryFeature); - if (error) - return "primaryFeature." + error; + properties._primaryFeature = 1; + { + var error = $root.proto.SyncActionValue.PrimaryFeature.verify(message.primaryFeature); + if (error) + return "primaryFeature." + error; + } } if (message.androidUnsupportedActions != null && message.hasOwnProperty("androidUnsupportedActions")) { - var error = $root.proto.SyncActionValue.AndroidUnsupportedActions.verify(message.androidUnsupportedActions); - if (error) - return "androidUnsupportedActions." + error; + properties._androidUnsupportedActions = 1; + { + 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.SyncActionValue.AgentAction.verify(message.agentAction); - if (error) - return "agentAction." + error; + properties._agentAction = 1; + { + 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.SyncActionValue.SubscriptionAction.verify(message.subscriptionAction); - if (error) - return "subscriptionAction." + error; + properties._subscriptionAction = 1; + { + 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.SyncActionValue.UserStatusMuteAction.verify(message.userStatusMuteAction); - if (error) - return "userStatusMuteAction." + error; + properties._userStatusMuteAction = 1; + { + 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.SyncActionValue.TimeFormatAction.verify(message.timeFormatAction); - if (error) - return "timeFormatAction." + error; + properties._timeFormatAction = 1; + { + 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.SyncActionValue.NuxAction.verify(message.nuxAction); - if (error) - return "nuxAction." + error; + properties._nuxAction = 1; + { + 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; + properties._primaryVersionAction = 1; + { + 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; + properties._stickerAction = 1; + { + var error = $root.proto.SyncActionValue.StickerAction.verify(message.stickerAction); + if (error) + return "stickerAction." + error; + } } if (message.removeRecentStickerAction != null && message.hasOwnProperty("removeRecentStickerAction")) { - var error = $root.proto.SyncActionValue.RemoveRecentStickerAction.verify(message.removeRecentStickerAction); - if (error) - return "removeRecentStickerAction." + error; + properties._removeRecentStickerAction = 1; + { + var error = $root.proto.SyncActionValue.RemoveRecentStickerAction.verify(message.removeRecentStickerAction); + if (error) + return "removeRecentStickerAction." + error; + } } if (message.chatAssignment != null && message.hasOwnProperty("chatAssignment")) { - var error = $root.proto.SyncActionValue.ChatAssignmentAction.verify(message.chatAssignment); - if (error) - return "chatAssignment." + error; + properties._chatAssignment = 1; + { + var error = $root.proto.SyncActionValue.ChatAssignmentAction.verify(message.chatAssignment); + if (error) + return "chatAssignment." + error; + } } if (message.chatAssignmentOpenedStatus != null && message.hasOwnProperty("chatAssignmentOpenedStatus")) { - var error = $root.proto.SyncActionValue.ChatAssignmentOpenedStatusAction.verify(message.chatAssignmentOpenedStatus); - if (error) - return "chatAssignmentOpenedStatus." + error; + properties._chatAssignmentOpenedStatus = 1; + { + var error = $root.proto.SyncActionValue.ChatAssignmentOpenedStatusAction.verify(message.chatAssignmentOpenedStatus); + if (error) + return "chatAssignmentOpenedStatus." + error; + } } if (message.pnForLidChatAction != null && message.hasOwnProperty("pnForLidChatAction")) { - var error = $root.proto.SyncActionValue.PnForLidChatAction.verify(message.pnForLidChatAction); - if (error) - return "pnForLidChatAction." + error; + properties._pnForLidChatAction = 1; + { + var error = $root.proto.SyncActionValue.PnForLidChatAction.verify(message.pnForLidChatAction); + if (error) + return "pnForLidChatAction." + error; + } } if (message.marketingMessageAction != null && message.hasOwnProperty("marketingMessageAction")) { - var error = $root.proto.SyncActionValue.MarketingMessageAction.verify(message.marketingMessageAction); - if (error) - return "marketingMessageAction." + error; + properties._marketingMessageAction = 1; + { + var error = $root.proto.SyncActionValue.MarketingMessageAction.verify(message.marketingMessageAction); + if (error) + return "marketingMessageAction." + error; + } } if (message.marketingMessageBroadcastAction != null && message.hasOwnProperty("marketingMessageBroadcastAction")) { - var error = $root.proto.SyncActionValue.MarketingMessageBroadcastAction.verify(message.marketingMessageBroadcastAction); - if (error) - return "marketingMessageBroadcastAction." + error; + properties._marketingMessageBroadcastAction = 1; + { + var error = $root.proto.SyncActionValue.MarketingMessageBroadcastAction.verify(message.marketingMessageBroadcastAction); + if (error) + return "marketingMessageBroadcastAction." + error; + } } if (message.externalWebBetaAction != null && message.hasOwnProperty("externalWebBetaAction")) { - var error = $root.proto.SyncActionValue.ExternalWebBetaAction.verify(message.externalWebBetaAction); - if (error) - return "externalWebBetaAction." + error; + properties._externalWebBetaAction = 1; + { + var error = $root.proto.SyncActionValue.ExternalWebBetaAction.verify(message.externalWebBetaAction); + if (error) + return "externalWebBetaAction." + error; + } } if (message.privacySettingRelayAllCalls != null && message.hasOwnProperty("privacySettingRelayAllCalls")) { - var error = $root.proto.SyncActionValue.PrivacySettingRelayAllCalls.verify(message.privacySettingRelayAllCalls); - if (error) - return "privacySettingRelayAllCalls." + error; + properties._privacySettingRelayAllCalls = 1; + { + var error = $root.proto.SyncActionValue.PrivacySettingRelayAllCalls.verify(message.privacySettingRelayAllCalls); + if (error) + return "privacySettingRelayAllCalls." + error; + } } if (message.callLogAction != null && message.hasOwnProperty("callLogAction")) { - var error = $root.proto.SyncActionValue.CallLogAction.verify(message.callLogAction); - if (error) - return "callLogAction." + error; + properties._callLogAction = 1; + { + var error = $root.proto.SyncActionValue.CallLogAction.verify(message.callLogAction); + if (error) + return "callLogAction." + error; + } } if (message.statusPrivacy != null && message.hasOwnProperty("statusPrivacy")) { - var error = $root.proto.SyncActionValue.StatusPrivacyAction.verify(message.statusPrivacy); - if (error) - return "statusPrivacy." + error; + properties._statusPrivacy = 1; + { + var error = $root.proto.SyncActionValue.StatusPrivacyAction.verify(message.statusPrivacy); + if (error) + return "statusPrivacy." + error; + } } if (message.botWelcomeRequestAction != null && message.hasOwnProperty("botWelcomeRequestAction")) { - var error = $root.proto.SyncActionValue.BotWelcomeRequestAction.verify(message.botWelcomeRequestAction); - if (error) - return "botWelcomeRequestAction." + error; + properties._botWelcomeRequestAction = 1; + { + var error = $root.proto.SyncActionValue.BotWelcomeRequestAction.verify(message.botWelcomeRequestAction); + if (error) + return "botWelcomeRequestAction." + error; + } } if (message.deleteIndividualCallLog != null && message.hasOwnProperty("deleteIndividualCallLog")) { - var error = $root.proto.SyncActionValue.DeleteIndividualCallLogAction.verify(message.deleteIndividualCallLog); - if (error) - return "deleteIndividualCallLog." + error; + properties._deleteIndividualCallLog = 1; + { + var error = $root.proto.SyncActionValue.DeleteIndividualCallLogAction.verify(message.deleteIndividualCallLog); + if (error) + return "deleteIndividualCallLog." + error; + } } if (message.labelReorderingAction != null && message.hasOwnProperty("labelReorderingAction")) { - var error = $root.proto.SyncActionValue.LabelReorderingAction.verify(message.labelReorderingAction); - if (error) - return "labelReorderingAction." + error; + properties._labelReorderingAction = 1; + { + var error = $root.proto.SyncActionValue.LabelReorderingAction.verify(message.labelReorderingAction); + if (error) + return "labelReorderingAction." + error; + } } if (message.paymentInfoAction != null && message.hasOwnProperty("paymentInfoAction")) { - var error = $root.proto.SyncActionValue.PaymentInfoAction.verify(message.paymentInfoAction); - if (error) - return "paymentInfoAction." + error; + properties._paymentInfoAction = 1; + { + var error = $root.proto.SyncActionValue.PaymentInfoAction.verify(message.paymentInfoAction); + if (error) + return "paymentInfoAction." + error; + } } if (message.customPaymentMethodsAction != null && message.hasOwnProperty("customPaymentMethodsAction")) { - var error = $root.proto.SyncActionValue.CustomPaymentMethodsAction.verify(message.customPaymentMethodsAction); - if (error) - return "customPaymentMethodsAction." + error; + properties._customPaymentMethodsAction = 1; + { + var error = $root.proto.SyncActionValue.CustomPaymentMethodsAction.verify(message.customPaymentMethodsAction); + if (error) + return "customPaymentMethodsAction." + error; + } + } + if (message.lockChatAction != null && message.hasOwnProperty("lockChatAction")) { + properties._lockChatAction = 1; + { + var error = $root.proto.SyncActionValue.LockChatAction.verify(message.lockChatAction); + if (error) + return "lockChatAction." + error; + } + } + if (message.chatLockSettings != null && message.hasOwnProperty("chatLockSettings")) { + properties._chatLockSettings = 1; + { + var error = $root.proto.ChatLockSettings.verify(message.chatLockSettings); + if (error) + return "chatLockSettings." + error; + } + } + if (message.wamoUserIdentifierAction != null && message.hasOwnProperty("wamoUserIdentifierAction")) { + properties._wamoUserIdentifierAction = 1; + { + var error = $root.proto.SyncActionValue.WamoUserIdentifierAction.verify(message.wamoUserIdentifierAction); + if (error) + return "wamoUserIdentifierAction." + error; + } + } + if (message.privacySettingDisableLinkPreviewsAction != null && message.hasOwnProperty("privacySettingDisableLinkPreviewsAction")) { + properties._privacySettingDisableLinkPreviewsAction = 1; + { + var error = $root.proto.SyncActionValue.PrivacySettingDisableLinkPreviewsAction.verify(message.privacySettingDisableLinkPreviewsAction); + if (error) + return "privacySettingDisableLinkPreviewsAction." + error; + } + } + if (message.deviceCapabilities != null && message.hasOwnProperty("deviceCapabilities")) { + properties._deviceCapabilities = 1; + { + var error = $root.proto.DeviceCapabilities.verify(message.deviceCapabilities); + if (error) + return "deviceCapabilities." + error; + } + } + if (message.noteEditAction != null && message.hasOwnProperty("noteEditAction")) { + properties._noteEditAction = 1; + { + var error = $root.proto.SyncActionValue.NoteEditAction.verify(message.noteEditAction); + if (error) + return "noteEditAction." + error; + } + } + if (message.favoritesAction != null && message.hasOwnProperty("favoritesAction")) { + properties._favoritesAction = 1; + { + var error = $root.proto.SyncActionValue.FavoritesAction.verify(message.favoritesAction); + if (error) + return "favoritesAction." + error; + } + } + if (message.merchantPaymentPartnerAction != null && message.hasOwnProperty("merchantPaymentPartnerAction")) { + properties._merchantPaymentPartnerAction = 1; + { + var error = $root.proto.SyncActionValue.MerchantPaymentPartnerAction.verify(message.merchantPaymentPartnerAction); + if (error) + return "merchantPaymentPartnerAction." + error; + } + } + if (message.waffleAccountLinkStateAction != null && message.hasOwnProperty("waffleAccountLinkStateAction")) { + properties._waffleAccountLinkStateAction = 1; + { + var error = $root.proto.SyncActionValue.WaffleAccountLinkStateAction.verify(message.waffleAccountLinkStateAction); + if (error) + return "waffleAccountLinkStateAction." + error; + } + } + if (message.usernameChatStartMode != null && message.hasOwnProperty("usernameChatStartMode")) { + properties._usernameChatStartMode = 1; + { + var error = $root.proto.SyncActionValue.UsernameChatStartModeAction.verify(message.usernameChatStartMode); + if (error) + return "usernameChatStartMode." + error; + } + } + if (message.notificationActivitySettingAction != null && message.hasOwnProperty("notificationActivitySettingAction")) { + properties._notificationActivitySettingAction = 1; + { + var error = $root.proto.SyncActionValue.NotificationActivitySettingAction.verify(message.notificationActivitySettingAction); + if (error) + return "notificationActivitySettingAction." + error; + } } return null; }; @@ -81122,6 +127047,61 @@ $root.proto = (function() { throw TypeError(".proto.SyncActionValue.customPaymentMethodsAction: object expected"); message.customPaymentMethodsAction = $root.proto.SyncActionValue.CustomPaymentMethodsAction.fromObject(object.customPaymentMethodsAction); } + if (object.lockChatAction != null) { + if (typeof object.lockChatAction !== "object") + throw TypeError(".proto.SyncActionValue.lockChatAction: object expected"); + message.lockChatAction = $root.proto.SyncActionValue.LockChatAction.fromObject(object.lockChatAction); + } + if (object.chatLockSettings != null) { + if (typeof object.chatLockSettings !== "object") + throw TypeError(".proto.SyncActionValue.chatLockSettings: object expected"); + message.chatLockSettings = $root.proto.ChatLockSettings.fromObject(object.chatLockSettings); + } + if (object.wamoUserIdentifierAction != null) { + if (typeof object.wamoUserIdentifierAction !== "object") + throw TypeError(".proto.SyncActionValue.wamoUserIdentifierAction: object expected"); + message.wamoUserIdentifierAction = $root.proto.SyncActionValue.WamoUserIdentifierAction.fromObject(object.wamoUserIdentifierAction); + } + if (object.privacySettingDisableLinkPreviewsAction != null) { + if (typeof object.privacySettingDisableLinkPreviewsAction !== "object") + throw TypeError(".proto.SyncActionValue.privacySettingDisableLinkPreviewsAction: object expected"); + message.privacySettingDisableLinkPreviewsAction = $root.proto.SyncActionValue.PrivacySettingDisableLinkPreviewsAction.fromObject(object.privacySettingDisableLinkPreviewsAction); + } + if (object.deviceCapabilities != null) { + if (typeof object.deviceCapabilities !== "object") + throw TypeError(".proto.SyncActionValue.deviceCapabilities: object expected"); + message.deviceCapabilities = $root.proto.DeviceCapabilities.fromObject(object.deviceCapabilities); + } + if (object.noteEditAction != null) { + if (typeof object.noteEditAction !== "object") + throw TypeError(".proto.SyncActionValue.noteEditAction: object expected"); + message.noteEditAction = $root.proto.SyncActionValue.NoteEditAction.fromObject(object.noteEditAction); + } + if (object.favoritesAction != null) { + if (typeof object.favoritesAction !== "object") + throw TypeError(".proto.SyncActionValue.favoritesAction: object expected"); + message.favoritesAction = $root.proto.SyncActionValue.FavoritesAction.fromObject(object.favoritesAction); + } + if (object.merchantPaymentPartnerAction != null) { + if (typeof object.merchantPaymentPartnerAction !== "object") + throw TypeError(".proto.SyncActionValue.merchantPaymentPartnerAction: object expected"); + message.merchantPaymentPartnerAction = $root.proto.SyncActionValue.MerchantPaymentPartnerAction.fromObject(object.merchantPaymentPartnerAction); + } + if (object.waffleAccountLinkStateAction != null) { + if (typeof object.waffleAccountLinkStateAction !== "object") + throw TypeError(".proto.SyncActionValue.waffleAccountLinkStateAction: object expected"); + message.waffleAccountLinkStateAction = $root.proto.SyncActionValue.WaffleAccountLinkStateAction.fromObject(object.waffleAccountLinkStateAction); + } + if (object.usernameChatStartMode != null) { + if (typeof object.usernameChatStartMode !== "object") + throw TypeError(".proto.SyncActionValue.usernameChatStartMode: object expected"); + message.usernameChatStartMode = $root.proto.SyncActionValue.UsernameChatStartModeAction.fromObject(object.usernameChatStartMode); + } + if (object.notificationActivitySettingAction != null) { + if (typeof object.notificationActivitySettingAction !== "object") + throw TypeError(".proto.SyncActionValue.notificationActivitySettingAction: object expected"); + message.notificationActivitySettingAction = $root.proto.SyncActionValue.NotificationActivitySettingAction.fromObject(object.notificationActivitySettingAction); + } return message; }; @@ -81138,144 +127118,279 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.timestamp = options.longs === String ? "0" : 0; - object.starAction = null; - object.contactAction = null; - object.muteAction = null; - object.pinAction = null; - object.securityNotificationSetting = null; - object.pushNameSetting = null; - object.quickReplyAction = null; - object.recentEmojiWeightsAction = null; - object.labelEditAction = null; - object.labelAssociationAction = null; - object.localeSetting = null; - object.archiveChatAction = null; - object.deleteMessageForMeAction = null; - object.keyExpiration = null; - object.markChatAsReadAction = null; - object.clearChatAction = null; - object.deleteChatAction = null; - object.unarchiveChatsSetting = null; - object.primaryFeature = null; - object.androidUnsupportedActions = null; - object.agentAction = null; - object.subscriptionAction = null; - object.userStatusMuteAction = null; - object.timeFormatAction = null; - object.nuxAction = null; - object.primaryVersionAction = null; - object.stickerAction = null; - object.removeRecentStickerAction = null; - object.chatAssignment = null; - object.chatAssignmentOpenedStatus = null; - object.pnForLidChatAction = null; - object.marketingMessageAction = null; - object.marketingMessageBroadcastAction = null; - object.externalWebBetaAction = null; - object.privacySettingRelayAllCalls = null; - object.callLogAction = null; - object.statusPrivacy = null; - object.botWelcomeRequestAction = null; - object.deleteIndividualCallLog = null; - object.labelReorderingAction = null; - object.paymentInfoAction = null; - object.customPaymentMethodsAction = null; - } - if (message.timestamp != null && message.hasOwnProperty("timestamp")) + if (message.timestamp != null && message.hasOwnProperty("timestamp")) { if (typeof message.timestamp === "number") object.timestamp = options.longs === String ? String(message.timestamp) : message.timestamp; else object.timestamp = options.longs === String ? $util.Long.prototype.toString.call(message.timestamp) : options.longs === Number ? new $util.LongBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0).toNumber() : message.timestamp; - if (message.starAction != null && message.hasOwnProperty("starAction")) + if (options.oneofs) + object._timestamp = "timestamp"; + } + if (message.starAction != null && message.hasOwnProperty("starAction")) { object.starAction = $root.proto.SyncActionValue.StarAction.toObject(message.starAction, options); - if (message.contactAction != null && message.hasOwnProperty("contactAction")) + if (options.oneofs) + object._starAction = "starAction"; + } + if (message.contactAction != null && message.hasOwnProperty("contactAction")) { object.contactAction = $root.proto.SyncActionValue.ContactAction.toObject(message.contactAction, options); - if (message.muteAction != null && message.hasOwnProperty("muteAction")) + if (options.oneofs) + object._contactAction = "contactAction"; + } + if (message.muteAction != null && message.hasOwnProperty("muteAction")) { object.muteAction = $root.proto.SyncActionValue.MuteAction.toObject(message.muteAction, options); - if (message.pinAction != null && message.hasOwnProperty("pinAction")) + if (options.oneofs) + object._muteAction = "muteAction"; + } + if (message.pinAction != null && message.hasOwnProperty("pinAction")) { object.pinAction = $root.proto.SyncActionValue.PinAction.toObject(message.pinAction, options); - if (message.securityNotificationSetting != null && message.hasOwnProperty("securityNotificationSetting")) + if (options.oneofs) + object._pinAction = "pinAction"; + } + if (message.securityNotificationSetting != null && message.hasOwnProperty("securityNotificationSetting")) { object.securityNotificationSetting = $root.proto.SyncActionValue.SecurityNotificationSetting.toObject(message.securityNotificationSetting, options); - if (message.pushNameSetting != null && message.hasOwnProperty("pushNameSetting")) + if (options.oneofs) + object._securityNotificationSetting = "securityNotificationSetting"; + } + if (message.pushNameSetting != null && message.hasOwnProperty("pushNameSetting")) { object.pushNameSetting = $root.proto.SyncActionValue.PushNameSetting.toObject(message.pushNameSetting, options); - if (message.quickReplyAction != null && message.hasOwnProperty("quickReplyAction")) + if (options.oneofs) + object._pushNameSetting = "pushNameSetting"; + } + if (message.quickReplyAction != null && message.hasOwnProperty("quickReplyAction")) { object.quickReplyAction = $root.proto.SyncActionValue.QuickReplyAction.toObject(message.quickReplyAction, options); - if (message.recentEmojiWeightsAction != null && message.hasOwnProperty("recentEmojiWeightsAction")) + if (options.oneofs) + object._quickReplyAction = "quickReplyAction"; + } + if (message.recentEmojiWeightsAction != null && message.hasOwnProperty("recentEmojiWeightsAction")) { object.recentEmojiWeightsAction = $root.proto.SyncActionValue.RecentEmojiWeightsAction.toObject(message.recentEmojiWeightsAction, options); - if (message.labelEditAction != null && message.hasOwnProperty("labelEditAction")) + if (options.oneofs) + object._recentEmojiWeightsAction = "recentEmojiWeightsAction"; + } + if (message.labelEditAction != null && message.hasOwnProperty("labelEditAction")) { object.labelEditAction = $root.proto.SyncActionValue.LabelEditAction.toObject(message.labelEditAction, options); - if (message.labelAssociationAction != null && message.hasOwnProperty("labelAssociationAction")) + if (options.oneofs) + object._labelEditAction = "labelEditAction"; + } + if (message.labelAssociationAction != null && message.hasOwnProperty("labelAssociationAction")) { object.labelAssociationAction = $root.proto.SyncActionValue.LabelAssociationAction.toObject(message.labelAssociationAction, options); - if (message.localeSetting != null && message.hasOwnProperty("localeSetting")) + if (options.oneofs) + object._labelAssociationAction = "labelAssociationAction"; + } + if (message.localeSetting != null && message.hasOwnProperty("localeSetting")) { object.localeSetting = $root.proto.SyncActionValue.LocaleSetting.toObject(message.localeSetting, options); - if (message.archiveChatAction != null && message.hasOwnProperty("archiveChatAction")) + if (options.oneofs) + object._localeSetting = "localeSetting"; + } + if (message.archiveChatAction != null && message.hasOwnProperty("archiveChatAction")) { object.archiveChatAction = $root.proto.SyncActionValue.ArchiveChatAction.toObject(message.archiveChatAction, options); - if (message.deleteMessageForMeAction != null && message.hasOwnProperty("deleteMessageForMeAction")) + if (options.oneofs) + object._archiveChatAction = "archiveChatAction"; + } + if (message.deleteMessageForMeAction != null && message.hasOwnProperty("deleteMessageForMeAction")) { object.deleteMessageForMeAction = $root.proto.SyncActionValue.DeleteMessageForMeAction.toObject(message.deleteMessageForMeAction, options); - if (message.keyExpiration != null && message.hasOwnProperty("keyExpiration")) + if (options.oneofs) + object._deleteMessageForMeAction = "deleteMessageForMeAction"; + } + if (message.keyExpiration != null && message.hasOwnProperty("keyExpiration")) { object.keyExpiration = $root.proto.SyncActionValue.KeyExpiration.toObject(message.keyExpiration, options); - if (message.markChatAsReadAction != null && message.hasOwnProperty("markChatAsReadAction")) + if (options.oneofs) + object._keyExpiration = "keyExpiration"; + } + if (message.markChatAsReadAction != null && message.hasOwnProperty("markChatAsReadAction")) { object.markChatAsReadAction = $root.proto.SyncActionValue.MarkChatAsReadAction.toObject(message.markChatAsReadAction, options); - if (message.clearChatAction != null && message.hasOwnProperty("clearChatAction")) + if (options.oneofs) + object._markChatAsReadAction = "markChatAsReadAction"; + } + if (message.clearChatAction != null && message.hasOwnProperty("clearChatAction")) { object.clearChatAction = $root.proto.SyncActionValue.ClearChatAction.toObject(message.clearChatAction, options); - if (message.deleteChatAction != null && message.hasOwnProperty("deleteChatAction")) + if (options.oneofs) + object._clearChatAction = "clearChatAction"; + } + if (message.deleteChatAction != null && message.hasOwnProperty("deleteChatAction")) { object.deleteChatAction = $root.proto.SyncActionValue.DeleteChatAction.toObject(message.deleteChatAction, options); - if (message.unarchiveChatsSetting != null && message.hasOwnProperty("unarchiveChatsSetting")) + if (options.oneofs) + object._deleteChatAction = "deleteChatAction"; + } + if (message.unarchiveChatsSetting != null && message.hasOwnProperty("unarchiveChatsSetting")) { object.unarchiveChatsSetting = $root.proto.SyncActionValue.UnarchiveChatsSetting.toObject(message.unarchiveChatsSetting, options); - if (message.primaryFeature != null && message.hasOwnProperty("primaryFeature")) + if (options.oneofs) + object._unarchiveChatsSetting = "unarchiveChatsSetting"; + } + if (message.primaryFeature != null && message.hasOwnProperty("primaryFeature")) { object.primaryFeature = $root.proto.SyncActionValue.PrimaryFeature.toObject(message.primaryFeature, options); - if (message.androidUnsupportedActions != null && message.hasOwnProperty("androidUnsupportedActions")) + if (options.oneofs) + object._primaryFeature = "primaryFeature"; + } + if (message.androidUnsupportedActions != null && message.hasOwnProperty("androidUnsupportedActions")) { object.androidUnsupportedActions = $root.proto.SyncActionValue.AndroidUnsupportedActions.toObject(message.androidUnsupportedActions, options); - if (message.agentAction != null && message.hasOwnProperty("agentAction")) + if (options.oneofs) + object._androidUnsupportedActions = "androidUnsupportedActions"; + } + if (message.agentAction != null && message.hasOwnProperty("agentAction")) { object.agentAction = $root.proto.SyncActionValue.AgentAction.toObject(message.agentAction, options); - if (message.subscriptionAction != null && message.hasOwnProperty("subscriptionAction")) + if (options.oneofs) + object._agentAction = "agentAction"; + } + if (message.subscriptionAction != null && message.hasOwnProperty("subscriptionAction")) { object.subscriptionAction = $root.proto.SyncActionValue.SubscriptionAction.toObject(message.subscriptionAction, options); - if (message.userStatusMuteAction != null && message.hasOwnProperty("userStatusMuteAction")) + if (options.oneofs) + object._subscriptionAction = "subscriptionAction"; + } + if (message.userStatusMuteAction != null && message.hasOwnProperty("userStatusMuteAction")) { object.userStatusMuteAction = $root.proto.SyncActionValue.UserStatusMuteAction.toObject(message.userStatusMuteAction, options); - if (message.timeFormatAction != null && message.hasOwnProperty("timeFormatAction")) + if (options.oneofs) + object._userStatusMuteAction = "userStatusMuteAction"; + } + if (message.timeFormatAction != null && message.hasOwnProperty("timeFormatAction")) { object.timeFormatAction = $root.proto.SyncActionValue.TimeFormatAction.toObject(message.timeFormatAction, options); - if (message.nuxAction != null && message.hasOwnProperty("nuxAction")) + if (options.oneofs) + object._timeFormatAction = "timeFormatAction"; + } + if (message.nuxAction != null && message.hasOwnProperty("nuxAction")) { object.nuxAction = $root.proto.SyncActionValue.NuxAction.toObject(message.nuxAction, options); - if (message.primaryVersionAction != null && message.hasOwnProperty("primaryVersionAction")) + if (options.oneofs) + object._nuxAction = "nuxAction"; + } + if (message.primaryVersionAction != null && message.hasOwnProperty("primaryVersionAction")) { object.primaryVersionAction = $root.proto.SyncActionValue.PrimaryVersionAction.toObject(message.primaryVersionAction, options); - if (message.stickerAction != null && message.hasOwnProperty("stickerAction")) + if (options.oneofs) + object._primaryVersionAction = "primaryVersionAction"; + } + if (message.stickerAction != null && message.hasOwnProperty("stickerAction")) { object.stickerAction = $root.proto.SyncActionValue.StickerAction.toObject(message.stickerAction, options); - if (message.removeRecentStickerAction != null && message.hasOwnProperty("removeRecentStickerAction")) + if (options.oneofs) + object._stickerAction = "stickerAction"; + } + if (message.removeRecentStickerAction != null && message.hasOwnProperty("removeRecentStickerAction")) { object.removeRecentStickerAction = $root.proto.SyncActionValue.RemoveRecentStickerAction.toObject(message.removeRecentStickerAction, options); - if (message.chatAssignment != null && message.hasOwnProperty("chatAssignment")) + if (options.oneofs) + object._removeRecentStickerAction = "removeRecentStickerAction"; + } + if (message.chatAssignment != null && message.hasOwnProperty("chatAssignment")) { object.chatAssignment = $root.proto.SyncActionValue.ChatAssignmentAction.toObject(message.chatAssignment, options); - if (message.chatAssignmentOpenedStatus != null && message.hasOwnProperty("chatAssignmentOpenedStatus")) + if (options.oneofs) + object._chatAssignment = "chatAssignment"; + } + if (message.chatAssignmentOpenedStatus != null && message.hasOwnProperty("chatAssignmentOpenedStatus")) { object.chatAssignmentOpenedStatus = $root.proto.SyncActionValue.ChatAssignmentOpenedStatusAction.toObject(message.chatAssignmentOpenedStatus, options); - if (message.pnForLidChatAction != null && message.hasOwnProperty("pnForLidChatAction")) + if (options.oneofs) + object._chatAssignmentOpenedStatus = "chatAssignmentOpenedStatus"; + } + if (message.pnForLidChatAction != null && message.hasOwnProperty("pnForLidChatAction")) { object.pnForLidChatAction = $root.proto.SyncActionValue.PnForLidChatAction.toObject(message.pnForLidChatAction, options); - if (message.marketingMessageAction != null && message.hasOwnProperty("marketingMessageAction")) + if (options.oneofs) + object._pnForLidChatAction = "pnForLidChatAction"; + } + if (message.marketingMessageAction != null && message.hasOwnProperty("marketingMessageAction")) { object.marketingMessageAction = $root.proto.SyncActionValue.MarketingMessageAction.toObject(message.marketingMessageAction, options); - if (message.marketingMessageBroadcastAction != null && message.hasOwnProperty("marketingMessageBroadcastAction")) + if (options.oneofs) + object._marketingMessageAction = "marketingMessageAction"; + } + if (message.marketingMessageBroadcastAction != null && message.hasOwnProperty("marketingMessageBroadcastAction")) { object.marketingMessageBroadcastAction = $root.proto.SyncActionValue.MarketingMessageBroadcastAction.toObject(message.marketingMessageBroadcastAction, options); - if (message.externalWebBetaAction != null && message.hasOwnProperty("externalWebBetaAction")) + if (options.oneofs) + object._marketingMessageBroadcastAction = "marketingMessageBroadcastAction"; + } + if (message.externalWebBetaAction != null && message.hasOwnProperty("externalWebBetaAction")) { object.externalWebBetaAction = $root.proto.SyncActionValue.ExternalWebBetaAction.toObject(message.externalWebBetaAction, options); - if (message.privacySettingRelayAllCalls != null && message.hasOwnProperty("privacySettingRelayAllCalls")) + if (options.oneofs) + object._externalWebBetaAction = "externalWebBetaAction"; + } + if (message.privacySettingRelayAllCalls != null && message.hasOwnProperty("privacySettingRelayAllCalls")) { object.privacySettingRelayAllCalls = $root.proto.SyncActionValue.PrivacySettingRelayAllCalls.toObject(message.privacySettingRelayAllCalls, options); - if (message.callLogAction != null && message.hasOwnProperty("callLogAction")) + if (options.oneofs) + object._privacySettingRelayAllCalls = "privacySettingRelayAllCalls"; + } + if (message.callLogAction != null && message.hasOwnProperty("callLogAction")) { object.callLogAction = $root.proto.SyncActionValue.CallLogAction.toObject(message.callLogAction, options); - if (message.statusPrivacy != null && message.hasOwnProperty("statusPrivacy")) + if (options.oneofs) + object._callLogAction = "callLogAction"; + } + if (message.statusPrivacy != null && message.hasOwnProperty("statusPrivacy")) { object.statusPrivacy = $root.proto.SyncActionValue.StatusPrivacyAction.toObject(message.statusPrivacy, options); - if (message.botWelcomeRequestAction != null && message.hasOwnProperty("botWelcomeRequestAction")) + if (options.oneofs) + object._statusPrivacy = "statusPrivacy"; + } + if (message.botWelcomeRequestAction != null && message.hasOwnProperty("botWelcomeRequestAction")) { object.botWelcomeRequestAction = $root.proto.SyncActionValue.BotWelcomeRequestAction.toObject(message.botWelcomeRequestAction, options); - if (message.deleteIndividualCallLog != null && message.hasOwnProperty("deleteIndividualCallLog")) + if (options.oneofs) + object._botWelcomeRequestAction = "botWelcomeRequestAction"; + } + if (message.deleteIndividualCallLog != null && message.hasOwnProperty("deleteIndividualCallLog")) { object.deleteIndividualCallLog = $root.proto.SyncActionValue.DeleteIndividualCallLogAction.toObject(message.deleteIndividualCallLog, options); - if (message.labelReorderingAction != null && message.hasOwnProperty("labelReorderingAction")) + if (options.oneofs) + object._deleteIndividualCallLog = "deleteIndividualCallLog"; + } + if (message.labelReorderingAction != null && message.hasOwnProperty("labelReorderingAction")) { object.labelReorderingAction = $root.proto.SyncActionValue.LabelReorderingAction.toObject(message.labelReorderingAction, options); - if (message.paymentInfoAction != null && message.hasOwnProperty("paymentInfoAction")) + if (options.oneofs) + object._labelReorderingAction = "labelReorderingAction"; + } + if (message.paymentInfoAction != null && message.hasOwnProperty("paymentInfoAction")) { object.paymentInfoAction = $root.proto.SyncActionValue.PaymentInfoAction.toObject(message.paymentInfoAction, options); - if (message.customPaymentMethodsAction != null && message.hasOwnProperty("customPaymentMethodsAction")) + if (options.oneofs) + object._paymentInfoAction = "paymentInfoAction"; + } + if (message.customPaymentMethodsAction != null && message.hasOwnProperty("customPaymentMethodsAction")) { object.customPaymentMethodsAction = $root.proto.SyncActionValue.CustomPaymentMethodsAction.toObject(message.customPaymentMethodsAction, options); + if (options.oneofs) + object._customPaymentMethodsAction = "customPaymentMethodsAction"; + } + if (message.lockChatAction != null && message.hasOwnProperty("lockChatAction")) { + object.lockChatAction = $root.proto.SyncActionValue.LockChatAction.toObject(message.lockChatAction, options); + if (options.oneofs) + object._lockChatAction = "lockChatAction"; + } + if (message.chatLockSettings != null && message.hasOwnProperty("chatLockSettings")) { + object.chatLockSettings = $root.proto.ChatLockSettings.toObject(message.chatLockSettings, options); + if (options.oneofs) + object._chatLockSettings = "chatLockSettings"; + } + if (message.wamoUserIdentifierAction != null && message.hasOwnProperty("wamoUserIdentifierAction")) { + object.wamoUserIdentifierAction = $root.proto.SyncActionValue.WamoUserIdentifierAction.toObject(message.wamoUserIdentifierAction, options); + if (options.oneofs) + object._wamoUserIdentifierAction = "wamoUserIdentifierAction"; + } + if (message.privacySettingDisableLinkPreviewsAction != null && message.hasOwnProperty("privacySettingDisableLinkPreviewsAction")) { + object.privacySettingDisableLinkPreviewsAction = $root.proto.SyncActionValue.PrivacySettingDisableLinkPreviewsAction.toObject(message.privacySettingDisableLinkPreviewsAction, options); + if (options.oneofs) + object._privacySettingDisableLinkPreviewsAction = "privacySettingDisableLinkPreviewsAction"; + } + if (message.deviceCapabilities != null && message.hasOwnProperty("deviceCapabilities")) { + object.deviceCapabilities = $root.proto.DeviceCapabilities.toObject(message.deviceCapabilities, options); + if (options.oneofs) + object._deviceCapabilities = "deviceCapabilities"; + } + if (message.noteEditAction != null && message.hasOwnProperty("noteEditAction")) { + object.noteEditAction = $root.proto.SyncActionValue.NoteEditAction.toObject(message.noteEditAction, options); + if (options.oneofs) + object._noteEditAction = "noteEditAction"; + } + if (message.favoritesAction != null && message.hasOwnProperty("favoritesAction")) { + object.favoritesAction = $root.proto.SyncActionValue.FavoritesAction.toObject(message.favoritesAction, options); + if (options.oneofs) + object._favoritesAction = "favoritesAction"; + } + if (message.merchantPaymentPartnerAction != null && message.hasOwnProperty("merchantPaymentPartnerAction")) { + object.merchantPaymentPartnerAction = $root.proto.SyncActionValue.MerchantPaymentPartnerAction.toObject(message.merchantPaymentPartnerAction, options); + if (options.oneofs) + object._merchantPaymentPartnerAction = "merchantPaymentPartnerAction"; + } + if (message.waffleAccountLinkStateAction != null && message.hasOwnProperty("waffleAccountLinkStateAction")) { + object.waffleAccountLinkStateAction = $root.proto.SyncActionValue.WaffleAccountLinkStateAction.toObject(message.waffleAccountLinkStateAction, options); + if (options.oneofs) + object._waffleAccountLinkStateAction = "waffleAccountLinkStateAction"; + } + if (message.usernameChatStartMode != null && message.hasOwnProperty("usernameChatStartMode")) { + object.usernameChatStartMode = $root.proto.SyncActionValue.UsernameChatStartModeAction.toObject(message.usernameChatStartMode, options); + if (options.oneofs) + object._usernameChatStartMode = "usernameChatStartMode"; + } + if (message.notificationActivitySettingAction != null && message.hasOwnProperty("notificationActivitySettingAction")) { + object.notificationActivitySettingAction = $root.proto.SyncActionValue.NotificationActivitySettingAction.toObject(message.notificationActivitySettingAction, options); + if (options.oneofs) + object._notificationActivitySettingAction = "notificationActivitySettingAction"; + } return object; }; @@ -81290,6 +127405,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for SyncActionValue + * @function getTypeUrl + * @memberof proto.SyncActionValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SyncActionValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.SyncActionValue"; + }; + SyncActionValue.AgentAction = (function() { /** @@ -81318,27 +127448,48 @@ $root.proto = (function() { /** * AgentAction name. - * @member {string} name + * @member {string|null|undefined} name * @memberof proto.SyncActionValue.AgentAction * @instance */ - AgentAction.prototype.name = ""; + AgentAction.prototype.name = null; /** * AgentAction deviceID. - * @member {number} deviceID + * @member {number|null|undefined} deviceID * @memberof proto.SyncActionValue.AgentAction * @instance */ - AgentAction.prototype.deviceID = 0; + AgentAction.prototype.deviceID = null; /** * AgentAction isDeleted. - * @member {boolean} isDeleted + * @member {boolean|null|undefined} isDeleted * @memberof proto.SyncActionValue.AgentAction * @instance */ - AgentAction.prototype.isDeleted = false; + AgentAction.prototype.isDeleted = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AgentAction.prototype, "_name", { + get: $util.oneOfGetter($oneOfFields = ["name"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AgentAction.prototype, "_deviceID", { + get: $util.oneOfGetter($oneOfFields = ["deviceID"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AgentAction.prototype, "_isDeleted", { + get: $util.oneOfGetter($oneOfFields = ["isDeleted"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new AgentAction instance using the specified properties. @@ -81404,15 +127555,18 @@ $root.proto = (function() { 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; + 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; @@ -81448,15 +127602,22 @@ $root.proto = (function() { AgentAction.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) { + properties._name = 1; if (!$util.isString(message.name)) return "name: string expected"; - if (message.deviceID != null && message.hasOwnProperty("deviceID")) + } + if (message.deviceID != null && message.hasOwnProperty("deviceID")) { + properties._deviceID = 1; if (!$util.isInteger(message.deviceID)) return "deviceID: integer expected"; - if (message.isDeleted != null && message.hasOwnProperty("isDeleted")) + } + if (message.isDeleted != null && message.hasOwnProperty("isDeleted")) { + properties._isDeleted = 1; if (typeof message.isDeleted !== "boolean") return "isDeleted: boolean expected"; + } return null; }; @@ -81494,17 +127655,21 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.name = ""; - object.deviceID = 0; - object.isDeleted = false; - } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && message.hasOwnProperty("name")) { object.name = message.name; - if (message.deviceID != null && message.hasOwnProperty("deviceID")) + if (options.oneofs) + object._name = "name"; + } + if (message.deviceID != null && message.hasOwnProperty("deviceID")) { object.deviceID = message.deviceID; - if (message.isDeleted != null && message.hasOwnProperty("isDeleted")) + if (options.oneofs) + object._deviceID = "deviceID"; + } + if (message.isDeleted != null && message.hasOwnProperty("isDeleted")) { object.isDeleted = message.isDeleted; + if (options.oneofs) + object._isDeleted = "isDeleted"; + } return object; }; @@ -81519,6 +127684,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for AgentAction + * @function getTypeUrl + * @memberof proto.SyncActionValue.AgentAction + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AgentAction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.SyncActionValue.AgentAction"; + }; + return AgentAction; })(); @@ -81548,11 +127728,20 @@ $root.proto = (function() { /** * AndroidUnsupportedActions allowed. - * @member {boolean} allowed + * @member {boolean|null|undefined} allowed * @memberof proto.SyncActionValue.AndroidUnsupportedActions * @instance */ - AndroidUnsupportedActions.prototype.allowed = false; + AndroidUnsupportedActions.prototype.allowed = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AndroidUnsupportedActions.prototype, "_allowed", { + get: $util.oneOfGetter($oneOfFields = ["allowed"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new AndroidUnsupportedActions instance using the specified properties. @@ -81614,9 +127803,10 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.allowed = reader.bool(); - break; + case 1: { + message.allowed = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -81652,9 +127842,12 @@ $root.proto = (function() { AndroidUnsupportedActions.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.allowed != null && message.hasOwnProperty("allowed")) + var properties = {}; + if (message.allowed != null && message.hasOwnProperty("allowed")) { + properties._allowed = 1; if (typeof message.allowed !== "boolean") return "allowed: boolean expected"; + } return null; }; @@ -81688,10 +127881,11 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) - object.allowed = false; - if (message.allowed != null && message.hasOwnProperty("allowed")) + if (message.allowed != null && message.hasOwnProperty("allowed")) { object.allowed = message.allowed; + if (options.oneofs) + object._allowed = "allowed"; + } return object; }; @@ -81706,6 +127900,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for AndroidUnsupportedActions + * @function getTypeUrl + * @memberof proto.SyncActionValue.AndroidUnsupportedActions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AndroidUnsupportedActions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.SyncActionValue.AndroidUnsupportedActions"; + }; + return AndroidUnsupportedActions; })(); @@ -81736,11 +127945,11 @@ $root.proto = (function() { /** * ArchiveChatAction archived. - * @member {boolean} archived + * @member {boolean|null|undefined} archived * @memberof proto.SyncActionValue.ArchiveChatAction * @instance */ - ArchiveChatAction.prototype.archived = false; + ArchiveChatAction.prototype.archived = null; /** * ArchiveChatAction messageRange. @@ -81750,6 +127959,21 @@ $root.proto = (function() { */ ArchiveChatAction.prototype.messageRange = null; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ArchiveChatAction.prototype, "_archived", { + get: $util.oneOfGetter($oneOfFields = ["archived"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ArchiveChatAction.prototype, "_messageRange", { + get: $util.oneOfGetter($oneOfFields = ["messageRange"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new ArchiveChatAction instance using the specified properties. * @function create @@ -81812,12 +128036,14 @@ $root.proto = (function() { 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; + 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; @@ -81853,13 +128079,19 @@ $root.proto = (function() { ArchiveChatAction.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.archived != null && message.hasOwnProperty("archived")) + var properties = {}; + if (message.archived != null && message.hasOwnProperty("archived")) { + properties._archived = 1; 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; + properties._messageRange = 1; + { + var error = $root.proto.SyncActionValue.SyncActionMessageRange.verify(message.messageRange); + if (error) + return "messageRange." + error; + } } return null; }; @@ -81899,14 +128131,16 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.archived = false; - object.messageRange = null; - } - if (message.archived != null && message.hasOwnProperty("archived")) + if (message.archived != null && message.hasOwnProperty("archived")) { object.archived = message.archived; - if (message.messageRange != null && message.hasOwnProperty("messageRange")) + if (options.oneofs) + object._archived = "archived"; + } + if (message.messageRange != null && message.hasOwnProperty("messageRange")) { object.messageRange = $root.proto.SyncActionValue.SyncActionMessageRange.toObject(message.messageRange, options); + if (options.oneofs) + object._messageRange = "messageRange"; + } return object; }; @@ -81921,6 +128155,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ArchiveChatAction + * @function getTypeUrl + * @memberof proto.SyncActionValue.ArchiveChatAction + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ArchiveChatAction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.SyncActionValue.ArchiveChatAction"; + }; + return ArchiveChatAction; })(); @@ -81950,11 +128199,20 @@ $root.proto = (function() { /** * BotWelcomeRequestAction isSent. - * @member {boolean} isSent + * @member {boolean|null|undefined} isSent * @memberof proto.SyncActionValue.BotWelcomeRequestAction * @instance */ - BotWelcomeRequestAction.prototype.isSent = false; + BotWelcomeRequestAction.prototype.isSent = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotWelcomeRequestAction.prototype, "_isSent", { + get: $util.oneOfGetter($oneOfFields = ["isSent"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new BotWelcomeRequestAction instance using the specified properties. @@ -82016,9 +128274,10 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.isSent = reader.bool(); - break; + case 1: { + message.isSent = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -82054,9 +128313,12 @@ $root.proto = (function() { BotWelcomeRequestAction.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.isSent != null && message.hasOwnProperty("isSent")) + var properties = {}; + if (message.isSent != null && message.hasOwnProperty("isSent")) { + properties._isSent = 1; if (typeof message.isSent !== "boolean") return "isSent: boolean expected"; + } return null; }; @@ -82090,10 +128352,11 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) - object.isSent = false; - if (message.isSent != null && message.hasOwnProperty("isSent")) + if (message.isSent != null && message.hasOwnProperty("isSent")) { object.isSent = message.isSent; + if (options.oneofs) + object._isSent = "isSent"; + } return object; }; @@ -82108,6 +128371,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for BotWelcomeRequestAction + * @function getTypeUrl + * @memberof proto.SyncActionValue.BotWelcomeRequestAction + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BotWelcomeRequestAction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.SyncActionValue.BotWelcomeRequestAction"; + }; + return BotWelcomeRequestAction; })(); @@ -82143,6 +128421,15 @@ $root.proto = (function() { */ CallLogAction.prototype.callLogRecord = null; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CallLogAction.prototype, "_callLogRecord", { + get: $util.oneOfGetter($oneOfFields = ["callLogRecord"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new CallLogAction instance using the specified properties. * @function create @@ -82203,9 +128490,10 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.callLogRecord = $root.proto.CallLogRecord.decode(reader, reader.uint32()); - break; + case 1: { + message.callLogRecord = $root.proto.CallLogRecord.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -82241,10 +128529,14 @@ $root.proto = (function() { CallLogAction.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; if (message.callLogRecord != null && message.hasOwnProperty("callLogRecord")) { - var error = $root.proto.CallLogRecord.verify(message.callLogRecord); - if (error) - return "callLogRecord." + error; + properties._callLogRecord = 1; + { + var error = $root.proto.CallLogRecord.verify(message.callLogRecord); + if (error) + return "callLogRecord." + error; + } } return null; }; @@ -82282,10 +128574,11 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) - object.callLogRecord = null; - if (message.callLogRecord != null && message.hasOwnProperty("callLogRecord")) + if (message.callLogRecord != null && message.hasOwnProperty("callLogRecord")) { object.callLogRecord = $root.proto.CallLogRecord.toObject(message.callLogRecord, options); + if (options.oneofs) + object._callLogRecord = "callLogRecord"; + } return object; }; @@ -82300,6 +128593,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CallLogAction + * @function getTypeUrl + * @memberof proto.SyncActionValue.CallLogAction + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CallLogAction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.SyncActionValue.CallLogAction"; + }; + return CallLogAction; })(); @@ -82329,11 +128637,20 @@ $root.proto = (function() { /** * ChatAssignmentAction deviceAgentID. - * @member {string} deviceAgentID + * @member {string|null|undefined} deviceAgentID * @memberof proto.SyncActionValue.ChatAssignmentAction * @instance */ - ChatAssignmentAction.prototype.deviceAgentID = ""; + ChatAssignmentAction.prototype.deviceAgentID = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ChatAssignmentAction.prototype, "_deviceAgentID", { + get: $util.oneOfGetter($oneOfFields = ["deviceAgentID"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new ChatAssignmentAction instance using the specified properties. @@ -82395,9 +128712,10 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.deviceAgentID = reader.string(); - break; + case 1: { + message.deviceAgentID = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -82433,9 +128751,12 @@ $root.proto = (function() { ChatAssignmentAction.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.deviceAgentID != null && message.hasOwnProperty("deviceAgentID")) + var properties = {}; + if (message.deviceAgentID != null && message.hasOwnProperty("deviceAgentID")) { + properties._deviceAgentID = 1; if (!$util.isString(message.deviceAgentID)) return "deviceAgentID: string expected"; + } return null; }; @@ -82469,10 +128790,11 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) - object.deviceAgentID = ""; - if (message.deviceAgentID != null && message.hasOwnProperty("deviceAgentID")) + if (message.deviceAgentID != null && message.hasOwnProperty("deviceAgentID")) { object.deviceAgentID = message.deviceAgentID; + if (options.oneofs) + object._deviceAgentID = "deviceAgentID"; + } return object; }; @@ -82487,6 +128809,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ChatAssignmentAction + * @function getTypeUrl + * @memberof proto.SyncActionValue.ChatAssignmentAction + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ChatAssignmentAction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.SyncActionValue.ChatAssignmentAction"; + }; + return ChatAssignmentAction; })(); @@ -82516,11 +128853,20 @@ $root.proto = (function() { /** * ChatAssignmentOpenedStatusAction chatOpened. - * @member {boolean} chatOpened + * @member {boolean|null|undefined} chatOpened * @memberof proto.SyncActionValue.ChatAssignmentOpenedStatusAction * @instance */ - ChatAssignmentOpenedStatusAction.prototype.chatOpened = false; + ChatAssignmentOpenedStatusAction.prototype.chatOpened = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ChatAssignmentOpenedStatusAction.prototype, "_chatOpened", { + get: $util.oneOfGetter($oneOfFields = ["chatOpened"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new ChatAssignmentOpenedStatusAction instance using the specified properties. @@ -82582,9 +128928,10 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.chatOpened = reader.bool(); - break; + case 1: { + message.chatOpened = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -82620,9 +128967,12 @@ $root.proto = (function() { ChatAssignmentOpenedStatusAction.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.chatOpened != null && message.hasOwnProperty("chatOpened")) + var properties = {}; + if (message.chatOpened != null && message.hasOwnProperty("chatOpened")) { + properties._chatOpened = 1; if (typeof message.chatOpened !== "boolean") return "chatOpened: boolean expected"; + } return null; }; @@ -82656,10 +129006,11 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) - object.chatOpened = false; - if (message.chatOpened != null && message.hasOwnProperty("chatOpened")) + if (message.chatOpened != null && message.hasOwnProperty("chatOpened")) { object.chatOpened = message.chatOpened; + if (options.oneofs) + object._chatOpened = "chatOpened"; + } return object; }; @@ -82674,6 +129025,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ChatAssignmentOpenedStatusAction + * @function getTypeUrl + * @memberof proto.SyncActionValue.ChatAssignmentOpenedStatusAction + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ChatAssignmentOpenedStatusAction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.SyncActionValue.ChatAssignmentOpenedStatusAction"; + }; + return ChatAssignmentOpenedStatusAction; })(); @@ -82709,6 +129075,15 @@ $root.proto = (function() { */ ClearChatAction.prototype.messageRange = null; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ClearChatAction.prototype, "_messageRange", { + get: $util.oneOfGetter($oneOfFields = ["messageRange"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new ClearChatAction instance using the specified properties. * @function create @@ -82769,9 +129144,10 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.messageRange = $root.proto.SyncActionValue.SyncActionMessageRange.decode(reader, reader.uint32()); - break; + case 1: { + message.messageRange = $root.proto.SyncActionValue.SyncActionMessageRange.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -82807,10 +129183,14 @@ $root.proto = (function() { ClearChatAction.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; if (message.messageRange != null && message.hasOwnProperty("messageRange")) { - var error = $root.proto.SyncActionValue.SyncActionMessageRange.verify(message.messageRange); - if (error) - return "messageRange." + error; + properties._messageRange = 1; + { + var error = $root.proto.SyncActionValue.SyncActionMessageRange.verify(message.messageRange); + if (error) + return "messageRange." + error; + } } return null; }; @@ -82848,10 +129228,11 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) - object.messageRange = null; - if (message.messageRange != null && message.hasOwnProperty("messageRange")) + if (message.messageRange != null && message.hasOwnProperty("messageRange")) { object.messageRange = $root.proto.SyncActionValue.SyncActionMessageRange.toObject(message.messageRange, options); + if (options.oneofs) + object._messageRange = "messageRange"; + } return object; }; @@ -82866,6 +129247,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ClearChatAction + * @function getTypeUrl + * @memberof proto.SyncActionValue.ClearChatAction + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ClearChatAction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.SyncActionValue.ClearChatAction"; + }; + return ClearChatAction; })(); @@ -82898,35 +129294,62 @@ $root.proto = (function() { /** * ContactAction fullName. - * @member {string} fullName + * @member {string|null|undefined} fullName * @memberof proto.SyncActionValue.ContactAction * @instance */ - ContactAction.prototype.fullName = ""; + ContactAction.prototype.fullName = null; /** * ContactAction firstName. - * @member {string} firstName + * @member {string|null|undefined} firstName * @memberof proto.SyncActionValue.ContactAction * @instance */ - ContactAction.prototype.firstName = ""; + ContactAction.prototype.firstName = null; /** * ContactAction lidJid. - * @member {string} lidJid + * @member {string|null|undefined} lidJid * @memberof proto.SyncActionValue.ContactAction * @instance */ - ContactAction.prototype.lidJid = ""; + ContactAction.prototype.lidJid = null; /** * ContactAction saveOnPrimaryAddressbook. - * @member {boolean} saveOnPrimaryAddressbook + * @member {boolean|null|undefined} saveOnPrimaryAddressbook * @memberof proto.SyncActionValue.ContactAction * @instance */ - ContactAction.prototype.saveOnPrimaryAddressbook = false; + ContactAction.prototype.saveOnPrimaryAddressbook = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ContactAction.prototype, "_fullName", { + get: $util.oneOfGetter($oneOfFields = ["fullName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ContactAction.prototype, "_firstName", { + get: $util.oneOfGetter($oneOfFields = ["firstName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ContactAction.prototype, "_lidJid", { + get: $util.oneOfGetter($oneOfFields = ["lidJid"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ContactAction.prototype, "_saveOnPrimaryAddressbook", { + get: $util.oneOfGetter($oneOfFields = ["saveOnPrimaryAddressbook"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new ContactAction instance using the specified properties. @@ -82994,18 +129417,22 @@ $root.proto = (function() { 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; - case 3: - message.lidJid = reader.string(); - break; - case 4: - message.saveOnPrimaryAddressbook = reader.bool(); - break; + case 1: { + message.fullName = reader.string(); + break; + } + case 2: { + message.firstName = reader.string(); + break; + } + case 3: { + message.lidJid = reader.string(); + break; + } + case 4: { + message.saveOnPrimaryAddressbook = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -83041,18 +129468,27 @@ $root.proto = (function() { ContactAction.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.fullName != null && message.hasOwnProperty("fullName")) + var properties = {}; + if (message.fullName != null && message.hasOwnProperty("fullName")) { + properties._fullName = 1; if (!$util.isString(message.fullName)) return "fullName: string expected"; - if (message.firstName != null && message.hasOwnProperty("firstName")) + } + if (message.firstName != null && message.hasOwnProperty("firstName")) { + properties._firstName = 1; if (!$util.isString(message.firstName)) return "firstName: string expected"; - if (message.lidJid != null && message.hasOwnProperty("lidJid")) + } + if (message.lidJid != null && message.hasOwnProperty("lidJid")) { + properties._lidJid = 1; if (!$util.isString(message.lidJid)) return "lidJid: string expected"; - if (message.saveOnPrimaryAddressbook != null && message.hasOwnProperty("saveOnPrimaryAddressbook")) + } + if (message.saveOnPrimaryAddressbook != null && message.hasOwnProperty("saveOnPrimaryAddressbook")) { + properties._saveOnPrimaryAddressbook = 1; if (typeof message.saveOnPrimaryAddressbook !== "boolean") return "saveOnPrimaryAddressbook: boolean expected"; + } return null; }; @@ -83092,20 +129528,26 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.fullName = ""; - object.firstName = ""; - object.lidJid = ""; - object.saveOnPrimaryAddressbook = false; - } - if (message.fullName != null && message.hasOwnProperty("fullName")) + if (message.fullName != null && message.hasOwnProperty("fullName")) { object.fullName = message.fullName; - if (message.firstName != null && message.hasOwnProperty("firstName")) + if (options.oneofs) + object._fullName = "fullName"; + } + if (message.firstName != null && message.hasOwnProperty("firstName")) { object.firstName = message.firstName; - if (message.lidJid != null && message.hasOwnProperty("lidJid")) + if (options.oneofs) + object._firstName = "firstName"; + } + if (message.lidJid != null && message.hasOwnProperty("lidJid")) { object.lidJid = message.lidJid; - if (message.saveOnPrimaryAddressbook != null && message.hasOwnProperty("saveOnPrimaryAddressbook")) + if (options.oneofs) + object._lidJid = "lidJid"; + } + if (message.saveOnPrimaryAddressbook != null && message.hasOwnProperty("saveOnPrimaryAddressbook")) { object.saveOnPrimaryAddressbook = message.saveOnPrimaryAddressbook; + if (options.oneofs) + object._saveOnPrimaryAddressbook = "saveOnPrimaryAddressbook"; + } return object; }; @@ -83120,6 +129562,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ContactAction + * @function getTypeUrl + * @memberof proto.SyncActionValue.ContactAction + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ContactAction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.SyncActionValue.ContactAction"; + }; + return ContactAction; })(); @@ -83247,20 +129704,24 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.credentialId = reader.string(); - break; - case 2: - message.country = reader.string(); - break; - case 3: - message.type = reader.string(); - break; - case 4: - if (!(message.metadata && message.metadata.length)) - message.metadata = []; - message.metadata.push($root.proto.SyncActionValue.CustomPaymentMethodMetadata.decode(reader, reader.uint32())); - break; + case 1: { + message.credentialId = reader.string(); + break; + } + case 2: { + message.country = reader.string(); + break; + } + case 3: { + message.type = reader.string(); + break; + } + case 4: { + if (!(message.metadata && message.metadata.length)) + message.metadata = []; + message.metadata.push($root.proto.SyncActionValue.CustomPaymentMethodMetadata.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -83396,6 +129857,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CustomPaymentMethod + * @function getTypeUrl + * @memberof proto.SyncActionValue.CustomPaymentMethod + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CustomPaymentMethod.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.SyncActionValue.CustomPaymentMethod"; + }; + return CustomPaymentMethod; })(); @@ -83500,12 +129976,14 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.key = reader.string(); - break; - case 2: - message.value = reader.string(); - break; + case 1: { + message.key = reader.string(); + break; + } + case 2: { + message.value = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -83606,6 +130084,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CustomPaymentMethodMetadata + * @function getTypeUrl + * @memberof proto.SyncActionValue.CustomPaymentMethodMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CustomPaymentMethodMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.SyncActionValue.CustomPaymentMethodMetadata"; + }; + return CustomPaymentMethodMetadata; })(); @@ -83703,11 +130196,12 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.customPaymentMethods && message.customPaymentMethods.length)) - message.customPaymentMethods = []; - message.customPaymentMethods.push($root.proto.SyncActionValue.CustomPaymentMethod.decode(reader, reader.uint32())); - break; + case 1: { + if (!(message.customPaymentMethods && message.customPaymentMethods.length)) + message.customPaymentMethods = []; + message.customPaymentMethods.push($root.proto.SyncActionValue.CustomPaymentMethod.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -83814,6 +130308,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CustomPaymentMethodsAction + * @function getTypeUrl + * @memberof proto.SyncActionValue.CustomPaymentMethodsAction + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CustomPaymentMethodsAction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.SyncActionValue.CustomPaymentMethodsAction"; + }; + return CustomPaymentMethodsAction; })(); @@ -83849,6 +130358,15 @@ $root.proto = (function() { */ DeleteChatAction.prototype.messageRange = null; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DeleteChatAction.prototype, "_messageRange", { + get: $util.oneOfGetter($oneOfFields = ["messageRange"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new DeleteChatAction instance using the specified properties. * @function create @@ -83909,9 +130427,10 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.messageRange = $root.proto.SyncActionValue.SyncActionMessageRange.decode(reader, reader.uint32()); - break; + case 1: { + message.messageRange = $root.proto.SyncActionValue.SyncActionMessageRange.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -83947,10 +130466,14 @@ $root.proto = (function() { DeleteChatAction.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; if (message.messageRange != null && message.hasOwnProperty("messageRange")) { - var error = $root.proto.SyncActionValue.SyncActionMessageRange.verify(message.messageRange); - if (error) - return "messageRange." + error; + properties._messageRange = 1; + { + var error = $root.proto.SyncActionValue.SyncActionMessageRange.verify(message.messageRange); + if (error) + return "messageRange." + error; + } } return null; }; @@ -83988,10 +130511,11 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) - object.messageRange = null; - if (message.messageRange != null && message.hasOwnProperty("messageRange")) + if (message.messageRange != null && message.hasOwnProperty("messageRange")) { object.messageRange = $root.proto.SyncActionValue.SyncActionMessageRange.toObject(message.messageRange, options); + if (options.oneofs) + object._messageRange = "messageRange"; + } return object; }; @@ -84006,6 +130530,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DeleteChatAction + * @function getTypeUrl + * @memberof proto.SyncActionValue.DeleteChatAction + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteChatAction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.SyncActionValue.DeleteChatAction"; + }; + return DeleteChatAction; })(); @@ -84036,19 +130575,34 @@ $root.proto = (function() { /** * DeleteIndividualCallLogAction peerJid. - * @member {string} peerJid + * @member {string|null|undefined} peerJid * @memberof proto.SyncActionValue.DeleteIndividualCallLogAction * @instance */ - DeleteIndividualCallLogAction.prototype.peerJid = ""; + DeleteIndividualCallLogAction.prototype.peerJid = null; /** * DeleteIndividualCallLogAction isIncoming. - * @member {boolean} isIncoming + * @member {boolean|null|undefined} isIncoming * @memberof proto.SyncActionValue.DeleteIndividualCallLogAction * @instance */ - DeleteIndividualCallLogAction.prototype.isIncoming = false; + DeleteIndividualCallLogAction.prototype.isIncoming = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DeleteIndividualCallLogAction.prototype, "_peerJid", { + get: $util.oneOfGetter($oneOfFields = ["peerJid"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DeleteIndividualCallLogAction.prototype, "_isIncoming", { + get: $util.oneOfGetter($oneOfFields = ["isIncoming"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new DeleteIndividualCallLogAction instance using the specified properties. @@ -84112,12 +130666,14 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.peerJid = reader.string(); - break; - case 2: - message.isIncoming = reader.bool(); - break; + case 1: { + message.peerJid = reader.string(); + break; + } + case 2: { + message.isIncoming = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -84153,12 +130709,17 @@ $root.proto = (function() { DeleteIndividualCallLogAction.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.peerJid != null && message.hasOwnProperty("peerJid")) + var properties = {}; + if (message.peerJid != null && message.hasOwnProperty("peerJid")) { + properties._peerJid = 1; if (!$util.isString(message.peerJid)) return "peerJid: string expected"; - if (message.isIncoming != null && message.hasOwnProperty("isIncoming")) + } + if (message.isIncoming != null && message.hasOwnProperty("isIncoming")) { + properties._isIncoming = 1; if (typeof message.isIncoming !== "boolean") return "isIncoming: boolean expected"; + } return null; }; @@ -84194,14 +130755,16 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.peerJid = ""; - object.isIncoming = false; - } - if (message.peerJid != null && message.hasOwnProperty("peerJid")) + if (message.peerJid != null && message.hasOwnProperty("peerJid")) { object.peerJid = message.peerJid; - if (message.isIncoming != null && message.hasOwnProperty("isIncoming")) + if (options.oneofs) + object._peerJid = "peerJid"; + } + if (message.isIncoming != null && message.hasOwnProperty("isIncoming")) { object.isIncoming = message.isIncoming; + if (options.oneofs) + object._isIncoming = "isIncoming"; + } return object; }; @@ -84216,6 +130779,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DeleteIndividualCallLogAction + * @function getTypeUrl + * @memberof proto.SyncActionValue.DeleteIndividualCallLogAction + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteIndividualCallLogAction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.SyncActionValue.DeleteIndividualCallLogAction"; + }; + return DeleteIndividualCallLogAction; })(); @@ -84246,19 +130824,34 @@ $root.proto = (function() { /** * DeleteMessageForMeAction deleteMedia. - * @member {boolean} deleteMedia + * @member {boolean|null|undefined} deleteMedia * @memberof proto.SyncActionValue.DeleteMessageForMeAction * @instance */ - DeleteMessageForMeAction.prototype.deleteMedia = false; + DeleteMessageForMeAction.prototype.deleteMedia = null; /** * DeleteMessageForMeAction messageTimestamp. - * @member {number|Long} messageTimestamp + * @member {number|Long|null|undefined} messageTimestamp * @memberof proto.SyncActionValue.DeleteMessageForMeAction * @instance */ - DeleteMessageForMeAction.prototype.messageTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + DeleteMessageForMeAction.prototype.messageTimestamp = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DeleteMessageForMeAction.prototype, "_deleteMedia", { + get: $util.oneOfGetter($oneOfFields = ["deleteMedia"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DeleteMessageForMeAction.prototype, "_messageTimestamp", { + get: $util.oneOfGetter($oneOfFields = ["messageTimestamp"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new DeleteMessageForMeAction instance using the specified properties. @@ -84322,12 +130915,14 @@ $root.proto = (function() { 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; + case 1: { + message.deleteMedia = reader.bool(); + break; + } + case 2: { + message.messageTimestamp = reader.int64(); + break; + } default: reader.skipType(tag & 7); break; @@ -84363,12 +130958,17 @@ $root.proto = (function() { DeleteMessageForMeAction.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.deleteMedia != null && message.hasOwnProperty("deleteMedia")) + var properties = {}; + if (message.deleteMedia != null && message.hasOwnProperty("deleteMedia")) { + properties._deleteMedia = 1; if (typeof message.deleteMedia !== "boolean") return "deleteMedia: boolean expected"; - if (message.messageTimestamp != null && message.hasOwnProperty("messageTimestamp")) + } + if (message.messageTimestamp != null && message.hasOwnProperty("messageTimestamp")) { + properties._messageTimestamp = 1; if (!$util.isInteger(message.messageTimestamp) && !(message.messageTimestamp && $util.isInteger(message.messageTimestamp.low) && $util.isInteger(message.messageTimestamp.high))) return "messageTimestamp: integer|Long expected"; + } return null; }; @@ -84411,21 +131011,19 @@ $root.proto = (function() { 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")) + if (message.deleteMedia != null && message.hasOwnProperty("deleteMedia")) { object.deleteMedia = message.deleteMedia; - if (message.messageTimestamp != null && message.hasOwnProperty("messageTimestamp")) + if (options.oneofs) + object._deleteMedia = "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; + if (options.oneofs) + object._messageTimestamp = "messageTimestamp"; + } return object; }; @@ -84440,6 +131038,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DeleteMessageForMeAction + * @function getTypeUrl + * @memberof proto.SyncActionValue.DeleteMessageForMeAction + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteMessageForMeAction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.SyncActionValue.DeleteMessageForMeAction"; + }; + return DeleteMessageForMeAction; })(); @@ -84469,11 +131082,20 @@ $root.proto = (function() { /** * ExternalWebBetaAction isOptIn. - * @member {boolean} isOptIn + * @member {boolean|null|undefined} isOptIn * @memberof proto.SyncActionValue.ExternalWebBetaAction * @instance */ - ExternalWebBetaAction.prototype.isOptIn = false; + ExternalWebBetaAction.prototype.isOptIn = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ExternalWebBetaAction.prototype, "_isOptIn", { + get: $util.oneOfGetter($oneOfFields = ["isOptIn"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new ExternalWebBetaAction instance using the specified properties. @@ -84535,9 +131157,10 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.isOptIn = reader.bool(); - break; + case 1: { + message.isOptIn = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -84573,9 +131196,12 @@ $root.proto = (function() { ExternalWebBetaAction.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.isOptIn != null && message.hasOwnProperty("isOptIn")) + var properties = {}; + if (message.isOptIn != null && message.hasOwnProperty("isOptIn")) { + properties._isOptIn = 1; if (typeof message.isOptIn !== "boolean") return "isOptIn: boolean expected"; + } return null; }; @@ -84609,10 +131235,11 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) - object.isOptIn = false; - if (message.isOptIn != null && message.hasOwnProperty("isOptIn")) + if (message.isOptIn != null && message.hasOwnProperty("isOptIn")) { object.isOptIn = message.isOptIn; + if (options.oneofs) + object._isOptIn = "isOptIn"; + } return object; }; @@ -84627,9 +131254,464 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ExternalWebBetaAction + * @function getTypeUrl + * @memberof proto.SyncActionValue.ExternalWebBetaAction + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExternalWebBetaAction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.SyncActionValue.ExternalWebBetaAction"; + }; + return ExternalWebBetaAction; })(); + SyncActionValue.FavoritesAction = (function() { + + /** + * Properties of a FavoritesAction. + * @memberof proto.SyncActionValue + * @interface IFavoritesAction + * @property {Array.|null} [favorites] FavoritesAction favorites + */ + + /** + * Constructs a new FavoritesAction. + * @memberof proto.SyncActionValue + * @classdesc Represents a FavoritesAction. + * @implements IFavoritesAction + * @constructor + * @param {proto.SyncActionValue.IFavoritesAction=} [properties] Properties to set + */ + function FavoritesAction(properties) { + this.favorites = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FavoritesAction favorites. + * @member {Array.} favorites + * @memberof proto.SyncActionValue.FavoritesAction + * @instance + */ + FavoritesAction.prototype.favorites = $util.emptyArray; + + /** + * Creates a new FavoritesAction instance using the specified properties. + * @function create + * @memberof proto.SyncActionValue.FavoritesAction + * @static + * @param {proto.SyncActionValue.IFavoritesAction=} [properties] Properties to set + * @returns {proto.SyncActionValue.FavoritesAction} FavoritesAction instance + */ + FavoritesAction.create = function create(properties) { + return new FavoritesAction(properties); + }; + + /** + * Encodes the specified FavoritesAction message. Does not implicitly {@link proto.SyncActionValue.FavoritesAction.verify|verify} messages. + * @function encode + * @memberof proto.SyncActionValue.FavoritesAction + * @static + * @param {proto.SyncActionValue.IFavoritesAction} message FavoritesAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FavoritesAction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.favorites != null && message.favorites.length) + for (var i = 0; i < message.favorites.length; ++i) + $root.proto.SyncActionValue.FavoritesAction.Favorite.encode(message.favorites[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FavoritesAction message, length delimited. Does not implicitly {@link proto.SyncActionValue.FavoritesAction.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.SyncActionValue.FavoritesAction + * @static + * @param {proto.SyncActionValue.IFavoritesAction} message FavoritesAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FavoritesAction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FavoritesAction message from the specified reader or buffer. + * @function decode + * @memberof proto.SyncActionValue.FavoritesAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.SyncActionValue.FavoritesAction} FavoritesAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FavoritesAction.decode = function 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.FavoritesAction(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.favorites && message.favorites.length)) + message.favorites = []; + message.favorites.push($root.proto.SyncActionValue.FavoritesAction.Favorite.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FavoritesAction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.SyncActionValue.FavoritesAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.SyncActionValue.FavoritesAction} FavoritesAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FavoritesAction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FavoritesAction message. + * @function verify + * @memberof proto.SyncActionValue.FavoritesAction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FavoritesAction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.favorites != null && message.hasOwnProperty("favorites")) { + if (!Array.isArray(message.favorites)) + return "favorites: array expected"; + for (var i = 0; i < message.favorites.length; ++i) { + var error = $root.proto.SyncActionValue.FavoritesAction.Favorite.verify(message.favorites[i]); + if (error) + return "favorites." + error; + } + } + return null; + }; + + /** + * Creates a FavoritesAction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.SyncActionValue.FavoritesAction + * @static + * @param {Object.} object Plain object + * @returns {proto.SyncActionValue.FavoritesAction} FavoritesAction + */ + FavoritesAction.fromObject = function fromObject(object) { + if (object instanceof $root.proto.SyncActionValue.FavoritesAction) + return object; + var message = new $root.proto.SyncActionValue.FavoritesAction(); + if (object.favorites) { + if (!Array.isArray(object.favorites)) + throw TypeError(".proto.SyncActionValue.FavoritesAction.favorites: array expected"); + message.favorites = []; + for (var i = 0; i < object.favorites.length; ++i) { + if (typeof object.favorites[i] !== "object") + throw TypeError(".proto.SyncActionValue.FavoritesAction.favorites: object expected"); + message.favorites[i] = $root.proto.SyncActionValue.FavoritesAction.Favorite.fromObject(object.favorites[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FavoritesAction message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.SyncActionValue.FavoritesAction + * @static + * @param {proto.SyncActionValue.FavoritesAction} message FavoritesAction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FavoritesAction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.favorites = []; + if (message.favorites && message.favorites.length) { + object.favorites = []; + for (var j = 0; j < message.favorites.length; ++j) + object.favorites[j] = $root.proto.SyncActionValue.FavoritesAction.Favorite.toObject(message.favorites[j], options); + } + return object; + }; + + /** + * Converts this FavoritesAction to JSON. + * @function toJSON + * @memberof proto.SyncActionValue.FavoritesAction + * @instance + * @returns {Object.} JSON object + */ + FavoritesAction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FavoritesAction + * @function getTypeUrl + * @memberof proto.SyncActionValue.FavoritesAction + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FavoritesAction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.SyncActionValue.FavoritesAction"; + }; + + FavoritesAction.Favorite = (function() { + + /** + * Properties of a Favorite. + * @memberof proto.SyncActionValue.FavoritesAction + * @interface IFavorite + * @property {string|null} [id] Favorite id + */ + + /** + * Constructs a new Favorite. + * @memberof proto.SyncActionValue.FavoritesAction + * @classdesc Represents a Favorite. + * @implements IFavorite + * @constructor + * @param {proto.SyncActionValue.FavoritesAction.IFavorite=} [properties] Properties to set + */ + function Favorite(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Favorite id. + * @member {string|null|undefined} id + * @memberof proto.SyncActionValue.FavoritesAction.Favorite + * @instance + */ + Favorite.prototype.id = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Favorite.prototype, "_id", { + get: $util.oneOfGetter($oneOfFields = ["id"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Favorite instance using the specified properties. + * @function create + * @memberof proto.SyncActionValue.FavoritesAction.Favorite + * @static + * @param {proto.SyncActionValue.FavoritesAction.IFavorite=} [properties] Properties to set + * @returns {proto.SyncActionValue.FavoritesAction.Favorite} Favorite instance + */ + Favorite.create = function create(properties) { + return new Favorite(properties); + }; + + /** + * Encodes the specified Favorite message. Does not implicitly {@link proto.SyncActionValue.FavoritesAction.Favorite.verify|verify} messages. + * @function encode + * @memberof proto.SyncActionValue.FavoritesAction.Favorite + * @static + * @param {proto.SyncActionValue.FavoritesAction.IFavorite} message Favorite message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Favorite.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); + return writer; + }; + + /** + * Encodes the specified Favorite message, length delimited. Does not implicitly {@link proto.SyncActionValue.FavoritesAction.Favorite.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.SyncActionValue.FavoritesAction.Favorite + * @static + * @param {proto.SyncActionValue.FavoritesAction.IFavorite} message Favorite message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Favorite.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Favorite message from the specified reader or buffer. + * @function decode + * @memberof proto.SyncActionValue.FavoritesAction.Favorite + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.SyncActionValue.FavoritesAction.Favorite} Favorite + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Favorite.decode = function 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.FavoritesAction.Favorite(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.id = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Favorite message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.SyncActionValue.FavoritesAction.Favorite + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.SyncActionValue.FavoritesAction.Favorite} Favorite + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Favorite.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Favorite message. + * @function verify + * @memberof proto.SyncActionValue.FavoritesAction.Favorite + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Favorite.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.id != null && message.hasOwnProperty("id")) { + properties._id = 1; + if (!$util.isString(message.id)) + return "id: string expected"; + } + return null; + }; + + /** + * Creates a Favorite message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.SyncActionValue.FavoritesAction.Favorite + * @static + * @param {Object.} object Plain object + * @returns {proto.SyncActionValue.FavoritesAction.Favorite} Favorite + */ + Favorite.fromObject = function fromObject(object) { + if (object instanceof $root.proto.SyncActionValue.FavoritesAction.Favorite) + return object; + var message = new $root.proto.SyncActionValue.FavoritesAction.Favorite(); + if (object.id != null) + message.id = String(object.id); + return message; + }; + + /** + * Creates a plain object from a Favorite message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.SyncActionValue.FavoritesAction.Favorite + * @static + * @param {proto.SyncActionValue.FavoritesAction.Favorite} message Favorite + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Favorite.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.id != null && message.hasOwnProperty("id")) { + object.id = message.id; + if (options.oneofs) + object._id = "id"; + } + return object; + }; + + /** + * Converts this Favorite to JSON. + * @function toJSON + * @memberof proto.SyncActionValue.FavoritesAction.Favorite + * @instance + * @returns {Object.} JSON object + */ + Favorite.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Favorite + * @function getTypeUrl + * @memberof proto.SyncActionValue.FavoritesAction.Favorite + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Favorite.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.SyncActionValue.FavoritesAction.Favorite"; + }; + + return Favorite; + })(); + + return FavoritesAction; + })(); + SyncActionValue.KeyExpiration = (function() { /** @@ -84656,11 +131738,20 @@ $root.proto = (function() { /** * KeyExpiration expiredKeyEpoch. - * @member {number} expiredKeyEpoch + * @member {number|null|undefined} expiredKeyEpoch * @memberof proto.SyncActionValue.KeyExpiration * @instance */ - KeyExpiration.prototype.expiredKeyEpoch = 0; + KeyExpiration.prototype.expiredKeyEpoch = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(KeyExpiration.prototype, "_expiredKeyEpoch", { + get: $util.oneOfGetter($oneOfFields = ["expiredKeyEpoch"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new KeyExpiration instance using the specified properties. @@ -84722,9 +131813,10 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.expiredKeyEpoch = reader.int32(); - break; + case 1: { + message.expiredKeyEpoch = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -84760,9 +131852,12 @@ $root.proto = (function() { KeyExpiration.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.expiredKeyEpoch != null && message.hasOwnProperty("expiredKeyEpoch")) + var properties = {}; + if (message.expiredKeyEpoch != null && message.hasOwnProperty("expiredKeyEpoch")) { + properties._expiredKeyEpoch = 1; if (!$util.isInteger(message.expiredKeyEpoch)) return "expiredKeyEpoch: integer expected"; + } return null; }; @@ -84796,10 +131891,11 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) - object.expiredKeyEpoch = 0; - if (message.expiredKeyEpoch != null && message.hasOwnProperty("expiredKeyEpoch")) + if (message.expiredKeyEpoch != null && message.hasOwnProperty("expiredKeyEpoch")) { object.expiredKeyEpoch = message.expiredKeyEpoch; + if (options.oneofs) + object._expiredKeyEpoch = "expiredKeyEpoch"; + } return object; }; @@ -84814,6 +131910,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for KeyExpiration + * @function getTypeUrl + * @memberof proto.SyncActionValue.KeyExpiration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + KeyExpiration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.SyncActionValue.KeyExpiration"; + }; + return KeyExpiration; })(); @@ -84843,11 +131954,20 @@ $root.proto = (function() { /** * LabelAssociationAction labeled. - * @member {boolean} labeled + * @member {boolean|null|undefined} labeled * @memberof proto.SyncActionValue.LabelAssociationAction * @instance */ - LabelAssociationAction.prototype.labeled = false; + LabelAssociationAction.prototype.labeled = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(LabelAssociationAction.prototype, "_labeled", { + get: $util.oneOfGetter($oneOfFields = ["labeled"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new LabelAssociationAction instance using the specified properties. @@ -84909,9 +132029,10 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.labeled = reader.bool(); - break; + case 1: { + message.labeled = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -84947,9 +132068,12 @@ $root.proto = (function() { LabelAssociationAction.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.labeled != null && message.hasOwnProperty("labeled")) + var properties = {}; + if (message.labeled != null && message.hasOwnProperty("labeled")) { + properties._labeled = 1; if (typeof message.labeled !== "boolean") return "labeled: boolean expected"; + } return null; }; @@ -84983,10 +132107,11 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) - object.labeled = false; - if (message.labeled != null && message.hasOwnProperty("labeled")) + if (message.labeled != null && message.hasOwnProperty("labeled")) { object.labeled = message.labeled; + if (options.oneofs) + object._labeled = "labeled"; + } return object; }; @@ -85001,6 +132126,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for LabelAssociationAction + * @function getTypeUrl + * @memberof proto.SyncActionValue.LabelAssociationAction + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LabelAssociationAction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.SyncActionValue.LabelAssociationAction"; + }; + return LabelAssociationAction; })(); @@ -85015,6 +132155,8 @@ $root.proto = (function() { * @property {number|null} [predefinedId] LabelEditAction predefinedId * @property {boolean|null} [deleted] LabelEditAction deleted * @property {number|null} [orderIndex] LabelEditAction orderIndex + * @property {boolean|null} [isActive] LabelEditAction isActive + * @property {proto.SyncActionValue.LabelEditAction.ListType|null} [type] LabelEditAction type */ /** @@ -85034,43 +132176,104 @@ $root.proto = (function() { /** * LabelEditAction name. - * @member {string} name + * @member {string|null|undefined} name * @memberof proto.SyncActionValue.LabelEditAction * @instance */ - LabelEditAction.prototype.name = ""; + LabelEditAction.prototype.name = null; /** * LabelEditAction color. - * @member {number} color + * @member {number|null|undefined} color * @memberof proto.SyncActionValue.LabelEditAction * @instance */ - LabelEditAction.prototype.color = 0; + LabelEditAction.prototype.color = null; /** * LabelEditAction predefinedId. - * @member {number} predefinedId + * @member {number|null|undefined} predefinedId * @memberof proto.SyncActionValue.LabelEditAction * @instance */ - LabelEditAction.prototype.predefinedId = 0; + LabelEditAction.prototype.predefinedId = null; /** * LabelEditAction deleted. - * @member {boolean} deleted + * @member {boolean|null|undefined} deleted * @memberof proto.SyncActionValue.LabelEditAction * @instance */ - LabelEditAction.prototype.deleted = false; + LabelEditAction.prototype.deleted = null; /** * LabelEditAction orderIndex. - * @member {number} orderIndex + * @member {number|null|undefined} orderIndex * @memberof proto.SyncActionValue.LabelEditAction * @instance */ - LabelEditAction.prototype.orderIndex = 0; + LabelEditAction.prototype.orderIndex = null; + + /** + * LabelEditAction isActive. + * @member {boolean|null|undefined} isActive + * @memberof proto.SyncActionValue.LabelEditAction + * @instance + */ + LabelEditAction.prototype.isActive = null; + + /** + * LabelEditAction type. + * @member {proto.SyncActionValue.LabelEditAction.ListType|null|undefined} type + * @memberof proto.SyncActionValue.LabelEditAction + * @instance + */ + LabelEditAction.prototype.type = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(LabelEditAction.prototype, "_name", { + get: $util.oneOfGetter($oneOfFields = ["name"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(LabelEditAction.prototype, "_color", { + get: $util.oneOfGetter($oneOfFields = ["color"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(LabelEditAction.prototype, "_predefinedId", { + get: $util.oneOfGetter($oneOfFields = ["predefinedId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(LabelEditAction.prototype, "_deleted", { + get: $util.oneOfGetter($oneOfFields = ["deleted"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(LabelEditAction.prototype, "_orderIndex", { + get: $util.oneOfGetter($oneOfFields = ["orderIndex"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(LabelEditAction.prototype, "_isActive", { + get: $util.oneOfGetter($oneOfFields = ["isActive"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(LabelEditAction.prototype, "_type", { + get: $util.oneOfGetter($oneOfFields = ["type"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new LabelEditAction instance using the specified properties. @@ -85106,6 +132309,10 @@ $root.proto = (function() { writer.uint32(/* id 4, wireType 0 =*/32).bool(message.deleted); if (message.orderIndex != null && Object.hasOwnProperty.call(message, "orderIndex")) writer.uint32(/* id 5, wireType 0 =*/40).int32(message.orderIndex); + if (message.isActive != null && Object.hasOwnProperty.call(message, "isActive")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.isActive); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.type); return writer; }; @@ -85140,21 +132347,34 @@ $root.proto = (function() { 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; - case 5: - message.orderIndex = reader.int32(); - break; + 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; + } + case 5: { + message.orderIndex = reader.int32(); + break; + } + case 6: { + message.isActive = reader.bool(); + break; + } + case 7: { + message.type = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -85190,21 +132410,51 @@ $root.proto = (function() { LabelEditAction.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) { + properties._name = 1; if (!$util.isString(message.name)) return "name: string expected"; - if (message.color != null && message.hasOwnProperty("color")) + } + if (message.color != null && message.hasOwnProperty("color")) { + properties._color = 1; if (!$util.isInteger(message.color)) return "color: integer expected"; - if (message.predefinedId != null && message.hasOwnProperty("predefinedId")) + } + if (message.predefinedId != null && message.hasOwnProperty("predefinedId")) { + properties._predefinedId = 1; if (!$util.isInteger(message.predefinedId)) return "predefinedId: integer expected"; - if (message.deleted != null && message.hasOwnProperty("deleted")) + } + if (message.deleted != null && message.hasOwnProperty("deleted")) { + properties._deleted = 1; if (typeof message.deleted !== "boolean") return "deleted: boolean expected"; - if (message.orderIndex != null && message.hasOwnProperty("orderIndex")) + } + if (message.orderIndex != null && message.hasOwnProperty("orderIndex")) { + properties._orderIndex = 1; if (!$util.isInteger(message.orderIndex)) return "orderIndex: integer expected"; + } + if (message.isActive != null && message.hasOwnProperty("isActive")) { + properties._isActive = 1; + if (typeof message.isActive !== "boolean") + return "isActive: boolean expected"; + } + if (message.type != null && message.hasOwnProperty("type")) { + properties._type = 1; + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + } return null; }; @@ -85230,6 +132480,40 @@ $root.proto = (function() { message.deleted = Boolean(object.deleted); if (object.orderIndex != null) message.orderIndex = object.orderIndex | 0; + if (object.isActive != null) + message.isActive = Boolean(object.isActive); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "NONE": + case 0: + message.type = 0; + break; + case "UNREAD": + case 1: + message.type = 1; + break; + case "GROUPS": + case 2: + message.type = 2; + break; + case "FAVORITES": + case 3: + message.type = 3; + break; + case "PREDEFINED": + case 4: + message.type = 4; + break; + case "CUSTOM": + case 5: + message.type = 5; + break; + } return message; }; @@ -85246,23 +132530,41 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.name = ""; - object.color = 0; - object.predefinedId = 0; - object.deleted = false; - object.orderIndex = 0; - } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && message.hasOwnProperty("name")) { object.name = message.name; - if (message.color != null && message.hasOwnProperty("color")) + if (options.oneofs) + object._name = "name"; + } + if (message.color != null && message.hasOwnProperty("color")) { object.color = message.color; - if (message.predefinedId != null && message.hasOwnProperty("predefinedId")) + if (options.oneofs) + object._color = "color"; + } + if (message.predefinedId != null && message.hasOwnProperty("predefinedId")) { object.predefinedId = message.predefinedId; - if (message.deleted != null && message.hasOwnProperty("deleted")) + if (options.oneofs) + object._predefinedId = "predefinedId"; + } + if (message.deleted != null && message.hasOwnProperty("deleted")) { object.deleted = message.deleted; - if (message.orderIndex != null && message.hasOwnProperty("orderIndex")) + if (options.oneofs) + object._deleted = "deleted"; + } + if (message.orderIndex != null && message.hasOwnProperty("orderIndex")) { object.orderIndex = message.orderIndex; + if (options.oneofs) + object._orderIndex = "orderIndex"; + } + if (message.isActive != null && message.hasOwnProperty("isActive")) { + object.isActive = message.isActive; + if (options.oneofs) + object._isActive = "isActive"; + } + if (message.type != null && message.hasOwnProperty("type")) { + object.type = options.enums === String ? $root.proto.SyncActionValue.LabelEditAction.ListType[message.type] === undefined ? message.type : $root.proto.SyncActionValue.LabelEditAction.ListType[message.type] : message.type; + if (options.oneofs) + object._type = "type"; + } return object; }; @@ -85277,6 +132579,43 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for LabelEditAction + * @function getTypeUrl + * @memberof proto.SyncActionValue.LabelEditAction + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LabelEditAction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.SyncActionValue.LabelEditAction"; + }; + + /** + * ListType enum. + * @name proto.SyncActionValue.LabelEditAction.ListType + * @enum {number} + * @property {number} NONE=0 NONE value + * @property {number} UNREAD=1 UNREAD value + * @property {number} GROUPS=2 GROUPS value + * @property {number} FAVORITES=3 FAVORITES value + * @property {number} PREDEFINED=4 PREDEFINED value + * @property {number} CUSTOM=5 CUSTOM value + */ + LabelEditAction.ListType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NONE"] = 0; + values[valuesById[1] = "UNREAD"] = 1; + values[valuesById[2] = "GROUPS"] = 2; + values[valuesById[3] = "FAVORITES"] = 3; + values[valuesById[4] = "PREDEFINED"] = 4; + values[valuesById[5] = "CUSTOM"] = 5; + return values; + })(); + return LabelEditAction; })(); @@ -85337,9 +132676,12 @@ $root.proto = (function() { LabelReorderingAction.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.sortedLabelIds != null && message.sortedLabelIds.length) + if (message.sortedLabelIds != null && message.sortedLabelIds.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); for (var i = 0; i < message.sortedLabelIds.length; ++i) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.sortedLabelIds[i]); + writer.int32(message.sortedLabelIds[i]); + writer.ldelim(); + } return writer; }; @@ -85374,16 +132716,17 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.sortedLabelIds && message.sortedLabelIds.length)) - message.sortedLabelIds = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) + case 1: { + if (!(message.sortedLabelIds && message.sortedLabelIds.length)) + message.sortedLabelIds = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.sortedLabelIds.push(reader.int32()); + } else message.sortedLabelIds.push(reader.int32()); - } else - message.sortedLabelIds.push(reader.int32()); - break; + break; + } default: reader.skipType(tag & 7); break; @@ -85485,6 +132828,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for LabelReorderingAction + * @function getTypeUrl + * @memberof proto.SyncActionValue.LabelReorderingAction + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LabelReorderingAction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.SyncActionValue.LabelReorderingAction"; + }; + return LabelReorderingAction; })(); @@ -85514,11 +132872,20 @@ $root.proto = (function() { /** * LocaleSetting locale. - * @member {string} locale + * @member {string|null|undefined} locale * @memberof proto.SyncActionValue.LocaleSetting * @instance */ - LocaleSetting.prototype.locale = ""; + LocaleSetting.prototype.locale = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(LocaleSetting.prototype, "_locale", { + get: $util.oneOfGetter($oneOfFields = ["locale"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new LocaleSetting instance using the specified properties. @@ -85580,9 +132947,10 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.locale = reader.string(); - break; + case 1: { + message.locale = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -85618,9 +132986,12 @@ $root.proto = (function() { LocaleSetting.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.locale != null && message.hasOwnProperty("locale")) + var properties = {}; + if (message.locale != null && message.hasOwnProperty("locale")) { + properties._locale = 1; if (!$util.isString(message.locale)) return "locale: string expected"; + } return null; }; @@ -85654,10 +133025,11 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) - object.locale = ""; - if (message.locale != null && message.hasOwnProperty("locale")) + if (message.locale != null && message.hasOwnProperty("locale")) { object.locale = message.locale; + if (options.oneofs) + object._locale = "locale"; + } return object; }; @@ -85672,9 +133044,240 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for LocaleSetting + * @function getTypeUrl + * @memberof proto.SyncActionValue.LocaleSetting + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LocaleSetting.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.SyncActionValue.LocaleSetting"; + }; + return LocaleSetting; })(); + SyncActionValue.LockChatAction = (function() { + + /** + * Properties of a LockChatAction. + * @memberof proto.SyncActionValue + * @interface ILockChatAction + * @property {boolean|null} [locked] LockChatAction locked + */ + + /** + * Constructs a new LockChatAction. + * @memberof proto.SyncActionValue + * @classdesc Represents a LockChatAction. + * @implements ILockChatAction + * @constructor + * @param {proto.SyncActionValue.ILockChatAction=} [properties] Properties to set + */ + function LockChatAction(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LockChatAction locked. + * @member {boolean|null|undefined} locked + * @memberof proto.SyncActionValue.LockChatAction + * @instance + */ + LockChatAction.prototype.locked = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(LockChatAction.prototype, "_locked", { + get: $util.oneOfGetter($oneOfFields = ["locked"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new LockChatAction instance using the specified properties. + * @function create + * @memberof proto.SyncActionValue.LockChatAction + * @static + * @param {proto.SyncActionValue.ILockChatAction=} [properties] Properties to set + * @returns {proto.SyncActionValue.LockChatAction} LockChatAction instance + */ + LockChatAction.create = function create(properties) { + return new LockChatAction(properties); + }; + + /** + * Encodes the specified LockChatAction message. Does not implicitly {@link proto.SyncActionValue.LockChatAction.verify|verify} messages. + * @function encode + * @memberof proto.SyncActionValue.LockChatAction + * @static + * @param {proto.SyncActionValue.ILockChatAction} message LockChatAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LockChatAction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.locked != null && Object.hasOwnProperty.call(message, "locked")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.locked); + return writer; + }; + + /** + * Encodes the specified LockChatAction message, length delimited. Does not implicitly {@link proto.SyncActionValue.LockChatAction.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.SyncActionValue.LockChatAction + * @static + * @param {proto.SyncActionValue.ILockChatAction} message LockChatAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LockChatAction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LockChatAction message from the specified reader or buffer. + * @function decode + * @memberof proto.SyncActionValue.LockChatAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.SyncActionValue.LockChatAction} LockChatAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LockChatAction.decode = function 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.LockChatAction(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.locked = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LockChatAction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.SyncActionValue.LockChatAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.SyncActionValue.LockChatAction} LockChatAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LockChatAction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LockChatAction message. + * @function verify + * @memberof proto.SyncActionValue.LockChatAction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LockChatAction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.locked != null && message.hasOwnProperty("locked")) { + properties._locked = 1; + if (typeof message.locked !== "boolean") + return "locked: boolean expected"; + } + return null; + }; + + /** + * Creates a LockChatAction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.SyncActionValue.LockChatAction + * @static + * @param {Object.} object Plain object + * @returns {proto.SyncActionValue.LockChatAction} LockChatAction + */ + LockChatAction.fromObject = function fromObject(object) { + if (object instanceof $root.proto.SyncActionValue.LockChatAction) + return object; + var message = new $root.proto.SyncActionValue.LockChatAction(); + if (object.locked != null) + message.locked = Boolean(object.locked); + return message; + }; + + /** + * Creates a plain object from a LockChatAction message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.SyncActionValue.LockChatAction + * @static + * @param {proto.SyncActionValue.LockChatAction} message LockChatAction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LockChatAction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.locked != null && message.hasOwnProperty("locked")) { + object.locked = message.locked; + if (options.oneofs) + object._locked = "locked"; + } + return object; + }; + + /** + * Converts this LockChatAction to JSON. + * @function toJSON + * @memberof proto.SyncActionValue.LockChatAction + * @instance + * @returns {Object.} JSON object + */ + LockChatAction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LockChatAction + * @function getTypeUrl + * @memberof proto.SyncActionValue.LockChatAction + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LockChatAction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.SyncActionValue.LockChatAction"; + }; + + return LockChatAction; + })(); + SyncActionValue.MarkChatAsReadAction = (function() { /** @@ -85702,11 +133305,11 @@ $root.proto = (function() { /** * MarkChatAsReadAction read. - * @member {boolean} read + * @member {boolean|null|undefined} read * @memberof proto.SyncActionValue.MarkChatAsReadAction * @instance */ - MarkChatAsReadAction.prototype.read = false; + MarkChatAsReadAction.prototype.read = null; /** * MarkChatAsReadAction messageRange. @@ -85716,6 +133319,21 @@ $root.proto = (function() { */ MarkChatAsReadAction.prototype.messageRange = null; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MarkChatAsReadAction.prototype, "_read", { + get: $util.oneOfGetter($oneOfFields = ["read"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MarkChatAsReadAction.prototype, "_messageRange", { + get: $util.oneOfGetter($oneOfFields = ["messageRange"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new MarkChatAsReadAction instance using the specified properties. * @function create @@ -85778,12 +133396,14 @@ $root.proto = (function() { 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; + 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; @@ -85819,13 +133439,19 @@ $root.proto = (function() { MarkChatAsReadAction.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.read != null && message.hasOwnProperty("read")) + var properties = {}; + if (message.read != null && message.hasOwnProperty("read")) { + properties._read = 1; 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; + properties._messageRange = 1; + { + var error = $root.proto.SyncActionValue.SyncActionMessageRange.verify(message.messageRange); + if (error) + return "messageRange." + error; + } } return null; }; @@ -85865,14 +133491,16 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.read = false; - object.messageRange = null; - } - if (message.read != null && message.hasOwnProperty("read")) + if (message.read != null && message.hasOwnProperty("read")) { object.read = message.read; - if (message.messageRange != null && message.hasOwnProperty("messageRange")) + if (options.oneofs) + object._read = "read"; + } + if (message.messageRange != null && message.hasOwnProperty("messageRange")) { object.messageRange = $root.proto.SyncActionValue.SyncActionMessageRange.toObject(message.messageRange, options); + if (options.oneofs) + object._messageRange = "messageRange"; + } return object; }; @@ -85887,6 +133515,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for MarkChatAsReadAction + * @function getTypeUrl + * @memberof proto.SyncActionValue.MarkChatAsReadAction + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MarkChatAsReadAction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.SyncActionValue.MarkChatAsReadAction"; + }; + return MarkChatAsReadAction; })(); @@ -85922,59 +133565,104 @@ $root.proto = (function() { /** * MarketingMessageAction name. - * @member {string} name + * @member {string|null|undefined} name * @memberof proto.SyncActionValue.MarketingMessageAction * @instance */ - MarketingMessageAction.prototype.name = ""; + MarketingMessageAction.prototype.name = null; /** * MarketingMessageAction message. - * @member {string} message + * @member {string|null|undefined} message * @memberof proto.SyncActionValue.MarketingMessageAction * @instance */ - MarketingMessageAction.prototype.message = ""; + MarketingMessageAction.prototype.message = null; /** * MarketingMessageAction type. - * @member {proto.SyncActionValue.MarketingMessageAction.MarketingMessagePrototypeType} type + * @member {proto.SyncActionValue.MarketingMessageAction.MarketingMessagePrototypeType|null|undefined} type * @memberof proto.SyncActionValue.MarketingMessageAction * @instance */ - MarketingMessageAction.prototype.type = 0; + MarketingMessageAction.prototype.type = null; /** * MarketingMessageAction createdAt. - * @member {number|Long} createdAt + * @member {number|Long|null|undefined} createdAt * @memberof proto.SyncActionValue.MarketingMessageAction * @instance */ - MarketingMessageAction.prototype.createdAt = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + MarketingMessageAction.prototype.createdAt = null; /** * MarketingMessageAction lastSentAt. - * @member {number|Long} lastSentAt + * @member {number|Long|null|undefined} lastSentAt * @memberof proto.SyncActionValue.MarketingMessageAction * @instance */ - MarketingMessageAction.prototype.lastSentAt = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + MarketingMessageAction.prototype.lastSentAt = null; /** * MarketingMessageAction isDeleted. - * @member {boolean} isDeleted + * @member {boolean|null|undefined} isDeleted * @memberof proto.SyncActionValue.MarketingMessageAction * @instance */ - MarketingMessageAction.prototype.isDeleted = false; + MarketingMessageAction.prototype.isDeleted = null; /** * MarketingMessageAction mediaId. - * @member {string} mediaId + * @member {string|null|undefined} mediaId * @memberof proto.SyncActionValue.MarketingMessageAction * @instance */ - MarketingMessageAction.prototype.mediaId = ""; + MarketingMessageAction.prototype.mediaId = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MarketingMessageAction.prototype, "_name", { + get: $util.oneOfGetter($oneOfFields = ["name"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MarketingMessageAction.prototype, "_message", { + get: $util.oneOfGetter($oneOfFields = ["message"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MarketingMessageAction.prototype, "_type", { + get: $util.oneOfGetter($oneOfFields = ["type"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MarketingMessageAction.prototype, "_createdAt", { + get: $util.oneOfGetter($oneOfFields = ["createdAt"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MarketingMessageAction.prototype, "_lastSentAt", { + get: $util.oneOfGetter($oneOfFields = ["lastSentAt"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MarketingMessageAction.prototype, "_isDeleted", { + get: $util.oneOfGetter($oneOfFields = ["isDeleted"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MarketingMessageAction.prototype, "_mediaId", { + get: $util.oneOfGetter($oneOfFields = ["mediaId"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new MarketingMessageAction instance using the specified properties. @@ -86048,27 +133736,34 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.message = reader.string(); - break; - case 3: - message.type = reader.int32(); - break; - case 4: - message.createdAt = reader.int64(); - break; - case 5: - message.lastSentAt = reader.int64(); - break; - case 6: - message.isDeleted = reader.bool(); - break; - case 7: - message.mediaId = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.message = reader.string(); + break; + } + case 3: { + message.type = reader.int32(); + break; + } + case 4: { + message.createdAt = reader.int64(); + break; + } + case 5: { + message.lastSentAt = reader.int64(); + break; + } + case 6: { + message.isDeleted = reader.bool(); + break; + } + case 7: { + message.mediaId = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -86104,31 +133799,46 @@ $root.proto = (function() { MarketingMessageAction.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) { + properties._name = 1; if (!$util.isString(message.name)) return "name: string expected"; - if (message.message != null && message.hasOwnProperty("message")) + } + if (message.message != null && message.hasOwnProperty("message")) { + properties._message = 1; if (!$util.isString(message.message)) return "message: string expected"; - if (message.type != null && message.hasOwnProperty("type")) + } + if (message.type != null && message.hasOwnProperty("type")) { + properties._type = 1; switch (message.type) { default: return "type: enum value expected"; case 0: break; } - if (message.createdAt != null && message.hasOwnProperty("createdAt")) + } + if (message.createdAt != null && message.hasOwnProperty("createdAt")) { + properties._createdAt = 1; if (!$util.isInteger(message.createdAt) && !(message.createdAt && $util.isInteger(message.createdAt.low) && $util.isInteger(message.createdAt.high))) return "createdAt: integer|Long expected"; - if (message.lastSentAt != null && message.hasOwnProperty("lastSentAt")) + } + if (message.lastSentAt != null && message.hasOwnProperty("lastSentAt")) { + properties._lastSentAt = 1; if (!$util.isInteger(message.lastSentAt) && !(message.lastSentAt && $util.isInteger(message.lastSentAt.low) && $util.isInteger(message.lastSentAt.high))) return "lastSentAt: integer|Long expected"; - if (message.isDeleted != null && message.hasOwnProperty("isDeleted")) + } + if (message.isDeleted != null && message.hasOwnProperty("isDeleted")) { + properties._isDeleted = 1; if (typeof message.isDeleted !== "boolean") return "isDeleted: boolean expected"; - if (message.mediaId != null && message.hasOwnProperty("mediaId")) + } + if (message.mediaId != null && message.hasOwnProperty("mediaId")) { + properties._mediaId = 1; if (!$util.isString(message.mediaId)) return "mediaId: string expected"; + } return null; }; @@ -86149,6 +133859,12 @@ $root.proto = (function() { if (object.message != null) message.message = String(object.message); switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; case "PERSONALIZED": case 0: message.type = 0; @@ -86192,43 +133908,47 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.name = ""; - object.message = ""; - object.type = options.enums === String ? "PERSONALIZED" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.createdAt = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.createdAt = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.lastSentAt = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.lastSentAt = options.longs === String ? "0" : 0; - object.isDeleted = false; - object.mediaId = ""; - } - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && message.hasOwnProperty("name")) { object.name = message.name; - if (message.message != null && message.hasOwnProperty("message")) + if (options.oneofs) + object._name = "name"; + } + if (message.message != null && message.hasOwnProperty("message")) { object.message = message.message; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.proto.SyncActionValue.MarketingMessageAction.MarketingMessagePrototypeType[message.type] : message.type; - if (message.createdAt != null && message.hasOwnProperty("createdAt")) + if (options.oneofs) + object._message = "message"; + } + if (message.type != null && message.hasOwnProperty("type")) { + object.type = options.enums === String ? $root.proto.SyncActionValue.MarketingMessageAction.MarketingMessagePrototypeType[message.type] === undefined ? message.type : $root.proto.SyncActionValue.MarketingMessageAction.MarketingMessagePrototypeType[message.type] : message.type; + if (options.oneofs) + object._type = "type"; + } + if (message.createdAt != null && message.hasOwnProperty("createdAt")) { if (typeof message.createdAt === "number") object.createdAt = options.longs === String ? String(message.createdAt) : message.createdAt; else object.createdAt = options.longs === String ? $util.Long.prototype.toString.call(message.createdAt) : options.longs === Number ? new $util.LongBits(message.createdAt.low >>> 0, message.createdAt.high >>> 0).toNumber() : message.createdAt; - if (message.lastSentAt != null && message.hasOwnProperty("lastSentAt")) + if (options.oneofs) + object._createdAt = "createdAt"; + } + if (message.lastSentAt != null && message.hasOwnProperty("lastSentAt")) { if (typeof message.lastSentAt === "number") object.lastSentAt = options.longs === String ? String(message.lastSentAt) : message.lastSentAt; else object.lastSentAt = options.longs === String ? $util.Long.prototype.toString.call(message.lastSentAt) : options.longs === Number ? new $util.LongBits(message.lastSentAt.low >>> 0, message.lastSentAt.high >>> 0).toNumber() : message.lastSentAt; - if (message.isDeleted != null && message.hasOwnProperty("isDeleted")) + if (options.oneofs) + object._lastSentAt = "lastSentAt"; + } + if (message.isDeleted != null && message.hasOwnProperty("isDeleted")) { object.isDeleted = message.isDeleted; - if (message.mediaId != null && message.hasOwnProperty("mediaId")) + if (options.oneofs) + object._isDeleted = "isDeleted"; + } + if (message.mediaId != null && message.hasOwnProperty("mediaId")) { object.mediaId = message.mediaId; + if (options.oneofs) + object._mediaId = "mediaId"; + } return object; }; @@ -86243,6 +133963,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for MarketingMessageAction + * @function getTypeUrl + * @memberof proto.SyncActionValue.MarketingMessageAction + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MarketingMessageAction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.SyncActionValue.MarketingMessageAction"; + }; + /** * MarketingMessagePrototypeType enum. * @name proto.SyncActionValue.MarketingMessageAction.MarketingMessagePrototypeType @@ -86284,11 +134019,20 @@ $root.proto = (function() { /** * MarketingMessageBroadcastAction repliedCount. - * @member {number} repliedCount + * @member {number|null|undefined} repliedCount * @memberof proto.SyncActionValue.MarketingMessageBroadcastAction * @instance */ - MarketingMessageBroadcastAction.prototype.repliedCount = 0; + MarketingMessageBroadcastAction.prototype.repliedCount = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MarketingMessageBroadcastAction.prototype, "_repliedCount", { + get: $util.oneOfGetter($oneOfFields = ["repliedCount"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new MarketingMessageBroadcastAction instance using the specified properties. @@ -86350,9 +134094,10 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.repliedCount = reader.int32(); - break; + case 1: { + message.repliedCount = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -86388,9 +134133,12 @@ $root.proto = (function() { MarketingMessageBroadcastAction.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.repliedCount != null && message.hasOwnProperty("repliedCount")) + var properties = {}; + if (message.repliedCount != null && message.hasOwnProperty("repliedCount")) { + properties._repliedCount = 1; if (!$util.isInteger(message.repliedCount)) return "repliedCount: integer expected"; + } return null; }; @@ -86424,10 +134172,11 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) - object.repliedCount = 0; - if (message.repliedCount != null && message.hasOwnProperty("repliedCount")) + if (message.repliedCount != null && message.hasOwnProperty("repliedCount")) { object.repliedCount = message.repliedCount; + if (options.oneofs) + object._repliedCount = "repliedCount"; + } return object; }; @@ -86442,9 +134191,354 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for MarketingMessageBroadcastAction + * @function getTypeUrl + * @memberof proto.SyncActionValue.MarketingMessageBroadcastAction + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MarketingMessageBroadcastAction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.SyncActionValue.MarketingMessageBroadcastAction"; + }; + return MarketingMessageBroadcastAction; })(); + SyncActionValue.MerchantPaymentPartnerAction = (function() { + + /** + * Properties of a MerchantPaymentPartnerAction. + * @memberof proto.SyncActionValue + * @interface IMerchantPaymentPartnerAction + * @property {proto.SyncActionValue.MerchantPaymentPartnerAction.Status} status MerchantPaymentPartnerAction status + * @property {string} country MerchantPaymentPartnerAction country + * @property {string|null} [gatewayName] MerchantPaymentPartnerAction gatewayName + * @property {string|null} [credentialId] MerchantPaymentPartnerAction credentialId + */ + + /** + * Constructs a new MerchantPaymentPartnerAction. + * @memberof proto.SyncActionValue + * @classdesc Represents a MerchantPaymentPartnerAction. + * @implements IMerchantPaymentPartnerAction + * @constructor + * @param {proto.SyncActionValue.IMerchantPaymentPartnerAction=} [properties] Properties to set + */ + function MerchantPaymentPartnerAction(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MerchantPaymentPartnerAction status. + * @member {proto.SyncActionValue.MerchantPaymentPartnerAction.Status} status + * @memberof proto.SyncActionValue.MerchantPaymentPartnerAction + * @instance + */ + MerchantPaymentPartnerAction.prototype.status = 0; + + /** + * MerchantPaymentPartnerAction country. + * @member {string} country + * @memberof proto.SyncActionValue.MerchantPaymentPartnerAction + * @instance + */ + MerchantPaymentPartnerAction.prototype.country = ""; + + /** + * MerchantPaymentPartnerAction gatewayName. + * @member {string|null|undefined} gatewayName + * @memberof proto.SyncActionValue.MerchantPaymentPartnerAction + * @instance + */ + MerchantPaymentPartnerAction.prototype.gatewayName = null; + + /** + * MerchantPaymentPartnerAction credentialId. + * @member {string|null|undefined} credentialId + * @memberof proto.SyncActionValue.MerchantPaymentPartnerAction + * @instance + */ + MerchantPaymentPartnerAction.prototype.credentialId = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MerchantPaymentPartnerAction.prototype, "_gatewayName", { + get: $util.oneOfGetter($oneOfFields = ["gatewayName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MerchantPaymentPartnerAction.prototype, "_credentialId", { + get: $util.oneOfGetter($oneOfFields = ["credentialId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new MerchantPaymentPartnerAction instance using the specified properties. + * @function create + * @memberof proto.SyncActionValue.MerchantPaymentPartnerAction + * @static + * @param {proto.SyncActionValue.IMerchantPaymentPartnerAction=} [properties] Properties to set + * @returns {proto.SyncActionValue.MerchantPaymentPartnerAction} MerchantPaymentPartnerAction instance + */ + MerchantPaymentPartnerAction.create = function create(properties) { + return new MerchantPaymentPartnerAction(properties); + }; + + /** + * Encodes the specified MerchantPaymentPartnerAction message. Does not implicitly {@link proto.SyncActionValue.MerchantPaymentPartnerAction.verify|verify} messages. + * @function encode + * @memberof proto.SyncActionValue.MerchantPaymentPartnerAction + * @static + * @param {proto.SyncActionValue.IMerchantPaymentPartnerAction} message MerchantPaymentPartnerAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MerchantPaymentPartnerAction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.status); + writer.uint32(/* id 2, wireType 2 =*/18).string(message.country); + if (message.gatewayName != null && Object.hasOwnProperty.call(message, "gatewayName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.gatewayName); + if (message.credentialId != null && Object.hasOwnProperty.call(message, "credentialId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.credentialId); + return writer; + }; + + /** + * Encodes the specified MerchantPaymentPartnerAction message, length delimited. Does not implicitly {@link proto.SyncActionValue.MerchantPaymentPartnerAction.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.SyncActionValue.MerchantPaymentPartnerAction + * @static + * @param {proto.SyncActionValue.IMerchantPaymentPartnerAction} message MerchantPaymentPartnerAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MerchantPaymentPartnerAction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MerchantPaymentPartnerAction message from the specified reader or buffer. + * @function decode + * @memberof proto.SyncActionValue.MerchantPaymentPartnerAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.SyncActionValue.MerchantPaymentPartnerAction} MerchantPaymentPartnerAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MerchantPaymentPartnerAction.decode = function 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.MerchantPaymentPartnerAction(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.status = reader.int32(); + break; + } + case 2: { + message.country = reader.string(); + break; + } + case 3: { + message.gatewayName = reader.string(); + break; + } + case 4: { + message.credentialId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("status")) + throw $util.ProtocolError("missing required 'status'", { instance: message }); + if (!message.hasOwnProperty("country")) + throw $util.ProtocolError("missing required 'country'", { instance: message }); + return message; + }; + + /** + * Decodes a MerchantPaymentPartnerAction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.SyncActionValue.MerchantPaymentPartnerAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.SyncActionValue.MerchantPaymentPartnerAction} MerchantPaymentPartnerAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MerchantPaymentPartnerAction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MerchantPaymentPartnerAction message. + * @function verify + * @memberof proto.SyncActionValue.MerchantPaymentPartnerAction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MerchantPaymentPartnerAction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + switch (message.status) { + default: + return "status: enum value expected"; + case 0: + case 1: + break; + } + if (!$util.isString(message.country)) + return "country: string expected"; + if (message.gatewayName != null && message.hasOwnProperty("gatewayName")) { + properties._gatewayName = 1; + if (!$util.isString(message.gatewayName)) + return "gatewayName: string expected"; + } + if (message.credentialId != null && message.hasOwnProperty("credentialId")) { + properties._credentialId = 1; + if (!$util.isString(message.credentialId)) + return "credentialId: string expected"; + } + return null; + }; + + /** + * Creates a MerchantPaymentPartnerAction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.SyncActionValue.MerchantPaymentPartnerAction + * @static + * @param {Object.} object Plain object + * @returns {proto.SyncActionValue.MerchantPaymentPartnerAction} MerchantPaymentPartnerAction + */ + MerchantPaymentPartnerAction.fromObject = function fromObject(object) { + if (object instanceof $root.proto.SyncActionValue.MerchantPaymentPartnerAction) + return object; + var message = new $root.proto.SyncActionValue.MerchantPaymentPartnerAction(); + switch (object.status) { + default: + if (typeof object.status === "number") { + message.status = object.status; + break; + } + break; + case "ACTIVE": + case 0: + message.status = 0; + break; + case "INACTIVE": + case 1: + message.status = 1; + break; + } + if (object.country != null) + message.country = String(object.country); + if (object.gatewayName != null) + message.gatewayName = String(object.gatewayName); + if (object.credentialId != null) + message.credentialId = String(object.credentialId); + return message; + }; + + /** + * Creates a plain object from a MerchantPaymentPartnerAction message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.SyncActionValue.MerchantPaymentPartnerAction + * @static + * @param {proto.SyncActionValue.MerchantPaymentPartnerAction} message MerchantPaymentPartnerAction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MerchantPaymentPartnerAction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.status = options.enums === String ? "ACTIVE" : 0; + object.country = ""; + } + if (message.status != null && message.hasOwnProperty("status")) + object.status = options.enums === String ? $root.proto.SyncActionValue.MerchantPaymentPartnerAction.Status[message.status] === undefined ? message.status : $root.proto.SyncActionValue.MerchantPaymentPartnerAction.Status[message.status] : message.status; + if (message.country != null && message.hasOwnProperty("country")) + object.country = message.country; + if (message.gatewayName != null && message.hasOwnProperty("gatewayName")) { + object.gatewayName = message.gatewayName; + if (options.oneofs) + object._gatewayName = "gatewayName"; + } + if (message.credentialId != null && message.hasOwnProperty("credentialId")) { + object.credentialId = message.credentialId; + if (options.oneofs) + object._credentialId = "credentialId"; + } + return object; + }; + + /** + * Converts this MerchantPaymentPartnerAction to JSON. + * @function toJSON + * @memberof proto.SyncActionValue.MerchantPaymentPartnerAction + * @instance + * @returns {Object.} JSON object + */ + MerchantPaymentPartnerAction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MerchantPaymentPartnerAction + * @function getTypeUrl + * @memberof proto.SyncActionValue.MerchantPaymentPartnerAction + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MerchantPaymentPartnerAction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.SyncActionValue.MerchantPaymentPartnerAction"; + }; + + /** + * Status enum. + * @name proto.SyncActionValue.MerchantPaymentPartnerAction.Status + * @enum {number} + * @property {number} ACTIVE=0 ACTIVE value + * @property {number} INACTIVE=1 INACTIVE value + */ + MerchantPaymentPartnerAction.Status = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ACTIVE"] = 0; + values[valuesById[1] = "INACTIVE"] = 1; + return values; + })(); + + return MerchantPaymentPartnerAction; + })(); + SyncActionValue.MuteAction = (function() { /** @@ -86473,27 +134567,48 @@ $root.proto = (function() { /** * MuteAction muted. - * @member {boolean} muted + * @member {boolean|null|undefined} muted * @memberof proto.SyncActionValue.MuteAction * @instance */ - MuteAction.prototype.muted = false; + MuteAction.prototype.muted = null; /** * MuteAction muteEndTimestamp. - * @member {number|Long} muteEndTimestamp + * @member {number|Long|null|undefined} muteEndTimestamp * @memberof proto.SyncActionValue.MuteAction * @instance */ - MuteAction.prototype.muteEndTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + MuteAction.prototype.muteEndTimestamp = null; /** * MuteAction autoMuted. - * @member {boolean} autoMuted + * @member {boolean|null|undefined} autoMuted * @memberof proto.SyncActionValue.MuteAction * @instance */ - MuteAction.prototype.autoMuted = false; + MuteAction.prototype.autoMuted = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MuteAction.prototype, "_muted", { + get: $util.oneOfGetter($oneOfFields = ["muted"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MuteAction.prototype, "_muteEndTimestamp", { + get: $util.oneOfGetter($oneOfFields = ["muteEndTimestamp"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MuteAction.prototype, "_autoMuted", { + get: $util.oneOfGetter($oneOfFields = ["autoMuted"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new MuteAction instance using the specified properties. @@ -86559,15 +134674,18 @@ $root.proto = (function() { 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; - case 3: - message.autoMuted = reader.bool(); - break; + case 1: { + message.muted = reader.bool(); + break; + } + case 2: { + message.muteEndTimestamp = reader.int64(); + break; + } + case 3: { + message.autoMuted = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -86603,15 +134721,22 @@ $root.proto = (function() { MuteAction.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.muted != null && message.hasOwnProperty("muted")) + var properties = {}; + if (message.muted != null && message.hasOwnProperty("muted")) { + properties._muted = 1; if (typeof message.muted !== "boolean") return "muted: boolean expected"; - if (message.muteEndTimestamp != null && message.hasOwnProperty("muteEndTimestamp")) + } + if (message.muteEndTimestamp != null && message.hasOwnProperty("muteEndTimestamp")) { + properties._muteEndTimestamp = 1; if (!$util.isInteger(message.muteEndTimestamp) && !(message.muteEndTimestamp && $util.isInteger(message.muteEndTimestamp.low) && $util.isInteger(message.muteEndTimestamp.high))) return "muteEndTimestamp: integer|Long expected"; - if (message.autoMuted != null && message.hasOwnProperty("autoMuted")) + } + if (message.autoMuted != null && message.hasOwnProperty("autoMuted")) { + properties._autoMuted = 1; if (typeof message.autoMuted !== "boolean") return "autoMuted: boolean expected"; + } return null; }; @@ -86656,24 +134781,24 @@ $root.proto = (function() { 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; - object.autoMuted = false; - } - if (message.muted != null && message.hasOwnProperty("muted")) + if (message.muted != null && message.hasOwnProperty("muted")) { object.muted = message.muted; - if (message.muteEndTimestamp != null && message.hasOwnProperty("muteEndTimestamp")) + if (options.oneofs) + object._muted = "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; - if (message.autoMuted != null && message.hasOwnProperty("autoMuted")) + if (options.oneofs) + object._muteEndTimestamp = "muteEndTimestamp"; + } + if (message.autoMuted != null && message.hasOwnProperty("autoMuted")) { object.autoMuted = message.autoMuted; + if (options.oneofs) + object._autoMuted = "autoMuted"; + } return object; }; @@ -86688,9 +134813,678 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for MuteAction + * @function getTypeUrl + * @memberof proto.SyncActionValue.MuteAction + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MuteAction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.SyncActionValue.MuteAction"; + }; + return MuteAction; })(); + SyncActionValue.NoteEditAction = (function() { + + /** + * Properties of a NoteEditAction. + * @memberof proto.SyncActionValue + * @interface INoteEditAction + * @property {proto.SyncActionValue.NoteEditAction.NoteType|null} [type] NoteEditAction type + * @property {string|null} [chatJid] NoteEditAction chatJid + * @property {number|Long|null} [createdAt] NoteEditAction createdAt + * @property {boolean|null} [deleted] NoteEditAction deleted + * @property {string|null} [unstructuredContent] NoteEditAction unstructuredContent + */ + + /** + * Constructs a new NoteEditAction. + * @memberof proto.SyncActionValue + * @classdesc Represents a NoteEditAction. + * @implements INoteEditAction + * @constructor + * @param {proto.SyncActionValue.INoteEditAction=} [properties] Properties to set + */ + function NoteEditAction(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NoteEditAction type. + * @member {proto.SyncActionValue.NoteEditAction.NoteType|null|undefined} type + * @memberof proto.SyncActionValue.NoteEditAction + * @instance + */ + NoteEditAction.prototype.type = null; + + /** + * NoteEditAction chatJid. + * @member {string|null|undefined} chatJid + * @memberof proto.SyncActionValue.NoteEditAction + * @instance + */ + NoteEditAction.prototype.chatJid = null; + + /** + * NoteEditAction createdAt. + * @member {number|Long|null|undefined} createdAt + * @memberof proto.SyncActionValue.NoteEditAction + * @instance + */ + NoteEditAction.prototype.createdAt = null; + + /** + * NoteEditAction deleted. + * @member {boolean|null|undefined} deleted + * @memberof proto.SyncActionValue.NoteEditAction + * @instance + */ + NoteEditAction.prototype.deleted = null; + + /** + * NoteEditAction unstructuredContent. + * @member {string|null|undefined} unstructuredContent + * @memberof proto.SyncActionValue.NoteEditAction + * @instance + */ + NoteEditAction.prototype.unstructuredContent = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(NoteEditAction.prototype, "_type", { + get: $util.oneOfGetter($oneOfFields = ["type"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(NoteEditAction.prototype, "_chatJid", { + get: $util.oneOfGetter($oneOfFields = ["chatJid"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(NoteEditAction.prototype, "_createdAt", { + get: $util.oneOfGetter($oneOfFields = ["createdAt"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(NoteEditAction.prototype, "_deleted", { + get: $util.oneOfGetter($oneOfFields = ["deleted"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(NoteEditAction.prototype, "_unstructuredContent", { + get: $util.oneOfGetter($oneOfFields = ["unstructuredContent"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new NoteEditAction instance using the specified properties. + * @function create + * @memberof proto.SyncActionValue.NoteEditAction + * @static + * @param {proto.SyncActionValue.INoteEditAction=} [properties] Properties to set + * @returns {proto.SyncActionValue.NoteEditAction} NoteEditAction instance + */ + NoteEditAction.create = function create(properties) { + return new NoteEditAction(properties); + }; + + /** + * Encodes the specified NoteEditAction message. Does not implicitly {@link proto.SyncActionValue.NoteEditAction.verify|verify} messages. + * @function encode + * @memberof proto.SyncActionValue.NoteEditAction + * @static + * @param {proto.SyncActionValue.INoteEditAction} message NoteEditAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NoteEditAction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); + if (message.chatJid != null && Object.hasOwnProperty.call(message, "chatJid")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.chatJid); + if (message.createdAt != null && Object.hasOwnProperty.call(message, "createdAt")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.createdAt); + if (message.deleted != null && Object.hasOwnProperty.call(message, "deleted")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.deleted); + if (message.unstructuredContent != null && Object.hasOwnProperty.call(message, "unstructuredContent")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.unstructuredContent); + return writer; + }; + + /** + * Encodes the specified NoteEditAction message, length delimited. Does not implicitly {@link proto.SyncActionValue.NoteEditAction.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.SyncActionValue.NoteEditAction + * @static + * @param {proto.SyncActionValue.INoteEditAction} message NoteEditAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NoteEditAction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NoteEditAction message from the specified reader or buffer. + * @function decode + * @memberof proto.SyncActionValue.NoteEditAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.SyncActionValue.NoteEditAction} NoteEditAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NoteEditAction.decode = function 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.NoteEditAction(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.type = reader.int32(); + break; + } + case 2: { + message.chatJid = reader.string(); + break; + } + case 3: { + message.createdAt = reader.int64(); + break; + } + case 4: { + message.deleted = reader.bool(); + break; + } + case 5: { + message.unstructuredContent = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NoteEditAction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.SyncActionValue.NoteEditAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.SyncActionValue.NoteEditAction} NoteEditAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NoteEditAction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NoteEditAction message. + * @function verify + * @memberof proto.SyncActionValue.NoteEditAction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NoteEditAction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.type != null && message.hasOwnProperty("type")) { + properties._type = 1; + switch (message.type) { + default: + return "type: enum value expected"; + case 1: + case 2: + break; + } + } + if (message.chatJid != null && message.hasOwnProperty("chatJid")) { + properties._chatJid = 1; + if (!$util.isString(message.chatJid)) + return "chatJid: string expected"; + } + if (message.createdAt != null && message.hasOwnProperty("createdAt")) { + properties._createdAt = 1; + if (!$util.isInteger(message.createdAt) && !(message.createdAt && $util.isInteger(message.createdAt.low) && $util.isInteger(message.createdAt.high))) + return "createdAt: integer|Long expected"; + } + if (message.deleted != null && message.hasOwnProperty("deleted")) { + properties._deleted = 1; + if (typeof message.deleted !== "boolean") + return "deleted: boolean expected"; + } + if (message.unstructuredContent != null && message.hasOwnProperty("unstructuredContent")) { + properties._unstructuredContent = 1; + if (!$util.isString(message.unstructuredContent)) + return "unstructuredContent: string expected"; + } + return null; + }; + + /** + * Creates a NoteEditAction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.SyncActionValue.NoteEditAction + * @static + * @param {Object.} object Plain object + * @returns {proto.SyncActionValue.NoteEditAction} NoteEditAction + */ + NoteEditAction.fromObject = function fromObject(object) { + if (object instanceof $root.proto.SyncActionValue.NoteEditAction) + return object; + var message = new $root.proto.SyncActionValue.NoteEditAction(); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "UNSTRUCTURED": + case 1: + message.type = 1; + break; + case "STRUCTURED": + case 2: + message.type = 2; + break; + } + if (object.chatJid != null) + message.chatJid = String(object.chatJid); + if (object.createdAt != null) + if ($util.Long) + (message.createdAt = $util.Long.fromValue(object.createdAt)).unsigned = false; + else if (typeof object.createdAt === "string") + message.createdAt = parseInt(object.createdAt, 10); + else if (typeof object.createdAt === "number") + message.createdAt = object.createdAt; + else if (typeof object.createdAt === "object") + message.createdAt = new $util.LongBits(object.createdAt.low >>> 0, object.createdAt.high >>> 0).toNumber(); + if (object.deleted != null) + message.deleted = Boolean(object.deleted); + if (object.unstructuredContent != null) + message.unstructuredContent = String(object.unstructuredContent); + return message; + }; + + /** + * Creates a plain object from a NoteEditAction message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.SyncActionValue.NoteEditAction + * @static + * @param {proto.SyncActionValue.NoteEditAction} message NoteEditAction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NoteEditAction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.type != null && message.hasOwnProperty("type")) { + object.type = options.enums === String ? $root.proto.SyncActionValue.NoteEditAction.NoteType[message.type] === undefined ? message.type : $root.proto.SyncActionValue.NoteEditAction.NoteType[message.type] : message.type; + if (options.oneofs) + object._type = "type"; + } + if (message.chatJid != null && message.hasOwnProperty("chatJid")) { + object.chatJid = message.chatJid; + if (options.oneofs) + object._chatJid = "chatJid"; + } + if (message.createdAt != null && message.hasOwnProperty("createdAt")) { + if (typeof message.createdAt === "number") + object.createdAt = options.longs === String ? String(message.createdAt) : message.createdAt; + else + object.createdAt = options.longs === String ? $util.Long.prototype.toString.call(message.createdAt) : options.longs === Number ? new $util.LongBits(message.createdAt.low >>> 0, message.createdAt.high >>> 0).toNumber() : message.createdAt; + if (options.oneofs) + object._createdAt = "createdAt"; + } + if (message.deleted != null && message.hasOwnProperty("deleted")) { + object.deleted = message.deleted; + if (options.oneofs) + object._deleted = "deleted"; + } + if (message.unstructuredContent != null && message.hasOwnProperty("unstructuredContent")) { + object.unstructuredContent = message.unstructuredContent; + if (options.oneofs) + object._unstructuredContent = "unstructuredContent"; + } + return object; + }; + + /** + * Converts this NoteEditAction to JSON. + * @function toJSON + * @memberof proto.SyncActionValue.NoteEditAction + * @instance + * @returns {Object.} JSON object + */ + NoteEditAction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NoteEditAction + * @function getTypeUrl + * @memberof proto.SyncActionValue.NoteEditAction + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NoteEditAction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.SyncActionValue.NoteEditAction"; + }; + + /** + * NoteType enum. + * @name proto.SyncActionValue.NoteEditAction.NoteType + * @enum {number} + * @property {number} UNSTRUCTURED=1 UNSTRUCTURED value + * @property {number} STRUCTURED=2 STRUCTURED value + */ + NoteEditAction.NoteType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "UNSTRUCTURED"] = 1; + values[valuesById[2] = "STRUCTURED"] = 2; + return values; + })(); + + return NoteEditAction; + })(); + + SyncActionValue.NotificationActivitySettingAction = (function() { + + /** + * Properties of a NotificationActivitySettingAction. + * @memberof proto.SyncActionValue + * @interface INotificationActivitySettingAction + * @property {proto.SyncActionValue.NotificationActivitySettingAction.NotificationActivitySetting|null} [notificationActivitySetting] NotificationActivitySettingAction notificationActivitySetting + */ + + /** + * Constructs a new NotificationActivitySettingAction. + * @memberof proto.SyncActionValue + * @classdesc Represents a NotificationActivitySettingAction. + * @implements INotificationActivitySettingAction + * @constructor + * @param {proto.SyncActionValue.INotificationActivitySettingAction=} [properties] Properties to set + */ + function NotificationActivitySettingAction(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NotificationActivitySettingAction notificationActivitySetting. + * @member {proto.SyncActionValue.NotificationActivitySettingAction.NotificationActivitySetting|null|undefined} notificationActivitySetting + * @memberof proto.SyncActionValue.NotificationActivitySettingAction + * @instance + */ + NotificationActivitySettingAction.prototype.notificationActivitySetting = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(NotificationActivitySettingAction.prototype, "_notificationActivitySetting", { + get: $util.oneOfGetter($oneOfFields = ["notificationActivitySetting"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new NotificationActivitySettingAction instance using the specified properties. + * @function create + * @memberof proto.SyncActionValue.NotificationActivitySettingAction + * @static + * @param {proto.SyncActionValue.INotificationActivitySettingAction=} [properties] Properties to set + * @returns {proto.SyncActionValue.NotificationActivitySettingAction} NotificationActivitySettingAction instance + */ + NotificationActivitySettingAction.create = function create(properties) { + return new NotificationActivitySettingAction(properties); + }; + + /** + * Encodes the specified NotificationActivitySettingAction message. Does not implicitly {@link proto.SyncActionValue.NotificationActivitySettingAction.verify|verify} messages. + * @function encode + * @memberof proto.SyncActionValue.NotificationActivitySettingAction + * @static + * @param {proto.SyncActionValue.INotificationActivitySettingAction} message NotificationActivitySettingAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NotificationActivitySettingAction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.notificationActivitySetting != null && Object.hasOwnProperty.call(message, "notificationActivitySetting")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.notificationActivitySetting); + return writer; + }; + + /** + * Encodes the specified NotificationActivitySettingAction message, length delimited. Does not implicitly {@link proto.SyncActionValue.NotificationActivitySettingAction.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.SyncActionValue.NotificationActivitySettingAction + * @static + * @param {proto.SyncActionValue.INotificationActivitySettingAction} message NotificationActivitySettingAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NotificationActivitySettingAction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NotificationActivitySettingAction message from the specified reader or buffer. + * @function decode + * @memberof proto.SyncActionValue.NotificationActivitySettingAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.SyncActionValue.NotificationActivitySettingAction} NotificationActivitySettingAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NotificationActivitySettingAction.decode = function 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.NotificationActivitySettingAction(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.notificationActivitySetting = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NotificationActivitySettingAction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.SyncActionValue.NotificationActivitySettingAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.SyncActionValue.NotificationActivitySettingAction} NotificationActivitySettingAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NotificationActivitySettingAction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NotificationActivitySettingAction message. + * @function verify + * @memberof proto.SyncActionValue.NotificationActivitySettingAction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NotificationActivitySettingAction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.notificationActivitySetting != null && message.hasOwnProperty("notificationActivitySetting")) { + properties._notificationActivitySetting = 1; + switch (message.notificationActivitySetting) { + default: + return "notificationActivitySetting: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + } + return null; + }; + + /** + * Creates a NotificationActivitySettingAction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.SyncActionValue.NotificationActivitySettingAction + * @static + * @param {Object.} object Plain object + * @returns {proto.SyncActionValue.NotificationActivitySettingAction} NotificationActivitySettingAction + */ + NotificationActivitySettingAction.fromObject = function fromObject(object) { + if (object instanceof $root.proto.SyncActionValue.NotificationActivitySettingAction) + return object; + var message = new $root.proto.SyncActionValue.NotificationActivitySettingAction(); + switch (object.notificationActivitySetting) { + default: + if (typeof object.notificationActivitySetting === "number") { + message.notificationActivitySetting = object.notificationActivitySetting; + break; + } + break; + case "DEFAULT_ALL_MESSAGES": + case 0: + message.notificationActivitySetting = 0; + break; + case "ALL_MESSAGES": + case 1: + message.notificationActivitySetting = 1; + break; + case "HIGHLIGHTS": + case 2: + message.notificationActivitySetting = 2; + break; + case "DEFAULT_HIGHLIGHTS": + case 3: + message.notificationActivitySetting = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from a NotificationActivitySettingAction message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.SyncActionValue.NotificationActivitySettingAction + * @static + * @param {proto.SyncActionValue.NotificationActivitySettingAction} message NotificationActivitySettingAction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NotificationActivitySettingAction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.notificationActivitySetting != null && message.hasOwnProperty("notificationActivitySetting")) { + object.notificationActivitySetting = options.enums === String ? $root.proto.SyncActionValue.NotificationActivitySettingAction.NotificationActivitySetting[message.notificationActivitySetting] === undefined ? message.notificationActivitySetting : $root.proto.SyncActionValue.NotificationActivitySettingAction.NotificationActivitySetting[message.notificationActivitySetting] : message.notificationActivitySetting; + if (options.oneofs) + object._notificationActivitySetting = "notificationActivitySetting"; + } + return object; + }; + + /** + * Converts this NotificationActivitySettingAction to JSON. + * @function toJSON + * @memberof proto.SyncActionValue.NotificationActivitySettingAction + * @instance + * @returns {Object.} JSON object + */ + NotificationActivitySettingAction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NotificationActivitySettingAction + * @function getTypeUrl + * @memberof proto.SyncActionValue.NotificationActivitySettingAction + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NotificationActivitySettingAction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.SyncActionValue.NotificationActivitySettingAction"; + }; + + /** + * NotificationActivitySetting enum. + * @name proto.SyncActionValue.NotificationActivitySettingAction.NotificationActivitySetting + * @enum {number} + * @property {number} DEFAULT_ALL_MESSAGES=0 DEFAULT_ALL_MESSAGES value + * @property {number} ALL_MESSAGES=1 ALL_MESSAGES value + * @property {number} HIGHLIGHTS=2 HIGHLIGHTS value + * @property {number} DEFAULT_HIGHLIGHTS=3 DEFAULT_HIGHLIGHTS value + */ + NotificationActivitySettingAction.NotificationActivitySetting = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DEFAULT_ALL_MESSAGES"] = 0; + values[valuesById[1] = "ALL_MESSAGES"] = 1; + values[valuesById[2] = "HIGHLIGHTS"] = 2; + values[valuesById[3] = "DEFAULT_HIGHLIGHTS"] = 3; + return values; + })(); + + return NotificationActivitySettingAction; + })(); + SyncActionValue.NuxAction = (function() { /** @@ -86717,11 +135511,20 @@ $root.proto = (function() { /** * NuxAction acknowledged. - * @member {boolean} acknowledged + * @member {boolean|null|undefined} acknowledged * @memberof proto.SyncActionValue.NuxAction * @instance */ - NuxAction.prototype.acknowledged = false; + NuxAction.prototype.acknowledged = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(NuxAction.prototype, "_acknowledged", { + get: $util.oneOfGetter($oneOfFields = ["acknowledged"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new NuxAction instance using the specified properties. @@ -86783,9 +135586,10 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.acknowledged = reader.bool(); - break; + case 1: { + message.acknowledged = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -86821,9 +135625,12 @@ $root.proto = (function() { NuxAction.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.acknowledged != null && message.hasOwnProperty("acknowledged")) + var properties = {}; + if (message.acknowledged != null && message.hasOwnProperty("acknowledged")) { + properties._acknowledged = 1; if (typeof message.acknowledged !== "boolean") return "acknowledged: boolean expected"; + } return null; }; @@ -86857,10 +135664,11 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) - object.acknowledged = false; - if (message.acknowledged != null && message.hasOwnProperty("acknowledged")) + if (message.acknowledged != null && message.hasOwnProperty("acknowledged")) { object.acknowledged = message.acknowledged; + if (options.oneofs) + object._acknowledged = "acknowledged"; + } return object; }; @@ -86875,6 +135683,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for NuxAction + * @function getTypeUrl + * @memberof proto.SyncActionValue.NuxAction + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NuxAction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.SyncActionValue.NuxAction"; + }; + return NuxAction; })(); @@ -86904,11 +135727,20 @@ $root.proto = (function() { /** * PaymentInfoAction cpi. - * @member {string} cpi + * @member {string|null|undefined} cpi * @memberof proto.SyncActionValue.PaymentInfoAction * @instance */ - PaymentInfoAction.prototype.cpi = ""; + PaymentInfoAction.prototype.cpi = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PaymentInfoAction.prototype, "_cpi", { + get: $util.oneOfGetter($oneOfFields = ["cpi"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new PaymentInfoAction instance using the specified properties. @@ -86970,9 +135802,10 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.cpi = reader.string(); - break; + case 1: { + message.cpi = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -87008,9 +135841,12 @@ $root.proto = (function() { PaymentInfoAction.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.cpi != null && message.hasOwnProperty("cpi")) + var properties = {}; + if (message.cpi != null && message.hasOwnProperty("cpi")) { + properties._cpi = 1; if (!$util.isString(message.cpi)) return "cpi: string expected"; + } return null; }; @@ -87044,10 +135880,11 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) - object.cpi = ""; - if (message.cpi != null && message.hasOwnProperty("cpi")) + if (message.cpi != null && message.hasOwnProperty("cpi")) { object.cpi = message.cpi; + if (options.oneofs) + object._cpi = "cpi"; + } return object; }; @@ -87062,6 +135899,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for PaymentInfoAction + * @function getTypeUrl + * @memberof proto.SyncActionValue.PaymentInfoAction + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PaymentInfoAction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.SyncActionValue.PaymentInfoAction"; + }; + return PaymentInfoAction; })(); @@ -87091,11 +135943,20 @@ $root.proto = (function() { /** * PinAction pinned. - * @member {boolean} pinned + * @member {boolean|null|undefined} pinned * @memberof proto.SyncActionValue.PinAction * @instance */ - PinAction.prototype.pinned = false; + PinAction.prototype.pinned = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PinAction.prototype, "_pinned", { + get: $util.oneOfGetter($oneOfFields = ["pinned"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new PinAction instance using the specified properties. @@ -87157,9 +136018,10 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.pinned = reader.bool(); - break; + case 1: { + message.pinned = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -87195,9 +136057,12 @@ $root.proto = (function() { PinAction.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.pinned != null && message.hasOwnProperty("pinned")) + var properties = {}; + if (message.pinned != null && message.hasOwnProperty("pinned")) { + properties._pinned = 1; if (typeof message.pinned !== "boolean") return "pinned: boolean expected"; + } return null; }; @@ -87231,10 +136096,11 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) - object.pinned = false; - if (message.pinned != null && message.hasOwnProperty("pinned")) + if (message.pinned != null && message.hasOwnProperty("pinned")) { object.pinned = message.pinned; + if (options.oneofs) + object._pinned = "pinned"; + } return object; }; @@ -87249,6 +136115,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for PinAction + * @function getTypeUrl + * @memberof proto.SyncActionValue.PinAction + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PinAction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.SyncActionValue.PinAction"; + }; + return PinAction; })(); @@ -87278,11 +136159,20 @@ $root.proto = (function() { /** * PnForLidChatAction pnJid. - * @member {string} pnJid + * @member {string|null|undefined} pnJid * @memberof proto.SyncActionValue.PnForLidChatAction * @instance */ - PnForLidChatAction.prototype.pnJid = ""; + PnForLidChatAction.prototype.pnJid = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PnForLidChatAction.prototype, "_pnJid", { + get: $util.oneOfGetter($oneOfFields = ["pnJid"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new PnForLidChatAction instance using the specified properties. @@ -87344,9 +136234,10 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.pnJid = reader.string(); - break; + case 1: { + message.pnJid = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -87382,9 +136273,12 @@ $root.proto = (function() { PnForLidChatAction.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.pnJid != null && message.hasOwnProperty("pnJid")) + var properties = {}; + if (message.pnJid != null && message.hasOwnProperty("pnJid")) { + properties._pnJid = 1; if (!$util.isString(message.pnJid)) return "pnJid: string expected"; + } return null; }; @@ -87418,10 +136312,11 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) - object.pnJid = ""; - if (message.pnJid != null && message.hasOwnProperty("pnJid")) + if (message.pnJid != null && message.hasOwnProperty("pnJid")) { object.pnJid = message.pnJid; + if (options.oneofs) + object._pnJid = "pnJid"; + } return object; }; @@ -87436,6 +136331,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for PnForLidChatAction + * @function getTypeUrl + * @memberof proto.SyncActionValue.PnForLidChatAction + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PnForLidChatAction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.SyncActionValue.PnForLidChatAction"; + }; + return PnForLidChatAction; })(); @@ -87533,11 +136443,12 @@ $root.proto = (function() { 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; + case 1: { + if (!(message.flags && message.flags.length)) + message.flags = []; + message.flags.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -87639,6 +136550,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for PrimaryFeature + * @function getTypeUrl + * @memberof proto.SyncActionValue.PrimaryFeature + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PrimaryFeature.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.SyncActionValue.PrimaryFeature"; + }; + return PrimaryFeature; })(); @@ -87668,11 +136594,20 @@ $root.proto = (function() { /** * PrimaryVersionAction version. - * @member {string} version + * @member {string|null|undefined} version * @memberof proto.SyncActionValue.PrimaryVersionAction * @instance */ - PrimaryVersionAction.prototype.version = ""; + PrimaryVersionAction.prototype.version = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PrimaryVersionAction.prototype, "_version", { + get: $util.oneOfGetter($oneOfFields = ["version"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new PrimaryVersionAction instance using the specified properties. @@ -87734,9 +136669,10 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.version = reader.string(); - break; + case 1: { + message.version = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -87772,9 +136708,12 @@ $root.proto = (function() { PrimaryVersionAction.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.version != null && message.hasOwnProperty("version")) + var properties = {}; + if (message.version != null && message.hasOwnProperty("version")) { + properties._version = 1; if (!$util.isString(message.version)) return "version: string expected"; + } return null; }; @@ -87808,10 +136747,11 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) - object.version = ""; - if (message.version != null && message.hasOwnProperty("version")) + if (message.version != null && message.hasOwnProperty("version")) { object.version = message.version; + if (options.oneofs) + object._version = "version"; + } return object; }; @@ -87826,9 +136766,240 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for PrimaryVersionAction + * @function getTypeUrl + * @memberof proto.SyncActionValue.PrimaryVersionAction + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PrimaryVersionAction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.SyncActionValue.PrimaryVersionAction"; + }; + return PrimaryVersionAction; })(); + SyncActionValue.PrivacySettingDisableLinkPreviewsAction = (function() { + + /** + * Properties of a PrivacySettingDisableLinkPreviewsAction. + * @memberof proto.SyncActionValue + * @interface IPrivacySettingDisableLinkPreviewsAction + * @property {boolean|null} [isPreviewsDisabled] PrivacySettingDisableLinkPreviewsAction isPreviewsDisabled + */ + + /** + * Constructs a new PrivacySettingDisableLinkPreviewsAction. + * @memberof proto.SyncActionValue + * @classdesc Represents a PrivacySettingDisableLinkPreviewsAction. + * @implements IPrivacySettingDisableLinkPreviewsAction + * @constructor + * @param {proto.SyncActionValue.IPrivacySettingDisableLinkPreviewsAction=} [properties] Properties to set + */ + function PrivacySettingDisableLinkPreviewsAction(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PrivacySettingDisableLinkPreviewsAction isPreviewsDisabled. + * @member {boolean|null|undefined} isPreviewsDisabled + * @memberof proto.SyncActionValue.PrivacySettingDisableLinkPreviewsAction + * @instance + */ + PrivacySettingDisableLinkPreviewsAction.prototype.isPreviewsDisabled = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PrivacySettingDisableLinkPreviewsAction.prototype, "_isPreviewsDisabled", { + get: $util.oneOfGetter($oneOfFields = ["isPreviewsDisabled"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new PrivacySettingDisableLinkPreviewsAction instance using the specified properties. + * @function create + * @memberof proto.SyncActionValue.PrivacySettingDisableLinkPreviewsAction + * @static + * @param {proto.SyncActionValue.IPrivacySettingDisableLinkPreviewsAction=} [properties] Properties to set + * @returns {proto.SyncActionValue.PrivacySettingDisableLinkPreviewsAction} PrivacySettingDisableLinkPreviewsAction instance + */ + PrivacySettingDisableLinkPreviewsAction.create = function create(properties) { + return new PrivacySettingDisableLinkPreviewsAction(properties); + }; + + /** + * Encodes the specified PrivacySettingDisableLinkPreviewsAction message. Does not implicitly {@link proto.SyncActionValue.PrivacySettingDisableLinkPreviewsAction.verify|verify} messages. + * @function encode + * @memberof proto.SyncActionValue.PrivacySettingDisableLinkPreviewsAction + * @static + * @param {proto.SyncActionValue.IPrivacySettingDisableLinkPreviewsAction} message PrivacySettingDisableLinkPreviewsAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PrivacySettingDisableLinkPreviewsAction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.isPreviewsDisabled != null && Object.hasOwnProperty.call(message, "isPreviewsDisabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.isPreviewsDisabled); + return writer; + }; + + /** + * Encodes the specified PrivacySettingDisableLinkPreviewsAction message, length delimited. Does not implicitly {@link proto.SyncActionValue.PrivacySettingDisableLinkPreviewsAction.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.SyncActionValue.PrivacySettingDisableLinkPreviewsAction + * @static + * @param {proto.SyncActionValue.IPrivacySettingDisableLinkPreviewsAction} message PrivacySettingDisableLinkPreviewsAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PrivacySettingDisableLinkPreviewsAction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PrivacySettingDisableLinkPreviewsAction message from the specified reader or buffer. + * @function decode + * @memberof proto.SyncActionValue.PrivacySettingDisableLinkPreviewsAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.SyncActionValue.PrivacySettingDisableLinkPreviewsAction} PrivacySettingDisableLinkPreviewsAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PrivacySettingDisableLinkPreviewsAction.decode = function 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.PrivacySettingDisableLinkPreviewsAction(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.isPreviewsDisabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PrivacySettingDisableLinkPreviewsAction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.SyncActionValue.PrivacySettingDisableLinkPreviewsAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.SyncActionValue.PrivacySettingDisableLinkPreviewsAction} PrivacySettingDisableLinkPreviewsAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PrivacySettingDisableLinkPreviewsAction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PrivacySettingDisableLinkPreviewsAction message. + * @function verify + * @memberof proto.SyncActionValue.PrivacySettingDisableLinkPreviewsAction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PrivacySettingDisableLinkPreviewsAction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.isPreviewsDisabled != null && message.hasOwnProperty("isPreviewsDisabled")) { + properties._isPreviewsDisabled = 1; + if (typeof message.isPreviewsDisabled !== "boolean") + return "isPreviewsDisabled: boolean expected"; + } + return null; + }; + + /** + * Creates a PrivacySettingDisableLinkPreviewsAction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.SyncActionValue.PrivacySettingDisableLinkPreviewsAction + * @static + * @param {Object.} object Plain object + * @returns {proto.SyncActionValue.PrivacySettingDisableLinkPreviewsAction} PrivacySettingDisableLinkPreviewsAction + */ + PrivacySettingDisableLinkPreviewsAction.fromObject = function fromObject(object) { + if (object instanceof $root.proto.SyncActionValue.PrivacySettingDisableLinkPreviewsAction) + return object; + var message = new $root.proto.SyncActionValue.PrivacySettingDisableLinkPreviewsAction(); + if (object.isPreviewsDisabled != null) + message.isPreviewsDisabled = Boolean(object.isPreviewsDisabled); + return message; + }; + + /** + * Creates a plain object from a PrivacySettingDisableLinkPreviewsAction message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.SyncActionValue.PrivacySettingDisableLinkPreviewsAction + * @static + * @param {proto.SyncActionValue.PrivacySettingDisableLinkPreviewsAction} message PrivacySettingDisableLinkPreviewsAction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PrivacySettingDisableLinkPreviewsAction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.isPreviewsDisabled != null && message.hasOwnProperty("isPreviewsDisabled")) { + object.isPreviewsDisabled = message.isPreviewsDisabled; + if (options.oneofs) + object._isPreviewsDisabled = "isPreviewsDisabled"; + } + return object; + }; + + /** + * Converts this PrivacySettingDisableLinkPreviewsAction to JSON. + * @function toJSON + * @memberof proto.SyncActionValue.PrivacySettingDisableLinkPreviewsAction + * @instance + * @returns {Object.} JSON object + */ + PrivacySettingDisableLinkPreviewsAction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PrivacySettingDisableLinkPreviewsAction + * @function getTypeUrl + * @memberof proto.SyncActionValue.PrivacySettingDisableLinkPreviewsAction + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PrivacySettingDisableLinkPreviewsAction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.SyncActionValue.PrivacySettingDisableLinkPreviewsAction"; + }; + + return PrivacySettingDisableLinkPreviewsAction; + })(); + SyncActionValue.PrivacySettingRelayAllCalls = (function() { /** @@ -87855,11 +137026,20 @@ $root.proto = (function() { /** * PrivacySettingRelayAllCalls isEnabled. - * @member {boolean} isEnabled + * @member {boolean|null|undefined} isEnabled * @memberof proto.SyncActionValue.PrivacySettingRelayAllCalls * @instance */ - PrivacySettingRelayAllCalls.prototype.isEnabled = false; + PrivacySettingRelayAllCalls.prototype.isEnabled = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PrivacySettingRelayAllCalls.prototype, "_isEnabled", { + get: $util.oneOfGetter($oneOfFields = ["isEnabled"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new PrivacySettingRelayAllCalls instance using the specified properties. @@ -87921,9 +137101,10 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.isEnabled = reader.bool(); - break; + case 1: { + message.isEnabled = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -87959,9 +137140,12 @@ $root.proto = (function() { PrivacySettingRelayAllCalls.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.isEnabled != null && message.hasOwnProperty("isEnabled")) + var properties = {}; + if (message.isEnabled != null && message.hasOwnProperty("isEnabled")) { + properties._isEnabled = 1; if (typeof message.isEnabled !== "boolean") return "isEnabled: boolean expected"; + } return null; }; @@ -87995,10 +137179,11 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) - object.isEnabled = false; - if (message.isEnabled != null && message.hasOwnProperty("isEnabled")) + if (message.isEnabled != null && message.hasOwnProperty("isEnabled")) { object.isEnabled = message.isEnabled; + if (options.oneofs) + object._isEnabled = "isEnabled"; + } return object; }; @@ -88013,6 +137198,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for PrivacySettingRelayAllCalls + * @function getTypeUrl + * @memberof proto.SyncActionValue.PrivacySettingRelayAllCalls + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PrivacySettingRelayAllCalls.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.SyncActionValue.PrivacySettingRelayAllCalls"; + }; + return PrivacySettingRelayAllCalls; })(); @@ -88042,11 +137242,20 @@ $root.proto = (function() { /** * PushNameSetting name. - * @member {string} name + * @member {string|null|undefined} name * @memberof proto.SyncActionValue.PushNameSetting * @instance */ - PushNameSetting.prototype.name = ""; + PushNameSetting.prototype.name = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PushNameSetting.prototype, "_name", { + get: $util.oneOfGetter($oneOfFields = ["name"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new PushNameSetting instance using the specified properties. @@ -88108,9 +137317,10 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -88146,9 +137356,12 @@ $root.proto = (function() { PushNameSetting.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) { + properties._name = 1; if (!$util.isString(message.name)) return "name: string expected"; + } return null; }; @@ -88182,10 +137395,11 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && message.hasOwnProperty("name")) { object.name = message.name; + if (options.oneofs) + object._name = "name"; + } return object; }; @@ -88200,6 +137414,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for PushNameSetting + * @function getTypeUrl + * @memberof proto.SyncActionValue.PushNameSetting + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PushNameSetting.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.SyncActionValue.PushNameSetting"; + }; + return PushNameSetting; })(); @@ -88234,19 +137463,19 @@ $root.proto = (function() { /** * QuickReplyAction shortcut. - * @member {string} shortcut + * @member {string|null|undefined} shortcut * @memberof proto.SyncActionValue.QuickReplyAction * @instance */ - QuickReplyAction.prototype.shortcut = ""; + QuickReplyAction.prototype.shortcut = null; /** * QuickReplyAction message. - * @member {string} message + * @member {string|null|undefined} message * @memberof proto.SyncActionValue.QuickReplyAction * @instance */ - QuickReplyAction.prototype.message = ""; + QuickReplyAction.prototype.message = null; /** * QuickReplyAction keywords. @@ -88258,19 +137487,46 @@ $root.proto = (function() { /** * QuickReplyAction count. - * @member {number} count + * @member {number|null|undefined} count * @memberof proto.SyncActionValue.QuickReplyAction * @instance */ - QuickReplyAction.prototype.count = 0; + QuickReplyAction.prototype.count = null; /** * QuickReplyAction deleted. - * @member {boolean} deleted + * @member {boolean|null|undefined} deleted * @memberof proto.SyncActionValue.QuickReplyAction * @instance */ - QuickReplyAction.prototype.deleted = false; + QuickReplyAction.prototype.deleted = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(QuickReplyAction.prototype, "_shortcut", { + get: $util.oneOfGetter($oneOfFields = ["shortcut"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(QuickReplyAction.prototype, "_message", { + get: $util.oneOfGetter($oneOfFields = ["message"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(QuickReplyAction.prototype, "_count", { + get: $util.oneOfGetter($oneOfFields = ["count"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(QuickReplyAction.prototype, "_deleted", { + get: $util.oneOfGetter($oneOfFields = ["deleted"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new QuickReplyAction instance using the specified properties. @@ -88341,23 +137597,28 @@ $root.proto = (function() { 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; + 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; @@ -88393,12 +137654,17 @@ $root.proto = (function() { QuickReplyAction.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.shortcut != null && message.hasOwnProperty("shortcut")) + var properties = {}; + if (message.shortcut != null && message.hasOwnProperty("shortcut")) { + properties._shortcut = 1; if (!$util.isString(message.shortcut)) return "shortcut: string expected"; - if (message.message != null && message.hasOwnProperty("message")) + } + if (message.message != null && message.hasOwnProperty("message")) { + properties._message = 1; 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"; @@ -88406,12 +137672,16 @@ $root.proto = (function() { if (!$util.isString(message.keywords[i])) return "keywords: string[] expected"; } - if (message.count != null && message.hasOwnProperty("count")) + if (message.count != null && message.hasOwnProperty("count")) { + properties._count = 1; if (!$util.isInteger(message.count)) return "count: integer expected"; - if (message.deleted != null && message.hasOwnProperty("deleted")) + } + if (message.deleted != null && message.hasOwnProperty("deleted")) { + properties._deleted = 1; if (typeof message.deleted !== "boolean") return "deleted: boolean expected"; + } return null; }; @@ -88460,25 +137730,31 @@ $root.proto = (function() { 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")) + if (message.shortcut != null && message.hasOwnProperty("shortcut")) { object.shortcut = message.shortcut; - if (message.message != null && message.hasOwnProperty("message")) + if (options.oneofs) + object._shortcut = "shortcut"; + } + if (message.message != null && message.hasOwnProperty("message")) { object.message = message.message; + if (options.oneofs) + object._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")) + if (message.count != null && message.hasOwnProperty("count")) { object.count = message.count; - if (message.deleted != null && message.hasOwnProperty("deleted")) + if (options.oneofs) + object._count = "count"; + } + if (message.deleted != null && message.hasOwnProperty("deleted")) { object.deleted = message.deleted; + if (options.oneofs) + object._deleted = "deleted"; + } return object; }; @@ -88493,6 +137769,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for QuickReplyAction + * @function getTypeUrl + * @memberof proto.SyncActionValue.QuickReplyAction + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QuickReplyAction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.SyncActionValue.QuickReplyAction"; + }; + return QuickReplyAction; })(); @@ -88590,11 +137881,12 @@ $root.proto = (function() { 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; + 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; @@ -88701,6 +137993,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for RecentEmojiWeightsAction + * @function getTypeUrl + * @memberof proto.SyncActionValue.RecentEmojiWeightsAction + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RecentEmojiWeightsAction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.SyncActionValue.RecentEmojiWeightsAction"; + }; + return RecentEmojiWeightsAction; })(); @@ -88730,11 +138037,20 @@ $root.proto = (function() { /** * RemoveRecentStickerAction lastStickerSentTs. - * @member {number|Long} lastStickerSentTs + * @member {number|Long|null|undefined} lastStickerSentTs * @memberof proto.SyncActionValue.RemoveRecentStickerAction * @instance */ - RemoveRecentStickerAction.prototype.lastStickerSentTs = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + RemoveRecentStickerAction.prototype.lastStickerSentTs = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(RemoveRecentStickerAction.prototype, "_lastStickerSentTs", { + get: $util.oneOfGetter($oneOfFields = ["lastStickerSentTs"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new RemoveRecentStickerAction instance using the specified properties. @@ -88796,9 +138112,10 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.lastStickerSentTs = reader.int64(); - break; + case 1: { + message.lastStickerSentTs = reader.int64(); + break; + } default: reader.skipType(tag & 7); break; @@ -88834,9 +138151,12 @@ $root.proto = (function() { RemoveRecentStickerAction.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.lastStickerSentTs != null && message.hasOwnProperty("lastStickerSentTs")) + var properties = {}; + if (message.lastStickerSentTs != null && message.hasOwnProperty("lastStickerSentTs")) { + properties._lastStickerSentTs = 1; if (!$util.isInteger(message.lastStickerSentTs) && !(message.lastStickerSentTs && $util.isInteger(message.lastStickerSentTs.low) && $util.isInteger(message.lastStickerSentTs.high))) return "lastStickerSentTs: integer|Long expected"; + } return null; }; @@ -88877,17 +138197,14 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.lastStickerSentTs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.lastStickerSentTs = options.longs === String ? "0" : 0; - if (message.lastStickerSentTs != null && message.hasOwnProperty("lastStickerSentTs")) + if (message.lastStickerSentTs != null && message.hasOwnProperty("lastStickerSentTs")) { if (typeof message.lastStickerSentTs === "number") object.lastStickerSentTs = options.longs === String ? String(message.lastStickerSentTs) : message.lastStickerSentTs; else object.lastStickerSentTs = options.longs === String ? $util.Long.prototype.toString.call(message.lastStickerSentTs) : options.longs === Number ? new $util.LongBits(message.lastStickerSentTs.low >>> 0, message.lastStickerSentTs.high >>> 0).toNumber() : message.lastStickerSentTs; + if (options.oneofs) + object._lastStickerSentTs = "lastStickerSentTs"; + } return object; }; @@ -88902,6 +138219,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for RemoveRecentStickerAction + * @function getTypeUrl + * @memberof proto.SyncActionValue.RemoveRecentStickerAction + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RemoveRecentStickerAction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.SyncActionValue.RemoveRecentStickerAction"; + }; + return RemoveRecentStickerAction; })(); @@ -88931,11 +138263,20 @@ $root.proto = (function() { /** * SecurityNotificationSetting showNotification. - * @member {boolean} showNotification + * @member {boolean|null|undefined} showNotification * @memberof proto.SyncActionValue.SecurityNotificationSetting * @instance */ - SecurityNotificationSetting.prototype.showNotification = false; + SecurityNotificationSetting.prototype.showNotification = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SecurityNotificationSetting.prototype, "_showNotification", { + get: $util.oneOfGetter($oneOfFields = ["showNotification"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new SecurityNotificationSetting instance using the specified properties. @@ -88997,9 +138338,10 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.showNotification = reader.bool(); - break; + case 1: { + message.showNotification = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -89035,9 +138377,12 @@ $root.proto = (function() { SecurityNotificationSetting.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.showNotification != null && message.hasOwnProperty("showNotification")) + var properties = {}; + if (message.showNotification != null && message.hasOwnProperty("showNotification")) { + properties._showNotification = 1; if (typeof message.showNotification !== "boolean") return "showNotification: boolean expected"; + } return null; }; @@ -89071,10 +138416,11 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) - object.showNotification = false; - if (message.showNotification != null && message.hasOwnProperty("showNotification")) + if (message.showNotification != null && message.hasOwnProperty("showNotification")) { object.showNotification = message.showNotification; + if (options.oneofs) + object._showNotification = "showNotification"; + } return object; }; @@ -89089,6 +138435,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for SecurityNotificationSetting + * @function getTypeUrl + * @memberof proto.SyncActionValue.SecurityNotificationSetting + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SecurityNotificationSetting.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.SyncActionValue.SecurityNotificationSetting"; + }; + return SecurityNotificationSetting; })(); @@ -89118,11 +138479,20 @@ $root.proto = (function() { /** * StarAction starred. - * @member {boolean} starred + * @member {boolean|null|undefined} starred * @memberof proto.SyncActionValue.StarAction * @instance */ - StarAction.prototype.starred = false; + StarAction.prototype.starred = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StarAction.prototype, "_starred", { + get: $util.oneOfGetter($oneOfFields = ["starred"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new StarAction instance using the specified properties. @@ -89184,9 +138554,10 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.starred = reader.bool(); - break; + case 1: { + message.starred = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -89222,9 +138593,12 @@ $root.proto = (function() { StarAction.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.starred != null && message.hasOwnProperty("starred")) + var properties = {}; + if (message.starred != null && message.hasOwnProperty("starred")) { + properties._starred = 1; if (typeof message.starred !== "boolean") return "starred: boolean expected"; + } return null; }; @@ -89258,10 +138632,11 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) - object.starred = false; - if (message.starred != null && message.hasOwnProperty("starred")) + if (message.starred != null && message.hasOwnProperty("starred")) { object.starred = message.starred; + if (options.oneofs) + object._starred = "starred"; + } return object; }; @@ -89276,6 +138651,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for StarAction + * @function getTypeUrl + * @memberof proto.SyncActionValue.StarAction + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StarAction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.SyncActionValue.StarAction"; + }; + return StarAction; })(); @@ -89307,11 +138697,11 @@ $root.proto = (function() { /** * StatusPrivacyAction mode. - * @member {proto.SyncActionValue.StatusPrivacyAction.StatusDistributionMode} mode + * @member {proto.SyncActionValue.StatusPrivacyAction.StatusDistributionMode|null|undefined} mode * @memberof proto.SyncActionValue.StatusPrivacyAction * @instance */ - StatusPrivacyAction.prototype.mode = 0; + StatusPrivacyAction.prototype.mode = null; /** * StatusPrivacyAction userJid. @@ -89321,6 +138711,15 @@ $root.proto = (function() { */ StatusPrivacyAction.prototype.userJid = $util.emptyArray; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StatusPrivacyAction.prototype, "_mode", { + get: $util.oneOfGetter($oneOfFields = ["mode"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new StatusPrivacyAction instance using the specified properties. * @function create @@ -89384,14 +138783,16 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.mode = reader.int32(); - break; - case 2: - if (!(message.userJid && message.userJid.length)) - message.userJid = []; - message.userJid.push(reader.string()); - break; + case 1: { + message.mode = reader.int32(); + break; + } + case 2: { + if (!(message.userJid && message.userJid.length)) + message.userJid = []; + message.userJid.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -89427,7 +138828,9 @@ $root.proto = (function() { StatusPrivacyAction.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.mode != null && message.hasOwnProperty("mode")) + var properties = {}; + if (message.mode != null && message.hasOwnProperty("mode")) { + properties._mode = 1; switch (message.mode) { default: return "mode: enum value expected"; @@ -89436,6 +138839,7 @@ $root.proto = (function() { case 2: break; } + } if (message.userJid != null && message.hasOwnProperty("userJid")) { if (!Array.isArray(message.userJid)) return "userJid: array expected"; @@ -89459,6 +138863,12 @@ $root.proto = (function() { return object; var message = new $root.proto.SyncActionValue.StatusPrivacyAction(); switch (object.mode) { + default: + if (typeof object.mode === "number") { + message.mode = object.mode; + break; + } + break; case "ALLOW_LIST": case 0: message.mode = 0; @@ -89497,10 +138907,11 @@ $root.proto = (function() { var object = {}; if (options.arrays || options.defaults) object.userJid = []; - if (options.defaults) - object.mode = options.enums === String ? "ALLOW_LIST" : 0; - if (message.mode != null && message.hasOwnProperty("mode")) - object.mode = options.enums === String ? $root.proto.SyncActionValue.StatusPrivacyAction.StatusDistributionMode[message.mode] : message.mode; + if (message.mode != null && message.hasOwnProperty("mode")) { + object.mode = options.enums === String ? $root.proto.SyncActionValue.StatusPrivacyAction.StatusDistributionMode[message.mode] === undefined ? message.mode : $root.proto.SyncActionValue.StatusPrivacyAction.StatusDistributionMode[message.mode] : message.mode; + if (options.oneofs) + object._mode = "mode"; + } if (message.userJid && message.userJid.length) { object.userJid = []; for (var j = 0; j < message.userJid.length; ++j) @@ -89520,6 +138931,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for StatusPrivacyAction + * @function getTypeUrl + * @memberof proto.SyncActionValue.StatusPrivacyAction + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StatusPrivacyAction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.SyncActionValue.StatusPrivacyAction"; + }; + /** * StatusDistributionMode enum. * @name proto.SyncActionValue.StatusPrivacyAction.StatusDistributionMode @@ -89555,6 +138981,7 @@ $root.proto = (function() { * @property {number|Long|null} [fileLength] StickerAction fileLength * @property {boolean|null} [isFavorite] StickerAction isFavorite * @property {number|null} [deviceIdHint] StickerAction deviceIdHint + * @property {boolean|null} [isLottie] StickerAction isLottie */ /** @@ -89574,83 +139001,160 @@ $root.proto = (function() { /** * StickerAction url. - * @member {string} url + * @member {string|null|undefined} url * @memberof proto.SyncActionValue.StickerAction * @instance */ - StickerAction.prototype.url = ""; + StickerAction.prototype.url = null; /** * StickerAction fileEncSha256. - * @member {Uint8Array} fileEncSha256 + * @member {Uint8Array|null|undefined} fileEncSha256 * @memberof proto.SyncActionValue.StickerAction * @instance */ - StickerAction.prototype.fileEncSha256 = $util.newBuffer([]); + StickerAction.prototype.fileEncSha256 = null; /** * StickerAction mediaKey. - * @member {Uint8Array} mediaKey + * @member {Uint8Array|null|undefined} mediaKey * @memberof proto.SyncActionValue.StickerAction * @instance */ - StickerAction.prototype.mediaKey = $util.newBuffer([]); + StickerAction.prototype.mediaKey = null; /** * StickerAction mimetype. - * @member {string} mimetype + * @member {string|null|undefined} mimetype * @memberof proto.SyncActionValue.StickerAction * @instance */ - StickerAction.prototype.mimetype = ""; + StickerAction.prototype.mimetype = null; /** * StickerAction height. - * @member {number} height + * @member {number|null|undefined} height * @memberof proto.SyncActionValue.StickerAction * @instance */ - StickerAction.prototype.height = 0; + StickerAction.prototype.height = null; /** * StickerAction width. - * @member {number} width + * @member {number|null|undefined} width * @memberof proto.SyncActionValue.StickerAction * @instance */ - StickerAction.prototype.width = 0; + StickerAction.prototype.width = null; /** * StickerAction directPath. - * @member {string} directPath + * @member {string|null|undefined} directPath * @memberof proto.SyncActionValue.StickerAction * @instance */ - StickerAction.prototype.directPath = ""; + StickerAction.prototype.directPath = null; /** * StickerAction fileLength. - * @member {number|Long} fileLength + * @member {number|Long|null|undefined} fileLength * @memberof proto.SyncActionValue.StickerAction * @instance */ - StickerAction.prototype.fileLength = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + StickerAction.prototype.fileLength = null; /** * StickerAction isFavorite. - * @member {boolean} isFavorite + * @member {boolean|null|undefined} isFavorite * @memberof proto.SyncActionValue.StickerAction * @instance */ - StickerAction.prototype.isFavorite = false; + StickerAction.prototype.isFavorite = null; /** * StickerAction deviceIdHint. - * @member {number} deviceIdHint + * @member {number|null|undefined} deviceIdHint * @memberof proto.SyncActionValue.StickerAction * @instance */ - StickerAction.prototype.deviceIdHint = 0; + StickerAction.prototype.deviceIdHint = null; + + /** + * StickerAction isLottie. + * @member {boolean|null|undefined} isLottie + * @memberof proto.SyncActionValue.StickerAction + * @instance + */ + StickerAction.prototype.isLottie = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StickerAction.prototype, "_url", { + get: $util.oneOfGetter($oneOfFields = ["url"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StickerAction.prototype, "_fileEncSha256", { + get: $util.oneOfGetter($oneOfFields = ["fileEncSha256"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StickerAction.prototype, "_mediaKey", { + get: $util.oneOfGetter($oneOfFields = ["mediaKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StickerAction.prototype, "_mimetype", { + get: $util.oneOfGetter($oneOfFields = ["mimetype"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StickerAction.prototype, "_height", { + get: $util.oneOfGetter($oneOfFields = ["height"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StickerAction.prototype, "_width", { + get: $util.oneOfGetter($oneOfFields = ["width"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StickerAction.prototype, "_directPath", { + get: $util.oneOfGetter($oneOfFields = ["directPath"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StickerAction.prototype, "_fileLength", { + get: $util.oneOfGetter($oneOfFields = ["fileLength"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StickerAction.prototype, "_isFavorite", { + get: $util.oneOfGetter($oneOfFields = ["isFavorite"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StickerAction.prototype, "_deviceIdHint", { + get: $util.oneOfGetter($oneOfFields = ["deviceIdHint"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StickerAction.prototype, "_isLottie", { + get: $util.oneOfGetter($oneOfFields = ["isLottie"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new StickerAction instance using the specified properties. @@ -89696,6 +139200,8 @@ $root.proto = (function() { 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); + if (message.isLottie != null && Object.hasOwnProperty.call(message, "isLottie")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.isLottie); return writer; }; @@ -89730,36 +139236,50 @@ $root.proto = (function() { 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; + 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; + } + case 11: { + message.isLottie = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -89795,36 +139315,62 @@ $root.proto = (function() { StickerAction.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.url != null && message.hasOwnProperty("url")) + var properties = {}; + if (message.url != null && message.hasOwnProperty("url")) { + properties._url = 1; if (!$util.isString(message.url)) return "url: string expected"; - if (message.fileEncSha256 != null && message.hasOwnProperty("fileEncSha256")) + } + if (message.fileEncSha256 != null && message.hasOwnProperty("fileEncSha256")) { + properties._fileEncSha256 = 1; 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 != null && message.hasOwnProperty("mediaKey")) { + properties._mediaKey = 1; if (!(message.mediaKey && typeof message.mediaKey.length === "number" || $util.isString(message.mediaKey))) return "mediaKey: buffer expected"; - if (message.mimetype != null && message.hasOwnProperty("mimetype")) + } + if (message.mimetype != null && message.hasOwnProperty("mimetype")) { + properties._mimetype = 1; if (!$util.isString(message.mimetype)) return "mimetype: string expected"; - if (message.height != null && message.hasOwnProperty("height")) + } + if (message.height != null && message.hasOwnProperty("height")) { + properties._height = 1; if (!$util.isInteger(message.height)) return "height: integer expected"; - if (message.width != null && message.hasOwnProperty("width")) + } + if (message.width != null && message.hasOwnProperty("width")) { + properties._width = 1; if (!$util.isInteger(message.width)) return "width: integer expected"; - if (message.directPath != null && message.hasOwnProperty("directPath")) + } + if (message.directPath != null && message.hasOwnProperty("directPath")) { + properties._directPath = 1; if (!$util.isString(message.directPath)) return "directPath: string expected"; - if (message.fileLength != null && message.hasOwnProperty("fileLength")) + } + if (message.fileLength != null && message.hasOwnProperty("fileLength")) { + properties._fileLength = 1; 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 (message.isFavorite != null && message.hasOwnProperty("isFavorite")) { + properties._isFavorite = 1; if (typeof message.isFavorite !== "boolean") return "isFavorite: boolean expected"; - if (message.deviceIdHint != null && message.hasOwnProperty("deviceIdHint")) + } + if (message.deviceIdHint != null && message.hasOwnProperty("deviceIdHint")) { + properties._deviceIdHint = 1; if (!$util.isInteger(message.deviceIdHint)) return "deviceIdHint: integer expected"; + } + if (message.isLottie != null && message.hasOwnProperty("isLottie")) { + properties._isLottie = 1; + if (typeof message.isLottie !== "boolean") + return "isLottie: boolean expected"; + } return null; }; @@ -89845,12 +139391,12 @@ $root.proto = (function() { 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) + else if (object.fileEncSha256.length >= 0) 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) + else if (object.mediaKey.length >= 0) message.mediaKey = object.mediaKey; if (object.mimetype != null) message.mimetype = String(object.mimetype); @@ -89873,6 +139419,8 @@ $root.proto = (function() { message.isFavorite = Boolean(object.isFavorite); if (object.deviceIdHint != null) message.deviceIdHint = object.deviceIdHint >>> 0; + if (object.isLottie != null) + message.isLottie = Boolean(object.isLottie); return message; }; @@ -89889,57 +139437,64 @@ $root.proto = (function() { 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")) + if (message.url != null && message.hasOwnProperty("url")) { object.url = message.url; - if (message.fileEncSha256 != null && message.hasOwnProperty("fileEncSha256")) + if (options.oneofs) + object._url = "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")) + if (options.oneofs) + object._fileEncSha256 = "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")) + if (options.oneofs) + object._mediaKey = "mediaKey"; + } + if (message.mimetype != null && message.hasOwnProperty("mimetype")) { object.mimetype = message.mimetype; - if (message.height != null && message.hasOwnProperty("height")) + if (options.oneofs) + object._mimetype = "mimetype"; + } + if (message.height != null && message.hasOwnProperty("height")) { object.height = message.height; - if (message.width != null && message.hasOwnProperty("width")) + if (options.oneofs) + object._height = "height"; + } + if (message.width != null && message.hasOwnProperty("width")) { object.width = message.width; - if (message.directPath != null && message.hasOwnProperty("directPath")) + if (options.oneofs) + object._width = "width"; + } + if (message.directPath != null && message.hasOwnProperty("directPath")) { object.directPath = message.directPath; - if (message.fileLength != null && message.hasOwnProperty("fileLength")) + if (options.oneofs) + object._directPath = "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")) + if (options.oneofs) + object._fileLength = "fileLength"; + } + if (message.isFavorite != null && message.hasOwnProperty("isFavorite")) { object.isFavorite = message.isFavorite; - if (message.deviceIdHint != null && message.hasOwnProperty("deviceIdHint")) + if (options.oneofs) + object._isFavorite = "isFavorite"; + } + if (message.deviceIdHint != null && message.hasOwnProperty("deviceIdHint")) { object.deviceIdHint = message.deviceIdHint; + if (options.oneofs) + object._deviceIdHint = "deviceIdHint"; + } + if (message.isLottie != null && message.hasOwnProperty("isLottie")) { + object.isLottie = message.isLottie; + if (options.oneofs) + object._isLottie = "isLottie"; + } return object; }; @@ -89954,6 +139509,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for StickerAction + * @function getTypeUrl + * @memberof proto.SyncActionValue.StickerAction + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StickerAction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.SyncActionValue.StickerAction"; + }; + return StickerAction; })(); @@ -89985,27 +139555,48 @@ $root.proto = (function() { /** * SubscriptionAction isDeactivated. - * @member {boolean} isDeactivated + * @member {boolean|null|undefined} isDeactivated * @memberof proto.SyncActionValue.SubscriptionAction * @instance */ - SubscriptionAction.prototype.isDeactivated = false; + SubscriptionAction.prototype.isDeactivated = null; /** * SubscriptionAction isAutoRenewing. - * @member {boolean} isAutoRenewing + * @member {boolean|null|undefined} isAutoRenewing * @memberof proto.SyncActionValue.SubscriptionAction * @instance */ - SubscriptionAction.prototype.isAutoRenewing = false; + SubscriptionAction.prototype.isAutoRenewing = null; /** * SubscriptionAction expirationDate. - * @member {number|Long} expirationDate + * @member {number|Long|null|undefined} expirationDate * @memberof proto.SyncActionValue.SubscriptionAction * @instance */ - SubscriptionAction.prototype.expirationDate = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + SubscriptionAction.prototype.expirationDate = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SubscriptionAction.prototype, "_isDeactivated", { + get: $util.oneOfGetter($oneOfFields = ["isDeactivated"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SubscriptionAction.prototype, "_isAutoRenewing", { + get: $util.oneOfGetter($oneOfFields = ["isAutoRenewing"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SubscriptionAction.prototype, "_expirationDate", { + get: $util.oneOfGetter($oneOfFields = ["expirationDate"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new SubscriptionAction instance using the specified properties. @@ -90071,15 +139662,18 @@ $root.proto = (function() { 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; + 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; @@ -90115,15 +139709,22 @@ $root.proto = (function() { SubscriptionAction.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.isDeactivated != null && message.hasOwnProperty("isDeactivated")) + var properties = {}; + if (message.isDeactivated != null && message.hasOwnProperty("isDeactivated")) { + properties._isDeactivated = 1; if (typeof message.isDeactivated !== "boolean") return "isDeactivated: boolean expected"; - if (message.isAutoRenewing != null && message.hasOwnProperty("isAutoRenewing")) + } + if (message.isAutoRenewing != null && message.hasOwnProperty("isAutoRenewing")) { + properties._isAutoRenewing = 1; if (typeof message.isAutoRenewing !== "boolean") return "isAutoRenewing: boolean expected"; - if (message.expirationDate != null && message.hasOwnProperty("expirationDate")) + } + if (message.expirationDate != null && message.hasOwnProperty("expirationDate")) { + properties._expirationDate = 1; if (!$util.isInteger(message.expirationDate) && !(message.expirationDate && $util.isInteger(message.expirationDate.low) && $util.isInteger(message.expirationDate.high))) return "expirationDate: integer|Long expected"; + } return null; }; @@ -90168,24 +139769,24 @@ $root.proto = (function() { 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")) + if (message.isDeactivated != null && message.hasOwnProperty("isDeactivated")) { object.isDeactivated = message.isDeactivated; - if (message.isAutoRenewing != null && message.hasOwnProperty("isAutoRenewing")) + if (options.oneofs) + object._isDeactivated = "isDeactivated"; + } + if (message.isAutoRenewing != null && message.hasOwnProperty("isAutoRenewing")) { object.isAutoRenewing = message.isAutoRenewing; - if (message.expirationDate != null && message.hasOwnProperty("expirationDate")) + if (options.oneofs) + object._isAutoRenewing = "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; + if (options.oneofs) + object._expirationDate = "expirationDate"; + } return object; }; @@ -90200,6 +139801,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for SubscriptionAction + * @function getTypeUrl + * @memberof proto.SyncActionValue.SubscriptionAction + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SubscriptionAction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.SyncActionValue.SubscriptionAction"; + }; + return SubscriptionAction; })(); @@ -90238,11 +139854,26 @@ $root.proto = (function() { /** * SyncActionMessage timestamp. - * @member {number|Long} timestamp + * @member {number|Long|null|undefined} timestamp * @memberof proto.SyncActionValue.SyncActionMessage * @instance */ - SyncActionMessage.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + SyncActionMessage.prototype.timestamp = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncActionMessage.prototype, "_key", { + get: $util.oneOfGetter($oneOfFields = ["key"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncActionMessage.prototype, "_timestamp", { + get: $util.oneOfGetter($oneOfFields = ["timestamp"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new SyncActionMessage instance using the specified properties. @@ -90306,12 +139937,14 @@ $root.proto = (function() { 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; + 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; @@ -90347,14 +139980,20 @@ $root.proto = (function() { SyncActionMessage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; if (message.key != null && message.hasOwnProperty("key")) { - var error = $root.proto.MessageKey.verify(message.key); - if (error) - return "key." + error; + properties._key = 1; + { + var error = $root.proto.MessageKey.verify(message.key); + if (error) + return "key." + error; + } } - if (message.timestamp != null && message.hasOwnProperty("timestamp")) + if (message.timestamp != null && message.hasOwnProperty("timestamp")) { + properties._timestamp = 1; if (!$util.isInteger(message.timestamp) && !(message.timestamp && $util.isInteger(message.timestamp.low) && $util.isInteger(message.timestamp.high))) return "timestamp: integer|Long expected"; + } return null; }; @@ -90400,21 +140039,19 @@ $root.proto = (function() { 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")) + if (message.key != null && message.hasOwnProperty("key")) { object.key = $root.proto.MessageKey.toObject(message.key, options); - if (message.timestamp != null && message.hasOwnProperty("timestamp")) + if (options.oneofs) + object._key = "key"; + } + if (message.timestamp != null && message.hasOwnProperty("timestamp")) { if (typeof message.timestamp === "number") object.timestamp = options.longs === String ? String(message.timestamp) : message.timestamp; else object.timestamp = options.longs === String ? $util.Long.prototype.toString.call(message.timestamp) : options.longs === Number ? new $util.LongBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0).toNumber() : message.timestamp; + if (options.oneofs) + object._timestamp = "timestamp"; + } return object; }; @@ -90429,6 +140066,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for SyncActionMessage + * @function getTypeUrl + * @memberof proto.SyncActionValue.SyncActionMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SyncActionMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.SyncActionValue.SyncActionMessage"; + }; + return SyncActionMessage; })(); @@ -90461,19 +140113,19 @@ $root.proto = (function() { /** * SyncActionMessageRange lastMessageTimestamp. - * @member {number|Long} lastMessageTimestamp + * @member {number|Long|null|undefined} lastMessageTimestamp * @memberof proto.SyncActionValue.SyncActionMessageRange * @instance */ - SyncActionMessageRange.prototype.lastMessageTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + SyncActionMessageRange.prototype.lastMessageTimestamp = null; /** * SyncActionMessageRange lastSystemMessageTimestamp. - * @member {number|Long} lastSystemMessageTimestamp + * @member {number|Long|null|undefined} lastSystemMessageTimestamp * @memberof proto.SyncActionValue.SyncActionMessageRange * @instance */ - SyncActionMessageRange.prototype.lastSystemMessageTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + SyncActionMessageRange.prototype.lastSystemMessageTimestamp = null; /** * SyncActionMessageRange messages. @@ -90483,6 +140135,21 @@ $root.proto = (function() { */ SyncActionMessageRange.prototype.messages = $util.emptyArray; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncActionMessageRange.prototype, "_lastMessageTimestamp", { + get: $util.oneOfGetter($oneOfFields = ["lastMessageTimestamp"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncActionMessageRange.prototype, "_lastSystemMessageTimestamp", { + get: $util.oneOfGetter($oneOfFields = ["lastSystemMessageTimestamp"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new SyncActionMessageRange instance using the specified properties. * @function create @@ -90548,17 +140215,20 @@ $root.proto = (function() { 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; + 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; @@ -90594,12 +140264,17 @@ $root.proto = (function() { SyncActionMessageRange.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.lastMessageTimestamp != null && message.hasOwnProperty("lastMessageTimestamp")) + var properties = {}; + if (message.lastMessageTimestamp != null && message.hasOwnProperty("lastMessageTimestamp")) { + properties._lastMessageTimestamp = 1; 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 (message.lastSystemMessageTimestamp != null && message.hasOwnProperty("lastSystemMessageTimestamp")) { + properties._lastSystemMessageTimestamp = 1; 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"; @@ -90670,28 +140345,22 @@ $root.proto = (function() { 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 (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 (options.oneofs) + object._lastMessageTimestamp = "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 (options.oneofs) + object._lastSystemMessageTimestamp = "lastSystemMessageTimestamp"; + } if (message.messages && message.messages.length) { object.messages = []; for (var j = 0; j < message.messages.length; ++j) @@ -90711,6 +140380,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for SyncActionMessageRange + * @function getTypeUrl + * @memberof proto.SyncActionValue.SyncActionMessageRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SyncActionMessageRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.SyncActionValue.SyncActionMessageRange"; + }; + return SyncActionMessageRange; })(); @@ -90740,11 +140424,20 @@ $root.proto = (function() { /** * TimeFormatAction isTwentyFourHourFormatEnabled. - * @member {boolean} isTwentyFourHourFormatEnabled + * @member {boolean|null|undefined} isTwentyFourHourFormatEnabled * @memberof proto.SyncActionValue.TimeFormatAction * @instance */ - TimeFormatAction.prototype.isTwentyFourHourFormatEnabled = false; + TimeFormatAction.prototype.isTwentyFourHourFormatEnabled = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(TimeFormatAction.prototype, "_isTwentyFourHourFormatEnabled", { + get: $util.oneOfGetter($oneOfFields = ["isTwentyFourHourFormatEnabled"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new TimeFormatAction instance using the specified properties. @@ -90806,9 +140499,10 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.isTwentyFourHourFormatEnabled = reader.bool(); - break; + case 1: { + message.isTwentyFourHourFormatEnabled = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -90844,9 +140538,12 @@ $root.proto = (function() { TimeFormatAction.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.isTwentyFourHourFormatEnabled != null && message.hasOwnProperty("isTwentyFourHourFormatEnabled")) + var properties = {}; + if (message.isTwentyFourHourFormatEnabled != null && message.hasOwnProperty("isTwentyFourHourFormatEnabled")) { + properties._isTwentyFourHourFormatEnabled = 1; if (typeof message.isTwentyFourHourFormatEnabled !== "boolean") return "isTwentyFourHourFormatEnabled: boolean expected"; + } return null; }; @@ -90880,10 +140577,11 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) - object.isTwentyFourHourFormatEnabled = false; - if (message.isTwentyFourHourFormatEnabled != null && message.hasOwnProperty("isTwentyFourHourFormatEnabled")) + if (message.isTwentyFourHourFormatEnabled != null && message.hasOwnProperty("isTwentyFourHourFormatEnabled")) { object.isTwentyFourHourFormatEnabled = message.isTwentyFourHourFormatEnabled; + if (options.oneofs) + object._isTwentyFourHourFormatEnabled = "isTwentyFourHourFormatEnabled"; + } return object; }; @@ -90898,6 +140596,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for TimeFormatAction + * @function getTypeUrl + * @memberof proto.SyncActionValue.TimeFormatAction + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TimeFormatAction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.SyncActionValue.TimeFormatAction"; + }; + return TimeFormatAction; })(); @@ -90927,11 +140640,20 @@ $root.proto = (function() { /** * UnarchiveChatsSetting unarchiveChats. - * @member {boolean} unarchiveChats + * @member {boolean|null|undefined} unarchiveChats * @memberof proto.SyncActionValue.UnarchiveChatsSetting * @instance */ - UnarchiveChatsSetting.prototype.unarchiveChats = false; + UnarchiveChatsSetting.prototype.unarchiveChats = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(UnarchiveChatsSetting.prototype, "_unarchiveChats", { + get: $util.oneOfGetter($oneOfFields = ["unarchiveChats"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new UnarchiveChatsSetting instance using the specified properties. @@ -90993,9 +140715,10 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.unarchiveChats = reader.bool(); - break; + case 1: { + message.unarchiveChats = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -91031,9 +140754,12 @@ $root.proto = (function() { UnarchiveChatsSetting.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.unarchiveChats != null && message.hasOwnProperty("unarchiveChats")) + var properties = {}; + if (message.unarchiveChats != null && message.hasOwnProperty("unarchiveChats")) { + properties._unarchiveChats = 1; if (typeof message.unarchiveChats !== "boolean") return "unarchiveChats: boolean expected"; + } return null; }; @@ -91067,10 +140793,11 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) - object.unarchiveChats = false; - if (message.unarchiveChats != null && message.hasOwnProperty("unarchiveChats")) + if (message.unarchiveChats != null && message.hasOwnProperty("unarchiveChats")) { object.unarchiveChats = message.unarchiveChats; + if (options.oneofs) + object._unarchiveChats = "unarchiveChats"; + } return object; }; @@ -91085,6 +140812,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for UnarchiveChatsSetting + * @function getTypeUrl + * @memberof proto.SyncActionValue.UnarchiveChatsSetting + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UnarchiveChatsSetting.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.SyncActionValue.UnarchiveChatsSetting"; + }; + return UnarchiveChatsSetting; })(); @@ -91114,11 +140856,20 @@ $root.proto = (function() { /** * UserStatusMuteAction muted. - * @member {boolean} muted + * @member {boolean|null|undefined} muted * @memberof proto.SyncActionValue.UserStatusMuteAction * @instance */ - UserStatusMuteAction.prototype.muted = false; + UserStatusMuteAction.prototype.muted = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(UserStatusMuteAction.prototype, "_muted", { + get: $util.oneOfGetter($oneOfFields = ["muted"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new UserStatusMuteAction instance using the specified properties. @@ -91180,9 +140931,10 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.muted = reader.bool(); - break; + case 1: { + message.muted = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -91218,9 +140970,12 @@ $root.proto = (function() { UserStatusMuteAction.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.muted != null && message.hasOwnProperty("muted")) + var properties = {}; + if (message.muted != null && message.hasOwnProperty("muted")) { + properties._muted = 1; if (typeof message.muted !== "boolean") return "muted: boolean expected"; + } return null; }; @@ -91254,10 +141009,11 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) - object.muted = false; - if (message.muted != null && message.hasOwnProperty("muted")) + if (message.muted != null && message.hasOwnProperty("muted")) { object.muted = message.muted; + if (options.oneofs) + object._muted = "muted"; + } return object; }; @@ -91272,9 +141028,731 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for UserStatusMuteAction + * @function getTypeUrl + * @memberof proto.SyncActionValue.UserStatusMuteAction + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UserStatusMuteAction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.SyncActionValue.UserStatusMuteAction"; + }; + return UserStatusMuteAction; })(); + SyncActionValue.UsernameChatStartModeAction = (function() { + + /** + * Properties of a UsernameChatStartModeAction. + * @memberof proto.SyncActionValue + * @interface IUsernameChatStartModeAction + * @property {proto.SyncActionValue.UsernameChatStartModeAction.ChatStartMode|null} [chatStartMode] UsernameChatStartModeAction chatStartMode + */ + + /** + * Constructs a new UsernameChatStartModeAction. + * @memberof proto.SyncActionValue + * @classdesc Represents a UsernameChatStartModeAction. + * @implements IUsernameChatStartModeAction + * @constructor + * @param {proto.SyncActionValue.IUsernameChatStartModeAction=} [properties] Properties to set + */ + function UsernameChatStartModeAction(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UsernameChatStartModeAction chatStartMode. + * @member {proto.SyncActionValue.UsernameChatStartModeAction.ChatStartMode|null|undefined} chatStartMode + * @memberof proto.SyncActionValue.UsernameChatStartModeAction + * @instance + */ + UsernameChatStartModeAction.prototype.chatStartMode = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(UsernameChatStartModeAction.prototype, "_chatStartMode", { + get: $util.oneOfGetter($oneOfFields = ["chatStartMode"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new UsernameChatStartModeAction instance using the specified properties. + * @function create + * @memberof proto.SyncActionValue.UsernameChatStartModeAction + * @static + * @param {proto.SyncActionValue.IUsernameChatStartModeAction=} [properties] Properties to set + * @returns {proto.SyncActionValue.UsernameChatStartModeAction} UsernameChatStartModeAction instance + */ + UsernameChatStartModeAction.create = function create(properties) { + return new UsernameChatStartModeAction(properties); + }; + + /** + * Encodes the specified UsernameChatStartModeAction message. Does not implicitly {@link proto.SyncActionValue.UsernameChatStartModeAction.verify|verify} messages. + * @function encode + * @memberof proto.SyncActionValue.UsernameChatStartModeAction + * @static + * @param {proto.SyncActionValue.IUsernameChatStartModeAction} message UsernameChatStartModeAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UsernameChatStartModeAction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.chatStartMode != null && Object.hasOwnProperty.call(message, "chatStartMode")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.chatStartMode); + return writer; + }; + + /** + * Encodes the specified UsernameChatStartModeAction message, length delimited. Does not implicitly {@link proto.SyncActionValue.UsernameChatStartModeAction.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.SyncActionValue.UsernameChatStartModeAction + * @static + * @param {proto.SyncActionValue.IUsernameChatStartModeAction} message UsernameChatStartModeAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UsernameChatStartModeAction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UsernameChatStartModeAction message from the specified reader or buffer. + * @function decode + * @memberof proto.SyncActionValue.UsernameChatStartModeAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.SyncActionValue.UsernameChatStartModeAction} UsernameChatStartModeAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UsernameChatStartModeAction.decode = function 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.UsernameChatStartModeAction(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.chatStartMode = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a UsernameChatStartModeAction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.SyncActionValue.UsernameChatStartModeAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.SyncActionValue.UsernameChatStartModeAction} UsernameChatStartModeAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UsernameChatStartModeAction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UsernameChatStartModeAction message. + * @function verify + * @memberof proto.SyncActionValue.UsernameChatStartModeAction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UsernameChatStartModeAction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.chatStartMode != null && message.hasOwnProperty("chatStartMode")) { + properties._chatStartMode = 1; + switch (message.chatStartMode) { + default: + return "chatStartMode: enum value expected"; + case 1: + case 2: + break; + } + } + return null; + }; + + /** + * Creates a UsernameChatStartModeAction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.SyncActionValue.UsernameChatStartModeAction + * @static + * @param {Object.} object Plain object + * @returns {proto.SyncActionValue.UsernameChatStartModeAction} UsernameChatStartModeAction + */ + UsernameChatStartModeAction.fromObject = function fromObject(object) { + if (object instanceof $root.proto.SyncActionValue.UsernameChatStartModeAction) + return object; + var message = new $root.proto.SyncActionValue.UsernameChatStartModeAction(); + switch (object.chatStartMode) { + default: + if (typeof object.chatStartMode === "number") { + message.chatStartMode = object.chatStartMode; + break; + } + break; + case "LID": + case 1: + message.chatStartMode = 1; + break; + case "PN": + case 2: + message.chatStartMode = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a UsernameChatStartModeAction message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.SyncActionValue.UsernameChatStartModeAction + * @static + * @param {proto.SyncActionValue.UsernameChatStartModeAction} message UsernameChatStartModeAction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UsernameChatStartModeAction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.chatStartMode != null && message.hasOwnProperty("chatStartMode")) { + object.chatStartMode = options.enums === String ? $root.proto.SyncActionValue.UsernameChatStartModeAction.ChatStartMode[message.chatStartMode] === undefined ? message.chatStartMode : $root.proto.SyncActionValue.UsernameChatStartModeAction.ChatStartMode[message.chatStartMode] : message.chatStartMode; + if (options.oneofs) + object._chatStartMode = "chatStartMode"; + } + return object; + }; + + /** + * Converts this UsernameChatStartModeAction to JSON. + * @function toJSON + * @memberof proto.SyncActionValue.UsernameChatStartModeAction + * @instance + * @returns {Object.} JSON object + */ + UsernameChatStartModeAction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UsernameChatStartModeAction + * @function getTypeUrl + * @memberof proto.SyncActionValue.UsernameChatStartModeAction + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UsernameChatStartModeAction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.SyncActionValue.UsernameChatStartModeAction"; + }; + + /** + * ChatStartMode enum. + * @name proto.SyncActionValue.UsernameChatStartModeAction.ChatStartMode + * @enum {number} + * @property {number} LID=1 LID value + * @property {number} PN=2 PN value + */ + UsernameChatStartModeAction.ChatStartMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "LID"] = 1; + values[valuesById[2] = "PN"] = 2; + return values; + })(); + + return UsernameChatStartModeAction; + })(); + + SyncActionValue.WaffleAccountLinkStateAction = (function() { + + /** + * Properties of a WaffleAccountLinkStateAction. + * @memberof proto.SyncActionValue + * @interface IWaffleAccountLinkStateAction + * @property {proto.SyncActionValue.WaffleAccountLinkStateAction.AccountLinkState|null} [linkState] WaffleAccountLinkStateAction linkState + */ + + /** + * Constructs a new WaffleAccountLinkStateAction. + * @memberof proto.SyncActionValue + * @classdesc Represents a WaffleAccountLinkStateAction. + * @implements IWaffleAccountLinkStateAction + * @constructor + * @param {proto.SyncActionValue.IWaffleAccountLinkStateAction=} [properties] Properties to set + */ + function WaffleAccountLinkStateAction(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WaffleAccountLinkStateAction linkState. + * @member {proto.SyncActionValue.WaffleAccountLinkStateAction.AccountLinkState|null|undefined} linkState + * @memberof proto.SyncActionValue.WaffleAccountLinkStateAction + * @instance + */ + WaffleAccountLinkStateAction.prototype.linkState = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WaffleAccountLinkStateAction.prototype, "_linkState", { + get: $util.oneOfGetter($oneOfFields = ["linkState"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new WaffleAccountLinkStateAction instance using the specified properties. + * @function create + * @memberof proto.SyncActionValue.WaffleAccountLinkStateAction + * @static + * @param {proto.SyncActionValue.IWaffleAccountLinkStateAction=} [properties] Properties to set + * @returns {proto.SyncActionValue.WaffleAccountLinkStateAction} WaffleAccountLinkStateAction instance + */ + WaffleAccountLinkStateAction.create = function create(properties) { + return new WaffleAccountLinkStateAction(properties); + }; + + /** + * Encodes the specified WaffleAccountLinkStateAction message. Does not implicitly {@link proto.SyncActionValue.WaffleAccountLinkStateAction.verify|verify} messages. + * @function encode + * @memberof proto.SyncActionValue.WaffleAccountLinkStateAction + * @static + * @param {proto.SyncActionValue.IWaffleAccountLinkStateAction} message WaffleAccountLinkStateAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WaffleAccountLinkStateAction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.linkState != null && Object.hasOwnProperty.call(message, "linkState")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.linkState); + return writer; + }; + + /** + * Encodes the specified WaffleAccountLinkStateAction message, length delimited. Does not implicitly {@link proto.SyncActionValue.WaffleAccountLinkStateAction.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.SyncActionValue.WaffleAccountLinkStateAction + * @static + * @param {proto.SyncActionValue.IWaffleAccountLinkStateAction} message WaffleAccountLinkStateAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WaffleAccountLinkStateAction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WaffleAccountLinkStateAction message from the specified reader or buffer. + * @function decode + * @memberof proto.SyncActionValue.WaffleAccountLinkStateAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.SyncActionValue.WaffleAccountLinkStateAction} WaffleAccountLinkStateAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WaffleAccountLinkStateAction.decode = function 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.WaffleAccountLinkStateAction(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.linkState = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WaffleAccountLinkStateAction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.SyncActionValue.WaffleAccountLinkStateAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.SyncActionValue.WaffleAccountLinkStateAction} WaffleAccountLinkStateAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WaffleAccountLinkStateAction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WaffleAccountLinkStateAction message. + * @function verify + * @memberof proto.SyncActionValue.WaffleAccountLinkStateAction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WaffleAccountLinkStateAction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.linkState != null && message.hasOwnProperty("linkState")) { + properties._linkState = 1; + switch (message.linkState) { + default: + return "linkState: enum value expected"; + case 0: + break; + } + } + return null; + }; + + /** + * Creates a WaffleAccountLinkStateAction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.SyncActionValue.WaffleAccountLinkStateAction + * @static + * @param {Object.} object Plain object + * @returns {proto.SyncActionValue.WaffleAccountLinkStateAction} WaffleAccountLinkStateAction + */ + WaffleAccountLinkStateAction.fromObject = function fromObject(object) { + if (object instanceof $root.proto.SyncActionValue.WaffleAccountLinkStateAction) + return object; + var message = new $root.proto.SyncActionValue.WaffleAccountLinkStateAction(); + switch (object.linkState) { + default: + if (typeof object.linkState === "number") { + message.linkState = object.linkState; + break; + } + break; + case "ACTIVE": + case 0: + message.linkState = 0; + break; + } + return message; + }; + + /** + * Creates a plain object from a WaffleAccountLinkStateAction message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.SyncActionValue.WaffleAccountLinkStateAction + * @static + * @param {proto.SyncActionValue.WaffleAccountLinkStateAction} message WaffleAccountLinkStateAction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WaffleAccountLinkStateAction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.linkState != null && message.hasOwnProperty("linkState")) { + object.linkState = options.enums === String ? $root.proto.SyncActionValue.WaffleAccountLinkStateAction.AccountLinkState[message.linkState] === undefined ? message.linkState : $root.proto.SyncActionValue.WaffleAccountLinkStateAction.AccountLinkState[message.linkState] : message.linkState; + if (options.oneofs) + object._linkState = "linkState"; + } + return object; + }; + + /** + * Converts this WaffleAccountLinkStateAction to JSON. + * @function toJSON + * @memberof proto.SyncActionValue.WaffleAccountLinkStateAction + * @instance + * @returns {Object.} JSON object + */ + WaffleAccountLinkStateAction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for WaffleAccountLinkStateAction + * @function getTypeUrl + * @memberof proto.SyncActionValue.WaffleAccountLinkStateAction + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WaffleAccountLinkStateAction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.SyncActionValue.WaffleAccountLinkStateAction"; + }; + + /** + * AccountLinkState enum. + * @name proto.SyncActionValue.WaffleAccountLinkStateAction.AccountLinkState + * @enum {number} + * @property {number} ACTIVE=0 ACTIVE value + */ + WaffleAccountLinkStateAction.AccountLinkState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ACTIVE"] = 0; + return values; + })(); + + return WaffleAccountLinkStateAction; + })(); + + SyncActionValue.WamoUserIdentifierAction = (function() { + + /** + * Properties of a WamoUserIdentifierAction. + * @memberof proto.SyncActionValue + * @interface IWamoUserIdentifierAction + * @property {string|null} [identifier] WamoUserIdentifierAction identifier + */ + + /** + * Constructs a new WamoUserIdentifierAction. + * @memberof proto.SyncActionValue + * @classdesc Represents a WamoUserIdentifierAction. + * @implements IWamoUserIdentifierAction + * @constructor + * @param {proto.SyncActionValue.IWamoUserIdentifierAction=} [properties] Properties to set + */ + function WamoUserIdentifierAction(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WamoUserIdentifierAction identifier. + * @member {string|null|undefined} identifier + * @memberof proto.SyncActionValue.WamoUserIdentifierAction + * @instance + */ + WamoUserIdentifierAction.prototype.identifier = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WamoUserIdentifierAction.prototype, "_identifier", { + get: $util.oneOfGetter($oneOfFields = ["identifier"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new WamoUserIdentifierAction instance using the specified properties. + * @function create + * @memberof proto.SyncActionValue.WamoUserIdentifierAction + * @static + * @param {proto.SyncActionValue.IWamoUserIdentifierAction=} [properties] Properties to set + * @returns {proto.SyncActionValue.WamoUserIdentifierAction} WamoUserIdentifierAction instance + */ + WamoUserIdentifierAction.create = function create(properties) { + return new WamoUserIdentifierAction(properties); + }; + + /** + * Encodes the specified WamoUserIdentifierAction message. Does not implicitly {@link proto.SyncActionValue.WamoUserIdentifierAction.verify|verify} messages. + * @function encode + * @memberof proto.SyncActionValue.WamoUserIdentifierAction + * @static + * @param {proto.SyncActionValue.IWamoUserIdentifierAction} message WamoUserIdentifierAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WamoUserIdentifierAction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.identifier != null && Object.hasOwnProperty.call(message, "identifier")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.identifier); + return writer; + }; + + /** + * Encodes the specified WamoUserIdentifierAction message, length delimited. Does not implicitly {@link proto.SyncActionValue.WamoUserIdentifierAction.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.SyncActionValue.WamoUserIdentifierAction + * @static + * @param {proto.SyncActionValue.IWamoUserIdentifierAction} message WamoUserIdentifierAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WamoUserIdentifierAction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WamoUserIdentifierAction message from the specified reader or buffer. + * @function decode + * @memberof proto.SyncActionValue.WamoUserIdentifierAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.SyncActionValue.WamoUserIdentifierAction} WamoUserIdentifierAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WamoUserIdentifierAction.decode = function 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.WamoUserIdentifierAction(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.identifier = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WamoUserIdentifierAction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.SyncActionValue.WamoUserIdentifierAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.SyncActionValue.WamoUserIdentifierAction} WamoUserIdentifierAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WamoUserIdentifierAction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WamoUserIdentifierAction message. + * @function verify + * @memberof proto.SyncActionValue.WamoUserIdentifierAction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WamoUserIdentifierAction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.identifier != null && message.hasOwnProperty("identifier")) { + properties._identifier = 1; + if (!$util.isString(message.identifier)) + return "identifier: string expected"; + } + return null; + }; + + /** + * Creates a WamoUserIdentifierAction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.SyncActionValue.WamoUserIdentifierAction + * @static + * @param {Object.} object Plain object + * @returns {proto.SyncActionValue.WamoUserIdentifierAction} WamoUserIdentifierAction + */ + WamoUserIdentifierAction.fromObject = function fromObject(object) { + if (object instanceof $root.proto.SyncActionValue.WamoUserIdentifierAction) + return object; + var message = new $root.proto.SyncActionValue.WamoUserIdentifierAction(); + if (object.identifier != null) + message.identifier = String(object.identifier); + return message; + }; + + /** + * Creates a plain object from a WamoUserIdentifierAction message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.SyncActionValue.WamoUserIdentifierAction + * @static + * @param {proto.SyncActionValue.WamoUserIdentifierAction} message WamoUserIdentifierAction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WamoUserIdentifierAction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.identifier != null && message.hasOwnProperty("identifier")) { + object.identifier = message.identifier; + if (options.oneofs) + object._identifier = "identifier"; + } + return object; + }; + + /** + * Converts this WamoUserIdentifierAction to JSON. + * @function toJSON + * @memberof proto.SyncActionValue.WamoUserIdentifierAction + * @instance + * @returns {Object.} JSON object + */ + WamoUserIdentifierAction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for WamoUserIdentifierAction + * @function getTypeUrl + * @memberof proto.SyncActionValue.WamoUserIdentifierAction + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WamoUserIdentifierAction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.SyncActionValue.WamoUserIdentifierAction"; + }; + + return WamoUserIdentifierAction; + })(); + return SyncActionValue; })(); @@ -91304,11 +141782,20 @@ $root.proto = (function() { /** * SyncdIndex blob. - * @member {Uint8Array} blob + * @member {Uint8Array|null|undefined} blob * @memberof proto.SyncdIndex * @instance */ - SyncdIndex.prototype.blob = $util.newBuffer([]); + SyncdIndex.prototype.blob = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncdIndex.prototype, "_blob", { + get: $util.oneOfGetter($oneOfFields = ["blob"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new SyncdIndex instance using the specified properties. @@ -91370,9 +141857,10 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.blob = reader.bytes(); - break; + case 1: { + message.blob = reader.bytes(); + break; + } default: reader.skipType(tag & 7); break; @@ -91408,9 +141896,12 @@ $root.proto = (function() { SyncdIndex.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.blob != null && message.hasOwnProperty("blob")) + var properties = {}; + if (message.blob != null && message.hasOwnProperty("blob")) { + properties._blob = 1; if (!(message.blob && typeof message.blob.length === "number" || $util.isString(message.blob))) return "blob: buffer expected"; + } return null; }; @@ -91429,7 +141920,7 @@ $root.proto = (function() { if (object.blob != null) if (typeof object.blob === "string") $util.base64.decode(object.blob, message.blob = $util.newBuffer($util.base64.length(object.blob)), 0); - else if (object.blob.length) + else if (object.blob.length >= 0) message.blob = object.blob; return message; }; @@ -91447,16 +141938,11 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) - if (options.bytes === String) - object.blob = ""; - else { - object.blob = []; - if (options.bytes !== Array) - object.blob = $util.newBuffer(object.blob); - } - if (message.blob != null && message.hasOwnProperty("blob")) + if (message.blob != null && message.hasOwnProperty("blob")) { object.blob = options.bytes === String ? $util.base64.encode(message.blob, 0, message.blob.length) : options.bytes === Array ? Array.prototype.slice.call(message.blob) : message.blob; + if (options.oneofs) + object._blob = "blob"; + } return object; }; @@ -91471,6 +141957,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for SyncdIndex + * @function getTypeUrl + * @memberof proto.SyncdIndex + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SyncdIndex.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.SyncdIndex"; + }; + return SyncdIndex; })(); @@ -91501,11 +142002,11 @@ $root.proto = (function() { /** * SyncdMutation operation. - * @member {proto.SyncdMutation.SyncdOperation} operation + * @member {proto.SyncdMutation.SyncdOperation|null|undefined} operation * @memberof proto.SyncdMutation * @instance */ - SyncdMutation.prototype.operation = 0; + SyncdMutation.prototype.operation = null; /** * SyncdMutation record. @@ -91515,6 +142016,21 @@ $root.proto = (function() { */ SyncdMutation.prototype.record = null; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncdMutation.prototype, "_operation", { + get: $util.oneOfGetter($oneOfFields = ["operation"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncdMutation.prototype, "_record", { + get: $util.oneOfGetter($oneOfFields = ["record"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new SyncdMutation instance using the specified properties. * @function create @@ -91577,12 +142093,14 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.operation = reader.int32(); - break; - case 2: - message.record = $root.proto.SyncdRecord.decode(reader, reader.uint32()); - break; + case 1: { + message.operation = reader.int32(); + break; + } + case 2: { + message.record = $root.proto.SyncdRecord.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -91618,7 +142136,9 @@ $root.proto = (function() { SyncdMutation.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.operation != null && message.hasOwnProperty("operation")) + var properties = {}; + if (message.operation != null && message.hasOwnProperty("operation")) { + properties._operation = 1; switch (message.operation) { default: return "operation: enum value expected"; @@ -91626,10 +142146,14 @@ $root.proto = (function() { case 1: break; } + } if (message.record != null && message.hasOwnProperty("record")) { - var error = $root.proto.SyncdRecord.verify(message.record); - if (error) - return "record." + error; + properties._record = 1; + { + var error = $root.proto.SyncdRecord.verify(message.record); + if (error) + return "record." + error; + } } return null; }; @@ -91647,6 +142171,12 @@ $root.proto = (function() { return object; var message = new $root.proto.SyncdMutation(); switch (object.operation) { + default: + if (typeof object.operation === "number") { + message.operation = object.operation; + break; + } + break; case "SET": case 0: message.operation = 0; @@ -91677,14 +142207,16 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.operation = options.enums === String ? "SET" : 0; - object.record = null; + if (message.operation != null && message.hasOwnProperty("operation")) { + object.operation = options.enums === String ? $root.proto.SyncdMutation.SyncdOperation[message.operation] === undefined ? message.operation : $root.proto.SyncdMutation.SyncdOperation[message.operation] : message.operation; + if (options.oneofs) + object._operation = "operation"; } - if (message.operation != null && message.hasOwnProperty("operation")) - object.operation = options.enums === String ? $root.proto.SyncdMutation.SyncdOperation[message.operation] : message.operation; - if (message.record != null && message.hasOwnProperty("record")) + if (message.record != null && message.hasOwnProperty("record")) { object.record = $root.proto.SyncdRecord.toObject(message.record, options); + if (options.oneofs) + object._record = "record"; + } return object; }; @@ -91699,6 +142231,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for SyncdMutation + * @function getTypeUrl + * @memberof proto.SyncdMutation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SyncdMutation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.SyncdMutation"; + }; + /** * SyncdOperation enum. * @name proto.SyncdMutation.SyncdOperation @@ -91810,11 +142357,12 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.mutations && message.mutations.length)) - message.mutations = []; - message.mutations.push($root.proto.SyncdMutation.decode(reader, reader.uint32())); - break; + case 1: { + if (!(message.mutations && message.mutations.length)) + message.mutations = []; + message.mutations.push($root.proto.SyncdMutation.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -91921,6 +142469,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for SyncdMutations + * @function getTypeUrl + * @memberof proto.SyncdMutations + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SyncdMutations.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.SyncdMutations"; + }; + return SyncdMutations; })(); @@ -91983,19 +142546,19 @@ $root.proto = (function() { /** * SyncdPatch snapshotMac. - * @member {Uint8Array} snapshotMac + * @member {Uint8Array|null|undefined} snapshotMac * @memberof proto.SyncdPatch * @instance */ - SyncdPatch.prototype.snapshotMac = $util.newBuffer([]); + SyncdPatch.prototype.snapshotMac = null; /** * SyncdPatch patchMac. - * @member {Uint8Array} patchMac + * @member {Uint8Array|null|undefined} patchMac * @memberof proto.SyncdPatch * @instance */ - SyncdPatch.prototype.patchMac = $util.newBuffer([]); + SyncdPatch.prototype.patchMac = null; /** * SyncdPatch keyId. @@ -92015,19 +142578,70 @@ $root.proto = (function() { /** * SyncdPatch deviceIndex. - * @member {number} deviceIndex + * @member {number|null|undefined} deviceIndex * @memberof proto.SyncdPatch * @instance */ - SyncdPatch.prototype.deviceIndex = 0; + SyncdPatch.prototype.deviceIndex = null; /** * SyncdPatch clientDebugData. - * @member {Uint8Array} clientDebugData + * @member {Uint8Array|null|undefined} clientDebugData * @memberof proto.SyncdPatch * @instance */ - SyncdPatch.prototype.clientDebugData = $util.newBuffer([]); + SyncdPatch.prototype.clientDebugData = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncdPatch.prototype, "_version", { + get: $util.oneOfGetter($oneOfFields = ["version"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncdPatch.prototype, "_externalMutations", { + get: $util.oneOfGetter($oneOfFields = ["externalMutations"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncdPatch.prototype, "_snapshotMac", { + get: $util.oneOfGetter($oneOfFields = ["snapshotMac"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncdPatch.prototype, "_patchMac", { + get: $util.oneOfGetter($oneOfFields = ["patchMac"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncdPatch.prototype, "_keyId", { + get: $util.oneOfGetter($oneOfFields = ["keyId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncdPatch.prototype, "_exitCode", { + get: $util.oneOfGetter($oneOfFields = ["exitCode"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncdPatch.prototype, "_deviceIndex", { + get: $util.oneOfGetter($oneOfFields = ["deviceIndex"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncdPatch.prototype, "_clientDebugData", { + get: $util.oneOfGetter($oneOfFields = ["clientDebugData"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new SyncdPatch instance using the specified properties. @@ -92106,35 +142720,44 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.version = $root.proto.SyncdVersion.decode(reader, reader.uint32()); - break; - case 2: - if (!(message.mutations && message.mutations.length)) - message.mutations = []; - message.mutations.push($root.proto.SyncdMutation.decode(reader, reader.uint32())); - break; - case 3: - message.externalMutations = $root.proto.ExternalBlobReference.decode(reader, reader.uint32()); - break; - case 4: - message.snapshotMac = reader.bytes(); - break; - case 5: - message.patchMac = reader.bytes(); - break; - case 6: - message.keyId = $root.proto.KeyId.decode(reader, reader.uint32()); - break; - case 7: - message.exitCode = $root.proto.ExitCode.decode(reader, reader.uint32()); - break; - case 8: - message.deviceIndex = reader.uint32(); - break; - case 9: - message.clientDebugData = reader.bytes(); - break; + case 1: { + message.version = $root.proto.SyncdVersion.decode(reader, reader.uint32()); + break; + } + case 2: { + if (!(message.mutations && message.mutations.length)) + message.mutations = []; + message.mutations.push($root.proto.SyncdMutation.decode(reader, reader.uint32())); + break; + } + case 3: { + message.externalMutations = $root.proto.ExternalBlobReference.decode(reader, reader.uint32()); + break; + } + case 4: { + message.snapshotMac = reader.bytes(); + break; + } + case 5: { + message.patchMac = reader.bytes(); + break; + } + case 6: { + message.keyId = $root.proto.KeyId.decode(reader, reader.uint32()); + break; + } + case 7: { + message.exitCode = $root.proto.ExitCode.decode(reader, reader.uint32()); + break; + } + case 8: { + message.deviceIndex = reader.uint32(); + break; + } + case 9: { + message.clientDebugData = reader.bytes(); + break; + } default: reader.skipType(tag & 7); break; @@ -92170,10 +142793,14 @@ $root.proto = (function() { SyncdPatch.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; if (message.version != null && message.hasOwnProperty("version")) { - var error = $root.proto.SyncdVersion.verify(message.version); - if (error) - return "version." + error; + properties._version = 1; + { + var error = $root.proto.SyncdVersion.verify(message.version); + if (error) + return "version." + error; + } } if (message.mutations != null && message.hasOwnProperty("mutations")) { if (!Array.isArray(message.mutations)) @@ -92185,32 +142812,49 @@ $root.proto = (function() { } } if (message.externalMutations != null && message.hasOwnProperty("externalMutations")) { - var error = $root.proto.ExternalBlobReference.verify(message.externalMutations); - if (error) - return "externalMutations." + error; + properties._externalMutations = 1; + { + var error = $root.proto.ExternalBlobReference.verify(message.externalMutations); + if (error) + return "externalMutations." + error; + } } - if (message.snapshotMac != null && message.hasOwnProperty("snapshotMac")) + if (message.snapshotMac != null && message.hasOwnProperty("snapshotMac")) { + properties._snapshotMac = 1; if (!(message.snapshotMac && typeof message.snapshotMac.length === "number" || $util.isString(message.snapshotMac))) return "snapshotMac: buffer expected"; - if (message.patchMac != null && message.hasOwnProperty("patchMac")) + } + if (message.patchMac != null && message.hasOwnProperty("patchMac")) { + properties._patchMac = 1; if (!(message.patchMac && typeof message.patchMac.length === "number" || $util.isString(message.patchMac))) return "patchMac: buffer expected"; + } if (message.keyId != null && message.hasOwnProperty("keyId")) { - var error = $root.proto.KeyId.verify(message.keyId); - if (error) - return "keyId." + error; + properties._keyId = 1; + { + var error = $root.proto.KeyId.verify(message.keyId); + if (error) + return "keyId." + error; + } } if (message.exitCode != null && message.hasOwnProperty("exitCode")) { - var error = $root.proto.ExitCode.verify(message.exitCode); - if (error) - return "exitCode." + error; + properties._exitCode = 1; + { + var error = $root.proto.ExitCode.verify(message.exitCode); + if (error) + return "exitCode." + error; + } } - if (message.deviceIndex != null && message.hasOwnProperty("deviceIndex")) + if (message.deviceIndex != null && message.hasOwnProperty("deviceIndex")) { + properties._deviceIndex = 1; if (!$util.isInteger(message.deviceIndex)) return "deviceIndex: integer expected"; - if (message.clientDebugData != null && message.hasOwnProperty("clientDebugData")) + } + if (message.clientDebugData != null && message.hasOwnProperty("clientDebugData")) { + properties._clientDebugData = 1; if (!(message.clientDebugData && typeof message.clientDebugData.length === "number" || $util.isString(message.clientDebugData))) return "clientDebugData: buffer expected"; + } return null; }; @@ -92249,12 +142893,12 @@ $root.proto = (function() { if (object.snapshotMac != null) if (typeof object.snapshotMac === "string") $util.base64.decode(object.snapshotMac, message.snapshotMac = $util.newBuffer($util.base64.length(object.snapshotMac)), 0); - else if (object.snapshotMac.length) + else if (object.snapshotMac.length >= 0) message.snapshotMac = object.snapshotMac; if (object.patchMac != null) if (typeof object.patchMac === "string") $util.base64.decode(object.patchMac, message.patchMac = $util.newBuffer($util.base64.length(object.patchMac)), 0); - else if (object.patchMac.length) + else if (object.patchMac.length >= 0) message.patchMac = object.patchMac; if (object.keyId != null) { if (typeof object.keyId !== "object") @@ -92271,7 +142915,7 @@ $root.proto = (function() { if (object.clientDebugData != null) if (typeof object.clientDebugData === "string") $util.base64.decode(object.clientDebugData, message.clientDebugData = $util.newBuffer($util.base64.length(object.clientDebugData)), 0); - else if (object.clientDebugData.length) + else if (object.clientDebugData.length >= 0) message.clientDebugData = object.clientDebugData; return message; }; @@ -92291,55 +142935,51 @@ $root.proto = (function() { var object = {}; if (options.arrays || options.defaults) object.mutations = []; - if (options.defaults) { - object.version = null; - object.externalMutations = null; - if (options.bytes === String) - object.snapshotMac = ""; - else { - object.snapshotMac = []; - if (options.bytes !== Array) - object.snapshotMac = $util.newBuffer(object.snapshotMac); - } - if (options.bytes === String) - object.patchMac = ""; - else { - object.patchMac = []; - if (options.bytes !== Array) - object.patchMac = $util.newBuffer(object.patchMac); - } - object.keyId = null; - object.exitCode = null; - object.deviceIndex = 0; - if (options.bytes === String) - object.clientDebugData = ""; - else { - object.clientDebugData = []; - if (options.bytes !== Array) - object.clientDebugData = $util.newBuffer(object.clientDebugData); - } - } - if (message.version != null && message.hasOwnProperty("version")) + if (message.version != null && message.hasOwnProperty("version")) { object.version = $root.proto.SyncdVersion.toObject(message.version, options); + if (options.oneofs) + object._version = "version"; + } if (message.mutations && message.mutations.length) { object.mutations = []; for (var j = 0; j < message.mutations.length; ++j) object.mutations[j] = $root.proto.SyncdMutation.toObject(message.mutations[j], options); } - if (message.externalMutations != null && message.hasOwnProperty("externalMutations")) + if (message.externalMutations != null && message.hasOwnProperty("externalMutations")) { object.externalMutations = $root.proto.ExternalBlobReference.toObject(message.externalMutations, options); - if (message.snapshotMac != null && message.hasOwnProperty("snapshotMac")) + if (options.oneofs) + object._externalMutations = "externalMutations"; + } + if (message.snapshotMac != null && message.hasOwnProperty("snapshotMac")) { object.snapshotMac = options.bytes === String ? $util.base64.encode(message.snapshotMac, 0, message.snapshotMac.length) : options.bytes === Array ? Array.prototype.slice.call(message.snapshotMac) : message.snapshotMac; - if (message.patchMac != null && message.hasOwnProperty("patchMac")) + if (options.oneofs) + object._snapshotMac = "snapshotMac"; + } + if (message.patchMac != null && message.hasOwnProperty("patchMac")) { object.patchMac = options.bytes === String ? $util.base64.encode(message.patchMac, 0, message.patchMac.length) : options.bytes === Array ? Array.prototype.slice.call(message.patchMac) : message.patchMac; - if (message.keyId != null && message.hasOwnProperty("keyId")) + if (options.oneofs) + object._patchMac = "patchMac"; + } + if (message.keyId != null && message.hasOwnProperty("keyId")) { object.keyId = $root.proto.KeyId.toObject(message.keyId, options); - if (message.exitCode != null && message.hasOwnProperty("exitCode")) + if (options.oneofs) + object._keyId = "keyId"; + } + if (message.exitCode != null && message.hasOwnProperty("exitCode")) { object.exitCode = $root.proto.ExitCode.toObject(message.exitCode, options); - if (message.deviceIndex != null && message.hasOwnProperty("deviceIndex")) + if (options.oneofs) + object._exitCode = "exitCode"; + } + if (message.deviceIndex != null && message.hasOwnProperty("deviceIndex")) { object.deviceIndex = message.deviceIndex; - if (message.clientDebugData != null && message.hasOwnProperty("clientDebugData")) + if (options.oneofs) + object._deviceIndex = "deviceIndex"; + } + if (message.clientDebugData != null && message.hasOwnProperty("clientDebugData")) { object.clientDebugData = options.bytes === String ? $util.base64.encode(message.clientDebugData, 0, message.clientDebugData.length) : options.bytes === Array ? Array.prototype.slice.call(message.clientDebugData) : message.clientDebugData; + if (options.oneofs) + object._clientDebugData = "clientDebugData"; + } return object; }; @@ -92354,6 +142994,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for SyncdPatch + * @function getTypeUrl + * @memberof proto.SyncdPatch + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SyncdPatch.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.SyncdPatch"; + }; + return SyncdPatch; })(); @@ -92407,6 +143062,27 @@ $root.proto = (function() { */ SyncdRecord.prototype.keyId = null; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncdRecord.prototype, "_index", { + get: $util.oneOfGetter($oneOfFields = ["index"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncdRecord.prototype, "_value", { + get: $util.oneOfGetter($oneOfFields = ["value"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncdRecord.prototype, "_keyId", { + get: $util.oneOfGetter($oneOfFields = ["keyId"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new SyncdRecord instance using the specified properties. * @function create @@ -92471,15 +143147,18 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.index = $root.proto.SyncdIndex.decode(reader, reader.uint32()); - break; - case 2: - message.value = $root.proto.SyncdValue.decode(reader, reader.uint32()); - break; - case 3: - message.keyId = $root.proto.KeyId.decode(reader, reader.uint32()); - break; + case 1: { + message.index = $root.proto.SyncdIndex.decode(reader, reader.uint32()); + break; + } + case 2: { + message.value = $root.proto.SyncdValue.decode(reader, reader.uint32()); + break; + } + case 3: { + message.keyId = $root.proto.KeyId.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -92515,20 +143194,30 @@ $root.proto = (function() { SyncdRecord.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; if (message.index != null && message.hasOwnProperty("index")) { - var error = $root.proto.SyncdIndex.verify(message.index); - if (error) - return "index." + error; + properties._index = 1; + { + var error = $root.proto.SyncdIndex.verify(message.index); + if (error) + return "index." + error; + } } if (message.value != null && message.hasOwnProperty("value")) { - var error = $root.proto.SyncdValue.verify(message.value); - if (error) - return "value." + error; + properties._value = 1; + { + var error = $root.proto.SyncdValue.verify(message.value); + if (error) + return "value." + error; + } } if (message.keyId != null && message.hasOwnProperty("keyId")) { - var error = $root.proto.KeyId.verify(message.keyId); - if (error) - return "keyId." + error; + properties._keyId = 1; + { + var error = $root.proto.KeyId.verify(message.keyId); + if (error) + return "keyId." + error; + } } return null; }; @@ -92576,17 +143265,21 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.index = null; - object.value = null; - object.keyId = null; - } - if (message.index != null && message.hasOwnProperty("index")) + if (message.index != null && message.hasOwnProperty("index")) { object.index = $root.proto.SyncdIndex.toObject(message.index, options); - if (message.value != null && message.hasOwnProperty("value")) + if (options.oneofs) + object._index = "index"; + } + if (message.value != null && message.hasOwnProperty("value")) { object.value = $root.proto.SyncdValue.toObject(message.value, options); - if (message.keyId != null && message.hasOwnProperty("keyId")) + if (options.oneofs) + object._value = "value"; + } + if (message.keyId != null && message.hasOwnProperty("keyId")) { object.keyId = $root.proto.KeyId.toObject(message.keyId, options); + if (options.oneofs) + object._keyId = "keyId"; + } return object; }; @@ -92601,6 +143294,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for SyncdRecord + * @function getTypeUrl + * @memberof proto.SyncdRecord + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SyncdRecord.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.SyncdRecord"; + }; + return SyncdRecord; })(); @@ -92650,11 +143358,11 @@ $root.proto = (function() { /** * SyncdSnapshot mac. - * @member {Uint8Array} mac + * @member {Uint8Array|null|undefined} mac * @memberof proto.SyncdSnapshot * @instance */ - SyncdSnapshot.prototype.mac = $util.newBuffer([]); + SyncdSnapshot.prototype.mac = null; /** * SyncdSnapshot keyId. @@ -92664,6 +143372,27 @@ $root.proto = (function() { */ SyncdSnapshot.prototype.keyId = null; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncdSnapshot.prototype, "_version", { + get: $util.oneOfGetter($oneOfFields = ["version"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncdSnapshot.prototype, "_mac", { + get: $util.oneOfGetter($oneOfFields = ["mac"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncdSnapshot.prototype, "_keyId", { + get: $util.oneOfGetter($oneOfFields = ["keyId"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new SyncdSnapshot instance using the specified properties. * @function create @@ -92731,20 +143460,24 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.version = $root.proto.SyncdVersion.decode(reader, reader.uint32()); - break; - case 2: - if (!(message.records && message.records.length)) - message.records = []; - message.records.push($root.proto.SyncdRecord.decode(reader, reader.uint32())); - break; - case 3: - message.mac = reader.bytes(); - break; - case 4: - message.keyId = $root.proto.KeyId.decode(reader, reader.uint32()); - break; + case 1: { + message.version = $root.proto.SyncdVersion.decode(reader, reader.uint32()); + break; + } + case 2: { + if (!(message.records && message.records.length)) + message.records = []; + message.records.push($root.proto.SyncdRecord.decode(reader, reader.uint32())); + break; + } + case 3: { + message.mac = reader.bytes(); + break; + } + case 4: { + message.keyId = $root.proto.KeyId.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -92780,10 +143513,14 @@ $root.proto = (function() { SyncdSnapshot.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; if (message.version != null && message.hasOwnProperty("version")) { - var error = $root.proto.SyncdVersion.verify(message.version); - if (error) - return "version." + error; + properties._version = 1; + { + var error = $root.proto.SyncdVersion.verify(message.version); + if (error) + return "version." + error; + } } if (message.records != null && message.hasOwnProperty("records")) { if (!Array.isArray(message.records)) @@ -92794,13 +143531,18 @@ $root.proto = (function() { return "records." + error; } } - if (message.mac != null && message.hasOwnProperty("mac")) + if (message.mac != null && message.hasOwnProperty("mac")) { + properties._mac = 1; if (!(message.mac && typeof message.mac.length === "number" || $util.isString(message.mac))) return "mac: buffer expected"; + } if (message.keyId != null && message.hasOwnProperty("keyId")) { - var error = $root.proto.KeyId.verify(message.keyId); - if (error) - return "keyId." + error; + properties._keyId = 1; + { + var error = $root.proto.KeyId.verify(message.keyId); + if (error) + return "keyId." + error; + } } return null; }; @@ -92835,7 +143577,7 @@ $root.proto = (function() { if (object.mac != null) if (typeof object.mac === "string") $util.base64.decode(object.mac, message.mac = $util.newBuffer($util.base64.length(object.mac)), 0); - else if (object.mac.length) + else if (object.mac.length >= 0) message.mac = object.mac; if (object.keyId != null) { if (typeof object.keyId !== "object") @@ -92860,28 +143602,26 @@ $root.proto = (function() { var object = {}; if (options.arrays || options.defaults) object.records = []; - if (options.defaults) { - object.version = null; - if (options.bytes === String) - object.mac = ""; - else { - object.mac = []; - if (options.bytes !== Array) - object.mac = $util.newBuffer(object.mac); - } - object.keyId = null; - } - if (message.version != null && message.hasOwnProperty("version")) + if (message.version != null && message.hasOwnProperty("version")) { object.version = $root.proto.SyncdVersion.toObject(message.version, options); + if (options.oneofs) + object._version = "version"; + } if (message.records && message.records.length) { object.records = []; for (var j = 0; j < message.records.length; ++j) object.records[j] = $root.proto.SyncdRecord.toObject(message.records[j], options); } - if (message.mac != null && message.hasOwnProperty("mac")) + if (message.mac != null && message.hasOwnProperty("mac")) { object.mac = options.bytes === String ? $util.base64.encode(message.mac, 0, message.mac.length) : options.bytes === Array ? Array.prototype.slice.call(message.mac) : message.mac; - if (message.keyId != null && message.hasOwnProperty("keyId")) + if (options.oneofs) + object._mac = "mac"; + } + if (message.keyId != null && message.hasOwnProperty("keyId")) { object.keyId = $root.proto.KeyId.toObject(message.keyId, options); + if (options.oneofs) + object._keyId = "keyId"; + } return object; }; @@ -92896,6 +143636,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for SyncdSnapshot + * @function getTypeUrl + * @memberof proto.SyncdSnapshot + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SyncdSnapshot.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.SyncdSnapshot"; + }; + return SyncdSnapshot; })(); @@ -92925,11 +143680,20 @@ $root.proto = (function() { /** * SyncdValue blob. - * @member {Uint8Array} blob + * @member {Uint8Array|null|undefined} blob * @memberof proto.SyncdValue * @instance */ - SyncdValue.prototype.blob = $util.newBuffer([]); + SyncdValue.prototype.blob = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncdValue.prototype, "_blob", { + get: $util.oneOfGetter($oneOfFields = ["blob"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new SyncdValue instance using the specified properties. @@ -92991,9 +143755,10 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.blob = reader.bytes(); - break; + case 1: { + message.blob = reader.bytes(); + break; + } default: reader.skipType(tag & 7); break; @@ -93029,9 +143794,12 @@ $root.proto = (function() { SyncdValue.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.blob != null && message.hasOwnProperty("blob")) + var properties = {}; + if (message.blob != null && message.hasOwnProperty("blob")) { + properties._blob = 1; if (!(message.blob && typeof message.blob.length === "number" || $util.isString(message.blob))) return "blob: buffer expected"; + } return null; }; @@ -93050,7 +143818,7 @@ $root.proto = (function() { if (object.blob != null) if (typeof object.blob === "string") $util.base64.decode(object.blob, message.blob = $util.newBuffer($util.base64.length(object.blob)), 0); - else if (object.blob.length) + else if (object.blob.length >= 0) message.blob = object.blob; return message; }; @@ -93068,16 +143836,11 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) - if (options.bytes === String) - object.blob = ""; - else { - object.blob = []; - if (options.bytes !== Array) - object.blob = $util.newBuffer(object.blob); - } - if (message.blob != null && message.hasOwnProperty("blob")) + if (message.blob != null && message.hasOwnProperty("blob")) { object.blob = options.bytes === String ? $util.base64.encode(message.blob, 0, message.blob.length) : options.bytes === Array ? Array.prototype.slice.call(message.blob) : message.blob; + if (options.oneofs) + object._blob = "blob"; + } return object; }; @@ -93092,6 +143855,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for SyncdValue + * @function getTypeUrl + * @memberof proto.SyncdValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SyncdValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.SyncdValue"; + }; + return SyncdValue; })(); @@ -93121,11 +143899,20 @@ $root.proto = (function() { /** * SyncdVersion version. - * @member {number|Long} version + * @member {number|Long|null|undefined} version * @memberof proto.SyncdVersion * @instance */ - SyncdVersion.prototype.version = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + SyncdVersion.prototype.version = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncdVersion.prototype, "_version", { + get: $util.oneOfGetter($oneOfFields = ["version"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new SyncdVersion instance using the specified properties. @@ -93187,9 +143974,10 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.version = reader.uint64(); - break; + case 1: { + message.version = reader.uint64(); + break; + } default: reader.skipType(tag & 7); break; @@ -93225,9 +144013,12 @@ $root.proto = (function() { SyncdVersion.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.version != null && message.hasOwnProperty("version")) + var properties = {}; + if (message.version != null && message.hasOwnProperty("version")) { + properties._version = 1; if (!$util.isInteger(message.version) && !(message.version && $util.isInteger(message.version.low) && $util.isInteger(message.version.high))) return "version: integer|Long expected"; + } return null; }; @@ -93268,17 +144059,14 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.version = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.version = options.longs === String ? "0" : 0; - if (message.version != null && message.hasOwnProperty("version")) + if (message.version != null && message.hasOwnProperty("version")) { if (typeof message.version === "number") object.version = options.longs === String ? String(message.version) : message.version; else object.version = options.longs === String ? $util.Long.prototype.toString.call(message.version) : options.longs === Number ? new $util.LongBits(message.version.low >>> 0, message.version.high >>> 0).toNumber(true) : message.version; + if (options.oneofs) + object._version = "version"; + } return object; }; @@ -93293,9 +144081,273 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for SyncdVersion + * @function getTypeUrl + * @memberof proto.SyncdVersion + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SyncdVersion.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.SyncdVersion"; + }; + return SyncdVersion; })(); + proto.TapLinkAction = (function() { + + /** + * Properties of a TapLinkAction. + * @memberof proto + * @interface ITapLinkAction + * @property {string|null} [title] TapLinkAction title + * @property {string|null} [tapUrl] TapLinkAction tapUrl + */ + + /** + * Constructs a new TapLinkAction. + * @memberof proto + * @classdesc Represents a TapLinkAction. + * @implements ITapLinkAction + * @constructor + * @param {proto.ITapLinkAction=} [properties] Properties to set + */ + function TapLinkAction(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TapLinkAction title. + * @member {string|null|undefined} title + * @memberof proto.TapLinkAction + * @instance + */ + TapLinkAction.prototype.title = null; + + /** + * TapLinkAction tapUrl. + * @member {string|null|undefined} tapUrl + * @memberof proto.TapLinkAction + * @instance + */ + TapLinkAction.prototype.tapUrl = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(TapLinkAction.prototype, "_title", { + get: $util.oneOfGetter($oneOfFields = ["title"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(TapLinkAction.prototype, "_tapUrl", { + get: $util.oneOfGetter($oneOfFields = ["tapUrl"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new TapLinkAction instance using the specified properties. + * @function create + * @memberof proto.TapLinkAction + * @static + * @param {proto.ITapLinkAction=} [properties] Properties to set + * @returns {proto.TapLinkAction} TapLinkAction instance + */ + TapLinkAction.create = function create(properties) { + return new TapLinkAction(properties); + }; + + /** + * Encodes the specified TapLinkAction message. Does not implicitly {@link proto.TapLinkAction.verify|verify} messages. + * @function encode + * @memberof proto.TapLinkAction + * @static + * @param {proto.ITapLinkAction} message TapLinkAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TapLinkAction.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.tapUrl != null && Object.hasOwnProperty.call(message, "tapUrl")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.tapUrl); + return writer; + }; + + /** + * Encodes the specified TapLinkAction message, length delimited. Does not implicitly {@link proto.TapLinkAction.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.TapLinkAction + * @static + * @param {proto.ITapLinkAction} message TapLinkAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TapLinkAction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TapLinkAction message from the specified reader or buffer. + * @function decode + * @memberof proto.TapLinkAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.TapLinkAction} TapLinkAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TapLinkAction.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.TapLinkAction(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.title = reader.string(); + break; + } + case 2: { + message.tapUrl = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TapLinkAction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.TapLinkAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.TapLinkAction} TapLinkAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TapLinkAction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TapLinkAction message. + * @function verify + * @memberof proto.TapLinkAction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TapLinkAction.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.title != null && message.hasOwnProperty("title")) { + properties._title = 1; + if (!$util.isString(message.title)) + return "title: string expected"; + } + if (message.tapUrl != null && message.hasOwnProperty("tapUrl")) { + properties._tapUrl = 1; + if (!$util.isString(message.tapUrl)) + return "tapUrl: string expected"; + } + return null; + }; + + /** + * Creates a TapLinkAction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.TapLinkAction + * @static + * @param {Object.} object Plain object + * @returns {proto.TapLinkAction} TapLinkAction + */ + TapLinkAction.fromObject = function fromObject(object) { + if (object instanceof $root.proto.TapLinkAction) + return object; + var message = new $root.proto.TapLinkAction(); + if (object.title != null) + message.title = String(object.title); + if (object.tapUrl != null) + message.tapUrl = String(object.tapUrl); + return message; + }; + + /** + * Creates a plain object from a TapLinkAction message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.TapLinkAction + * @static + * @param {proto.TapLinkAction} message TapLinkAction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TapLinkAction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.title != null && message.hasOwnProperty("title")) { + object.title = message.title; + if (options.oneofs) + object._title = "title"; + } + if (message.tapUrl != null && message.hasOwnProperty("tapUrl")) { + object.tapUrl = message.tapUrl; + if (options.oneofs) + object._tapUrl = "tapUrl"; + } + return object; + }; + + /** + * Converts this TapLinkAction to JSON. + * @function toJSON + * @memberof proto.TapLinkAction + * @instance + * @returns {Object.} JSON object + */ + TapLinkAction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TapLinkAction + * @function getTypeUrl + * @memberof proto.TapLinkAction + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TapLinkAction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.TapLinkAction"; + }; + + return TapLinkAction; + })(); + proto.TemplateButton = (function() { /** @@ -93325,11 +144377,11 @@ $root.proto = (function() { /** * TemplateButton index. - * @member {number} index + * @member {number|null|undefined} index * @memberof proto.TemplateButton * @instance */ - TemplateButton.prototype.index = 0; + TemplateButton.prototype.index = null; /** * TemplateButton quickReplyButton. @@ -93358,6 +144410,12 @@ $root.proto = (function() { // OneOf field names bound to virtual getters and setters var $oneOfFields; + // Virtual OneOf for proto3 optional field + Object.defineProperty(TemplateButton.prototype, "_index", { + get: $util.oneOfGetter($oneOfFields = ["index"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * TemplateButton button. * @member {"quickReplyButton"|"urlButton"|"callButton"|undefined} button @@ -93435,18 +144493,22 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 4: - message.index = reader.uint32(); - break; - case 1: - message.quickReplyButton = $root.proto.TemplateButton.QuickReplyButton.decode(reader, reader.uint32()); - break; - case 2: - message.urlButton = $root.proto.TemplateButton.URLButton.decode(reader, reader.uint32()); - break; - case 3: - message.callButton = $root.proto.TemplateButton.CallButton.decode(reader, reader.uint32()); - break; + case 4: { + message.index = reader.uint32(); + break; + } + case 1: { + message.quickReplyButton = $root.proto.TemplateButton.QuickReplyButton.decode(reader, reader.uint32()); + break; + } + case 2: { + message.urlButton = $root.proto.TemplateButton.URLButton.decode(reader, reader.uint32()); + break; + } + case 3: { + message.callButton = $root.proto.TemplateButton.CallButton.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -93483,9 +144545,11 @@ $root.proto = (function() { if (typeof message !== "object" || message === null) return "object expected"; var properties = {}; - if (message.index != null && message.hasOwnProperty("index")) + if (message.index != null && message.hasOwnProperty("index")) { + properties._index = 1; if (!$util.isInteger(message.index)) return "index: integer expected"; + } if (message.quickReplyButton != null && message.hasOwnProperty("quickReplyButton")) { properties.button = 1; { @@ -93562,8 +144626,6 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) - object.index = 0; if (message.quickReplyButton != null && message.hasOwnProperty("quickReplyButton")) { object.quickReplyButton = $root.proto.TemplateButton.QuickReplyButton.toObject(message.quickReplyButton, options); if (options.oneofs) @@ -93579,8 +144641,11 @@ $root.proto = (function() { if (options.oneofs) object.button = "callButton"; } - if (message.index != null && message.hasOwnProperty("index")) + if (message.index != null && message.hasOwnProperty("index")) { object.index = message.index; + if (options.oneofs) + object._index = "index"; + } return object; }; @@ -93595,6 +144660,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for TemplateButton + * @function getTypeUrl + * @memberof proto.TemplateButton + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TemplateButton.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.TemplateButton"; + }; + TemplateButton.CallButton = (function() { /** @@ -93636,6 +144716,21 @@ $root.proto = (function() { */ CallButton.prototype.phoneNumber = null; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CallButton.prototype, "_displayText", { + get: $util.oneOfGetter($oneOfFields = ["displayText"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CallButton.prototype, "_phoneNumber", { + get: $util.oneOfGetter($oneOfFields = ["phoneNumber"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new CallButton instance using the specified properties. * @function create @@ -93698,12 +144793,14 @@ $root.proto = (function() { 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; + 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; @@ -93739,15 +144836,22 @@ $root.proto = (function() { CallButton.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; if (message.displayText != null && message.hasOwnProperty("displayText")) { - var error = $root.proto.Message.HighlyStructuredMessage.verify(message.displayText); - if (error) - return "displayText." + error; + properties._displayText = 1; + { + 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; + properties._phoneNumber = 1; + { + var error = $root.proto.Message.HighlyStructuredMessage.verify(message.phoneNumber); + if (error) + return "phoneNumber." + error; + } } return null; }; @@ -93790,14 +144894,16 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.displayText = null; - object.phoneNumber = null; - } - if (message.displayText != null && message.hasOwnProperty("displayText")) + if (message.displayText != null && message.hasOwnProperty("displayText")) { object.displayText = $root.proto.Message.HighlyStructuredMessage.toObject(message.displayText, options); - if (message.phoneNumber != null && message.hasOwnProperty("phoneNumber")) + if (options.oneofs) + object._displayText = "displayText"; + } + if (message.phoneNumber != null && message.hasOwnProperty("phoneNumber")) { object.phoneNumber = $root.proto.Message.HighlyStructuredMessage.toObject(message.phoneNumber, options); + if (options.oneofs) + object._phoneNumber = "phoneNumber"; + } return object; }; @@ -93812,6 +144918,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CallButton + * @function getTypeUrl + * @memberof proto.TemplateButton.CallButton + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CallButton.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.TemplateButton.CallButton"; + }; + return CallButton; })(); @@ -93850,11 +144971,26 @@ $root.proto = (function() { /** * QuickReplyButton id. - * @member {string} id + * @member {string|null|undefined} id * @memberof proto.TemplateButton.QuickReplyButton * @instance */ - QuickReplyButton.prototype.id = ""; + QuickReplyButton.prototype.id = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(QuickReplyButton.prototype, "_displayText", { + get: $util.oneOfGetter($oneOfFields = ["displayText"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(QuickReplyButton.prototype, "_id", { + get: $util.oneOfGetter($oneOfFields = ["id"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new QuickReplyButton instance using the specified properties. @@ -93918,12 +145054,14 @@ $root.proto = (function() { 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; + 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; @@ -93959,14 +145097,20 @@ $root.proto = (function() { QuickReplyButton.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; if (message.displayText != null && message.hasOwnProperty("displayText")) { - var error = $root.proto.Message.HighlyStructuredMessage.verify(message.displayText); - if (error) - return "displayText." + error; + properties._displayText = 1; + { + var error = $root.proto.Message.HighlyStructuredMessage.verify(message.displayText); + if (error) + return "displayText." + error; + } } - if (message.id != null && message.hasOwnProperty("id")) + if (message.id != null && message.hasOwnProperty("id")) { + properties._id = 1; if (!$util.isString(message.id)) return "id: string expected"; + } return null; }; @@ -94005,14 +145149,16 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.displayText = null; - object.id = ""; - } - if (message.displayText != null && message.hasOwnProperty("displayText")) + if (message.displayText != null && message.hasOwnProperty("displayText")) { object.displayText = $root.proto.Message.HighlyStructuredMessage.toObject(message.displayText, options); - if (message.id != null && message.hasOwnProperty("id")) + if (options.oneofs) + object._displayText = "displayText"; + } + if (message.id != null && message.hasOwnProperty("id")) { object.id = message.id; + if (options.oneofs) + object._id = "id"; + } return object; }; @@ -94027,6 +145173,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for QuickReplyButton + * @function getTypeUrl + * @memberof proto.TemplateButton.QuickReplyButton + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QuickReplyButton.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.TemplateButton.QuickReplyButton"; + }; + return QuickReplyButton; })(); @@ -94071,6 +145232,21 @@ $root.proto = (function() { */ URLButton.prototype.url = null; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(URLButton.prototype, "_displayText", { + get: $util.oneOfGetter($oneOfFields = ["displayText"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(URLButton.prototype, "_url", { + get: $util.oneOfGetter($oneOfFields = ["url"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new URLButton instance using the specified properties. * @function create @@ -94133,12 +145309,14 @@ $root.proto = (function() { 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; + 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; @@ -94174,15 +145352,22 @@ $root.proto = (function() { URLButton.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; if (message.displayText != null && message.hasOwnProperty("displayText")) { - var error = $root.proto.Message.HighlyStructuredMessage.verify(message.displayText); - if (error) - return "displayText." + error; + properties._displayText = 1; + { + 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; + properties._url = 1; + { + var error = $root.proto.Message.HighlyStructuredMessage.verify(message.url); + if (error) + return "url." + error; + } } return null; }; @@ -94225,14 +145410,16 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.displayText = null; - object.url = null; - } - if (message.displayText != null && message.hasOwnProperty("displayText")) + if (message.displayText != null && message.hasOwnProperty("displayText")) { object.displayText = $root.proto.Message.HighlyStructuredMessage.toObject(message.displayText, options); - if (message.url != null && message.hasOwnProperty("url")) + if (options.oneofs) + object._displayText = "displayText"; + } + if (message.url != null && message.hasOwnProperty("url")) { object.url = $root.proto.Message.HighlyStructuredMessage.toObject(message.url, options); + if (options.oneofs) + object._url = "url"; + } return object; }; @@ -94247,12 +145434,1477 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for URLButton + * @function getTypeUrl + * @memberof proto.TemplateButton.URLButton + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + URLButton.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.TemplateButton.URLButton"; + }; + return URLButton; })(); return TemplateButton; })(); + proto.UrlTrackingMap = (function() { + + /** + * Properties of an UrlTrackingMap. + * @memberof proto + * @interface IUrlTrackingMap + * @property {Array.|null} [urlTrackingMapElements] UrlTrackingMap urlTrackingMapElements + */ + + /** + * Constructs a new UrlTrackingMap. + * @memberof proto + * @classdesc Represents an UrlTrackingMap. + * @implements IUrlTrackingMap + * @constructor + * @param {proto.IUrlTrackingMap=} [properties] Properties to set + */ + function UrlTrackingMap(properties) { + this.urlTrackingMapElements = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UrlTrackingMap urlTrackingMapElements. + * @member {Array.} urlTrackingMapElements + * @memberof proto.UrlTrackingMap + * @instance + */ + UrlTrackingMap.prototype.urlTrackingMapElements = $util.emptyArray; + + /** + * Creates a new UrlTrackingMap instance using the specified properties. + * @function create + * @memberof proto.UrlTrackingMap + * @static + * @param {proto.IUrlTrackingMap=} [properties] Properties to set + * @returns {proto.UrlTrackingMap} UrlTrackingMap instance + */ + UrlTrackingMap.create = function create(properties) { + return new UrlTrackingMap(properties); + }; + + /** + * Encodes the specified UrlTrackingMap message. Does not implicitly {@link proto.UrlTrackingMap.verify|verify} messages. + * @function encode + * @memberof proto.UrlTrackingMap + * @static + * @param {proto.IUrlTrackingMap} message UrlTrackingMap message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UrlTrackingMap.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.urlTrackingMapElements != null && message.urlTrackingMapElements.length) + for (var i = 0; i < message.urlTrackingMapElements.length; ++i) + $root.proto.UrlTrackingMap.UrlTrackingMapElement.encode(message.urlTrackingMapElements[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UrlTrackingMap message, length delimited. Does not implicitly {@link proto.UrlTrackingMap.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.UrlTrackingMap + * @static + * @param {proto.IUrlTrackingMap} message UrlTrackingMap message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UrlTrackingMap.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UrlTrackingMap message from the specified reader or buffer. + * @function decode + * @memberof proto.UrlTrackingMap + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.UrlTrackingMap} UrlTrackingMap + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UrlTrackingMap.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.UrlTrackingMap(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.urlTrackingMapElements && message.urlTrackingMapElements.length)) + message.urlTrackingMapElements = []; + message.urlTrackingMapElements.push($root.proto.UrlTrackingMap.UrlTrackingMapElement.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UrlTrackingMap message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.UrlTrackingMap + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.UrlTrackingMap} UrlTrackingMap + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UrlTrackingMap.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UrlTrackingMap message. + * @function verify + * @memberof proto.UrlTrackingMap + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UrlTrackingMap.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.urlTrackingMapElements != null && message.hasOwnProperty("urlTrackingMapElements")) { + if (!Array.isArray(message.urlTrackingMapElements)) + return "urlTrackingMapElements: array expected"; + for (var i = 0; i < message.urlTrackingMapElements.length; ++i) { + var error = $root.proto.UrlTrackingMap.UrlTrackingMapElement.verify(message.urlTrackingMapElements[i]); + if (error) + return "urlTrackingMapElements." + error; + } + } + return null; + }; + + /** + * Creates an UrlTrackingMap message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.UrlTrackingMap + * @static + * @param {Object.} object Plain object + * @returns {proto.UrlTrackingMap} UrlTrackingMap + */ + UrlTrackingMap.fromObject = function fromObject(object) { + if (object instanceof $root.proto.UrlTrackingMap) + return object; + var message = new $root.proto.UrlTrackingMap(); + if (object.urlTrackingMapElements) { + if (!Array.isArray(object.urlTrackingMapElements)) + throw TypeError(".proto.UrlTrackingMap.urlTrackingMapElements: array expected"); + message.urlTrackingMapElements = []; + for (var i = 0; i < object.urlTrackingMapElements.length; ++i) { + if (typeof object.urlTrackingMapElements[i] !== "object") + throw TypeError(".proto.UrlTrackingMap.urlTrackingMapElements: object expected"); + message.urlTrackingMapElements[i] = $root.proto.UrlTrackingMap.UrlTrackingMapElement.fromObject(object.urlTrackingMapElements[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an UrlTrackingMap message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.UrlTrackingMap + * @static + * @param {proto.UrlTrackingMap} message UrlTrackingMap + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UrlTrackingMap.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.urlTrackingMapElements = []; + if (message.urlTrackingMapElements && message.urlTrackingMapElements.length) { + object.urlTrackingMapElements = []; + for (var j = 0; j < message.urlTrackingMapElements.length; ++j) + object.urlTrackingMapElements[j] = $root.proto.UrlTrackingMap.UrlTrackingMapElement.toObject(message.urlTrackingMapElements[j], options); + } + return object; + }; + + /** + * Converts this UrlTrackingMap to JSON. + * @function toJSON + * @memberof proto.UrlTrackingMap + * @instance + * @returns {Object.} JSON object + */ + UrlTrackingMap.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UrlTrackingMap + * @function getTypeUrl + * @memberof proto.UrlTrackingMap + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UrlTrackingMap.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.UrlTrackingMap"; + }; + + UrlTrackingMap.UrlTrackingMapElement = (function() { + + /** + * Properties of an UrlTrackingMapElement. + * @memberof proto.UrlTrackingMap + * @interface IUrlTrackingMapElement + * @property {string|null} [originalUrl] UrlTrackingMapElement originalUrl + * @property {string|null} [unconsentedUsersUrl] UrlTrackingMapElement unconsentedUsersUrl + * @property {string|null} [consentedUsersUrl] UrlTrackingMapElement consentedUsersUrl + * @property {number|null} [cardIndex] UrlTrackingMapElement cardIndex + */ + + /** + * Constructs a new UrlTrackingMapElement. + * @memberof proto.UrlTrackingMap + * @classdesc Represents an UrlTrackingMapElement. + * @implements IUrlTrackingMapElement + * @constructor + * @param {proto.UrlTrackingMap.IUrlTrackingMapElement=} [properties] Properties to set + */ + function UrlTrackingMapElement(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UrlTrackingMapElement originalUrl. + * @member {string|null|undefined} originalUrl + * @memberof proto.UrlTrackingMap.UrlTrackingMapElement + * @instance + */ + UrlTrackingMapElement.prototype.originalUrl = null; + + /** + * UrlTrackingMapElement unconsentedUsersUrl. + * @member {string|null|undefined} unconsentedUsersUrl + * @memberof proto.UrlTrackingMap.UrlTrackingMapElement + * @instance + */ + UrlTrackingMapElement.prototype.unconsentedUsersUrl = null; + + /** + * UrlTrackingMapElement consentedUsersUrl. + * @member {string|null|undefined} consentedUsersUrl + * @memberof proto.UrlTrackingMap.UrlTrackingMapElement + * @instance + */ + UrlTrackingMapElement.prototype.consentedUsersUrl = null; + + /** + * UrlTrackingMapElement cardIndex. + * @member {number|null|undefined} cardIndex + * @memberof proto.UrlTrackingMap.UrlTrackingMapElement + * @instance + */ + UrlTrackingMapElement.prototype.cardIndex = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(UrlTrackingMapElement.prototype, "_originalUrl", { + get: $util.oneOfGetter($oneOfFields = ["originalUrl"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(UrlTrackingMapElement.prototype, "_unconsentedUsersUrl", { + get: $util.oneOfGetter($oneOfFields = ["unconsentedUsersUrl"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(UrlTrackingMapElement.prototype, "_consentedUsersUrl", { + get: $util.oneOfGetter($oneOfFields = ["consentedUsersUrl"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(UrlTrackingMapElement.prototype, "_cardIndex", { + get: $util.oneOfGetter($oneOfFields = ["cardIndex"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new UrlTrackingMapElement instance using the specified properties. + * @function create + * @memberof proto.UrlTrackingMap.UrlTrackingMapElement + * @static + * @param {proto.UrlTrackingMap.IUrlTrackingMapElement=} [properties] Properties to set + * @returns {proto.UrlTrackingMap.UrlTrackingMapElement} UrlTrackingMapElement instance + */ + UrlTrackingMapElement.create = function create(properties) { + return new UrlTrackingMapElement(properties); + }; + + /** + * Encodes the specified UrlTrackingMapElement message. Does not implicitly {@link proto.UrlTrackingMap.UrlTrackingMapElement.verify|verify} messages. + * @function encode + * @memberof proto.UrlTrackingMap.UrlTrackingMapElement + * @static + * @param {proto.UrlTrackingMap.IUrlTrackingMapElement} message UrlTrackingMapElement message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UrlTrackingMapElement.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.originalUrl != null && Object.hasOwnProperty.call(message, "originalUrl")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.originalUrl); + if (message.unconsentedUsersUrl != null && Object.hasOwnProperty.call(message, "unconsentedUsersUrl")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.unconsentedUsersUrl); + if (message.consentedUsersUrl != null && Object.hasOwnProperty.call(message, "consentedUsersUrl")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.consentedUsersUrl); + if (message.cardIndex != null && Object.hasOwnProperty.call(message, "cardIndex")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.cardIndex); + return writer; + }; + + /** + * Encodes the specified UrlTrackingMapElement message, length delimited. Does not implicitly {@link proto.UrlTrackingMap.UrlTrackingMapElement.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.UrlTrackingMap.UrlTrackingMapElement + * @static + * @param {proto.UrlTrackingMap.IUrlTrackingMapElement} message UrlTrackingMapElement message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UrlTrackingMapElement.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UrlTrackingMapElement message from the specified reader or buffer. + * @function decode + * @memberof proto.UrlTrackingMap.UrlTrackingMapElement + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.UrlTrackingMap.UrlTrackingMapElement} UrlTrackingMapElement + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UrlTrackingMapElement.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.UrlTrackingMap.UrlTrackingMapElement(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.originalUrl = reader.string(); + break; + } + case 2: { + message.unconsentedUsersUrl = reader.string(); + break; + } + case 3: { + message.consentedUsersUrl = reader.string(); + break; + } + case 4: { + message.cardIndex = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UrlTrackingMapElement message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.UrlTrackingMap.UrlTrackingMapElement + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.UrlTrackingMap.UrlTrackingMapElement} UrlTrackingMapElement + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UrlTrackingMapElement.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UrlTrackingMapElement message. + * @function verify + * @memberof proto.UrlTrackingMap.UrlTrackingMapElement + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UrlTrackingMapElement.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.originalUrl != null && message.hasOwnProperty("originalUrl")) { + properties._originalUrl = 1; + if (!$util.isString(message.originalUrl)) + return "originalUrl: string expected"; + } + if (message.unconsentedUsersUrl != null && message.hasOwnProperty("unconsentedUsersUrl")) { + properties._unconsentedUsersUrl = 1; + if (!$util.isString(message.unconsentedUsersUrl)) + return "unconsentedUsersUrl: string expected"; + } + if (message.consentedUsersUrl != null && message.hasOwnProperty("consentedUsersUrl")) { + properties._consentedUsersUrl = 1; + if (!$util.isString(message.consentedUsersUrl)) + return "consentedUsersUrl: string expected"; + } + if (message.cardIndex != null && message.hasOwnProperty("cardIndex")) { + properties._cardIndex = 1; + if (!$util.isInteger(message.cardIndex)) + return "cardIndex: integer expected"; + } + return null; + }; + + /** + * Creates an UrlTrackingMapElement message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.UrlTrackingMap.UrlTrackingMapElement + * @static + * @param {Object.} object Plain object + * @returns {proto.UrlTrackingMap.UrlTrackingMapElement} UrlTrackingMapElement + */ + UrlTrackingMapElement.fromObject = function fromObject(object) { + if (object instanceof $root.proto.UrlTrackingMap.UrlTrackingMapElement) + return object; + var message = new $root.proto.UrlTrackingMap.UrlTrackingMapElement(); + if (object.originalUrl != null) + message.originalUrl = String(object.originalUrl); + if (object.unconsentedUsersUrl != null) + message.unconsentedUsersUrl = String(object.unconsentedUsersUrl); + if (object.consentedUsersUrl != null) + message.consentedUsersUrl = String(object.consentedUsersUrl); + if (object.cardIndex != null) + message.cardIndex = object.cardIndex >>> 0; + return message; + }; + + /** + * Creates a plain object from an UrlTrackingMapElement message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.UrlTrackingMap.UrlTrackingMapElement + * @static + * @param {proto.UrlTrackingMap.UrlTrackingMapElement} message UrlTrackingMapElement + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UrlTrackingMapElement.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.originalUrl != null && message.hasOwnProperty("originalUrl")) { + object.originalUrl = message.originalUrl; + if (options.oneofs) + object._originalUrl = "originalUrl"; + } + if (message.unconsentedUsersUrl != null && message.hasOwnProperty("unconsentedUsersUrl")) { + object.unconsentedUsersUrl = message.unconsentedUsersUrl; + if (options.oneofs) + object._unconsentedUsersUrl = "unconsentedUsersUrl"; + } + if (message.consentedUsersUrl != null && message.hasOwnProperty("consentedUsersUrl")) { + object.consentedUsersUrl = message.consentedUsersUrl; + if (options.oneofs) + object._consentedUsersUrl = "consentedUsersUrl"; + } + if (message.cardIndex != null && message.hasOwnProperty("cardIndex")) { + object.cardIndex = message.cardIndex; + if (options.oneofs) + object._cardIndex = "cardIndex"; + } + return object; + }; + + /** + * Converts this UrlTrackingMapElement to JSON. + * @function toJSON + * @memberof proto.UrlTrackingMap.UrlTrackingMapElement + * @instance + * @returns {Object.} JSON object + */ + UrlTrackingMapElement.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UrlTrackingMapElement + * @function getTypeUrl + * @memberof proto.UrlTrackingMap.UrlTrackingMapElement + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UrlTrackingMapElement.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.UrlTrackingMap.UrlTrackingMapElement"; + }; + + return UrlTrackingMapElement; + })(); + + return UrlTrackingMap; + })(); + + proto.UserPassword = (function() { + + /** + * Properties of a UserPassword. + * @memberof proto + * @interface IUserPassword + * @property {proto.UserPassword.Encoding|null} [encoding] UserPassword encoding + * @property {proto.UserPassword.Transformer|null} [transformer] UserPassword transformer + * @property {Array.|null} [transformerArg] UserPassword transformerArg + * @property {Uint8Array|null} [transformedData] UserPassword transformedData + */ + + /** + * Constructs a new UserPassword. + * @memberof proto + * @classdesc Represents a UserPassword. + * @implements IUserPassword + * @constructor + * @param {proto.IUserPassword=} [properties] Properties to set + */ + function UserPassword(properties) { + this.transformerArg = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UserPassword encoding. + * @member {proto.UserPassword.Encoding|null|undefined} encoding + * @memberof proto.UserPassword + * @instance + */ + UserPassword.prototype.encoding = null; + + /** + * UserPassword transformer. + * @member {proto.UserPassword.Transformer|null|undefined} transformer + * @memberof proto.UserPassword + * @instance + */ + UserPassword.prototype.transformer = null; + + /** + * UserPassword transformerArg. + * @member {Array.} transformerArg + * @memberof proto.UserPassword + * @instance + */ + UserPassword.prototype.transformerArg = $util.emptyArray; + + /** + * UserPassword transformedData. + * @member {Uint8Array|null|undefined} transformedData + * @memberof proto.UserPassword + * @instance + */ + UserPassword.prototype.transformedData = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(UserPassword.prototype, "_encoding", { + get: $util.oneOfGetter($oneOfFields = ["encoding"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(UserPassword.prototype, "_transformer", { + get: $util.oneOfGetter($oneOfFields = ["transformer"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(UserPassword.prototype, "_transformedData", { + get: $util.oneOfGetter($oneOfFields = ["transformedData"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new UserPassword instance using the specified properties. + * @function create + * @memberof proto.UserPassword + * @static + * @param {proto.IUserPassword=} [properties] Properties to set + * @returns {proto.UserPassword} UserPassword instance + */ + UserPassword.create = function create(properties) { + return new UserPassword(properties); + }; + + /** + * Encodes the specified UserPassword message. Does not implicitly {@link proto.UserPassword.verify|verify} messages. + * @function encode + * @memberof proto.UserPassword + * @static + * @param {proto.IUserPassword} message UserPassword message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserPassword.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.encoding); + if (message.transformer != null && Object.hasOwnProperty.call(message, "transformer")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.transformer); + if (message.transformerArg != null && message.transformerArg.length) + for (var i = 0; i < message.transformerArg.length; ++i) + $root.proto.UserPassword.TransformerArg.encode(message.transformerArg[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.transformedData != null && Object.hasOwnProperty.call(message, "transformedData")) + writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.transformedData); + return writer; + }; + + /** + * Encodes the specified UserPassword message, length delimited. Does not implicitly {@link proto.UserPassword.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.UserPassword + * @static + * @param {proto.IUserPassword} message UserPassword message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserPassword.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UserPassword message from the specified reader or buffer. + * @function decode + * @memberof proto.UserPassword + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.UserPassword} UserPassword + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserPassword.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.UserPassword(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.encoding = reader.int32(); + break; + } + case 2: { + message.transformer = reader.int32(); + break; + } + case 3: { + if (!(message.transformerArg && message.transformerArg.length)) + message.transformerArg = []; + message.transformerArg.push($root.proto.UserPassword.TransformerArg.decode(reader, reader.uint32())); + break; + } + case 4: { + message.transformedData = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a UserPassword message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.UserPassword + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.UserPassword} UserPassword + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserPassword.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UserPassword message. + * @function verify + * @memberof proto.UserPassword + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UserPassword.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.encoding != null && message.hasOwnProperty("encoding")) { + properties._encoding = 1; + switch (message.encoding) { + default: + return "encoding: enum value expected"; + case 0: + case 1: + break; + } + } + if (message.transformer != null && message.hasOwnProperty("transformer")) { + properties._transformer = 1; + switch (message.transformer) { + default: + return "transformer: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.transformerArg != null && message.hasOwnProperty("transformerArg")) { + if (!Array.isArray(message.transformerArg)) + return "transformerArg: array expected"; + for (var i = 0; i < message.transformerArg.length; ++i) { + var error = $root.proto.UserPassword.TransformerArg.verify(message.transformerArg[i]); + if (error) + return "transformerArg." + error; + } + } + if (message.transformedData != null && message.hasOwnProperty("transformedData")) { + properties._transformedData = 1; + if (!(message.transformedData && typeof message.transformedData.length === "number" || $util.isString(message.transformedData))) + return "transformedData: buffer expected"; + } + return null; + }; + + /** + * Creates a UserPassword message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.UserPassword + * @static + * @param {Object.} object Plain object + * @returns {proto.UserPassword} UserPassword + */ + UserPassword.fromObject = function fromObject(object) { + if (object instanceof $root.proto.UserPassword) + return object; + var message = new $root.proto.UserPassword(); + switch (object.encoding) { + default: + if (typeof object.encoding === "number") { + message.encoding = object.encoding; + break; + } + break; + case "UTF8": + case 0: + message.encoding = 0; + break; + case "UTF8_BROKEN": + case 1: + message.encoding = 1; + break; + } + switch (object.transformer) { + default: + if (typeof object.transformer === "number") { + message.transformer = object.transformer; + break; + } + break; + case "NONE": + case 0: + message.transformer = 0; + break; + case "PBKDF2_HMAC_SHA512": + case 1: + message.transformer = 1; + break; + case "PBKDF2_HMAC_SHA384": + case 2: + message.transformer = 2; + break; + } + if (object.transformerArg) { + if (!Array.isArray(object.transformerArg)) + throw TypeError(".proto.UserPassword.transformerArg: array expected"); + message.transformerArg = []; + for (var i = 0; i < object.transformerArg.length; ++i) { + if (typeof object.transformerArg[i] !== "object") + throw TypeError(".proto.UserPassword.transformerArg: object expected"); + message.transformerArg[i] = $root.proto.UserPassword.TransformerArg.fromObject(object.transformerArg[i]); + } + } + if (object.transformedData != null) + if (typeof object.transformedData === "string") + $util.base64.decode(object.transformedData, message.transformedData = $util.newBuffer($util.base64.length(object.transformedData)), 0); + else if (object.transformedData.length >= 0) + message.transformedData = object.transformedData; + return message; + }; + + /** + * Creates a plain object from a UserPassword message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.UserPassword + * @static + * @param {proto.UserPassword} message UserPassword + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UserPassword.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.transformerArg = []; + if (message.encoding != null && message.hasOwnProperty("encoding")) { + object.encoding = options.enums === String ? $root.proto.UserPassword.Encoding[message.encoding] === undefined ? message.encoding : $root.proto.UserPassword.Encoding[message.encoding] : message.encoding; + if (options.oneofs) + object._encoding = "encoding"; + } + if (message.transformer != null && message.hasOwnProperty("transformer")) { + object.transformer = options.enums === String ? $root.proto.UserPassword.Transformer[message.transformer] === undefined ? message.transformer : $root.proto.UserPassword.Transformer[message.transformer] : message.transformer; + if (options.oneofs) + object._transformer = "transformer"; + } + if (message.transformerArg && message.transformerArg.length) { + object.transformerArg = []; + for (var j = 0; j < message.transformerArg.length; ++j) + object.transformerArg[j] = $root.proto.UserPassword.TransformerArg.toObject(message.transformerArg[j], options); + } + if (message.transformedData != null && message.hasOwnProperty("transformedData")) { + object.transformedData = options.bytes === String ? $util.base64.encode(message.transformedData, 0, message.transformedData.length) : options.bytes === Array ? Array.prototype.slice.call(message.transformedData) : message.transformedData; + if (options.oneofs) + object._transformedData = "transformedData"; + } + return object; + }; + + /** + * Converts this UserPassword to JSON. + * @function toJSON + * @memberof proto.UserPassword + * @instance + * @returns {Object.} JSON object + */ + UserPassword.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UserPassword + * @function getTypeUrl + * @memberof proto.UserPassword + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UserPassword.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.UserPassword"; + }; + + /** + * Encoding enum. + * @name proto.UserPassword.Encoding + * @enum {number} + * @property {number} UTF8=0 UTF8 value + * @property {number} UTF8_BROKEN=1 UTF8_BROKEN value + */ + UserPassword.Encoding = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UTF8"] = 0; + values[valuesById[1] = "UTF8_BROKEN"] = 1; + return values; + })(); + + /** + * Transformer enum. + * @name proto.UserPassword.Transformer + * @enum {number} + * @property {number} NONE=0 NONE value + * @property {number} PBKDF2_HMAC_SHA512=1 PBKDF2_HMAC_SHA512 value + * @property {number} PBKDF2_HMAC_SHA384=2 PBKDF2_HMAC_SHA384 value + */ + UserPassword.Transformer = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NONE"] = 0; + values[valuesById[1] = "PBKDF2_HMAC_SHA512"] = 1; + values[valuesById[2] = "PBKDF2_HMAC_SHA384"] = 2; + return values; + })(); + + UserPassword.TransformerArg = (function() { + + /** + * Properties of a TransformerArg. + * @memberof proto.UserPassword + * @interface ITransformerArg + * @property {string|null} [key] TransformerArg key + * @property {proto.UserPassword.TransformerArg.IValue|null} [value] TransformerArg value + */ + + /** + * Constructs a new TransformerArg. + * @memberof proto.UserPassword + * @classdesc Represents a TransformerArg. + * @implements ITransformerArg + * @constructor + * @param {proto.UserPassword.ITransformerArg=} [properties] Properties to set + */ + function TransformerArg(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TransformerArg key. + * @member {string|null|undefined} key + * @memberof proto.UserPassword.TransformerArg + * @instance + */ + TransformerArg.prototype.key = null; + + /** + * TransformerArg value. + * @member {proto.UserPassword.TransformerArg.IValue|null|undefined} value + * @memberof proto.UserPassword.TransformerArg + * @instance + */ + TransformerArg.prototype.value = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(TransformerArg.prototype, "_key", { + get: $util.oneOfGetter($oneOfFields = ["key"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(TransformerArg.prototype, "_value", { + get: $util.oneOfGetter($oneOfFields = ["value"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new TransformerArg instance using the specified properties. + * @function create + * @memberof proto.UserPassword.TransformerArg + * @static + * @param {proto.UserPassword.ITransformerArg=} [properties] Properties to set + * @returns {proto.UserPassword.TransformerArg} TransformerArg instance + */ + TransformerArg.create = function create(properties) { + return new TransformerArg(properties); + }; + + /** + * Encodes the specified TransformerArg message. Does not implicitly {@link proto.UserPassword.TransformerArg.verify|verify} messages. + * @function encode + * @memberof proto.UserPassword.TransformerArg + * @static + * @param {proto.UserPassword.ITransformerArg} message TransformerArg message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TransformerArg.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + $root.proto.UserPassword.TransformerArg.Value.encode(message.value, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified TransformerArg message, length delimited. Does not implicitly {@link proto.UserPassword.TransformerArg.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.UserPassword.TransformerArg + * @static + * @param {proto.UserPassword.ITransformerArg} message TransformerArg message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TransformerArg.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TransformerArg message from the specified reader or buffer. + * @function decode + * @memberof proto.UserPassword.TransformerArg + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.UserPassword.TransformerArg} TransformerArg + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TransformerArg.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.UserPassword.TransformerArg(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.key = reader.string(); + break; + } + case 2: { + message.value = $root.proto.UserPassword.TransformerArg.Value.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TransformerArg message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.UserPassword.TransformerArg + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.UserPassword.TransformerArg} TransformerArg + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TransformerArg.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TransformerArg message. + * @function verify + * @memberof proto.UserPassword.TransformerArg + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TransformerArg.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.key != null && message.hasOwnProperty("key")) { + properties._key = 1; + if (!$util.isString(message.key)) + return "key: string expected"; + } + if (message.value != null && message.hasOwnProperty("value")) { + properties._value = 1; + { + var error = $root.proto.UserPassword.TransformerArg.Value.verify(message.value); + if (error) + return "value." + error; + } + } + return null; + }; + + /** + * Creates a TransformerArg message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.UserPassword.TransformerArg + * @static + * @param {Object.} object Plain object + * @returns {proto.UserPassword.TransformerArg} TransformerArg + */ + TransformerArg.fromObject = function fromObject(object) { + if (object instanceof $root.proto.UserPassword.TransformerArg) + return object; + var message = new $root.proto.UserPassword.TransformerArg(); + if (object.key != null) + message.key = String(object.key); + if (object.value != null) { + if (typeof object.value !== "object") + throw TypeError(".proto.UserPassword.TransformerArg.value: object expected"); + message.value = $root.proto.UserPassword.TransformerArg.Value.fromObject(object.value); + } + return message; + }; + + /** + * Creates a plain object from a TransformerArg message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.UserPassword.TransformerArg + * @static + * @param {proto.UserPassword.TransformerArg} message TransformerArg + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TransformerArg.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.key != null && message.hasOwnProperty("key")) { + object.key = message.key; + if (options.oneofs) + object._key = "key"; + } + if (message.value != null && message.hasOwnProperty("value")) { + object.value = $root.proto.UserPassword.TransformerArg.Value.toObject(message.value, options); + if (options.oneofs) + object._value = "value"; + } + return object; + }; + + /** + * Converts this TransformerArg to JSON. + * @function toJSON + * @memberof proto.UserPassword.TransformerArg + * @instance + * @returns {Object.} JSON object + */ + TransformerArg.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TransformerArg + * @function getTypeUrl + * @memberof proto.UserPassword.TransformerArg + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TransformerArg.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.UserPassword.TransformerArg"; + }; + + TransformerArg.Value = (function() { + + /** + * Properties of a Value. + * @memberof proto.UserPassword.TransformerArg + * @interface IValue + * @property {Uint8Array|null} [asBlob] Value asBlob + * @property {number|null} [asUnsignedInteger] Value asUnsignedInteger + */ + + /** + * Constructs a new Value. + * @memberof proto.UserPassword.TransformerArg + * @classdesc Represents a Value. + * @implements IValue + * @constructor + * @param {proto.UserPassword.TransformerArg.IValue=} [properties] Properties to set + */ + function Value(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Value asBlob. + * @member {Uint8Array|null|undefined} asBlob + * @memberof proto.UserPassword.TransformerArg.Value + * @instance + */ + Value.prototype.asBlob = null; + + /** + * Value asUnsignedInteger. + * @member {number|null|undefined} asUnsignedInteger + * @memberof proto.UserPassword.TransformerArg.Value + * @instance + */ + Value.prototype.asUnsignedInteger = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Value value. + * @member {"asBlob"|"asUnsignedInteger"|undefined} value + * @memberof proto.UserPassword.TransformerArg.Value + * @instance + */ + Object.defineProperty(Value.prototype, "value", { + get: $util.oneOfGetter($oneOfFields = ["asBlob", "asUnsignedInteger"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Value instance using the specified properties. + * @function create + * @memberof proto.UserPassword.TransformerArg.Value + * @static + * @param {proto.UserPassword.TransformerArg.IValue=} [properties] Properties to set + * @returns {proto.UserPassword.TransformerArg.Value} Value instance + */ + Value.create = function create(properties) { + return new Value(properties); + }; + + /** + * Encodes the specified Value message. Does not implicitly {@link proto.UserPassword.TransformerArg.Value.verify|verify} messages. + * @function encode + * @memberof proto.UserPassword.TransformerArg.Value + * @static + * @param {proto.UserPassword.TransformerArg.IValue} message Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Value.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.asBlob != null && Object.hasOwnProperty.call(message, "asBlob")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.asBlob); + if (message.asUnsignedInteger != null && Object.hasOwnProperty.call(message, "asUnsignedInteger")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.asUnsignedInteger); + return writer; + }; + + /** + * Encodes the specified Value message, length delimited. Does not implicitly {@link proto.UserPassword.TransformerArg.Value.verify|verify} messages. + * @function encodeDelimited + * @memberof proto.UserPassword.TransformerArg.Value + * @static + * @param {proto.UserPassword.TransformerArg.IValue} message Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Value.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Value message from the specified reader or buffer. + * @function decode + * @memberof proto.UserPassword.TransformerArg.Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {proto.UserPassword.TransformerArg.Value} Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Value.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.UserPassword.TransformerArg.Value(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.asBlob = reader.bytes(); + break; + } + case 2: { + message.asUnsignedInteger = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Value message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof proto.UserPassword.TransformerArg.Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {proto.UserPassword.TransformerArg.Value} Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Value.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Value message. + * @function verify + * @memberof proto.UserPassword.TransformerArg.Value + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Value.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.asBlob != null && message.hasOwnProperty("asBlob")) { + properties.value = 1; + if (!(message.asBlob && typeof message.asBlob.length === "number" || $util.isString(message.asBlob))) + return "asBlob: buffer expected"; + } + if (message.asUnsignedInteger != null && message.hasOwnProperty("asUnsignedInteger")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + if (!$util.isInteger(message.asUnsignedInteger)) + return "asUnsignedInteger: integer expected"; + } + return null; + }; + + /** + * Creates a Value message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof proto.UserPassword.TransformerArg.Value + * @static + * @param {Object.} object Plain object + * @returns {proto.UserPassword.TransformerArg.Value} Value + */ + Value.fromObject = function fromObject(object) { + if (object instanceof $root.proto.UserPassword.TransformerArg.Value) + return object; + var message = new $root.proto.UserPassword.TransformerArg.Value(); + if (object.asBlob != null) + if (typeof object.asBlob === "string") + $util.base64.decode(object.asBlob, message.asBlob = $util.newBuffer($util.base64.length(object.asBlob)), 0); + else if (object.asBlob.length >= 0) + message.asBlob = object.asBlob; + if (object.asUnsignedInteger != null) + message.asUnsignedInteger = object.asUnsignedInteger >>> 0; + return message; + }; + + /** + * Creates a plain object from a Value message. Also converts values to other types if specified. + * @function toObject + * @memberof proto.UserPassword.TransformerArg.Value + * @static + * @param {proto.UserPassword.TransformerArg.Value} message Value + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Value.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.asBlob != null && message.hasOwnProperty("asBlob")) { + object.asBlob = options.bytes === String ? $util.base64.encode(message.asBlob, 0, message.asBlob.length) : options.bytes === Array ? Array.prototype.slice.call(message.asBlob) : message.asBlob; + if (options.oneofs) + object.value = "asBlob"; + } + if (message.asUnsignedInteger != null && message.hasOwnProperty("asUnsignedInteger")) { + object.asUnsignedInteger = message.asUnsignedInteger; + if (options.oneofs) + object.value = "asUnsignedInteger"; + } + return object; + }; + + /** + * Converts this Value to JSON. + * @function toJSON + * @memberof proto.UserPassword.TransformerArg.Value + * @instance + * @returns {Object.} JSON object + */ + Value.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Value + * @function getTypeUrl + * @memberof proto.UserPassword.TransformerArg.Value + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.UserPassword.TransformerArg.Value"; + }; + + return Value; + })(); + + return TransformerArg; + })(); + + return UserPassword; + })(); + proto.UserReceipt = (function() { /** @@ -94294,27 +146946,27 @@ $root.proto = (function() { /** * UserReceipt receiptTimestamp. - * @member {number|Long} receiptTimestamp + * @member {number|Long|null|undefined} receiptTimestamp * @memberof proto.UserReceipt * @instance */ - UserReceipt.prototype.receiptTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + UserReceipt.prototype.receiptTimestamp = null; /** * UserReceipt readTimestamp. - * @member {number|Long} readTimestamp + * @member {number|Long|null|undefined} readTimestamp * @memberof proto.UserReceipt * @instance */ - UserReceipt.prototype.readTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + UserReceipt.prototype.readTimestamp = null; /** * UserReceipt playedTimestamp. - * @member {number|Long} playedTimestamp + * @member {number|Long|null|undefined} playedTimestamp * @memberof proto.UserReceipt * @instance */ - UserReceipt.prototype.playedTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + UserReceipt.prototype.playedTimestamp = null; /** * UserReceipt pendingDeviceJid. @@ -94332,6 +146984,27 @@ $root.proto = (function() { */ UserReceipt.prototype.deliveredDeviceJid = $util.emptyArray; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(UserReceipt.prototype, "_receiptTimestamp", { + get: $util.oneOfGetter($oneOfFields = ["receiptTimestamp"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(UserReceipt.prototype, "_readTimestamp", { + get: $util.oneOfGetter($oneOfFields = ["readTimestamp"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(UserReceipt.prototype, "_playedTimestamp", { + get: $util.oneOfGetter($oneOfFields = ["playedTimestamp"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new UserReceipt instance using the specified properties. * @function create @@ -94403,28 +147076,34 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.userJid = reader.string(); - break; - case 2: - message.receiptTimestamp = reader.int64(); - break; - case 3: - message.readTimestamp = reader.int64(); - break; - case 4: - message.playedTimestamp = reader.int64(); - break; - case 5: - if (!(message.pendingDeviceJid && message.pendingDeviceJid.length)) - message.pendingDeviceJid = []; - message.pendingDeviceJid.push(reader.string()); - break; - case 6: - if (!(message.deliveredDeviceJid && message.deliveredDeviceJid.length)) - message.deliveredDeviceJid = []; - message.deliveredDeviceJid.push(reader.string()); - break; + case 1: { + message.userJid = reader.string(); + break; + } + case 2: { + message.receiptTimestamp = reader.int64(); + break; + } + case 3: { + message.readTimestamp = reader.int64(); + break; + } + case 4: { + message.playedTimestamp = reader.int64(); + break; + } + case 5: { + if (!(message.pendingDeviceJid && message.pendingDeviceJid.length)) + message.pendingDeviceJid = []; + message.pendingDeviceJid.push(reader.string()); + break; + } + case 6: { + if (!(message.deliveredDeviceJid && message.deliveredDeviceJid.length)) + message.deliveredDeviceJid = []; + message.deliveredDeviceJid.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -94462,17 +147141,24 @@ $root.proto = (function() { UserReceipt.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; if (!$util.isString(message.userJid)) return "userJid: string expected"; - if (message.receiptTimestamp != null && message.hasOwnProperty("receiptTimestamp")) + if (message.receiptTimestamp != null && message.hasOwnProperty("receiptTimestamp")) { + properties._receiptTimestamp = 1; if (!$util.isInteger(message.receiptTimestamp) && !(message.receiptTimestamp && $util.isInteger(message.receiptTimestamp.low) && $util.isInteger(message.receiptTimestamp.high))) return "receiptTimestamp: integer|Long expected"; - if (message.readTimestamp != null && message.hasOwnProperty("readTimestamp")) + } + if (message.readTimestamp != null && message.hasOwnProperty("readTimestamp")) { + properties._readTimestamp = 1; if (!$util.isInteger(message.readTimestamp) && !(message.readTimestamp && $util.isInteger(message.readTimestamp.low) && $util.isInteger(message.readTimestamp.high))) return "readTimestamp: integer|Long expected"; - if (message.playedTimestamp != null && message.hasOwnProperty("playedTimestamp")) + } + if (message.playedTimestamp != null && message.hasOwnProperty("playedTimestamp")) { + properties._playedTimestamp = 1; if (!$util.isInteger(message.playedTimestamp) && !(message.playedTimestamp && $util.isInteger(message.playedTimestamp.low) && $util.isInteger(message.playedTimestamp.high))) return "playedTimestamp: integer|Long expected"; + } if (message.pendingDeviceJid != null && message.hasOwnProperty("pendingDeviceJid")) { if (!Array.isArray(message.pendingDeviceJid)) return "pendingDeviceJid: array expected"; @@ -94565,41 +147251,34 @@ $root.proto = (function() { object.pendingDeviceJid = []; object.deliveredDeviceJid = []; } - if (options.defaults) { + if (options.defaults) object.userJid = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.receiptTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.receiptTimestamp = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.readTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.readTimestamp = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.playedTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.playedTimestamp = options.longs === String ? "0" : 0; - } if (message.userJid != null && message.hasOwnProperty("userJid")) object.userJid = message.userJid; - if (message.receiptTimestamp != null && message.hasOwnProperty("receiptTimestamp")) + if (message.receiptTimestamp != null && message.hasOwnProperty("receiptTimestamp")) { if (typeof message.receiptTimestamp === "number") object.receiptTimestamp = options.longs === String ? String(message.receiptTimestamp) : message.receiptTimestamp; else object.receiptTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.receiptTimestamp) : options.longs === Number ? new $util.LongBits(message.receiptTimestamp.low >>> 0, message.receiptTimestamp.high >>> 0).toNumber() : message.receiptTimestamp; - if (message.readTimestamp != null && message.hasOwnProperty("readTimestamp")) + if (options.oneofs) + object._receiptTimestamp = "receiptTimestamp"; + } + if (message.readTimestamp != null && message.hasOwnProperty("readTimestamp")) { if (typeof message.readTimestamp === "number") object.readTimestamp = options.longs === String ? String(message.readTimestamp) : message.readTimestamp; else object.readTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.readTimestamp) : options.longs === Number ? new $util.LongBits(message.readTimestamp.low >>> 0, message.readTimestamp.high >>> 0).toNumber() : message.readTimestamp; - if (message.playedTimestamp != null && message.hasOwnProperty("playedTimestamp")) + if (options.oneofs) + object._readTimestamp = "readTimestamp"; + } + if (message.playedTimestamp != null && message.hasOwnProperty("playedTimestamp")) { if (typeof message.playedTimestamp === "number") object.playedTimestamp = options.longs === String ? String(message.playedTimestamp) : message.playedTimestamp; else object.playedTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.playedTimestamp) : options.longs === Number ? new $util.LongBits(message.playedTimestamp.low >>> 0, message.playedTimestamp.high >>> 0).toNumber() : message.playedTimestamp; + if (options.oneofs) + object._playedTimestamp = "playedTimestamp"; + } if (message.pendingDeviceJid && message.pendingDeviceJid.length) { object.pendingDeviceJid = []; for (var j = 0; j < message.pendingDeviceJid.length; ++j) @@ -94624,6 +147303,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for UserReceipt + * @function getTypeUrl + * @memberof proto.UserReceipt + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UserReceipt.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.UserReceipt"; + }; + return UserReceipt; })(); @@ -94655,27 +147349,48 @@ $root.proto = (function() { /** * VerifiedNameCertificate details. - * @member {Uint8Array} details + * @member {Uint8Array|null|undefined} details * @memberof proto.VerifiedNameCertificate * @instance */ - VerifiedNameCertificate.prototype.details = $util.newBuffer([]); + VerifiedNameCertificate.prototype.details = null; /** * VerifiedNameCertificate signature. - * @member {Uint8Array} signature + * @member {Uint8Array|null|undefined} signature * @memberof proto.VerifiedNameCertificate * @instance */ - VerifiedNameCertificate.prototype.signature = $util.newBuffer([]); + VerifiedNameCertificate.prototype.signature = null; /** * VerifiedNameCertificate serverSignature. - * @member {Uint8Array} serverSignature + * @member {Uint8Array|null|undefined} serverSignature * @memberof proto.VerifiedNameCertificate * @instance */ - VerifiedNameCertificate.prototype.serverSignature = $util.newBuffer([]); + VerifiedNameCertificate.prototype.serverSignature = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(VerifiedNameCertificate.prototype, "_details", { + get: $util.oneOfGetter($oneOfFields = ["details"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(VerifiedNameCertificate.prototype, "_signature", { + get: $util.oneOfGetter($oneOfFields = ["signature"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(VerifiedNameCertificate.prototype, "_serverSignature", { + get: $util.oneOfGetter($oneOfFields = ["serverSignature"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new VerifiedNameCertificate instance using the specified properties. @@ -94741,15 +147456,18 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.details = reader.bytes(); - break; - case 2: - message.signature = reader.bytes(); - break; - case 3: - message.serverSignature = reader.bytes(); - break; + case 1: { + message.details = reader.bytes(); + break; + } + case 2: { + message.signature = reader.bytes(); + break; + } + case 3: { + message.serverSignature = reader.bytes(); + break; + } default: reader.skipType(tag & 7); break; @@ -94785,15 +147503,22 @@ $root.proto = (function() { VerifiedNameCertificate.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.details != null && message.hasOwnProperty("details")) + var properties = {}; + if (message.details != null && message.hasOwnProperty("details")) { + properties._details = 1; 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 != null && message.hasOwnProperty("signature")) { + properties._signature = 1; if (!(message.signature && typeof message.signature.length === "number" || $util.isString(message.signature))) return "signature: buffer expected"; - if (message.serverSignature != null && message.hasOwnProperty("serverSignature")) + } + if (message.serverSignature != null && message.hasOwnProperty("serverSignature")) { + properties._serverSignature = 1; if (!(message.serverSignature && typeof message.serverSignature.length === "number" || $util.isString(message.serverSignature))) return "serverSignature: buffer expected"; + } return null; }; @@ -94812,17 +147537,17 @@ $root.proto = (function() { 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) + else if (object.details.length >= 0) 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) + else if (object.signature.length >= 0) message.signature = object.signature; if (object.serverSignature != null) if (typeof object.serverSignature === "string") $util.base64.decode(object.serverSignature, message.serverSignature = $util.newBuffer($util.base64.length(object.serverSignature)), 0); - else if (object.serverSignature.length) + else if (object.serverSignature.length >= 0) message.serverSignature = object.serverSignature; return message; }; @@ -94840,35 +147565,21 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - if (options.bytes === String) - object.details = ""; - else { - object.details = []; - if (options.bytes !== Array) - object.details = $util.newBuffer(object.details); - } - if (options.bytes === String) - object.signature = ""; - else { - object.signature = []; - if (options.bytes !== Array) - object.signature = $util.newBuffer(object.signature); - } - if (options.bytes === String) - object.serverSignature = ""; - else { - object.serverSignature = []; - if (options.bytes !== Array) - object.serverSignature = $util.newBuffer(object.serverSignature); - } - } - if (message.details != null && message.hasOwnProperty("details")) + 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")) + if (options.oneofs) + object._details = "details"; + } + if (message.signature != null && message.hasOwnProperty("signature")) { object.signature = options.bytes === String ? $util.base64.encode(message.signature, 0, message.signature.length) : options.bytes === Array ? Array.prototype.slice.call(message.signature) : message.signature; - if (message.serverSignature != null && message.hasOwnProperty("serverSignature")) + if (options.oneofs) + object._signature = "signature"; + } + if (message.serverSignature != null && message.hasOwnProperty("serverSignature")) { object.serverSignature = options.bytes === String ? $util.base64.encode(message.serverSignature, 0, message.serverSignature.length) : options.bytes === Array ? Array.prototype.slice.call(message.serverSignature) : message.serverSignature; + if (options.oneofs) + object._serverSignature = "serverSignature"; + } return object; }; @@ -94883,6 +147594,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for VerifiedNameCertificate + * @function getTypeUrl + * @memberof proto.VerifiedNameCertificate + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VerifiedNameCertificate.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.VerifiedNameCertificate"; + }; + VerifiedNameCertificate.Details = (function() { /** @@ -94914,27 +147640,27 @@ $root.proto = (function() { /** * Details serial. - * @member {number|Long} serial + * @member {number|Long|null|undefined} serial * @memberof proto.VerifiedNameCertificate.Details * @instance */ - Details.prototype.serial = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + Details.prototype.serial = null; /** * Details issuer. - * @member {string} issuer + * @member {string|null|undefined} issuer * @memberof proto.VerifiedNameCertificate.Details * @instance */ - Details.prototype.issuer = ""; + Details.prototype.issuer = null; /** * Details verifiedName. - * @member {string} verifiedName + * @member {string|null|undefined} verifiedName * @memberof proto.VerifiedNameCertificate.Details * @instance */ - Details.prototype.verifiedName = ""; + Details.prototype.verifiedName = null; /** * Details localizedNames. @@ -94946,11 +147672,38 @@ $root.proto = (function() { /** * Details issueTime. - * @member {number|Long} issueTime + * @member {number|Long|null|undefined} issueTime * @memberof proto.VerifiedNameCertificate.Details * @instance */ - Details.prototype.issueTime = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + Details.prototype.issueTime = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Details.prototype, "_serial", { + get: $util.oneOfGetter($oneOfFields = ["serial"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Details.prototype, "_issuer", { + get: $util.oneOfGetter($oneOfFields = ["issuer"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Details.prototype, "_verifiedName", { + get: $util.oneOfGetter($oneOfFields = ["verifiedName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Details.prototype, "_issueTime", { + get: $util.oneOfGetter($oneOfFields = ["issueTime"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new Details instance using the specified properties. @@ -95021,23 +147774,28 @@ $root.proto = (function() { 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; + 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; @@ -95073,15 +147831,22 @@ $root.proto = (function() { Details.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.serial != null && message.hasOwnProperty("serial")) + var properties = {}; + if (message.serial != null && message.hasOwnProperty("serial")) { + properties._serial = 1; 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 (message.issuer != null && message.hasOwnProperty("issuer")) { + properties._issuer = 1; if (!$util.isString(message.issuer)) return "issuer: string expected"; - if (message.verifiedName != null && message.hasOwnProperty("verifiedName")) + } + if (message.verifiedName != null && message.hasOwnProperty("verifiedName")) { + properties._verifiedName = 1; 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"; @@ -95091,9 +147856,11 @@ $root.proto = (function() { return "localizedNames." + error; } } - if (message.issueTime != null && message.hasOwnProperty("issueTime")) + if (message.issueTime != null && message.hasOwnProperty("issueTime")) { + properties._issueTime = 1; if (!$util.isInteger(message.issueTime) && !(message.issueTime && $util.isInteger(message.issueTime.low) && $util.isInteger(message.issueTime.high))) return "issueTime: integer|Long expected"; + } return null; }; @@ -95159,39 +147926,37 @@ $root.proto = (function() { 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 (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")) + if (options.oneofs) + object._serial = "serial"; + } + if (message.issuer != null && message.hasOwnProperty("issuer")) { object.issuer = message.issuer; - if (message.verifiedName != null && message.hasOwnProperty("verifiedName")) + if (options.oneofs) + object._issuer = "issuer"; + } + if (message.verifiedName != null && message.hasOwnProperty("verifiedName")) { object.verifiedName = message.verifiedName; + if (options.oneofs) + object._verifiedName = "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 (message.issueTime != null && message.hasOwnProperty("issueTime")) { if (typeof message.issueTime === "number") object.issueTime = options.longs === String ? String(message.issueTime) : message.issueTime; else object.issueTime = options.longs === String ? $util.Long.prototype.toString.call(message.issueTime) : options.longs === Number ? new $util.LongBits(message.issueTime.low >>> 0, message.issueTime.high >>> 0).toNumber(true) : message.issueTime; + if (options.oneofs) + object._issueTime = "issueTime"; + } return object; }; @@ -95206,6 +147971,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Details + * @function getTypeUrl + * @memberof proto.VerifiedNameCertificate.Details + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Details.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.VerifiedNameCertificate.Details"; + }; + return Details; })(); @@ -95239,19 +148019,34 @@ $root.proto = (function() { /** * WallpaperSettings filename. - * @member {string} filename + * @member {string|null|undefined} filename * @memberof proto.WallpaperSettings * @instance */ - WallpaperSettings.prototype.filename = ""; + WallpaperSettings.prototype.filename = null; /** * WallpaperSettings opacity. - * @member {number} opacity + * @member {number|null|undefined} opacity * @memberof proto.WallpaperSettings * @instance */ - WallpaperSettings.prototype.opacity = 0; + WallpaperSettings.prototype.opacity = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WallpaperSettings.prototype, "_filename", { + get: $util.oneOfGetter($oneOfFields = ["filename"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WallpaperSettings.prototype, "_opacity", { + get: $util.oneOfGetter($oneOfFields = ["opacity"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new WallpaperSettings instance using the specified properties. @@ -95315,12 +148110,14 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.filename = reader.string(); - break; - case 2: - message.opacity = reader.uint32(); - break; + case 1: { + message.filename = reader.string(); + break; + } + case 2: { + message.opacity = reader.uint32(); + break; + } default: reader.skipType(tag & 7); break; @@ -95356,12 +148153,17 @@ $root.proto = (function() { WallpaperSettings.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.filename != null && message.hasOwnProperty("filename")) + var properties = {}; + if (message.filename != null && message.hasOwnProperty("filename")) { + properties._filename = 1; if (!$util.isString(message.filename)) return "filename: string expected"; - if (message.opacity != null && message.hasOwnProperty("opacity")) + } + if (message.opacity != null && message.hasOwnProperty("opacity")) { + properties._opacity = 1; if (!$util.isInteger(message.opacity)) return "opacity: integer expected"; + } return null; }; @@ -95397,14 +148199,16 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.filename = ""; - object.opacity = 0; - } - if (message.filename != null && message.hasOwnProperty("filename")) + if (message.filename != null && message.hasOwnProperty("filename")) { object.filename = message.filename; - if (message.opacity != null && message.hasOwnProperty("opacity")) + if (options.oneofs) + object._filename = "filename"; + } + if (message.opacity != null && message.hasOwnProperty("opacity")) { object.opacity = message.opacity; + if (options.oneofs) + object._opacity = "opacity"; + } return object; }; @@ -95419,6 +148223,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for WallpaperSettings + * @function getTypeUrl + * @memberof proto.WallpaperSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WallpaperSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.WallpaperSettings"; + }; + return WallpaperSettings; })(); @@ -95492,363 +148311,636 @@ $root.proto = (function() { /** * WebFeatures labelsDisplay. - * @member {proto.WebFeatures.Flag} labelsDisplay + * @member {proto.WebFeatures.Flag|null|undefined} labelsDisplay * @memberof proto.WebFeatures * @instance */ - WebFeatures.prototype.labelsDisplay = 0; + WebFeatures.prototype.labelsDisplay = null; /** * WebFeatures voipIndividualOutgoing. - * @member {proto.WebFeatures.Flag} voipIndividualOutgoing + * @member {proto.WebFeatures.Flag|null|undefined} voipIndividualOutgoing * @memberof proto.WebFeatures * @instance */ - WebFeatures.prototype.voipIndividualOutgoing = 0; + WebFeatures.prototype.voipIndividualOutgoing = null; /** * WebFeatures groupsV3. - * @member {proto.WebFeatures.Flag} groupsV3 + * @member {proto.WebFeatures.Flag|null|undefined} groupsV3 * @memberof proto.WebFeatures * @instance */ - WebFeatures.prototype.groupsV3 = 0; + WebFeatures.prototype.groupsV3 = null; /** * WebFeatures groupsV3Create. - * @member {proto.WebFeatures.Flag} groupsV3Create + * @member {proto.WebFeatures.Flag|null|undefined} groupsV3Create * @memberof proto.WebFeatures * @instance */ - WebFeatures.prototype.groupsV3Create = 0; + WebFeatures.prototype.groupsV3Create = null; /** * WebFeatures changeNumberV2. - * @member {proto.WebFeatures.Flag} changeNumberV2 + * @member {proto.WebFeatures.Flag|null|undefined} changeNumberV2 * @memberof proto.WebFeatures * @instance */ - WebFeatures.prototype.changeNumberV2 = 0; + WebFeatures.prototype.changeNumberV2 = null; /** * WebFeatures queryStatusV3Thumbnail. - * @member {proto.WebFeatures.Flag} queryStatusV3Thumbnail + * @member {proto.WebFeatures.Flag|null|undefined} queryStatusV3Thumbnail * @memberof proto.WebFeatures * @instance */ - WebFeatures.prototype.queryStatusV3Thumbnail = 0; + WebFeatures.prototype.queryStatusV3Thumbnail = null; /** * WebFeatures liveLocations. - * @member {proto.WebFeatures.Flag} liveLocations + * @member {proto.WebFeatures.Flag|null|undefined} liveLocations * @memberof proto.WebFeatures * @instance */ - WebFeatures.prototype.liveLocations = 0; + WebFeatures.prototype.liveLocations = null; /** * WebFeatures queryVname. - * @member {proto.WebFeatures.Flag} queryVname + * @member {proto.WebFeatures.Flag|null|undefined} queryVname * @memberof proto.WebFeatures * @instance */ - WebFeatures.prototype.queryVname = 0; + WebFeatures.prototype.queryVname = null; /** * WebFeatures voipIndividualIncoming. - * @member {proto.WebFeatures.Flag} voipIndividualIncoming + * @member {proto.WebFeatures.Flag|null|undefined} voipIndividualIncoming * @memberof proto.WebFeatures * @instance */ - WebFeatures.prototype.voipIndividualIncoming = 0; + WebFeatures.prototype.voipIndividualIncoming = null; /** * WebFeatures quickRepliesQuery. - * @member {proto.WebFeatures.Flag} quickRepliesQuery + * @member {proto.WebFeatures.Flag|null|undefined} quickRepliesQuery * @memberof proto.WebFeatures * @instance */ - WebFeatures.prototype.quickRepliesQuery = 0; + WebFeatures.prototype.quickRepliesQuery = null; /** * WebFeatures payments. - * @member {proto.WebFeatures.Flag} payments + * @member {proto.WebFeatures.Flag|null|undefined} payments * @memberof proto.WebFeatures * @instance */ - WebFeatures.prototype.payments = 0; + WebFeatures.prototype.payments = null; /** * WebFeatures stickerPackQuery. - * @member {proto.WebFeatures.Flag} stickerPackQuery + * @member {proto.WebFeatures.Flag|null|undefined} stickerPackQuery * @memberof proto.WebFeatures * @instance */ - WebFeatures.prototype.stickerPackQuery = 0; + WebFeatures.prototype.stickerPackQuery = null; /** * WebFeatures liveLocationsFinal. - * @member {proto.WebFeatures.Flag} liveLocationsFinal + * @member {proto.WebFeatures.Flag|null|undefined} liveLocationsFinal * @memberof proto.WebFeatures * @instance */ - WebFeatures.prototype.liveLocationsFinal = 0; + WebFeatures.prototype.liveLocationsFinal = null; /** * WebFeatures labelsEdit. - * @member {proto.WebFeatures.Flag} labelsEdit + * @member {proto.WebFeatures.Flag|null|undefined} labelsEdit * @memberof proto.WebFeatures * @instance */ - WebFeatures.prototype.labelsEdit = 0; + WebFeatures.prototype.labelsEdit = null; /** * WebFeatures mediaUpload. - * @member {proto.WebFeatures.Flag} mediaUpload + * @member {proto.WebFeatures.Flag|null|undefined} mediaUpload * @memberof proto.WebFeatures * @instance */ - WebFeatures.prototype.mediaUpload = 0; + WebFeatures.prototype.mediaUpload = null; /** * WebFeatures mediaUploadRichQuickReplies. - * @member {proto.WebFeatures.Flag} mediaUploadRichQuickReplies + * @member {proto.WebFeatures.Flag|null|undefined} mediaUploadRichQuickReplies * @memberof proto.WebFeatures * @instance */ - WebFeatures.prototype.mediaUploadRichQuickReplies = 0; + WebFeatures.prototype.mediaUploadRichQuickReplies = null; /** * WebFeatures vnameV2. - * @member {proto.WebFeatures.Flag} vnameV2 + * @member {proto.WebFeatures.Flag|null|undefined} vnameV2 * @memberof proto.WebFeatures * @instance */ - WebFeatures.prototype.vnameV2 = 0; + WebFeatures.prototype.vnameV2 = null; /** * WebFeatures videoPlaybackUrl. - * @member {proto.WebFeatures.Flag} videoPlaybackUrl + * @member {proto.WebFeatures.Flag|null|undefined} videoPlaybackUrl * @memberof proto.WebFeatures * @instance */ - WebFeatures.prototype.videoPlaybackUrl = 0; + WebFeatures.prototype.videoPlaybackUrl = null; /** * WebFeatures statusRanking. - * @member {proto.WebFeatures.Flag} statusRanking + * @member {proto.WebFeatures.Flag|null|undefined} statusRanking * @memberof proto.WebFeatures * @instance */ - WebFeatures.prototype.statusRanking = 0; + WebFeatures.prototype.statusRanking = null; /** * WebFeatures voipIndividualVideo. - * @member {proto.WebFeatures.Flag} voipIndividualVideo + * @member {proto.WebFeatures.Flag|null|undefined} voipIndividualVideo * @memberof proto.WebFeatures * @instance */ - WebFeatures.prototype.voipIndividualVideo = 0; + WebFeatures.prototype.voipIndividualVideo = null; /** * WebFeatures thirdPartyStickers. - * @member {proto.WebFeatures.Flag} thirdPartyStickers + * @member {proto.WebFeatures.Flag|null|undefined} thirdPartyStickers * @memberof proto.WebFeatures * @instance */ - WebFeatures.prototype.thirdPartyStickers = 0; + WebFeatures.prototype.thirdPartyStickers = null; /** * WebFeatures frequentlyForwardedSetting. - * @member {proto.WebFeatures.Flag} frequentlyForwardedSetting + * @member {proto.WebFeatures.Flag|null|undefined} frequentlyForwardedSetting * @memberof proto.WebFeatures * @instance */ - WebFeatures.prototype.frequentlyForwardedSetting = 0; + WebFeatures.prototype.frequentlyForwardedSetting = null; /** * WebFeatures groupsV4JoinPermission. - * @member {proto.WebFeatures.Flag} groupsV4JoinPermission + * @member {proto.WebFeatures.Flag|null|undefined} groupsV4JoinPermission * @memberof proto.WebFeatures * @instance */ - WebFeatures.prototype.groupsV4JoinPermission = 0; + WebFeatures.prototype.groupsV4JoinPermission = null; /** * WebFeatures recentStickers. - * @member {proto.WebFeatures.Flag} recentStickers + * @member {proto.WebFeatures.Flag|null|undefined} recentStickers * @memberof proto.WebFeatures * @instance */ - WebFeatures.prototype.recentStickers = 0; + WebFeatures.prototype.recentStickers = null; /** * WebFeatures catalog. - * @member {proto.WebFeatures.Flag} catalog + * @member {proto.WebFeatures.Flag|null|undefined} catalog * @memberof proto.WebFeatures * @instance */ - WebFeatures.prototype.catalog = 0; + WebFeatures.prototype.catalog = null; /** * WebFeatures starredStickers. - * @member {proto.WebFeatures.Flag} starredStickers + * @member {proto.WebFeatures.Flag|null|undefined} starredStickers * @memberof proto.WebFeatures * @instance */ - WebFeatures.prototype.starredStickers = 0; + WebFeatures.prototype.starredStickers = null; /** * WebFeatures voipGroupCall. - * @member {proto.WebFeatures.Flag} voipGroupCall + * @member {proto.WebFeatures.Flag|null|undefined} voipGroupCall * @memberof proto.WebFeatures * @instance */ - WebFeatures.prototype.voipGroupCall = 0; + WebFeatures.prototype.voipGroupCall = null; /** * WebFeatures templateMessage. - * @member {proto.WebFeatures.Flag} templateMessage + * @member {proto.WebFeatures.Flag|null|undefined} templateMessage * @memberof proto.WebFeatures * @instance */ - WebFeatures.prototype.templateMessage = 0; + WebFeatures.prototype.templateMessage = null; /** * WebFeatures templateMessageInteractivity. - * @member {proto.WebFeatures.Flag} templateMessageInteractivity + * @member {proto.WebFeatures.Flag|null|undefined} templateMessageInteractivity * @memberof proto.WebFeatures * @instance */ - WebFeatures.prototype.templateMessageInteractivity = 0; + WebFeatures.prototype.templateMessageInteractivity = null; /** * WebFeatures ephemeralMessages. - * @member {proto.WebFeatures.Flag} ephemeralMessages + * @member {proto.WebFeatures.Flag|null|undefined} ephemeralMessages * @memberof proto.WebFeatures * @instance */ - WebFeatures.prototype.ephemeralMessages = 0; + WebFeatures.prototype.ephemeralMessages = null; /** * WebFeatures e2ENotificationSync. - * @member {proto.WebFeatures.Flag} e2ENotificationSync + * @member {proto.WebFeatures.Flag|null|undefined} e2ENotificationSync * @memberof proto.WebFeatures * @instance */ - WebFeatures.prototype.e2ENotificationSync = 0; + WebFeatures.prototype.e2ENotificationSync = null; /** * WebFeatures recentStickersV2. - * @member {proto.WebFeatures.Flag} recentStickersV2 + * @member {proto.WebFeatures.Flag|null|undefined} recentStickersV2 * @memberof proto.WebFeatures * @instance */ - WebFeatures.prototype.recentStickersV2 = 0; + WebFeatures.prototype.recentStickersV2 = null; /** * WebFeatures recentStickersV3. - * @member {proto.WebFeatures.Flag} recentStickersV3 + * @member {proto.WebFeatures.Flag|null|undefined} recentStickersV3 * @memberof proto.WebFeatures * @instance */ - WebFeatures.prototype.recentStickersV3 = 0; + WebFeatures.prototype.recentStickersV3 = null; /** * WebFeatures userNotice. - * @member {proto.WebFeatures.Flag} userNotice + * @member {proto.WebFeatures.Flag|null|undefined} userNotice * @memberof proto.WebFeatures * @instance */ - WebFeatures.prototype.userNotice = 0; + WebFeatures.prototype.userNotice = null; /** * WebFeatures support. - * @member {proto.WebFeatures.Flag} support + * @member {proto.WebFeatures.Flag|null|undefined} support * @memberof proto.WebFeatures * @instance */ - WebFeatures.prototype.support = 0; + WebFeatures.prototype.support = null; /** * WebFeatures groupUiiCleanup. - * @member {proto.WebFeatures.Flag} groupUiiCleanup + * @member {proto.WebFeatures.Flag|null|undefined} groupUiiCleanup * @memberof proto.WebFeatures * @instance */ - WebFeatures.prototype.groupUiiCleanup = 0; + WebFeatures.prototype.groupUiiCleanup = null; /** * WebFeatures groupDogfoodingInternalOnly. - * @member {proto.WebFeatures.Flag} groupDogfoodingInternalOnly + * @member {proto.WebFeatures.Flag|null|undefined} groupDogfoodingInternalOnly * @memberof proto.WebFeatures * @instance */ - WebFeatures.prototype.groupDogfoodingInternalOnly = 0; + WebFeatures.prototype.groupDogfoodingInternalOnly = null; /** * WebFeatures settingsSync. - * @member {proto.WebFeatures.Flag} settingsSync + * @member {proto.WebFeatures.Flag|null|undefined} settingsSync * @memberof proto.WebFeatures * @instance */ - WebFeatures.prototype.settingsSync = 0; + WebFeatures.prototype.settingsSync = null; /** * WebFeatures archiveV2. - * @member {proto.WebFeatures.Flag} archiveV2 + * @member {proto.WebFeatures.Flag|null|undefined} archiveV2 * @memberof proto.WebFeatures * @instance */ - WebFeatures.prototype.archiveV2 = 0; + WebFeatures.prototype.archiveV2 = null; /** * WebFeatures ephemeralAllowGroupMembers. - * @member {proto.WebFeatures.Flag} ephemeralAllowGroupMembers + * @member {proto.WebFeatures.Flag|null|undefined} ephemeralAllowGroupMembers * @memberof proto.WebFeatures * @instance */ - WebFeatures.prototype.ephemeralAllowGroupMembers = 0; + WebFeatures.prototype.ephemeralAllowGroupMembers = null; /** * WebFeatures ephemeral24HDuration. - * @member {proto.WebFeatures.Flag} ephemeral24HDuration + * @member {proto.WebFeatures.Flag|null|undefined} ephemeral24HDuration * @memberof proto.WebFeatures * @instance */ - WebFeatures.prototype.ephemeral24HDuration = 0; + WebFeatures.prototype.ephemeral24HDuration = null; /** * WebFeatures mdForceUpgrade. - * @member {proto.WebFeatures.Flag} mdForceUpgrade + * @member {proto.WebFeatures.Flag|null|undefined} mdForceUpgrade * @memberof proto.WebFeatures * @instance */ - WebFeatures.prototype.mdForceUpgrade = 0; + WebFeatures.prototype.mdForceUpgrade = null; /** * WebFeatures disappearingMode. - * @member {proto.WebFeatures.Flag} disappearingMode + * @member {proto.WebFeatures.Flag|null|undefined} disappearingMode * @memberof proto.WebFeatures * @instance */ - WebFeatures.prototype.disappearingMode = 0; + WebFeatures.prototype.disappearingMode = null; /** * WebFeatures externalMdOptInAvailable. - * @member {proto.WebFeatures.Flag} externalMdOptInAvailable + * @member {proto.WebFeatures.Flag|null|undefined} externalMdOptInAvailable * @memberof proto.WebFeatures * @instance */ - WebFeatures.prototype.externalMdOptInAvailable = 0; + WebFeatures.prototype.externalMdOptInAvailable = null; /** * WebFeatures noDeleteMessageTimeLimit. - * @member {proto.WebFeatures.Flag} noDeleteMessageTimeLimit + * @member {proto.WebFeatures.Flag|null|undefined} noDeleteMessageTimeLimit * @memberof proto.WebFeatures * @instance */ - WebFeatures.prototype.noDeleteMessageTimeLimit = 0; + WebFeatures.prototype.noDeleteMessageTimeLimit = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebFeatures.prototype, "_labelsDisplay", { + get: $util.oneOfGetter($oneOfFields = ["labelsDisplay"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebFeatures.prototype, "_voipIndividualOutgoing", { + get: $util.oneOfGetter($oneOfFields = ["voipIndividualOutgoing"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebFeatures.prototype, "_groupsV3", { + get: $util.oneOfGetter($oneOfFields = ["groupsV3"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebFeatures.prototype, "_groupsV3Create", { + get: $util.oneOfGetter($oneOfFields = ["groupsV3Create"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebFeatures.prototype, "_changeNumberV2", { + get: $util.oneOfGetter($oneOfFields = ["changeNumberV2"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebFeatures.prototype, "_queryStatusV3Thumbnail", { + get: $util.oneOfGetter($oneOfFields = ["queryStatusV3Thumbnail"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebFeatures.prototype, "_liveLocations", { + get: $util.oneOfGetter($oneOfFields = ["liveLocations"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebFeatures.prototype, "_queryVname", { + get: $util.oneOfGetter($oneOfFields = ["queryVname"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebFeatures.prototype, "_voipIndividualIncoming", { + get: $util.oneOfGetter($oneOfFields = ["voipIndividualIncoming"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebFeatures.prototype, "_quickRepliesQuery", { + get: $util.oneOfGetter($oneOfFields = ["quickRepliesQuery"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebFeatures.prototype, "_payments", { + get: $util.oneOfGetter($oneOfFields = ["payments"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebFeatures.prototype, "_stickerPackQuery", { + get: $util.oneOfGetter($oneOfFields = ["stickerPackQuery"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebFeatures.prototype, "_liveLocationsFinal", { + get: $util.oneOfGetter($oneOfFields = ["liveLocationsFinal"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebFeatures.prototype, "_labelsEdit", { + get: $util.oneOfGetter($oneOfFields = ["labelsEdit"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebFeatures.prototype, "_mediaUpload", { + get: $util.oneOfGetter($oneOfFields = ["mediaUpload"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebFeatures.prototype, "_mediaUploadRichQuickReplies", { + get: $util.oneOfGetter($oneOfFields = ["mediaUploadRichQuickReplies"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebFeatures.prototype, "_vnameV2", { + get: $util.oneOfGetter($oneOfFields = ["vnameV2"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebFeatures.prototype, "_videoPlaybackUrl", { + get: $util.oneOfGetter($oneOfFields = ["videoPlaybackUrl"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebFeatures.prototype, "_statusRanking", { + get: $util.oneOfGetter($oneOfFields = ["statusRanking"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebFeatures.prototype, "_voipIndividualVideo", { + get: $util.oneOfGetter($oneOfFields = ["voipIndividualVideo"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebFeatures.prototype, "_thirdPartyStickers", { + get: $util.oneOfGetter($oneOfFields = ["thirdPartyStickers"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebFeatures.prototype, "_frequentlyForwardedSetting", { + get: $util.oneOfGetter($oneOfFields = ["frequentlyForwardedSetting"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebFeatures.prototype, "_groupsV4JoinPermission", { + get: $util.oneOfGetter($oneOfFields = ["groupsV4JoinPermission"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebFeatures.prototype, "_recentStickers", { + get: $util.oneOfGetter($oneOfFields = ["recentStickers"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebFeatures.prototype, "_catalog", { + get: $util.oneOfGetter($oneOfFields = ["catalog"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebFeatures.prototype, "_starredStickers", { + get: $util.oneOfGetter($oneOfFields = ["starredStickers"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebFeatures.prototype, "_voipGroupCall", { + get: $util.oneOfGetter($oneOfFields = ["voipGroupCall"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebFeatures.prototype, "_templateMessage", { + get: $util.oneOfGetter($oneOfFields = ["templateMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebFeatures.prototype, "_templateMessageInteractivity", { + get: $util.oneOfGetter($oneOfFields = ["templateMessageInteractivity"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebFeatures.prototype, "_ephemeralMessages", { + get: $util.oneOfGetter($oneOfFields = ["ephemeralMessages"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebFeatures.prototype, "_e2ENotificationSync", { + get: $util.oneOfGetter($oneOfFields = ["e2ENotificationSync"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebFeatures.prototype, "_recentStickersV2", { + get: $util.oneOfGetter($oneOfFields = ["recentStickersV2"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebFeatures.prototype, "_recentStickersV3", { + get: $util.oneOfGetter($oneOfFields = ["recentStickersV3"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebFeatures.prototype, "_userNotice", { + get: $util.oneOfGetter($oneOfFields = ["userNotice"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebFeatures.prototype, "_support", { + get: $util.oneOfGetter($oneOfFields = ["support"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebFeatures.prototype, "_groupUiiCleanup", { + get: $util.oneOfGetter($oneOfFields = ["groupUiiCleanup"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebFeatures.prototype, "_groupDogfoodingInternalOnly", { + get: $util.oneOfGetter($oneOfFields = ["groupDogfoodingInternalOnly"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebFeatures.prototype, "_settingsSync", { + get: $util.oneOfGetter($oneOfFields = ["settingsSync"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebFeatures.prototype, "_archiveV2", { + get: $util.oneOfGetter($oneOfFields = ["archiveV2"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebFeatures.prototype, "_ephemeralAllowGroupMembers", { + get: $util.oneOfGetter($oneOfFields = ["ephemeralAllowGroupMembers"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebFeatures.prototype, "_ephemeral24HDuration", { + get: $util.oneOfGetter($oneOfFields = ["ephemeral24HDuration"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebFeatures.prototype, "_mdForceUpgrade", { + get: $util.oneOfGetter($oneOfFields = ["mdForceUpgrade"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebFeatures.prototype, "_disappearingMode", { + get: $util.oneOfGetter($oneOfFields = ["disappearingMode"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebFeatures.prototype, "_externalMdOptInAvailable", { + get: $util.oneOfGetter($oneOfFields = ["externalMdOptInAvailable"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebFeatures.prototype, "_noDeleteMessageTimeLimit", { + get: $util.oneOfGetter($oneOfFields = ["noDeleteMessageTimeLimit"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new WebFeatures instance using the specified properties. @@ -95998,141 +149090,186 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.labelsDisplay = reader.int32(); - break; - case 2: - message.voipIndividualOutgoing = reader.int32(); - break; - case 3: - message.groupsV3 = reader.int32(); - break; - case 4: - message.groupsV3Create = reader.int32(); - break; - case 5: - message.changeNumberV2 = reader.int32(); - break; - case 6: - message.queryStatusV3Thumbnail = reader.int32(); - break; - case 7: - message.liveLocations = reader.int32(); - break; - case 8: - message.queryVname = reader.int32(); - break; - case 9: - message.voipIndividualIncoming = reader.int32(); - break; - case 10: - message.quickRepliesQuery = reader.int32(); - break; - case 11: - message.payments = reader.int32(); - break; - case 12: - message.stickerPackQuery = reader.int32(); - break; - case 13: - message.liveLocationsFinal = reader.int32(); - break; - case 14: - message.labelsEdit = reader.int32(); - break; - case 15: - message.mediaUpload = reader.int32(); - break; - case 18: - message.mediaUploadRichQuickReplies = reader.int32(); - break; - case 19: - message.vnameV2 = reader.int32(); - break; - case 20: - message.videoPlaybackUrl = reader.int32(); - break; - case 21: - message.statusRanking = reader.int32(); - break; - case 22: - message.voipIndividualVideo = reader.int32(); - break; - case 23: - message.thirdPartyStickers = reader.int32(); - break; - case 24: - message.frequentlyForwardedSetting = reader.int32(); - break; - case 25: - message.groupsV4JoinPermission = reader.int32(); - break; - case 26: - message.recentStickers = reader.int32(); - break; - case 27: - message.catalog = reader.int32(); - break; - case 28: - message.starredStickers = reader.int32(); - break; - case 29: - message.voipGroupCall = reader.int32(); - break; - case 30: - message.templateMessage = reader.int32(); - break; - case 31: - message.templateMessageInteractivity = reader.int32(); - break; - case 32: - message.ephemeralMessages = reader.int32(); - break; - case 33: - message.e2ENotificationSync = reader.int32(); - break; - case 34: - message.recentStickersV2 = reader.int32(); - break; - case 36: - message.recentStickersV3 = reader.int32(); - break; - case 37: - message.userNotice = reader.int32(); - break; - case 39: - message.support = reader.int32(); - break; - case 40: - message.groupUiiCleanup = reader.int32(); - break; - case 41: - message.groupDogfoodingInternalOnly = reader.int32(); - break; - case 42: - message.settingsSync = reader.int32(); - break; - case 43: - message.archiveV2 = reader.int32(); - break; - case 44: - message.ephemeralAllowGroupMembers = reader.int32(); - break; - case 45: - message.ephemeral24HDuration = reader.int32(); - break; - case 46: - message.mdForceUpgrade = reader.int32(); - break; - case 47: - message.disappearingMode = reader.int32(); - break; - case 48: - message.externalMdOptInAvailable = reader.int32(); - break; - case 49: - message.noDeleteMessageTimeLimit = reader.int32(); - break; + case 1: { + message.labelsDisplay = reader.int32(); + break; + } + case 2: { + message.voipIndividualOutgoing = reader.int32(); + break; + } + case 3: { + message.groupsV3 = reader.int32(); + break; + } + case 4: { + message.groupsV3Create = reader.int32(); + break; + } + case 5: { + message.changeNumberV2 = reader.int32(); + break; + } + case 6: { + message.queryStatusV3Thumbnail = reader.int32(); + break; + } + case 7: { + message.liveLocations = reader.int32(); + break; + } + case 8: { + message.queryVname = reader.int32(); + break; + } + case 9: { + message.voipIndividualIncoming = reader.int32(); + break; + } + case 10: { + message.quickRepliesQuery = reader.int32(); + break; + } + case 11: { + message.payments = reader.int32(); + break; + } + case 12: { + message.stickerPackQuery = reader.int32(); + break; + } + case 13: { + message.liveLocationsFinal = reader.int32(); + break; + } + case 14: { + message.labelsEdit = reader.int32(); + break; + } + case 15: { + message.mediaUpload = reader.int32(); + break; + } + case 18: { + message.mediaUploadRichQuickReplies = reader.int32(); + break; + } + case 19: { + message.vnameV2 = reader.int32(); + break; + } + case 20: { + message.videoPlaybackUrl = reader.int32(); + break; + } + case 21: { + message.statusRanking = reader.int32(); + break; + } + case 22: { + message.voipIndividualVideo = reader.int32(); + break; + } + case 23: { + message.thirdPartyStickers = reader.int32(); + break; + } + case 24: { + message.frequentlyForwardedSetting = reader.int32(); + break; + } + case 25: { + message.groupsV4JoinPermission = reader.int32(); + break; + } + case 26: { + message.recentStickers = reader.int32(); + break; + } + case 27: { + message.catalog = reader.int32(); + break; + } + case 28: { + message.starredStickers = reader.int32(); + break; + } + case 29: { + message.voipGroupCall = reader.int32(); + break; + } + case 30: { + message.templateMessage = reader.int32(); + break; + } + case 31: { + message.templateMessageInteractivity = reader.int32(); + break; + } + case 32: { + message.ephemeralMessages = reader.int32(); + break; + } + case 33: { + message.e2ENotificationSync = reader.int32(); + break; + } + case 34: { + message.recentStickersV2 = reader.int32(); + break; + } + case 36: { + message.recentStickersV3 = reader.int32(); + break; + } + case 37: { + message.userNotice = reader.int32(); + break; + } + case 39: { + message.support = reader.int32(); + break; + } + case 40: { + message.groupUiiCleanup = reader.int32(); + break; + } + case 41: { + message.groupDogfoodingInternalOnly = reader.int32(); + break; + } + case 42: { + message.settingsSync = reader.int32(); + break; + } + case 43: { + message.archiveV2 = reader.int32(); + break; + } + case 44: { + message.ephemeralAllowGroupMembers = reader.int32(); + break; + } + case 45: { + message.ephemeral24HDuration = reader.int32(); + break; + } + case 46: { + message.mdForceUpgrade = reader.int32(); + break; + } + case 47: { + message.disappearingMode = reader.int32(); + break; + } + case 48: { + message.externalMdOptInAvailable = reader.int32(); + break; + } + case 49: { + message.noDeleteMessageTimeLimit = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -96168,7 +149305,9 @@ $root.proto = (function() { WebFeatures.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.labelsDisplay != null && message.hasOwnProperty("labelsDisplay")) + var properties = {}; + if (message.labelsDisplay != null && message.hasOwnProperty("labelsDisplay")) { + properties._labelsDisplay = 1; switch (message.labelsDisplay) { default: return "labelsDisplay: enum value expected"; @@ -96178,7 +149317,9 @@ $root.proto = (function() { case 3: break; } - if (message.voipIndividualOutgoing != null && message.hasOwnProperty("voipIndividualOutgoing")) + } + if (message.voipIndividualOutgoing != null && message.hasOwnProperty("voipIndividualOutgoing")) { + properties._voipIndividualOutgoing = 1; switch (message.voipIndividualOutgoing) { default: return "voipIndividualOutgoing: enum value expected"; @@ -96188,7 +149329,9 @@ $root.proto = (function() { case 3: break; } - if (message.groupsV3 != null && message.hasOwnProperty("groupsV3")) + } + if (message.groupsV3 != null && message.hasOwnProperty("groupsV3")) { + properties._groupsV3 = 1; switch (message.groupsV3) { default: return "groupsV3: enum value expected"; @@ -96198,7 +149341,9 @@ $root.proto = (function() { case 3: break; } - if (message.groupsV3Create != null && message.hasOwnProperty("groupsV3Create")) + } + if (message.groupsV3Create != null && message.hasOwnProperty("groupsV3Create")) { + properties._groupsV3Create = 1; switch (message.groupsV3Create) { default: return "groupsV3Create: enum value expected"; @@ -96208,7 +149353,9 @@ $root.proto = (function() { case 3: break; } - if (message.changeNumberV2 != null && message.hasOwnProperty("changeNumberV2")) + } + if (message.changeNumberV2 != null && message.hasOwnProperty("changeNumberV2")) { + properties._changeNumberV2 = 1; switch (message.changeNumberV2) { default: return "changeNumberV2: enum value expected"; @@ -96218,7 +149365,9 @@ $root.proto = (function() { case 3: break; } - if (message.queryStatusV3Thumbnail != null && message.hasOwnProperty("queryStatusV3Thumbnail")) + } + if (message.queryStatusV3Thumbnail != null && message.hasOwnProperty("queryStatusV3Thumbnail")) { + properties._queryStatusV3Thumbnail = 1; switch (message.queryStatusV3Thumbnail) { default: return "queryStatusV3Thumbnail: enum value expected"; @@ -96228,7 +149377,9 @@ $root.proto = (function() { case 3: break; } - if (message.liveLocations != null && message.hasOwnProperty("liveLocations")) + } + if (message.liveLocations != null && message.hasOwnProperty("liveLocations")) { + properties._liveLocations = 1; switch (message.liveLocations) { default: return "liveLocations: enum value expected"; @@ -96238,7 +149389,9 @@ $root.proto = (function() { case 3: break; } - if (message.queryVname != null && message.hasOwnProperty("queryVname")) + } + if (message.queryVname != null && message.hasOwnProperty("queryVname")) { + properties._queryVname = 1; switch (message.queryVname) { default: return "queryVname: enum value expected"; @@ -96248,7 +149401,9 @@ $root.proto = (function() { case 3: break; } - if (message.voipIndividualIncoming != null && message.hasOwnProperty("voipIndividualIncoming")) + } + if (message.voipIndividualIncoming != null && message.hasOwnProperty("voipIndividualIncoming")) { + properties._voipIndividualIncoming = 1; switch (message.voipIndividualIncoming) { default: return "voipIndividualIncoming: enum value expected"; @@ -96258,7 +149413,9 @@ $root.proto = (function() { case 3: break; } - if (message.quickRepliesQuery != null && message.hasOwnProperty("quickRepliesQuery")) + } + if (message.quickRepliesQuery != null && message.hasOwnProperty("quickRepliesQuery")) { + properties._quickRepliesQuery = 1; switch (message.quickRepliesQuery) { default: return "quickRepliesQuery: enum value expected"; @@ -96268,7 +149425,9 @@ $root.proto = (function() { case 3: break; } - if (message.payments != null && message.hasOwnProperty("payments")) + } + if (message.payments != null && message.hasOwnProperty("payments")) { + properties._payments = 1; switch (message.payments) { default: return "payments: enum value expected"; @@ -96278,7 +149437,9 @@ $root.proto = (function() { case 3: break; } - if (message.stickerPackQuery != null && message.hasOwnProperty("stickerPackQuery")) + } + if (message.stickerPackQuery != null && message.hasOwnProperty("stickerPackQuery")) { + properties._stickerPackQuery = 1; switch (message.stickerPackQuery) { default: return "stickerPackQuery: enum value expected"; @@ -96288,7 +149449,9 @@ $root.proto = (function() { case 3: break; } - if (message.liveLocationsFinal != null && message.hasOwnProperty("liveLocationsFinal")) + } + if (message.liveLocationsFinal != null && message.hasOwnProperty("liveLocationsFinal")) { + properties._liveLocationsFinal = 1; switch (message.liveLocationsFinal) { default: return "liveLocationsFinal: enum value expected"; @@ -96298,7 +149461,9 @@ $root.proto = (function() { case 3: break; } - if (message.labelsEdit != null && message.hasOwnProperty("labelsEdit")) + } + if (message.labelsEdit != null && message.hasOwnProperty("labelsEdit")) { + properties._labelsEdit = 1; switch (message.labelsEdit) { default: return "labelsEdit: enum value expected"; @@ -96308,7 +149473,9 @@ $root.proto = (function() { case 3: break; } - if (message.mediaUpload != null && message.hasOwnProperty("mediaUpload")) + } + if (message.mediaUpload != null && message.hasOwnProperty("mediaUpload")) { + properties._mediaUpload = 1; switch (message.mediaUpload) { default: return "mediaUpload: enum value expected"; @@ -96318,7 +149485,9 @@ $root.proto = (function() { case 3: break; } - if (message.mediaUploadRichQuickReplies != null && message.hasOwnProperty("mediaUploadRichQuickReplies")) + } + if (message.mediaUploadRichQuickReplies != null && message.hasOwnProperty("mediaUploadRichQuickReplies")) { + properties._mediaUploadRichQuickReplies = 1; switch (message.mediaUploadRichQuickReplies) { default: return "mediaUploadRichQuickReplies: enum value expected"; @@ -96328,7 +149497,9 @@ $root.proto = (function() { case 3: break; } - if (message.vnameV2 != null && message.hasOwnProperty("vnameV2")) + } + if (message.vnameV2 != null && message.hasOwnProperty("vnameV2")) { + properties._vnameV2 = 1; switch (message.vnameV2) { default: return "vnameV2: enum value expected"; @@ -96338,7 +149509,9 @@ $root.proto = (function() { case 3: break; } - if (message.videoPlaybackUrl != null && message.hasOwnProperty("videoPlaybackUrl")) + } + if (message.videoPlaybackUrl != null && message.hasOwnProperty("videoPlaybackUrl")) { + properties._videoPlaybackUrl = 1; switch (message.videoPlaybackUrl) { default: return "videoPlaybackUrl: enum value expected"; @@ -96348,7 +149521,9 @@ $root.proto = (function() { case 3: break; } - if (message.statusRanking != null && message.hasOwnProperty("statusRanking")) + } + if (message.statusRanking != null && message.hasOwnProperty("statusRanking")) { + properties._statusRanking = 1; switch (message.statusRanking) { default: return "statusRanking: enum value expected"; @@ -96358,7 +149533,9 @@ $root.proto = (function() { case 3: break; } - if (message.voipIndividualVideo != null && message.hasOwnProperty("voipIndividualVideo")) + } + if (message.voipIndividualVideo != null && message.hasOwnProperty("voipIndividualVideo")) { + properties._voipIndividualVideo = 1; switch (message.voipIndividualVideo) { default: return "voipIndividualVideo: enum value expected"; @@ -96368,7 +149545,9 @@ $root.proto = (function() { case 3: break; } - if (message.thirdPartyStickers != null && message.hasOwnProperty("thirdPartyStickers")) + } + if (message.thirdPartyStickers != null && message.hasOwnProperty("thirdPartyStickers")) { + properties._thirdPartyStickers = 1; switch (message.thirdPartyStickers) { default: return "thirdPartyStickers: enum value expected"; @@ -96378,7 +149557,9 @@ $root.proto = (function() { case 3: break; } - if (message.frequentlyForwardedSetting != null && message.hasOwnProperty("frequentlyForwardedSetting")) + } + if (message.frequentlyForwardedSetting != null && message.hasOwnProperty("frequentlyForwardedSetting")) { + properties._frequentlyForwardedSetting = 1; switch (message.frequentlyForwardedSetting) { default: return "frequentlyForwardedSetting: enum value expected"; @@ -96388,7 +149569,9 @@ $root.proto = (function() { case 3: break; } - if (message.groupsV4JoinPermission != null && message.hasOwnProperty("groupsV4JoinPermission")) + } + if (message.groupsV4JoinPermission != null && message.hasOwnProperty("groupsV4JoinPermission")) { + properties._groupsV4JoinPermission = 1; switch (message.groupsV4JoinPermission) { default: return "groupsV4JoinPermission: enum value expected"; @@ -96398,7 +149581,9 @@ $root.proto = (function() { case 3: break; } - if (message.recentStickers != null && message.hasOwnProperty("recentStickers")) + } + if (message.recentStickers != null && message.hasOwnProperty("recentStickers")) { + properties._recentStickers = 1; switch (message.recentStickers) { default: return "recentStickers: enum value expected"; @@ -96408,7 +149593,9 @@ $root.proto = (function() { case 3: break; } - if (message.catalog != null && message.hasOwnProperty("catalog")) + } + if (message.catalog != null && message.hasOwnProperty("catalog")) { + properties._catalog = 1; switch (message.catalog) { default: return "catalog: enum value expected"; @@ -96418,7 +149605,9 @@ $root.proto = (function() { case 3: break; } - if (message.starredStickers != null && message.hasOwnProperty("starredStickers")) + } + if (message.starredStickers != null && message.hasOwnProperty("starredStickers")) { + properties._starredStickers = 1; switch (message.starredStickers) { default: return "starredStickers: enum value expected"; @@ -96428,7 +149617,9 @@ $root.proto = (function() { case 3: break; } - if (message.voipGroupCall != null && message.hasOwnProperty("voipGroupCall")) + } + if (message.voipGroupCall != null && message.hasOwnProperty("voipGroupCall")) { + properties._voipGroupCall = 1; switch (message.voipGroupCall) { default: return "voipGroupCall: enum value expected"; @@ -96438,7 +149629,9 @@ $root.proto = (function() { case 3: break; } - if (message.templateMessage != null && message.hasOwnProperty("templateMessage")) + } + if (message.templateMessage != null && message.hasOwnProperty("templateMessage")) { + properties._templateMessage = 1; switch (message.templateMessage) { default: return "templateMessage: enum value expected"; @@ -96448,7 +149641,9 @@ $root.proto = (function() { case 3: break; } - if (message.templateMessageInteractivity != null && message.hasOwnProperty("templateMessageInteractivity")) + } + if (message.templateMessageInteractivity != null && message.hasOwnProperty("templateMessageInteractivity")) { + properties._templateMessageInteractivity = 1; switch (message.templateMessageInteractivity) { default: return "templateMessageInteractivity: enum value expected"; @@ -96458,7 +149653,9 @@ $root.proto = (function() { case 3: break; } - if (message.ephemeralMessages != null && message.hasOwnProperty("ephemeralMessages")) + } + if (message.ephemeralMessages != null && message.hasOwnProperty("ephemeralMessages")) { + properties._ephemeralMessages = 1; switch (message.ephemeralMessages) { default: return "ephemeralMessages: enum value expected"; @@ -96468,7 +149665,9 @@ $root.proto = (function() { case 3: break; } - if (message.e2ENotificationSync != null && message.hasOwnProperty("e2ENotificationSync")) + } + if (message.e2ENotificationSync != null && message.hasOwnProperty("e2ENotificationSync")) { + properties._e2ENotificationSync = 1; switch (message.e2ENotificationSync) { default: return "e2ENotificationSync: enum value expected"; @@ -96478,7 +149677,9 @@ $root.proto = (function() { case 3: break; } - if (message.recentStickersV2 != null && message.hasOwnProperty("recentStickersV2")) + } + if (message.recentStickersV2 != null && message.hasOwnProperty("recentStickersV2")) { + properties._recentStickersV2 = 1; switch (message.recentStickersV2) { default: return "recentStickersV2: enum value expected"; @@ -96488,7 +149689,9 @@ $root.proto = (function() { case 3: break; } - if (message.recentStickersV3 != null && message.hasOwnProperty("recentStickersV3")) + } + if (message.recentStickersV3 != null && message.hasOwnProperty("recentStickersV3")) { + properties._recentStickersV3 = 1; switch (message.recentStickersV3) { default: return "recentStickersV3: enum value expected"; @@ -96498,7 +149701,9 @@ $root.proto = (function() { case 3: break; } - if (message.userNotice != null && message.hasOwnProperty("userNotice")) + } + if (message.userNotice != null && message.hasOwnProperty("userNotice")) { + properties._userNotice = 1; switch (message.userNotice) { default: return "userNotice: enum value expected"; @@ -96508,7 +149713,9 @@ $root.proto = (function() { case 3: break; } - if (message.support != null && message.hasOwnProperty("support")) + } + if (message.support != null && message.hasOwnProperty("support")) { + properties._support = 1; switch (message.support) { default: return "support: enum value expected"; @@ -96518,7 +149725,9 @@ $root.proto = (function() { case 3: break; } - if (message.groupUiiCleanup != null && message.hasOwnProperty("groupUiiCleanup")) + } + if (message.groupUiiCleanup != null && message.hasOwnProperty("groupUiiCleanup")) { + properties._groupUiiCleanup = 1; switch (message.groupUiiCleanup) { default: return "groupUiiCleanup: enum value expected"; @@ -96528,7 +149737,9 @@ $root.proto = (function() { case 3: break; } - if (message.groupDogfoodingInternalOnly != null && message.hasOwnProperty("groupDogfoodingInternalOnly")) + } + if (message.groupDogfoodingInternalOnly != null && message.hasOwnProperty("groupDogfoodingInternalOnly")) { + properties._groupDogfoodingInternalOnly = 1; switch (message.groupDogfoodingInternalOnly) { default: return "groupDogfoodingInternalOnly: enum value expected"; @@ -96538,7 +149749,9 @@ $root.proto = (function() { case 3: break; } - if (message.settingsSync != null && message.hasOwnProperty("settingsSync")) + } + if (message.settingsSync != null && message.hasOwnProperty("settingsSync")) { + properties._settingsSync = 1; switch (message.settingsSync) { default: return "settingsSync: enum value expected"; @@ -96548,7 +149761,9 @@ $root.proto = (function() { case 3: break; } - if (message.archiveV2 != null && message.hasOwnProperty("archiveV2")) + } + if (message.archiveV2 != null && message.hasOwnProperty("archiveV2")) { + properties._archiveV2 = 1; switch (message.archiveV2) { default: return "archiveV2: enum value expected"; @@ -96558,7 +149773,9 @@ $root.proto = (function() { case 3: break; } - if (message.ephemeralAllowGroupMembers != null && message.hasOwnProperty("ephemeralAllowGroupMembers")) + } + if (message.ephemeralAllowGroupMembers != null && message.hasOwnProperty("ephemeralAllowGroupMembers")) { + properties._ephemeralAllowGroupMembers = 1; switch (message.ephemeralAllowGroupMembers) { default: return "ephemeralAllowGroupMembers: enum value expected"; @@ -96568,7 +149785,9 @@ $root.proto = (function() { case 3: break; } - if (message.ephemeral24HDuration != null && message.hasOwnProperty("ephemeral24HDuration")) + } + if (message.ephemeral24HDuration != null && message.hasOwnProperty("ephemeral24HDuration")) { + properties._ephemeral24HDuration = 1; switch (message.ephemeral24HDuration) { default: return "ephemeral24HDuration: enum value expected"; @@ -96578,7 +149797,9 @@ $root.proto = (function() { case 3: break; } - if (message.mdForceUpgrade != null && message.hasOwnProperty("mdForceUpgrade")) + } + if (message.mdForceUpgrade != null && message.hasOwnProperty("mdForceUpgrade")) { + properties._mdForceUpgrade = 1; switch (message.mdForceUpgrade) { default: return "mdForceUpgrade: enum value expected"; @@ -96588,7 +149809,9 @@ $root.proto = (function() { case 3: break; } - if (message.disappearingMode != null && message.hasOwnProperty("disappearingMode")) + } + if (message.disappearingMode != null && message.hasOwnProperty("disappearingMode")) { + properties._disappearingMode = 1; switch (message.disappearingMode) { default: return "disappearingMode: enum value expected"; @@ -96598,7 +149821,9 @@ $root.proto = (function() { case 3: break; } - if (message.externalMdOptInAvailable != null && message.hasOwnProperty("externalMdOptInAvailable")) + } + if (message.externalMdOptInAvailable != null && message.hasOwnProperty("externalMdOptInAvailable")) { + properties._externalMdOptInAvailable = 1; switch (message.externalMdOptInAvailable) { default: return "externalMdOptInAvailable: enum value expected"; @@ -96608,7 +149833,9 @@ $root.proto = (function() { case 3: break; } - if (message.noDeleteMessageTimeLimit != null && message.hasOwnProperty("noDeleteMessageTimeLimit")) + } + if (message.noDeleteMessageTimeLimit != null && message.hasOwnProperty("noDeleteMessageTimeLimit")) { + properties._noDeleteMessageTimeLimit = 1; switch (message.noDeleteMessageTimeLimit) { default: return "noDeleteMessageTimeLimit: enum value expected"; @@ -96618,6 +149845,7 @@ $root.proto = (function() { case 3: break; } + } return null; }; @@ -96634,6 +149862,12 @@ $root.proto = (function() { return object; var message = new $root.proto.WebFeatures(); switch (object.labelsDisplay) { + default: + if (typeof object.labelsDisplay === "number") { + message.labelsDisplay = object.labelsDisplay; + break; + } + break; case "NOT_STARTED": case 0: message.labelsDisplay = 0; @@ -96652,6 +149886,12 @@ $root.proto = (function() { break; } switch (object.voipIndividualOutgoing) { + default: + if (typeof object.voipIndividualOutgoing === "number") { + message.voipIndividualOutgoing = object.voipIndividualOutgoing; + break; + } + break; case "NOT_STARTED": case 0: message.voipIndividualOutgoing = 0; @@ -96670,6 +149910,12 @@ $root.proto = (function() { break; } switch (object.groupsV3) { + default: + if (typeof object.groupsV3 === "number") { + message.groupsV3 = object.groupsV3; + break; + } + break; case "NOT_STARTED": case 0: message.groupsV3 = 0; @@ -96688,6 +149934,12 @@ $root.proto = (function() { break; } switch (object.groupsV3Create) { + default: + if (typeof object.groupsV3Create === "number") { + message.groupsV3Create = object.groupsV3Create; + break; + } + break; case "NOT_STARTED": case 0: message.groupsV3Create = 0; @@ -96706,6 +149958,12 @@ $root.proto = (function() { break; } switch (object.changeNumberV2) { + default: + if (typeof object.changeNumberV2 === "number") { + message.changeNumberV2 = object.changeNumberV2; + break; + } + break; case "NOT_STARTED": case 0: message.changeNumberV2 = 0; @@ -96724,6 +149982,12 @@ $root.proto = (function() { break; } switch (object.queryStatusV3Thumbnail) { + default: + if (typeof object.queryStatusV3Thumbnail === "number") { + message.queryStatusV3Thumbnail = object.queryStatusV3Thumbnail; + break; + } + break; case "NOT_STARTED": case 0: message.queryStatusV3Thumbnail = 0; @@ -96742,6 +150006,12 @@ $root.proto = (function() { break; } switch (object.liveLocations) { + default: + if (typeof object.liveLocations === "number") { + message.liveLocations = object.liveLocations; + break; + } + break; case "NOT_STARTED": case 0: message.liveLocations = 0; @@ -96760,6 +150030,12 @@ $root.proto = (function() { break; } switch (object.queryVname) { + default: + if (typeof object.queryVname === "number") { + message.queryVname = object.queryVname; + break; + } + break; case "NOT_STARTED": case 0: message.queryVname = 0; @@ -96778,6 +150054,12 @@ $root.proto = (function() { break; } switch (object.voipIndividualIncoming) { + default: + if (typeof object.voipIndividualIncoming === "number") { + message.voipIndividualIncoming = object.voipIndividualIncoming; + break; + } + break; case "NOT_STARTED": case 0: message.voipIndividualIncoming = 0; @@ -96796,6 +150078,12 @@ $root.proto = (function() { break; } switch (object.quickRepliesQuery) { + default: + if (typeof object.quickRepliesQuery === "number") { + message.quickRepliesQuery = object.quickRepliesQuery; + break; + } + break; case "NOT_STARTED": case 0: message.quickRepliesQuery = 0; @@ -96814,6 +150102,12 @@ $root.proto = (function() { break; } switch (object.payments) { + default: + if (typeof object.payments === "number") { + message.payments = object.payments; + break; + } + break; case "NOT_STARTED": case 0: message.payments = 0; @@ -96832,6 +150126,12 @@ $root.proto = (function() { break; } switch (object.stickerPackQuery) { + default: + if (typeof object.stickerPackQuery === "number") { + message.stickerPackQuery = object.stickerPackQuery; + break; + } + break; case "NOT_STARTED": case 0: message.stickerPackQuery = 0; @@ -96850,6 +150150,12 @@ $root.proto = (function() { break; } switch (object.liveLocationsFinal) { + default: + if (typeof object.liveLocationsFinal === "number") { + message.liveLocationsFinal = object.liveLocationsFinal; + break; + } + break; case "NOT_STARTED": case 0: message.liveLocationsFinal = 0; @@ -96868,6 +150174,12 @@ $root.proto = (function() { break; } switch (object.labelsEdit) { + default: + if (typeof object.labelsEdit === "number") { + message.labelsEdit = object.labelsEdit; + break; + } + break; case "NOT_STARTED": case 0: message.labelsEdit = 0; @@ -96886,6 +150198,12 @@ $root.proto = (function() { break; } switch (object.mediaUpload) { + default: + if (typeof object.mediaUpload === "number") { + message.mediaUpload = object.mediaUpload; + break; + } + break; case "NOT_STARTED": case 0: message.mediaUpload = 0; @@ -96904,6 +150222,12 @@ $root.proto = (function() { break; } switch (object.mediaUploadRichQuickReplies) { + default: + if (typeof object.mediaUploadRichQuickReplies === "number") { + message.mediaUploadRichQuickReplies = object.mediaUploadRichQuickReplies; + break; + } + break; case "NOT_STARTED": case 0: message.mediaUploadRichQuickReplies = 0; @@ -96922,6 +150246,12 @@ $root.proto = (function() { break; } switch (object.vnameV2) { + default: + if (typeof object.vnameV2 === "number") { + message.vnameV2 = object.vnameV2; + break; + } + break; case "NOT_STARTED": case 0: message.vnameV2 = 0; @@ -96940,6 +150270,12 @@ $root.proto = (function() { break; } switch (object.videoPlaybackUrl) { + default: + if (typeof object.videoPlaybackUrl === "number") { + message.videoPlaybackUrl = object.videoPlaybackUrl; + break; + } + break; case "NOT_STARTED": case 0: message.videoPlaybackUrl = 0; @@ -96958,6 +150294,12 @@ $root.proto = (function() { break; } switch (object.statusRanking) { + default: + if (typeof object.statusRanking === "number") { + message.statusRanking = object.statusRanking; + break; + } + break; case "NOT_STARTED": case 0: message.statusRanking = 0; @@ -96976,6 +150318,12 @@ $root.proto = (function() { break; } switch (object.voipIndividualVideo) { + default: + if (typeof object.voipIndividualVideo === "number") { + message.voipIndividualVideo = object.voipIndividualVideo; + break; + } + break; case "NOT_STARTED": case 0: message.voipIndividualVideo = 0; @@ -96994,6 +150342,12 @@ $root.proto = (function() { break; } switch (object.thirdPartyStickers) { + default: + if (typeof object.thirdPartyStickers === "number") { + message.thirdPartyStickers = object.thirdPartyStickers; + break; + } + break; case "NOT_STARTED": case 0: message.thirdPartyStickers = 0; @@ -97012,6 +150366,12 @@ $root.proto = (function() { break; } switch (object.frequentlyForwardedSetting) { + default: + if (typeof object.frequentlyForwardedSetting === "number") { + message.frequentlyForwardedSetting = object.frequentlyForwardedSetting; + break; + } + break; case "NOT_STARTED": case 0: message.frequentlyForwardedSetting = 0; @@ -97030,6 +150390,12 @@ $root.proto = (function() { break; } switch (object.groupsV4JoinPermission) { + default: + if (typeof object.groupsV4JoinPermission === "number") { + message.groupsV4JoinPermission = object.groupsV4JoinPermission; + break; + } + break; case "NOT_STARTED": case 0: message.groupsV4JoinPermission = 0; @@ -97048,6 +150414,12 @@ $root.proto = (function() { break; } switch (object.recentStickers) { + default: + if (typeof object.recentStickers === "number") { + message.recentStickers = object.recentStickers; + break; + } + break; case "NOT_STARTED": case 0: message.recentStickers = 0; @@ -97066,6 +150438,12 @@ $root.proto = (function() { break; } switch (object.catalog) { + default: + if (typeof object.catalog === "number") { + message.catalog = object.catalog; + break; + } + break; case "NOT_STARTED": case 0: message.catalog = 0; @@ -97084,6 +150462,12 @@ $root.proto = (function() { break; } switch (object.starredStickers) { + default: + if (typeof object.starredStickers === "number") { + message.starredStickers = object.starredStickers; + break; + } + break; case "NOT_STARTED": case 0: message.starredStickers = 0; @@ -97102,6 +150486,12 @@ $root.proto = (function() { break; } switch (object.voipGroupCall) { + default: + if (typeof object.voipGroupCall === "number") { + message.voipGroupCall = object.voipGroupCall; + break; + } + break; case "NOT_STARTED": case 0: message.voipGroupCall = 0; @@ -97120,6 +150510,12 @@ $root.proto = (function() { break; } switch (object.templateMessage) { + default: + if (typeof object.templateMessage === "number") { + message.templateMessage = object.templateMessage; + break; + } + break; case "NOT_STARTED": case 0: message.templateMessage = 0; @@ -97138,6 +150534,12 @@ $root.proto = (function() { break; } switch (object.templateMessageInteractivity) { + default: + if (typeof object.templateMessageInteractivity === "number") { + message.templateMessageInteractivity = object.templateMessageInteractivity; + break; + } + break; case "NOT_STARTED": case 0: message.templateMessageInteractivity = 0; @@ -97156,6 +150558,12 @@ $root.proto = (function() { break; } switch (object.ephemeralMessages) { + default: + if (typeof object.ephemeralMessages === "number") { + message.ephemeralMessages = object.ephemeralMessages; + break; + } + break; case "NOT_STARTED": case 0: message.ephemeralMessages = 0; @@ -97174,6 +150582,12 @@ $root.proto = (function() { break; } switch (object.e2ENotificationSync) { + default: + if (typeof object.e2ENotificationSync === "number") { + message.e2ENotificationSync = object.e2ENotificationSync; + break; + } + break; case "NOT_STARTED": case 0: message.e2ENotificationSync = 0; @@ -97192,6 +150606,12 @@ $root.proto = (function() { break; } switch (object.recentStickersV2) { + default: + if (typeof object.recentStickersV2 === "number") { + message.recentStickersV2 = object.recentStickersV2; + break; + } + break; case "NOT_STARTED": case 0: message.recentStickersV2 = 0; @@ -97210,6 +150630,12 @@ $root.proto = (function() { break; } switch (object.recentStickersV3) { + default: + if (typeof object.recentStickersV3 === "number") { + message.recentStickersV3 = object.recentStickersV3; + break; + } + break; case "NOT_STARTED": case 0: message.recentStickersV3 = 0; @@ -97228,6 +150654,12 @@ $root.proto = (function() { break; } switch (object.userNotice) { + default: + if (typeof object.userNotice === "number") { + message.userNotice = object.userNotice; + break; + } + break; case "NOT_STARTED": case 0: message.userNotice = 0; @@ -97246,6 +150678,12 @@ $root.proto = (function() { break; } switch (object.support) { + default: + if (typeof object.support === "number") { + message.support = object.support; + break; + } + break; case "NOT_STARTED": case 0: message.support = 0; @@ -97264,6 +150702,12 @@ $root.proto = (function() { break; } switch (object.groupUiiCleanup) { + default: + if (typeof object.groupUiiCleanup === "number") { + message.groupUiiCleanup = object.groupUiiCleanup; + break; + } + break; case "NOT_STARTED": case 0: message.groupUiiCleanup = 0; @@ -97282,6 +150726,12 @@ $root.proto = (function() { break; } switch (object.groupDogfoodingInternalOnly) { + default: + if (typeof object.groupDogfoodingInternalOnly === "number") { + message.groupDogfoodingInternalOnly = object.groupDogfoodingInternalOnly; + break; + } + break; case "NOT_STARTED": case 0: message.groupDogfoodingInternalOnly = 0; @@ -97300,6 +150750,12 @@ $root.proto = (function() { break; } switch (object.settingsSync) { + default: + if (typeof object.settingsSync === "number") { + message.settingsSync = object.settingsSync; + break; + } + break; case "NOT_STARTED": case 0: message.settingsSync = 0; @@ -97318,6 +150774,12 @@ $root.proto = (function() { break; } switch (object.archiveV2) { + default: + if (typeof object.archiveV2 === "number") { + message.archiveV2 = object.archiveV2; + break; + } + break; case "NOT_STARTED": case 0: message.archiveV2 = 0; @@ -97336,6 +150798,12 @@ $root.proto = (function() { break; } switch (object.ephemeralAllowGroupMembers) { + default: + if (typeof object.ephemeralAllowGroupMembers === "number") { + message.ephemeralAllowGroupMembers = object.ephemeralAllowGroupMembers; + break; + } + break; case "NOT_STARTED": case 0: message.ephemeralAllowGroupMembers = 0; @@ -97354,6 +150822,12 @@ $root.proto = (function() { break; } switch (object.ephemeral24HDuration) { + default: + if (typeof object.ephemeral24HDuration === "number") { + message.ephemeral24HDuration = object.ephemeral24HDuration; + break; + } + break; case "NOT_STARTED": case 0: message.ephemeral24HDuration = 0; @@ -97372,6 +150846,12 @@ $root.proto = (function() { break; } switch (object.mdForceUpgrade) { + default: + if (typeof object.mdForceUpgrade === "number") { + message.mdForceUpgrade = object.mdForceUpgrade; + break; + } + break; case "NOT_STARTED": case 0: message.mdForceUpgrade = 0; @@ -97390,6 +150870,12 @@ $root.proto = (function() { break; } switch (object.disappearingMode) { + default: + if (typeof object.disappearingMode === "number") { + message.disappearingMode = object.disappearingMode; + break; + } + break; case "NOT_STARTED": case 0: message.disappearingMode = 0; @@ -97408,6 +150894,12 @@ $root.proto = (function() { break; } switch (object.externalMdOptInAvailable) { + default: + if (typeof object.externalMdOptInAvailable === "number") { + message.externalMdOptInAvailable = object.externalMdOptInAvailable; + break; + } + break; case "NOT_STARTED": case 0: message.externalMdOptInAvailable = 0; @@ -97426,6 +150918,12 @@ $root.proto = (function() { break; } switch (object.noDeleteMessageTimeLimit) { + default: + if (typeof object.noDeleteMessageTimeLimit === "number") { + message.noDeleteMessageTimeLimit = object.noDeleteMessageTimeLimit; + break; + } + break; case "NOT_STARTED": case 0: message.noDeleteMessageTimeLimit = 0; @@ -97459,143 +150957,231 @@ $root.proto = (function() { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.labelsDisplay = options.enums === String ? "NOT_STARTED" : 0; - object.voipIndividualOutgoing = options.enums === String ? "NOT_STARTED" : 0; - object.groupsV3 = options.enums === String ? "NOT_STARTED" : 0; - object.groupsV3Create = options.enums === String ? "NOT_STARTED" : 0; - object.changeNumberV2 = options.enums === String ? "NOT_STARTED" : 0; - object.queryStatusV3Thumbnail = options.enums === String ? "NOT_STARTED" : 0; - object.liveLocations = options.enums === String ? "NOT_STARTED" : 0; - object.queryVname = options.enums === String ? "NOT_STARTED" : 0; - object.voipIndividualIncoming = options.enums === String ? "NOT_STARTED" : 0; - object.quickRepliesQuery = options.enums === String ? "NOT_STARTED" : 0; - object.payments = options.enums === String ? "NOT_STARTED" : 0; - object.stickerPackQuery = options.enums === String ? "NOT_STARTED" : 0; - object.liveLocationsFinal = options.enums === String ? "NOT_STARTED" : 0; - object.labelsEdit = options.enums === String ? "NOT_STARTED" : 0; - object.mediaUpload = options.enums === String ? "NOT_STARTED" : 0; - object.mediaUploadRichQuickReplies = options.enums === String ? "NOT_STARTED" : 0; - object.vnameV2 = options.enums === String ? "NOT_STARTED" : 0; - object.videoPlaybackUrl = options.enums === String ? "NOT_STARTED" : 0; - object.statusRanking = options.enums === String ? "NOT_STARTED" : 0; - object.voipIndividualVideo = options.enums === String ? "NOT_STARTED" : 0; - object.thirdPartyStickers = options.enums === String ? "NOT_STARTED" : 0; - object.frequentlyForwardedSetting = options.enums === String ? "NOT_STARTED" : 0; - object.groupsV4JoinPermission = options.enums === String ? "NOT_STARTED" : 0; - object.recentStickers = options.enums === String ? "NOT_STARTED" : 0; - object.catalog = options.enums === String ? "NOT_STARTED" : 0; - object.starredStickers = options.enums === String ? "NOT_STARTED" : 0; - object.voipGroupCall = options.enums === String ? "NOT_STARTED" : 0; - object.templateMessage = options.enums === String ? "NOT_STARTED" : 0; - object.templateMessageInteractivity = options.enums === String ? "NOT_STARTED" : 0; - object.ephemeralMessages = options.enums === String ? "NOT_STARTED" : 0; - object.e2ENotificationSync = options.enums === String ? "NOT_STARTED" : 0; - object.recentStickersV2 = options.enums === String ? "NOT_STARTED" : 0; - object.recentStickersV3 = options.enums === String ? "NOT_STARTED" : 0; - object.userNotice = options.enums === String ? "NOT_STARTED" : 0; - object.support = options.enums === String ? "NOT_STARTED" : 0; - object.groupUiiCleanup = options.enums === String ? "NOT_STARTED" : 0; - object.groupDogfoodingInternalOnly = options.enums === String ? "NOT_STARTED" : 0; - object.settingsSync = options.enums === String ? "NOT_STARTED" : 0; - object.archiveV2 = options.enums === String ? "NOT_STARTED" : 0; - object.ephemeralAllowGroupMembers = options.enums === String ? "NOT_STARTED" : 0; - object.ephemeral24HDuration = options.enums === String ? "NOT_STARTED" : 0; - object.mdForceUpgrade = options.enums === String ? "NOT_STARTED" : 0; - object.disappearingMode = options.enums === String ? "NOT_STARTED" : 0; - object.externalMdOptInAvailable = options.enums === String ? "NOT_STARTED" : 0; - object.noDeleteMessageTimeLimit = options.enums === String ? "NOT_STARTED" : 0; + if (message.labelsDisplay != null && message.hasOwnProperty("labelsDisplay")) { + object.labelsDisplay = options.enums === String ? $root.proto.WebFeatures.Flag[message.labelsDisplay] === undefined ? message.labelsDisplay : $root.proto.WebFeatures.Flag[message.labelsDisplay] : message.labelsDisplay; + if (options.oneofs) + object._labelsDisplay = "labelsDisplay"; + } + if (message.voipIndividualOutgoing != null && message.hasOwnProperty("voipIndividualOutgoing")) { + object.voipIndividualOutgoing = options.enums === String ? $root.proto.WebFeatures.Flag[message.voipIndividualOutgoing] === undefined ? message.voipIndividualOutgoing : $root.proto.WebFeatures.Flag[message.voipIndividualOutgoing] : message.voipIndividualOutgoing; + if (options.oneofs) + object._voipIndividualOutgoing = "voipIndividualOutgoing"; + } + if (message.groupsV3 != null && message.hasOwnProperty("groupsV3")) { + object.groupsV3 = options.enums === String ? $root.proto.WebFeatures.Flag[message.groupsV3] === undefined ? message.groupsV3 : $root.proto.WebFeatures.Flag[message.groupsV3] : message.groupsV3; + if (options.oneofs) + object._groupsV3 = "groupsV3"; + } + if (message.groupsV3Create != null && message.hasOwnProperty("groupsV3Create")) { + object.groupsV3Create = options.enums === String ? $root.proto.WebFeatures.Flag[message.groupsV3Create] === undefined ? message.groupsV3Create : $root.proto.WebFeatures.Flag[message.groupsV3Create] : message.groupsV3Create; + if (options.oneofs) + object._groupsV3Create = "groupsV3Create"; + } + if (message.changeNumberV2 != null && message.hasOwnProperty("changeNumberV2")) { + object.changeNumberV2 = options.enums === String ? $root.proto.WebFeatures.Flag[message.changeNumberV2] === undefined ? message.changeNumberV2 : $root.proto.WebFeatures.Flag[message.changeNumberV2] : message.changeNumberV2; + if (options.oneofs) + object._changeNumberV2 = "changeNumberV2"; + } + if (message.queryStatusV3Thumbnail != null && message.hasOwnProperty("queryStatusV3Thumbnail")) { + object.queryStatusV3Thumbnail = options.enums === String ? $root.proto.WebFeatures.Flag[message.queryStatusV3Thumbnail] === undefined ? message.queryStatusV3Thumbnail : $root.proto.WebFeatures.Flag[message.queryStatusV3Thumbnail] : message.queryStatusV3Thumbnail; + if (options.oneofs) + object._queryStatusV3Thumbnail = "queryStatusV3Thumbnail"; + } + if (message.liveLocations != null && message.hasOwnProperty("liveLocations")) { + object.liveLocations = options.enums === String ? $root.proto.WebFeatures.Flag[message.liveLocations] === undefined ? message.liveLocations : $root.proto.WebFeatures.Flag[message.liveLocations] : message.liveLocations; + if (options.oneofs) + object._liveLocations = "liveLocations"; + } + if (message.queryVname != null && message.hasOwnProperty("queryVname")) { + object.queryVname = options.enums === String ? $root.proto.WebFeatures.Flag[message.queryVname] === undefined ? message.queryVname : $root.proto.WebFeatures.Flag[message.queryVname] : message.queryVname; + if (options.oneofs) + object._queryVname = "queryVname"; + } + if (message.voipIndividualIncoming != null && message.hasOwnProperty("voipIndividualIncoming")) { + object.voipIndividualIncoming = options.enums === String ? $root.proto.WebFeatures.Flag[message.voipIndividualIncoming] === undefined ? message.voipIndividualIncoming : $root.proto.WebFeatures.Flag[message.voipIndividualIncoming] : message.voipIndividualIncoming; + if (options.oneofs) + object._voipIndividualIncoming = "voipIndividualIncoming"; + } + if (message.quickRepliesQuery != null && message.hasOwnProperty("quickRepliesQuery")) { + object.quickRepliesQuery = options.enums === String ? $root.proto.WebFeatures.Flag[message.quickRepliesQuery] === undefined ? message.quickRepliesQuery : $root.proto.WebFeatures.Flag[message.quickRepliesQuery] : message.quickRepliesQuery; + if (options.oneofs) + object._quickRepliesQuery = "quickRepliesQuery"; + } + if (message.payments != null && message.hasOwnProperty("payments")) { + object.payments = options.enums === String ? $root.proto.WebFeatures.Flag[message.payments] === undefined ? message.payments : $root.proto.WebFeatures.Flag[message.payments] : message.payments; + if (options.oneofs) + object._payments = "payments"; + } + if (message.stickerPackQuery != null && message.hasOwnProperty("stickerPackQuery")) { + object.stickerPackQuery = options.enums === String ? $root.proto.WebFeatures.Flag[message.stickerPackQuery] === undefined ? message.stickerPackQuery : $root.proto.WebFeatures.Flag[message.stickerPackQuery] : message.stickerPackQuery; + if (options.oneofs) + object._stickerPackQuery = "stickerPackQuery"; + } + if (message.liveLocationsFinal != null && message.hasOwnProperty("liveLocationsFinal")) { + object.liveLocationsFinal = options.enums === String ? $root.proto.WebFeatures.Flag[message.liveLocationsFinal] === undefined ? message.liveLocationsFinal : $root.proto.WebFeatures.Flag[message.liveLocationsFinal] : message.liveLocationsFinal; + if (options.oneofs) + object._liveLocationsFinal = "liveLocationsFinal"; + } + if (message.labelsEdit != null && message.hasOwnProperty("labelsEdit")) { + object.labelsEdit = options.enums === String ? $root.proto.WebFeatures.Flag[message.labelsEdit] === undefined ? message.labelsEdit : $root.proto.WebFeatures.Flag[message.labelsEdit] : message.labelsEdit; + if (options.oneofs) + object._labelsEdit = "labelsEdit"; + } + if (message.mediaUpload != null && message.hasOwnProperty("mediaUpload")) { + object.mediaUpload = options.enums === String ? $root.proto.WebFeatures.Flag[message.mediaUpload] === undefined ? message.mediaUpload : $root.proto.WebFeatures.Flag[message.mediaUpload] : message.mediaUpload; + if (options.oneofs) + object._mediaUpload = "mediaUpload"; + } + if (message.mediaUploadRichQuickReplies != null && message.hasOwnProperty("mediaUploadRichQuickReplies")) { + object.mediaUploadRichQuickReplies = options.enums === String ? $root.proto.WebFeatures.Flag[message.mediaUploadRichQuickReplies] === undefined ? message.mediaUploadRichQuickReplies : $root.proto.WebFeatures.Flag[message.mediaUploadRichQuickReplies] : message.mediaUploadRichQuickReplies; + if (options.oneofs) + object._mediaUploadRichQuickReplies = "mediaUploadRichQuickReplies"; + } + if (message.vnameV2 != null && message.hasOwnProperty("vnameV2")) { + object.vnameV2 = options.enums === String ? $root.proto.WebFeatures.Flag[message.vnameV2] === undefined ? message.vnameV2 : $root.proto.WebFeatures.Flag[message.vnameV2] : message.vnameV2; + if (options.oneofs) + object._vnameV2 = "vnameV2"; + } + if (message.videoPlaybackUrl != null && message.hasOwnProperty("videoPlaybackUrl")) { + object.videoPlaybackUrl = options.enums === String ? $root.proto.WebFeatures.Flag[message.videoPlaybackUrl] === undefined ? message.videoPlaybackUrl : $root.proto.WebFeatures.Flag[message.videoPlaybackUrl] : message.videoPlaybackUrl; + if (options.oneofs) + object._videoPlaybackUrl = "videoPlaybackUrl"; + } + if (message.statusRanking != null && message.hasOwnProperty("statusRanking")) { + object.statusRanking = options.enums === String ? $root.proto.WebFeatures.Flag[message.statusRanking] === undefined ? message.statusRanking : $root.proto.WebFeatures.Flag[message.statusRanking] : message.statusRanking; + if (options.oneofs) + object._statusRanking = "statusRanking"; + } + if (message.voipIndividualVideo != null && message.hasOwnProperty("voipIndividualVideo")) { + object.voipIndividualVideo = options.enums === String ? $root.proto.WebFeatures.Flag[message.voipIndividualVideo] === undefined ? message.voipIndividualVideo : $root.proto.WebFeatures.Flag[message.voipIndividualVideo] : message.voipIndividualVideo; + if (options.oneofs) + object._voipIndividualVideo = "voipIndividualVideo"; + } + if (message.thirdPartyStickers != null && message.hasOwnProperty("thirdPartyStickers")) { + object.thirdPartyStickers = options.enums === String ? $root.proto.WebFeatures.Flag[message.thirdPartyStickers] === undefined ? message.thirdPartyStickers : $root.proto.WebFeatures.Flag[message.thirdPartyStickers] : message.thirdPartyStickers; + if (options.oneofs) + object._thirdPartyStickers = "thirdPartyStickers"; + } + if (message.frequentlyForwardedSetting != null && message.hasOwnProperty("frequentlyForwardedSetting")) { + object.frequentlyForwardedSetting = options.enums === String ? $root.proto.WebFeatures.Flag[message.frequentlyForwardedSetting] === undefined ? message.frequentlyForwardedSetting : $root.proto.WebFeatures.Flag[message.frequentlyForwardedSetting] : message.frequentlyForwardedSetting; + if (options.oneofs) + object._frequentlyForwardedSetting = "frequentlyForwardedSetting"; + } + if (message.groupsV4JoinPermission != null && message.hasOwnProperty("groupsV4JoinPermission")) { + object.groupsV4JoinPermission = options.enums === String ? $root.proto.WebFeatures.Flag[message.groupsV4JoinPermission] === undefined ? message.groupsV4JoinPermission : $root.proto.WebFeatures.Flag[message.groupsV4JoinPermission] : message.groupsV4JoinPermission; + if (options.oneofs) + object._groupsV4JoinPermission = "groupsV4JoinPermission"; + } + if (message.recentStickers != null && message.hasOwnProperty("recentStickers")) { + object.recentStickers = options.enums === String ? $root.proto.WebFeatures.Flag[message.recentStickers] === undefined ? message.recentStickers : $root.proto.WebFeatures.Flag[message.recentStickers] : message.recentStickers; + if (options.oneofs) + object._recentStickers = "recentStickers"; + } + if (message.catalog != null && message.hasOwnProperty("catalog")) { + object.catalog = options.enums === String ? $root.proto.WebFeatures.Flag[message.catalog] === undefined ? message.catalog : $root.proto.WebFeatures.Flag[message.catalog] : message.catalog; + if (options.oneofs) + object._catalog = "catalog"; + } + if (message.starredStickers != null && message.hasOwnProperty("starredStickers")) { + object.starredStickers = options.enums === String ? $root.proto.WebFeatures.Flag[message.starredStickers] === undefined ? message.starredStickers : $root.proto.WebFeatures.Flag[message.starredStickers] : message.starredStickers; + if (options.oneofs) + object._starredStickers = "starredStickers"; + } + if (message.voipGroupCall != null && message.hasOwnProperty("voipGroupCall")) { + object.voipGroupCall = options.enums === String ? $root.proto.WebFeatures.Flag[message.voipGroupCall] === undefined ? message.voipGroupCall : $root.proto.WebFeatures.Flag[message.voipGroupCall] : message.voipGroupCall; + if (options.oneofs) + object._voipGroupCall = "voipGroupCall"; + } + if (message.templateMessage != null && message.hasOwnProperty("templateMessage")) { + object.templateMessage = options.enums === String ? $root.proto.WebFeatures.Flag[message.templateMessage] === undefined ? message.templateMessage : $root.proto.WebFeatures.Flag[message.templateMessage] : message.templateMessage; + if (options.oneofs) + object._templateMessage = "templateMessage"; + } + if (message.templateMessageInteractivity != null && message.hasOwnProperty("templateMessageInteractivity")) { + object.templateMessageInteractivity = options.enums === String ? $root.proto.WebFeatures.Flag[message.templateMessageInteractivity] === undefined ? message.templateMessageInteractivity : $root.proto.WebFeatures.Flag[message.templateMessageInteractivity] : message.templateMessageInteractivity; + if (options.oneofs) + object._templateMessageInteractivity = "templateMessageInteractivity"; + } + if (message.ephemeralMessages != null && message.hasOwnProperty("ephemeralMessages")) { + object.ephemeralMessages = options.enums === String ? $root.proto.WebFeatures.Flag[message.ephemeralMessages] === undefined ? message.ephemeralMessages : $root.proto.WebFeatures.Flag[message.ephemeralMessages] : message.ephemeralMessages; + if (options.oneofs) + object._ephemeralMessages = "ephemeralMessages"; + } + if (message.e2ENotificationSync != null && message.hasOwnProperty("e2ENotificationSync")) { + object.e2ENotificationSync = options.enums === String ? $root.proto.WebFeatures.Flag[message.e2ENotificationSync] === undefined ? message.e2ENotificationSync : $root.proto.WebFeatures.Flag[message.e2ENotificationSync] : message.e2ENotificationSync; + if (options.oneofs) + object._e2ENotificationSync = "e2ENotificationSync"; + } + if (message.recentStickersV2 != null && message.hasOwnProperty("recentStickersV2")) { + object.recentStickersV2 = options.enums === String ? $root.proto.WebFeatures.Flag[message.recentStickersV2] === undefined ? message.recentStickersV2 : $root.proto.WebFeatures.Flag[message.recentStickersV2] : message.recentStickersV2; + if (options.oneofs) + object._recentStickersV2 = "recentStickersV2"; + } + if (message.recentStickersV3 != null && message.hasOwnProperty("recentStickersV3")) { + object.recentStickersV3 = options.enums === String ? $root.proto.WebFeatures.Flag[message.recentStickersV3] === undefined ? message.recentStickersV3 : $root.proto.WebFeatures.Flag[message.recentStickersV3] : message.recentStickersV3; + if (options.oneofs) + object._recentStickersV3 = "recentStickersV3"; + } + if (message.userNotice != null && message.hasOwnProperty("userNotice")) { + object.userNotice = options.enums === String ? $root.proto.WebFeatures.Flag[message.userNotice] === undefined ? message.userNotice : $root.proto.WebFeatures.Flag[message.userNotice] : message.userNotice; + if (options.oneofs) + object._userNotice = "userNotice"; + } + if (message.support != null && message.hasOwnProperty("support")) { + object.support = options.enums === String ? $root.proto.WebFeatures.Flag[message.support] === undefined ? message.support : $root.proto.WebFeatures.Flag[message.support] : message.support; + if (options.oneofs) + object._support = "support"; + } + if (message.groupUiiCleanup != null && message.hasOwnProperty("groupUiiCleanup")) { + object.groupUiiCleanup = options.enums === String ? $root.proto.WebFeatures.Flag[message.groupUiiCleanup] === undefined ? message.groupUiiCleanup : $root.proto.WebFeatures.Flag[message.groupUiiCleanup] : message.groupUiiCleanup; + if (options.oneofs) + object._groupUiiCleanup = "groupUiiCleanup"; + } + if (message.groupDogfoodingInternalOnly != null && message.hasOwnProperty("groupDogfoodingInternalOnly")) { + object.groupDogfoodingInternalOnly = options.enums === String ? $root.proto.WebFeatures.Flag[message.groupDogfoodingInternalOnly] === undefined ? message.groupDogfoodingInternalOnly : $root.proto.WebFeatures.Flag[message.groupDogfoodingInternalOnly] : message.groupDogfoodingInternalOnly; + if (options.oneofs) + object._groupDogfoodingInternalOnly = "groupDogfoodingInternalOnly"; + } + if (message.settingsSync != null && message.hasOwnProperty("settingsSync")) { + object.settingsSync = options.enums === String ? $root.proto.WebFeatures.Flag[message.settingsSync] === undefined ? message.settingsSync : $root.proto.WebFeatures.Flag[message.settingsSync] : message.settingsSync; + if (options.oneofs) + object._settingsSync = "settingsSync"; + } + if (message.archiveV2 != null && message.hasOwnProperty("archiveV2")) { + object.archiveV2 = options.enums === String ? $root.proto.WebFeatures.Flag[message.archiveV2] === undefined ? message.archiveV2 : $root.proto.WebFeatures.Flag[message.archiveV2] : message.archiveV2; + if (options.oneofs) + object._archiveV2 = "archiveV2"; + } + if (message.ephemeralAllowGroupMembers != null && message.hasOwnProperty("ephemeralAllowGroupMembers")) { + object.ephemeralAllowGroupMembers = options.enums === String ? $root.proto.WebFeatures.Flag[message.ephemeralAllowGroupMembers] === undefined ? message.ephemeralAllowGroupMembers : $root.proto.WebFeatures.Flag[message.ephemeralAllowGroupMembers] : message.ephemeralAllowGroupMembers; + if (options.oneofs) + object._ephemeralAllowGroupMembers = "ephemeralAllowGroupMembers"; + } + if (message.ephemeral24HDuration != null && message.hasOwnProperty("ephemeral24HDuration")) { + object.ephemeral24HDuration = options.enums === String ? $root.proto.WebFeatures.Flag[message.ephemeral24HDuration] === undefined ? message.ephemeral24HDuration : $root.proto.WebFeatures.Flag[message.ephemeral24HDuration] : message.ephemeral24HDuration; + if (options.oneofs) + object._ephemeral24HDuration = "ephemeral24HDuration"; + } + if (message.mdForceUpgrade != null && message.hasOwnProperty("mdForceUpgrade")) { + object.mdForceUpgrade = options.enums === String ? $root.proto.WebFeatures.Flag[message.mdForceUpgrade] === undefined ? message.mdForceUpgrade : $root.proto.WebFeatures.Flag[message.mdForceUpgrade] : message.mdForceUpgrade; + if (options.oneofs) + object._mdForceUpgrade = "mdForceUpgrade"; + } + if (message.disappearingMode != null && message.hasOwnProperty("disappearingMode")) { + object.disappearingMode = options.enums === String ? $root.proto.WebFeatures.Flag[message.disappearingMode] === undefined ? message.disappearingMode : $root.proto.WebFeatures.Flag[message.disappearingMode] : message.disappearingMode; + if (options.oneofs) + object._disappearingMode = "disappearingMode"; + } + if (message.externalMdOptInAvailable != null && message.hasOwnProperty("externalMdOptInAvailable")) { + object.externalMdOptInAvailable = options.enums === String ? $root.proto.WebFeatures.Flag[message.externalMdOptInAvailable] === undefined ? message.externalMdOptInAvailable : $root.proto.WebFeatures.Flag[message.externalMdOptInAvailable] : message.externalMdOptInAvailable; + if (options.oneofs) + object._externalMdOptInAvailable = "externalMdOptInAvailable"; + } + if (message.noDeleteMessageTimeLimit != null && message.hasOwnProperty("noDeleteMessageTimeLimit")) { + object.noDeleteMessageTimeLimit = options.enums === String ? $root.proto.WebFeatures.Flag[message.noDeleteMessageTimeLimit] === undefined ? message.noDeleteMessageTimeLimit : $root.proto.WebFeatures.Flag[message.noDeleteMessageTimeLimit] : message.noDeleteMessageTimeLimit; + if (options.oneofs) + object._noDeleteMessageTimeLimit = "noDeleteMessageTimeLimit"; } - if (message.labelsDisplay != null && message.hasOwnProperty("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.Flag[message.voipIndividualOutgoing] : message.voipIndividualOutgoing; - if (message.groupsV3 != null && message.hasOwnProperty("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.Flag[message.groupsV3Create] : message.groupsV3Create; - if (message.changeNumberV2 != null && message.hasOwnProperty("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.Flag[message.queryStatusV3Thumbnail] : message.queryStatusV3Thumbnail; - if (message.liveLocations != null && message.hasOwnProperty("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.Flag[message.queryVname] : message.queryVname; - if (message.voipIndividualIncoming != null && message.hasOwnProperty("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.Flag[message.quickRepliesQuery] : message.quickRepliesQuery; - if (message.payments != null && message.hasOwnProperty("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.Flag[message.stickerPackQuery] : message.stickerPackQuery; - if (message.liveLocationsFinal != null && message.hasOwnProperty("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.Flag[message.labelsEdit] : message.labelsEdit; - if (message.mediaUpload != null && message.hasOwnProperty("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.Flag[message.mediaUploadRichQuickReplies] : message.mediaUploadRichQuickReplies; - if (message.vnameV2 != null && message.hasOwnProperty("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.Flag[message.videoPlaybackUrl] : message.videoPlaybackUrl; - if (message.statusRanking != null && message.hasOwnProperty("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.Flag[message.voipIndividualVideo] : message.voipIndividualVideo; - if (message.thirdPartyStickers != null && message.hasOwnProperty("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.Flag[message.frequentlyForwardedSetting] : message.frequentlyForwardedSetting; - if (message.groupsV4JoinPermission != null && message.hasOwnProperty("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.Flag[message.recentStickers] : message.recentStickers; - if (message.catalog != null && message.hasOwnProperty("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.Flag[message.starredStickers] : message.starredStickers; - if (message.voipGroupCall != null && message.hasOwnProperty("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.Flag[message.templateMessage] : message.templateMessage; - if (message.templateMessageInteractivity != null && message.hasOwnProperty("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.Flag[message.ephemeralMessages] : message.ephemeralMessages; - if (message.e2ENotificationSync != null && message.hasOwnProperty("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.Flag[message.recentStickersV2] : message.recentStickersV2; - if (message.recentStickersV3 != null && message.hasOwnProperty("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.Flag[message.userNotice] : message.userNotice; - if (message.support != null && message.hasOwnProperty("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.Flag[message.groupUiiCleanup] : message.groupUiiCleanup; - if (message.groupDogfoodingInternalOnly != null && message.hasOwnProperty("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.Flag[message.settingsSync] : message.settingsSync; - if (message.archiveV2 != null && message.hasOwnProperty("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.Flag[message.ephemeralAllowGroupMembers] : message.ephemeralAllowGroupMembers; - if (message.ephemeral24HDuration != null && message.hasOwnProperty("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.Flag[message.mdForceUpgrade] : message.mdForceUpgrade; - if (message.disappearingMode != null && message.hasOwnProperty("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.Flag[message.externalMdOptInAvailable] : message.externalMdOptInAvailable; - if (message.noDeleteMessageTimeLimit != null && message.hasOwnProperty("noDeleteMessageTimeLimit")) - object.noDeleteMessageTimeLimit = options.enums === String ? $root.proto.WebFeatures.Flag[message.noDeleteMessageTimeLimit] : message.noDeleteMessageTimeLimit; return object; }; @@ -97610,6 +151196,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for WebFeatures + * @function getTypeUrl + * @memberof proto.WebFeatures + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WebFeatures.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.WebFeatures"; + }; + /** * Flag enum. * @name proto.WebFeatures.Flag @@ -97689,6 +151290,16 @@ $root.proto = (function() { * @property {Array.|null} [eventResponses] WebMessageInfo eventResponses * @property {proto.IReportingTokenInfo|null} [reportingTokenInfo] WebMessageInfo reportingTokenInfo * @property {number|Long|null} [newsletterServerId] WebMessageInfo newsletterServerId + * @property {proto.IEventAdditionalMetadata|null} [eventAdditionalMetadata] WebMessageInfo eventAdditionalMetadata + * @property {boolean|null} [isMentionedInStatus] WebMessageInfo isMentionedInStatus + * @property {Array.|null} [statusMentions] WebMessageInfo statusMentions + * @property {proto.IMessageKey|null} [targetMessageId] WebMessageInfo targetMessageId + * @property {Array.|null} [messageAddOns] WebMessageInfo messageAddOns + * @property {proto.IStatusMentionMessage|null} [statusMentionMessageInfo] WebMessageInfo statusMentionMessageInfo + * @property {boolean|null} [isSupportAiMessage] WebMessageInfo isSupportAiMessage + * @property {Array.|null} [statusMentionSources] WebMessageInfo statusMentionSources + * @property {Array.|null} [supportAiCitations] WebMessageInfo supportAiCitations + * @property {string|null} [botTargetId] WebMessageInfo botTargetId */ /** @@ -97706,6 +151317,10 @@ $root.proto = (function() { this.reactions = []; this.pollUpdates = []; this.eventResponses = []; + this.statusMentions = []; + this.messageAddOns = []; + this.statusMentionSources = []; + this.supportAiCitations = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -97730,115 +151345,115 @@ $root.proto = (function() { /** * WebMessageInfo messageTimestamp. - * @member {number|Long} messageTimestamp + * @member {number|Long|null|undefined} messageTimestamp * @memberof proto.WebMessageInfo * @instance */ - WebMessageInfo.prototype.messageTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + WebMessageInfo.prototype.messageTimestamp = null; /** * WebMessageInfo status. - * @member {proto.WebMessageInfo.Status} status + * @member {proto.WebMessageInfo.Status|null|undefined} status * @memberof proto.WebMessageInfo * @instance */ - WebMessageInfo.prototype.status = 0; + WebMessageInfo.prototype.status = null; /** * WebMessageInfo participant. - * @member {string} participant + * @member {string|null|undefined} participant * @memberof proto.WebMessageInfo * @instance */ - WebMessageInfo.prototype.participant = ""; + WebMessageInfo.prototype.participant = null; /** * WebMessageInfo messageC2STimestamp. - * @member {number|Long} messageC2STimestamp + * @member {number|Long|null|undefined} messageC2STimestamp * @memberof proto.WebMessageInfo * @instance */ - WebMessageInfo.prototype.messageC2STimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + WebMessageInfo.prototype.messageC2STimestamp = null; /** * WebMessageInfo ignore. - * @member {boolean} ignore + * @member {boolean|null|undefined} ignore * @memberof proto.WebMessageInfo * @instance */ - WebMessageInfo.prototype.ignore = false; + WebMessageInfo.prototype.ignore = null; /** * WebMessageInfo starred. - * @member {boolean} starred + * @member {boolean|null|undefined} starred * @memberof proto.WebMessageInfo * @instance */ - WebMessageInfo.prototype.starred = false; + WebMessageInfo.prototype.starred = null; /** * WebMessageInfo broadcast. - * @member {boolean} broadcast + * @member {boolean|null|undefined} broadcast * @memberof proto.WebMessageInfo * @instance */ - WebMessageInfo.prototype.broadcast = false; + WebMessageInfo.prototype.broadcast = null; /** * WebMessageInfo pushName. - * @member {string} pushName + * @member {string|null|undefined} pushName * @memberof proto.WebMessageInfo * @instance */ - WebMessageInfo.prototype.pushName = ""; + WebMessageInfo.prototype.pushName = null; /** * WebMessageInfo mediaCiphertextSha256. - * @member {Uint8Array} mediaCiphertextSha256 + * @member {Uint8Array|null|undefined} mediaCiphertextSha256 * @memberof proto.WebMessageInfo * @instance */ - WebMessageInfo.prototype.mediaCiphertextSha256 = $util.newBuffer([]); + WebMessageInfo.prototype.mediaCiphertextSha256 = null; /** * WebMessageInfo multicast. - * @member {boolean} multicast + * @member {boolean|null|undefined} multicast * @memberof proto.WebMessageInfo * @instance */ - WebMessageInfo.prototype.multicast = false; + WebMessageInfo.prototype.multicast = null; /** * WebMessageInfo urlText. - * @member {boolean} urlText + * @member {boolean|null|undefined} urlText * @memberof proto.WebMessageInfo * @instance */ - WebMessageInfo.prototype.urlText = false; + WebMessageInfo.prototype.urlText = null; /** * WebMessageInfo urlNumber. - * @member {boolean} urlNumber + * @member {boolean|null|undefined} urlNumber * @memberof proto.WebMessageInfo * @instance */ - WebMessageInfo.prototype.urlNumber = false; + WebMessageInfo.prototype.urlNumber = null; /** * WebMessageInfo messageStubType. - * @member {proto.WebMessageInfo.StubType} messageStubType + * @member {proto.WebMessageInfo.StubType|null|undefined} messageStubType * @memberof proto.WebMessageInfo * @instance */ - WebMessageInfo.prototype.messageStubType = 0; + WebMessageInfo.prototype.messageStubType = null; /** * WebMessageInfo clearMedia. - * @member {boolean} clearMedia + * @member {boolean|null|undefined} clearMedia * @memberof proto.WebMessageInfo * @instance */ - WebMessageInfo.prototype.clearMedia = false; + WebMessageInfo.prototype.clearMedia = null; /** * WebMessageInfo messageStubParameters. @@ -97850,11 +151465,11 @@ $root.proto = (function() { /** * WebMessageInfo duration. - * @member {number} duration + * @member {number|null|undefined} duration * @memberof proto.WebMessageInfo * @instance */ - WebMessageInfo.prototype.duration = 0; + WebMessageInfo.prototype.duration = null; /** * WebMessageInfo labels. @@ -97890,51 +151505,51 @@ $root.proto = (function() { /** * WebMessageInfo ephemeralStartTimestamp. - * @member {number|Long} ephemeralStartTimestamp + * @member {number|Long|null|undefined} ephemeralStartTimestamp * @memberof proto.WebMessageInfo * @instance */ - WebMessageInfo.prototype.ephemeralStartTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + WebMessageInfo.prototype.ephemeralStartTimestamp = null; /** * WebMessageInfo ephemeralDuration. - * @member {number} ephemeralDuration + * @member {number|null|undefined} ephemeralDuration * @memberof proto.WebMessageInfo * @instance */ - WebMessageInfo.prototype.ephemeralDuration = 0; + WebMessageInfo.prototype.ephemeralDuration = null; /** * WebMessageInfo ephemeralOffToOn. - * @member {boolean} ephemeralOffToOn + * @member {boolean|null|undefined} ephemeralOffToOn * @memberof proto.WebMessageInfo * @instance */ - WebMessageInfo.prototype.ephemeralOffToOn = false; + WebMessageInfo.prototype.ephemeralOffToOn = null; /** * WebMessageInfo ephemeralOutOfSync. - * @member {boolean} ephemeralOutOfSync + * @member {boolean|null|undefined} ephemeralOutOfSync * @memberof proto.WebMessageInfo * @instance */ - WebMessageInfo.prototype.ephemeralOutOfSync = false; + WebMessageInfo.prototype.ephemeralOutOfSync = null; /** * WebMessageInfo bizPrivacyStatus. - * @member {proto.WebMessageInfo.BizPrivacyStatus} bizPrivacyStatus + * @member {proto.WebMessageInfo.BizPrivacyStatus|null|undefined} bizPrivacyStatus * @memberof proto.WebMessageInfo * @instance */ - WebMessageInfo.prototype.bizPrivacyStatus = 0; + WebMessageInfo.prototype.bizPrivacyStatus = null; /** * WebMessageInfo verifiedBizName. - * @member {string} verifiedBizName + * @member {string|null|undefined} verifiedBizName * @memberof proto.WebMessageInfo * @instance */ - WebMessageInfo.prototype.verifiedBizName = ""; + WebMessageInfo.prototype.verifiedBizName = null; /** * WebMessageInfo mediaData. @@ -97978,11 +151593,11 @@ $root.proto = (function() { /** * WebMessageInfo futureproofData. - * @member {Uint8Array} futureproofData + * @member {Uint8Array|null|undefined} futureproofData * @memberof proto.WebMessageInfo * @instance */ - WebMessageInfo.prototype.futureproofData = $util.newBuffer([]); + WebMessageInfo.prototype.futureproofData = null; /** * WebMessageInfo statusPsa. @@ -98010,27 +151625,27 @@ $root.proto = (function() { /** * WebMessageInfo agentId. - * @member {string} agentId + * @member {string|null|undefined} agentId * @memberof proto.WebMessageInfo * @instance */ - WebMessageInfo.prototype.agentId = ""; + WebMessageInfo.prototype.agentId = null; /** * WebMessageInfo statusAlreadyViewed. - * @member {boolean} statusAlreadyViewed + * @member {boolean|null|undefined} statusAlreadyViewed * @memberof proto.WebMessageInfo * @instance */ - WebMessageInfo.prototype.statusAlreadyViewed = false; + WebMessageInfo.prototype.statusAlreadyViewed = null; /** * WebMessageInfo messageSecret. - * @member {Uint8Array} messageSecret + * @member {Uint8Array|null|undefined} messageSecret * @memberof proto.WebMessageInfo * @instance */ - WebMessageInfo.prototype.messageSecret = $util.newBuffer([]); + WebMessageInfo.prototype.messageSecret = null; /** * WebMessageInfo keepInChat. @@ -98042,19 +151657,19 @@ $root.proto = (function() { /** * WebMessageInfo originalSelfAuthorUserJidString. - * @member {string} originalSelfAuthorUserJidString + * @member {string|null|undefined} originalSelfAuthorUserJidString * @memberof proto.WebMessageInfo * @instance */ - WebMessageInfo.prototype.originalSelfAuthorUserJidString = ""; + WebMessageInfo.prototype.originalSelfAuthorUserJidString = null; /** * WebMessageInfo revokeMessageTimestamp. - * @member {number|Long} revokeMessageTimestamp + * @member {number|Long|null|undefined} revokeMessageTimestamp * @memberof proto.WebMessageInfo * @instance */ - WebMessageInfo.prototype.revokeMessageTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + WebMessageInfo.prototype.revokeMessageTimestamp = null; /** * WebMessageInfo pinInChat. @@ -98074,27 +151689,27 @@ $root.proto = (function() { /** * WebMessageInfo is1PBizBotMessage. - * @member {boolean} is1PBizBotMessage + * @member {boolean|null|undefined} is1PBizBotMessage * @memberof proto.WebMessageInfo * @instance */ - WebMessageInfo.prototype.is1PBizBotMessage = false; + WebMessageInfo.prototype.is1PBizBotMessage = null; /** * WebMessageInfo isGroupHistoryMessage. - * @member {boolean} isGroupHistoryMessage + * @member {boolean|null|undefined} isGroupHistoryMessage * @memberof proto.WebMessageInfo * @instance */ - WebMessageInfo.prototype.isGroupHistoryMessage = false; + WebMessageInfo.prototype.isGroupHistoryMessage = null; /** * WebMessageInfo botMessageInvokerJid. - * @member {string} botMessageInvokerJid + * @member {string|null|undefined} botMessageInvokerJid * @memberof proto.WebMessageInfo * @instance */ - WebMessageInfo.prototype.botMessageInvokerJid = ""; + WebMessageInfo.prototype.botMessageInvokerJid = null; /** * WebMessageInfo commentMetadata. @@ -98122,11 +151737,400 @@ $root.proto = (function() { /** * WebMessageInfo newsletterServerId. - * @member {number|Long} newsletterServerId + * @member {number|Long|null|undefined} newsletterServerId * @memberof proto.WebMessageInfo * @instance */ - WebMessageInfo.prototype.newsletterServerId = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + WebMessageInfo.prototype.newsletterServerId = null; + + /** + * WebMessageInfo eventAdditionalMetadata. + * @member {proto.IEventAdditionalMetadata|null|undefined} eventAdditionalMetadata + * @memberof proto.WebMessageInfo + * @instance + */ + WebMessageInfo.prototype.eventAdditionalMetadata = null; + + /** + * WebMessageInfo isMentionedInStatus. + * @member {boolean|null|undefined} isMentionedInStatus + * @memberof proto.WebMessageInfo + * @instance + */ + WebMessageInfo.prototype.isMentionedInStatus = null; + + /** + * WebMessageInfo statusMentions. + * @member {Array.} statusMentions + * @memberof proto.WebMessageInfo + * @instance + */ + WebMessageInfo.prototype.statusMentions = $util.emptyArray; + + /** + * WebMessageInfo targetMessageId. + * @member {proto.IMessageKey|null|undefined} targetMessageId + * @memberof proto.WebMessageInfo + * @instance + */ + WebMessageInfo.prototype.targetMessageId = null; + + /** + * WebMessageInfo messageAddOns. + * @member {Array.} messageAddOns + * @memberof proto.WebMessageInfo + * @instance + */ + WebMessageInfo.prototype.messageAddOns = $util.emptyArray; + + /** + * WebMessageInfo statusMentionMessageInfo. + * @member {proto.IStatusMentionMessage|null|undefined} statusMentionMessageInfo + * @memberof proto.WebMessageInfo + * @instance + */ + WebMessageInfo.prototype.statusMentionMessageInfo = null; + + /** + * WebMessageInfo isSupportAiMessage. + * @member {boolean|null|undefined} isSupportAiMessage + * @memberof proto.WebMessageInfo + * @instance + */ + WebMessageInfo.prototype.isSupportAiMessage = null; + + /** + * WebMessageInfo statusMentionSources. + * @member {Array.} statusMentionSources + * @memberof proto.WebMessageInfo + * @instance + */ + WebMessageInfo.prototype.statusMentionSources = $util.emptyArray; + + /** + * WebMessageInfo supportAiCitations. + * @member {Array.} supportAiCitations + * @memberof proto.WebMessageInfo + * @instance + */ + WebMessageInfo.prototype.supportAiCitations = $util.emptyArray; + + /** + * WebMessageInfo botTargetId. + * @member {string|null|undefined} botTargetId + * @memberof proto.WebMessageInfo + * @instance + */ + WebMessageInfo.prototype.botTargetId = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebMessageInfo.prototype, "_message", { + get: $util.oneOfGetter($oneOfFields = ["message"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebMessageInfo.prototype, "_messageTimestamp", { + get: $util.oneOfGetter($oneOfFields = ["messageTimestamp"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebMessageInfo.prototype, "_status", { + get: $util.oneOfGetter($oneOfFields = ["status"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebMessageInfo.prototype, "_participant", { + get: $util.oneOfGetter($oneOfFields = ["participant"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebMessageInfo.prototype, "_messageC2STimestamp", { + get: $util.oneOfGetter($oneOfFields = ["messageC2STimestamp"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebMessageInfo.prototype, "_ignore", { + get: $util.oneOfGetter($oneOfFields = ["ignore"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebMessageInfo.prototype, "_starred", { + get: $util.oneOfGetter($oneOfFields = ["starred"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebMessageInfo.prototype, "_broadcast", { + get: $util.oneOfGetter($oneOfFields = ["broadcast"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebMessageInfo.prototype, "_pushName", { + get: $util.oneOfGetter($oneOfFields = ["pushName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebMessageInfo.prototype, "_mediaCiphertextSha256", { + get: $util.oneOfGetter($oneOfFields = ["mediaCiphertextSha256"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebMessageInfo.prototype, "_multicast", { + get: $util.oneOfGetter($oneOfFields = ["multicast"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebMessageInfo.prototype, "_urlText", { + get: $util.oneOfGetter($oneOfFields = ["urlText"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebMessageInfo.prototype, "_urlNumber", { + get: $util.oneOfGetter($oneOfFields = ["urlNumber"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebMessageInfo.prototype, "_messageStubType", { + get: $util.oneOfGetter($oneOfFields = ["messageStubType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebMessageInfo.prototype, "_clearMedia", { + get: $util.oneOfGetter($oneOfFields = ["clearMedia"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebMessageInfo.prototype, "_duration", { + get: $util.oneOfGetter($oneOfFields = ["duration"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebMessageInfo.prototype, "_paymentInfo", { + get: $util.oneOfGetter($oneOfFields = ["paymentInfo"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebMessageInfo.prototype, "_finalLiveLocation", { + get: $util.oneOfGetter($oneOfFields = ["finalLiveLocation"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebMessageInfo.prototype, "_quotedPaymentInfo", { + get: $util.oneOfGetter($oneOfFields = ["quotedPaymentInfo"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebMessageInfo.prototype, "_ephemeralStartTimestamp", { + get: $util.oneOfGetter($oneOfFields = ["ephemeralStartTimestamp"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebMessageInfo.prototype, "_ephemeralDuration", { + get: $util.oneOfGetter($oneOfFields = ["ephemeralDuration"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebMessageInfo.prototype, "_ephemeralOffToOn", { + get: $util.oneOfGetter($oneOfFields = ["ephemeralOffToOn"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebMessageInfo.prototype, "_ephemeralOutOfSync", { + get: $util.oneOfGetter($oneOfFields = ["ephemeralOutOfSync"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebMessageInfo.prototype, "_bizPrivacyStatus", { + get: $util.oneOfGetter($oneOfFields = ["bizPrivacyStatus"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebMessageInfo.prototype, "_verifiedBizName", { + get: $util.oneOfGetter($oneOfFields = ["verifiedBizName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebMessageInfo.prototype, "_mediaData", { + get: $util.oneOfGetter($oneOfFields = ["mediaData"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebMessageInfo.prototype, "_photoChange", { + get: $util.oneOfGetter($oneOfFields = ["photoChange"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebMessageInfo.prototype, "_quotedStickerData", { + get: $util.oneOfGetter($oneOfFields = ["quotedStickerData"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebMessageInfo.prototype, "_futureproofData", { + get: $util.oneOfGetter($oneOfFields = ["futureproofData"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebMessageInfo.prototype, "_statusPsa", { + get: $util.oneOfGetter($oneOfFields = ["statusPsa"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebMessageInfo.prototype, "_pollAdditionalMetadata", { + get: $util.oneOfGetter($oneOfFields = ["pollAdditionalMetadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebMessageInfo.prototype, "_agentId", { + get: $util.oneOfGetter($oneOfFields = ["agentId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebMessageInfo.prototype, "_statusAlreadyViewed", { + get: $util.oneOfGetter($oneOfFields = ["statusAlreadyViewed"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebMessageInfo.prototype, "_messageSecret", { + get: $util.oneOfGetter($oneOfFields = ["messageSecret"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebMessageInfo.prototype, "_keepInChat", { + get: $util.oneOfGetter($oneOfFields = ["keepInChat"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebMessageInfo.prototype, "_originalSelfAuthorUserJidString", { + get: $util.oneOfGetter($oneOfFields = ["originalSelfAuthorUserJidString"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebMessageInfo.prototype, "_revokeMessageTimestamp", { + get: $util.oneOfGetter($oneOfFields = ["revokeMessageTimestamp"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebMessageInfo.prototype, "_pinInChat", { + get: $util.oneOfGetter($oneOfFields = ["pinInChat"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebMessageInfo.prototype, "_premiumMessageInfo", { + get: $util.oneOfGetter($oneOfFields = ["premiumMessageInfo"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebMessageInfo.prototype, "_is1PBizBotMessage", { + get: $util.oneOfGetter($oneOfFields = ["is1PBizBotMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebMessageInfo.prototype, "_isGroupHistoryMessage", { + get: $util.oneOfGetter($oneOfFields = ["isGroupHistoryMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebMessageInfo.prototype, "_botMessageInvokerJid", { + get: $util.oneOfGetter($oneOfFields = ["botMessageInvokerJid"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebMessageInfo.prototype, "_commentMetadata", { + get: $util.oneOfGetter($oneOfFields = ["commentMetadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebMessageInfo.prototype, "_reportingTokenInfo", { + get: $util.oneOfGetter($oneOfFields = ["reportingTokenInfo"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebMessageInfo.prototype, "_newsletterServerId", { + get: $util.oneOfGetter($oneOfFields = ["newsletterServerId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebMessageInfo.prototype, "_eventAdditionalMetadata", { + get: $util.oneOfGetter($oneOfFields = ["eventAdditionalMetadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebMessageInfo.prototype, "_isMentionedInStatus", { + get: $util.oneOfGetter($oneOfFields = ["isMentionedInStatus"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebMessageInfo.prototype, "_targetMessageId", { + get: $util.oneOfGetter($oneOfFields = ["targetMessageId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebMessageInfo.prototype, "_statusMentionMessageInfo", { + get: $util.oneOfGetter($oneOfFields = ["statusMentionMessageInfo"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebMessageInfo.prototype, "_isSupportAiMessage", { + get: $util.oneOfGetter($oneOfFields = ["isSupportAiMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebMessageInfo.prototype, "_botTargetId", { + get: $util.oneOfGetter($oneOfFields = ["botTargetId"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new WebMessageInfo instance using the specified properties. @@ -98261,6 +152265,30 @@ $root.proto = (function() { $root.proto.ReportingTokenInfo.encode(message.reportingTokenInfo, writer.uint32(/* id 62, wireType 2 =*/498).fork()).ldelim(); if (message.newsletterServerId != null && Object.hasOwnProperty.call(message, "newsletterServerId")) writer.uint32(/* id 63, wireType 0 =*/504).uint64(message.newsletterServerId); + if (message.eventAdditionalMetadata != null && Object.hasOwnProperty.call(message, "eventAdditionalMetadata")) + $root.proto.EventAdditionalMetadata.encode(message.eventAdditionalMetadata, writer.uint32(/* id 64, wireType 2 =*/514).fork()).ldelim(); + if (message.isMentionedInStatus != null && Object.hasOwnProperty.call(message, "isMentionedInStatus")) + writer.uint32(/* id 65, wireType 0 =*/520).bool(message.isMentionedInStatus); + if (message.statusMentions != null && message.statusMentions.length) + for (var i = 0; i < message.statusMentions.length; ++i) + writer.uint32(/* id 66, wireType 2 =*/530).string(message.statusMentions[i]); + if (message.targetMessageId != null && Object.hasOwnProperty.call(message, "targetMessageId")) + $root.proto.MessageKey.encode(message.targetMessageId, writer.uint32(/* id 67, wireType 2 =*/538).fork()).ldelim(); + if (message.messageAddOns != null && message.messageAddOns.length) + for (var i = 0; i < message.messageAddOns.length; ++i) + $root.proto.MessageAddOn.encode(message.messageAddOns[i], writer.uint32(/* id 68, wireType 2 =*/546).fork()).ldelim(); + if (message.statusMentionMessageInfo != null && Object.hasOwnProperty.call(message, "statusMentionMessageInfo")) + $root.proto.StatusMentionMessage.encode(message.statusMentionMessageInfo, writer.uint32(/* id 69, wireType 2 =*/554).fork()).ldelim(); + if (message.isSupportAiMessage != null && Object.hasOwnProperty.call(message, "isSupportAiMessage")) + writer.uint32(/* id 70, wireType 0 =*/560).bool(message.isSupportAiMessage); + if (message.statusMentionSources != null && message.statusMentionSources.length) + for (var i = 0; i < message.statusMentionSources.length; ++i) + writer.uint32(/* id 71, wireType 2 =*/570).string(message.statusMentionSources[i]); + if (message.supportAiCitations != null && message.supportAiCitations.length) + for (var i = 0; i < message.supportAiCitations.length; ++i) + $root.proto.Citation.encode(message.supportAiCitations[i], writer.uint32(/* id 72, wireType 2 =*/578).fork()).ldelim(); + if (message.botTargetId != null && Object.hasOwnProperty.call(message, "botTargetId")) + writer.uint32(/* id 73, wireType 2 =*/586).string(message.botTargetId); return writer; }; @@ -98295,174 +152323,274 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.key = $root.proto.MessageKey.decode(reader, reader.uint32()); - break; - case 2: - message.message = $root.proto.Message.decode(reader, reader.uint32()); - break; - case 3: - message.messageTimestamp = reader.uint64(); - break; - case 4: - message.status = reader.int32(); - break; - case 5: - message.participant = reader.string(); - break; - case 6: - message.messageC2STimestamp = reader.uint64(); - break; - case 16: - message.ignore = reader.bool(); - break; - case 17: - message.starred = reader.bool(); - break; - case 18: - message.broadcast = reader.bool(); - break; - case 19: - message.pushName = reader.string(); - break; - case 20: - message.mediaCiphertextSha256 = reader.bytes(); - break; - case 21: - message.multicast = reader.bool(); - break; - case 22: - message.urlText = reader.bool(); - break; - case 23: - message.urlNumber = reader.bool(); - break; - case 24: - message.messageStubType = reader.int32(); - break; - case 25: - message.clearMedia = reader.bool(); - break; - case 26: - if (!(message.messageStubParameters && message.messageStubParameters.length)) - message.messageStubParameters = []; - message.messageStubParameters.push(reader.string()); - break; - case 27: - message.duration = reader.uint32(); - break; - case 28: - if (!(message.labels && message.labels.length)) - message.labels = []; - message.labels.push(reader.string()); - break; - case 29: - message.paymentInfo = $root.proto.PaymentInfo.decode(reader, reader.uint32()); - break; - case 30: - message.finalLiveLocation = $root.proto.Message.LiveLocationMessage.decode(reader, reader.uint32()); - break; - case 31: - message.quotedPaymentInfo = $root.proto.PaymentInfo.decode(reader, reader.uint32()); - break; - case 32: - message.ephemeralStartTimestamp = reader.uint64(); - break; - case 33: - message.ephemeralDuration = reader.uint32(); - break; - case 34: - message.ephemeralOffToOn = reader.bool(); - break; - case 35: - message.ephemeralOutOfSync = reader.bool(); - break; - case 36: - message.bizPrivacyStatus = reader.int32(); - break; - case 37: - message.verifiedBizName = reader.string(); - break; - case 38: - message.mediaData = $root.proto.MediaData.decode(reader, reader.uint32()); - break; - case 39: - message.photoChange = $root.proto.PhotoChange.decode(reader, reader.uint32()); - break; - case 40: - if (!(message.userReceipt && message.userReceipt.length)) - message.userReceipt = []; - message.userReceipt.push($root.proto.UserReceipt.decode(reader, reader.uint32())); - break; - case 41: - if (!(message.reactions && message.reactions.length)) - message.reactions = []; - message.reactions.push($root.proto.Reaction.decode(reader, reader.uint32())); - break; - case 42: - message.quotedStickerData = $root.proto.MediaData.decode(reader, reader.uint32()); - break; - case 43: - message.futureproofData = reader.bytes(); - break; - case 44: - message.statusPsa = $root.proto.StatusPSA.decode(reader, reader.uint32()); - break; - case 45: - if (!(message.pollUpdates && message.pollUpdates.length)) - message.pollUpdates = []; - message.pollUpdates.push($root.proto.PollUpdate.decode(reader, reader.uint32())); - break; - case 46: - message.pollAdditionalMetadata = $root.proto.PollAdditionalMetadata.decode(reader, reader.uint32()); - break; - case 47: - message.agentId = reader.string(); - break; - case 48: - message.statusAlreadyViewed = reader.bool(); - break; - case 49: - message.messageSecret = reader.bytes(); - break; - 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; - case 54: - message.pinInChat = $root.proto.PinInChat.decode(reader, reader.uint32()); - break; - case 55: - message.premiumMessageInfo = $root.proto.PremiumMessageInfo.decode(reader, reader.uint32()); - break; - case 56: - message.is1PBizBotMessage = reader.bool(); - break; - case 57: - message.isGroupHistoryMessage = reader.bool(); - break; - case 58: - message.botMessageInvokerJid = reader.string(); - break; - case 59: - message.commentMetadata = $root.proto.CommentMetadata.decode(reader, reader.uint32()); - break; - case 61: - if (!(message.eventResponses && message.eventResponses.length)) - message.eventResponses = []; - message.eventResponses.push($root.proto.EventResponse.decode(reader, reader.uint32())); - break; - case 62: - message.reportingTokenInfo = $root.proto.ReportingTokenInfo.decode(reader, reader.uint32()); - break; - case 63: - message.newsletterServerId = reader.uint64(); - break; + case 1: { + message.key = $root.proto.MessageKey.decode(reader, reader.uint32()); + break; + } + case 2: { + message.message = $root.proto.Message.decode(reader, reader.uint32()); + break; + } + case 3: { + message.messageTimestamp = reader.uint64(); + break; + } + case 4: { + message.status = reader.int32(); + break; + } + case 5: { + message.participant = reader.string(); + break; + } + case 6: { + message.messageC2STimestamp = reader.uint64(); + break; + } + case 16: { + message.ignore = reader.bool(); + break; + } + case 17: { + message.starred = reader.bool(); + break; + } + case 18: { + message.broadcast = reader.bool(); + break; + } + case 19: { + message.pushName = reader.string(); + break; + } + case 20: { + message.mediaCiphertextSha256 = reader.bytes(); + break; + } + case 21: { + message.multicast = reader.bool(); + break; + } + case 22: { + message.urlText = reader.bool(); + break; + } + case 23: { + message.urlNumber = reader.bool(); + break; + } + case 24: { + message.messageStubType = reader.int32(); + break; + } + case 25: { + message.clearMedia = reader.bool(); + break; + } + case 26: { + if (!(message.messageStubParameters && message.messageStubParameters.length)) + message.messageStubParameters = []; + message.messageStubParameters.push(reader.string()); + break; + } + case 27: { + message.duration = reader.uint32(); + break; + } + case 28: { + if (!(message.labels && message.labels.length)) + message.labels = []; + message.labels.push(reader.string()); + break; + } + case 29: { + message.paymentInfo = $root.proto.PaymentInfo.decode(reader, reader.uint32()); + break; + } + case 30: { + message.finalLiveLocation = $root.proto.Message.LiveLocationMessage.decode(reader, reader.uint32()); + break; + } + case 31: { + message.quotedPaymentInfo = $root.proto.PaymentInfo.decode(reader, reader.uint32()); + break; + } + case 32: { + message.ephemeralStartTimestamp = reader.uint64(); + break; + } + case 33: { + message.ephemeralDuration = reader.uint32(); + break; + } + case 34: { + message.ephemeralOffToOn = reader.bool(); + break; + } + case 35: { + message.ephemeralOutOfSync = reader.bool(); + break; + } + case 36: { + message.bizPrivacyStatus = reader.int32(); + break; + } + case 37: { + message.verifiedBizName = reader.string(); + break; + } + case 38: { + message.mediaData = $root.proto.MediaData.decode(reader, reader.uint32()); + break; + } + case 39: { + message.photoChange = $root.proto.PhotoChange.decode(reader, reader.uint32()); + break; + } + case 40: { + if (!(message.userReceipt && message.userReceipt.length)) + message.userReceipt = []; + message.userReceipt.push($root.proto.UserReceipt.decode(reader, reader.uint32())); + break; + } + case 41: { + if (!(message.reactions && message.reactions.length)) + message.reactions = []; + message.reactions.push($root.proto.Reaction.decode(reader, reader.uint32())); + break; + } + case 42: { + message.quotedStickerData = $root.proto.MediaData.decode(reader, reader.uint32()); + break; + } + case 43: { + message.futureproofData = reader.bytes(); + break; + } + case 44: { + message.statusPsa = $root.proto.StatusPSA.decode(reader, reader.uint32()); + break; + } + case 45: { + if (!(message.pollUpdates && message.pollUpdates.length)) + message.pollUpdates = []; + message.pollUpdates.push($root.proto.PollUpdate.decode(reader, reader.uint32())); + break; + } + case 46: { + message.pollAdditionalMetadata = $root.proto.PollAdditionalMetadata.decode(reader, reader.uint32()); + break; + } + case 47: { + message.agentId = reader.string(); + break; + } + case 48: { + message.statusAlreadyViewed = reader.bool(); + break; + } + case 49: { + message.messageSecret = reader.bytes(); + break; + } + 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; + } + case 54: { + message.pinInChat = $root.proto.PinInChat.decode(reader, reader.uint32()); + break; + } + case 55: { + message.premiumMessageInfo = $root.proto.PremiumMessageInfo.decode(reader, reader.uint32()); + break; + } + case 56: { + message.is1PBizBotMessage = reader.bool(); + break; + } + case 57: { + message.isGroupHistoryMessage = reader.bool(); + break; + } + case 58: { + message.botMessageInvokerJid = reader.string(); + break; + } + case 59: { + message.commentMetadata = $root.proto.CommentMetadata.decode(reader, reader.uint32()); + break; + } + case 61: { + if (!(message.eventResponses && message.eventResponses.length)) + message.eventResponses = []; + message.eventResponses.push($root.proto.EventResponse.decode(reader, reader.uint32())); + break; + } + case 62: { + message.reportingTokenInfo = $root.proto.ReportingTokenInfo.decode(reader, reader.uint32()); + break; + } + case 63: { + message.newsletterServerId = reader.uint64(); + break; + } + case 64: { + message.eventAdditionalMetadata = $root.proto.EventAdditionalMetadata.decode(reader, reader.uint32()); + break; + } + case 65: { + message.isMentionedInStatus = reader.bool(); + break; + } + case 66: { + if (!(message.statusMentions && message.statusMentions.length)) + message.statusMentions = []; + message.statusMentions.push(reader.string()); + break; + } + case 67: { + message.targetMessageId = $root.proto.MessageKey.decode(reader, reader.uint32()); + break; + } + case 68: { + if (!(message.messageAddOns && message.messageAddOns.length)) + message.messageAddOns = []; + message.messageAddOns.push($root.proto.MessageAddOn.decode(reader, reader.uint32())); + break; + } + case 69: { + message.statusMentionMessageInfo = $root.proto.StatusMentionMessage.decode(reader, reader.uint32()); + break; + } + case 70: { + message.isSupportAiMessage = reader.bool(); + break; + } + case 71: { + if (!(message.statusMentionSources && message.statusMentionSources.length)) + message.statusMentionSources = []; + message.statusMentionSources.push(reader.string()); + break; + } + case 72: { + if (!(message.supportAiCitations && message.supportAiCitations.length)) + message.supportAiCitations = []; + message.supportAiCitations.push($root.proto.Citation.decode(reader, reader.uint32())); + break; + } + case 73: { + message.botTargetId = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -98500,20 +152628,27 @@ $root.proto = (function() { WebMessageInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; { var error = $root.proto.MessageKey.verify(message.key); if (error) return "key." + error; } if (message.message != null && message.hasOwnProperty("message")) { - var error = $root.proto.Message.verify(message.message); - if (error) - return "message." + error; + properties._message = 1; + { + var error = $root.proto.Message.verify(message.message); + if (error) + return "message." + error; + } } - if (message.messageTimestamp != null && message.hasOwnProperty("messageTimestamp")) + if (message.messageTimestamp != null && message.hasOwnProperty("messageTimestamp")) { + properties._messageTimestamp = 1; if (!$util.isInteger(message.messageTimestamp) && !(message.messageTimestamp && $util.isInteger(message.messageTimestamp.low) && $util.isInteger(message.messageTimestamp.high))) return "messageTimestamp: integer|Long expected"; - if (message.status != null && message.hasOwnProperty("status")) + } + if (message.status != null && message.hasOwnProperty("status")) { + properties._status = 1; switch (message.status) { default: return "status: enum value expected"; @@ -98525,37 +152660,59 @@ $root.proto = (function() { case 5: break; } - if (message.participant != null && message.hasOwnProperty("participant")) + } + if (message.participant != null && message.hasOwnProperty("participant")) { + properties._participant = 1; if (!$util.isString(message.participant)) return "participant: string expected"; - if (message.messageC2STimestamp != null && message.hasOwnProperty("messageC2STimestamp")) + } + if (message.messageC2STimestamp != null && message.hasOwnProperty("messageC2STimestamp")) { + properties._messageC2STimestamp = 1; if (!$util.isInteger(message.messageC2STimestamp) && !(message.messageC2STimestamp && $util.isInteger(message.messageC2STimestamp.low) && $util.isInteger(message.messageC2STimestamp.high))) return "messageC2STimestamp: integer|Long expected"; - if (message.ignore != null && message.hasOwnProperty("ignore")) + } + if (message.ignore != null && message.hasOwnProperty("ignore")) { + properties._ignore = 1; if (typeof message.ignore !== "boolean") return "ignore: boolean expected"; - if (message.starred != null && message.hasOwnProperty("starred")) + } + if (message.starred != null && message.hasOwnProperty("starred")) { + properties._starred = 1; if (typeof message.starred !== "boolean") return "starred: boolean expected"; - if (message.broadcast != null && message.hasOwnProperty("broadcast")) + } + if (message.broadcast != null && message.hasOwnProperty("broadcast")) { + properties._broadcast = 1; if (typeof message.broadcast !== "boolean") return "broadcast: boolean expected"; - if (message.pushName != null && message.hasOwnProperty("pushName")) + } + if (message.pushName != null && message.hasOwnProperty("pushName")) { + properties._pushName = 1; if (!$util.isString(message.pushName)) return "pushName: string expected"; - if (message.mediaCiphertextSha256 != null && message.hasOwnProperty("mediaCiphertextSha256")) + } + if (message.mediaCiphertextSha256 != null && message.hasOwnProperty("mediaCiphertextSha256")) { + properties._mediaCiphertextSha256 = 1; if (!(message.mediaCiphertextSha256 && typeof message.mediaCiphertextSha256.length === "number" || $util.isString(message.mediaCiphertextSha256))) return "mediaCiphertextSha256: buffer expected"; - if (message.multicast != null && message.hasOwnProperty("multicast")) + } + if (message.multicast != null && message.hasOwnProperty("multicast")) { + properties._multicast = 1; if (typeof message.multicast !== "boolean") return "multicast: boolean expected"; - if (message.urlText != null && message.hasOwnProperty("urlText")) + } + if (message.urlText != null && message.hasOwnProperty("urlText")) { + properties._urlText = 1; if (typeof message.urlText !== "boolean") return "urlText: boolean expected"; - if (message.urlNumber != null && message.hasOwnProperty("urlNumber")) + } + if (message.urlNumber != null && message.hasOwnProperty("urlNumber")) { + properties._urlNumber = 1; if (typeof message.urlNumber !== "boolean") return "urlNumber: boolean expected"; - if (message.messageStubType != null && message.hasOwnProperty("messageStubType")) + } + if (message.messageStubType != null && message.hasOwnProperty("messageStubType")) { + properties._messageStubType = 1; switch (message.messageStubType) { default: return "messageStubType: enum value expected"; @@ -98760,11 +152917,29 @@ $root.proto = (function() { case 198: case 199: case 200: + case 201: + case 202: + case 203: + case 204: + case 205: + case 206: + case 207: + case 208: + case 209: + case 210: + case 211: + case 212: + case 213: + case 214: + case 215: break; } - if (message.clearMedia != null && message.hasOwnProperty("clearMedia")) + } + if (message.clearMedia != null && message.hasOwnProperty("clearMedia")) { + properties._clearMedia = 1; if (typeof message.clearMedia !== "boolean") return "clearMedia: boolean expected"; + } if (message.messageStubParameters != null && message.hasOwnProperty("messageStubParameters")) { if (!Array.isArray(message.messageStubParameters)) return "messageStubParameters: array expected"; @@ -98772,9 +152947,11 @@ $root.proto = (function() { if (!$util.isString(message.messageStubParameters[i])) return "messageStubParameters: string[] expected"; } - if (message.duration != null && message.hasOwnProperty("duration")) + if (message.duration != null && message.hasOwnProperty("duration")) { + properties._duration = 1; if (!$util.isInteger(message.duration)) return "duration: integer expected"; + } if (message.labels != null && message.hasOwnProperty("labels")) { if (!Array.isArray(message.labels)) return "labels: array expected"; @@ -98783,33 +152960,51 @@ $root.proto = (function() { return "labels: string[] expected"; } if (message.paymentInfo != null && message.hasOwnProperty("paymentInfo")) { - var error = $root.proto.PaymentInfo.verify(message.paymentInfo); - if (error) - return "paymentInfo." + error; + properties._paymentInfo = 1; + { + var error = $root.proto.PaymentInfo.verify(message.paymentInfo); + if (error) + return "paymentInfo." + error; + } } if (message.finalLiveLocation != null && message.hasOwnProperty("finalLiveLocation")) { - var error = $root.proto.Message.LiveLocationMessage.verify(message.finalLiveLocation); - if (error) - return "finalLiveLocation." + error; + properties._finalLiveLocation = 1; + { + var error = $root.proto.Message.LiveLocationMessage.verify(message.finalLiveLocation); + if (error) + return "finalLiveLocation." + error; + } } if (message.quotedPaymentInfo != null && message.hasOwnProperty("quotedPaymentInfo")) { - var error = $root.proto.PaymentInfo.verify(message.quotedPaymentInfo); - if (error) - return "quotedPaymentInfo." + error; + properties._quotedPaymentInfo = 1; + { + var error = $root.proto.PaymentInfo.verify(message.quotedPaymentInfo); + if (error) + return "quotedPaymentInfo." + error; + } } - if (message.ephemeralStartTimestamp != null && message.hasOwnProperty("ephemeralStartTimestamp")) + if (message.ephemeralStartTimestamp != null && message.hasOwnProperty("ephemeralStartTimestamp")) { + properties._ephemeralStartTimestamp = 1; if (!$util.isInteger(message.ephemeralStartTimestamp) && !(message.ephemeralStartTimestamp && $util.isInteger(message.ephemeralStartTimestamp.low) && $util.isInteger(message.ephemeralStartTimestamp.high))) return "ephemeralStartTimestamp: integer|Long expected"; - if (message.ephemeralDuration != null && message.hasOwnProperty("ephemeralDuration")) + } + if (message.ephemeralDuration != null && message.hasOwnProperty("ephemeralDuration")) { + properties._ephemeralDuration = 1; if (!$util.isInteger(message.ephemeralDuration)) return "ephemeralDuration: integer expected"; - if (message.ephemeralOffToOn != null && message.hasOwnProperty("ephemeralOffToOn")) + } + if (message.ephemeralOffToOn != null && message.hasOwnProperty("ephemeralOffToOn")) { + properties._ephemeralOffToOn = 1; if (typeof message.ephemeralOffToOn !== "boolean") return "ephemeralOffToOn: boolean expected"; - if (message.ephemeralOutOfSync != null && message.hasOwnProperty("ephemeralOutOfSync")) + } + if (message.ephemeralOutOfSync != null && message.hasOwnProperty("ephemeralOutOfSync")) { + properties._ephemeralOutOfSync = 1; if (typeof message.ephemeralOutOfSync !== "boolean") return "ephemeralOutOfSync: boolean expected"; - if (message.bizPrivacyStatus != null && message.hasOwnProperty("bizPrivacyStatus")) + } + if (message.bizPrivacyStatus != null && message.hasOwnProperty("bizPrivacyStatus")) { + properties._bizPrivacyStatus = 1; switch (message.bizPrivacyStatus) { default: return "bizPrivacyStatus: enum value expected"; @@ -98819,18 +153014,27 @@ $root.proto = (function() { case 3: break; } - if (message.verifiedBizName != null && message.hasOwnProperty("verifiedBizName")) + } + if (message.verifiedBizName != null && message.hasOwnProperty("verifiedBizName")) { + properties._verifiedBizName = 1; if (!$util.isString(message.verifiedBizName)) return "verifiedBizName: string expected"; + } if (message.mediaData != null && message.hasOwnProperty("mediaData")) { - var error = $root.proto.MediaData.verify(message.mediaData); - if (error) - return "mediaData." + error; + properties._mediaData = 1; + { + var error = $root.proto.MediaData.verify(message.mediaData); + if (error) + return "mediaData." + error; + } } if (message.photoChange != null && message.hasOwnProperty("photoChange")) { - var error = $root.proto.PhotoChange.verify(message.photoChange); - if (error) - return "photoChange." + error; + properties._photoChange = 1; + { + var error = $root.proto.PhotoChange.verify(message.photoChange); + if (error) + return "photoChange." + error; + } } if (message.userReceipt != null && message.hasOwnProperty("userReceipt")) { if (!Array.isArray(message.userReceipt)) @@ -98851,17 +153055,25 @@ $root.proto = (function() { } } if (message.quotedStickerData != null && message.hasOwnProperty("quotedStickerData")) { - var error = $root.proto.MediaData.verify(message.quotedStickerData); - if (error) - return "quotedStickerData." + error; + properties._quotedStickerData = 1; + { + var error = $root.proto.MediaData.verify(message.quotedStickerData); + if (error) + return "quotedStickerData." + error; + } } - if (message.futureproofData != null && message.hasOwnProperty("futureproofData")) + if (message.futureproofData != null && message.hasOwnProperty("futureproofData")) { + properties._futureproofData = 1; if (!(message.futureproofData && typeof message.futureproofData.length === "number" || $util.isString(message.futureproofData))) return "futureproofData: buffer expected"; + } if (message.statusPsa != null && message.hasOwnProperty("statusPsa")) { - var error = $root.proto.StatusPSA.verify(message.statusPsa); - if (error) - return "statusPsa." + error; + properties._statusPsa = 1; + { + var error = $root.proto.StatusPSA.verify(message.statusPsa); + if (error) + return "statusPsa." + error; + } } if (message.pollUpdates != null && message.hasOwnProperty("pollUpdates")) { if (!Array.isArray(message.pollUpdates)) @@ -98873,53 +153085,84 @@ $root.proto = (function() { } } if (message.pollAdditionalMetadata != null && message.hasOwnProperty("pollAdditionalMetadata")) { - var error = $root.proto.PollAdditionalMetadata.verify(message.pollAdditionalMetadata); - if (error) - return "pollAdditionalMetadata." + error; + properties._pollAdditionalMetadata = 1; + { + var error = $root.proto.PollAdditionalMetadata.verify(message.pollAdditionalMetadata); + if (error) + return "pollAdditionalMetadata." + error; + } } - if (message.agentId != null && message.hasOwnProperty("agentId")) + if (message.agentId != null && message.hasOwnProperty("agentId")) { + properties._agentId = 1; if (!$util.isString(message.agentId)) return "agentId: string expected"; - if (message.statusAlreadyViewed != null && message.hasOwnProperty("statusAlreadyViewed")) + } + if (message.statusAlreadyViewed != null && message.hasOwnProperty("statusAlreadyViewed")) { + properties._statusAlreadyViewed = 1; if (typeof message.statusAlreadyViewed !== "boolean") return "statusAlreadyViewed: boolean expected"; - if (message.messageSecret != null && message.hasOwnProperty("messageSecret")) + } + if (message.messageSecret != null && message.hasOwnProperty("messageSecret")) { + properties._messageSecret = 1; if (!(message.messageSecret && typeof message.messageSecret.length === "number" || $util.isString(message.messageSecret))) return "messageSecret: buffer expected"; - if (message.keepInChat != null && message.hasOwnProperty("keepInChat")) { - var error = $root.proto.KeepInChat.verify(message.keepInChat); - if (error) - return "keepInChat." + error; } - if (message.originalSelfAuthorUserJidString != null && message.hasOwnProperty("originalSelfAuthorUserJidString")) + if (message.keepInChat != null && message.hasOwnProperty("keepInChat")) { + properties._keepInChat = 1; + { + var error = $root.proto.KeepInChat.verify(message.keepInChat); + if (error) + return "keepInChat." + error; + } + } + if (message.originalSelfAuthorUserJidString != null && message.hasOwnProperty("originalSelfAuthorUserJidString")) { + properties._originalSelfAuthorUserJidString = 1; if (!$util.isString(message.originalSelfAuthorUserJidString)) return "originalSelfAuthorUserJidString: string expected"; - if (message.revokeMessageTimestamp != null && message.hasOwnProperty("revokeMessageTimestamp")) + } + if (message.revokeMessageTimestamp != null && message.hasOwnProperty("revokeMessageTimestamp")) { + properties._revokeMessageTimestamp = 1; if (!$util.isInteger(message.revokeMessageTimestamp) && !(message.revokeMessageTimestamp && $util.isInteger(message.revokeMessageTimestamp.low) && $util.isInteger(message.revokeMessageTimestamp.high))) return "revokeMessageTimestamp: integer|Long expected"; + } if (message.pinInChat != null && message.hasOwnProperty("pinInChat")) { - var error = $root.proto.PinInChat.verify(message.pinInChat); - if (error) - return "pinInChat." + error; + properties._pinInChat = 1; + { + var error = $root.proto.PinInChat.verify(message.pinInChat); + if (error) + return "pinInChat." + error; + } } if (message.premiumMessageInfo != null && message.hasOwnProperty("premiumMessageInfo")) { - var error = $root.proto.PremiumMessageInfo.verify(message.premiumMessageInfo); - if (error) - return "premiumMessageInfo." + error; + properties._premiumMessageInfo = 1; + { + var error = $root.proto.PremiumMessageInfo.verify(message.premiumMessageInfo); + if (error) + return "premiumMessageInfo." + error; + } } - if (message.is1PBizBotMessage != null && message.hasOwnProperty("is1PBizBotMessage")) + if (message.is1PBizBotMessage != null && message.hasOwnProperty("is1PBizBotMessage")) { + properties._is1PBizBotMessage = 1; if (typeof message.is1PBizBotMessage !== "boolean") return "is1PBizBotMessage: boolean expected"; - if (message.isGroupHistoryMessage != null && message.hasOwnProperty("isGroupHistoryMessage")) + } + if (message.isGroupHistoryMessage != null && message.hasOwnProperty("isGroupHistoryMessage")) { + properties._isGroupHistoryMessage = 1; if (typeof message.isGroupHistoryMessage !== "boolean") return "isGroupHistoryMessage: boolean expected"; - if (message.botMessageInvokerJid != null && message.hasOwnProperty("botMessageInvokerJid")) + } + if (message.botMessageInvokerJid != null && message.hasOwnProperty("botMessageInvokerJid")) { + properties._botMessageInvokerJid = 1; if (!$util.isString(message.botMessageInvokerJid)) return "botMessageInvokerJid: string expected"; + } if (message.commentMetadata != null && message.hasOwnProperty("commentMetadata")) { - var error = $root.proto.CommentMetadata.verify(message.commentMetadata); - if (error) - return "commentMetadata." + error; + properties._commentMetadata = 1; + { + var error = $root.proto.CommentMetadata.verify(message.commentMetadata); + if (error) + return "commentMetadata." + error; + } } if (message.eventResponses != null && message.hasOwnProperty("eventResponses")) { if (!Array.isArray(message.eventResponses)) @@ -98931,13 +153174,89 @@ $root.proto = (function() { } } if (message.reportingTokenInfo != null && message.hasOwnProperty("reportingTokenInfo")) { - var error = $root.proto.ReportingTokenInfo.verify(message.reportingTokenInfo); - if (error) - return "reportingTokenInfo." + error; + properties._reportingTokenInfo = 1; + { + var error = $root.proto.ReportingTokenInfo.verify(message.reportingTokenInfo); + if (error) + return "reportingTokenInfo." + error; + } } - if (message.newsletterServerId != null && message.hasOwnProperty("newsletterServerId")) + if (message.newsletterServerId != null && message.hasOwnProperty("newsletterServerId")) { + properties._newsletterServerId = 1; if (!$util.isInteger(message.newsletterServerId) && !(message.newsletterServerId && $util.isInteger(message.newsletterServerId.low) && $util.isInteger(message.newsletterServerId.high))) return "newsletterServerId: integer|Long expected"; + } + if (message.eventAdditionalMetadata != null && message.hasOwnProperty("eventAdditionalMetadata")) { + properties._eventAdditionalMetadata = 1; + { + var error = $root.proto.EventAdditionalMetadata.verify(message.eventAdditionalMetadata); + if (error) + return "eventAdditionalMetadata." + error; + } + } + if (message.isMentionedInStatus != null && message.hasOwnProperty("isMentionedInStatus")) { + properties._isMentionedInStatus = 1; + if (typeof message.isMentionedInStatus !== "boolean") + return "isMentionedInStatus: boolean expected"; + } + if (message.statusMentions != null && message.hasOwnProperty("statusMentions")) { + if (!Array.isArray(message.statusMentions)) + return "statusMentions: array expected"; + for (var i = 0; i < message.statusMentions.length; ++i) + if (!$util.isString(message.statusMentions[i])) + return "statusMentions: string[] expected"; + } + if (message.targetMessageId != null && message.hasOwnProperty("targetMessageId")) { + properties._targetMessageId = 1; + { + var error = $root.proto.MessageKey.verify(message.targetMessageId); + if (error) + return "targetMessageId." + error; + } + } + if (message.messageAddOns != null && message.hasOwnProperty("messageAddOns")) { + if (!Array.isArray(message.messageAddOns)) + return "messageAddOns: array expected"; + for (var i = 0; i < message.messageAddOns.length; ++i) { + var error = $root.proto.MessageAddOn.verify(message.messageAddOns[i]); + if (error) + return "messageAddOns." + error; + } + } + if (message.statusMentionMessageInfo != null && message.hasOwnProperty("statusMentionMessageInfo")) { + properties._statusMentionMessageInfo = 1; + { + var error = $root.proto.StatusMentionMessage.verify(message.statusMentionMessageInfo); + if (error) + return "statusMentionMessageInfo." + error; + } + } + if (message.isSupportAiMessage != null && message.hasOwnProperty("isSupportAiMessage")) { + properties._isSupportAiMessage = 1; + if (typeof message.isSupportAiMessage !== "boolean") + return "isSupportAiMessage: boolean expected"; + } + if (message.statusMentionSources != null && message.hasOwnProperty("statusMentionSources")) { + if (!Array.isArray(message.statusMentionSources)) + return "statusMentionSources: array expected"; + for (var i = 0; i < message.statusMentionSources.length; ++i) + if (!$util.isString(message.statusMentionSources[i])) + return "statusMentionSources: string[] expected"; + } + if (message.supportAiCitations != null && message.hasOwnProperty("supportAiCitations")) { + if (!Array.isArray(message.supportAiCitations)) + return "supportAiCitations: array expected"; + for (var i = 0; i < message.supportAiCitations.length; ++i) { + var error = $root.proto.Citation.verify(message.supportAiCitations[i]); + if (error) + return "supportAiCitations." + error; + } + } + if (message.botTargetId != null && message.hasOwnProperty("botTargetId")) { + properties._botTargetId = 1; + if (!$util.isString(message.botTargetId)) + return "botTargetId: string expected"; + } return null; }; @@ -98973,6 +153292,12 @@ $root.proto = (function() { else if (typeof object.messageTimestamp === "object") message.messageTimestamp = new $util.LongBits(object.messageTimestamp.low >>> 0, object.messageTimestamp.high >>> 0).toNumber(true); switch (object.status) { + default: + if (typeof object.status === "number") { + message.status = object.status; + break; + } + break; case "ERROR": case 0: message.status = 0; @@ -99020,7 +153345,7 @@ $root.proto = (function() { if (object.mediaCiphertextSha256 != null) if (typeof object.mediaCiphertextSha256 === "string") $util.base64.decode(object.mediaCiphertextSha256, message.mediaCiphertextSha256 = $util.newBuffer($util.base64.length(object.mediaCiphertextSha256)), 0); - else if (object.mediaCiphertextSha256.length) + else if (object.mediaCiphertextSha256.length >= 0) message.mediaCiphertextSha256 = object.mediaCiphertextSha256; if (object.multicast != null) message.multicast = Boolean(object.multicast); @@ -99029,6 +153354,12 @@ $root.proto = (function() { if (object.urlNumber != null) message.urlNumber = Boolean(object.urlNumber); switch (object.messageStubType) { + default: + if (typeof object.messageStubType === "number") { + message.messageStubType = object.messageStubType; + break; + } + break; case "UNKNOWN": case 0: message.messageStubType = 0; @@ -99833,6 +154164,66 @@ $root.proto = (function() { case 200: message.messageStubType = 200; break; + case "BIZ_COEX_PRIVACY_INIT": + case 201: + message.messageStubType = 201; + break; + case "BIZ_COEX_PRIVACY_TRANSITION": + case 202: + message.messageStubType = 202; + break; + case "GROUP_DEACTIVATED": + case 203: + message.messageStubType = 203; + break; + case "COMMUNITY_DEACTIVATE_SIBLING_GROUP": + case 204: + message.messageStubType = 204; + break; + case "EVENT_UPDATED": + case 205: + message.messageStubType = 205; + break; + case "EVENT_CANCELED": + case 206: + message.messageStubType = 206; + break; + case "COMMUNITY_OWNER_UPDATED": + case 207: + message.messageStubType = 207; + break; + case "COMMUNITY_SUB_GROUP_VISIBILITY_HIDDEN": + case 208: + message.messageStubType = 208; + break; + case "CAPI_GROUP_NE2EE_SYSTEM_MESSAGE": + case 209: + message.messageStubType = 209; + break; + case "STATUS_MENTION": + case 210: + message.messageStubType = 210; + break; + case "USER_CONTROLS_SYSTEM_MESSAGE": + case 211: + message.messageStubType = 211; + break; + case "SUPPORT_SYSTEM_MESSAGE": + case 212: + message.messageStubType = 212; + break; + case "CHANGE_LID": + case 213: + message.messageStubType = 213; + break; + case "BIZ_CUSTOMER_3PD_DATA_SHARING_OPT_IN_MESSAGE": + case 214: + message.messageStubType = 214; + break; + case "BIZ_CUSTOMER_3PD_DATA_SHARING_OPT_OUT_MESSAGE": + case 215: + message.messageStubType = 215; + break; } if (object.clearMedia != null) message.clearMedia = Boolean(object.clearMedia); @@ -99883,6 +154274,12 @@ $root.proto = (function() { if (object.ephemeralOutOfSync != null) message.ephemeralOutOfSync = Boolean(object.ephemeralOutOfSync); switch (object.bizPrivacyStatus) { + default: + if (typeof object.bizPrivacyStatus === "number") { + message.bizPrivacyStatus = object.bizPrivacyStatus; + break; + } + break; case "E2EE": case 0: message.bizPrivacyStatus = 0; @@ -99940,7 +154337,7 @@ $root.proto = (function() { if (object.futureproofData != null) if (typeof object.futureproofData === "string") $util.base64.decode(object.futureproofData, message.futureproofData = $util.newBuffer($util.base64.length(object.futureproofData)), 0); - else if (object.futureproofData.length) + else if (object.futureproofData.length >= 0) message.futureproofData = object.futureproofData; if (object.statusPsa != null) { if (typeof object.statusPsa !== "object") @@ -99969,7 +154366,7 @@ $root.proto = (function() { if (object.messageSecret != null) if (typeof object.messageSecret === "string") $util.base64.decode(object.messageSecret, message.messageSecret = $util.newBuffer($util.base64.length(object.messageSecret)), 0); - else if (object.messageSecret.length) + else if (object.messageSecret.length >= 0) message.messageSecret = object.messageSecret; if (object.keepInChat != null) { if (typeof object.keepInChat !== "object") @@ -100032,6 +154429,61 @@ $root.proto = (function() { message.newsletterServerId = object.newsletterServerId; else if (typeof object.newsletterServerId === "object") message.newsletterServerId = new $util.LongBits(object.newsletterServerId.low >>> 0, object.newsletterServerId.high >>> 0).toNumber(true); + if (object.eventAdditionalMetadata != null) { + if (typeof object.eventAdditionalMetadata !== "object") + throw TypeError(".proto.WebMessageInfo.eventAdditionalMetadata: object expected"); + message.eventAdditionalMetadata = $root.proto.EventAdditionalMetadata.fromObject(object.eventAdditionalMetadata); + } + if (object.isMentionedInStatus != null) + message.isMentionedInStatus = Boolean(object.isMentionedInStatus); + if (object.statusMentions) { + if (!Array.isArray(object.statusMentions)) + throw TypeError(".proto.WebMessageInfo.statusMentions: array expected"); + message.statusMentions = []; + for (var i = 0; i < object.statusMentions.length; ++i) + message.statusMentions[i] = String(object.statusMentions[i]); + } + if (object.targetMessageId != null) { + if (typeof object.targetMessageId !== "object") + throw TypeError(".proto.WebMessageInfo.targetMessageId: object expected"); + message.targetMessageId = $root.proto.MessageKey.fromObject(object.targetMessageId); + } + if (object.messageAddOns) { + if (!Array.isArray(object.messageAddOns)) + throw TypeError(".proto.WebMessageInfo.messageAddOns: array expected"); + message.messageAddOns = []; + for (var i = 0; i < object.messageAddOns.length; ++i) { + if (typeof object.messageAddOns[i] !== "object") + throw TypeError(".proto.WebMessageInfo.messageAddOns: object expected"); + message.messageAddOns[i] = $root.proto.MessageAddOn.fromObject(object.messageAddOns[i]); + } + } + if (object.statusMentionMessageInfo != null) { + if (typeof object.statusMentionMessageInfo !== "object") + throw TypeError(".proto.WebMessageInfo.statusMentionMessageInfo: object expected"); + message.statusMentionMessageInfo = $root.proto.StatusMentionMessage.fromObject(object.statusMentionMessageInfo); + } + if (object.isSupportAiMessage != null) + message.isSupportAiMessage = Boolean(object.isSupportAiMessage); + if (object.statusMentionSources) { + if (!Array.isArray(object.statusMentionSources)) + throw TypeError(".proto.WebMessageInfo.statusMentionSources: array expected"); + message.statusMentionSources = []; + for (var i = 0; i < object.statusMentionSources.length; ++i) + message.statusMentionSources[i] = String(object.statusMentionSources[i]); + } + if (object.supportAiCitations) { + if (!Array.isArray(object.supportAiCitations)) + throw TypeError(".proto.WebMessageInfo.supportAiCitations: array expected"); + message.supportAiCitations = []; + for (var i = 0; i < object.supportAiCitations.length; ++i) { + if (typeof object.supportAiCitations[i] !== "object") + throw TypeError(".proto.WebMessageInfo.supportAiCitations: object expected"); + message.supportAiCitations[i] = $root.proto.Citation.fromObject(object.supportAiCitations[i]); + } + } + if (object.botTargetId != null) + message.botTargetId = String(object.botTargetId); return message; }; @@ -100055,168 +154507,169 @@ $root.proto = (function() { object.reactions = []; object.pollUpdates = []; object.eventResponses = []; + object.statusMentions = []; + object.messageAddOns = []; + object.statusMentionSources = []; + object.supportAiCitations = []; } - if (options.defaults) { + if (options.defaults) object.key = null; - object.message = null; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.messageTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.messageTimestamp = options.longs === String ? "0" : 0; - object.status = options.enums === String ? "ERROR" : 0; - object.participant = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.messageC2STimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.messageC2STimestamp = options.longs === String ? "0" : 0; - object.ignore = false; - object.starred = false; - object.broadcast = false; - object.pushName = ""; - if (options.bytes === String) - object.mediaCiphertextSha256 = ""; - else { - object.mediaCiphertextSha256 = []; - if (options.bytes !== Array) - object.mediaCiphertextSha256 = $util.newBuffer(object.mediaCiphertextSha256); - } - object.multicast = false; - object.urlText = false; - object.urlNumber = false; - object.messageStubType = options.enums === String ? "UNKNOWN" : 0; - object.clearMedia = false; - object.duration = 0; - object.paymentInfo = null; - object.finalLiveLocation = null; - object.quotedPaymentInfo = null; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.ephemeralStartTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.ephemeralStartTimestamp = options.longs === String ? "0" : 0; - object.ephemeralDuration = 0; - object.ephemeralOffToOn = false; - object.ephemeralOutOfSync = false; - object.bizPrivacyStatus = options.enums === String ? "E2EE" : 0; - object.verifiedBizName = ""; - object.mediaData = null; - object.photoChange = null; - object.quotedStickerData = null; - if (options.bytes === String) - object.futureproofData = ""; - else { - object.futureproofData = []; - if (options.bytes !== Array) - object.futureproofData = $util.newBuffer(object.futureproofData); - } - object.statusPsa = null; - object.pollAdditionalMetadata = null; - object.agentId = ""; - object.statusAlreadyViewed = false; - if (options.bytes === String) - object.messageSecret = ""; - else { - object.messageSecret = []; - if (options.bytes !== Array) - 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; - object.pinInChat = null; - object.premiumMessageInfo = null; - object.is1PBizBotMessage = false; - object.isGroupHistoryMessage = false; - object.botMessageInvokerJid = ""; - object.commentMetadata = null; - object.reportingTokenInfo = null; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.newsletterServerId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.newsletterServerId = options.longs === String ? "0" : 0; - } if (message.key != null && message.hasOwnProperty("key")) object.key = $root.proto.MessageKey.toObject(message.key, options); - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && message.hasOwnProperty("message")) { object.message = $root.proto.Message.toObject(message.message, options); - if (message.messageTimestamp != null && message.hasOwnProperty("messageTimestamp")) + if (options.oneofs) + object._message = "message"; + } + if (message.messageTimestamp != null && message.hasOwnProperty("messageTimestamp")) { if (typeof message.messageTimestamp === "number") object.messageTimestamp = options.longs === String ? String(message.messageTimestamp) : message.messageTimestamp; else object.messageTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.messageTimestamp) : options.longs === Number ? new $util.LongBits(message.messageTimestamp.low >>> 0, message.messageTimestamp.high >>> 0).toNumber(true) : message.messageTimestamp; - if (message.status != null && message.hasOwnProperty("status")) - object.status = options.enums === String ? $root.proto.WebMessageInfo.Status[message.status] : message.status; - if (message.participant != null && message.hasOwnProperty("participant")) + if (options.oneofs) + object._messageTimestamp = "messageTimestamp"; + } + if (message.status != null && message.hasOwnProperty("status")) { + object.status = options.enums === String ? $root.proto.WebMessageInfo.Status[message.status] === undefined ? message.status : $root.proto.WebMessageInfo.Status[message.status] : message.status; + if (options.oneofs) + object._status = "status"; + } + if (message.participant != null && message.hasOwnProperty("participant")) { object.participant = message.participant; - if (message.messageC2STimestamp != null && message.hasOwnProperty("messageC2STimestamp")) + if (options.oneofs) + object._participant = "participant"; + } + if (message.messageC2STimestamp != null && message.hasOwnProperty("messageC2STimestamp")) { if (typeof message.messageC2STimestamp === "number") object.messageC2STimestamp = options.longs === String ? String(message.messageC2STimestamp) : message.messageC2STimestamp; else object.messageC2STimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.messageC2STimestamp) : options.longs === Number ? new $util.LongBits(message.messageC2STimestamp.low >>> 0, message.messageC2STimestamp.high >>> 0).toNumber(true) : message.messageC2STimestamp; - if (message.ignore != null && message.hasOwnProperty("ignore")) + if (options.oneofs) + object._messageC2STimestamp = "messageC2STimestamp"; + } + if (message.ignore != null && message.hasOwnProperty("ignore")) { object.ignore = message.ignore; - if (message.starred != null && message.hasOwnProperty("starred")) + if (options.oneofs) + object._ignore = "ignore"; + } + if (message.starred != null && message.hasOwnProperty("starred")) { object.starred = message.starred; - if (message.broadcast != null && message.hasOwnProperty("broadcast")) + if (options.oneofs) + object._starred = "starred"; + } + if (message.broadcast != null && message.hasOwnProperty("broadcast")) { object.broadcast = message.broadcast; - if (message.pushName != null && message.hasOwnProperty("pushName")) + if (options.oneofs) + object._broadcast = "broadcast"; + } + if (message.pushName != null && message.hasOwnProperty("pushName")) { object.pushName = message.pushName; - if (message.mediaCiphertextSha256 != null && message.hasOwnProperty("mediaCiphertextSha256")) + if (options.oneofs) + object._pushName = "pushName"; + } + if (message.mediaCiphertextSha256 != null && message.hasOwnProperty("mediaCiphertextSha256")) { object.mediaCiphertextSha256 = options.bytes === String ? $util.base64.encode(message.mediaCiphertextSha256, 0, message.mediaCiphertextSha256.length) : options.bytes === Array ? Array.prototype.slice.call(message.mediaCiphertextSha256) : message.mediaCiphertextSha256; - if (message.multicast != null && message.hasOwnProperty("multicast")) + if (options.oneofs) + object._mediaCiphertextSha256 = "mediaCiphertextSha256"; + } + if (message.multicast != null && message.hasOwnProperty("multicast")) { object.multicast = message.multicast; - if (message.urlText != null && message.hasOwnProperty("urlText")) + if (options.oneofs) + object._multicast = "multicast"; + } + if (message.urlText != null && message.hasOwnProperty("urlText")) { object.urlText = message.urlText; - if (message.urlNumber != null && message.hasOwnProperty("urlNumber")) + if (options.oneofs) + object._urlText = "urlText"; + } + 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.StubType[message.messageStubType] : message.messageStubType; - if (message.clearMedia != null && message.hasOwnProperty("clearMedia")) + if (options.oneofs) + object._urlNumber = "urlNumber"; + } + if (message.messageStubType != null && message.hasOwnProperty("messageStubType")) { + object.messageStubType = options.enums === String ? $root.proto.WebMessageInfo.StubType[message.messageStubType] === undefined ? message.messageStubType : $root.proto.WebMessageInfo.StubType[message.messageStubType] : message.messageStubType; + if (options.oneofs) + object._messageStubType = "messageStubType"; + } + if (message.clearMedia != null && message.hasOwnProperty("clearMedia")) { object.clearMedia = message.clearMedia; + if (options.oneofs) + object._clearMedia = "clearMedia"; + } if (message.messageStubParameters && message.messageStubParameters.length) { object.messageStubParameters = []; for (var j = 0; j < message.messageStubParameters.length; ++j) object.messageStubParameters[j] = message.messageStubParameters[j]; } - if (message.duration != null && message.hasOwnProperty("duration")) + if (message.duration != null && message.hasOwnProperty("duration")) { object.duration = message.duration; + if (options.oneofs) + object._duration = "duration"; + } if (message.labels && message.labels.length) { object.labels = []; for (var j = 0; j < message.labels.length; ++j) object.labels[j] = message.labels[j]; } - if (message.paymentInfo != null && message.hasOwnProperty("paymentInfo")) + if (message.paymentInfo != null && message.hasOwnProperty("paymentInfo")) { object.paymentInfo = $root.proto.PaymentInfo.toObject(message.paymentInfo, options); - if (message.finalLiveLocation != null && message.hasOwnProperty("finalLiveLocation")) + if (options.oneofs) + object._paymentInfo = "paymentInfo"; + } + if (message.finalLiveLocation != null && message.hasOwnProperty("finalLiveLocation")) { object.finalLiveLocation = $root.proto.Message.LiveLocationMessage.toObject(message.finalLiveLocation, options); - if (message.quotedPaymentInfo != null && message.hasOwnProperty("quotedPaymentInfo")) + if (options.oneofs) + object._finalLiveLocation = "finalLiveLocation"; + } + if (message.quotedPaymentInfo != null && message.hasOwnProperty("quotedPaymentInfo")) { object.quotedPaymentInfo = $root.proto.PaymentInfo.toObject(message.quotedPaymentInfo, options); - if (message.ephemeralStartTimestamp != null && message.hasOwnProperty("ephemeralStartTimestamp")) + if (options.oneofs) + object._quotedPaymentInfo = "quotedPaymentInfo"; + } + if (message.ephemeralStartTimestamp != null && message.hasOwnProperty("ephemeralStartTimestamp")) { if (typeof message.ephemeralStartTimestamp === "number") object.ephemeralStartTimestamp = options.longs === String ? String(message.ephemeralStartTimestamp) : message.ephemeralStartTimestamp; else object.ephemeralStartTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.ephemeralStartTimestamp) : options.longs === Number ? new $util.LongBits(message.ephemeralStartTimestamp.low >>> 0, message.ephemeralStartTimestamp.high >>> 0).toNumber(true) : message.ephemeralStartTimestamp; - if (message.ephemeralDuration != null && message.hasOwnProperty("ephemeralDuration")) + if (options.oneofs) + object._ephemeralStartTimestamp = "ephemeralStartTimestamp"; + } + if (message.ephemeralDuration != null && message.hasOwnProperty("ephemeralDuration")) { object.ephemeralDuration = message.ephemeralDuration; - if (message.ephemeralOffToOn != null && message.hasOwnProperty("ephemeralOffToOn")) + if (options.oneofs) + object._ephemeralDuration = "ephemeralDuration"; + } + if (message.ephemeralOffToOn != null && message.hasOwnProperty("ephemeralOffToOn")) { object.ephemeralOffToOn = message.ephemeralOffToOn; - if (message.ephemeralOutOfSync != null && message.hasOwnProperty("ephemeralOutOfSync")) + if (options.oneofs) + object._ephemeralOffToOn = "ephemeralOffToOn"; + } + 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.BizPrivacyStatus[message.bizPrivacyStatus] : message.bizPrivacyStatus; - if (message.verifiedBizName != null && message.hasOwnProperty("verifiedBizName")) + if (options.oneofs) + object._ephemeralOutOfSync = "ephemeralOutOfSync"; + } + if (message.bizPrivacyStatus != null && message.hasOwnProperty("bizPrivacyStatus")) { + object.bizPrivacyStatus = options.enums === String ? $root.proto.WebMessageInfo.BizPrivacyStatus[message.bizPrivacyStatus] === undefined ? message.bizPrivacyStatus : $root.proto.WebMessageInfo.BizPrivacyStatus[message.bizPrivacyStatus] : message.bizPrivacyStatus; + if (options.oneofs) + object._bizPrivacyStatus = "bizPrivacyStatus"; + } + if (message.verifiedBizName != null && message.hasOwnProperty("verifiedBizName")) { object.verifiedBizName = message.verifiedBizName; - if (message.mediaData != null && message.hasOwnProperty("mediaData")) + if (options.oneofs) + object._verifiedBizName = "verifiedBizName"; + } + if (message.mediaData != null && message.hasOwnProperty("mediaData")) { object.mediaData = $root.proto.MediaData.toObject(message.mediaData, options); - if (message.photoChange != null && message.hasOwnProperty("photoChange")) + if (options.oneofs) + object._mediaData = "mediaData"; + } + if (message.photoChange != null && message.hasOwnProperty("photoChange")) { object.photoChange = $root.proto.PhotoChange.toObject(message.photoChange, options); + if (options.oneofs) + object._photoChange = "photoChange"; + } if (message.userReceipt && message.userReceipt.length) { object.userReceipt = []; for (var j = 0; j < message.userReceipt.length; ++j) @@ -100227,58 +154680,162 @@ $root.proto = (function() { for (var j = 0; j < message.reactions.length; ++j) object.reactions[j] = $root.proto.Reaction.toObject(message.reactions[j], options); } - if (message.quotedStickerData != null && message.hasOwnProperty("quotedStickerData")) + if (message.quotedStickerData != null && message.hasOwnProperty("quotedStickerData")) { object.quotedStickerData = $root.proto.MediaData.toObject(message.quotedStickerData, options); - if (message.futureproofData != null && message.hasOwnProperty("futureproofData")) + if (options.oneofs) + object._quotedStickerData = "quotedStickerData"; + } + if (message.futureproofData != null && message.hasOwnProperty("futureproofData")) { object.futureproofData = options.bytes === String ? $util.base64.encode(message.futureproofData, 0, message.futureproofData.length) : options.bytes === Array ? Array.prototype.slice.call(message.futureproofData) : message.futureproofData; - if (message.statusPsa != null && message.hasOwnProperty("statusPsa")) + if (options.oneofs) + object._futureproofData = "futureproofData"; + } + if (message.statusPsa != null && message.hasOwnProperty("statusPsa")) { object.statusPsa = $root.proto.StatusPSA.toObject(message.statusPsa, options); + if (options.oneofs) + object._statusPsa = "statusPsa"; + } if (message.pollUpdates && message.pollUpdates.length) { object.pollUpdates = []; for (var j = 0; j < message.pollUpdates.length; ++j) object.pollUpdates[j] = $root.proto.PollUpdate.toObject(message.pollUpdates[j], options); } - if (message.pollAdditionalMetadata != null && message.hasOwnProperty("pollAdditionalMetadata")) + if (message.pollAdditionalMetadata != null && message.hasOwnProperty("pollAdditionalMetadata")) { object.pollAdditionalMetadata = $root.proto.PollAdditionalMetadata.toObject(message.pollAdditionalMetadata, options); - if (message.agentId != null && message.hasOwnProperty("agentId")) + if (options.oneofs) + object._pollAdditionalMetadata = "pollAdditionalMetadata"; + } + if (message.agentId != null && message.hasOwnProperty("agentId")) { object.agentId = message.agentId; - if (message.statusAlreadyViewed != null && message.hasOwnProperty("statusAlreadyViewed")) + if (options.oneofs) + object._agentId = "agentId"; + } + if (message.statusAlreadyViewed != null && message.hasOwnProperty("statusAlreadyViewed")) { object.statusAlreadyViewed = message.statusAlreadyViewed; - if (message.messageSecret != null && message.hasOwnProperty("messageSecret")) + if (options.oneofs) + object._statusAlreadyViewed = "statusAlreadyViewed"; + } + if (message.messageSecret != null && message.hasOwnProperty("messageSecret")) { object.messageSecret = options.bytes === String ? $util.base64.encode(message.messageSecret, 0, message.messageSecret.length) : options.bytes === Array ? Array.prototype.slice.call(message.messageSecret) : message.messageSecret; - if (message.keepInChat != null && message.hasOwnProperty("keepInChat")) + if (options.oneofs) + object._messageSecret = "messageSecret"; + } + if (message.keepInChat != null && message.hasOwnProperty("keepInChat")) { object.keepInChat = $root.proto.KeepInChat.toObject(message.keepInChat, options); - if (message.originalSelfAuthorUserJidString != null && message.hasOwnProperty("originalSelfAuthorUserJidString")) + if (options.oneofs) + object._keepInChat = "keepInChat"; + } + if (message.originalSelfAuthorUserJidString != null && message.hasOwnProperty("originalSelfAuthorUserJidString")) { object.originalSelfAuthorUserJidString = message.originalSelfAuthorUserJidString; - if (message.revokeMessageTimestamp != null && message.hasOwnProperty("revokeMessageTimestamp")) + if (options.oneofs) + object._originalSelfAuthorUserJidString = "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; - if (message.pinInChat != null && message.hasOwnProperty("pinInChat")) + if (options.oneofs) + object._revokeMessageTimestamp = "revokeMessageTimestamp"; + } + if (message.pinInChat != null && message.hasOwnProperty("pinInChat")) { object.pinInChat = $root.proto.PinInChat.toObject(message.pinInChat, options); - if (message.premiumMessageInfo != null && message.hasOwnProperty("premiumMessageInfo")) + if (options.oneofs) + object._pinInChat = "pinInChat"; + } + if (message.premiumMessageInfo != null && message.hasOwnProperty("premiumMessageInfo")) { object.premiumMessageInfo = $root.proto.PremiumMessageInfo.toObject(message.premiumMessageInfo, options); - if (message.is1PBizBotMessage != null && message.hasOwnProperty("is1PBizBotMessage")) + if (options.oneofs) + object._premiumMessageInfo = "premiumMessageInfo"; + } + if (message.is1PBizBotMessage != null && message.hasOwnProperty("is1PBizBotMessage")) { object.is1PBizBotMessage = message.is1PBizBotMessage; - if (message.isGroupHistoryMessage != null && message.hasOwnProperty("isGroupHistoryMessage")) + if (options.oneofs) + object._is1PBizBotMessage = "is1PBizBotMessage"; + } + if (message.isGroupHistoryMessage != null && message.hasOwnProperty("isGroupHistoryMessage")) { object.isGroupHistoryMessage = message.isGroupHistoryMessage; - if (message.botMessageInvokerJid != null && message.hasOwnProperty("botMessageInvokerJid")) + if (options.oneofs) + object._isGroupHistoryMessage = "isGroupHistoryMessage"; + } + if (message.botMessageInvokerJid != null && message.hasOwnProperty("botMessageInvokerJid")) { object.botMessageInvokerJid = message.botMessageInvokerJid; - if (message.commentMetadata != null && message.hasOwnProperty("commentMetadata")) + if (options.oneofs) + object._botMessageInvokerJid = "botMessageInvokerJid"; + } + if (message.commentMetadata != null && message.hasOwnProperty("commentMetadata")) { object.commentMetadata = $root.proto.CommentMetadata.toObject(message.commentMetadata, options); + if (options.oneofs) + object._commentMetadata = "commentMetadata"; + } if (message.eventResponses && message.eventResponses.length) { object.eventResponses = []; for (var j = 0; j < message.eventResponses.length; ++j) object.eventResponses[j] = $root.proto.EventResponse.toObject(message.eventResponses[j], options); } - if (message.reportingTokenInfo != null && message.hasOwnProperty("reportingTokenInfo")) + if (message.reportingTokenInfo != null && message.hasOwnProperty("reportingTokenInfo")) { object.reportingTokenInfo = $root.proto.ReportingTokenInfo.toObject(message.reportingTokenInfo, options); - if (message.newsletterServerId != null && message.hasOwnProperty("newsletterServerId")) + if (options.oneofs) + object._reportingTokenInfo = "reportingTokenInfo"; + } + if (message.newsletterServerId != null && message.hasOwnProperty("newsletterServerId")) { if (typeof message.newsletterServerId === "number") object.newsletterServerId = options.longs === String ? String(message.newsletterServerId) : message.newsletterServerId; else object.newsletterServerId = options.longs === String ? $util.Long.prototype.toString.call(message.newsletterServerId) : options.longs === Number ? new $util.LongBits(message.newsletterServerId.low >>> 0, message.newsletterServerId.high >>> 0).toNumber(true) : message.newsletterServerId; + if (options.oneofs) + object._newsletterServerId = "newsletterServerId"; + } + if (message.eventAdditionalMetadata != null && message.hasOwnProperty("eventAdditionalMetadata")) { + object.eventAdditionalMetadata = $root.proto.EventAdditionalMetadata.toObject(message.eventAdditionalMetadata, options); + if (options.oneofs) + object._eventAdditionalMetadata = "eventAdditionalMetadata"; + } + if (message.isMentionedInStatus != null && message.hasOwnProperty("isMentionedInStatus")) { + object.isMentionedInStatus = message.isMentionedInStatus; + if (options.oneofs) + object._isMentionedInStatus = "isMentionedInStatus"; + } + if (message.statusMentions && message.statusMentions.length) { + object.statusMentions = []; + for (var j = 0; j < message.statusMentions.length; ++j) + object.statusMentions[j] = message.statusMentions[j]; + } + if (message.targetMessageId != null && message.hasOwnProperty("targetMessageId")) { + object.targetMessageId = $root.proto.MessageKey.toObject(message.targetMessageId, options); + if (options.oneofs) + object._targetMessageId = "targetMessageId"; + } + if (message.messageAddOns && message.messageAddOns.length) { + object.messageAddOns = []; + for (var j = 0; j < message.messageAddOns.length; ++j) + object.messageAddOns[j] = $root.proto.MessageAddOn.toObject(message.messageAddOns[j], options); + } + if (message.statusMentionMessageInfo != null && message.hasOwnProperty("statusMentionMessageInfo")) { + object.statusMentionMessageInfo = $root.proto.StatusMentionMessage.toObject(message.statusMentionMessageInfo, options); + if (options.oneofs) + object._statusMentionMessageInfo = "statusMentionMessageInfo"; + } + if (message.isSupportAiMessage != null && message.hasOwnProperty("isSupportAiMessage")) { + object.isSupportAiMessage = message.isSupportAiMessage; + if (options.oneofs) + object._isSupportAiMessage = "isSupportAiMessage"; + } + if (message.statusMentionSources && message.statusMentionSources.length) { + object.statusMentionSources = []; + for (var j = 0; j < message.statusMentionSources.length; ++j) + object.statusMentionSources[j] = message.statusMentionSources[j]; + } + if (message.supportAiCitations && message.supportAiCitations.length) { + object.supportAiCitations = []; + for (var j = 0; j < message.supportAiCitations.length; ++j) + object.supportAiCitations[j] = $root.proto.Citation.toObject(message.supportAiCitations[j], options); + } + if (message.botTargetId != null && message.hasOwnProperty("botTargetId")) { + object.botTargetId = message.botTargetId; + if (options.oneofs) + object._botTargetId = "botTargetId"; + } return object; }; @@ -100293,6 +154850,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for WebMessageInfo + * @function getTypeUrl + * @memberof proto.WebMessageInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WebMessageInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.WebMessageInfo"; + }; + /** * BizPrivacyStatus enum. * @name proto.WebMessageInfo.BizPrivacyStatus @@ -100538,6 +155110,21 @@ $root.proto = (function() { * @property {number} REMINDER_SETUP_MESSAGE=198 REMINDER_SETUP_MESSAGE value * @property {number} REMINDER_SENT_MESSAGE=199 REMINDER_SENT_MESSAGE value * @property {number} REMINDER_CANCEL_MESSAGE=200 REMINDER_CANCEL_MESSAGE value + * @property {number} BIZ_COEX_PRIVACY_INIT=201 BIZ_COEX_PRIVACY_INIT value + * @property {number} BIZ_COEX_PRIVACY_TRANSITION=202 BIZ_COEX_PRIVACY_TRANSITION value + * @property {number} GROUP_DEACTIVATED=203 GROUP_DEACTIVATED value + * @property {number} COMMUNITY_DEACTIVATE_SIBLING_GROUP=204 COMMUNITY_DEACTIVATE_SIBLING_GROUP value + * @property {number} EVENT_UPDATED=205 EVENT_UPDATED value + * @property {number} EVENT_CANCELED=206 EVENT_CANCELED value + * @property {number} COMMUNITY_OWNER_UPDATED=207 COMMUNITY_OWNER_UPDATED value + * @property {number} COMMUNITY_SUB_GROUP_VISIBILITY_HIDDEN=208 COMMUNITY_SUB_GROUP_VISIBILITY_HIDDEN value + * @property {number} CAPI_GROUP_NE2EE_SYSTEM_MESSAGE=209 CAPI_GROUP_NE2EE_SYSTEM_MESSAGE value + * @property {number} STATUS_MENTION=210 STATUS_MENTION value + * @property {number} USER_CONTROLS_SYSTEM_MESSAGE=211 USER_CONTROLS_SYSTEM_MESSAGE value + * @property {number} SUPPORT_SYSTEM_MESSAGE=212 SUPPORT_SYSTEM_MESSAGE value + * @property {number} CHANGE_LID=213 CHANGE_LID value + * @property {number} BIZ_CUSTOMER_3PD_DATA_SHARING_OPT_IN_MESSAGE=214 BIZ_CUSTOMER_3PD_DATA_SHARING_OPT_IN_MESSAGE value + * @property {number} BIZ_CUSTOMER_3PD_DATA_SHARING_OPT_OUT_MESSAGE=215 BIZ_CUSTOMER_3PD_DATA_SHARING_OPT_OUT_MESSAGE value */ WebMessageInfo.StubType = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -100742,6 +155329,21 @@ $root.proto = (function() { values[valuesById[198] = "REMINDER_SETUP_MESSAGE"] = 198; values[valuesById[199] = "REMINDER_SENT_MESSAGE"] = 199; values[valuesById[200] = "REMINDER_CANCEL_MESSAGE"] = 200; + values[valuesById[201] = "BIZ_COEX_PRIVACY_INIT"] = 201; + values[valuesById[202] = "BIZ_COEX_PRIVACY_TRANSITION"] = 202; + values[valuesById[203] = "GROUP_DEACTIVATED"] = 203; + values[valuesById[204] = "COMMUNITY_DEACTIVATE_SIBLING_GROUP"] = 204; + values[valuesById[205] = "EVENT_UPDATED"] = 205; + values[valuesById[206] = "EVENT_CANCELED"] = 206; + values[valuesById[207] = "COMMUNITY_OWNER_UPDATED"] = 207; + values[valuesById[208] = "COMMUNITY_SUB_GROUP_VISIBILITY_HIDDEN"] = 208; + values[valuesById[209] = "CAPI_GROUP_NE2EE_SYSTEM_MESSAGE"] = 209; + values[valuesById[210] = "STATUS_MENTION"] = 210; + values[valuesById[211] = "USER_CONTROLS_SYSTEM_MESSAGE"] = 211; + values[valuesById[212] = "SUPPORT_SYSTEM_MESSAGE"] = 212; + values[valuesById[213] = "CHANGE_LID"] = 213; + values[valuesById[214] = "BIZ_CUSTOMER_3PD_DATA_SHARING_OPT_IN_MESSAGE"] = 214; + values[valuesById[215] = "BIZ_CUSTOMER_3PD_DATA_SHARING_OPT_OUT_MESSAGE"] = 215; return values; })(); @@ -100778,27 +155380,27 @@ $root.proto = (function() { /** * WebNotificationsInfo timestamp. - * @member {number|Long} timestamp + * @member {number|Long|null|undefined} timestamp * @memberof proto.WebNotificationsInfo * @instance */ - WebNotificationsInfo.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + WebNotificationsInfo.prototype.timestamp = null; /** * WebNotificationsInfo unreadChats. - * @member {number} unreadChats + * @member {number|null|undefined} unreadChats * @memberof proto.WebNotificationsInfo * @instance */ - WebNotificationsInfo.prototype.unreadChats = 0; + WebNotificationsInfo.prototype.unreadChats = null; /** * WebNotificationsInfo notifyMessageCount. - * @member {number} notifyMessageCount + * @member {number|null|undefined} notifyMessageCount * @memberof proto.WebNotificationsInfo * @instance */ - WebNotificationsInfo.prototype.notifyMessageCount = 0; + WebNotificationsInfo.prototype.notifyMessageCount = null; /** * WebNotificationsInfo notifyMessages. @@ -100808,6 +155410,27 @@ $root.proto = (function() { */ WebNotificationsInfo.prototype.notifyMessages = $util.emptyArray; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebNotificationsInfo.prototype, "_timestamp", { + get: $util.oneOfGetter($oneOfFields = ["timestamp"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebNotificationsInfo.prototype, "_unreadChats", { + get: $util.oneOfGetter($oneOfFields = ["unreadChats"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebNotificationsInfo.prototype, "_notifyMessageCount", { + get: $util.oneOfGetter($oneOfFields = ["notifyMessageCount"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new WebNotificationsInfo instance using the specified properties. * @function create @@ -100875,20 +155498,24 @@ $root.proto = (function() { while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: - message.timestamp = reader.uint64(); - break; - case 3: - message.unreadChats = reader.uint32(); - break; - case 4: - message.notifyMessageCount = reader.uint32(); - break; - case 5: - if (!(message.notifyMessages && message.notifyMessages.length)) - message.notifyMessages = []; - message.notifyMessages.push($root.proto.WebMessageInfo.decode(reader, reader.uint32())); - break; + case 2: { + message.timestamp = reader.uint64(); + break; + } + case 3: { + message.unreadChats = reader.uint32(); + break; + } + case 4: { + message.notifyMessageCount = reader.uint32(); + break; + } + case 5: { + if (!(message.notifyMessages && message.notifyMessages.length)) + message.notifyMessages = []; + message.notifyMessages.push($root.proto.WebMessageInfo.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -100924,15 +155551,22 @@ $root.proto = (function() { WebNotificationsInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.timestamp != null && message.hasOwnProperty("timestamp")) + var properties = {}; + if (message.timestamp != null && message.hasOwnProperty("timestamp")) { + properties._timestamp = 1; if (!$util.isInteger(message.timestamp) && !(message.timestamp && $util.isInteger(message.timestamp.low) && $util.isInteger(message.timestamp.high))) return "timestamp: integer|Long expected"; - if (message.unreadChats != null && message.hasOwnProperty("unreadChats")) + } + if (message.unreadChats != null && message.hasOwnProperty("unreadChats")) { + properties._unreadChats = 1; if (!$util.isInteger(message.unreadChats)) return "unreadChats: integer expected"; - if (message.notifyMessageCount != null && message.hasOwnProperty("notifyMessageCount")) + } + if (message.notifyMessageCount != null && message.hasOwnProperty("notifyMessageCount")) { + properties._notifyMessageCount = 1; if (!$util.isInteger(message.notifyMessageCount)) return "notifyMessageCount: integer expected"; + } if (message.notifyMessages != null && message.hasOwnProperty("notifyMessages")) { if (!Array.isArray(message.notifyMessages)) return "notifyMessages: array expected"; @@ -100998,24 +155632,24 @@ $root.proto = (function() { var object = {}; if (options.arrays || options.defaults) object.notifyMessages = []; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.timestamp = options.longs === String ? "0" : 0; - object.unreadChats = 0; - object.notifyMessageCount = 0; - } - if (message.timestamp != null && message.hasOwnProperty("timestamp")) + 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(true) : message.timestamp; - if (message.unreadChats != null && message.hasOwnProperty("unreadChats")) + if (options.oneofs) + object._timestamp = "timestamp"; + } + if (message.unreadChats != null && message.hasOwnProperty("unreadChats")) { object.unreadChats = message.unreadChats; - if (message.notifyMessageCount != null && message.hasOwnProperty("notifyMessageCount")) + if (options.oneofs) + object._unreadChats = "unreadChats"; + } + if (message.notifyMessageCount != null && message.hasOwnProperty("notifyMessageCount")) { object.notifyMessageCount = message.notifyMessageCount; + if (options.oneofs) + object._notifyMessageCount = "notifyMessageCount"; + } if (message.notifyMessages && message.notifyMessages.length) { object.notifyMessages = []; for (var j = 0; j < message.notifyMessages.length; ++j) @@ -101035,6 +155669,21 @@ $root.proto = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for WebNotificationsInfo + * @function getTypeUrl + * @memberof proto.WebNotificationsInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WebNotificationsInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/proto.WebNotificationsInfo"; + }; + return WebNotificationsInfo; })(); diff --git a/proto-extract/.gitignore b/proto-extract/.gitignore deleted file mode 100644 index 28f1ba7..0000000 --- a/proto-extract/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules -.DS_Store \ No newline at end of file diff --git a/proto-extract/README.md b/proto-extract/README.md deleted file mode 100644 index fc9e603..0000000 --- a/proto-extract/README.md +++ /dev/null @@ -1,8 +0,0 @@ -# Proto Extract - -Derived initially from `whatseow`'s proto extract, this version generates a predictable diff friendly protobuf. It also does not rely on a hardcoded set of modules to look for but finds all proto modules on its own and extracts the proto from there. - -## Usage -1. Install dependencies with `yarn` (or `npm install`) -2. `yarn start` -3. The script will update `../WAProto/WAProto.proto` (except if something is broken) diff --git a/proto-extract/index.js b/proto-extract/index.js deleted file mode 100644 index c780612..0000000 --- a/proto-extract/index.js +++ /dev/null @@ -1,382 +0,0 @@ -const request = require('request-promise-native') -const acorn = require('acorn') -const walk = require('acorn-walk') -const fs = require('fs/promises') - -const addPrefix = (lines, prefix) => lines.map(line => prefix + line) - -const extractAllExpressions = (node) => { - const expressions = [node] - const exp = node.expression - if(exp) { - expressions.push(exp) - } - - if(node.expression?.expressions?.length) { - for(const exp of node.expression?.expressions) { - expressions.push(...extractAllExpressions(exp)) - } - } - - return expressions -} - -async function findAppModules() { - const ua = { - headers: { - 'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64; rv:100.0) Gecko/20100101 Firefox/100.0', - 'Sec-Fetch-Dest': 'script', - 'Sec-Fetch-Mode': 'no-cors', - 'Sec-Fetch-Site': 'same-origin', - 'Referer': 'https://web.whatsapp.com/', - 'Accept': '*/*', - 'Accept-Language': 'Accept-Language: en-US,en;q=0.5', - } - } - const baseURL = 'https://web.whatsapp.com' - const serviceworker = await request.get(`${baseURL}/serviceworker.js`, ua) - - const versions = [...serviceworker.matchAll(/assets-manifest-([\d\.]+).json/g)].map(r => r[1]) - const version = versions[0] - - let bootstrapQRURL = '' - if(version) { - const asset = await request.get(`${baseURL}/assets-manifest-${version}.json`, ua) - const hashFiles = JSON.parse(asset) - const files = Object.keys(hashFiles) - const app = files.find(f => /^app\./.test(f)) - bootstrapQRURL = `${baseURL}/${app}` - } else { - const index = await request.get(baseURL, ua) - const bootstrapQRID = index.match(/src="\/app.([0-9a-z]{10,}).js"/)[1] - bootstrapQRURL = baseURL + '/app.' + bootstrapQRID + '.js' - } - - console.error('Found source JS URL:', bootstrapQRURL) - - const qrData = await request.get(bootstrapQRURL, ua) - const waVersion = qrData.match(/(?:appVersion:|VERSION_STR=)"(\d\.\d+\.\d+)"/)[1] - console.log('Current version:', waVersion) - // This one list of types is so long that it's split into two JavaScript declarations. - // The module finder below can't handle it, so just patch it manually here. - const patchedQrData = qrData.replace('t.ActionLinkSpec=void 0,t.TemplateButtonSpec', 't.ActionLinkSpec=t.TemplateButtonSpec') - //const patchedQrData = qrData.replace("Spec=void 0,t.", "Spec=t.") - const qrModules = acorn.parse(patchedQrData).body[0].expression.arguments[0].elements[1].properties - - const result = qrModules.filter(m => { - const hasProto = !!m.value.body.body.find(b => { - const expressions = extractAllExpressions(b) - return expressions?.find(e => e?.left?.property?.name === 'internalSpec') - }) - if(hasProto) { - return true - } - }) - - return result -} - -(async() => { - const unspecName = name => name.endsWith('Spec') ? name.slice(0, -4) : name - const unnestName = name => name.split('$').slice(-1)[0] - const getNesting = name => name.split('$').slice(0, -1).join('$') - const makeRenameFunc = () => ( - name => { - name = unspecName(name) - return name// .replaceAll('$', '__') - // return renames[name] ?? unnestName(name) - } - ) - // The constructor IDs that can be used for enum types - // const enumConstructorIDs = [76672, 54302] - - const modules = await findAppModules() - - // Sort modules so that whatsapp module id changes don't change the order in the output protobuf schema - // const modules = [] - // for (const mod of wantedModules) { - // modules.push(unsortedModules.find(node => node.key.value === mod)) - // } - - // find aliases of cross references between the wanted modules - const modulesInfo = {} - const moduleIndentationMap = {} - modules.forEach(({ key, value }) => { - const requiringParam = value.params[2].name - modulesInfo[key.value] = { crossRefs: [] } - walk.simple(value, { - VariableDeclarator(node) { - if(node.init && node.init.type === 'CallExpression' && node.init.callee.name === requiringParam && node.init.arguments.length === 1) { - modulesInfo[key.value].crossRefs.push({ alias: node.id.name, module: node.init.arguments[0].value }) - } - } - }) - }) - - // find all identifiers and, for enums, their array of values - for(const mod of modules) { - const modInfo = modulesInfo[mod.key.value] - const rename = makeRenameFunc(mod.key.value) - - // all identifiers will be initialized to "void 0" (i.e. "undefined") at the start, so capture them here - walk.ancestor(mod, { - UnaryExpression(node, anc) { - if(!modInfo.identifiers && node.operator === 'void') { - const assignments = [] - let i = 1 - anc.reverse() - while(anc[i].type === 'AssignmentExpression') { - assignments.push(anc[i++].left) - } - - const makeBlankIdent = a => { - const key = rename(a.property.name) - const indentation = getNesting(key) - const value = { name: key } - - moduleIndentationMap[key] = moduleIndentationMap[key] || { } - moduleIndentationMap[key].indentation = indentation - - if(indentation.length) { - moduleIndentationMap[indentation] = moduleIndentationMap[indentation] || { } - moduleIndentationMap[indentation].members = moduleIndentationMap[indentation].members || new Set() - moduleIndentationMap[indentation].members.add(key) - } - - return [key, value] - } - - modInfo.identifiers = Object.fromEntries(assignments.map(makeBlankIdent).reverse()) - - } - } - }) - const enumAliases = {} - // enums are defined directly, and both enums and messages get a one-letter alias - walk.simple(mod, { - VariableDeclarator(node) { - if( - node.init?.type === 'CallExpression' - // && enumConstructorIDs.includes(node.init.callee?.arguments?.[0]?.value) - && !!node.init.arguments.length - && node.init.arguments[0].type === 'ObjectExpression' - && node.init.arguments[0].properties.length - ) { - const values = node.init.arguments[0].properties.map(p => ({ - name: p.key.name, - id: p.value.value - })) - enumAliases[node.id.name] = values - } - }, - AssignmentExpression(node) { - if(node.left.type === 'MemberExpression' && modInfo.identifiers[rename(node.left.property.name)]) { - const ident = modInfo.identifiers[rename(node.left.property.name)] - ident.alias = node.right.name - // enumAliases[ident.alias] = enumAliases[ident.alias] || [] - ident.enumValues = enumAliases[ident.alias] - } - }, - }) - } - - // find the contents for all protobuf messages - for(const mod of modules) { - const modInfo = modulesInfo[mod.key.value] - const rename = makeRenameFunc(mod.key.value) - - // message specifications are stored in a "internalSpec" attribute of the respective identifier alias - walk.simple(mod, { - AssignmentExpression(node) { - if(node.left.type === 'MemberExpression' && node.left.property.name === 'internalSpec' && node.right.type === 'ObjectExpression') { - const targetIdent = Object.values(modInfo.identifiers).find(v => v.alias === node.left.object.name) - if(!targetIdent) { - console.warn(`found message specification for unknown identifier alias: ${node.left.object.name}`) - return - } - - // partition spec properties by normal members and constraints (like "__oneofs__") which will be processed afterwards - const constraints = [] - let members = [] - for(const p of node.right.properties) { - p.key.name = p.key.type === 'Identifier' ? p.key.name : p.key.value - const arr = p.key.name.substr(0, 2) === '__' ? constraints : members - arr.push(p) - } - - members = members.map(({ key: { name }, value: { elements } }) => { - let type - const flags = [] - const unwrapBinaryOr = n => (n.type === 'BinaryExpression' && n.operator === '|') ? [].concat(unwrapBinaryOr(n.left), unwrapBinaryOr(n.right)) : [n] - - // find type and flags - unwrapBinaryOr(elements[1]).forEach(m => { - if(m.type === 'MemberExpression' && m.object.type === 'MemberExpression') { - if(m.object.property.name === 'TYPES') { - type = m.property.name.toLowerCase() - } else if(m.object.property.name === 'FLAGS') { - flags.push(m.property.name.toLowerCase()) - } - } - }) - - // determine cross reference name from alias if this member has type "message" or "enum" - if(type === 'message' || type === 'enum') { - const currLoc = ` from member '${name}' of message '${targetIdent.name}'` - if(elements[2].type === 'Identifier') { - type = Object.values(modInfo.identifiers).find(v => v.alias === elements[2].name)?.name - if(!type) { - console.warn(`unable to find reference of alias '${elements[2].name}'` + currLoc) - } - } else if(elements[2].type === 'MemberExpression') { - const crossRef = modInfo.crossRefs.find(r => r.alias === elements[2].object.name) - if(crossRef && modulesInfo[crossRef.module].identifiers[rename(elements[2].property.name)]) { - type = rename(elements[2].property.name) - } else { - console.warn(`unable to find reference of alias to other module '${elements[2].object.name}' or to message ${elements[2].property.name} of this module` + currLoc) - } - } - } - - return { name, id: elements[0].value, type, flags } - }) - - // resolve constraints for members - constraints.forEach(c => { - if(c.key.name === '__oneofs__' && c.value.type === 'ObjectExpression') { - const newOneOfs = c.value.properties.map(p => ({ - name: p.key.name, - type: '__oneof__', - members: p.value.elements.map(e => { - const idx = members.findIndex(m => m.name === e.value) - const member = members[idx] - members.splice(idx, 1) - return member - }) - })) - members.push(...newOneOfs) - } - }) - - targetIdent.members = members - } - } - }) - } - - const decodedProtoMap = { } - const spaceIndent = ' '.repeat(4) - for(const mod of modules) { - const modInfo = modulesInfo[mod.key.value] - const identifiers = Object.values(modInfo.identifiers) - - // enum stringifying function - const stringifyEnum = (ident, overrideName = null) => [].concat( - [`enum ${overrideName || ident.displayName || ident.name} {`], - addPrefix(ident.enumValues.map(v => `${v.name} = ${v.id};`), spaceIndent), - ['}'] - ) - - // message specification member stringifying function - const stringifyMessageSpecMember = (info, completeFlags, parentName = undefined) => { - if(info.type === '__oneof__') { - return [].concat( - [`oneof ${info.name} {`], - addPrefix([].concat(...info.members.map(m => stringifyMessageSpecMember(m, false))), spaceIndent), - ['}'] - ) - } else { - if(info.flags.includes('packed')) { - info.flags.splice(info.flags.indexOf('packed')) - info.packed = ' [packed=true]' - } - - if(completeFlags && info.flags.length === 0) { - info.flags.push('optional') - } - - const ret = [] - const indentation = moduleIndentationMap[info.type]?.indentation - let typeName = unnestName(info.type) - if(indentation !== parentName && indentation) { - typeName = `${indentation.replaceAll('$', '.')}.${typeName}` - } - - // if(info.enumValues) { - // // typeName = unnestName(info.type) - // ret = stringifyEnum(info, typeName) - // } - - ret.push(`${info.flags.join(' ') + (info.flags.length === 0 ? '' : ' ')}${typeName} ${info.name} = ${info.id}${info.packed || ''};`) - return ret - } - } - - // message specification stringifying function - const stringifyMessageSpec = (ident) => { - const members = moduleIndentationMap[ident.name]?.members - const result = [] - result.push( - `message ${ident.displayName || ident.name} {`, - ...addPrefix([].concat(...ident.members.map(m => stringifyMessageSpecMember(m, true, ident.name))), spaceIndent), - ) - - if(members?.size) { - const sortedMembers = Array.from(members).sort() - for(const memberName of sortedMembers) { - let entity = modInfo.identifiers[memberName] - if(entity) { - const displayName = entity.name.slice(ident.name.length + 1) - entity = { ...entity, displayName } - result.push(...addPrefix(getEntity(entity), spaceIndent)) - } else { - console.log('missing nested entity ', memberName) - } - } - } - - result.push('}') - result.push('') - - return result - } - - const getEntity = (v) => { - let result - if(v.members) { - result = stringifyMessageSpec(v) - } else if(v.enumValues?.length) { - result = stringifyEnum(v) - } else { - result = ['// Unknown entity ' + v.name] - } - - return result - } - - const stringifyEntity = v => { - return { - content: getEntity(v).join('\n'), - name: v.name - } - } - - for(const value of identifiers) { - const { name, content } = stringifyEntity(value) - if(!moduleIndentationMap[name]?.indentation?.length) { - decodedProtoMap[name] = content - } - // decodedProtoMap[name] = content - } - } - - // console.log(moduleIndentationMap) - const decodedProto = Object.keys(decodedProtoMap).sort() - const sortedStr = decodedProto.map(d => decodedProtoMap[d]).join('\n') - - const decodedProtoStr = `syntax = "proto2";\npackage proto;\n\n${sortedStr}` - const destinationPath = '../WAProto/WAProto.proto' - await fs.writeFile(destinationPath, decodedProtoStr) - - console.log(`Extracted protobuf schema to "${destinationPath}"`) -})() diff --git a/proto-extract/package.json b/proto-extract/package.json deleted file mode 100644 index 97ed950..0000000 --- a/proto-extract/package.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "name": "whatsapp-web-protobuf-extractor", - "version": "1.0.0", - "main": "index.js", - "scripts": { - "start": "node index.js" - }, - "dependencies": { - "acorn": "^6.4.1", - "acorn-walk": "^6.1.1", - "request": "^2.88.0", - "request-promise-core": "^1.1.2", - "request-promise-native": "^1.0.7" - } -} diff --git a/proto-extract/yarn.lock b/proto-extract/yarn.lock deleted file mode 100644 index ca6342c..0000000 --- a/proto-extract/yarn.lock +++ /dev/null @@ -1,357 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -acorn-walk@^6.1.1: - version "6.2.0" - resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-6.2.0.tgz#123cb8f3b84c2171f1f7fb252615b1c78a6b1a8c" - integrity sha512-7evsyfH1cLOCdAzZAd43Cic04yKydNx0cF+7tiA19p1XnLLPU4dpCQOqpjqwokFe//vS0QqfqqjCS2JkiIs0cA== - -acorn@^6.4.1: - version "6.4.2" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.4.2.tgz#35866fd710528e92de10cf06016498e47e39e1e6" - integrity sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ== - -ajv@^6.12.3: - version "6.12.6" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" - integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== - dependencies: - fast-deep-equal "^3.1.1" - fast-json-stable-stringify "^2.0.0" - json-schema-traverse "^0.4.1" - uri-js "^4.2.2" - -asn1@~0.2.3: - version "0.2.4" - resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.4.tgz#8d2475dfab553bb33e77b54e59e880bb8ce23136" - integrity sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg== - dependencies: - safer-buffer "~2.1.0" - -assert-plus@1.0.0, assert-plus@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" - integrity sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU= - -asynckit@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" - integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= - -aws-sign2@~0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" - integrity sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg= - -aws4@^1.8.0: - version "1.11.0" - resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.11.0.tgz#d61f46d83b2519250e2784daf5b09479a8b41c59" - integrity sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA== - -bcrypt-pbkdf@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e" - integrity sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4= - dependencies: - tweetnacl "^0.14.3" - -caseless@~0.12.0: - version "0.12.0" - resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" - integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= - -combined-stream@^1.0.6, combined-stream@~1.0.6: - version "1.0.8" - resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" - integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== - dependencies: - delayed-stream "~1.0.0" - -core-util-is@1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" - integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= - -dashdash@^1.12.0: - version "1.14.1" - resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" - integrity sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA= - dependencies: - assert-plus "^1.0.0" - -delayed-stream@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" - integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk= - -ecc-jsbn@~0.1.1: - version "0.1.2" - resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" - integrity sha1-OoOpBOVDUyh4dMVkt1SThoSamMk= - dependencies: - jsbn "~0.1.0" - safer-buffer "^2.1.0" - -extend@~3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" - integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== - -extsprintf@1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" - integrity sha1-lpGEQOMEGnpBT4xS48V06zw+HgU= - -extsprintf@^1.2.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" - integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8= - -fast-deep-equal@^3.1.1: - version "3.1.3" - resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" - integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== - -fast-json-stable-stringify@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" - integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== - -forever-agent@~0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" - integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE= - -form-data@~2.3.2: - version "2.3.3" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" - integrity sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ== - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.6" - mime-types "^2.1.12" - -getpass@^0.1.1: - version "0.1.7" - resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" - integrity sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo= - dependencies: - assert-plus "^1.0.0" - -har-schema@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" - integrity sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI= - -har-validator@~5.1.3: - version "5.1.5" - resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.5.tgz#1f0803b9f8cb20c0fa13822df1ecddb36bde1efd" - integrity sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w== - dependencies: - ajv "^6.12.3" - har-schema "^2.0.0" - -http-signature@~1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" - integrity sha1-muzZJRFHcvPZW2WmCruPfBj7rOE= - dependencies: - assert-plus "^1.0.0" - jsprim "^1.2.2" - sshpk "^1.7.0" - -is-typedarray@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" - integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= - -isstream@~0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" - integrity sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo= - -jsbn@~0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" - integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM= - -json-schema-traverse@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" - integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== - -json-schema@0.2.3: - version "0.2.3" - resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" - integrity sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM= - -json-stringify-safe@~5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" - integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= - -jsprim@^1.2.2: - version "1.4.1" - resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" - integrity sha1-MT5mvB5cwG5Di8G3SZwuXFastqI= - dependencies: - assert-plus "1.0.0" - extsprintf "1.3.0" - json-schema "0.2.3" - verror "1.10.0" - -lodash@^4.17.19: - version "4.17.21" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" - integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== - -mime-db@1.50.0: - version "1.50.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.50.0.tgz#abd4ac94e98d3c0e185016c67ab45d5fde40c11f" - integrity sha512-9tMZCDlYHqeERXEHO9f/hKfNXhre5dK2eE/krIvUjZbS2KPcqGDfNShIWS1uW9XOTKQKqK6qbeOci18rbfW77A== - -mime-types@^2.1.12, mime-types@~2.1.19: - version "2.1.33" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.33.tgz#1fa12a904472fafd068e48d9e8401f74d3f70edb" - integrity sha512-plLElXp7pRDd0bNZHw+nMd52vRYjLwQjygaNg7ddJ2uJtTlmnTCjWuPKxVu6//AdaRuME84SvLW91sIkBqGT0g== - dependencies: - mime-db "1.50.0" - -oauth-sign@~0.9.0: - version "0.9.0" - resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" - integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ== - -performance-now@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" - integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= - -psl@^1.1.28: - version "1.8.0" - resolved "https://registry.yarnpkg.com/psl/-/psl-1.8.0.tgz#9326f8bcfb013adcc005fdff056acce020e51c24" - integrity sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ== - -punycode@^2.1.0, punycode@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" - integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== - -qs@~6.5.2: - version "6.5.2" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" - integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA== - -request-promise-core@1.1.4, request-promise-core@^1.1.2: - version "1.1.4" - resolved "https://registry.yarnpkg.com/request-promise-core/-/request-promise-core-1.1.4.tgz#3eedd4223208d419867b78ce815167d10593a22f" - integrity sha512-TTbAfBBRdWD7aNNOoVOBH4pN/KigV6LyapYNNlAPA8JwbovRti1E88m3sYAwsLi5ryhPKsE9APwnjFTgdUjTpw== - dependencies: - lodash "^4.17.19" - -request-promise-native@^1.0.7: - version "1.0.9" - resolved "https://registry.yarnpkg.com/request-promise-native/-/request-promise-native-1.0.9.tgz#e407120526a5efdc9a39b28a5679bf47b9d9dc28" - integrity sha512-wcW+sIUiWnKgNY0dqCpOZkUbF/I+YPi+f09JZIDa39Ec+q82CpSYniDp+ISgTTbKmnpJWASeJBPZmoxH84wt3g== - dependencies: - request-promise-core "1.1.4" - stealthy-require "^1.1.1" - tough-cookie "^2.3.3" - -request@^2.88.0: - version "2.88.2" - resolved "https://registry.yarnpkg.com/request/-/request-2.88.2.tgz#d73c918731cb5a87da047e207234146f664d12b3" - integrity sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw== - dependencies: - aws-sign2 "~0.7.0" - aws4 "^1.8.0" - caseless "~0.12.0" - combined-stream "~1.0.6" - extend "~3.0.2" - forever-agent "~0.6.1" - form-data "~2.3.2" - har-validator "~5.1.3" - http-signature "~1.2.0" - is-typedarray "~1.0.0" - isstream "~0.1.2" - json-stringify-safe "~5.0.1" - mime-types "~2.1.19" - oauth-sign "~0.9.0" - performance-now "^2.1.0" - qs "~6.5.2" - safe-buffer "^5.1.2" - tough-cookie "~2.5.0" - tunnel-agent "^0.6.0" - uuid "^3.3.2" - -safe-buffer@^5.0.1, safe-buffer@^5.1.2: - version "5.2.1" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" - integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== - -safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: - version "2.1.2" - resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" - integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== - -sshpk@^1.7.0: - version "1.16.1" - resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.16.1.tgz#fb661c0bef29b39db40769ee39fa70093d6f6877" - integrity sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg== - dependencies: - asn1 "~0.2.3" - assert-plus "^1.0.0" - bcrypt-pbkdf "^1.0.0" - dashdash "^1.12.0" - ecc-jsbn "~0.1.1" - getpass "^0.1.1" - jsbn "~0.1.0" - safer-buffer "^2.0.2" - tweetnacl "~0.14.0" - -stealthy-require@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/stealthy-require/-/stealthy-require-1.1.1.tgz#35b09875b4ff49f26a777e509b3090a3226bf24b" - integrity sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks= - -tough-cookie@^2.3.3, tough-cookie@~2.5.0: - version "2.5.0" - resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2" - integrity sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g== - dependencies: - psl "^1.1.28" - punycode "^2.1.1" - -tunnel-agent@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" - integrity sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0= - dependencies: - safe-buffer "^5.0.1" - -tweetnacl@^0.14.3, tweetnacl@~0.14.0: - version "0.14.5" - resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" - integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q= - -uri-js@^4.2.2: - version "4.4.1" - resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" - integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== - dependencies: - punycode "^2.1.0" - -uuid@^3.3.2: - version "3.4.0" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" - integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== - -verror@1.10.0: - version "1.10.0" - resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" - integrity sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA= - dependencies: - assert-plus "^1.0.0" - core-util-is "1.0.2" - extsprintf "^1.2.0" diff --git a/src/Defaults/baileys-version.json b/src/Defaults/baileys-version.json index 0a90cdd..60dfb24 100644 --- a/src/Defaults/baileys-version.json +++ b/src/Defaults/baileys-version.json @@ -1,3 +1,3 @@ { - "version": [2, 3000, 1019707846] + "version": [2, 3000, 1020608496] } diff --git a/src/Socket/messages-recv.ts b/src/Socket/messages-recv.ts index 3b8dd64..2bff23e 100644 --- a/src/Socket/messages-recv.ts +++ b/src/Socket/messages-recv.ts @@ -2,6 +2,7 @@ import NodeCache from '@cacheable/node-cache' import { Boom } from '@hapi/boom' import { randomBytes } from 'crypto' +import Long = require('long'); import { proto } from '../../WAProto' import { DEFAULT_CACHE_TTLS, KEY_BUNDLE_TYPE, MIN_PREKEY_COUNT } from '../Defaults' import { MessageReceiptType, MessageRelayOptions, MessageUserReceipt, SocketConfig, WACallEvent, WAMessageKey, WAMessageStatus, WAMessageStubType, WAPatchName } from '../Types' @@ -846,7 +847,7 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => { throw new Boom('Not authenticated') } - const pdoMessage = { + const pdoMessage: proto.Message.IPeerDataOperationRequestMessage = { historySyncOnDemandRequest: { chatJid: oldestMsgKey.remoteJid, oldestMsgFromMe: oldestMsgKey.fromMe, diff --git a/src/Socket/messages-send.ts b/src/Socket/messages-send.ts index a5f55a9..2677542 100644 --- a/src/Socket/messages-send.ts +++ b/src/Socket/messages-send.ts @@ -669,15 +669,15 @@ export const makeMessagesSocket = (config: SocketConfig) => { try { const media = await decryptMediaRetryData(result.media!, mediaKey, result.key.id!) if(media.result !== proto.MediaRetryNotification.ResultType.SUCCESS) { - const resultStr = proto.MediaRetryNotification.ResultType[media.result] + const resultStr = proto.MediaRetryNotification.ResultType[media.result!] throw new Boom( `Media re-upload failed by device (${resultStr})`, - { data: media, statusCode: getStatusCodeForMediaRetry(media.result) || 404 } + { data: media, statusCode: getStatusCodeForMediaRetry(media.result!) || 404 } ) } content.directPath = media.directPath - content.url = getUrlFromDirectPath(content.directPath) + content.url = getUrlFromDirectPath(content.directPath!) logger.debug({ directPath: media.directPath, key: result.key }, 'media update successful') } catch(err) { diff --git a/src/Utils/auth-utils.ts b/src/Utils/auth-utils.ts index 4d74947..8fcc00b 100644 --- a/src/Utils/auth-utils.ts +++ b/src/Utils/auth-utils.ts @@ -1,6 +1,5 @@ import NodeCache from '@cacheable/node-cache' import { randomBytes } from 'crypto' -import type { Logger } from 'pino' import { DEFAULT_CACHE_TTLS } from '../Defaults' import type { AuthenticationCreds, CacheStore, SignalDataSet, SignalDataTypeMap, SignalKeyStore, SignalKeyStoreWithTransaction, TransactionCapabilityOptions } from '../Types' import { Curve, signedKeyPair } from './crypto' diff --git a/src/Utils/chat-utils.ts b/src/Utils/chat-utils.ts index dcf248f..945439e 100644 --- a/src/Utils/chat-utils.ts +++ b/src/Utils/chat-utils.ts @@ -217,13 +217,13 @@ export const decodeSyncdMutations = async( const syncAction = proto.SyncActionData.decode(result) if(validateMacs) { - const hmac = hmacSign(syncAction.index, key.indexKey) + const hmac = hmacSign(syncAction.index!, key.indexKey) if(Buffer.compare(hmac, record.index!.blob!) !== 0) { throw new Boom('HMAC index verification failed') } } - const indexStr = Buffer.from(syncAction.index).toString() + const indexStr = Buffer.from(syncAction.index!).toString() onMutation({ syncAction, index: JSON.parse(indexStr) }) ltGenerator.mix({ diff --git a/src/Utils/decode-wa-message.ts b/src/Utils/decode-wa-message.ts index 25e6f17..d3458c5 100644 --- a/src/Utils/decode-wa-message.ts +++ b/src/Utils/decode-wa-message.ts @@ -149,7 +149,7 @@ export const decryptMessageNode = ( for(const { tag, attrs, content } of stanza.content) { if(tag === 'verified_name' && content instanceof Uint8Array) { const cert = proto.VerifiedNameCertificate.decode(content) - const details = proto.VerifiedNameCertificate.Details.decode(cert.details) + const details = proto.VerifiedNameCertificate.Details.decode(cert.details!) fullMessage.verifiedBizName = details.verifiedName } diff --git a/src/Utils/messages.ts b/src/Utils/messages.ts index 61c2d23..2a5b648 100644 --- a/src/Utils/messages.ts +++ b/src/Utils/messages.ts @@ -332,7 +332,6 @@ export const generateWAMessageContent = async( } if(urlInfo) { - extContent.canonicalUrl = urlInfo['canonical-url'] extContent.matchedText = urlInfo['matched-text'] extContent.jpegThumbnail = urlInfo.jpegThumbnail extContent.description = urlInfo.description diff --git a/src/Utils/validate-connection.ts b/src/Utils/validate-connection.ts index a80791f..9dd25aa 100644 --- a/src/Utils/validate-connection.ts +++ b/src/Utils/validate-connection.ts @@ -131,27 +131,27 @@ export const configureSuccessfulPairing = ( const { details, hmac } = proto.ADVSignedDeviceIdentityHMAC.decode(deviceIdentityNode.content as Buffer) // check HMAC matches - const advSign = hmacSign(details, Buffer.from(advSecretKey, 'base64')) - if(Buffer.compare(hmac, advSign) !== 0) { + const advSign = hmacSign(details!, Buffer.from(advSecretKey, 'base64')) + if(Buffer.compare(hmac!, advSign) !== 0) { throw new Boom('Invalid account signature') } - const account = proto.ADVSignedDeviceIdentity.decode(details) + const account = proto.ADVSignedDeviceIdentity.decode(details!) const { accountSignatureKey, accountSignature, details: deviceDetails } = account // verify the device signature matches - const accountMsg = Buffer.concat([ Buffer.from([6, 0]), deviceDetails, signedIdentityKey.public ]) - if(!Curve.verify(accountSignatureKey, accountMsg, accountSignature)) { + const accountMsg = Buffer.concat([ Buffer.from([6, 0]), deviceDetails!, signedIdentityKey.public ]) + if(!Curve.verify(accountSignatureKey!, accountMsg, accountSignature!)) { throw new Boom('Failed to verify account signature') } // sign the details with our identity key - const deviceMsg = Buffer.concat([ Buffer.from([6, 1]), deviceDetails, signedIdentityKey.public, accountSignatureKey ]) + const deviceMsg = Buffer.concat([ Buffer.from([6, 1]), deviceDetails!, signedIdentityKey.public, accountSignatureKey! ]) account.deviceSignature = Curve.sign(signedIdentityKey.private, deviceMsg) - const identity = createSignalIdentity(jid, accountSignatureKey) + const identity = createSignalIdentity(jid, accountSignatureKey!) const accountEnc = encodeSignedDeviceIdentity(account, false) - const deviceIdentity = proto.ADVDeviceIdentity.decode(account.details) + const deviceIdentity = proto.ADVDeviceIdentity.decode(account.details!) const reply: BinaryNode = { tag: 'iq', @@ -167,7 +167,7 @@ export const configureSuccessfulPairing = ( content: [ { tag: 'device-identity', - attrs: { 'key-index': deviceIdentity.keyIndex.toString() }, + attrs: { 'key-index': deviceIdentity.keyIndex!.toString() }, content: accountEnc } ]