diff --git a/WAProto/WAProto.proto b/WAProto/WAProto.proto index 78adab75..8707d5a7 100644 --- a/WAProto/WAProto.proto +++ b/WAProto/WAProto.proto @@ -1,4 +1,4 @@ -syntax = "proto2"; +syntax = "proto3"; package proto; /// WhatsApp Version: 2.3000.1033381705 @@ -1065,10 +1065,10 @@ message ChatRowOpaqueData { } message Citation { - required string title = 1; - required string subtitle = 2; - required string cmsId = 3; - required string imageUrl = 4; + optional string title = 1; + optional string subtitle = 2; + optional string cmsId = 3; + optional string imageUrl = 4; } message ClientPairingProps { @@ -1553,7 +1553,7 @@ message ContextInfo { } message Conversation { - required string id = 1; + optional string id = 1; repeated HistorySyncMsg messages = 2; optional string newJid = 3; optional string oldJid = 4; @@ -1882,7 +1882,7 @@ message GroupMention { } message GroupParticipant { - required string userJid = 1; + optional string userJid = 1; optional Rank rank = 2; optional MemberLabel memberLabel = 3; enum Rank { @@ -1920,7 +1920,7 @@ message HandshakeMessage { } message HistorySync { - required HistorySyncType syncType = 1; + optional HistorySyncType syncType = 1; repeated Conversation conversations = 2; repeated WebMessageInfo statusV3Messages = 3; optional uint32 chunkOrder = 5; @@ -2080,8 +2080,8 @@ message KeyId { } message LIDMigrationMapping { - required uint64 pn = 1; - required uint64 assignedLid = 2; + optional uint64 pn = 1; + optional uint64 assignedLid = 2; optional uint64 latestLid = 3; } @@ -3724,10 +3724,10 @@ message Message { } message VideoEndCard { - required string username = 1; - required string caption = 2; - required string thumbnailImageUrl = 3; - required string profilePictureUrl = 4; + optional string username = 1; + optional string caption = 2; + optional string thumbnailImageUrl = 3; + optional string profilePictureUrl = 4; } message VideoMessage { @@ -4557,7 +4557,7 @@ message StatusMentionMessage { } message StatusPSA { - required uint64 campaignId = 44; + optional uint64 campaignId = 44; optional uint64 campaignExpirationTimestamp = 45; } @@ -4689,7 +4689,7 @@ message SyncActionValue { } message BroadcastListParticipant { - required string lidJid = 1; + optional string lidJid = 1; optional string pnJid = 2; } @@ -4734,15 +4734,15 @@ message SyncActionValue { } message CustomPaymentMethod { - required string credentialId = 1; - required string country = 2; - required string type = 3; + optional string credentialId = 1; + optional string country = 2; + optional string type = 3; repeated SyncActionValue.CustomPaymentMethodMetadata metadata = 4; } message CustomPaymentMethodMetadata { - required string key = 1; - required string value = 2; + optional string key = 1; + optional string value = 2; } message CustomPaymentMethodsAction { @@ -4780,7 +4780,7 @@ message SyncActionValue { } message InteractiveMessageAction { - required InteractiveMessageActionMode type = 1; + optional InteractiveMessageActionMode type = 1; enum InteractiveMessageActionMode { DISABLE_CTA = 1; } @@ -4868,8 +4868,8 @@ message SyncActionValue { } message MerchantPaymentPartnerAction { - required Status status = 1; - required string country = 2; + optional Status status = 1; + optional string country = 2; optional string gatewayName = 3; optional string credentialId = 4; enum Status { @@ -4925,8 +4925,8 @@ message SyncActionValue { } message PaymentTosAction { - required PaymentNotice paymentNotice = 1; - required bool accepted = 2; + optional PaymentNotice paymentNotice = 1; + optional bool accepted = 2; enum PaymentNotice { BR_PAY_PRIVACY_POLICY = 0; } @@ -5295,7 +5295,7 @@ message UserPassword { } message UserReceipt { - required string userJid = 1; + optional string userJid = 1; optional int64 receiptTimestamp = 2; optional int64 readTimestamp = 3; optional int64 playedTimestamp = 4; @@ -5381,7 +5381,7 @@ enum WebLinkRenderConfig { SYSTEM = 1; } message WebMessageInfo { - required MessageKey key = 1; + optional MessageKey key = 1; optional Message message = 2; optional uint64 messageTimestamp = 3; optional Status status = 4; diff --git a/WAProto/index.d.ts b/WAProto/index.d.ts index 991278dd..c5b8af06 100644 --- a/WAProto/index.d.ts +++ b/WAProto/index.d.ts @@ -12,11 +12,11 @@ export namespace proto { class ADVDeviceIdentity implements IADVDeviceIdentity { constructor(p?: proto.IADVDeviceIdentity); - public rawId: number; - public timestamp: (number|Long); - public keyIndex: number; - public accountType: proto.ADVEncryptionType; - public deviceType: proto.ADVEncryptionType; + public rawId?: (number|null); + public timestamp?: (number|Long|null); + public keyIndex?: (number|null); + public accountType?: (proto.ADVEncryptionType|null); + public deviceType?: (proto.ADVEncryptionType|null); public static create(properties?: proto.IADVDeviceIdentity): proto.ADVDeviceIdentity; public static encode(m: proto.IADVDeviceIdentity, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.ADVDeviceIdentity; @@ -41,11 +41,11 @@ export namespace proto { class ADVKeyIndexList implements IADVKeyIndexList { constructor(p?: proto.IADVKeyIndexList); - public rawId: number; - public timestamp: (number|Long); - public currentIndex: number; + public rawId?: (number|null); + public timestamp?: (number|Long|null); + public currentIndex?: (number|null); public validIndexes: number[]; - public accountType: proto.ADVEncryptionType; + public accountType?: (proto.ADVEncryptionType|null); public static create(properties?: proto.IADVKeyIndexList): proto.ADVKeyIndexList; public static encode(m: proto.IADVKeyIndexList, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.ADVKeyIndexList; @@ -64,10 +64,10 @@ export namespace proto { class ADVSignedDeviceIdentity implements IADVSignedDeviceIdentity { constructor(p?: proto.IADVSignedDeviceIdentity); - public details: Uint8Array; - public accountSignatureKey: Uint8Array; - public accountSignature: Uint8Array; - public deviceSignature: Uint8Array; + public details?: (Uint8Array|null); + public accountSignatureKey?: (Uint8Array|null); + public accountSignature?: (Uint8Array|null); + public deviceSignature?: (Uint8Array|null); public static create(properties?: proto.IADVSignedDeviceIdentity): proto.ADVSignedDeviceIdentity; public static encode(m: proto.IADVSignedDeviceIdentity, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.ADVSignedDeviceIdentity; @@ -85,9 +85,9 @@ export namespace proto { class ADVSignedDeviceIdentityHMAC implements IADVSignedDeviceIdentityHMAC { constructor(p?: proto.IADVSignedDeviceIdentityHMAC); - public details: Uint8Array; - public hmac: Uint8Array; - public accountType: proto.ADVEncryptionType; + public details?: (Uint8Array|null); + public hmac?: (Uint8Array|null); + public accountType?: (proto.ADVEncryptionType|null); public static create(properties?: proto.IADVSignedDeviceIdentityHMAC): proto.ADVSignedDeviceIdentityHMAC; public static encode(m: proto.IADVSignedDeviceIdentityHMAC, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.ADVSignedDeviceIdentityHMAC; @@ -105,9 +105,9 @@ export namespace proto { class ADVSignedKeyIndexList implements IADVSignedKeyIndexList { constructor(p?: proto.IADVSignedKeyIndexList); - public details: Uint8Array; - public accountSignature: Uint8Array; - public accountSignatureKey: Uint8Array; + public details?: (Uint8Array|null); + public accountSignature?: (Uint8Array|null); + public accountSignatureKey?: (Uint8Array|null); public static create(properties?: proto.IADVSignedKeyIndexList): proto.ADVSignedKeyIndexList; public static encode(m: proto.IADVSignedKeyIndexList, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.ADVSignedKeyIndexList; @@ -125,7 +125,7 @@ export namespace proto { class AIHomeState implements IAIHomeState { constructor(p?: proto.IAIHomeState); - public lastFetchTime: (number|Long); + public lastFetchTime?: (number|Long|null); public capabilityOptions: proto.AIHomeState.IAIHomeOption[]; public conversationOptions: proto.AIHomeState.IAIHomeOption[]; public static create(properties?: proto.IAIHomeState): proto.AIHomeState; @@ -152,14 +152,14 @@ export namespace proto { class AIHomeOption implements IAIHomeOption { constructor(p?: proto.AIHomeState.IAIHomeOption); - public type: proto.AIHomeState.AIHomeOption.AIHomeActionType; - public title: string; - public promptText: string; - public sessionId: string; - public imageWdsIdentifier: string; - public imageTintColor: string; - public imageBackgroundColor: string; - public cardTypeId: string; + public type?: (proto.AIHomeState.AIHomeOption.AIHomeActionType|null); + public title?: (string|null); + public promptText?: (string|null); + public sessionId?: (string|null); + public imageWdsIdentifier?: (string|null); + public imageTintColor?: (string|null); + public imageBackgroundColor?: (string|null); + public cardTypeId?: (string|null); public static create(properties?: proto.AIHomeState.IAIHomeOption): proto.AIHomeState.AIHomeOption; public static encode(m: proto.AIHomeState.IAIHomeOption, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.AIHomeState.AIHomeOption; @@ -189,9 +189,9 @@ export namespace proto { class AIMediaCollectionMessage implements IAIMediaCollectionMessage { constructor(p?: proto.IAIMediaCollectionMessage); - public collectionId: string; - public expectedMediaCount: number; - public hasGlobalCaption: boolean; + public collectionId?: (string|null); + public expectedMediaCount?: (number|null); + public hasGlobalCaption?: (boolean|null); public static create(properties?: proto.IAIMediaCollectionMessage): proto.AIMediaCollectionMessage; public static encode(m: proto.IAIMediaCollectionMessage, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.AIMediaCollectionMessage; @@ -207,7 +207,7 @@ export namespace proto { class AIMediaCollectionMetadata implements IAIMediaCollectionMetadata { constructor(p?: proto.IAIMediaCollectionMetadata); - public collectionId: string; + public collectionId?: (string|null); public static create(properties?: proto.IAIMediaCollectionMetadata): proto.AIMediaCollectionMetadata; public static encode(m: proto.IAIMediaCollectionMetadata, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.AIMediaCollectionMetadata; @@ -227,7 +227,7 @@ export namespace proto { constructor(p?: proto.IAIQueryFanout); public messageKey?: (proto.IMessageKey|null); public message?: (proto.IMessage|null); - public timestamp: (number|Long); + public timestamp?: (number|Long|null); public static create(properties?: proto.IAIQueryFanout): proto.AIQueryFanout; public static encode(m: proto.IAIQueryFanout, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.AIQueryFanout; @@ -245,7 +245,7 @@ export namespace proto { class AIRegenerateMetadata implements IAIRegenerateMetadata { constructor(p?: proto.IAIRegenerateMetadata); public messageKey?: (proto.IMessageKey|null); - public responseTimestampMs: (number|Long); + public responseTimestampMs?: (number|Long|null); public static create(properties?: proto.IAIRegenerateMetadata): proto.AIRegenerateMetadata; public static encode(m: proto.IAIRegenerateMetadata, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.AIRegenerateMetadata; @@ -262,7 +262,7 @@ export namespace proto { class AIRichResponseCodeMetadata implements IAIRichResponseCodeMetadata { constructor(p?: proto.IAIRichResponseCodeMetadata); - public codeLanguage: string; + public codeLanguage?: (string|null); public codeBlocks: proto.AIRichResponseCodeMetadata.IAIRichResponseCodeBlock[]; public static create(properties?: proto.IAIRichResponseCodeMetadata): proto.AIRichResponseCodeMetadata; public static encode(m: proto.IAIRichResponseCodeMetadata, w?: $protobuf.Writer): $protobuf.Writer; @@ -282,8 +282,8 @@ export namespace proto { class AIRichResponseCodeBlock implements IAIRichResponseCodeBlock { constructor(p?: proto.AIRichResponseCodeMetadata.IAIRichResponseCodeBlock); - public highlightType: proto.AIRichResponseCodeMetadata.AIRichResponseCodeHighlightType; - public codeContent: string; + public highlightType?: (proto.AIRichResponseCodeMetadata.AIRichResponseCodeHighlightType|null); + public codeContent?: (string|null); public static create(properties?: proto.AIRichResponseCodeMetadata.IAIRichResponseCodeBlock): proto.AIRichResponseCodeMetadata.AIRichResponseCodeBlock; public static encode(m: proto.AIRichResponseCodeMetadata.IAIRichResponseCodeBlock, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.AIRichResponseCodeMetadata.AIRichResponseCodeBlock; @@ -311,7 +311,7 @@ export namespace proto { class AIRichResponseContentItemsMetadata implements IAIRichResponseContentItemsMetadata { constructor(p?: proto.IAIRichResponseContentItemsMetadata); public itemsMetadata: proto.AIRichResponseContentItemsMetadata.IAIRichResponseContentItemMetadata[]; - public contentType: proto.AIRichResponseContentItemsMetadata.ContentType; + public contentType?: (proto.AIRichResponseContentItemsMetadata.ContentType|null); public static create(properties?: proto.IAIRichResponseContentItemsMetadata): proto.AIRichResponseContentItemsMetadata; public static encode(m: proto.IAIRichResponseContentItemsMetadata, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.AIRichResponseContentItemsMetadata; @@ -349,10 +349,10 @@ export namespace proto { class AIRichResponseReelItem implements IAIRichResponseReelItem { constructor(p?: proto.AIRichResponseContentItemsMetadata.IAIRichResponseReelItem); - public title: string; - public profileIconUrl: string; - public thumbnailUrl: string; - public videoUrl: string; + public title?: (string|null); + public profileIconUrl?: (string|null); + public thumbnailUrl?: (string|null); + public videoUrl?: (string|null); public static create(properties?: proto.AIRichResponseContentItemsMetadata.IAIRichResponseReelItem): proto.AIRichResponseContentItemsMetadata.AIRichResponseReelItem; public static encode(m: proto.AIRichResponseContentItemsMetadata.IAIRichResponseReelItem, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.AIRichResponseContentItemsMetadata.AIRichResponseReelItem; @@ -377,10 +377,10 @@ export namespace proto { class AIRichResponseDynamicMetadata implements IAIRichResponseDynamicMetadata { constructor(p?: proto.IAIRichResponseDynamicMetadata); - public type: proto.AIRichResponseDynamicMetadata.AIRichResponseDynamicMetadataType; - public version: (number|Long); - public url: string; - public loopCount: number; + public type?: (proto.AIRichResponseDynamicMetadata.AIRichResponseDynamicMetadataType|null); + public version?: (number|Long|null); + public url?: (string|null); + public loopCount?: (number|null); public static create(properties?: proto.IAIRichResponseDynamicMetadata): proto.AIRichResponseDynamicMetadata; public static encode(m: proto.IAIRichResponseDynamicMetadata, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.AIRichResponseDynamicMetadata; @@ -425,9 +425,9 @@ export namespace proto { class AIRichResponseImageURL implements IAIRichResponseImageURL { constructor(p?: proto.IAIRichResponseImageURL); - public imagePreviewUrl: string; - public imageHighResUrl: string; - public sourceUrl: string; + public imagePreviewUrl?: (string|null); + public imageHighResUrl?: (string|null); + public sourceUrl?: (string|null); public static create(properties?: proto.IAIRichResponseImageURL): proto.AIRichResponseImageURL; public static encode(m: proto.IAIRichResponseImageURL, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.AIRichResponseImageURL; @@ -447,9 +447,9 @@ export namespace proto { class AIRichResponseInlineImageMetadata implements IAIRichResponseInlineImageMetadata { constructor(p?: proto.IAIRichResponseInlineImageMetadata); public imageUrl?: (proto.IAIRichResponseImageURL|null); - public imageText: string; - public alignment: proto.AIRichResponseInlineImageMetadata.AIRichResponseImageAlignment; - public tapLinkUrl: string; + public imageText?: (string|null); + public alignment?: (proto.AIRichResponseInlineImageMetadata.AIRichResponseImageAlignment|null); + public tapLinkUrl?: (string|null); public static create(properties?: proto.IAIRichResponseInlineImageMetadata): proto.AIRichResponseInlineImageMetadata; public static encode(m: proto.IAIRichResponseInlineImageMetadata, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.AIRichResponseInlineImageMetadata; @@ -475,7 +475,7 @@ export namespace proto { class AIRichResponseLatexMetadata implements IAIRichResponseLatexMetadata { constructor(p?: proto.IAIRichResponseLatexMetadata); - public text: string; + public text?: (string|null); public expressions: proto.AIRichResponseLatexMetadata.IAIRichResponseLatexExpression[]; public static create(properties?: proto.IAIRichResponseLatexMetadata): proto.AIRichResponseLatexMetadata; public static encode(m: proto.IAIRichResponseLatexMetadata, w?: $protobuf.Writer): $protobuf.Writer; @@ -502,15 +502,15 @@ export namespace proto { class AIRichResponseLatexExpression implements IAIRichResponseLatexExpression { constructor(p?: proto.AIRichResponseLatexMetadata.IAIRichResponseLatexExpression); - public latexExpression: string; - public url: string; - public width: number; - public height: number; - public fontHeight: number; - public imageTopPadding: number; - public imageLeadingPadding: number; - public imageBottomPadding: number; - public imageTrailingPadding: number; + public latexExpression?: (string|null); + public url?: (string|null); + public width?: (number|null); + public height?: (number|null); + public fontHeight?: (number|null); + public imageTopPadding?: (number|null); + public imageLeadingPadding?: (number|null); + public imageBottomPadding?: (number|null); + public imageTrailingPadding?: (number|null); public static create(properties?: proto.AIRichResponseLatexMetadata.IAIRichResponseLatexExpression): proto.AIRichResponseLatexMetadata.AIRichResponseLatexExpression; public static encode(m: proto.AIRichResponseLatexMetadata.IAIRichResponseLatexExpression, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.AIRichResponseLatexMetadata.AIRichResponseLatexExpression; @@ -532,12 +532,12 @@ export namespace proto { class AIRichResponseMapMetadata implements IAIRichResponseMapMetadata { constructor(p?: proto.IAIRichResponseMapMetadata); - public centerLatitude: number; - public centerLongitude: number; - public latitudeDelta: number; - public longitudeDelta: number; + public centerLatitude?: (number|null); + public centerLongitude?: (number|null); + public latitudeDelta?: (number|null); + public longitudeDelta?: (number|null); public annotations: proto.AIRichResponseMapMetadata.IAIRichResponseMapAnnotation[]; - public showInfoList: boolean; + public showInfoList?: (boolean|null); public static create(properties?: proto.IAIRichResponseMapMetadata): proto.AIRichResponseMapMetadata; public static encode(m: proto.IAIRichResponseMapMetadata, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.AIRichResponseMapMetadata; @@ -559,11 +559,11 @@ export namespace proto { class AIRichResponseMapAnnotation implements IAIRichResponseMapAnnotation { constructor(p?: proto.AIRichResponseMapMetadata.IAIRichResponseMapAnnotation); - public annotationNumber: number; - public latitude: number; - public longitude: number; - public title: string; - public body: string; + public annotationNumber?: (number|null); + public latitude?: (number|null); + public longitude?: (number|null); + public title?: (string|null); + public body?: (string|null); public static create(properties?: proto.AIRichResponseMapMetadata.IAIRichResponseMapAnnotation): proto.AIRichResponseMapMetadata.AIRichResponseMapAnnotation; public static encode(m: proto.AIRichResponseMapMetadata.IAIRichResponseMapAnnotation, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.AIRichResponseMapMetadata.AIRichResponseMapAnnotation; @@ -583,7 +583,7 @@ export namespace proto { class AIRichResponseMessage implements IAIRichResponseMessage { constructor(p?: proto.IAIRichResponseMessage); - public messageType: proto.AIRichResponseMessageType; + public messageType?: (proto.AIRichResponseMessageType|null); public submessages: proto.IAIRichResponseSubMessage[]; public unifiedResponse?: (proto.IAIRichResponseUnifiedResponse|null); public contextInfo?: (proto.IContextInfo|null); @@ -616,9 +616,9 @@ export namespace proto { class AIRichResponseSubMessage implements IAIRichResponseSubMessage { constructor(p?: proto.IAIRichResponseSubMessage); - public messageType: proto.AIRichResponseSubMessageType; + public messageType?: (proto.AIRichResponseSubMessageType|null); public gridImageMetadata?: (proto.IAIRichResponseGridImageMetadata|null); - public messageText: string; + public messageText?: (string|null); public imageMetadata?: (proto.IAIRichResponseInlineImageMetadata|null); public codeMetadata?: (proto.IAIRichResponseCodeMetadata|null); public tableMetadata?: (proto.IAIRichResponseTableMetadata|null); @@ -656,7 +656,7 @@ export namespace proto { class AIRichResponseTableMetadata implements IAIRichResponseTableMetadata { constructor(p?: proto.IAIRichResponseTableMetadata); public rows: proto.AIRichResponseTableMetadata.IAIRichResponseTableRow[]; - public title: string; + public title?: (string|null); public static create(properties?: proto.IAIRichResponseTableMetadata): proto.AIRichResponseTableMetadata; public static encode(m: proto.IAIRichResponseTableMetadata, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.AIRichResponseTableMetadata; @@ -676,7 +676,7 @@ export namespace proto { class AIRichResponseTableRow implements IAIRichResponseTableRow { constructor(p?: proto.AIRichResponseTableMetadata.IAIRichResponseTableRow); public items: string[]; - public isHeading: boolean; + public isHeading?: (boolean|null); public static create(properties?: proto.AIRichResponseTableMetadata.IAIRichResponseTableRow): proto.AIRichResponseTableMetadata.AIRichResponseTableRow; public static encode(m: proto.AIRichResponseTableMetadata.IAIRichResponseTableRow, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.AIRichResponseTableMetadata.AIRichResponseTableRow; @@ -693,7 +693,7 @@ export namespace proto { class AIRichResponseUnifiedResponse implements IAIRichResponseUnifiedResponse { constructor(p?: proto.IAIRichResponseUnifiedResponse); - public data: Uint8Array; + public data?: (Uint8Array|null); public static create(properties?: proto.IAIRichResponseUnifiedResponse): proto.AIRichResponseUnifiedResponse; public static encode(m: proto.IAIRichResponseUnifiedResponse, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.AIRichResponseUnifiedResponse; @@ -729,7 +729,7 @@ export namespace proto { class AIThreadClientInfo implements IAIThreadClientInfo { constructor(p?: proto.AIThreadInfo.IAIThreadClientInfo); - public type: proto.AIThreadInfo.AIThreadClientInfo.AIThreadType; + public type?: (proto.AIThreadInfo.AIThreadClientInfo.AIThreadType|null); public static create(properties?: proto.AIThreadInfo.IAIThreadClientInfo): proto.AIThreadInfo.AIThreadClientInfo; public static encode(m: proto.AIThreadInfo.IAIThreadClientInfo, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.AIThreadInfo.AIThreadClientInfo; @@ -754,7 +754,7 @@ export namespace proto { class AIThreadServerInfo implements IAIThreadServerInfo { constructor(p?: proto.AIThreadInfo.IAIThreadServerInfo); - public title: string; + public title?: (string|null); public static create(properties?: proto.AIThreadInfo.IAIThreadServerInfo): proto.AIThreadInfo.AIThreadServerInfo; public static encode(m: proto.AIThreadInfo.IAIThreadServerInfo, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.AIThreadInfo.AIThreadServerInfo; @@ -774,10 +774,10 @@ export namespace proto { class Account implements IAccount { constructor(p?: proto.IAccount); - public lid: string; - public username: string; - public countryCode: string; - public isUsernameDeleted: boolean; + public lid?: (string|null); + public username?: (string|null); + public countryCode?: (string|null); + public isUsernameDeleted?: (boolean|null); public static create(properties?: proto.IAccount): proto.Account; public static encode(m: proto.IAccount, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Account; @@ -794,8 +794,8 @@ export namespace proto { class ActionLink implements IActionLink { constructor(p?: proto.IActionLink); - public url: string; - public buttonTitle: string; + public url?: (string|null); + public buttonTitle?: (string|null); public static create(properties?: proto.IActionLink): proto.ActionLink; public static encode(m: proto.IActionLink, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.ActionLink; @@ -814,10 +814,10 @@ export namespace proto { class AutoDownloadSettings implements IAutoDownloadSettings { constructor(p?: proto.IAutoDownloadSettings); - public downloadImages: boolean; - public downloadAudio: boolean; - public downloadVideo: boolean; - public downloadDocuments: boolean; + public downloadImages?: (boolean|null); + public downloadAudio?: (boolean|null); + public downloadVideo?: (boolean|null); + public downloadDocuments?: (boolean|null); public static create(properties?: proto.IAutoDownloadSettings): proto.AutoDownloadSettings; public static encode(m: proto.IAutoDownloadSettings, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.AutoDownloadSettings; @@ -834,8 +834,8 @@ export namespace proto { class AvatarUserSettings implements IAvatarUserSettings { constructor(p?: proto.IAvatarUserSettings); - public fbid: string; - public password: string; + public fbid?: (string|null); + public password?: (string|null); public static create(properties?: proto.IAvatarUserSettings): proto.AvatarUserSettings; public static encode(m: proto.IAvatarUserSettings, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.AvatarUserSettings; @@ -855,11 +855,11 @@ export namespace proto { class BizAccountLinkInfo implements IBizAccountLinkInfo { constructor(p?: proto.IBizAccountLinkInfo); - public whatsappBizAcctFbid: (number|Long); - public whatsappAcctNumber: string; - public issueTime: (number|Long); - public hostStorage: proto.BizAccountLinkInfo.HostStorageType; - public accountType: proto.BizAccountLinkInfo.AccountType; + public whatsappBizAcctFbid?: (number|Long|null); + public whatsappAcctNumber?: (string|null); + public issueTime?: (number|Long|null); + public hostStorage?: (proto.BizAccountLinkInfo.HostStorageType|null); + public accountType?: (proto.BizAccountLinkInfo.AccountType|null); public static create(properties?: proto.IBizAccountLinkInfo): proto.BizAccountLinkInfo; public static encode(m: proto.IBizAccountLinkInfo, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.BizAccountLinkInfo; @@ -889,7 +889,7 @@ export namespace proto { class BizAccountPayload implements IBizAccountPayload { constructor(p?: proto.IBizAccountPayload); public vnameCert?: (proto.IVerifiedNameCertificate|null); - public bizAcctLinkInfo: Uint8Array; + public bizAcctLinkInfo?: (Uint8Array|null); public static create(properties?: proto.IBizAccountPayload): proto.BizAccountPayload; public static encode(m: proto.IBizAccountPayload, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.BizAccountPayload; @@ -912,14 +912,14 @@ export namespace proto { class BizIdentityInfo implements IBizIdentityInfo { constructor(p?: proto.IBizIdentityInfo); - public vlevel: proto.BizIdentityInfo.VerifiedLevelValue; + public vlevel?: (proto.BizIdentityInfo.VerifiedLevelValue|null); public vnameCert?: (proto.IVerifiedNameCertificate|null); - public signed: boolean; - public revoked: boolean; - public hostStorage: proto.BizIdentityInfo.HostStorageType; - public actualActors: proto.BizIdentityInfo.ActualActorsType; - public privacyModeTs: (number|Long); - public featureControls: (number|Long); + public signed?: (boolean|null); + public revoked?: (boolean|null); + public hostStorage?: (proto.BizIdentityInfo.HostStorageType|null); + public actualActors?: (proto.BizIdentityInfo.ActualActorsType|null); + public privacyModeTs?: (number|Long|null); + public featureControls?: (number|Long|null); public static create(properties?: proto.IBizIdentityInfo): proto.BizIdentityInfo; public static encode(m: proto.IBizIdentityInfo, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.BizIdentityInfo; @@ -956,9 +956,9 @@ export namespace proto { class BotAgeCollectionMetadata implements IBotAgeCollectionMetadata { constructor(p?: proto.IBotAgeCollectionMetadata); - public ageCollectionEligible: boolean; - public shouldTriggerAgeCollectionOnClient: boolean; - public ageCollectionType: proto.BotAgeCollectionMetadata.AgeCollectionType; + public ageCollectionEligible?: (boolean|null); + public shouldTriggerAgeCollectionOnClient?: (boolean|null); + public ageCollectionType?: (proto.BotAgeCollectionMetadata.AgeCollectionType|null); public static create(properties?: proto.IBotAgeCollectionMetadata): proto.BotAgeCollectionMetadata; public static encode(m: proto.IBotAgeCollectionMetadata, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.BotAgeCollectionMetadata; @@ -986,11 +986,11 @@ export namespace proto { class BotAvatarMetadata implements IBotAvatarMetadata { constructor(p?: proto.IBotAvatarMetadata); - public sentiment: number; - public behaviorGraph: string; - public action: number; - public intensity: number; - public wordCount: number; + public sentiment?: (number|null); + public behaviorGraph?: (string|null); + public action?: (number|null); + public intensity?: (number|null); + public wordCount?: (number|null); public static create(properties?: proto.IBotAvatarMetadata): proto.BotAvatarMetadata; public static encode(m: proto.IBotAvatarMetadata, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.BotAvatarMetadata; @@ -1086,7 +1086,7 @@ export namespace proto { class BotDocumentMessageMetadata implements IBotDocumentMessageMetadata { constructor(p?: proto.IBotDocumentMessageMetadata); - public pluginType: proto.BotDocumentMessageMetadata.DocumentPluginType; + public pluginType?: (proto.BotDocumentMessageMetadata.DocumentPluginType|null); public static create(properties?: proto.IBotDocumentMessageMetadata): proto.BotDocumentMessageMetadata; public static encode(m: proto.IBotDocumentMessageMetadata, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.BotDocumentMessageMetadata; @@ -1117,11 +1117,11 @@ export namespace proto { class BotFeedbackMessage implements IBotFeedbackMessage { constructor(p?: proto.IBotFeedbackMessage); public messageKey?: (proto.IMessageKey|null); - public kind: proto.BotFeedbackMessage.BotFeedbackKind; - public text: string; - public kindNegative: (number|Long); - public kindPositive: (number|Long); - public kindReport: proto.BotFeedbackMessage.ReportKind; + public kind?: (proto.BotFeedbackMessage.BotFeedbackKind|null); + public text?: (string|null); + public kindNegative?: (number|Long|null); + public kindPositive?: (number|Long|null); + public kindReport?: (proto.BotFeedbackMessage.ReportKind|null); public sideBySideSurveyMetadata?: (proto.BotFeedbackMessage.ISideBySideSurveyMetadata|null); public static create(properties?: proto.IBotFeedbackMessage): proto.BotFeedbackMessage; public static encode(m: proto.IBotFeedbackMessage, w?: $protobuf.Writer): $protobuf.Writer; @@ -1187,13 +1187,13 @@ export namespace proto { class SideBySideSurveyMetadata implements ISideBySideSurveyMetadata { constructor(p?: proto.BotFeedbackMessage.ISideBySideSurveyMetadata); - public selectedRequestId: string; - public surveyId: number; - public simonSessionFbid: string; - public responseOtid: string; - public responseTimestampMsString: string; - public isSelectedResponsePrimary: boolean; - public messageIdToEdit: string; + public selectedRequestId?: (string|null); + public surveyId?: (number|null); + public simonSessionFbid?: (string|null); + public responseOtid?: (string|null); + public responseTimestampMsString?: (string|null); + public isSelectedResponsePrimary?: (boolean|null); + public messageIdToEdit?: (string|null); public analyticsData?: (proto.BotFeedbackMessage.SideBySideSurveyMetadata.ISideBySideSurveyAnalyticsData|null); public metaAiAnalyticsData?: (proto.BotFeedbackMessage.SideBySideSurveyMetadata.ISidebySideSurveyMetaAiAnalyticsData|null); public static create(properties?: proto.BotFeedbackMessage.ISideBySideSurveyMetadata): proto.BotFeedbackMessage.SideBySideSurveyMetadata; @@ -1215,9 +1215,9 @@ export namespace proto { class SideBySideSurveyAnalyticsData implements ISideBySideSurveyAnalyticsData { constructor(p?: proto.BotFeedbackMessage.SideBySideSurveyMetadata.ISideBySideSurveyAnalyticsData); - public tessaEvent: string; - public tessaSessionFbid: string; - public simonSessionFbid: string; + public tessaEvent?: (string|null); + public tessaSessionFbid?: (string|null); + public simonSessionFbid?: (string|null); public static create(properties?: proto.BotFeedbackMessage.SideBySideSurveyMetadata.ISideBySideSurveyAnalyticsData): proto.BotFeedbackMessage.SideBySideSurveyMetadata.SideBySideSurveyAnalyticsData; public static encode(m: proto.BotFeedbackMessage.SideBySideSurveyMetadata.ISideBySideSurveyAnalyticsData, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.BotFeedbackMessage.SideBySideSurveyMetadata.SideBySideSurveyAnalyticsData; @@ -1241,10 +1241,10 @@ export namespace proto { class SidebySideSurveyMetaAiAnalyticsData implements ISidebySideSurveyMetaAiAnalyticsData { constructor(p?: proto.BotFeedbackMessage.SideBySideSurveyMetadata.ISidebySideSurveyMetaAiAnalyticsData); - public surveyId: number; - public primaryResponseId: string; - public testArmName: string; - public timestampMsString: string; + public surveyId?: (number|null); + public primaryResponseId?: (string|null); + public testArmName?: (string|null); + public timestampMsString?: (string|null); public ctaImpressionEvent?: (proto.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.ISideBySideSurveyCTAImpressionEventData|null); public ctaClickEvent?: (proto.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.ISideBySideSurveyCTAClickEventData|null); public cardImpressionEvent?: (proto.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.ISideBySideSurveyCardImpressionEventData|null); @@ -1267,7 +1267,7 @@ export namespace proto { class SideBySideSurveyAbandonEventData implements ISideBySideSurveyAbandonEventData { constructor(p?: proto.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.ISideBySideSurveyAbandonEventData); - public abandonDwellTimeMsString: string; + public abandonDwellTimeMsString?: (string|null); public static create(properties?: proto.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.ISideBySideSurveyAbandonEventData): proto.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyAbandonEventData; public static encode(m: proto.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.ISideBySideSurveyAbandonEventData, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyAbandonEventData; @@ -1284,8 +1284,8 @@ export namespace proto { class SideBySideSurveyCTAClickEventData implements ISideBySideSurveyCTAClickEventData { constructor(p?: proto.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.ISideBySideSurveyCTAClickEventData); - public isSurveyExpired: boolean; - public clickDwellTimeMsString: string; + public isSurveyExpired?: (boolean|null); + public clickDwellTimeMsString?: (string|null); public static create(properties?: proto.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.ISideBySideSurveyCTAClickEventData): proto.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCTAClickEventData; public static encode(m: proto.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.ISideBySideSurveyCTAClickEventData, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCTAClickEventData; @@ -1301,7 +1301,7 @@ export namespace proto { class SideBySideSurveyCTAImpressionEventData implements ISideBySideSurveyCTAImpressionEventData { constructor(p?: proto.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.ISideBySideSurveyCTAImpressionEventData); - public isSurveyExpired: boolean; + public isSurveyExpired?: (boolean|null); public static create(properties?: proto.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.ISideBySideSurveyCTAImpressionEventData): proto.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCTAImpressionEventData; public static encode(m: proto.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.ISideBySideSurveyCTAImpressionEventData, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCTAImpressionEventData; @@ -1332,8 +1332,8 @@ export namespace proto { class SideBySideSurveyResponseEventData implements ISideBySideSurveyResponseEventData { constructor(p?: proto.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.ISideBySideSurveyResponseEventData); - public responseDwellTimeMsString: string; - public selectedResponseId: string; + public responseDwellTimeMsString?: (string|null); + public selectedResponseId?: (string|null); public static create(properties?: proto.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.ISideBySideSurveyResponseEventData): proto.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyResponseEventData; public static encode(m: proto.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.ISideBySideSurveyResponseEventData, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyResponseEventData; @@ -1368,7 +1368,7 @@ export namespace proto { class BotGroupParticipantMetadata implements IBotGroupParticipantMetadata { constructor(p?: proto.IBotGroupParticipantMetadata); - public botFbid: string; + public botFbid?: (string|null); public static create(properties?: proto.IBotGroupParticipantMetadata): proto.BotGroupParticipantMetadata; public static encode(m: proto.IBotGroupParticipantMetadata, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.BotGroupParticipantMetadata; @@ -1385,8 +1385,8 @@ export namespace proto { class BotImagineMetadata implements IBotImagineMetadata { constructor(p?: proto.IBotImagineMetadata); - public imagineType: proto.BotImagineMetadata.ImagineType; - public shortPrompt: string; + public imagineType?: (proto.BotImagineMetadata.ImagineType|null); + public shortPrompt?: (string|null); public static create(properties?: proto.IBotImagineMetadata): proto.BotImagineMetadata; public static encode(m: proto.IBotImagineMetadata, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.BotImagineMetadata; @@ -1415,9 +1415,9 @@ export namespace proto { class BotInfrastructureDiagnostics implements IBotInfrastructureDiagnostics { constructor(p?: proto.IBotInfrastructureDiagnostics); - public botBackend: proto.BotInfrastructureDiagnostics.BotBackend; + public botBackend?: (proto.BotInfrastructureDiagnostics.BotBackend|null); public toolsUsed: string[]; - public isThinking: boolean; + public isThinking?: (boolean|null); public static create(properties?: proto.IBotInfrastructureDiagnostics): proto.BotInfrastructureDiagnostics; public static encode(m: proto.IBotInfrastructureDiagnostics, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.BotInfrastructureDiagnostics; @@ -1441,7 +1441,7 @@ export namespace proto { class BotLinkedAccount implements IBotLinkedAccount { constructor(p?: proto.IBotLinkedAccount); - public type: proto.BotLinkedAccount.BotLinkedAccountType; + public type?: (proto.BotLinkedAccount.BotLinkedAccountType|null); public static create(properties?: proto.IBotLinkedAccount): proto.BotLinkedAccount; public static encode(m: proto.IBotLinkedAccount, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.BotLinkedAccount; @@ -1467,8 +1467,8 @@ export namespace proto { class BotLinkedAccountsMetadata implements IBotLinkedAccountsMetadata { constructor(p?: proto.IBotLinkedAccountsMetadata); public accounts: proto.IBotLinkedAccount[]; - public acAuthTokens: Uint8Array; - public acErrorCode: number; + public acAuthTokens?: (Uint8Array|null); + public acErrorCode?: (number|null); public static create(properties?: proto.IBotLinkedAccountsMetadata): proto.BotLinkedAccountsMetadata; public static encode(m: proto.IBotLinkedAccountsMetadata, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.BotLinkedAccountsMetadata; @@ -1490,13 +1490,13 @@ export namespace proto { class BotMediaMetadata implements IBotMediaMetadata { constructor(p?: proto.IBotMediaMetadata); - public fileSha256: string; - public mediaKey: string; - public fileEncSha256: string; - public directPath: string; - public mediaKeyTimestamp: (number|Long); - public mimetype: string; - public orientationType: proto.BotMediaMetadata.OrientationType; + public fileSha256?: (string|null); + public mediaKey?: (string|null); + public fileEncSha256?: (string|null); + public directPath?: (string|null); + public mediaKeyTimestamp?: (number|Long|null); + public mimetype?: (string|null); + public orientationType?: (proto.BotMediaMetadata.OrientationType|null); public static create(properties?: proto.IBotMediaMetadata): proto.BotMediaMetadata; public static encode(m: proto.IBotMediaMetadata, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.BotMediaMetadata; @@ -1522,8 +1522,8 @@ export namespace proto { class BotMemoryFact implements IBotMemoryFact { constructor(p?: proto.IBotMemoryFact); - public fact: string; - public factId: string; + public fact?: (string|null); + public factId?: (string|null); public static create(properties?: proto.IBotMemoryFact): proto.BotMemoryFact; public static encode(m: proto.IBotMemoryFact, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.BotMemoryFact; @@ -1543,7 +1543,7 @@ export namespace proto { constructor(p?: proto.IBotMemoryMetadata); public addedFacts: proto.IBotMemoryFact[]; public removedFacts: proto.IBotMemoryFact[]; - public disclaimer: string; + public disclaimer?: (string|null); public static create(properties?: proto.IBotMemoryMetadata): proto.BotMemoryMetadata; public static encode(m: proto.IBotMemoryMetadata, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.BotMemoryMetadata; @@ -1575,7 +1575,7 @@ export namespace proto { class BotMessageOrigin implements IBotMessageOrigin { constructor(p?: proto.IBotMessageOrigin); - public type: proto.BotMessageOrigin.BotMessageOriginType; + public type?: (proto.BotMessageOrigin.BotMessageOriginType|null); public static create(properties?: proto.IBotMessageOrigin): proto.BotMessageOrigin; public static encode(m: proto.IBotMessageOrigin, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.BotMessageOrigin; @@ -1615,8 +1615,8 @@ export namespace proto { class BotMessageSharingInfo implements IBotMessageSharingInfo { constructor(p?: proto.IBotMessageSharingInfo); - public botEntryPointOrigin: proto.BotMetricsEntryPoint; - public forwardScore: number; + public botEntryPointOrigin?: (proto.BotMetricsEntryPoint|null); + public forwardScore?: (number|null); public static create(properties?: proto.IBotMessageSharingInfo): proto.BotMessageSharingInfo; public static encode(m: proto.IBotMessageSharingInfo, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.BotMessageSharingInfo; @@ -1671,16 +1671,16 @@ export namespace proto { class BotMetadata implements IBotMetadata { constructor(p?: proto.IBotMetadata); public avatarMetadata?: (proto.IBotAvatarMetadata|null); - public personaId: string; + public personaId?: (string|null); public pluginMetadata?: (proto.IBotPluginMetadata|null); public suggestedPromptMetadata?: (proto.IBotSuggestedPromptMetadata|null); - public invokerJid: string; + public invokerJid?: (string|null); public sessionMetadata?: (proto.IBotSessionMetadata|null); public memuMetadata?: (proto.IBotMemuMetadata|null); - public timezone: string; + public timezone?: (string|null); public reminderMetadata?: (proto.IBotReminderMetadata|null); public modelMetadata?: (proto.IBotModelMetadata|null); - public messageDisclaimerText: string; + public messageDisclaimerText?: (string|null); public progressIndicatorMetadata?: (proto.IBotProgressIndicatorMetadata|null); public capabilityMetadata?: (proto.IBotCapabilityMetadata|null); public imagineMetadata?: (proto.IBotImagineMetadata|null); @@ -1689,13 +1689,13 @@ export namespace proto { public botMetricsMetadata?: (proto.IBotMetricsMetadata|null); public botLinkedAccountsMetadata?: (proto.IBotLinkedAccountsMetadata|null); public richResponseSourcesMetadata?: (proto.IBotSourcesMetadata|null); - public aiConversationContext: Uint8Array; + public aiConversationContext?: (Uint8Array|null); public botPromotionMessageMetadata?: (proto.IBotPromotionMessageMetadata|null); public botModeSelectionMetadata?: (proto.IBotModeSelectionMetadata|null); public botQuotaMetadata?: (proto.IBotQuotaMetadata|null); public botAgeCollectionMetadata?: (proto.IBotAgeCollectionMetadata|null); - public conversationStarterPromptId: string; - public botResponseId: string; + public conversationStarterPromptId?: (string|null); + public botResponseId?: (string|null); public verificationMetadata?: (proto.IBotSignatureVerificationMetadata|null); public unifiedResponseMutation?: (proto.IBotUnifiedResponseMutation|null); public botMessageOriginMetadata?: (proto.IBotMessageOriginMetadata|null); @@ -1708,7 +1708,7 @@ export namespace proto { public botRenderingConfigMetadata?: (proto.IBotRenderingConfigMetadata|null); public botInfrastructureDiagnostics?: (proto.IBotInfrastructureDiagnostics|null); public aiMediaCollectionMetadata?: (proto.IAIMediaCollectionMetadata|null); - public internalMetadata: Uint8Array; + public internalMetadata?: (Uint8Array|null); public static create(properties?: proto.IBotMetadata): proto.BotMetadata; public static encode(m: proto.IBotMetadata, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.BotMetadata; @@ -1774,9 +1774,9 @@ export namespace proto { class BotMetricsMetadata implements IBotMetricsMetadata { constructor(p?: proto.IBotMetricsMetadata); - public destinationId: string; - public destinationEntryPoint: proto.BotMetricsEntryPoint; - public threadOrigin: proto.BotMetricsThreadEntryPoint; + public destinationId?: (string|null); + public destinationEntryPoint?: (proto.BotMetricsEntryPoint|null); + public threadOrigin?: (proto.BotMetricsThreadEntryPoint|null); public static create(properties?: proto.IBotMetricsMetadata): proto.BotMetricsMetadata; public static encode(m: proto.IBotMetricsMetadata, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.BotMetricsMetadata; @@ -1828,9 +1828,9 @@ export namespace proto { class BotModelMetadata implements IBotModelMetadata { constructor(p?: proto.IBotModelMetadata); - public modelType: proto.BotModelMetadata.ModelType; - public premiumModelStatus: proto.BotModelMetadata.PremiumModelStatus; - public modelNameOverride: string; + public modelType?: (proto.BotModelMetadata.ModelType|null); + public premiumModelStatus?: (proto.BotModelMetadata.PremiumModelStatus|null); + public modelNameOverride?: (string|null); public static create(properties?: proto.IBotModelMetadata): proto.BotModelMetadata; public static encode(m: proto.IBotModelMetadata, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.BotModelMetadata; @@ -1872,18 +1872,18 @@ export namespace proto { class BotPluginMetadata implements IBotPluginMetadata { constructor(p?: proto.IBotPluginMetadata); - public provider: proto.BotPluginMetadata.SearchProvider; - public pluginType: proto.BotPluginMetadata.PluginType; - public thumbnailCdnUrl: string; - public profilePhotoCdnUrl: string; - public searchProviderUrl: string; - public referenceIndex: number; - public expectedLinksCount: number; - public searchQuery: string; + public provider?: (proto.BotPluginMetadata.SearchProvider|null); + public pluginType?: (proto.BotPluginMetadata.PluginType|null); + public thumbnailCdnUrl?: (string|null); + public profilePhotoCdnUrl?: (string|null); + public searchProviderUrl?: (string|null); + public referenceIndex?: (number|null); + public expectedLinksCount?: (number|null); + public searchQuery?: (string|null); public parentPluginMessageKey?: (proto.IMessageKey|null); - public deprecatedField: proto.BotPluginMetadata.PluginType; - public parentPluginType: proto.BotPluginMetadata.PluginType; - public faviconCdnUrl: string; + public deprecatedField?: (proto.BotPluginMetadata.PluginType|null); + public parentPluginType?: (proto.BotPluginMetadata.PluginType|null); + public faviconCdnUrl?: (string|null); public static create(properties?: proto.IBotPluginMetadata): proto.BotPluginMetadata; public static encode(m: proto.IBotPluginMetadata, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.BotPluginMetadata; @@ -1917,9 +1917,9 @@ export namespace proto { class BotProgressIndicatorMetadata implements IBotProgressIndicatorMetadata { constructor(p?: proto.IBotProgressIndicatorMetadata); - public progressDescription: string; + public progressDescription?: (string|null); public stepsMetadata: proto.BotProgressIndicatorMetadata.IBotPlanningStepMetadata[]; - public estimatedCompletionTime: (number|Long); + public estimatedCompletionTime?: (number|Long|null); public static create(properties?: proto.IBotProgressIndicatorMetadata): proto.BotProgressIndicatorMetadata; public static encode(m: proto.IBotProgressIndicatorMetadata, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.BotProgressIndicatorMetadata; @@ -1943,12 +1943,12 @@ export namespace proto { class BotPlanningStepMetadata implements IBotPlanningStepMetadata { constructor(p?: proto.BotProgressIndicatorMetadata.IBotPlanningStepMetadata); - public statusTitle: string; - public statusBody: string; + public statusTitle?: (string|null); + public statusBody?: (string|null); public sourcesMetadata: proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.IBotPlanningSearchSourcesMetadata[]; - public status: proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.PlanningStepStatus; - public isReasoning: boolean; - public isEnhancedSearch: boolean; + public status?: (proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.PlanningStepStatus|null); + public isReasoning?: (boolean|null); + public isEnhancedSearch?: (boolean|null); public sections: proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.IBotPlanningStepSectionMetadata[]; public static create(properties?: proto.BotProgressIndicatorMetadata.IBotPlanningStepMetadata): proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata; public static encode(m: proto.BotProgressIndicatorMetadata.IBotPlanningStepMetadata, w?: $protobuf.Writer): $protobuf.Writer; @@ -1970,10 +1970,10 @@ export namespace proto { class BotPlanningSearchSourceMetadata implements IBotPlanningSearchSourceMetadata { constructor(p?: proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.IBotPlanningSearchSourceMetadata); - public title: string; - public provider: proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotSearchSourceProvider; - public sourceUrl: string; - public favIconUrl: string; + public title?: (string|null); + public provider?: (proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotSearchSourceProvider|null); + public sourceUrl?: (string|null); + public favIconUrl?: (string|null); public static create(properties?: proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.IBotPlanningSearchSourceMetadata): proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourceMetadata; public static encode(m: proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.IBotPlanningSearchSourceMetadata, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourceMetadata; @@ -1991,9 +1991,9 @@ export namespace proto { class BotPlanningSearchSourcesMetadata implements IBotPlanningSearchSourcesMetadata { constructor(p?: proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.IBotPlanningSearchSourcesMetadata); - public sourceTitle: string; - public provider: proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata.BotPlanningSearchSourceProvider; - public sourceUrl: string; + public sourceTitle?: (string|null); + public provider?: (proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata.BotPlanningSearchSourceProvider|null); + public sourceUrl?: (string|null); public static create(properties?: proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.IBotPlanningSearchSourcesMetadata): proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata; public static encode(m: proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.IBotPlanningSearchSourcesMetadata, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata; @@ -2021,8 +2021,8 @@ export namespace proto { class BotPlanningStepSectionMetadata implements IBotPlanningStepSectionMetadata { constructor(p?: proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.IBotPlanningStepSectionMetadata); - public sectionTitle: string; - public sectionBody: string; + public sectionTitle?: (string|null); + public sectionBody?: (string|null); public sourcesMetadata: proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.IBotPlanningSearchSourceMetadata[]; public static create(properties?: proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.IBotPlanningStepSectionMetadata): proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningStepSectionMetadata; public static encode(m: proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.IBotPlanningStepSectionMetadata, w?: $protobuf.Writer): $protobuf.Writer; @@ -2056,8 +2056,8 @@ export namespace proto { class BotPromotionMessageMetadata implements IBotPromotionMessageMetadata { constructor(p?: proto.IBotPromotionMessageMetadata); - public promotionType: proto.BotPromotionMessageMetadata.BotPromotionType; - public buttonTitle: string; + public promotionType?: (proto.BotPromotionMessageMetadata.BotPromotionType|null); + public buttonTitle?: (string|null); public static create(properties?: proto.IBotPromotionMessageMetadata): proto.BotPromotionMessageMetadata; public static encode(m: proto.IBotPromotionMessageMetadata, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.BotPromotionMessageMetadata; @@ -2083,8 +2083,8 @@ export namespace proto { class BotPromptSuggestion implements IBotPromptSuggestion { constructor(p?: proto.IBotPromptSuggestion); - public prompt: string; - public promptId: string; + public prompt?: (string|null); + public promptId?: (string|null); public static create(properties?: proto.IBotPromptSuggestion): proto.BotPromptSuggestion; public static encode(m: proto.IBotPromptSuggestion, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.BotPromptSuggestion; @@ -2136,9 +2136,9 @@ export namespace proto { class BotFeatureQuotaMetadata implements IBotFeatureQuotaMetadata { constructor(p?: proto.BotQuotaMetadata.IBotFeatureQuotaMetadata); - public featureType: proto.BotQuotaMetadata.BotFeatureQuotaMetadata.BotFeatureType; - public remainingQuota: number; - public expirationTimestamp: (number|Long); + public featureType?: (proto.BotQuotaMetadata.BotFeatureQuotaMetadata.BotFeatureType|null); + public remainingQuota?: (number|null); + public expirationTimestamp?: (number|Long|null); public static create(properties?: proto.BotQuotaMetadata.IBotFeatureQuotaMetadata): proto.BotQuotaMetadata.BotFeatureQuotaMetadata; public static encode(m: proto.BotQuotaMetadata.IBotFeatureQuotaMetadata, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.BotQuotaMetadata.BotFeatureQuotaMetadata; @@ -2168,10 +2168,10 @@ export namespace proto { class BotReminderMetadata implements IBotReminderMetadata { constructor(p?: proto.IBotReminderMetadata); public requestMessageKey?: (proto.IMessageKey|null); - public action: proto.BotReminderMetadata.ReminderAction; - public name: string; - public nextTriggerTimestamp: (number|Long); - public frequency: proto.BotReminderMetadata.ReminderFrequency; + public action?: (proto.BotReminderMetadata.ReminderAction|null); + public name?: (string|null); + public nextTriggerTimestamp?: (number|Long|null); + public frequency?: (proto.BotReminderMetadata.ReminderFrequency|null); public static create(properties?: proto.IBotReminderMetadata): proto.BotReminderMetadata; public static encode(m: proto.IBotReminderMetadata, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.BotReminderMetadata; @@ -2206,8 +2206,8 @@ export namespace proto { class BotRenderingConfigMetadata implements IBotRenderingConfigMetadata { constructor(p?: proto.IBotRenderingConfigMetadata); - public bloksVersioningId: string; - public pixelDensity: number; + public bloksVersioningId?: (string|null); + public pixelDensity?: (number|null); public static create(properties?: proto.IBotRenderingConfigMetadata): proto.BotRenderingConfigMetadata; public static encode(m: proto.IBotRenderingConfigMetadata, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.BotRenderingConfigMetadata; @@ -2242,7 +2242,7 @@ export namespace proto { class Keyword implements IKeyword { constructor(p?: proto.BotRenderingMetadata.IKeyword); - public value: string; + public value?: (string|null); public associatedPrompts: string[]; public static create(properties?: proto.BotRenderingMetadata.IKeyword): proto.BotRenderingMetadata.Keyword; public static encode(m: proto.BotRenderingMetadata.IKeyword, w?: $protobuf.Writer): $protobuf.Writer; @@ -2261,8 +2261,8 @@ export namespace proto { class BotSessionMetadata implements IBotSessionMetadata { constructor(p?: proto.IBotSessionMetadata); - public sessionId: string; - public sessionSource: proto.BotSessionSource; + public sessionId?: (string|null); + public sessionSource?: (proto.BotSessionSource|null); public static create(properties?: proto.IBotSessionMetadata): proto.BotSessionMetadata; public static encode(m: proto.IBotSessionMetadata, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.BotSessionMetadata; @@ -2308,9 +2308,9 @@ export namespace proto { class BotSignatureVerificationUseCaseProof implements IBotSignatureVerificationUseCaseProof { constructor(p?: proto.IBotSignatureVerificationUseCaseProof); - public version: number; - public useCase: proto.BotSignatureVerificationUseCaseProof.BotSignatureUseCase; - public signature: Uint8Array; + public version?: (number|null); + public useCase?: (proto.BotSignatureVerificationUseCaseProof.BotSignatureUseCase|null); + public signature?: (Uint8Array|null); public certificateChain: Uint8Array[]; public static create(properties?: proto.IBotSignatureVerificationUseCaseProof): proto.BotSignatureVerificationUseCaseProof; public static encode(m: proto.IBotSignatureVerificationUseCaseProof, w?: $protobuf.Writer): $protobuf.Writer; @@ -2359,13 +2359,13 @@ export namespace proto { class BotSourceItem implements IBotSourceItem { constructor(p?: proto.BotSourcesMetadata.IBotSourceItem); - public provider: proto.BotSourcesMetadata.BotSourceItem.SourceProvider; - public thumbnailCdnUrl: string; - public sourceProviderUrl: string; - public sourceQuery: string; - public faviconCdnUrl: string; - public citationNumber: number; - public sourceTitle: string; + public provider?: (proto.BotSourcesMetadata.BotSourceItem.SourceProvider|null); + public thumbnailCdnUrl?: (string|null); + public sourceProviderUrl?: (string|null); + public sourceQuery?: (string|null); + public faviconCdnUrl?: (string|null); + public citationNumber?: (number|null); + public sourceTitle?: (string|null); public static create(properties?: proto.BotSourcesMetadata.IBotSourceItem): proto.BotSourcesMetadata.BotSourceItem; public static encode(m: proto.BotSourcesMetadata.IBotSourceItem, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.BotSourcesMetadata.BotSourceItem; @@ -2397,9 +2397,9 @@ export namespace proto { class BotSuggestedPromptMetadata implements IBotSuggestedPromptMetadata { constructor(p?: proto.IBotSuggestedPromptMetadata); public suggestedPrompts: string[]; - public selectedPromptIndex: number; + public selectedPromptIndex?: (number|null); public promptSuggestions?: (proto.IBotPromptSuggestions|null); - public selectedPromptId: string; + public selectedPromptId?: (string|null); public static create(properties?: proto.IBotSuggestedPromptMetadata): proto.BotSuggestedPromptMetadata; public static encode(m: proto.IBotSuggestedPromptMetadata, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.BotSuggestedPromptMetadata; @@ -2437,7 +2437,7 @@ export namespace proto { class MediaDetailsMetadata implements IMediaDetailsMetadata { constructor(p?: proto.BotUnifiedResponseMutation.IMediaDetailsMetadata); - public id: string; + public id?: (string|null); public highResMedia?: (proto.IBotMediaMetadata|null); public previewMedia?: (proto.IBotMediaMetadata|null); public static create(properties?: proto.BotUnifiedResponseMutation.IMediaDetailsMetadata): proto.BotUnifiedResponseMutation.MediaDetailsMetadata; @@ -2456,8 +2456,8 @@ export namespace proto { class SideBySideMetadata implements ISideBySideMetadata { constructor(p?: proto.BotUnifiedResponseMutation.ISideBySideMetadata); - public primaryResponseId: string; - public surveyCtaHasRendered: boolean; + public primaryResponseId?: (string|null); + public surveyCtaHasRendered?: (boolean|null); public static create(properties?: proto.BotUnifiedResponseMutation.ISideBySideMetadata): proto.BotUnifiedResponseMutation.SideBySideMetadata; public static encode(m: proto.BotUnifiedResponseMutation.ISideBySideMetadata, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.BotUnifiedResponseMutation.SideBySideMetadata; @@ -2488,21 +2488,21 @@ export namespace proto { class CallLogRecord implements ICallLogRecord { constructor(p?: proto.ICallLogRecord); - public callResult: proto.CallLogRecord.CallResult; - public isDndMode: boolean; - public silenceReason: proto.CallLogRecord.SilenceReason; - public duration: (number|Long); - public startTime: (number|Long); - public isIncoming: boolean; - public isVideo: boolean; - public isCallLink: boolean; - public callLinkToken: string; - public scheduledCallId: string; - public callId: string; - public callCreatorJid: string; - public groupJid: string; + public callResult?: (proto.CallLogRecord.CallResult|null); + public isDndMode?: (boolean|null); + public silenceReason?: (proto.CallLogRecord.SilenceReason|null); + public duration?: (number|Long|null); + public startTime?: (number|Long|null); + public isIncoming?: (boolean|null); + public isVideo?: (boolean|null); + public isCallLink?: (boolean|null); + public callLinkToken?: (string|null); + public scheduledCallId?: (string|null); + public callId?: (string|null); + public callCreatorJid?: (string|null); + public groupJid?: (string|null); public participants: proto.CallLogRecord.IParticipantInfo[]; - public callType: proto.CallLogRecord.CallType; + public callType?: (proto.CallLogRecord.CallType|null); public static create(properties?: proto.ICallLogRecord): proto.CallLogRecord; public static encode(m: proto.ICallLogRecord, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.CallLogRecord; @@ -2541,8 +2541,8 @@ export namespace proto { class ParticipantInfo implements IParticipantInfo { constructor(p?: proto.CallLogRecord.IParticipantInfo); - public userJid: string; - public callResult: proto.CallLogRecord.CallResult; + public userJid?: (string|null); + public callResult?: (proto.CallLogRecord.CallResult|null); public static create(properties?: proto.CallLogRecord.IParticipantInfo): proto.CallLogRecord.ParticipantInfo; public static encode(m: proto.CallLogRecord.IParticipantInfo, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.CallLogRecord.ParticipantInfo; @@ -2587,8 +2587,8 @@ export namespace proto { class NoiseCertificate implements INoiseCertificate { constructor(p?: proto.CertChain.INoiseCertificate); - public details: Uint8Array; - public signature: Uint8Array; + public details?: (Uint8Array|null); + public signature?: (Uint8Array|null); public static create(properties?: proto.CertChain.INoiseCertificate): proto.CertChain.NoiseCertificate; public static encode(m: proto.CertChain.INoiseCertificate, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.CertChain.NoiseCertificate; @@ -2610,11 +2610,11 @@ export namespace proto { class Details implements IDetails { constructor(p?: proto.CertChain.NoiseCertificate.IDetails); - public serial: number; - public issuerSerial: number; - public key: Uint8Array; - public notBefore: (number|Long); - public notAfter: (number|Long); + public serial?: (number|null); + public issuerSerial?: (number|null); + public key?: (Uint8Array|null); + public notBefore?: (number|Long|null); + public notAfter?: (number|Long|null); public static create(properties?: proto.CertChain.NoiseCertificate.IDetails): proto.CertChain.NoiseCertificate.Details; public static encode(m: proto.CertChain.NoiseCertificate.IDetails, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.CertChain.NoiseCertificate.Details; @@ -2633,7 +2633,7 @@ export namespace proto { class ChatLockSettings implements IChatLockSettings { constructor(p?: proto.IChatLockSettings); - public hideLockedChats: boolean; + public hideLockedChats?: (boolean|null); public secretCode?: (proto.IUserPassword|null); public static create(properties?: proto.IChatLockSettings): proto.ChatLockSettings; public static encode(m: proto.IChatLockSettings, w?: $protobuf.Writer): $protobuf.Writer; @@ -2672,11 +2672,11 @@ export namespace proto { class DraftMessage implements IDraftMessage { constructor(p?: proto.ChatRowOpaqueData.IDraftMessage); - public text: string; - public omittedUrl: string; + public text?: (string|null); + public omittedUrl?: (string|null); public ctwaContextLinkData?: (proto.ChatRowOpaqueData.DraftMessage.ICtwaContextLinkData|null); public ctwaContext?: (proto.ChatRowOpaqueData.DraftMessage.ICtwaContextData|null); - public timestamp: (number|Long); + public timestamp?: (number|Long|null); public static create(properties?: proto.ChatRowOpaqueData.IDraftMessage): proto.ChatRowOpaqueData.DraftMessage; public static encode(m: proto.ChatRowOpaqueData.IDraftMessage, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.ChatRowOpaqueData.DraftMessage; @@ -2705,18 +2705,18 @@ export namespace proto { class CtwaContextData implements ICtwaContextData { constructor(p?: proto.ChatRowOpaqueData.DraftMessage.ICtwaContextData); - public conversionSource: string; - public conversionData: Uint8Array; - public sourceUrl: string; - public sourceId: string; - public sourceType: string; - public title: string; - public description: string; - public thumbnail: string; - public thumbnailUrl: string; - public mediaType: proto.ChatRowOpaqueData.DraftMessage.CtwaContextData.ContextInfoExternalAdReplyInfoMediaType; - public mediaUrl: string; - public isSuspiciousLink: boolean; + public conversionSource?: (string|null); + public conversionData?: (Uint8Array|null); + public sourceUrl?: (string|null); + public sourceId?: (string|null); + public sourceType?: (string|null); + public title?: (string|null); + public description?: (string|null); + public thumbnail?: (string|null); + public thumbnailUrl?: (string|null); + public mediaType?: (proto.ChatRowOpaqueData.DraftMessage.CtwaContextData.ContextInfoExternalAdReplyInfoMediaType|null); + public mediaUrl?: (string|null); + public isSuspiciousLink?: (boolean|null); public static create(properties?: proto.ChatRowOpaqueData.DraftMessage.ICtwaContextData): proto.ChatRowOpaqueData.DraftMessage.CtwaContextData; public static encode(m: proto.ChatRowOpaqueData.DraftMessage.ICtwaContextData, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.ChatRowOpaqueData.DraftMessage.CtwaContextData; @@ -2744,10 +2744,10 @@ export namespace proto { class CtwaContextLinkData implements ICtwaContextLinkData { constructor(p?: proto.ChatRowOpaqueData.DraftMessage.ICtwaContextLinkData); - public context: string; - public sourceUrl: string; - public icebreaker: string; - public phone: string; + public context?: (string|null); + public sourceUrl?: (string|null); + public icebreaker?: (string|null); + public phone?: (string|null); public static create(properties?: proto.ChatRowOpaqueData.DraftMessage.ICtwaContextLinkData): proto.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData; public static encode(m: proto.ChatRowOpaqueData.DraftMessage.ICtwaContextLinkData, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData; @@ -2760,18 +2760,18 @@ export namespace proto { } interface ICitation { - title: string; - subtitle: string; - cmsId: string; - imageUrl: string; + title?: (string|null); + subtitle?: (string|null); + cmsId?: (string|null); + imageUrl?: (string|null); } class Citation implements ICitation { constructor(p?: proto.ICitation); - public title: string; - public subtitle: string; - public cmsId: string; - public imageUrl: string; + public title?: (string|null); + public subtitle?: (string|null); + public cmsId?: (string|null); + public imageUrl?: (string|null); public static create(properties?: proto.ICitation): proto.Citation; public static encode(m: proto.ICitation, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Citation; @@ -2790,10 +2790,10 @@ export namespace proto { class ClientPairingProps implements IClientPairingProps { constructor(p?: proto.IClientPairingProps); - public isChatDbLidMigrated: boolean; - public isSyncdPureLidSession: boolean; - public isSyncdSnapshotRecoveryEnabled: boolean; - public isHsThumbnailSyncEnabled: boolean; + public isChatDbLidMigrated?: (boolean|null); + public isSyncdPureLidSession?: (boolean|null); + public isSyncdSnapshotRecoveryEnabled?: (boolean|null); + public isHsThumbnailSyncEnabled?: (boolean|null); public static create(properties?: proto.IClientPairingProps): proto.ClientPairingProps; public static encode(m: proto.IClientPairingProps, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.ClientPairingProps; @@ -2842,40 +2842,40 @@ export namespace proto { class ClientPayload implements IClientPayload { constructor(p?: proto.IClientPayload); - public username: (number|Long); - public passive: boolean; + public username?: (number|Long|null); + public passive?: (boolean|null); public userAgent?: (proto.ClientPayload.IUserAgent|null); public webInfo?: (proto.ClientPayload.IWebInfo|null); - public pushName: string; - public sessionId: number; - public shortConnect: boolean; - public connectType: proto.ClientPayload.ConnectType; - public connectReason: proto.ClientPayload.ConnectReason; + public pushName?: (string|null); + public sessionId?: (number|null); + public shortConnect?: (boolean|null); + public connectType?: (proto.ClientPayload.ConnectType|null); + public connectReason?: (proto.ClientPayload.ConnectReason|null); public shards: number[]; public dnsSource?: (proto.ClientPayload.IDNSSource|null); - public connectAttemptCount: number; - public device: number; + public connectAttemptCount?: (number|null); + public device?: (number|null); public devicePairingData?: (proto.ClientPayload.IDevicePairingRegistrationData|null); - public product: proto.ClientPayload.Product; - public fbCat: Uint8Array; - public fbUserAgent: Uint8Array; - public oc: boolean; - public lc: number; - public iosAppExtension: proto.ClientPayload.IOSAppExtension; - public fbAppId: (number|Long); - public fbDeviceId: Uint8Array; - public pull: boolean; - public paddingBytes: Uint8Array; - public yearClass: number; - public memClass: number; + public product?: (proto.ClientPayload.Product|null); + public fbCat?: (Uint8Array|null); + public fbUserAgent?: (Uint8Array|null); + public oc?: (boolean|null); + public lc?: (number|null); + public iosAppExtension?: (proto.ClientPayload.IOSAppExtension|null); + public fbAppId?: (number|Long|null); + public fbDeviceId?: (Uint8Array|null); + public pull?: (boolean|null); + public paddingBytes?: (Uint8Array|null); + public yearClass?: (number|null); + public memClass?: (number|null); public interopData?: (proto.ClientPayload.IInteropData|null); - public trafficAnonymization: proto.ClientPayload.TrafficAnonymization; - public lidDbMigrated: boolean; - public accountType: proto.ClientPayload.AccountType; - public connectionSequenceInfo: number; - public paaLink: boolean; - public preacksCount: number; - public processingQueueSize: number; + public trafficAnonymization?: (proto.ClientPayload.TrafficAnonymization|null); + public lidDbMigrated?: (boolean|null); + public accountType?: (proto.ClientPayload.AccountType|null); + public connectionSequenceInfo?: (number|null); + public paaLink?: (boolean|null); + public preacksCount?: (number|null); + public processingQueueSize?: (number|null); public static create(properties?: proto.IClientPayload): proto.ClientPayload; public static encode(m: proto.IClientPayload, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.ClientPayload; @@ -2927,8 +2927,8 @@ export namespace proto { class DNSSource implements IDNSSource { constructor(p?: proto.ClientPayload.IDNSSource); - public dnsMethod: proto.ClientPayload.DNSSource.DNSResolutionMethod; - public appCached: boolean; + public dnsMethod?: (proto.ClientPayload.DNSSource.DNSResolutionMethod|null); + public appCached?: (boolean|null); public static create(properties?: proto.ClientPayload.IDNSSource): proto.ClientPayload.DNSSource; public static encode(m: proto.ClientPayload.IDNSSource, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.ClientPayload.DNSSource; @@ -2965,14 +2965,14 @@ export namespace proto { class DevicePairingRegistrationData implements IDevicePairingRegistrationData { constructor(p?: proto.ClientPayload.IDevicePairingRegistrationData); - public eRegid: Uint8Array; - public eKeytype: Uint8Array; - public eIdent: Uint8Array; - public eSkeyId: Uint8Array; - public eSkeyVal: Uint8Array; - public eSkeySig: Uint8Array; - public buildHash: Uint8Array; - public deviceProps: Uint8Array; + public eRegid?: (Uint8Array|null); + public eKeytype?: (Uint8Array|null); + public eIdent?: (Uint8Array|null); + public eSkeyId?: (Uint8Array|null); + public eSkeyVal?: (Uint8Array|null); + public eSkeySig?: (Uint8Array|null); + public buildHash?: (Uint8Array|null); + public deviceProps?: (Uint8Array|null); public static create(properties?: proto.ClientPayload.IDevicePairingRegistrationData): proto.ClientPayload.DevicePairingRegistrationData; public static encode(m: proto.ClientPayload.IDevicePairingRegistrationData, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.ClientPayload.DevicePairingRegistrationData; @@ -2996,9 +2996,9 @@ export namespace proto { class InteropData implements IInteropData { constructor(p?: proto.ClientPayload.IInteropData); - public accountId: (number|Long); - public token: Uint8Array; - public enableReadReceipts: boolean; + public accountId?: (number|Long|null); + public token?: (Uint8Array|null); + public enableReadReceipts?: (boolean|null); public static create(properties?: proto.ClientPayload.IInteropData): proto.ClientPayload.InteropData; public static encode(m: proto.ClientPayload.IInteropData, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.ClientPayload.InteropData; @@ -3042,22 +3042,22 @@ export namespace proto { class UserAgent implements IUserAgent { constructor(p?: proto.ClientPayload.IUserAgent); - public platform: proto.ClientPayload.UserAgent.Platform; + public platform?: (proto.ClientPayload.UserAgent.Platform|null); public appVersion?: (proto.ClientPayload.UserAgent.IAppVersion|null); - public mcc: string; - public mnc: string; - public osVersion: string; - public manufacturer: string; - public device: string; - public osBuildNumber: string; - public phoneId: string; - public releaseChannel: proto.ClientPayload.UserAgent.ReleaseChannel; - public localeLanguageIso6391: string; - public localeCountryIso31661Alpha2: string; - public deviceBoard: string; - public deviceExpId: string; - public deviceType: proto.ClientPayload.UserAgent.DeviceType; - public deviceModelType: string; + public mcc?: (string|null); + public mnc?: (string|null); + public osVersion?: (string|null); + public manufacturer?: (string|null); + public device?: (string|null); + public osBuildNumber?: (string|null); + public phoneId?: (string|null); + public releaseChannel?: (proto.ClientPayload.UserAgent.ReleaseChannel|null); + public localeLanguageIso6391?: (string|null); + public localeCountryIso31661Alpha2?: (string|null); + public deviceBoard?: (string|null); + public deviceExpId?: (string|null); + public deviceType?: (proto.ClientPayload.UserAgent.DeviceType|null); + public deviceModelType?: (string|null); public static create(properties?: proto.ClientPayload.IUserAgent): proto.ClientPayload.UserAgent; public static encode(m: proto.ClientPayload.IUserAgent, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.ClientPayload.UserAgent; @@ -3079,11 +3079,11 @@ export namespace proto { class AppVersion implements IAppVersion { constructor(p?: proto.ClientPayload.UserAgent.IAppVersion); - public primary: number; - public secondary: number; - public tertiary: number; - public quaternary: number; - public quinary: number; + public primary?: (number|null); + public secondary?: (number|null); + public tertiary?: (number|null); + public quaternary?: (number|null); + public quinary?: (number|null); public static create(properties?: proto.ClientPayload.UserAgent.IAppVersion): proto.ClientPayload.UserAgent.AppVersion; public static encode(m: proto.ClientPayload.UserAgent.IAppVersion, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.ClientPayload.UserAgent.AppVersion; @@ -3161,12 +3161,12 @@ export namespace proto { class WebInfo implements IWebInfo { constructor(p?: proto.ClientPayload.IWebInfo); - public refToken: string; - public version: string; + public refToken?: (string|null); + public version?: (string|null); public webdPayload?: (proto.ClientPayload.WebInfo.IWebdPayload|null); - public webSubPlatform: proto.ClientPayload.WebInfo.WebSubPlatform; - public browser: string; - public browserVersion: string; + public webSubPlatform?: (proto.ClientPayload.WebInfo.WebSubPlatform|null); + public browser?: (string|null); + public browserVersion?: (string|null); public static create(properties?: proto.ClientPayload.IWebInfo): proto.ClientPayload.WebInfo; public static encode(m: proto.ClientPayload.IWebInfo, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.ClientPayload.WebInfo; @@ -3203,17 +3203,17 @@ export namespace proto { class WebdPayload implements IWebdPayload { constructor(p?: proto.ClientPayload.WebInfo.IWebdPayload); - public usesParticipantInKey: boolean; - public supportsStarredMessages: boolean; - public supportsDocumentMessages: boolean; - public supportsUrlMessages: boolean; - public supportsMediaRetry: boolean; - public supportsE2EImage: boolean; - public supportsE2EVideo: boolean; - public supportsE2EAudio: boolean; - public supportsE2EDocument: boolean; - public documentTypes: string; - public features: Uint8Array; + public usesParticipantInKey?: (boolean|null); + public supportsStarredMessages?: (boolean|null); + public supportsDocumentMessages?: (boolean|null); + public supportsUrlMessages?: (boolean|null); + public supportsMediaRetry?: (boolean|null); + public supportsE2EImage?: (boolean|null); + public supportsE2EVideo?: (boolean|null); + public supportsE2EAudio?: (boolean|null); + public supportsE2EDocument?: (boolean|null); + public documentTypes?: (string|null); + public features?: (Uint8Array|null); public static create(properties?: proto.ClientPayload.WebInfo.IWebdPayload): proto.ClientPayload.WebInfo.WebdPayload; public static encode(m: proto.ClientPayload.WebInfo.IWebdPayload, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.ClientPayload.WebInfo.WebdPayload; @@ -3242,7 +3242,7 @@ export namespace proto { class CommentMetadata implements ICommentMetadata { constructor(p?: proto.ICommentMetadata); public commentParentKey?: (proto.IMessageKey|null); - public replyCount: number; + public replyCount?: (number|null); public static create(properties?: proto.ICommentMetadata): proto.CommentMetadata; public static encode(m: proto.ICommentMetadata, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.CommentMetadata; @@ -3258,7 +3258,7 @@ export namespace proto { class CompanionCommitment implements ICompanionCommitment { constructor(p?: proto.ICompanionCommitment); - public hash: Uint8Array; + public hash?: (Uint8Array|null); public static create(properties?: proto.ICompanionCommitment): proto.CompanionCommitment; public static encode(m: proto.ICompanionCommitment, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.CompanionCommitment; @@ -3276,9 +3276,9 @@ export namespace proto { class CompanionEphemeralIdentity implements ICompanionEphemeralIdentity { constructor(p?: proto.ICompanionEphemeralIdentity); - public publicKey: Uint8Array; - public deviceType: proto.DeviceProps.PlatformType; - public ref: string; + public publicKey?: (Uint8Array|null); + public deviceType?: (proto.DeviceProps.PlatformType|null); + public ref?: (string|null); public static create(properties?: proto.ICompanionEphemeralIdentity): proto.CompanionEphemeralIdentity; public static encode(m: proto.ICompanionEphemeralIdentity, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.CompanionEphemeralIdentity; @@ -3296,7 +3296,7 @@ export namespace proto { class Config implements IConfig { constructor(p?: proto.IConfig); public field: { [k: string]: proto.IField }; - public version: number; + public version?: (number|null); public static create(properties?: proto.IConfig): proto.Config; public static encode(m: proto.IConfig, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Config; @@ -3369,62 +3369,62 @@ export namespace proto { class ContextInfo implements IContextInfo { constructor(p?: proto.IContextInfo); - public stanzaId: string; - public participant: string; + public stanzaId?: (string|null); + public participant?: (string|null); public quotedMessage?: (proto.IMessage|null); - public remoteJid: string; + public remoteJid?: (string|null); public mentionedJid: string[]; - public conversionSource: string; - public conversionData: Uint8Array; - public conversionDelaySeconds: number; - public forwardingScore: number; - public isForwarded: boolean; + public conversionSource?: (string|null); + public conversionData?: (Uint8Array|null); + public conversionDelaySeconds?: (number|null); + public forwardingScore?: (number|null); + public isForwarded?: (boolean|null); public quotedAd?: (proto.ContextInfo.IAdReplyInfo|null); public placeholderKey?: (proto.IMessageKey|null); - public expiration: number; - public ephemeralSettingTimestamp: (number|Long); - public ephemeralSharedSecret: Uint8Array; + public expiration?: (number|null); + public ephemeralSettingTimestamp?: (number|Long|null); + public ephemeralSharedSecret?: (Uint8Array|null); public externalAdReply?: (proto.ContextInfo.IExternalAdReplyInfo|null); - public entryPointConversionSource: string; - public entryPointConversionApp: string; - public entryPointConversionDelaySeconds: number; + public entryPointConversionSource?: (string|null); + public entryPointConversionApp?: (string|null); + public entryPointConversionDelaySeconds?: (number|null); public disappearingMode?: (proto.IDisappearingMode|null); public actionLink?: (proto.IActionLink|null); - public groupSubject: string; - public parentGroupJid: string; - public trustBannerType: string; - public trustBannerAction: number; - public isSampled: boolean; + public groupSubject?: (string|null); + public parentGroupJid?: (string|null); + public trustBannerType?: (string|null); + public trustBannerAction?: (number|null); + public isSampled?: (boolean|null); public groupMentions: proto.IGroupMention[]; public utm?: (proto.ContextInfo.IUTMInfo|null); public forwardedNewsletterMessageInfo?: (proto.ContextInfo.IForwardedNewsletterMessageInfo|null); public businessMessageForwardInfo?: (proto.ContextInfo.IBusinessMessageForwardInfo|null); - public smbClientCampaignId: string; - public smbServerCampaignId: string; + public smbClientCampaignId?: (string|null); + public smbServerCampaignId?: (string|null); public dataSharingContext?: (proto.ContextInfo.IDataSharingContext|null); - public alwaysShowAdAttribution: boolean; + public alwaysShowAdAttribution?: (boolean|null); public featureEligibilities?: (proto.ContextInfo.IFeatureEligibilities|null); - public entryPointConversionExternalSource: string; - public entryPointConversionExternalMedium: string; - public ctwaSignals: string; - public ctwaPayload: Uint8Array; + public entryPointConversionExternalSource?: (string|null); + public entryPointConversionExternalMedium?: (string|null); + public ctwaSignals?: (string|null); + public ctwaPayload?: (Uint8Array|null); public forwardedAiBotMessageInfo?: (proto.IForwardedAIBotMessageInfo|null); - public statusAttributionType: proto.ContextInfo.StatusAttributionType; + public statusAttributionType?: (proto.ContextInfo.StatusAttributionType|null); public urlTrackingMap?: (proto.IUrlTrackingMap|null); - public pairedMediaType: proto.ContextInfo.PairedMediaType; - public rankingVersion: number; + public pairedMediaType?: (proto.ContextInfo.PairedMediaType|null); + public rankingVersion?: (number|null); public memberLabel?: (proto.IMemberLabel|null); - public isQuestion: boolean; - public statusSourceType: proto.ContextInfo.StatusSourceType; + public isQuestion?: (boolean|null); + public statusSourceType?: (proto.ContextInfo.StatusSourceType|null); public statusAttributions: proto.IStatusAttribution[]; - public isGroupStatus: boolean; - public forwardOrigin: proto.ContextInfo.ForwardOrigin; + public isGroupStatus?: (boolean|null); + public forwardOrigin?: (proto.ContextInfo.ForwardOrigin|null); public questionReplyQuotedMessage?: (proto.ContextInfo.IQuestionReplyQuotedMessage|null); public statusAudienceMetadata?: (proto.ContextInfo.IStatusAudienceMetadata|null); - public nonJidMentions: number; - public quotedType: proto.ContextInfo.QuotedType; + public nonJidMentions?: (number|null); + public quotedType?: (proto.ContextInfo.QuotedType|null); public botMessageSharingInfo?: (proto.IBotMessageSharingInfo|null); - public isSpoiler: boolean; + public isSpoiler?: (boolean|null); public mediaDomainInfo?: (proto.IMediaDomainInfo|null); public partiallySelectedContent?: (proto.ContextInfo.IPartiallySelectedContent|null); public static create(properties?: proto.IContextInfo): proto.ContextInfo; @@ -3447,10 +3447,10 @@ export namespace proto { class AdReplyInfo implements IAdReplyInfo { constructor(p?: proto.ContextInfo.IAdReplyInfo); - public advertiserName: string; - public mediaType: proto.ContextInfo.AdReplyInfo.MediaType; - public jpegThumbnail: Uint8Array; - public caption: string; + public advertiserName?: (string|null); + public mediaType?: (proto.ContextInfo.AdReplyInfo.MediaType|null); + public jpegThumbnail?: (Uint8Array|null); + public caption?: (string|null); public static create(properties?: proto.ContextInfo.IAdReplyInfo): proto.ContextInfo.AdReplyInfo; public static encode(m: proto.ContextInfo.IAdReplyInfo, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.ContextInfo.AdReplyInfo; @@ -3475,7 +3475,7 @@ export namespace proto { class BusinessMessageForwardInfo implements IBusinessMessageForwardInfo { constructor(p?: proto.ContextInfo.IBusinessMessageForwardInfo); - public businessOwnerJid: string; + public businessOwnerJid?: (string|null); public static create(properties?: proto.ContextInfo.IBusinessMessageForwardInfo): proto.ContextInfo.BusinessMessageForwardInfo; public static encode(m: proto.ContextInfo.IBusinessMessageForwardInfo, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.ContextInfo.BusinessMessageForwardInfo; @@ -3494,10 +3494,10 @@ export namespace proto { class DataSharingContext implements IDataSharingContext { constructor(p?: proto.ContextInfo.IDataSharingContext); - public showMmDisclosure: boolean; - public encryptedSignalTokenConsented: string; + public showMmDisclosure?: (boolean|null); + public encryptedSignalTokenConsented?: (string|null); public parameters: proto.ContextInfo.DataSharingContext.IParameters[]; - public dataSharingFlags: number; + public dataSharingFlags?: (number|null); public static create(properties?: proto.ContextInfo.IDataSharingContext): proto.ContextInfo.DataSharingContext; public static encode(m: proto.ContextInfo.IDataSharingContext, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.ContextInfo.DataSharingContext; @@ -3524,10 +3524,10 @@ export namespace proto { class Parameters implements IParameters { constructor(p?: proto.ContextInfo.DataSharingContext.IParameters); - public key: string; - public stringData: string; - public intData: (number|Long); - public floatData: number; + public key?: (string|null); + public stringData?: (string|null); + public intData?: (number|Long|null); + public floatData?: (number|null); public contents?: (proto.ContextInfo.DataSharingContext.IParameters|null); public static create(properties?: proto.ContextInfo.DataSharingContext.IParameters): proto.ContextInfo.DataSharingContext.Parameters; public static encode(m: proto.ContextInfo.DataSharingContext.IParameters, w?: $protobuf.Writer): $protobuf.Writer; @@ -3571,33 +3571,33 @@ export namespace proto { class ExternalAdReplyInfo implements IExternalAdReplyInfo { constructor(p?: proto.ContextInfo.IExternalAdReplyInfo); - public title: string; - public body: string; - public mediaType: proto.ContextInfo.ExternalAdReplyInfo.MediaType; - public thumbnailUrl: string; - public mediaUrl: string; - public thumbnail: Uint8Array; - public sourceType: string; - public sourceId: string; - public sourceUrl: string; - public containsAutoReply: boolean; - public renderLargerThumbnail: boolean; - public showAdAttribution: boolean; - public ctwaClid: string; - public ref: string; - public clickToWhatsappCall: boolean; - public adContextPreviewDismissed: boolean; - public sourceApp: string; - public automatedGreetingMessageShown: boolean; - public greetingMessageBody: string; - public ctaPayload: string; - public disableNudge: boolean; - public originalImageUrl: string; - public automatedGreetingMessageCtaType: string; - public wtwaAdFormat: boolean; - public adType: proto.ContextInfo.ExternalAdReplyInfo.AdType; - public wtwaWebsiteUrl: string; - public adPreviewUrl: string; + public title?: (string|null); + public body?: (string|null); + public mediaType?: (proto.ContextInfo.ExternalAdReplyInfo.MediaType|null); + public thumbnailUrl?: (string|null); + public mediaUrl?: (string|null); + public thumbnail?: (Uint8Array|null); + public sourceType?: (string|null); + public sourceId?: (string|null); + public sourceUrl?: (string|null); + public containsAutoReply?: (boolean|null); + public renderLargerThumbnail?: (boolean|null); + public showAdAttribution?: (boolean|null); + public ctwaClid?: (string|null); + public ref?: (string|null); + public clickToWhatsappCall?: (boolean|null); + public adContextPreviewDismissed?: (boolean|null); + public sourceApp?: (string|null); + public automatedGreetingMessageShown?: (boolean|null); + public greetingMessageBody?: (string|null); + public ctaPayload?: (string|null); + public disableNudge?: (boolean|null); + public originalImageUrl?: (string|null); + public automatedGreetingMessageCtaType?: (string|null); + public wtwaAdFormat?: (boolean|null); + public adType?: (proto.ContextInfo.ExternalAdReplyInfo.AdType|null); + public wtwaWebsiteUrl?: (string|null); + public adPreviewUrl?: (string|null); public static create(properties?: proto.ContextInfo.IExternalAdReplyInfo): proto.ContextInfo.ExternalAdReplyInfo; public static encode(m: proto.ContextInfo.IExternalAdReplyInfo, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.ContextInfo.ExternalAdReplyInfo; @@ -3631,11 +3631,11 @@ export namespace proto { class FeatureEligibilities implements IFeatureEligibilities { constructor(p?: proto.ContextInfo.IFeatureEligibilities); - public cannotBeReactedTo: boolean; - public cannotBeRanked: boolean; - public canRequestFeedback: boolean; - public canBeReshared: boolean; - public canReceiveMultiReact: boolean; + public cannotBeReactedTo?: (boolean|null); + public cannotBeRanked?: (boolean|null); + public canRequestFeedback?: (boolean|null); + public canBeReshared?: (boolean|null); + public canReceiveMultiReact?: (boolean|null); public static create(properties?: proto.ContextInfo.IFeatureEligibilities): proto.ContextInfo.FeatureEligibilities; public static encode(m: proto.ContextInfo.IFeatureEligibilities, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.ContextInfo.FeatureEligibilities; @@ -3665,12 +3665,12 @@ export namespace proto { class ForwardedNewsletterMessageInfo implements IForwardedNewsletterMessageInfo { constructor(p?: proto.ContextInfo.IForwardedNewsletterMessageInfo); - public newsletterJid: string; - public serverMessageId: number; - public newsletterName: string; - public contentType: proto.ContextInfo.ForwardedNewsletterMessageInfo.ContentType; - public accessibilityText: string; - public profileName: string; + public newsletterJid?: (string|null); + public serverMessageId?: (number|null); + public newsletterName?: (string|null); + public contentType?: (proto.ContextInfo.ForwardedNewsletterMessageInfo.ContentType|null); + public accessibilityText?: (string|null); + public profileName?: (string|null); public static create(properties?: proto.ContextInfo.IForwardedNewsletterMessageInfo): proto.ContextInfo.ForwardedNewsletterMessageInfo; public static encode(m: proto.ContextInfo.IForwardedNewsletterMessageInfo, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.ContextInfo.ForwardedNewsletterMessageInfo; @@ -3707,7 +3707,7 @@ export namespace proto { class PartiallySelectedContent implements IPartiallySelectedContent { constructor(p?: proto.ContextInfo.IPartiallySelectedContent); - public text: string; + public text?: (string|null); public static create(properties?: proto.ContextInfo.IPartiallySelectedContent): proto.ContextInfo.PartiallySelectedContent; public static encode(m: proto.ContextInfo.IPartiallySelectedContent, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.ContextInfo.PartiallySelectedContent; @@ -3725,7 +3725,7 @@ export namespace proto { class QuestionReplyQuotedMessage implements IQuestionReplyQuotedMessage { constructor(p?: proto.ContextInfo.IQuestionReplyQuotedMessage); - public serverQuestionId: number; + public serverQuestionId?: (number|null); public quotedQuestion?: (proto.IMessage|null); public quotedResponse?: (proto.IMessage|null); public static create(properties?: proto.ContextInfo.IQuestionReplyQuotedMessage): proto.ContextInfo.QuestionReplyQuotedMessage; @@ -3758,9 +3758,9 @@ export namespace proto { class StatusAudienceMetadata implements IStatusAudienceMetadata { constructor(p?: proto.ContextInfo.IStatusAudienceMetadata); - public audienceType: proto.ContextInfo.StatusAudienceMetadata.AudienceType; - public listName: string; - public listEmoji: string; + public audienceType?: (proto.ContextInfo.StatusAudienceMetadata.AudienceType|null); + public listName?: (string|null); + public listEmoji?: (string|null); public static create(properties?: proto.ContextInfo.IStatusAudienceMetadata): proto.ContextInfo.StatusAudienceMetadata; public static encode(m: proto.ContextInfo.IStatusAudienceMetadata, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.ContextInfo.StatusAudienceMetadata; @@ -3794,8 +3794,8 @@ export namespace proto { class UTMInfo implements IUTMInfo { constructor(p?: proto.ContextInfo.IUTMInfo); - public utmSource: string; - public utmCampaign: string; + public utmSource?: (string|null); + public utmCampaign?: (string|null); public static create(properties?: proto.ContextInfo.IUTMInfo): proto.ContextInfo.UTMInfo; public static encode(m: proto.ContextInfo.IUTMInfo, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.ContextInfo.UTMInfo; @@ -3807,7 +3807,7 @@ export namespace proto { } interface IConversation { - id: string; + id?: (string|null); messages?: (proto.IHistorySyncMsg[]|null); newJid?: (string|null); oldJid?: (string|null); @@ -3865,60 +3865,60 @@ export namespace proto { class Conversation implements IConversation { constructor(p?: proto.IConversation); - public id: string; + public id?: (string|null); public messages: proto.IHistorySyncMsg[]; - public newJid: string; - public oldJid: string; - public lastMsgTimestamp: (number|Long); - public unreadCount: number; - public readOnly: boolean; - public endOfHistoryTransfer: boolean; - public ephemeralExpiration: number; - public ephemeralSettingTimestamp: (number|Long); - public endOfHistoryTransferType: proto.Conversation.EndOfHistoryTransferType; - public conversationTimestamp: (number|Long); - public name: string; - public pHash: string; - public notSpam: boolean; - public archived: boolean; + public newJid?: (string|null); + public oldJid?: (string|null); + public lastMsgTimestamp?: (number|Long|null); + public unreadCount?: (number|null); + public readOnly?: (boolean|null); + public endOfHistoryTransfer?: (boolean|null); + public ephemeralExpiration?: (number|null); + public ephemeralSettingTimestamp?: (number|Long|null); + public endOfHistoryTransferType?: (proto.Conversation.EndOfHistoryTransferType|null); + public conversationTimestamp?: (number|Long|null); + public name?: (string|null); + public pHash?: (string|null); + public notSpam?: (boolean|null); + public archived?: (boolean|null); public disappearingMode?: (proto.IDisappearingMode|null); - public unreadMentionCount: number; - public markedAsUnread: boolean; + public unreadMentionCount?: (number|null); + public markedAsUnread?: (boolean|null); public participant: proto.IGroupParticipant[]; - public tcToken: Uint8Array; - public tcTokenTimestamp: (number|Long); - public contactPrimaryIdentityKey: Uint8Array; - public pinned: number; - public muteEndTime: (number|Long); + public tcToken?: (Uint8Array|null); + public tcTokenTimestamp?: (number|Long|null); + public contactPrimaryIdentityKey?: (Uint8Array|null); + public pinned?: (number|null); + public muteEndTime?: (number|Long|null); public wallpaper?: (proto.IWallpaperSettings|null); - public mediaVisibility: proto.MediaVisibility; - public tcTokenSenderTimestamp: (number|Long); - public suspended: boolean; - public terminated: boolean; - public createdAt: (number|Long); - public createdBy: string; - public description: string; - public support: boolean; - public isParentGroup: boolean; - public parentGroupId: string; - public isDefaultSubgroup: boolean; - public displayName: string; - public pnJid: string; - public shareOwnPn: boolean; - public pnhDuplicateLidThread: boolean; - public lidJid: string; - public username: string; - public lidOriginType: string; - public commentsCount: number; - public locked: boolean; - public systemMessageToInsert: proto.PrivacySystemMessage; - public capiCreatedGroup: boolean; - public accountLid: string; - public limitSharing: boolean; - public limitSharingSettingTimestamp: (number|Long); - public limitSharingTrigger: proto.LimitSharing.TriggerType; - public limitSharingInitiatedByMe: boolean; - public maibaAiThreadEnabled: boolean; + public mediaVisibility?: (proto.MediaVisibility|null); + public tcTokenSenderTimestamp?: (number|Long|null); + public suspended?: (boolean|null); + public terminated?: (boolean|null); + public createdAt?: (number|Long|null); + public createdBy?: (string|null); + public description?: (string|null); + public support?: (boolean|null); + public isParentGroup?: (boolean|null); + public parentGroupId?: (string|null); + public isDefaultSubgroup?: (boolean|null); + public displayName?: (string|null); + public pnJid?: (string|null); + public shareOwnPn?: (boolean|null); + public pnhDuplicateLidThread?: (boolean|null); + public lidJid?: (string|null); + public username?: (string|null); + public lidOriginType?: (string|null); + public commentsCount?: (number|null); + public locked?: (boolean|null); + public systemMessageToInsert?: (proto.PrivacySystemMessage|null); + public capiCreatedGroup?: (boolean|null); + public accountLid?: (string|null); + public limitSharing?: (boolean|null); + public limitSharingSettingTimestamp?: (number|Long|null); + public limitSharingTrigger?: (proto.LimitSharing.TriggerType|null); + public limitSharingInitiatedByMe?: (boolean|null); + public maibaAiThreadEnabled?: (boolean|null); public static create(properties?: proto.IConversation): proto.Conversation; public static encode(m: proto.IConversation, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Conversation; @@ -3949,11 +3949,11 @@ export namespace proto { class DeviceCapabilities implements IDeviceCapabilities { constructor(p?: proto.IDeviceCapabilities); - public chatLockSupportLevel: proto.DeviceCapabilities.ChatLockSupportLevel; + public chatLockSupportLevel?: (proto.DeviceCapabilities.ChatLockSupportLevel|null); public lidMigration?: (proto.DeviceCapabilities.ILIDMigration|null); public businessBroadcast?: (proto.DeviceCapabilities.IBusinessBroadcast|null); public userHasAvatar?: (proto.DeviceCapabilities.IUserHasAvatar|null); - public memberNameTagPrimarySupport: proto.DeviceCapabilities.MemberNameTagPrimarySupport; + public memberNameTagPrimarySupport?: (proto.DeviceCapabilities.MemberNameTagPrimarySupport|null); public aiThread?: (proto.DeviceCapabilities.IAiThread|null); public static create(properties?: proto.IDeviceCapabilities): proto.DeviceCapabilities; public static encode(m: proto.IDeviceCapabilities, w?: $protobuf.Writer): $protobuf.Writer; @@ -3972,7 +3972,7 @@ export namespace proto { class AiThread implements IAiThread { constructor(p?: proto.DeviceCapabilities.IAiThread); - public supportLevel: proto.DeviceCapabilities.AiThread.SupportLevel; + public supportLevel?: (proto.DeviceCapabilities.AiThread.SupportLevel|null); public static create(properties?: proto.DeviceCapabilities.IAiThread): proto.DeviceCapabilities.AiThread; public static encode(m: proto.DeviceCapabilities.IAiThread, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.DeviceCapabilities.AiThread; @@ -3997,7 +3997,7 @@ export namespace proto { class BusinessBroadcast implements IBusinessBroadcast { constructor(p?: proto.DeviceCapabilities.IBusinessBroadcast); - public importListEnabled: boolean; + public importListEnabled?: (boolean|null); public static create(properties?: proto.DeviceCapabilities.IBusinessBroadcast): proto.DeviceCapabilities.BusinessBroadcast; public static encode(m: proto.DeviceCapabilities.IBusinessBroadcast, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.DeviceCapabilities.BusinessBroadcast; @@ -4019,7 +4019,7 @@ export namespace proto { class LIDMigration implements ILIDMigration { constructor(p?: proto.DeviceCapabilities.ILIDMigration); - public chatDbMigrationTimestamp: (number|Long); + public chatDbMigrationTimestamp?: (number|Long|null); public static create(properties?: proto.DeviceCapabilities.ILIDMigration): proto.DeviceCapabilities.LIDMigration; public static encode(m: proto.DeviceCapabilities.ILIDMigration, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.DeviceCapabilities.LIDMigration; @@ -4041,7 +4041,7 @@ export namespace proto { class UserHasAvatar implements IUserHasAvatar { constructor(p?: proto.DeviceCapabilities.IUserHasAvatar); - public userHasAvatar: boolean; + public userHasAvatar?: (boolean|null); public static create(properties?: proto.DeviceCapabilities.IUserHasAvatar): proto.DeviceCapabilities.UserHasAvatar; public static encode(m: proto.DeviceCapabilities.IUserHasAvatar, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.DeviceCapabilities.UserHasAvatar; @@ -4059,8 +4059,8 @@ export namespace proto { class DeviceConsistencyCodeMessage implements IDeviceConsistencyCodeMessage { constructor(p?: proto.IDeviceConsistencyCodeMessage); - public generation: number; - public signature: Uint8Array; + public generation?: (number|null); + public signature?: (Uint8Array|null); public static create(properties?: proto.IDeviceConsistencyCodeMessage): proto.DeviceConsistencyCodeMessage; public static encode(m: proto.IDeviceConsistencyCodeMessage, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.DeviceConsistencyCodeMessage; @@ -4083,13 +4083,13 @@ export namespace proto { class DeviceListMetadata implements IDeviceListMetadata { constructor(p?: proto.IDeviceListMetadata); - public senderKeyHash: Uint8Array; - public senderTimestamp: (number|Long); + public senderKeyHash?: (Uint8Array|null); + public senderTimestamp?: (number|Long|null); public senderKeyIndexes: number[]; - public senderAccountType: proto.ADVEncryptionType; - public receiverAccountType: proto.ADVEncryptionType; - public recipientKeyHash: Uint8Array; - public recipientTimestamp: (number|Long); + public senderAccountType?: (proto.ADVEncryptionType|null); + public receiverAccountType?: (proto.ADVEncryptionType|null); + public recipientKeyHash?: (Uint8Array|null); + public recipientTimestamp?: (number|Long|null); public recipientKeyIndexes: number[]; public static create(properties?: proto.IDeviceListMetadata): proto.DeviceListMetadata; public static encode(m: proto.IDeviceListMetadata, w?: $protobuf.Writer): $protobuf.Writer; @@ -4110,10 +4110,10 @@ export namespace proto { class DeviceProps implements IDeviceProps { constructor(p?: proto.IDeviceProps); - public os: string; + public os?: (string|null); public version?: (proto.DeviceProps.IAppVersion|null); - public platformType: proto.DeviceProps.PlatformType; - public requireFullSync: boolean; + public platformType?: (proto.DeviceProps.PlatformType|null); + public requireFullSync?: (boolean|null); public historySyncConfig?: (proto.DeviceProps.IHistorySyncConfig|null); public static create(properties?: proto.IDeviceProps): proto.DeviceProps; public static encode(m: proto.IDeviceProps, w?: $protobuf.Writer): $protobuf.Writer; @@ -4136,11 +4136,11 @@ export namespace proto { class AppVersion implements IAppVersion { constructor(p?: proto.DeviceProps.IAppVersion); - public primary: number; - public secondary: number; - public tertiary: number; - public quaternary: number; - public quinary: number; + public primary?: (number|null); + public secondary?: (number|null); + public tertiary?: (number|null); + public quaternary?: (number|null); + public quinary?: (number|null); public static create(properties?: proto.DeviceProps.IAppVersion): proto.DeviceProps.AppVersion; public static encode(m: proto.DeviceProps.IAppVersion, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.DeviceProps.AppVersion; @@ -4175,26 +4175,26 @@ export namespace proto { class HistorySyncConfig implements IHistorySyncConfig { constructor(p?: proto.DeviceProps.IHistorySyncConfig); - public fullSyncDaysLimit: number; - public fullSyncSizeMbLimit: number; - public storageQuotaMb: number; - public inlineInitialPayloadInE2EeMsg: boolean; - public recentSyncDaysLimit: number; - public supportCallLogHistory: boolean; - public supportBotUserAgentChatHistory: boolean; - public supportCagReactionsAndPolls: boolean; - public supportBizHostedMsg: boolean; - public supportRecentSyncChunkMessageCountTuning: boolean; - public supportHostedGroupMsg: boolean; - public supportFbidBotChatHistory: boolean; - public supportAddOnHistorySyncMigration: boolean; - public supportMessageAssociation: boolean; - public supportGroupHistory: boolean; - public onDemandReady: boolean; - public supportGuestChat: boolean; - public completeOnDemandReady: boolean; - public thumbnailSyncDaysLimit: number; - public initialSyncMaxMessagesPerChat: number; + public fullSyncDaysLimit?: (number|null); + public fullSyncSizeMbLimit?: (number|null); + public storageQuotaMb?: (number|null); + public inlineInitialPayloadInE2EeMsg?: (boolean|null); + public recentSyncDaysLimit?: (number|null); + public supportCallLogHistory?: (boolean|null); + public supportBotUserAgentChatHistory?: (boolean|null); + public supportCagReactionsAndPolls?: (boolean|null); + public supportBizHostedMsg?: (boolean|null); + public supportRecentSyncChunkMessageCountTuning?: (boolean|null); + public supportHostedGroupMsg?: (boolean|null); + public supportFbidBotChatHistory?: (boolean|null); + public supportAddOnHistorySyncMigration?: (boolean|null); + public supportMessageAssociation?: (boolean|null); + public supportGroupHistory?: (boolean|null); + public onDemandReady?: (boolean|null); + public supportGuestChat?: (boolean|null); + public completeOnDemandReady?: (boolean|null); + public thumbnailSyncDaysLimit?: (number|null); + public initialSyncMaxMessagesPerChat?: (number|null); public static create(properties?: proto.DeviceProps.IHistorySyncConfig): proto.DeviceProps.HistorySyncConfig; public static encode(m: proto.DeviceProps.IHistorySyncConfig, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.DeviceProps.HistorySyncConfig; @@ -4242,10 +4242,10 @@ export namespace proto { class DisappearingMode implements IDisappearingMode { constructor(p?: proto.IDisappearingMode); - public initiator: proto.DisappearingMode.Initiator; - public trigger: proto.DisappearingMode.Trigger; - public initiatorDeviceJid: string; - public initiatedByMe: boolean; + public initiator?: (proto.DisappearingMode.Initiator|null); + public trigger?: (proto.DisappearingMode.Trigger|null); + public initiatorDeviceJid?: (string|null); + public initiatedByMe?: (boolean|null); public static create(properties?: proto.IDisappearingMode): proto.DisappearingMode; public static encode(m: proto.IDisappearingMode, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.DisappearingMode; @@ -4300,7 +4300,7 @@ export namespace proto { class EmbeddedMessage implements IEmbeddedMessage { constructor(p?: proto.IEmbeddedMessage); - public stanzaId: string; + public stanzaId?: (string|null); public message?: (proto.IMessage|null); public static create(properties?: proto.IEmbeddedMessage): proto.EmbeddedMessage; public static encode(m: proto.IEmbeddedMessage, w?: $protobuf.Writer): $protobuf.Writer; @@ -4330,20 +4330,20 @@ export namespace proto { class EmbeddedMusic implements IEmbeddedMusic { constructor(p?: proto.IEmbeddedMusic); - public musicContentMediaId: string; - public songId: string; - public author: string; - public title: string; - public artworkDirectPath: string; - public artworkSha256: Uint8Array; - public artworkEncSha256: Uint8Array; - public artistAttribution: string; - public countryBlocklist: Uint8Array; - public isExplicit: boolean; - public artworkMediaKey: Uint8Array; - public musicSongStartTimeInMs: (number|Long); - public derivedContentStartTimeInMs: (number|Long); - public overlapDurationInMs: (number|Long); + public musicContentMediaId?: (string|null); + public songId?: (string|null); + public author?: (string|null); + public title?: (string|null); + public artworkDirectPath?: (string|null); + public artworkSha256?: (Uint8Array|null); + public artworkEncSha256?: (Uint8Array|null); + public artistAttribution?: (string|null); + public countryBlocklist?: (Uint8Array|null); + public isExplicit?: (boolean|null); + public artworkMediaKey?: (Uint8Array|null); + public musicSongStartTimeInMs?: (number|Long|null); + public derivedContentStartTimeInMs?: (number|Long|null); + public overlapDurationInMs?: (number|Long|null); public static create(properties?: proto.IEmbeddedMusic): proto.EmbeddedMusic; public static encode(m: proto.IEmbeddedMusic, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.EmbeddedMusic; @@ -4360,8 +4360,8 @@ export namespace proto { class EncryptedPairingRequest implements IEncryptedPairingRequest { constructor(p?: proto.IEncryptedPairingRequest); - public encryptedPayload: Uint8Array; - public iv: Uint8Array; + public encryptedPayload?: (Uint8Array|null); + public iv?: (Uint8Array|null); public static create(properties?: proto.IEncryptedPairingRequest): proto.EncryptedPairingRequest; public static encode(m: proto.IEncryptedPairingRequest, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.EncryptedPairingRequest; @@ -4378,8 +4378,8 @@ export namespace proto { class EphemeralSetting implements IEphemeralSetting { constructor(p?: proto.IEphemeralSetting); - public duration: number; - public timestamp: (number|Long); + public duration?: (number|null); + public timestamp?: (number|Long|null); public static create(properties?: proto.IEphemeralSetting): proto.EphemeralSetting; public static encode(m: proto.IEphemeralSetting, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.EphemeralSetting; @@ -4395,7 +4395,7 @@ export namespace proto { class EventAdditionalMetadata implements IEventAdditionalMetadata { constructor(p?: proto.IEventAdditionalMetadata); - public isStale: boolean; + public isStale?: (boolean|null); public static create(properties?: proto.IEventAdditionalMetadata): proto.EventAdditionalMetadata; public static encode(m: proto.IEventAdditionalMetadata, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.EventAdditionalMetadata; @@ -4415,9 +4415,9 @@ export namespace proto { class EventResponse implements IEventResponse { constructor(p?: proto.IEventResponse); public eventResponseMessageKey?: (proto.IMessageKey|null); - public timestampMs: (number|Long); + public timestampMs?: (number|Long|null); public eventResponseMessage?: (proto.Message.IEventResponseMessage|null); - public unread: boolean; + public unread?: (boolean|null); public static create(properties?: proto.IEventResponse): proto.EventResponse; public static encode(m: proto.IEventResponse, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.EventResponse; @@ -4434,8 +4434,8 @@ export namespace proto { class ExitCode implements IExitCode { constructor(p?: proto.IExitCode); - public code: (number|Long); - public text: string; + public code?: (number|Long|null); + public text?: (string|null); public static create(properties?: proto.IExitCode): proto.ExitCode; public static encode(m: proto.IExitCode, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.ExitCode; @@ -4456,12 +4456,12 @@ export namespace proto { class ExternalBlobReference implements IExternalBlobReference { constructor(p?: proto.IExternalBlobReference); - public mediaKey: Uint8Array; - public directPath: string; - public handle: string; - public fileSizeBytes: (number|Long); - public fileSha256: Uint8Array; - public fileEncSha256: Uint8Array; + public mediaKey?: (Uint8Array|null); + public directPath?: (string|null); + public handle?: (string|null); + public fileSizeBytes?: (number|Long|null); + public fileSha256?: (Uint8Array|null); + public fileEncSha256?: (Uint8Array|null); public static create(properties?: proto.IExternalBlobReference): proto.ExternalBlobReference; public static encode(m: proto.IExternalBlobReference, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.ExternalBlobReference; @@ -4481,10 +4481,10 @@ export namespace proto { class Field implements IField { constructor(p?: proto.IField); - public minVersion: number; - public maxVersion: number; - public notReportableMinVersion: number; - public isMessage: boolean; + public minVersion?: (number|null); + public maxVersion?: (number|null); + public notReportableMinVersion?: (number|null); + public isMessage?: (boolean|null); public subfield: { [k: string]: proto.IField }; public static create(properties?: proto.IField): proto.Field; public static encode(m: proto.IField, w?: $protobuf.Writer): $protobuf.Writer; @@ -4503,9 +4503,9 @@ export namespace proto { class ForwardedAIBotMessageInfo implements IForwardedAIBotMessageInfo { constructor(p?: proto.IForwardedAIBotMessageInfo); - public botName: string; - public botJid: string; - public creatorName: string; + public botName?: (string|null); + public botJid?: (string|null); + public creatorName?: (string|null); public static create(properties?: proto.IForwardedAIBotMessageInfo): proto.ForwardedAIBotMessageInfo; public static encode(m: proto.IForwardedAIBotMessageInfo, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.ForwardedAIBotMessageInfo; @@ -4541,25 +4541,25 @@ export namespace proto { class GlobalSettings implements IGlobalSettings { constructor(p?: proto.IGlobalSettings); public lightThemeWallpaper?: (proto.IWallpaperSettings|null); - public mediaVisibility: proto.MediaVisibility; + public mediaVisibility?: (proto.MediaVisibility|null); public darkThemeWallpaper?: (proto.IWallpaperSettings|null); public autoDownloadWiFi?: (proto.IAutoDownloadSettings|null); public autoDownloadCellular?: (proto.IAutoDownloadSettings|null); public autoDownloadRoaming?: (proto.IAutoDownloadSettings|null); - public showIndividualNotificationsPreview: boolean; - public showGroupNotificationsPreview: boolean; - public disappearingModeDuration: number; - public disappearingModeTimestamp: (number|Long); + public showIndividualNotificationsPreview?: (boolean|null); + public showGroupNotificationsPreview?: (boolean|null); + public disappearingModeDuration?: (number|null); + public disappearingModeTimestamp?: (number|Long|null); public avatarUserSettings?: (proto.IAvatarUserSettings|null); - public fontSize: number; - public securityNotifications: boolean; - public autoUnarchiveChats: boolean; - public videoQualityMode: number; - public photoQualityMode: number; + public fontSize?: (number|null); + public securityNotifications?: (boolean|null); + public autoUnarchiveChats?: (boolean|null); + public videoQualityMode?: (number|null); + public photoQualityMode?: (number|null); public individualNotificationSettings?: (proto.INotificationSettings|null); public groupNotificationSettings?: (proto.INotificationSettings|null); public chatLockSettings?: (proto.IChatLockSettings|null); - public chatDbLidMigrationTimestamp: (number|Long); + public chatDbLidMigrationTimestamp?: (number|Long|null); public static create(properties?: proto.IGlobalSettings): proto.GlobalSettings; public static encode(m: proto.IGlobalSettings, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.GlobalSettings; @@ -4577,7 +4577,7 @@ export namespace proto { class GroupHistoryBundleInfo implements IGroupHistoryBundleInfo { constructor(p?: proto.IGroupHistoryBundleInfo); public deprecatedMessageHistoryBundle?: (proto.Message.IMessageHistoryBundle|null); - public processState: proto.GroupHistoryBundleInfo.ProcessState; + public processState?: (proto.GroupHistoryBundleInfo.ProcessState|null); public static create(properties?: proto.IGroupHistoryBundleInfo): proto.GroupHistoryBundleInfo; public static encode(m: proto.IGroupHistoryBundleInfo, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.GroupHistoryBundleInfo; @@ -4606,7 +4606,7 @@ export namespace proto { class GroupHistoryIndividualMessageInfo implements IGroupHistoryIndividualMessageInfo { constructor(p?: proto.IGroupHistoryIndividualMessageInfo); public bundleMessageKey?: (proto.IMessageKey|null); - public editedAfterReceivedAsHistory: boolean; + public editedAfterReceivedAsHistory?: (boolean|null); public static create(properties?: proto.IGroupHistoryIndividualMessageInfo): proto.GroupHistoryIndividualMessageInfo; public static encode(m: proto.IGroupHistoryIndividualMessageInfo, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.GroupHistoryIndividualMessageInfo; @@ -4623,8 +4623,8 @@ export namespace proto { class GroupMention implements IGroupMention { constructor(p?: proto.IGroupMention); - public groupJid: string; - public groupSubject: string; + public groupJid?: (string|null); + public groupSubject?: (string|null); public static create(properties?: proto.IGroupMention): proto.GroupMention; public static encode(m: proto.IGroupMention, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.GroupMention; @@ -4635,15 +4635,15 @@ export namespace proto { } interface IGroupParticipant { - userJid: string; + userJid?: (string|null); rank?: (proto.GroupParticipant.Rank|null); memberLabel?: (proto.IMemberLabel|null); } class GroupParticipant implements IGroupParticipant { constructor(p?: proto.IGroupParticipant); - public userJid: string; - public rank: proto.GroupParticipant.Rank; + public userJid?: (string|null); + public rank?: (proto.GroupParticipant.Rank|null); public memberLabel?: (proto.IMemberLabel|null); public static create(properties?: proto.IGroupParticipant): proto.GroupParticipant; public static encode(m: proto.IGroupParticipant, w?: $protobuf.Writer): $protobuf.Writer; @@ -4693,9 +4693,9 @@ export namespace proto { class ClientFinish implements IClientFinish { constructor(p?: proto.HandshakeMessage.IClientFinish); - public static: Uint8Array; - public payload: Uint8Array; - public extendedCiphertext: Uint8Array; + public static?: (Uint8Array|null); + public payload?: (Uint8Array|null); + public extendedCiphertext?: (Uint8Array|null); public static create(properties?: proto.HandshakeMessage.IClientFinish): proto.HandshakeMessage.ClientFinish; public static encode(m: proto.HandshakeMessage.IClientFinish, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.HandshakeMessage.ClientFinish; @@ -4715,11 +4715,11 @@ export namespace proto { class ClientHello implements IClientHello { constructor(p?: proto.HandshakeMessage.IClientHello); - public ephemeral: Uint8Array; - public static: Uint8Array; - public payload: Uint8Array; - public useExtended: boolean; - public extendedCiphertext: Uint8Array; + public ephemeral?: (Uint8Array|null); + public static?: (Uint8Array|null); + public payload?: (Uint8Array|null); + public useExtended?: (boolean|null); + public extendedCiphertext?: (Uint8Array|null); public static create(properties?: proto.HandshakeMessage.IClientHello): proto.HandshakeMessage.ClientHello; public static encode(m: proto.HandshakeMessage.IClientHello, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.HandshakeMessage.ClientHello; @@ -4738,10 +4738,10 @@ export namespace proto { class ServerHello implements IServerHello { constructor(p?: proto.HandshakeMessage.IServerHello); - public ephemeral: Uint8Array; - public static: Uint8Array; - public payload: Uint8Array; - public extendedStatic: Uint8Array; + public ephemeral?: (Uint8Array|null); + public static?: (Uint8Array|null); + public payload?: (Uint8Array|null); + public extendedStatic?: (Uint8Array|null); public static create(properties?: proto.HandshakeMessage.IServerHello): proto.HandshakeMessage.ServerHello; public static encode(m: proto.HandshakeMessage.IServerHello, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.HandshakeMessage.ServerHello; @@ -4753,7 +4753,7 @@ export namespace proto { } interface IHistorySync { - syncType: proto.HistorySync.HistorySyncType; + syncType?: (proto.HistorySync.HistorySyncType|null); conversations?: (proto.IConversation[]|null); statusV3Messages?: (proto.IWebMessageInfo[]|null); chunkOrder?: (number|null); @@ -4774,22 +4774,22 @@ export namespace proto { class HistorySync implements IHistorySync { constructor(p?: proto.IHistorySync); - public syncType: proto.HistorySync.HistorySyncType; + public syncType?: (proto.HistorySync.HistorySyncType|null); public conversations: proto.IConversation[]; public statusV3Messages: proto.IWebMessageInfo[]; - public chunkOrder: number; - public progress: number; + public chunkOrder?: (number|null); + public progress?: (number|null); public pushnames: proto.IPushname[]; public globalSettings?: (proto.IGlobalSettings|null); - public threadIdUserSecret: Uint8Array; - public threadDsTimeframeOffset: number; + public threadIdUserSecret?: (Uint8Array|null); + public threadDsTimeframeOffset?: (number|null); public recentStickers: proto.IStickerMetadata[]; public pastParticipants: proto.IPastParticipants[]; public callLogRecords: proto.ICallLogRecord[]; - public aiWaitListState: proto.HistorySync.BotAIWaitListState; + public aiWaitListState?: (proto.HistorySync.BotAIWaitListState|null); public phoneNumberToLidMappings: proto.IPhoneNumberToLIDMapping[]; - public companionMetaNonce: string; - public shareableChatIdentifierEncryptionKey: Uint8Array; + public companionMetaNonce?: (string|null); + public shareableChatIdentifierEncryptionKey?: (Uint8Array|null); public accounts: proto.IAccount[]; public static create(properties?: proto.IHistorySync): proto.HistorySync; public static encode(m: proto.IHistorySync, w?: $protobuf.Writer): $protobuf.Writer; @@ -4826,7 +4826,7 @@ export namespace proto { class HistorySyncMsg implements IHistorySyncMsg { constructor(p?: proto.IHistorySyncMsg); public message?: (proto.IWebMessageInfo|null); - public msgOrderId: (number|Long); + public msgOrderId?: (number|Long|null); public static create(properties?: proto.IHistorySyncMsg): proto.HistorySyncMsg; public static encode(m: proto.IHistorySyncMsg, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.HistorySyncMsg; @@ -4845,7 +4845,7 @@ export namespace proto { class HydratedTemplateButton implements IHydratedTemplateButton { constructor(p?: proto.IHydratedTemplateButton); - public index: number; + public index?: (number|null); public quickReplyButton?: (proto.HydratedTemplateButton.IHydratedQuickReplyButton|null); public urlButton?: (proto.HydratedTemplateButton.IHydratedURLButton|null); public callButton?: (proto.HydratedTemplateButton.IHydratedCallButton|null); @@ -4868,8 +4868,8 @@ export namespace proto { class HydratedCallButton implements IHydratedCallButton { constructor(p?: proto.HydratedTemplateButton.IHydratedCallButton); - public displayText: string; - public phoneNumber: string; + public displayText?: (string|null); + public phoneNumber?: (string|null); public static create(properties?: proto.HydratedTemplateButton.IHydratedCallButton): proto.HydratedTemplateButton.HydratedCallButton; public static encode(m: proto.HydratedTemplateButton.IHydratedCallButton, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.HydratedTemplateButton.HydratedCallButton; @@ -4886,8 +4886,8 @@ export namespace proto { class HydratedQuickReplyButton implements IHydratedQuickReplyButton { constructor(p?: proto.HydratedTemplateButton.IHydratedQuickReplyButton); - public displayText: string; - public id: string; + public displayText?: (string|null); + public id?: (string|null); public static create(properties?: proto.HydratedTemplateButton.IHydratedQuickReplyButton): proto.HydratedTemplateButton.HydratedQuickReplyButton; public static encode(m: proto.HydratedTemplateButton.IHydratedQuickReplyButton, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.HydratedTemplateButton.HydratedQuickReplyButton; @@ -4906,10 +4906,10 @@ export namespace proto { class HydratedURLButton implements IHydratedURLButton { constructor(p?: proto.HydratedTemplateButton.IHydratedURLButton); - public displayText: string; - public url: string; - public consentedUsersUrl: string; - public webviewPresentation: proto.HydratedTemplateButton.HydratedURLButton.WebviewPresentationType; + public displayText?: (string|null); + public url?: (string|null); + public consentedUsersUrl?: (string|null); + public webviewPresentation?: (proto.HydratedTemplateButton.HydratedURLButton.WebviewPresentationType|null); public static create(properties?: proto.HydratedTemplateButton.IHydratedURLButton): proto.HydratedTemplateButton.HydratedURLButton; public static encode(m: proto.HydratedTemplateButton.IHydratedURLButton, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.HydratedTemplateButton.HydratedURLButton; @@ -4936,8 +4936,8 @@ export namespace proto { class IdentityKeyPairStructure implements IIdentityKeyPairStructure { constructor(p?: proto.IIdentityKeyPairStructure); - public publicKey: Uint8Array; - public privateKey: Uint8Array; + public publicKey?: (Uint8Array|null); + public privateKey?: (Uint8Array|null); public static create(properties?: proto.IIdentityKeyPairStructure): proto.IdentityKeyPairStructure; public static encode(m: proto.IIdentityKeyPairStructure, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.IdentityKeyPairStructure; @@ -4970,24 +4970,24 @@ export namespace proto { class InThreadSurveyMetadata implements IInThreadSurveyMetadata { constructor(p?: proto.IInThreadSurveyMetadata); - public tessaSessionId: string; - public simonSessionId: string; - public simonSurveyId: string; - public tessaRootId: string; - public requestId: string; - public tessaEvent: string; - public invitationHeaderText: string; - public invitationBodyText: string; - public invitationCtaText: string; - public invitationCtaUrl: string; - public surveyTitle: string; + public tessaSessionId?: (string|null); + public simonSessionId?: (string|null); + public simonSurveyId?: (string|null); + public tessaRootId?: (string|null); + public requestId?: (string|null); + public tessaEvent?: (string|null); + public invitationHeaderText?: (string|null); + public invitationBodyText?: (string|null); + public invitationCtaText?: (string|null); + public invitationCtaUrl?: (string|null); + public surveyTitle?: (string|null); public questions: proto.InThreadSurveyMetadata.IInThreadSurveyQuestion[]; - public surveyContinueButtonText: string; - public surveySubmitButtonText: string; - public privacyStatementFull: string; + public surveyContinueButtonText?: (string|null); + public surveySubmitButtonText?: (string|null); + public privacyStatementFull?: (string|null); public privacyStatementParts: proto.InThreadSurveyMetadata.IInThreadSurveyPrivacyStatementPart[]; - public feedbackToastText: string; - public startQuestionIndex: number; + public feedbackToastText?: (string|null); + public startQuestionIndex?: (number|null); public static create(properties?: proto.IInThreadSurveyMetadata): proto.InThreadSurveyMetadata; public static encode(m: proto.IInThreadSurveyMetadata, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.InThreadSurveyMetadata; @@ -5007,9 +5007,9 @@ export namespace proto { class InThreadSurveyOption implements IInThreadSurveyOption { constructor(p?: proto.InThreadSurveyMetadata.IInThreadSurveyOption); - public stringValue: string; - public numericValue: number; - public textTranslated: string; + public stringValue?: (string|null); + public numericValue?: (number|null); + public textTranslated?: (string|null); public static create(properties?: proto.InThreadSurveyMetadata.IInThreadSurveyOption): proto.InThreadSurveyMetadata.InThreadSurveyOption; public static encode(m: proto.InThreadSurveyMetadata.IInThreadSurveyOption, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.InThreadSurveyMetadata.InThreadSurveyOption; @@ -5026,8 +5026,8 @@ export namespace proto { class InThreadSurveyPrivacyStatementPart implements IInThreadSurveyPrivacyStatementPart { constructor(p?: proto.InThreadSurveyMetadata.IInThreadSurveyPrivacyStatementPart); - public text: string; - public url: string; + public text?: (string|null); + public url?: (string|null); public static create(properties?: proto.InThreadSurveyMetadata.IInThreadSurveyPrivacyStatementPart): proto.InThreadSurveyMetadata.InThreadSurveyPrivacyStatementPart; public static encode(m: proto.InThreadSurveyMetadata.IInThreadSurveyPrivacyStatementPart, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.InThreadSurveyMetadata.InThreadSurveyPrivacyStatementPart; @@ -5045,8 +5045,8 @@ export namespace proto { class InThreadSurveyQuestion implements IInThreadSurveyQuestion { constructor(p?: proto.InThreadSurveyMetadata.IInThreadSurveyQuestion); - public questionText: string; - public questionId: string; + public questionText?: (string|null); + public questionId?: (string|null); public questionOptions: proto.InThreadSurveyMetadata.IInThreadSurveyOption[]; public static create(properties?: proto.InThreadSurveyMetadata.IInThreadSurveyQuestion): proto.InThreadSurveyMetadata.InThreadSurveyQuestion; public static encode(m: proto.InThreadSurveyMetadata.IInThreadSurveyQuestion, w?: $protobuf.Writer): $protobuf.Writer; @@ -5072,9 +5072,9 @@ export namespace proto { class InteractiveAnnotation implements IInteractiveAnnotation { constructor(p?: proto.IInteractiveAnnotation); public polygonVertices: proto.IPoint[]; - public shouldSkipConfirmation: boolean; + public shouldSkipConfirmation?: (boolean|null); public embeddedContent?: (proto.IEmbeddedContent|null); - public statusLinkType: proto.InteractiveAnnotation.StatusLinkType; + public statusLinkType?: (proto.InteractiveAnnotation.StatusLinkType|null); public location?: (proto.ILocation|null); public newsletter?: (proto.ContextInfo.IForwardedNewsletterMessageInfo|null); public embeddedAction?: (boolean|null); @@ -5104,7 +5104,7 @@ export namespace proto { class InteractiveMessageAdditionalMetadata implements IInteractiveMessageAdditionalMetadata { constructor(p?: proto.IInteractiveMessageAdditionalMetadata); - public isGalaxyFlowCompleted: boolean; + public isGalaxyFlowCompleted?: (boolean|null); public static create(properties?: proto.IInteractiveMessageAdditionalMetadata): proto.InteractiveMessageAdditionalMetadata; public static encode(m: proto.IInteractiveMessageAdditionalMetadata, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.InteractiveMessageAdditionalMetadata; @@ -5125,12 +5125,12 @@ export namespace proto { class KeepInChat implements IKeepInChat { constructor(p?: proto.IKeepInChat); - public keepType: proto.KeepType; - public serverTimestamp: (number|Long); + public keepType?: (proto.KeepType|null); + public serverTimestamp?: (number|Long|null); public key?: (proto.IMessageKey|null); - public deviceJid: string; - public clientTimestampMs: (number|Long); - public serverTimestampMs: (number|Long); + public deviceJid?: (string|null); + public clientTimestampMs?: (number|Long|null); + public serverTimestampMs?: (number|Long|null); public static create(properties?: proto.IKeepInChat): proto.KeepInChat; public static encode(m: proto.IKeepInChat, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.KeepInChat; @@ -5156,11 +5156,11 @@ export namespace proto { class KeyExchangeMessage implements IKeyExchangeMessage { constructor(p?: proto.IKeyExchangeMessage); - public id: number; - public baseKey: Uint8Array; - public ratchetKey: Uint8Array; - public identityKey: Uint8Array; - public baseKeySignature: Uint8Array; + public id?: (number|null); + public baseKey?: (Uint8Array|null); + public ratchetKey?: (Uint8Array|null); + public identityKey?: (Uint8Array|null); + public baseKeySignature?: (Uint8Array|null); public static create(properties?: proto.IKeyExchangeMessage): proto.KeyExchangeMessage; public static encode(m: proto.IKeyExchangeMessage, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.KeyExchangeMessage; @@ -5176,7 +5176,7 @@ export namespace proto { class KeyId implements IKeyId { constructor(p?: proto.IKeyId); - public id: Uint8Array; + public id?: (Uint8Array|null); public static create(properties?: proto.IKeyId): proto.KeyId; public static encode(m: proto.IKeyId, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.KeyId; @@ -5187,16 +5187,16 @@ export namespace proto { } interface ILIDMigrationMapping { - pn: (number|Long); - assignedLid: (number|Long); + pn?: (number|Long|null); + assignedLid?: (number|Long|null); latestLid?: (number|Long|null); } class LIDMigrationMapping implements ILIDMigrationMapping { constructor(p?: proto.ILIDMigrationMapping); - public pn: (number|Long); - public assignedLid: (number|Long); - public latestLid: (number|Long); + public pn?: (number|Long|null); + public assignedLid?: (number|Long|null); + public latestLid?: (number|Long|null); public static create(properties?: proto.ILIDMigrationMapping): proto.LIDMigrationMapping; public static encode(m: proto.ILIDMigrationMapping, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.LIDMigrationMapping; @@ -5212,7 +5212,7 @@ export namespace proto { class LIDMigrationMappingSyncMessage implements ILIDMigrationMappingSyncMessage { constructor(p?: proto.ILIDMigrationMappingSyncMessage); - public encodedMappingPayload: Uint8Array; + public encodedMappingPayload?: (Uint8Array|null); public static create(properties?: proto.ILIDMigrationMappingSyncMessage): proto.LIDMigrationMappingSyncMessage; public static encode(m: proto.ILIDMigrationMappingSyncMessage, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.LIDMigrationMappingSyncMessage; @@ -5230,7 +5230,7 @@ export namespace proto { class LIDMigrationMappingSyncPayload implements ILIDMigrationMappingSyncPayload { constructor(p?: proto.ILIDMigrationMappingSyncPayload); public pnToLidMappings: proto.ILIDMigrationMapping[]; - public chatDbMigrationTimestamp: (number|Long); + public chatDbMigrationTimestamp?: (number|Long|null); public static create(properties?: proto.ILIDMigrationMappingSyncPayload): proto.LIDMigrationMappingSyncPayload; public static encode(m: proto.ILIDMigrationMappingSyncPayload, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.LIDMigrationMappingSyncPayload; @@ -5267,10 +5267,10 @@ export namespace proto { class LimitSharing implements ILimitSharing { constructor(p?: proto.ILimitSharing); - public sharingLimited: boolean; - public trigger: proto.LimitSharing.TriggerType; - public limitSharingSettingTimestamp: (number|Long); - public initiatedByMe: boolean; + public sharingLimited?: (boolean|null); + public trigger?: (proto.LimitSharing.TriggerType|null); + public limitSharingSettingTimestamp?: (number|Long|null); + public initiatedByMe?: (boolean|null); public static create(properties?: proto.ILimitSharing): proto.LimitSharing; public static encode(m: proto.ILimitSharing, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.LimitSharing; @@ -5298,9 +5298,9 @@ export namespace proto { class LocalizedName implements ILocalizedName { constructor(p?: proto.ILocalizedName); - public lg: string; - public lc: string; - public verifiedName: string; + public lg?: (string|null); + public lc?: (string|null); + public verifiedName?: (string|null); public static create(properties?: proto.ILocalizedName): proto.LocalizedName; public static encode(m: proto.ILocalizedName, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.LocalizedName; @@ -5318,9 +5318,9 @@ export namespace proto { class Location implements ILocation { constructor(p?: proto.ILocation); - public degreesLatitude: number; - public degreesLongitude: number; - public name: string; + public degreesLatitude?: (number|null); + public degreesLongitude?: (number|null); + public name?: (string|null); public static create(properties?: proto.ILocation): proto.Location; public static encode(m: proto.ILocation, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Location; @@ -5336,7 +5336,7 @@ export namespace proto { class MediaData implements IMediaData { constructor(p?: proto.IMediaData); - public localPath: string; + public localPath?: (string|null); public static create(properties?: proto.IMediaData): proto.MediaData; public static encode(m: proto.IMediaData, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.MediaData; @@ -5353,8 +5353,8 @@ export namespace proto { class MediaDomainInfo implements IMediaDomainInfo { constructor(p?: proto.IMediaDomainInfo); - public mediaKeyDomain: proto.MediaKeyDomain; - public e2EeMediaKey: Uint8Array; + public mediaKeyDomain?: (proto.MediaKeyDomain|null); + public e2EeMediaKey?: (Uint8Array|null); public static create(properties?: proto.IMediaDomainInfo): proto.MediaDomainInfo; public static encode(m: proto.IMediaDomainInfo, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.MediaDomainInfo; @@ -5378,9 +5378,9 @@ export namespace proto { class MediaNotifyMessage implements IMediaNotifyMessage { constructor(p?: proto.IMediaNotifyMessage); - public expressPathUrl: string; - public fileEncSha256: Uint8Array; - public fileLength: (number|Long); + public expressPathUrl?: (string|null); + public fileEncSha256?: (Uint8Array|null); + public fileLength?: (number|Long|null); public static create(properties?: proto.IMediaNotifyMessage): proto.MediaNotifyMessage; public static encode(m: proto.IMediaNotifyMessage, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.MediaNotifyMessage; @@ -5399,10 +5399,10 @@ export namespace proto { class MediaRetryNotification implements IMediaRetryNotification { constructor(p?: proto.IMediaRetryNotification); - public stanzaId: string; - public directPath: string; - public result: proto.MediaRetryNotification.ResultType; - public messageSecret: Uint8Array; + public stanzaId?: (string|null); + public directPath?: (string|null); + public result?: (proto.MediaRetryNotification.ResultType|null); + public messageSecret?: (Uint8Array|null); public static create(properties?: proto.IMediaRetryNotification): proto.MediaRetryNotification; public static encode(m: proto.IMediaRetryNotification, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.MediaRetryNotification; @@ -5435,8 +5435,8 @@ export namespace proto { class MemberLabel implements IMemberLabel { constructor(p?: proto.IMemberLabel); - public label: string; - public labelTimestamp: (number|Long); + public label?: (string|null); + public labelTimestamp?: (number|Long|null); public static create(properties?: proto.IMemberLabel): proto.MemberLabel; public static encode(m: proto.IMemberLabel, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.MemberLabel; @@ -5550,7 +5550,7 @@ export namespace proto { class Message implements IMessage { constructor(p?: proto.IMessage); - public conversation: string; + public conversation?: (string|null); public senderKeyDistributionMessage?: (proto.Message.ISenderKeyDistributionMessage|null); public imageMessage?: (proto.Message.IImageMessage|null); public contactMessage?: (proto.Message.IContactMessage|null); @@ -5668,8 +5668,8 @@ export namespace proto { class AlbumMessage implements IAlbumMessage { constructor(p?: proto.Message.IAlbumMessage); - public expectedImageCount: number; - public expectedVideoCount: number; + public expectedImageCount?: (number|null); + public expectedVideoCount?: (number|null); public contextInfo?: (proto.IContextInfo|null); public static create(properties?: proto.Message.IAlbumMessage): proto.Message.AlbumMessage; public static encode(m: proto.Message.IAlbumMessage, w?: $protobuf.Writer): $protobuf.Writer; @@ -5688,7 +5688,7 @@ export namespace proto { class AppStateFatalExceptionNotification implements IAppStateFatalExceptionNotification { constructor(p?: proto.Message.IAppStateFatalExceptionNotification); public collectionNames: string[]; - public timestamp: (number|Long); + public timestamp?: (number|Long|null); public static create(properties?: proto.Message.IAppStateFatalExceptionNotification): proto.Message.AppStateFatalExceptionNotification; public static encode(m: proto.Message.IAppStateFatalExceptionNotification, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.AppStateFatalExceptionNotification; @@ -5724,9 +5724,9 @@ export namespace proto { class AppStateSyncKeyData implements IAppStateSyncKeyData { constructor(p?: proto.Message.IAppStateSyncKeyData); - public keyData: Uint8Array; + public keyData?: (Uint8Array|null); public fingerprint?: (proto.Message.IAppStateSyncKeyFingerprint|null); - public timestamp: (number|Long); + public timestamp?: (number|Long|null); public static create(properties?: proto.Message.IAppStateSyncKeyData): proto.Message.AppStateSyncKeyData; public static encode(m: proto.Message.IAppStateSyncKeyData, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.AppStateSyncKeyData; @@ -5744,8 +5744,8 @@ export namespace proto { class AppStateSyncKeyFingerprint implements IAppStateSyncKeyFingerprint { constructor(p?: proto.Message.IAppStateSyncKeyFingerprint); - public rawId: number; - public currentIndex: number; + public rawId?: (number|null); + public currentIndex?: (number|null); public deviceIndexes: number[]; public static create(properties?: proto.Message.IAppStateSyncKeyFingerprint): proto.Message.AppStateSyncKeyFingerprint; public static encode(m: proto.Message.IAppStateSyncKeyFingerprint, w?: $protobuf.Writer): $protobuf.Writer; @@ -5762,7 +5762,7 @@ export namespace proto { class AppStateSyncKeyId implements IAppStateSyncKeyId { constructor(p?: proto.Message.IAppStateSyncKeyId); - public keyId: Uint8Array; + public keyId?: (Uint8Array|null); public static create(properties?: proto.Message.IAppStateSyncKeyId): proto.Message.AppStateSyncKeyId; public static encode(m: proto.Message.IAppStateSyncKeyId, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.AppStateSyncKeyId; @@ -5825,22 +5825,22 @@ export namespace proto { class AudioMessage implements IAudioMessage { constructor(p?: proto.Message.IAudioMessage); - public url: string; - public mimetype: string; - public fileSha256: Uint8Array; - public fileLength: (number|Long); - public seconds: number; - public ptt: boolean; - public mediaKey: Uint8Array; - public fileEncSha256: Uint8Array; - public directPath: string; - public mediaKeyTimestamp: (number|Long); + public url?: (string|null); + public mimetype?: (string|null); + public fileSha256?: (Uint8Array|null); + public fileLength?: (number|Long|null); + public seconds?: (number|null); + public ptt?: (boolean|null); + public mediaKey?: (Uint8Array|null); + public fileEncSha256?: (Uint8Array|null); + public directPath?: (string|null); + public mediaKeyTimestamp?: (number|Long|null); public contextInfo?: (proto.IContextInfo|null); - public streamingSidecar: Uint8Array; - public waveform: Uint8Array; - public backgroundArgb: number; - public viewOnce: boolean; - public accessibilityLabel: string; + public streamingSidecar?: (Uint8Array|null); + public waveform?: (Uint8Array|null); + public backgroundArgb?: (number|null); + public viewOnce?: (boolean|null); + public accessibilityLabel?: (string|null); public static create(properties?: proto.Message.IAudioMessage): proto.Message.AudioMessage; public static encode(m: proto.Message.IAudioMessage, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.AudioMessage; @@ -5859,10 +5859,10 @@ export namespace proto { class BCallMessage implements IBCallMessage { constructor(p?: proto.Message.IBCallMessage); - public sessionId: string; - public mediaType: proto.Message.BCallMessage.MediaType; - public masterKey: Uint8Array; - public caption: string; + public sessionId?: (string|null); + public mediaType?: (proto.Message.BCallMessage.MediaType|null); + public masterKey?: (Uint8Array|null); + public caption?: (string|null); public static create(properties?: proto.Message.IBCallMessage): proto.Message.BCallMessage; public static encode(m: proto.Message.IBCallMessage, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.BCallMessage; @@ -5896,11 +5896,11 @@ export namespace proto { class ButtonsMessage implements IButtonsMessage { constructor(p?: proto.Message.IButtonsMessage); - public contentText: string; - public footerText: string; + public contentText?: (string|null); + public footerText?: (string|null); public contextInfo?: (proto.IContextInfo|null); public buttons: proto.Message.ButtonsMessage.IButton[]; - public headerType: proto.Message.ButtonsMessage.HeaderType; + public headerType?: (proto.Message.ButtonsMessage.HeaderType|null); public text?: (string|null); public documentMessage?: (proto.Message.IDocumentMessage|null); public imageMessage?: (proto.Message.IImageMessage|null); @@ -5927,9 +5927,9 @@ export namespace proto { class Button implements IButton { constructor(p?: proto.Message.ButtonsMessage.IButton); - public buttonId: string; + public buttonId?: (string|null); public buttonText?: (proto.Message.ButtonsMessage.Button.IButtonText|null); - public type: proto.Message.ButtonsMessage.Button.Type; + public type?: (proto.Message.ButtonsMessage.Button.Type|null); public nativeFlowInfo?: (proto.Message.ButtonsMessage.Button.INativeFlowInfo|null); public static create(properties?: proto.Message.ButtonsMessage.IButton): proto.Message.ButtonsMessage.Button; public static encode(m: proto.Message.ButtonsMessage.IButton, w?: $protobuf.Writer): $protobuf.Writer; @@ -5948,7 +5948,7 @@ export namespace proto { class ButtonText implements IButtonText { constructor(p?: proto.Message.ButtonsMessage.Button.IButtonText); - public displayText: string; + public displayText?: (string|null); public static create(properties?: proto.Message.ButtonsMessage.Button.IButtonText): proto.Message.ButtonsMessage.Button.ButtonText; public static encode(m: proto.Message.ButtonsMessage.Button.IButtonText, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.ButtonsMessage.Button.ButtonText; @@ -5965,8 +5965,8 @@ export namespace proto { class NativeFlowInfo implements INativeFlowInfo { constructor(p?: proto.Message.ButtonsMessage.Button.INativeFlowInfo); - public name: string; - public paramsJson: string; + public name?: (string|null); + public paramsJson?: (string|null); public static create(properties?: proto.Message.ButtonsMessage.Button.INativeFlowInfo): proto.Message.ButtonsMessage.Button.NativeFlowInfo; public static encode(m: proto.Message.ButtonsMessage.Button.INativeFlowInfo, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.ButtonsMessage.Button.NativeFlowInfo; @@ -6003,9 +6003,9 @@ export namespace proto { class ButtonsResponseMessage implements IButtonsResponseMessage { constructor(p?: proto.Message.IButtonsResponseMessage); - public selectedButtonId: string; + public selectedButtonId?: (string|null); public contextInfo?: (proto.IContextInfo|null); - public type: proto.Message.ButtonsResponseMessage.Type; + public type?: (proto.Message.ButtonsResponseMessage.Type|null); public selectedDisplayText?: (string|null); public response?: "selectedDisplayText"; public static create(properties?: proto.Message.IButtonsResponseMessage): proto.Message.ButtonsResponseMessage; @@ -6040,15 +6040,15 @@ export namespace proto { class Call implements ICall { constructor(p?: proto.Message.ICall); - public callKey: Uint8Array; - public conversionSource: string; - public conversionData: Uint8Array; - public conversionDelaySeconds: number; - public ctwaSignals: string; - public ctwaPayload: Uint8Array; + public callKey?: (Uint8Array|null); + public conversionSource?: (string|null); + public conversionData?: (Uint8Array|null); + public conversionDelaySeconds?: (number|null); + public ctwaSignals?: (string|null); + public ctwaPayload?: (Uint8Array|null); public contextInfo?: (proto.IContextInfo|null); - public nativeFlowCallButtonPayload: string; - public deeplinkPayload: string; + public nativeFlowCallButtonPayload?: (string|null); + public deeplinkPayload?: (string|null); public messageContextInfo?: (proto.IMessageContextInfo|null); public static create(properties?: proto.Message.ICall): proto.Message.Call; public static encode(m: proto.Message.ICall, w?: $protobuf.Writer): $protobuf.Writer; @@ -6069,10 +6069,10 @@ export namespace proto { class CallLogMessage implements ICallLogMessage { constructor(p?: proto.Message.ICallLogMessage); - public isVideo: boolean; - public callOutcome: proto.Message.CallLogMessage.CallOutcome; - public durationSecs: (number|Long); - public callType: proto.Message.CallLogMessage.CallType; + public isVideo?: (boolean|null); + public callOutcome?: (proto.Message.CallLogMessage.CallOutcome|null); + public durationSecs?: (number|Long|null); + public callType?: (proto.Message.CallLogMessage.CallType|null); public participants: proto.Message.CallLogMessage.ICallParticipant[]; public static create(properties?: proto.Message.ICallLogMessage): proto.Message.CallLogMessage; public static encode(m: proto.Message.ICallLogMessage, w?: $protobuf.Writer): $protobuf.Writer; @@ -6103,8 +6103,8 @@ export namespace proto { class CallParticipant implements ICallParticipant { constructor(p?: proto.Message.CallLogMessage.ICallParticipant); - public jid: string; - public callOutcome: proto.Message.CallLogMessage.CallOutcome; + public jid?: (string|null); + public callOutcome?: (proto.Message.CallLogMessage.CallOutcome|null); public static create(properties?: proto.Message.CallLogMessage.ICallParticipant): proto.Message.CallLogMessage.CallParticipant; public static encode(m: proto.Message.CallLogMessage.ICallParticipant, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.CallLogMessage.CallParticipant; @@ -6144,8 +6144,8 @@ export namespace proto { class Chat implements IChat { constructor(p?: proto.Message.IChat); - public displayName: string; - public id: string; + public displayName?: (string|null); + public id?: (string|null); public static create(properties?: proto.Message.IChat): proto.Message.Chat; public static encode(m: proto.Message.IChat, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.Chat; @@ -6166,12 +6166,12 @@ export namespace proto { class CloudAPIThreadControlNotification implements ICloudAPIThreadControlNotification { constructor(p?: proto.Message.ICloudAPIThreadControlNotification); - public status: proto.Message.CloudAPIThreadControlNotification.CloudAPIThreadControl; - public senderNotificationTimestampMs: (number|Long); - public consumerLid: string; - public consumerPhoneNumber: string; + public status?: (proto.Message.CloudAPIThreadControlNotification.CloudAPIThreadControl|null); + public senderNotificationTimestampMs?: (number|Long|null); + public consumerLid?: (string|null); + public consumerPhoneNumber?: (string|null); public notificationContent?: (proto.Message.CloudAPIThreadControlNotification.ICloudAPIThreadControlNotificationContent|null); - public shouldSuppressNotification: boolean; + public shouldSuppressNotification?: (boolean|null); public static create(properties?: proto.Message.ICloudAPIThreadControlNotification): proto.Message.CloudAPIThreadControlNotification; public static encode(m: proto.Message.ICloudAPIThreadControlNotification, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.CloudAPIThreadControlNotification; @@ -6196,8 +6196,8 @@ export namespace proto { class CloudAPIThreadControlNotificationContent implements ICloudAPIThreadControlNotificationContent { constructor(p?: proto.Message.CloudAPIThreadControlNotification.ICloudAPIThreadControlNotificationContent); - public handoffNotificationText: string; - public extraJson: string; + public handoffNotificationText?: (string|null); + public extraJson?: (string|null); public static create(properties?: proto.Message.CloudAPIThreadControlNotification.ICloudAPIThreadControlNotificationContent): proto.Message.CloudAPIThreadControlNotification.CloudAPIThreadControlNotificationContent; public static encode(m: proto.Message.CloudAPIThreadControlNotification.ICloudAPIThreadControlNotificationContent, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.CloudAPIThreadControlNotification.CloudAPIThreadControlNotificationContent; @@ -6235,10 +6235,10 @@ export namespace proto { class ContactMessage implements IContactMessage { constructor(p?: proto.Message.IContactMessage); - public displayName: string; - public vcard: string; + public displayName?: (string|null); + public vcard?: (string|null); public contextInfo?: (proto.IContextInfo|null); - public isSelfContact: boolean; + public isSelfContact?: (boolean|null); public static create(properties?: proto.Message.IContactMessage): proto.Message.ContactMessage; public static encode(m: proto.Message.IContactMessage, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.ContactMessage; @@ -6256,7 +6256,7 @@ export namespace proto { class ContactsArrayMessage implements IContactsArrayMessage { constructor(p?: proto.Message.IContactsArrayMessage); - public displayName: string; + public displayName?: (string|null); public contacts: proto.Message.IContactMessage[]; public contextInfo?: (proto.IContextInfo|null); public static create(properties?: proto.Message.IContactsArrayMessage): proto.Message.ContactsArrayMessage; @@ -6292,9 +6292,9 @@ export namespace proto { class DeviceSentMessage implements IDeviceSentMessage { constructor(p?: proto.Message.IDeviceSentMessage); - public destinationJid: string; + public destinationJid?: (string|null); public message?: (proto.IMessage|null); - public phash: string; + public phash?: (string|null); public static create(properties?: proto.Message.IDeviceSentMessage): proto.Message.DeviceSentMessage; public static encode(m: proto.Message.IDeviceSentMessage, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.DeviceSentMessage; @@ -6330,27 +6330,27 @@ export namespace proto { class DocumentMessage implements IDocumentMessage { constructor(p?: proto.Message.IDocumentMessage); - public url: string; - public mimetype: string; - public title: string; - public fileSha256: Uint8Array; - public fileLength: (number|Long); - public pageCount: number; - public mediaKey: Uint8Array; - public fileName: string; - public fileEncSha256: Uint8Array; - public directPath: string; - public mediaKeyTimestamp: (number|Long); - public contactVcard: boolean; - public thumbnailDirectPath: string; - public thumbnailSha256: Uint8Array; - public thumbnailEncSha256: Uint8Array; - public jpegThumbnail: Uint8Array; + public url?: (string|null); + public mimetype?: (string|null); + public title?: (string|null); + public fileSha256?: (Uint8Array|null); + public fileLength?: (number|Long|null); + public pageCount?: (number|null); + public mediaKey?: (Uint8Array|null); + public fileName?: (string|null); + public fileEncSha256?: (Uint8Array|null); + public directPath?: (string|null); + public mediaKeyTimestamp?: (number|Long|null); + public contactVcard?: (boolean|null); + public thumbnailDirectPath?: (string|null); + public thumbnailSha256?: (Uint8Array|null); + public thumbnailEncSha256?: (Uint8Array|null); + public jpegThumbnail?: (Uint8Array|null); public contextInfo?: (proto.IContextInfo|null); - public thumbnailHeight: number; - public thumbnailWidth: number; - public caption: string; - public accessibilityLabel: string; + public thumbnailHeight?: (number|null); + public thumbnailWidth?: (number|null); + public caption?: (string|null); + public accessibilityLabel?: (string|null); public static create(properties?: proto.Message.IDocumentMessage): proto.Message.DocumentMessage; public static encode(m: proto.Message.IDocumentMessage, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.DocumentMessage; @@ -6369,8 +6369,8 @@ export namespace proto { class EncCommentMessage implements IEncCommentMessage { constructor(p?: proto.Message.IEncCommentMessage); public targetMessageKey?: (proto.IMessageKey|null); - public encPayload: Uint8Array; - public encIv: Uint8Array; + public encPayload?: (Uint8Array|null); + public encIv?: (Uint8Array|null); public static create(properties?: proto.Message.IEncCommentMessage): proto.Message.EncCommentMessage; public static encode(m: proto.Message.IEncCommentMessage, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.EncCommentMessage; @@ -6389,8 +6389,8 @@ export namespace proto { class EncEventResponseMessage implements IEncEventResponseMessage { constructor(p?: proto.Message.IEncEventResponseMessage); public eventCreationMessageKey?: (proto.IMessageKey|null); - public encPayload: Uint8Array; - public encIv: Uint8Array; + public encPayload?: (Uint8Array|null); + public encIv?: (Uint8Array|null); public static create(properties?: proto.Message.IEncEventResponseMessage): proto.Message.EncEventResponseMessage; public static encode(m: proto.Message.IEncEventResponseMessage, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.EncEventResponseMessage; @@ -6409,8 +6409,8 @@ export namespace proto { class EncReactionMessage implements IEncReactionMessage { constructor(p?: proto.Message.IEncReactionMessage); public targetMessageKey?: (proto.IMessageKey|null); - public encPayload: Uint8Array; - public encIv: Uint8Array; + public encPayload?: (Uint8Array|null); + public encIv?: (Uint8Array|null); public static create(properties?: proto.Message.IEncReactionMessage): proto.Message.EncReactionMessage; public static encode(m: proto.Message.IEncReactionMessage, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.EncReactionMessage; @@ -6438,17 +6438,17 @@ export namespace proto { class EventMessage implements IEventMessage { constructor(p?: proto.Message.IEventMessage); public contextInfo?: (proto.IContextInfo|null); - public isCanceled: boolean; - public name: string; - public description: string; + public isCanceled?: (boolean|null); + public name?: (string|null); + public description?: (string|null); public location?: (proto.Message.ILocationMessage|null); - public joinLink: string; - public startTime: (number|Long); - public endTime: (number|Long); - public extraGuestsAllowed: boolean; - public isScheduleCall: boolean; - public hasReminder: boolean; - public reminderOffsetSec: (number|Long); + public joinLink?: (string|null); + public startTime?: (number|Long|null); + public endTime?: (number|Long|null); + public extraGuestsAllowed?: (boolean|null); + public isScheduleCall?: (boolean|null); + public hasReminder?: (boolean|null); + public reminderOffsetSec?: (number|Long|null); public static create(properties?: proto.Message.IEventMessage): proto.Message.EventMessage; public static encode(m: proto.Message.IEventMessage, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.EventMessage; @@ -6466,9 +6466,9 @@ export namespace proto { class EventResponseMessage implements IEventResponseMessage { constructor(p?: proto.Message.IEventResponseMessage); - public response: proto.Message.EventResponseMessage.EventResponseType; - public timestampMs: (number|Long); - public extraGuestCount: number; + public response?: (proto.Message.EventResponseMessage.EventResponseType|null); + public timestampMs?: (number|Long|null); + public extraGuestCount?: (number|null); public static create(properties?: proto.Message.IEventResponseMessage): proto.Message.EventResponseMessage; public static encode(m: proto.Message.IEventResponseMessage, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.EventResponseMessage; @@ -6525,36 +6525,36 @@ export namespace proto { class ExtendedTextMessage implements IExtendedTextMessage { constructor(p?: proto.Message.IExtendedTextMessage); - public text: string; - public matchedText: string; - public description: string; - public title: string; - public textArgb: number; - public backgroundArgb: number; - public font: proto.Message.ExtendedTextMessage.FontType; - public previewType: proto.Message.ExtendedTextMessage.PreviewType; - public jpegThumbnail: Uint8Array; + public text?: (string|null); + public matchedText?: (string|null); + public description?: (string|null); + public title?: (string|null); + public textArgb?: (number|null); + public backgroundArgb?: (number|null); + public font?: (proto.Message.ExtendedTextMessage.FontType|null); + public previewType?: (proto.Message.ExtendedTextMessage.PreviewType|null); + public jpegThumbnail?: (Uint8Array|null); public contextInfo?: (proto.IContextInfo|null); - public doNotPlayInline: boolean; - public thumbnailDirectPath: string; - public thumbnailSha256: Uint8Array; - public thumbnailEncSha256: Uint8Array; - public mediaKey: Uint8Array; - public mediaKeyTimestamp: (number|Long); - public thumbnailHeight: number; - public thumbnailWidth: number; - public inviteLinkGroupType: proto.Message.ExtendedTextMessage.InviteLinkGroupType; - public inviteLinkParentGroupSubjectV2: string; - public inviteLinkParentGroupThumbnailV2: Uint8Array; - public inviteLinkGroupTypeV2: proto.Message.ExtendedTextMessage.InviteLinkGroupType; - public viewOnce: boolean; - public videoHeight: number; - public videoWidth: number; + public doNotPlayInline?: (boolean|null); + public thumbnailDirectPath?: (string|null); + public thumbnailSha256?: (Uint8Array|null); + public thumbnailEncSha256?: (Uint8Array|null); + public mediaKey?: (Uint8Array|null); + public mediaKeyTimestamp?: (number|Long|null); + public thumbnailHeight?: (number|null); + public thumbnailWidth?: (number|null); + public inviteLinkGroupType?: (proto.Message.ExtendedTextMessage.InviteLinkGroupType|null); + public inviteLinkParentGroupSubjectV2?: (string|null); + public inviteLinkParentGroupThumbnailV2?: (Uint8Array|null); + public inviteLinkGroupTypeV2?: (proto.Message.ExtendedTextMessage.InviteLinkGroupType|null); + public viewOnce?: (boolean|null); + public videoHeight?: (number|null); + public videoWidth?: (number|null); public faviconMMSMetadata?: (proto.Message.IMMSThumbnailMetadata|null); public linkPreviewMetadata?: (proto.Message.ILinkPreviewMetadata|null); public paymentLinkMetadata?: (proto.Message.IPaymentLinkMetadata|null); public endCardTiles: proto.Message.IVideoEndCard[]; - public videoContentUrl: string; + public videoContentUrl?: (string|null); public musicMetadata?: (proto.IEmbeddedMusic|null); public paymentExtendedMetadata?: (proto.Message.IPaymentExtendedMetadata|null); public static create(properties?: proto.Message.IExtendedTextMessage): proto.Message.ExtendedTextMessage; @@ -6602,7 +6602,7 @@ export namespace proto { class FullHistorySyncOnDemandRequestMetadata implements IFullHistorySyncOnDemandRequestMetadata { constructor(p?: proto.Message.IFullHistorySyncOnDemandRequestMetadata); - public requestId: string; + public requestId?: (string|null); public static create(properties?: proto.Message.IFullHistorySyncOnDemandRequestMetadata): proto.Message.FullHistorySyncOnDemandRequestMetadata; public static encode(m: proto.Message.IFullHistorySyncOnDemandRequestMetadata, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.FullHistorySyncOnDemandRequestMetadata; @@ -6641,14 +6641,14 @@ export namespace proto { class GroupInviteMessage implements IGroupInviteMessage { constructor(p?: proto.Message.IGroupInviteMessage); - public groupJid: string; - public inviteCode: string; - public inviteExpiration: (number|Long); - public groupName: string; - public jpegThumbnail: Uint8Array; - public caption: string; + public groupJid?: (string|null); + public inviteCode?: (string|null); + public inviteExpiration?: (number|Long|null); + public groupName?: (string|null); + public jpegThumbnail?: (Uint8Array|null); + public caption?: (string|null); public contextInfo?: (proto.IContextInfo|null); - public groupType: proto.Message.GroupInviteMessage.GroupType; + public groupType?: (proto.Message.GroupInviteMessage.GroupType|null); public static create(properties?: proto.Message.IGroupInviteMessage): proto.Message.GroupInviteMessage; public static encode(m: proto.Message.IGroupInviteMessage, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.GroupInviteMessage; @@ -6680,14 +6680,14 @@ export namespace proto { class HighlyStructuredMessage implements IHighlyStructuredMessage { constructor(p?: proto.Message.IHighlyStructuredMessage); - public namespace: string; - public elementName: string; + public namespace?: (string|null); + public elementName?: (string|null); public params: string[]; - public fallbackLg: string; - public fallbackLc: string; + public fallbackLg?: (string|null); + public fallbackLc?: (string|null); public localizableParams: proto.Message.HighlyStructuredMessage.IHSMLocalizableParameter[]; - public deterministicLg: string; - public deterministicLc: string; + public deterministicLg?: (string|null); + public deterministicLc?: (string|null); public hydratedHsm?: (proto.Message.ITemplateMessage|null); public static create(properties?: proto.Message.IHighlyStructuredMessage): proto.Message.HighlyStructuredMessage; public static encode(m: proto.Message.IHighlyStructuredMessage, w?: $protobuf.Writer): $protobuf.Writer; @@ -6708,7 +6708,7 @@ export namespace proto { class HSMLocalizableParameter implements IHSMLocalizableParameter { constructor(p?: proto.Message.HighlyStructuredMessage.IHSMLocalizableParameter); - public default: string; + public default?: (string|null); public currency?: (proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.IHSMCurrency|null); public dateTime?: (proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.IHSMDateTime|null); public paramOneof?: ("currency"|"dateTime"); @@ -6730,8 +6730,8 @@ export namespace proto { class HSMCurrency implements IHSMCurrency { constructor(p?: proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.IHSMCurrency); - public currencyCode: string; - public amount1000: (number|Long); + public currencyCode?: (string|null); + public amount1000?: (number|Long|null); public static create(properties?: proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.IHSMCurrency): proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMCurrency; public static encode(m: proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.IHSMCurrency, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMCurrency; @@ -6774,13 +6774,13 @@ export namespace proto { class HSMDateTimeComponent implements IHSMDateTimeComponent { constructor(p?: proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.IHSMDateTimeComponent); - public dayOfWeek: proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent.DayOfWeekType; - public year: number; - public month: number; - public dayOfMonth: number; - public hour: number; - public minute: number; - public calendar: proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent.CalendarType; + public dayOfWeek?: (proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent.DayOfWeekType|null); + public year?: (number|null); + public month?: (number|null); + public dayOfMonth?: (number|null); + public hour?: (number|null); + public minute?: (number|null); + public calendar?: (proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent.CalendarType|null); public static create(properties?: proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.IHSMDateTimeComponent): proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent; public static encode(m: proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.IHSMDateTimeComponent, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent; @@ -6814,7 +6814,7 @@ export namespace proto { class HSMDateTimeUnixEpoch implements IHSMDateTimeUnixEpoch { constructor(p?: proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.IHSMDateTimeUnixEpoch); - public timestamp: (number|Long); + public timestamp?: (number|Long|null); public static create(properties?: proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.IHSMDateTimeUnixEpoch): proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeUnixEpoch; public static encode(m: proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.IHSMDateTimeUnixEpoch, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeUnixEpoch; @@ -6833,7 +6833,7 @@ export namespace proto { class HistorySyncMessageAccessStatus implements IHistorySyncMessageAccessStatus { constructor(p?: proto.Message.IHistorySyncMessageAccessStatus); - public completeAccessGranted: boolean; + public completeAccessGranted?: (boolean|null); public static create(properties?: proto.Message.IHistorySyncMessageAccessStatus): proto.Message.HistorySyncMessageAccessStatus; public static encode(m: proto.Message.IHistorySyncMessageAccessStatus, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.HistorySyncMessageAccessStatus; @@ -6863,20 +6863,20 @@ export namespace proto { class HistorySyncNotification implements IHistorySyncNotification { constructor(p?: proto.Message.IHistorySyncNotification); - public fileSha256: Uint8Array; - public fileLength: (number|Long); - public mediaKey: Uint8Array; - public fileEncSha256: Uint8Array; - public directPath: string; - public syncType: proto.Message.HistorySyncType; - public chunkOrder: number; - public originalMessageId: string; - public progress: number; - public oldestMsgInChunkTimestampSec: (number|Long); - public initialHistBootstrapInlinePayload: Uint8Array; - public peerDataRequestSessionId: string; + public fileSha256?: (Uint8Array|null); + public fileLength?: (number|Long|null); + public mediaKey?: (Uint8Array|null); + public fileEncSha256?: (Uint8Array|null); + public directPath?: (string|null); + public syncType?: (proto.Message.HistorySyncType|null); + public chunkOrder?: (number|null); + public originalMessageId?: (string|null); + public progress?: (number|null); + public oldestMsgInChunkTimestampSec?: (number|Long|null); + public initialHistBootstrapInlinePayload?: (Uint8Array|null); + public peerDataRequestSessionId?: (string|null); public fullHistorySyncOnDemandRequestMetadata?: (proto.Message.IFullHistorySyncOnDemandRequestMetadata|null); - public encHandle: string; + public encHandle?: (string|null); public messageAccessStatus?: (proto.Message.IHistorySyncMessageAccessStatus|null); public static create(properties?: proto.Message.IHistorySyncNotification): proto.Message.HistorySyncNotification; public static encode(m: proto.Message.IHistorySyncNotification, w?: $protobuf.Writer): $protobuf.Writer; @@ -6934,36 +6934,36 @@ export namespace proto { class ImageMessage implements IImageMessage { constructor(p?: proto.Message.IImageMessage); - public url: string; - public mimetype: string; - public caption: string; - public fileSha256: Uint8Array; - public fileLength: (number|Long); - public height: number; - public width: number; - public mediaKey: Uint8Array; - public fileEncSha256: Uint8Array; + public url?: (string|null); + public mimetype?: (string|null); + public caption?: (string|null); + public fileSha256?: (Uint8Array|null); + public fileLength?: (number|Long|null); + public height?: (number|null); + public width?: (number|null); + public mediaKey?: (Uint8Array|null); + public fileEncSha256?: (Uint8Array|null); public interactiveAnnotations: proto.IInteractiveAnnotation[]; - public directPath: string; - public mediaKeyTimestamp: (number|Long); - public jpegThumbnail: Uint8Array; + public directPath?: (string|null); + public mediaKeyTimestamp?: (number|Long|null); + public jpegThumbnail?: (Uint8Array|null); public contextInfo?: (proto.IContextInfo|null); - public firstScanSidecar: Uint8Array; - public firstScanLength: number; - public experimentGroupId: number; - public scansSidecar: Uint8Array; + public firstScanSidecar?: (Uint8Array|null); + public firstScanLength?: (number|null); + public experimentGroupId?: (number|null); + public scansSidecar?: (Uint8Array|null); public scanLengths: number[]; - public midQualityFileSha256: Uint8Array; - public midQualityFileEncSha256: Uint8Array; - public viewOnce: boolean; - public thumbnailDirectPath: string; - public thumbnailSha256: Uint8Array; - public thumbnailEncSha256: Uint8Array; - public staticUrl: string; + public midQualityFileSha256?: (Uint8Array|null); + public midQualityFileEncSha256?: (Uint8Array|null); + public viewOnce?: (boolean|null); + public thumbnailDirectPath?: (string|null); + public thumbnailSha256?: (Uint8Array|null); + public thumbnailEncSha256?: (Uint8Array|null); + public staticUrl?: (string|null); public annotations: proto.IInteractiveAnnotation[]; - public imageSourceType: proto.Message.ImageMessage.ImageSourceType; - public accessibilityLabel: string; - public qrUrl: string; + public imageSourceType?: (proto.Message.ImageMessage.ImageSourceType|null); + public accessibilityLabel?: (string|null); + public qrUrl?: (string|null); public static create(properties?: proto.Message.IImageMessage): proto.Message.ImageMessage; public static encode(m: proto.Message.IImageMessage, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.ImageMessage; @@ -6989,7 +6989,7 @@ export namespace proto { class InitialSecurityNotificationSettingSync implements IInitialSecurityNotificationSettingSync { constructor(p?: proto.Message.IInitialSecurityNotificationSettingSync); - public securityNotificationEnabled: boolean; + public securityNotificationEnabled?: (boolean|null); public static create(properties?: proto.Message.IInitialSecurityNotificationSettingSync): proto.Message.InitialSecurityNotificationSettingSync; public static encode(m: proto.Message.IInitialSecurityNotificationSettingSync, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.InitialSecurityNotificationSettingSync; @@ -7044,9 +7044,9 @@ export namespace proto { class BloksWidget implements IBloksWidget { constructor(p?: proto.Message.InteractiveMessage.IBloksWidget); - public uuid: string; - public data: string; - public type: string; + public uuid?: (string|null); + public data?: (string|null); + public type?: (string|null); public static create(properties?: proto.Message.InteractiveMessage.IBloksWidget): proto.Message.InteractiveMessage.BloksWidget; public static encode(m: proto.Message.InteractiveMessage.IBloksWidget, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.InteractiveMessage.BloksWidget; @@ -7062,7 +7062,7 @@ export namespace proto { class Body implements IBody { constructor(p?: proto.Message.InteractiveMessage.IBody); - public text: string; + public text?: (string|null); public static create(properties?: proto.Message.InteractiveMessage.IBody): proto.Message.InteractiveMessage.Body; public static encode(m: proto.Message.InteractiveMessage.IBody, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.InteractiveMessage.Body; @@ -7081,8 +7081,8 @@ export namespace proto { class CarouselMessage implements ICarouselMessage { constructor(p?: proto.Message.InteractiveMessage.ICarouselMessage); public cards: proto.Message.IInteractiveMessage[]; - public messageVersion: number; - public carouselCardType: proto.Message.InteractiveMessage.CarouselMessage.CarouselCardType; + public messageVersion?: (number|null); + public carouselCardType?: (proto.Message.InteractiveMessage.CarouselMessage.CarouselCardType|null); public static create(properties?: proto.Message.InteractiveMessage.ICarouselMessage): proto.Message.InteractiveMessage.CarouselMessage; public static encode(m: proto.Message.InteractiveMessage.ICarouselMessage, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.InteractiveMessage.CarouselMessage; @@ -7109,9 +7109,9 @@ export namespace proto { class CollectionMessage implements ICollectionMessage { constructor(p?: proto.Message.InteractiveMessage.ICollectionMessage); - public bizJid: string; - public id: string; - public messageVersion: number; + public bizJid?: (string|null); + public id?: (string|null); + public messageVersion?: (number|null); public static create(properties?: proto.Message.InteractiveMessage.ICollectionMessage): proto.Message.InteractiveMessage.CollectionMessage; public static encode(m: proto.Message.InteractiveMessage.ICollectionMessage, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.InteractiveMessage.CollectionMessage; @@ -7129,8 +7129,8 @@ export namespace proto { class Footer implements IFooter { constructor(p?: proto.Message.InteractiveMessage.IFooter); - public text: string; - public hasMediaAttachment: boolean; + public text?: (string|null); + public hasMediaAttachment?: (boolean|null); public audioMessage?: (proto.Message.IAudioMessage|null); public media?: "audioMessage"; public static create(properties?: proto.Message.InteractiveMessage.IFooter): proto.Message.InteractiveMessage.Footer; @@ -7157,9 +7157,9 @@ export namespace proto { class Header implements IHeader { constructor(p?: proto.Message.InteractiveMessage.IHeader); - public title: string; - public subtitle: string; - public hasMediaAttachment: boolean; + public title?: (string|null); + public subtitle?: (string|null); + public hasMediaAttachment?: (boolean|null); public bloksWidget?: (proto.Message.InteractiveMessage.IBloksWidget|null); public documentMessage?: (proto.Message.IDocumentMessage|null); public imageMessage?: (proto.Message.IImageMessage|null); @@ -7186,8 +7186,8 @@ export namespace proto { class NativeFlowMessage implements INativeFlowMessage { constructor(p?: proto.Message.InteractiveMessage.INativeFlowMessage); public buttons: proto.Message.InteractiveMessage.NativeFlowMessage.INativeFlowButton[]; - public messageParamsJson: string; - public messageVersion: number; + public messageParamsJson?: (string|null); + public messageVersion?: (number|null); public static create(properties?: proto.Message.InteractiveMessage.INativeFlowMessage): proto.Message.InteractiveMessage.NativeFlowMessage; public static encode(m: proto.Message.InteractiveMessage.INativeFlowMessage, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.InteractiveMessage.NativeFlowMessage; @@ -7206,8 +7206,8 @@ export namespace proto { class NativeFlowButton implements INativeFlowButton { constructor(p?: proto.Message.InteractiveMessage.NativeFlowMessage.INativeFlowButton); - public name: string; - public buttonParamsJson: string; + public name?: (string|null); + public buttonParamsJson?: (string|null); public static create(properties?: proto.Message.InteractiveMessage.NativeFlowMessage.INativeFlowButton): proto.Message.InteractiveMessage.NativeFlowMessage.NativeFlowButton; public static encode(m: proto.Message.InteractiveMessage.NativeFlowMessage.INativeFlowButton, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.InteractiveMessage.NativeFlowMessage.NativeFlowButton; @@ -7226,9 +7226,9 @@ export namespace proto { class ShopMessage implements IShopMessage { constructor(p?: proto.Message.InteractiveMessage.IShopMessage); - public id: string; - public surface: proto.Message.InteractiveMessage.ShopMessage.Surface; - public messageVersion: number; + public id?: (string|null); + public surface?: (proto.Message.InteractiveMessage.ShopMessage.Surface|null); + public messageVersion?: (number|null); public static create(properties?: proto.Message.InteractiveMessage.IShopMessage): proto.Message.InteractiveMessage.ShopMessage; public static encode(m: proto.Message.InteractiveMessage.IShopMessage, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.InteractiveMessage.ShopMessage; @@ -7279,8 +7279,8 @@ export namespace proto { class Body implements IBody { constructor(p?: proto.Message.InteractiveResponseMessage.IBody); - public text: string; - public format: proto.Message.InteractiveResponseMessage.Body.Format; + public text?: (string|null); + public format?: (proto.Message.InteractiveResponseMessage.Body.Format|null); public static create(properties?: proto.Message.InteractiveResponseMessage.IBody): proto.Message.InteractiveResponseMessage.Body; public static encode(m: proto.Message.InteractiveResponseMessage.IBody, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.InteractiveResponseMessage.Body; @@ -7306,9 +7306,9 @@ export namespace proto { class NativeFlowResponseMessage implements INativeFlowResponseMessage { constructor(p?: proto.Message.InteractiveResponseMessage.INativeFlowResponseMessage); - public name: string; - public paramsJson: string; - public version: number; + public name?: (string|null); + public paramsJson?: (string|null); + public version?: (number|null); public static create(properties?: proto.Message.InteractiveResponseMessage.INativeFlowResponseMessage): proto.Message.InteractiveResponseMessage.NativeFlowResponseMessage; public static encode(m: proto.Message.InteractiveResponseMessage.INativeFlowResponseMessage, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.InteractiveResponseMessage.NativeFlowResponseMessage; @@ -7334,16 +7334,16 @@ export namespace proto { class InvoiceMessage implements IInvoiceMessage { constructor(p?: proto.Message.IInvoiceMessage); - public note: string; - public token: string; - public attachmentType: proto.Message.InvoiceMessage.AttachmentType; - public attachmentMimetype: string; - public attachmentMediaKey: Uint8Array; - public attachmentMediaKeyTimestamp: (number|Long); - public attachmentFileSha256: Uint8Array; - public attachmentFileEncSha256: Uint8Array; - public attachmentDirectPath: string; - public attachmentJpegThumbnail: Uint8Array; + public note?: (string|null); + public token?: (string|null); + public attachmentType?: (proto.Message.InvoiceMessage.AttachmentType|null); + public attachmentMimetype?: (string|null); + public attachmentMediaKey?: (Uint8Array|null); + public attachmentMediaKeyTimestamp?: (number|Long|null); + public attachmentFileSha256?: (Uint8Array|null); + public attachmentFileEncSha256?: (Uint8Array|null); + public attachmentDirectPath?: (string|null); + public attachmentJpegThumbnail?: (Uint8Array|null); public static create(properties?: proto.Message.IInvoiceMessage): proto.Message.InvoiceMessage; public static encode(m: proto.Message.IInvoiceMessage, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.InvoiceMessage; @@ -7370,8 +7370,8 @@ export namespace proto { class KeepInChatMessage implements IKeepInChatMessage { constructor(p?: proto.Message.IKeepInChatMessage); public key?: (proto.IMessageKey|null); - public keepType: proto.KeepType; - public timestampMs: (number|Long); + public keepType?: (proto.KeepType|null); + public timestampMs?: (number|Long|null); public static create(properties?: proto.Message.IKeepInChatMessage): proto.Message.KeepInChatMessage; public static encode(m: proto.Message.IKeepInChatMessage, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.KeepInChatMessage; @@ -7397,13 +7397,13 @@ export namespace proto { constructor(p?: proto.Message.ILinkPreviewMetadata); public paymentLinkMetadata?: (proto.Message.IPaymentLinkMetadata|null); public urlMetadata?: (proto.Message.IURLMetadata|null); - public fbExperimentId: number; - public linkMediaDuration: number; - public socialMediaPostType: proto.Message.LinkPreviewMetadata.SocialMediaPostType; - public linkInlineVideoMuted: boolean; - public videoContentUrl: string; + public fbExperimentId?: (number|null); + public linkMediaDuration?: (number|null); + public socialMediaPostType?: (proto.Message.LinkPreviewMetadata.SocialMediaPostType|null); + public linkInlineVideoMuted?: (boolean|null); + public videoContentUrl?: (string|null); public musicMetadata?: (proto.IEmbeddedMusic|null); - public videoContentCaption: string; + public videoContentCaption?: (string|null); public static create(properties?: proto.Message.ILinkPreviewMetadata): proto.Message.LinkPreviewMetadata; public static encode(m: proto.Message.ILinkPreviewMetadata, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.LinkPreviewMetadata; @@ -7438,13 +7438,13 @@ export namespace proto { class ListMessage implements IListMessage { constructor(p?: proto.Message.IListMessage); - public title: string; - public description: string; - public buttonText: string; - public listType: proto.Message.ListMessage.ListType; + public title?: (string|null); + public description?: (string|null); + public buttonText?: (string|null); + public listType?: (proto.Message.ListMessage.ListType|null); public sections: proto.Message.ListMessage.ISection[]; public productListInfo?: (proto.Message.ListMessage.IProductListInfo|null); - public footerText: string; + public footerText?: (string|null); public contextInfo?: (proto.IContextInfo|null); public static create(properties?: proto.Message.IListMessage): proto.Message.ListMessage; public static encode(m: proto.Message.IListMessage, w?: $protobuf.Writer): $protobuf.Writer; @@ -7469,7 +7469,7 @@ export namespace proto { class Product implements IProduct { constructor(p?: proto.Message.ListMessage.IProduct); - public productId: string; + public productId?: (string|null); public static create(properties?: proto.Message.ListMessage.IProduct): proto.Message.ListMessage.Product; public static encode(m: proto.Message.ListMessage.IProduct, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.ListMessage.Product; @@ -7486,8 +7486,8 @@ export namespace proto { class ProductListHeaderImage implements IProductListHeaderImage { constructor(p?: proto.Message.ListMessage.IProductListHeaderImage); - public productId: string; - public jpegThumbnail: Uint8Array; + public productId?: (string|null); + public jpegThumbnail?: (Uint8Array|null); public static create(properties?: proto.Message.ListMessage.IProductListHeaderImage): proto.Message.ListMessage.ProductListHeaderImage; public static encode(m: proto.Message.ListMessage.IProductListHeaderImage, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.ListMessage.ProductListHeaderImage; @@ -7507,7 +7507,7 @@ export namespace proto { constructor(p?: proto.Message.ListMessage.IProductListInfo); public productSections: proto.Message.ListMessage.IProductSection[]; public headerImage?: (proto.Message.ListMessage.IProductListHeaderImage|null); - public businessOwnerJid: string; + public businessOwnerJid?: (string|null); public static create(properties?: proto.Message.ListMessage.IProductListInfo): proto.Message.ListMessage.ProductListInfo; public static encode(m: proto.Message.ListMessage.IProductListInfo, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.ListMessage.ProductListInfo; @@ -7524,7 +7524,7 @@ export namespace proto { class ProductSection implements IProductSection { constructor(p?: proto.Message.ListMessage.IProductSection); - public title: string; + public title?: (string|null); public products: proto.Message.ListMessage.IProduct[]; public static create(properties?: proto.Message.ListMessage.IProductSection): proto.Message.ListMessage.ProductSection; public static encode(m: proto.Message.ListMessage.IProductSection, w?: $protobuf.Writer): $protobuf.Writer; @@ -7543,9 +7543,9 @@ export namespace proto { class Row implements IRow { constructor(p?: proto.Message.ListMessage.IRow); - public title: string; - public description: string; - public rowId: string; + public title?: (string|null); + public description?: (string|null); + public rowId?: (string|null); public static create(properties?: proto.Message.ListMessage.IRow): proto.Message.ListMessage.Row; public static encode(m: proto.Message.ListMessage.IRow, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.ListMessage.Row; @@ -7562,7 +7562,7 @@ export namespace proto { class Section implements ISection { constructor(p?: proto.Message.ListMessage.ISection); - public title: string; + public title?: (string|null); public rows: proto.Message.ListMessage.IRow[]; public static create(properties?: proto.Message.ListMessage.ISection): proto.Message.ListMessage.Section; public static encode(m: proto.Message.ListMessage.ISection, w?: $protobuf.Writer): $protobuf.Writer; @@ -7584,11 +7584,11 @@ export namespace proto { class ListResponseMessage implements IListResponseMessage { constructor(p?: proto.Message.IListResponseMessage); - public title: string; - public listType: proto.Message.ListResponseMessage.ListType; + public title?: (string|null); + public listType?: (proto.Message.ListResponseMessage.ListType|null); public singleSelectReply?: (proto.Message.ListResponseMessage.ISingleSelectReply|null); public contextInfo?: (proto.IContextInfo|null); - public description: string; + public description?: (string|null); public static create(properties?: proto.Message.IListResponseMessage): proto.Message.ListResponseMessage; public static encode(m: proto.Message.IListResponseMessage, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.ListResponseMessage; @@ -7611,7 +7611,7 @@ export namespace proto { class SingleSelectReply implements ISingleSelectReply { constructor(p?: proto.Message.ListResponseMessage.ISingleSelectReply); - public selectedRowId: string; + public selectedRowId?: (string|null); public static create(properties?: proto.Message.ListResponseMessage.ISingleSelectReply): proto.Message.ListResponseMessage.SingleSelectReply; public static encode(m: proto.Message.ListResponseMessage.ISingleSelectReply, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.ListResponseMessage.SingleSelectReply; @@ -7637,15 +7637,15 @@ export namespace proto { class LiveLocationMessage implements ILiveLocationMessage { constructor(p?: proto.Message.ILiveLocationMessage); - public degreesLatitude: number; - public degreesLongitude: number; - public accuracyInMeters: number; - public speedInMps: number; - public degreesClockwiseFromMagneticNorth: number; - public caption: string; - public sequenceNumber: (number|Long); - public timeOffset: number; - public jpegThumbnail: Uint8Array; + public degreesLatitude?: (number|null); + public degreesLongitude?: (number|null); + public accuracyInMeters?: (number|null); + public speedInMps?: (number|null); + public degreesClockwiseFromMagneticNorth?: (number|null); + public caption?: (string|null); + public sequenceNumber?: (number|Long|null); + public timeOffset?: (number|null); + public jpegThumbnail?: (Uint8Array|null); public contextInfo?: (proto.IContextInfo|null); public static create(properties?: proto.Message.ILiveLocationMessage): proto.Message.LiveLocationMessage; public static encode(m: proto.Message.ILiveLocationMessage, w?: $protobuf.Writer): $protobuf.Writer; @@ -7673,17 +7673,17 @@ export namespace proto { class LocationMessage implements ILocationMessage { constructor(p?: proto.Message.ILocationMessage); - public degreesLatitude: number; - public degreesLongitude: number; - public name: string; - public address: string; - public url: string; - public isLive: boolean; - public accuracyInMeters: number; - public speedInMps: number; - public degreesClockwiseFromMagneticNorth: number; - public comment: string; - public jpegThumbnail: Uint8Array; + public degreesLatitude?: (number|null); + public degreesLongitude?: (number|null); + public name?: (string|null); + public address?: (string|null); + public url?: (string|null); + public isLive?: (boolean|null); + public accuracyInMeters?: (number|null); + public speedInMps?: (number|null); + public degreesClockwiseFromMagneticNorth?: (number|null); + public comment?: (string|null); + public jpegThumbnail?: (Uint8Array|null); public contextInfo?: (proto.IContextInfo|null); public static create(properties?: proto.Message.ILocationMessage): proto.Message.LocationMessage; public static encode(m: proto.Message.ILocationMessage, w?: $protobuf.Writer): $protobuf.Writer; @@ -7706,13 +7706,13 @@ export namespace proto { class MMSThumbnailMetadata implements IMMSThumbnailMetadata { constructor(p?: proto.Message.IMMSThumbnailMetadata); - public thumbnailDirectPath: string; - public thumbnailSha256: Uint8Array; - public thumbnailEncSha256: Uint8Array; - public mediaKey: Uint8Array; - public mediaKeyTimestamp: (number|Long); - public thumbnailHeight: number; - public thumbnailWidth: number; + public thumbnailDirectPath?: (string|null); + public thumbnailSha256?: (Uint8Array|null); + public thumbnailEncSha256?: (Uint8Array|null); + public mediaKey?: (Uint8Array|null); + public mediaKeyTimestamp?: (number|Long|null); + public thumbnailHeight?: (number|null); + public thumbnailWidth?: (number|null); public static create(properties?: proto.Message.IMMSThumbnailMetadata): proto.Message.MMSThumbnailMetadata; public static encode(m: proto.Message.IMMSThumbnailMetadata, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.MMSThumbnailMetadata; @@ -7735,12 +7735,12 @@ export namespace proto { class MessageHistoryBundle implements IMessageHistoryBundle { constructor(p?: proto.Message.IMessageHistoryBundle); - public mimetype: string; - public fileSha256: Uint8Array; - public mediaKey: Uint8Array; - public fileEncSha256: Uint8Array; - public directPath: string; - public mediaKeyTimestamp: (number|Long); + public mimetype?: (string|null); + public fileSha256?: (Uint8Array|null); + public mediaKey?: (Uint8Array|null); + public fileEncSha256?: (Uint8Array|null); + public directPath?: (string|null); + public mediaKeyTimestamp?: (number|Long|null); public contextInfo?: (proto.IContextInfo|null); public messageHistoryMetadata?: (proto.Message.IMessageHistoryMetadata|null); public static create(properties?: proto.Message.IMessageHistoryBundle): proto.Message.MessageHistoryBundle; @@ -7762,8 +7762,8 @@ export namespace proto { class MessageHistoryMetadata implements IMessageHistoryMetadata { constructor(p?: proto.Message.IMessageHistoryMetadata); public historyReceivers: string[]; - public oldestMessageTimestamp: (number|Long); - public messageCount: (number|Long); + public oldestMessageTimestamp?: (number|Long|null); + public messageCount?: (number|Long|null); public nonHistoryReceivers: string[]; public static create(properties?: proto.Message.IMessageHistoryMetadata): proto.Message.MessageHistoryMetadata; public static encode(m: proto.Message.IMessageHistoryMetadata, w?: $protobuf.Writer): $protobuf.Writer; @@ -7803,11 +7803,11 @@ export namespace proto { class NewsletterAdminInviteMessage implements INewsletterAdminInviteMessage { constructor(p?: proto.Message.INewsletterAdminInviteMessage); - public newsletterJid: string; - public newsletterName: string; - public jpegThumbnail: Uint8Array; - public caption: string; - public inviteExpiration: (number|Long); + public newsletterJid?: (string|null); + public newsletterName?: (string|null); + public jpegThumbnail?: (Uint8Array|null); + public caption?: (string|null); + public inviteExpiration?: (number|Long|null); public contextInfo?: (proto.IContextInfo|null); public static create(properties?: proto.Message.INewsletterAdminInviteMessage): proto.Message.NewsletterAdminInviteMessage; public static encode(m: proto.Message.INewsletterAdminInviteMessage, w?: $protobuf.Writer): $protobuf.Writer; @@ -7828,10 +7828,10 @@ export namespace proto { class NewsletterFollowerInviteMessage implements INewsletterFollowerInviteMessage { constructor(p?: proto.Message.INewsletterFollowerInviteMessage); - public newsletterJid: string; - public newsletterName: string; - public jpegThumbnail: Uint8Array; - public caption: string; + public newsletterJid?: (string|null); + public newsletterName?: (string|null); + public jpegThumbnail?: (Uint8Array|null); + public caption?: (string|null); public contextInfo?: (proto.IContextInfo|null); public static create(properties?: proto.Message.INewsletterFollowerInviteMessage): proto.Message.NewsletterFollowerInviteMessage; public static encode(m: proto.Message.INewsletterFollowerInviteMessage, w?: $protobuf.Writer): $protobuf.Writer; @@ -7862,21 +7862,21 @@ export namespace proto { class OrderMessage implements IOrderMessage { constructor(p?: proto.Message.IOrderMessage); - public orderId: string; - public thumbnail: Uint8Array; - public itemCount: number; - public status: proto.Message.OrderMessage.OrderStatus; - public surface: proto.Message.OrderMessage.OrderSurface; - public message: string; - public orderTitle: string; - public sellerJid: string; - public token: string; - public totalAmount1000: (number|Long); - public totalCurrencyCode: string; + public orderId?: (string|null); + public thumbnail?: (Uint8Array|null); + public itemCount?: (number|null); + public status?: (proto.Message.OrderMessage.OrderStatus|null); + public surface?: (proto.Message.OrderMessage.OrderSurface|null); + public message?: (string|null); + public orderTitle?: (string|null); + public sellerJid?: (string|null); + public token?: (string|null); + public totalAmount1000?: (number|Long|null); + public totalCurrencyCode?: (string|null); public contextInfo?: (proto.IContextInfo|null); - public messageVersion: number; + public messageVersion?: (number|null); public orderRequestMessageId?: (proto.IMessageKey|null); - public catalogType: string; + public catalogType?: (string|null); public static create(properties?: proto.Message.IOrderMessage): proto.Message.OrderMessage; public static encode(m: proto.Message.IOrderMessage, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.OrderMessage; @@ -7906,8 +7906,8 @@ export namespace proto { class PaymentExtendedMetadata implements IPaymentExtendedMetadata { constructor(p?: proto.Message.IPaymentExtendedMetadata); - public type: number; - public platform: string; + public type?: (number|null); + public platform?: (string|null); public static create(properties?: proto.Message.IPaymentExtendedMetadata): proto.Message.PaymentExtendedMetadata; public static encode(m: proto.Message.IPaymentExtendedMetadata, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.PaymentExtendedMetadata; @@ -7926,10 +7926,10 @@ export namespace proto { class PaymentInviteMessage implements IPaymentInviteMessage { constructor(p?: proto.Message.IPaymentInviteMessage); - public serviceType: proto.Message.PaymentInviteMessage.ServiceType; - public expiryTimestamp: (number|Long); - public incentiveEligible: boolean; - public referralId: string; + public serviceType?: (proto.Message.PaymentInviteMessage.ServiceType|null); + public expiryTimestamp?: (number|Long|null); + public incentiveEligible?: (boolean|null); + public referralId?: (string|null); public static create(properties?: proto.Message.IPaymentInviteMessage): proto.Message.PaymentInviteMessage; public static encode(m: proto.Message.IPaymentInviteMessage, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.PaymentInviteMessage; @@ -7977,7 +7977,7 @@ export namespace proto { class PaymentLinkButton implements IPaymentLinkButton { constructor(p?: proto.Message.PaymentLinkMetadata.IPaymentLinkButton); - public displayText: string; + public displayText?: (string|null); public static create(properties?: proto.Message.PaymentLinkMetadata.IPaymentLinkButton): proto.Message.PaymentLinkMetadata.PaymentLinkButton; public static encode(m: proto.Message.PaymentLinkMetadata.IPaymentLinkButton, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.PaymentLinkMetadata.PaymentLinkButton; @@ -7993,7 +7993,7 @@ export namespace proto { class PaymentLinkHeader implements IPaymentLinkHeader { constructor(p?: proto.Message.PaymentLinkMetadata.IPaymentLinkHeader); - public headerType: proto.Message.PaymentLinkMetadata.PaymentLinkHeader.PaymentLinkHeaderType; + public headerType?: (proto.Message.PaymentLinkMetadata.PaymentLinkHeader.PaymentLinkHeaderType|null); public static create(properties?: proto.Message.PaymentLinkMetadata.IPaymentLinkHeader): proto.Message.PaymentLinkMetadata.PaymentLinkHeader; public static encode(m: proto.Message.PaymentLinkMetadata.IPaymentLinkHeader, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.PaymentLinkMetadata.PaymentLinkHeader; @@ -8017,7 +8017,7 @@ export namespace proto { class PaymentLinkProvider implements IPaymentLinkProvider { constructor(p?: proto.Message.PaymentLinkMetadata.IPaymentLinkProvider); - public paramsJson: string; + public paramsJson?: (string|null); public static create(properties?: proto.Message.PaymentLinkMetadata.IPaymentLinkProvider): proto.Message.PaymentLinkMetadata.PaymentLinkProvider; public static encode(m: proto.Message.PaymentLinkMetadata.IPaymentLinkProvider, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.PaymentLinkMetadata.PaymentLinkProvider; @@ -8043,7 +8043,7 @@ export namespace proto { class PeerDataOperationRequestMessage implements IPeerDataOperationRequestMessage { constructor(p?: proto.Message.IPeerDataOperationRequestMessage); - public peerDataOperationRequestType: proto.Message.PeerDataOperationRequestType; + public peerDataOperationRequestType?: (proto.Message.PeerDataOperationRequestType|null); public requestStickerReupload: proto.Message.PeerDataOperationRequestMessage.IRequestStickerReupload[]; public requestUrlPreview: proto.Message.PeerDataOperationRequestMessage.IRequestUrlPreview[]; public historySyncOnDemandRequest?: (proto.Message.PeerDataOperationRequestMessage.IHistorySyncOnDemandRequest|null); @@ -8070,7 +8070,7 @@ export namespace proto { class CompanionCanonicalUserNonceFetchRequest implements ICompanionCanonicalUserNonceFetchRequest { constructor(p?: proto.Message.PeerDataOperationRequestMessage.ICompanionCanonicalUserNonceFetchRequest); - public registrationTraceId: string; + public registrationTraceId?: (string|null); public static create(properties?: proto.Message.PeerDataOperationRequestMessage.ICompanionCanonicalUserNonceFetchRequest): proto.Message.PeerDataOperationRequestMessage.CompanionCanonicalUserNonceFetchRequest; public static encode(m: proto.Message.PeerDataOperationRequestMessage.ICompanionCanonicalUserNonceFetchRequest, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.PeerDataOperationRequestMessage.CompanionCanonicalUserNonceFetchRequest; @@ -8106,9 +8106,9 @@ export namespace proto { class GalaxyFlowAction implements IGalaxyFlowAction { constructor(p?: proto.Message.PeerDataOperationRequestMessage.IGalaxyFlowAction); - public type: proto.Message.PeerDataOperationRequestMessage.GalaxyFlowAction.GalaxyFlowActionType; - public flowId: string; - public stanzaId: string; + public type?: (proto.Message.PeerDataOperationRequestMessage.GalaxyFlowAction.GalaxyFlowActionType|null); + public flowId?: (string|null); + public stanzaId?: (string|null); public static create(properties?: proto.Message.PeerDataOperationRequestMessage.IGalaxyFlowAction): proto.Message.PeerDataOperationRequestMessage.GalaxyFlowAction; public static encode(m: proto.Message.PeerDataOperationRequestMessage.IGalaxyFlowAction, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.PeerDataOperationRequestMessage.GalaxyFlowAction; @@ -8134,10 +8134,10 @@ export namespace proto { class HistorySyncChunkRetryRequest implements IHistorySyncChunkRetryRequest { constructor(p?: proto.Message.PeerDataOperationRequestMessage.IHistorySyncChunkRetryRequest); - public syncType: proto.Message.HistorySyncType; - public chunkOrder: number; - public chunkNotificationId: string; - public regenerateChunk: boolean; + public syncType?: (proto.Message.HistorySyncType|null); + public chunkOrder?: (number|null); + public chunkNotificationId?: (string|null); + public regenerateChunk?: (boolean|null); public static create(properties?: proto.Message.PeerDataOperationRequestMessage.IHistorySyncChunkRetryRequest): proto.Message.PeerDataOperationRequestMessage.HistorySyncChunkRetryRequest; public static encode(m: proto.Message.PeerDataOperationRequestMessage.IHistorySyncChunkRetryRequest, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.PeerDataOperationRequestMessage.HistorySyncChunkRetryRequest; @@ -8158,12 +8158,12 @@ export namespace proto { class HistorySyncOnDemandRequest implements IHistorySyncOnDemandRequest { constructor(p?: proto.Message.PeerDataOperationRequestMessage.IHistorySyncOnDemandRequest); - public chatJid: string; - public oldestMsgId: string; - public oldestMsgFromMe: boolean; - public onDemandMsgCount: number; - public oldestMsgTimestampMs: (number|Long); - public accountLid: string; + public chatJid?: (string|null); + public oldestMsgId?: (string|null); + public oldestMsgFromMe?: (boolean|null); + public onDemandMsgCount?: (number|null); + public oldestMsgTimestampMs?: (number|Long|null); + public accountLid?: (string|null); public static create(properties?: proto.Message.PeerDataOperationRequestMessage.IHistorySyncOnDemandRequest): proto.Message.PeerDataOperationRequestMessage.HistorySyncOnDemandRequest; public static encode(m: proto.Message.PeerDataOperationRequestMessage.IHistorySyncOnDemandRequest, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.PeerDataOperationRequestMessage.HistorySyncOnDemandRequest; @@ -8195,7 +8195,7 @@ export namespace proto { class RequestStickerReupload implements IRequestStickerReupload { constructor(p?: proto.Message.PeerDataOperationRequestMessage.IRequestStickerReupload); - public fileSha256: string; + public fileSha256?: (string|null); public static create(properties?: proto.Message.PeerDataOperationRequestMessage.IRequestStickerReupload): proto.Message.PeerDataOperationRequestMessage.RequestStickerReupload; public static encode(m: proto.Message.PeerDataOperationRequestMessage.IRequestStickerReupload, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.PeerDataOperationRequestMessage.RequestStickerReupload; @@ -8212,8 +8212,8 @@ export namespace proto { class RequestUrlPreview implements IRequestUrlPreview { constructor(p?: proto.Message.PeerDataOperationRequestMessage.IRequestUrlPreview); - public url: string; - public includeHqThumbnail: boolean; + public url?: (string|null); + public includeHqThumbnail?: (boolean|null); public static create(properties?: proto.Message.PeerDataOperationRequestMessage.IRequestUrlPreview): proto.Message.PeerDataOperationRequestMessage.RequestUrlPreview; public static encode(m: proto.Message.PeerDataOperationRequestMessage.IRequestUrlPreview, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.PeerDataOperationRequestMessage.RequestUrlPreview; @@ -8230,8 +8230,8 @@ export namespace proto { class SyncDCollectionFatalRecoveryRequest implements ISyncDCollectionFatalRecoveryRequest { constructor(p?: proto.Message.PeerDataOperationRequestMessage.ISyncDCollectionFatalRecoveryRequest); - public collectionName: string; - public timestamp: (number|Long); + public collectionName?: (string|null); + public timestamp?: (number|Long|null); public static create(properties?: proto.Message.PeerDataOperationRequestMessage.ISyncDCollectionFatalRecoveryRequest): proto.Message.PeerDataOperationRequestMessage.SyncDCollectionFatalRecoveryRequest; public static encode(m: proto.Message.PeerDataOperationRequestMessage.ISyncDCollectionFatalRecoveryRequest, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.PeerDataOperationRequestMessage.SyncDCollectionFatalRecoveryRequest; @@ -8250,8 +8250,8 @@ export namespace proto { class PeerDataOperationRequestResponseMessage implements IPeerDataOperationRequestResponseMessage { constructor(p?: proto.Message.IPeerDataOperationRequestResponseMessage); - public peerDataOperationRequestType: proto.Message.PeerDataOperationRequestType; - public stanzaId: string; + public peerDataOperationRequestType?: (proto.Message.PeerDataOperationRequestType|null); + public stanzaId?: (string|null); public peerDataOperationResult: proto.Message.PeerDataOperationRequestResponseMessage.IPeerDataOperationResult[]; public static create(properties?: proto.Message.IPeerDataOperationRequestResponseMessage): proto.Message.PeerDataOperationRequestResponseMessage; public static encode(m: proto.Message.IPeerDataOperationRequestResponseMessage, w?: $protobuf.Writer): $protobuf.Writer; @@ -8279,7 +8279,7 @@ export namespace proto { class PeerDataOperationResult implements IPeerDataOperationResult { constructor(p?: proto.Message.PeerDataOperationRequestResponseMessage.IPeerDataOperationResult); - public mediaUploadResult: proto.MediaRetryNotification.ResultType; + public mediaUploadResult?: (proto.MediaRetryNotification.ResultType|null); public stickerMessage?: (proto.Message.IStickerMessage|null); public linkPreviewResponse?: (proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.ILinkPreviewResponse|null); public placeholderMessageResendResponse?: (proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.IPlaceholderMessageResendResponse|null); @@ -8308,9 +8308,9 @@ export namespace proto { class CompanionCanonicalUserNonceFetchResponse implements ICompanionCanonicalUserNonceFetchResponse { constructor(p?: proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.ICompanionCanonicalUserNonceFetchResponse); - public nonce: string; - public waFbid: string; - public forceRefresh: boolean; + public nonce?: (string|null); + public waFbid?: (string|null); + public forceRefresh?: (boolean|null); public static create(properties?: proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.ICompanionCanonicalUserNonceFetchResponse): proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionCanonicalUserNonceFetchResponse; public static encode(m: proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.ICompanionCanonicalUserNonceFetchResponse, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionCanonicalUserNonceFetchResponse; @@ -8326,7 +8326,7 @@ export namespace proto { class CompanionMetaNonceFetchResponse implements ICompanionMetaNonceFetchResponse { constructor(p?: proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.ICompanionMetaNonceFetchResponse); - public nonce: string; + public nonce?: (string|null); public static create(properties?: proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.ICompanionMetaNonceFetchResponse): proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionMetaNonceFetchResponse; public static encode(m: proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.ICompanionMetaNonceFetchResponse, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionMetaNonceFetchResponse; @@ -8344,7 +8344,7 @@ export namespace proto { class FullHistorySyncOnDemandRequestResponse implements IFullHistorySyncOnDemandRequestResponse { constructor(p?: proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.IFullHistorySyncOnDemandRequestResponse); public requestMetadata?: (proto.Message.IFullHistorySyncOnDemandRequestMetadata|null); - public responseCode: proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.FullHistorySyncOnDemandResponseCode; + public responseCode?: (proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.FullHistorySyncOnDemandResponseCode|null); public static create(properties?: proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.IFullHistorySyncOnDemandRequestResponse): proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.FullHistorySyncOnDemandRequestResponse; public static encode(m: proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.IFullHistorySyncOnDemandRequestResponse, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.FullHistorySyncOnDemandRequestResponse; @@ -8374,11 +8374,11 @@ export namespace proto { class HistorySyncChunkRetryResponse implements IHistorySyncChunkRetryResponse { constructor(p?: proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.IHistorySyncChunkRetryResponse); - public syncType: proto.Message.HistorySyncType; - public chunkOrder: number; - public requestId: string; - public responseCode: proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.HistorySyncChunkRetryResponseCode; - public canRecover: boolean; + public syncType?: (proto.Message.HistorySyncType|null); + public chunkOrder?: (number|null); + public requestId?: (string|null); + public responseCode?: (proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.HistorySyncChunkRetryResponseCode|null); + public canRecover?: (boolean|null); public static create(properties?: proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.IHistorySyncChunkRetryResponse): proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.HistorySyncChunkRetryResponse; public static encode(m: proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.IHistorySyncChunkRetryResponse, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.HistorySyncChunkRetryResponse; @@ -8410,12 +8410,12 @@ export namespace proto { class LinkPreviewResponse implements ILinkPreviewResponse { constructor(p?: proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.ILinkPreviewResponse); - public url: string; - public title: string; - public description: string; - public thumbData: Uint8Array; - public matchText: string; - public previewType: string; + public url?: (string|null); + public title?: (string|null); + public description?: (string|null); + public thumbData?: (Uint8Array|null); + public matchText?: (string|null); + public previewType?: (string|null); public hqThumbnail?: (proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.ILinkPreviewHighQualityThumbnail|null); public previewMetadata?: (proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.IPaymentLinkPreviewMetadata|null); public static create(properties?: proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.ILinkPreviewResponse): proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse; @@ -8441,13 +8441,13 @@ export namespace proto { class LinkPreviewHighQualityThumbnail implements ILinkPreviewHighQualityThumbnail { constructor(p?: proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.ILinkPreviewHighQualityThumbnail); - public directPath: string; - public thumbHash: string; - public encThumbHash: string; - public mediaKey: Uint8Array; - public mediaKeyTimestampMs: (number|Long); - public thumbWidth: number; - public thumbHeight: number; + public directPath?: (string|null); + public thumbHash?: (string|null); + public encThumbHash?: (string|null); + public mediaKey?: (Uint8Array|null); + public mediaKeyTimestampMs?: (number|Long|null); + public thumbWidth?: (number|null); + public thumbHeight?: (number|null); public static create(properties?: proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.ILinkPreviewHighQualityThumbnail): proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.LinkPreviewHighQualityThumbnail; public static encode(m: proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.ILinkPreviewHighQualityThumbnail, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.LinkPreviewHighQualityThumbnail; @@ -8467,11 +8467,11 @@ export namespace proto { class PaymentLinkPreviewMetadata implements IPaymentLinkPreviewMetadata { constructor(p?: proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.IPaymentLinkPreviewMetadata); - public isBusinessVerified: boolean; - public providerName: string; - public amount: string; - public offset: string; - public currency: string; + public isBusinessVerified?: (boolean|null); + public providerName?: (string|null); + public amount?: (string|null); + public offset?: (string|null); + public currency?: (string|null); public static create(properties?: proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.IPaymentLinkPreviewMetadata): proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.PaymentLinkPreviewMetadata; public static encode(m: proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.IPaymentLinkPreviewMetadata, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.PaymentLinkPreviewMetadata; @@ -8488,7 +8488,7 @@ export namespace proto { class PlaceholderMessageResendResponse implements IPlaceholderMessageResendResponse { constructor(p?: proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.IPlaceholderMessageResendResponse); - public webMessageInfoBytes: Uint8Array; + public webMessageInfoBytes?: (Uint8Array|null); public static create(properties?: proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.IPlaceholderMessageResendResponse): proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.PlaceholderMessageResendResponse; public static encode(m: proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.IPlaceholderMessageResendResponse, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.PlaceholderMessageResendResponse; @@ -8505,8 +8505,8 @@ export namespace proto { class SyncDSnapshotFatalRecoveryResponse implements ISyncDSnapshotFatalRecoveryResponse { constructor(p?: proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.ISyncDSnapshotFatalRecoveryResponse); - public collectionSnapshot: Uint8Array; - public isCompressed: boolean; + public collectionSnapshot?: (Uint8Array|null); + public isCompressed?: (boolean|null); public static create(properties?: proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.ISyncDSnapshotFatalRecoveryResponse): proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.SyncDSnapshotFatalRecoveryResponse; public static encode(m: proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.ISyncDSnapshotFatalRecoveryResponse, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.SyncDSnapshotFatalRecoveryResponse; @@ -8523,8 +8523,8 @@ export namespace proto { class WaffleNonceFetchResponse implements IWaffleNonceFetchResponse { constructor(p?: proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.IWaffleNonceFetchResponse); - public nonce: string; - public waEntFbid: string; + public nonce?: (string|null); + public waEntFbid?: (string|null); public static create(properties?: proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.IWaffleNonceFetchResponse): proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.WaffleNonceFetchResponse; public static encode(m: proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.IWaffleNonceFetchResponse, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.WaffleNonceFetchResponse; @@ -8560,8 +8560,8 @@ export namespace proto { class PinInChatMessage implements IPinInChatMessage { constructor(p?: proto.Message.IPinInChatMessage); public key?: (proto.IMessageKey|null); - public type: proto.Message.PinInChatMessage.Type; - public senderTimestampMs: (number|Long); + public type?: (proto.Message.PinInChatMessage.Type|null); + public senderTimestampMs?: (number|Long|null); public static create(properties?: proto.Message.IPinInChatMessage): proto.Message.PinInChatMessage; public static encode(m: proto.Message.IPinInChatMessage, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.PinInChatMessage; @@ -8586,7 +8586,7 @@ export namespace proto { class PlaceholderMessage implements IPlaceholderMessage { constructor(p?: proto.Message.IPlaceholderMessage); - public type: proto.Message.PlaceholderMessage.PlaceholderType; + public type?: (proto.Message.PlaceholderMessage.PlaceholderType|null); public static create(properties?: proto.Message.IPlaceholderMessage): proto.Message.PlaceholderMessage; public static encode(m: proto.Message.IPlaceholderMessage, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.PlaceholderMessage; @@ -8624,16 +8624,16 @@ export namespace proto { class PollCreationMessage implements IPollCreationMessage { constructor(p?: proto.Message.IPollCreationMessage); - public encKey: Uint8Array; - public name: string; + public encKey?: (Uint8Array|null); + public name?: (string|null); public options: proto.Message.PollCreationMessage.IOption[]; - public selectableOptionsCount: number; + public selectableOptionsCount?: (number|null); public contextInfo?: (proto.IContextInfo|null); - public pollContentType: proto.Message.PollContentType; - public pollType: proto.Message.PollType; + public pollContentType?: (proto.Message.PollContentType|null); + public pollType?: (proto.Message.PollType|null); public correctAnswer?: (proto.Message.PollCreationMessage.IOption|null); - public endTime: (number|Long); - public hideParticipantName: boolean; + public endTime?: (number|Long|null); + public hideParticipantName?: (boolean|null); public static create(properties?: proto.Message.IPollCreationMessage): proto.Message.PollCreationMessage; public static encode(m: proto.Message.IPollCreationMessage, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.PollCreationMessage; @@ -8652,8 +8652,8 @@ export namespace proto { class Option implements IOption { constructor(p?: proto.Message.PollCreationMessage.IOption); - public optionName: string; - public optionHash: string; + public optionName?: (string|null); + public optionHash?: (string|null); public static create(properties?: proto.Message.PollCreationMessage.IOption): proto.Message.PollCreationMessage.Option; public static encode(m: proto.Message.PollCreationMessage.IOption, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.PollCreationMessage.Option; @@ -8671,8 +8671,8 @@ export namespace proto { class PollEncValue implements IPollEncValue { constructor(p?: proto.Message.IPollEncValue); - public encPayload: Uint8Array; - public encIv: Uint8Array; + public encPayload?: (Uint8Array|null); + public encIv?: (Uint8Array|null); public static create(properties?: proto.Message.IPollEncValue): proto.Message.PollEncValue; public static encode(m: proto.Message.IPollEncValue, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.PollEncValue; @@ -8691,10 +8691,10 @@ export namespace proto { class PollResultSnapshotMessage implements IPollResultSnapshotMessage { constructor(p?: proto.Message.IPollResultSnapshotMessage); - public name: string; + public name?: (string|null); public pollVotes: proto.Message.PollResultSnapshotMessage.IPollVote[]; public contextInfo?: (proto.IContextInfo|null); - public pollType: proto.Message.PollType; + public pollType?: (proto.Message.PollType|null); public static create(properties?: proto.Message.IPollResultSnapshotMessage): proto.Message.PollResultSnapshotMessage; public static encode(m: proto.Message.IPollResultSnapshotMessage, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.PollResultSnapshotMessage; @@ -8713,8 +8713,8 @@ export namespace proto { class PollVote implements IPollVote { constructor(p?: proto.Message.PollResultSnapshotMessage.IPollVote); - public optionName: string; - public optionVoteCount: (number|Long); + public optionName?: (string|null); + public optionVoteCount?: (number|Long|null); public static create(properties?: proto.Message.PollResultSnapshotMessage.IPollVote): proto.Message.PollResultSnapshotMessage.PollVote; public static encode(m: proto.Message.PollResultSnapshotMessage.IPollVote, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.PollResultSnapshotMessage.PollVote; @@ -8742,7 +8742,7 @@ export namespace proto { public pollCreationMessageKey?: (proto.IMessageKey|null); public vote?: (proto.Message.IPollEncValue|null); public metadata?: (proto.Message.IPollUpdateMessageMetadata|null); - public senderTimestampMs: (number|Long); + public senderTimestampMs?: (number|Long|null); public static create(properties?: proto.Message.IPollUpdateMessage): proto.Message.PollUpdateMessage; public static encode(m: proto.Message.IPollUpdateMessage, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.PollUpdateMessage; @@ -8794,10 +8794,10 @@ export namespace proto { class ProductMessage implements IProductMessage { constructor(p?: proto.Message.IProductMessage); public product?: (proto.Message.ProductMessage.IProductSnapshot|null); - public businessOwnerJid: string; + public businessOwnerJid?: (string|null); public catalog?: (proto.Message.ProductMessage.ICatalogSnapshot|null); - public body: string; - public footer: string; + public body?: (string|null); + public footer?: (string|null); public contextInfo?: (proto.IContextInfo|null); public static create(properties?: proto.Message.IProductMessage): proto.Message.ProductMessage; public static encode(m: proto.Message.IProductMessage, w?: $protobuf.Writer): $protobuf.Writer; @@ -8819,8 +8819,8 @@ export namespace proto { class CatalogSnapshot implements ICatalogSnapshot { constructor(p?: proto.Message.ProductMessage.ICatalogSnapshot); public catalogImage?: (proto.Message.IImageMessage|null); - public title: string; - public description: string; + public title?: (string|null); + public description?: (string|null); public static create(properties?: proto.Message.ProductMessage.ICatalogSnapshot): proto.Message.ProductMessage.CatalogSnapshot; public static encode(m: proto.Message.ProductMessage.ICatalogSnapshot, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.ProductMessage.CatalogSnapshot; @@ -8848,17 +8848,17 @@ export namespace proto { class ProductSnapshot implements IProductSnapshot { constructor(p?: proto.Message.ProductMessage.IProductSnapshot); public productImage?: (proto.Message.IImageMessage|null); - public productId: string; - public title: string; - public description: string; - public currencyCode: string; - public priceAmount1000: (number|Long); - public retailerId: string; - public url: string; - public productImageCount: number; - public firstImageId: string; - public salePriceAmount1000: (number|Long); - public signedUrl: string; + public productId?: (string|null); + public title?: (string|null); + public description?: (string|null); + public currencyCode?: (string|null); + public priceAmount1000?: (number|Long|null); + public retailerId?: (string|null); + public url?: (string|null); + public productImageCount?: (number|null); + public firstImageId?: (string|null); + public salePriceAmount1000?: (number|Long|null); + public signedUrl?: (string|null); public static create(properties?: proto.Message.ProductMessage.IProductSnapshot): proto.Message.ProductMessage.ProductSnapshot; public static encode(m: proto.Message.ProductMessage.IProductSnapshot, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.ProductMessage.ProductSnapshot; @@ -8900,9 +8900,9 @@ export namespace proto { class ProtocolMessage implements IProtocolMessage { constructor(p?: proto.Message.IProtocolMessage); public key?: (proto.IMessageKey|null); - public type: proto.Message.ProtocolMessage.Type; - public ephemeralExpiration: number; - public ephemeralSettingTimestamp: (number|Long); + public type?: (proto.Message.ProtocolMessage.Type|null); + public ephemeralExpiration?: (number|null); + public ephemeralSettingTimestamp?: (number|Long|null); public historySyncNotification?: (proto.Message.IHistorySyncNotification|null); public appStateSyncKeyShare?: (proto.Message.IAppStateSyncKeyShare|null); public appStateSyncKeyRequest?: (proto.Message.IAppStateSyncKeyRequest|null); @@ -8910,17 +8910,17 @@ export namespace proto { public appStateFatalExceptionNotification?: (proto.Message.IAppStateFatalExceptionNotification|null); public disappearingMode?: (proto.IDisappearingMode|null); public editedMessage?: (proto.IMessage|null); - public timestampMs: (number|Long); + public timestampMs?: (number|Long|null); public peerDataOperationRequestMessage?: (proto.Message.IPeerDataOperationRequestMessage|null); public peerDataOperationRequestResponseMessage?: (proto.Message.IPeerDataOperationRequestResponseMessage|null); public botFeedbackMessage?: (proto.IBotFeedbackMessage|null); - public invokerJid: string; + public invokerJid?: (string|null); public requestWelcomeMessageMetadata?: (proto.Message.IRequestWelcomeMessageMetadata|null); public mediaNotifyMessage?: (proto.IMediaNotifyMessage|null); public cloudApiThreadControlNotification?: (proto.Message.ICloudAPIThreadControlNotification|null); public lidMigrationMappingSyncMessage?: (proto.ILIDMigrationMappingSyncMessage|null); public limitSharing?: (proto.ILimitSharing|null); - public aiPsiMetadata: Uint8Array; + public aiPsiMetadata?: (Uint8Array|null); public aiQueryFanout?: (proto.IAIQueryFanout|null); public memberLabel?: (proto.IMemberLabel|null); public aiMediaCollectionMessage?: (proto.IAIMediaCollectionMessage|null); @@ -8975,7 +8975,7 @@ export namespace proto { class QuestionResponseMessage implements IQuestionResponseMessage { constructor(p?: proto.Message.IQuestionResponseMessage); public key?: (proto.IMessageKey|null); - public text: string; + public text?: (string|null); public static create(properties?: proto.Message.IQuestionResponseMessage): proto.Message.QuestionResponseMessage; public static encode(m: proto.Message.IQuestionResponseMessage, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.QuestionResponseMessage; @@ -8995,9 +8995,9 @@ export namespace proto { class ReactionMessage implements IReactionMessage { constructor(p?: proto.Message.IReactionMessage); public key?: (proto.IMessageKey|null); - public text: string; - public groupingKey: string; - public senderTimestampMs: (number|Long); + public text?: (string|null); + public groupingKey?: (string|null); + public senderTimestampMs?: (number|Long|null); public static create(properties?: proto.Message.IReactionMessage): proto.Message.ReactionMessage; public static encode(m: proto.Message.IReactionMessage, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.ReactionMessage; @@ -9020,10 +9020,10 @@ export namespace proto { class RequestPaymentMessage implements IRequestPaymentMessage { constructor(p?: proto.Message.IRequestPaymentMessage); public noteMessage?: (proto.IMessage|null); - public currencyCodeIso4217: string; - public amount1000: (number|Long); - public requestFrom: string; - public expiryTimestamp: (number|Long); + public currencyCodeIso4217?: (string|null); + public amount1000?: (number|Long|null); + public requestFrom?: (string|null); + public expiryTimestamp?: (number|Long|null); public amount?: (proto.IMoney|null); public background?: (proto.IPaymentBackground|null); public static create(properties?: proto.Message.IRequestPaymentMessage): proto.Message.RequestPaymentMessage; @@ -9057,7 +9057,7 @@ export namespace proto { class RequestWelcomeMessageMetadata implements IRequestWelcomeMessageMetadata { constructor(p?: proto.Message.IRequestWelcomeMessageMetadata); - public localChatState: proto.Message.RequestWelcomeMessageMetadata.LocalChatState; + public localChatState?: (proto.Message.RequestWelcomeMessageMetadata.LocalChatState|null); public static create(properties?: proto.Message.IRequestWelcomeMessageMetadata): proto.Message.RequestWelcomeMessageMetadata; public static encode(m: proto.Message.IRequestWelcomeMessageMetadata, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.RequestWelcomeMessageMetadata; @@ -9083,9 +9083,9 @@ export namespace proto { class ScheduledCallCreationMessage implements IScheduledCallCreationMessage { constructor(p?: proto.Message.IScheduledCallCreationMessage); - public scheduledTimestampMs: (number|Long); - public callType: proto.Message.ScheduledCallCreationMessage.CallType; - public title: string; + public scheduledTimestampMs?: (number|Long|null); + public callType?: (proto.Message.ScheduledCallCreationMessage.CallType|null); + public title?: (string|null); public static create(properties?: proto.Message.IScheduledCallCreationMessage): proto.Message.ScheduledCallCreationMessage; public static encode(m: proto.Message.IScheduledCallCreationMessage, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.ScheduledCallCreationMessage; @@ -9112,7 +9112,7 @@ export namespace proto { class ScheduledCallEditMessage implements IScheduledCallEditMessage { constructor(p?: proto.Message.IScheduledCallEditMessage); public key?: (proto.IMessageKey|null); - public editType: proto.Message.ScheduledCallEditMessage.EditType; + public editType?: (proto.Message.ScheduledCallEditMessage.EditType|null); public static create(properties?: proto.Message.IScheduledCallEditMessage): proto.Message.ScheduledCallEditMessage; public static encode(m: proto.Message.IScheduledCallEditMessage, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.ScheduledCallEditMessage; @@ -9141,10 +9141,10 @@ export namespace proto { class SecretEncryptedMessage implements ISecretEncryptedMessage { constructor(p?: proto.Message.ISecretEncryptedMessage); public targetMessageKey?: (proto.IMessageKey|null); - public encPayload: Uint8Array; - public encIv: Uint8Array; - public secretEncType: proto.Message.SecretEncryptedMessage.SecretEncType; - public remoteKeyId: string; + public encPayload?: (Uint8Array|null); + public encIv?: (Uint8Array|null); + public secretEncType?: (proto.Message.SecretEncryptedMessage.SecretEncType|null); + public remoteKeyId?: (string|null); public static create(properties?: proto.Message.ISecretEncryptedMessage): proto.Message.SecretEncryptedMessage; public static encode(m: proto.Message.ISecretEncryptedMessage, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.SecretEncryptedMessage; @@ -9177,7 +9177,7 @@ export namespace proto { public noteMessage?: (proto.IMessage|null); public requestMessageKey?: (proto.IMessageKey|null); public background?: (proto.IPaymentBackground|null); - public transactionData: string; + public transactionData?: (string|null); public static create(properties?: proto.Message.ISendPaymentMessage): proto.Message.SendPaymentMessage; public static encode(m: proto.Message.ISendPaymentMessage, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.SendPaymentMessage; @@ -9194,8 +9194,8 @@ export namespace proto { class SenderKeyDistributionMessage implements ISenderKeyDistributionMessage { constructor(p?: proto.Message.ISenderKeyDistributionMessage); - public groupId: string; - public axolotlSenderKeyDistributionMessage: Uint8Array; + public groupId?: (string|null); + public axolotlSenderKeyDistributionMessage?: (Uint8Array|null); public static create(properties?: proto.Message.ISenderKeyDistributionMessage): proto.Message.SenderKeyDistributionMessage; public static encode(m: proto.Message.ISenderKeyDistributionMessage, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.SenderKeyDistributionMessage; @@ -9215,7 +9215,7 @@ export namespace proto { constructor(p?: proto.Message.IStatusNotificationMessage); public responseMessageKey?: (proto.IMessageKey|null); public originalMessageKey?: (proto.IMessageKey|null); - public type: proto.Message.StatusNotificationMessage.StatusNotificationType; + public type?: (proto.Message.StatusNotificationMessage.StatusNotificationType|null); public static create(properties?: proto.Message.IStatusNotificationMessage): proto.Message.StatusNotificationMessage; public static encode(m: proto.Message.IStatusNotificationMessage, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.StatusNotificationMessage; @@ -9243,7 +9243,7 @@ export namespace proto { class StatusQuestionAnswerMessage implements IStatusQuestionAnswerMessage { constructor(p?: proto.Message.IStatusQuestionAnswerMessage); public key?: (proto.IMessageKey|null); - public text: string; + public text?: (string|null); public static create(properties?: proto.Message.IStatusQuestionAnswerMessage): proto.Message.StatusQuestionAnswerMessage; public static encode(m: proto.Message.IStatusQuestionAnswerMessage, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.StatusQuestionAnswerMessage; @@ -9262,9 +9262,9 @@ export namespace proto { class StatusQuotedMessage implements IStatusQuotedMessage { constructor(p?: proto.Message.IStatusQuotedMessage); - public type: proto.Message.StatusQuotedMessage.StatusQuotedMessageType; - public text: string; - public thumbnail: Uint8Array; + public type?: (proto.Message.StatusQuotedMessage.StatusQuotedMessageType|null); + public text?: (string|null); + public thumbnail?: (Uint8Array|null); public originalStatusId?: (proto.IMessageKey|null); public static create(properties?: proto.Message.IStatusQuotedMessage): proto.Message.StatusQuotedMessage; public static encode(m: proto.Message.IStatusQuotedMessage, w?: $protobuf.Writer): $protobuf.Writer; @@ -9291,8 +9291,8 @@ export namespace proto { class StatusStickerInteractionMessage implements IStatusStickerInteractionMessage { constructor(p?: proto.Message.IStatusStickerInteractionMessage); public key?: (proto.IMessageKey|null); - public stickerKey: string; - public type: proto.Message.StatusStickerInteractionMessage.StatusStickerType; + public stickerKey?: (string|null); + public type?: (proto.Message.StatusStickerInteractionMessage.StatusStickerType|null); public static create(properties?: proto.Message.IStatusStickerInteractionMessage): proto.Message.StatusStickerInteractionMessage; public static encode(m: proto.Message.IStatusStickerInteractionMessage, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.StatusStickerInteractionMessage; @@ -9336,27 +9336,27 @@ export namespace proto { class StickerMessage implements IStickerMessage { constructor(p?: proto.Message.IStickerMessage); - public url: string; - public fileSha256: Uint8Array; - public fileEncSha256: Uint8Array; - public mediaKey: Uint8Array; - public mimetype: string; - public height: number; - public width: number; - public directPath: string; - public fileLength: (number|Long); - public mediaKeyTimestamp: (number|Long); - public firstFrameLength: number; - public firstFrameSidecar: Uint8Array; - public isAnimated: boolean; - public pngThumbnail: Uint8Array; + public url?: (string|null); + public fileSha256?: (Uint8Array|null); + public fileEncSha256?: (Uint8Array|null); + public mediaKey?: (Uint8Array|null); + public mimetype?: (string|null); + public height?: (number|null); + public width?: (number|null); + public directPath?: (string|null); + public fileLength?: (number|Long|null); + public mediaKeyTimestamp?: (number|Long|null); + public firstFrameLength?: (number|null); + public firstFrameSidecar?: (Uint8Array|null); + public isAnimated?: (boolean|null); + public pngThumbnail?: (Uint8Array|null); public contextInfo?: (proto.IContextInfo|null); - public stickerSentTs: (number|Long); - public isAvatar: boolean; - public isAiSticker: boolean; - public isLottie: boolean; - public accessibilityLabel: string; - public premium: number; + public stickerSentTs?: (number|Long|null); + public isAvatar?: (boolean|null); + public isAiSticker?: (boolean|null); + public isLottie?: (boolean|null); + public accessibilityLabel?: (string|null); + public premium?: (number|null); public static create(properties?: proto.Message.IStickerMessage): proto.Message.StickerMessage; public static encode(m: proto.Message.IStickerMessage, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.StickerMessage; @@ -9393,28 +9393,28 @@ export namespace proto { class StickerPackMessage implements IStickerPackMessage { constructor(p?: proto.Message.IStickerPackMessage); - public stickerPackId: string; - public name: string; - public publisher: string; + public stickerPackId?: (string|null); + public name?: (string|null); + public publisher?: (string|null); public stickers: proto.Message.StickerPackMessage.ISticker[]; - public fileLength: (number|Long); - public fileSha256: Uint8Array; - public fileEncSha256: Uint8Array; - public mediaKey: Uint8Array; - public directPath: string; - public caption: string; + public fileLength?: (number|Long|null); + public fileSha256?: (Uint8Array|null); + public fileEncSha256?: (Uint8Array|null); + public mediaKey?: (Uint8Array|null); + public directPath?: (string|null); + public caption?: (string|null); public contextInfo?: (proto.IContextInfo|null); - public packDescription: string; - public mediaKeyTimestamp: (number|Long); - public trayIconFileName: string; - public thumbnailDirectPath: string; - public thumbnailSha256: Uint8Array; - public thumbnailEncSha256: Uint8Array; - public thumbnailHeight: number; - public thumbnailWidth: number; - public imageDataHash: string; - public stickerPackSize: (number|Long); - public stickerPackOrigin: proto.Message.StickerPackMessage.StickerPackOrigin; + public packDescription?: (string|null); + public mediaKeyTimestamp?: (number|Long|null); + public trayIconFileName?: (string|null); + public thumbnailDirectPath?: (string|null); + public thumbnailSha256?: (Uint8Array|null); + public thumbnailEncSha256?: (Uint8Array|null); + public thumbnailHeight?: (number|null); + public thumbnailWidth?: (number|null); + public imageDataHash?: (string|null); + public stickerPackSize?: (number|Long|null); + public stickerPackOrigin?: (proto.Message.StickerPackMessage.StickerPackOrigin|null); public static create(properties?: proto.Message.IStickerPackMessage): proto.Message.StickerPackMessage; public static encode(m: proto.Message.IStickerPackMessage, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.StickerPackMessage; @@ -9437,12 +9437,12 @@ export namespace proto { class Sticker implements ISticker { constructor(p?: proto.Message.StickerPackMessage.ISticker); - public fileName: string; - public isAnimated: boolean; + public fileName?: (string|null); + public isAnimated?: (boolean|null); public emojis: string[]; - public accessibilityLabel: string; - public isLottie: boolean; - public mimetype: string; + public accessibilityLabel?: (string|null); + public isLottie?: (boolean|null); + public mimetype?: (string|null); public static create(properties?: proto.Message.StickerPackMessage.ISticker): proto.Message.StickerPackMessage.Sticker; public static encode(m: proto.Message.StickerPackMessage.ISticker, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.StickerPackMessage.Sticker; @@ -9468,8 +9468,8 @@ export namespace proto { class StickerSyncRMRMessage implements IStickerSyncRMRMessage { constructor(p?: proto.Message.IStickerSyncRMRMessage); public filehash: string[]; - public rmrSource: string; - public requestTimestamp: (number|Long); + public rmrSource?: (string|null); + public requestTimestamp?: (number|Long|null); public static create(properties?: proto.Message.IStickerSyncRMRMessage): proto.Message.StickerSyncRMRMessage; public static encode(m: proto.Message.IStickerSyncRMRMessage, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.StickerSyncRMRMessage; @@ -9489,11 +9489,11 @@ export namespace proto { class TemplateButtonReplyMessage implements ITemplateButtonReplyMessage { constructor(p?: proto.Message.ITemplateButtonReplyMessage); - public selectedId: string; - public selectedDisplayText: string; + public selectedId?: (string|null); + public selectedDisplayText?: (string|null); public contextInfo?: (proto.IContextInfo|null); - public selectedIndex: number; - public selectedCarouselCardIndex: number; + public selectedIndex?: (number|null); + public selectedCarouselCardIndex?: (number|null); public static create(properties?: proto.Message.ITemplateButtonReplyMessage): proto.Message.TemplateButtonReplyMessage; public static encode(m: proto.Message.ITemplateButtonReplyMessage, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.TemplateButtonReplyMessage; @@ -9516,7 +9516,7 @@ export namespace proto { constructor(p?: proto.Message.ITemplateMessage); public contextInfo?: (proto.IContextInfo|null); public hydratedTemplate?: (proto.Message.TemplateMessage.IHydratedFourRowTemplate|null); - public templateId: string; + public templateId?: (string|null); public fourRowTemplate?: (proto.Message.TemplateMessage.IFourRowTemplate|null); public hydratedFourRowTemplate?: (proto.Message.TemplateMessage.IHydratedFourRowTemplate|null); public interactiveMessageTemplate?: (proto.Message.IInteractiveMessage|null); @@ -9578,11 +9578,11 @@ export namespace proto { class HydratedFourRowTemplate implements IHydratedFourRowTemplate { constructor(p?: proto.Message.TemplateMessage.IHydratedFourRowTemplate); - public hydratedContentText: string; - public hydratedFooterText: string; + public hydratedContentText?: (string|null); + public hydratedFooterText?: (string|null); public hydratedButtons: proto.IHydratedTemplateButton[]; - public templateId: string; - public maskLinkedDevices: boolean; + public templateId?: (string|null); + public maskLinkedDevices?: (boolean|null); public documentMessage?: (proto.Message.IDocumentMessage|null); public hydratedTitleText?: (string|null); public imageMessage?: (proto.Message.IImageMessage|null); @@ -9605,7 +9605,7 @@ export namespace proto { class URLMetadata implements IURLMetadata { constructor(p?: proto.Message.IURLMetadata); - public fbExperimentId: number; + public fbExperimentId?: (number|null); public static create(properties?: proto.Message.IURLMetadata): proto.Message.URLMetadata; public static encode(m: proto.Message.IURLMetadata, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.URLMetadata; @@ -9616,18 +9616,18 @@ export namespace proto { } interface IVideoEndCard { - username: string; - caption: string; - thumbnailImageUrl: string; - profilePictureUrl: string; + username?: (string|null); + caption?: (string|null); + thumbnailImageUrl?: (string|null); + profilePictureUrl?: (string|null); } class VideoEndCard implements IVideoEndCard { constructor(p?: proto.Message.IVideoEndCard); - public username: string; - public caption: string; - public thumbnailImageUrl: string; - public profilePictureUrl: string; + public username?: (string|null); + public caption?: (string|null); + public thumbnailImageUrl?: (string|null); + public profilePictureUrl?: (string|null); public static create(properties?: proto.Message.IVideoEndCard): proto.Message.VideoEndCard; public static encode(m: proto.Message.IVideoEndCard, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.VideoEndCard; @@ -9672,36 +9672,36 @@ export namespace proto { class VideoMessage implements IVideoMessage { constructor(p?: proto.Message.IVideoMessage); - public url: string; - public mimetype: string; - public fileSha256: Uint8Array; - public fileLength: (number|Long); - public seconds: number; - public mediaKey: Uint8Array; - public caption: string; - public gifPlayback: boolean; - public height: number; - public width: number; - public fileEncSha256: Uint8Array; + public url?: (string|null); + public mimetype?: (string|null); + public fileSha256?: (Uint8Array|null); + public fileLength?: (number|Long|null); + public seconds?: (number|null); + public mediaKey?: (Uint8Array|null); + public caption?: (string|null); + public gifPlayback?: (boolean|null); + public height?: (number|null); + public width?: (number|null); + public fileEncSha256?: (Uint8Array|null); public interactiveAnnotations: proto.IInteractiveAnnotation[]; - public directPath: string; - public mediaKeyTimestamp: (number|Long); - public jpegThumbnail: Uint8Array; + public directPath?: (string|null); + public mediaKeyTimestamp?: (number|Long|null); + public jpegThumbnail?: (Uint8Array|null); public contextInfo?: (proto.IContextInfo|null); - public streamingSidecar: Uint8Array; - public gifAttribution: proto.Message.VideoMessage.Attribution; - public viewOnce: boolean; - public thumbnailDirectPath: string; - public thumbnailSha256: Uint8Array; - public thumbnailEncSha256: Uint8Array; - public staticUrl: string; + public streamingSidecar?: (Uint8Array|null); + public gifAttribution?: (proto.Message.VideoMessage.Attribution|null); + public viewOnce?: (boolean|null); + public thumbnailDirectPath?: (string|null); + public thumbnailSha256?: (Uint8Array|null); + public thumbnailEncSha256?: (Uint8Array|null); + public staticUrl?: (string|null); public annotations: proto.IInteractiveAnnotation[]; - public accessibilityLabel: string; + public accessibilityLabel?: (string|null); public processedVideos: proto.IProcessedVideo[]; - public externalShareFullVideoDurationInSeconds: number; - public motionPhotoPresentationOffsetMs: (number|Long); - public metadataUrl: string; - public videoSourceType: proto.Message.VideoMessage.VideoSourceType; + public externalShareFullVideoDurationInSeconds?: (number|null); + public motionPhotoPresentationOffsetMs?: (number|Long|null); + public metadataUrl?: (string|null); + public videoSourceType?: (proto.Message.VideoMessage.VideoSourceType|null); public static create(properties?: proto.Message.IVideoMessage): proto.Message.VideoMessage; public static encode(m: proto.Message.IVideoMessage, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Message.VideoMessage; @@ -9740,11 +9740,11 @@ export namespace proto { class MessageAddOn implements IMessageAddOn { constructor(p?: proto.IMessageAddOn); - public messageAddOnType: proto.MessageAddOn.MessageAddOnType; + public messageAddOnType?: (proto.MessageAddOn.MessageAddOnType|null); public messageAddOn?: (proto.IMessage|null); - public senderTimestampMs: (number|Long); - public serverTimestampMs: (number|Long); - public status: proto.WebMessageInfo.Status; + public senderTimestampMs?: (number|Long|null); + public serverTimestampMs?: (number|Long|null); + public status?: (proto.WebMessageInfo.Status|null); public addOnContextInfo?: (proto.IMessageAddOnContextInfo|null); public messageAddOnKey?: (proto.IMessageKey|null); public legacyMessage?: (proto.ILegacyMessage|null); @@ -9775,8 +9775,8 @@ export namespace proto { class MessageAddOnContextInfo implements IMessageAddOnContextInfo { constructor(p?: proto.IMessageAddOnContextInfo); - public messageAddOnDurationInSecs: number; - public messageAddOnExpiryType: proto.MessageContextInfo.MessageAddonExpiryType; + public messageAddOnDurationInSecs?: (number|null); + public messageAddOnExpiryType?: (proto.MessageContextInfo.MessageAddonExpiryType|null); public static create(properties?: proto.IMessageAddOnContextInfo): proto.MessageAddOnContextInfo; public static encode(m: proto.IMessageAddOnContextInfo, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.MessageAddOnContextInfo; @@ -9794,9 +9794,9 @@ export namespace proto { class MessageAssociation implements IMessageAssociation { constructor(p?: proto.IMessageAssociation); - public associationType: proto.MessageAssociation.AssociationType; + public associationType?: (proto.MessageAssociation.AssociationType|null); public parentMessageKey?: (proto.IMessageKey|null); - public messageIndex: number; + public messageIndex?: (number|null); public static create(properties?: proto.IMessageAssociation): proto.MessageAssociation; public static encode(m: proto.IMessageAssociation, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.MessageAssociation; @@ -9854,21 +9854,21 @@ export namespace proto { class MessageContextInfo implements IMessageContextInfo { constructor(p?: proto.IMessageContextInfo); public deviceListMetadata?: (proto.IDeviceListMetadata|null); - public deviceListMetadataVersion: number; - public messageSecret: Uint8Array; - public paddingBytes: Uint8Array; - public messageAddOnDurationInSecs: number; - public botMessageSecret: Uint8Array; + public deviceListMetadataVersion?: (number|null); + public messageSecret?: (Uint8Array|null); + public paddingBytes?: (Uint8Array|null); + public messageAddOnDurationInSecs?: (number|null); + public botMessageSecret?: (Uint8Array|null); public botMetadata?: (proto.IBotMetadata|null); - public reportingTokenVersion: number; - public messageAddOnExpiryType: proto.MessageContextInfo.MessageAddonExpiryType; + public reportingTokenVersion?: (number|null); + public messageAddOnExpiryType?: (proto.MessageContextInfo.MessageAddonExpiryType|null); public messageAssociation?: (proto.IMessageAssociation|null); - public capiCreatedGroup: boolean; - public supportPayload: string; + public capiCreatedGroup?: (boolean|null); + public supportPayload?: (string|null); public limitSharing?: (proto.ILimitSharing|null); public limitSharingV2?: (proto.ILimitSharing|null); public threadId: proto.IThreadID[]; - public weblinkRenderConfig: proto.WebLinkRenderConfig; + public weblinkRenderConfig?: (proto.WebLinkRenderConfig|null); public static create(properties?: proto.IMessageContextInfo): proto.MessageContextInfo; public static encode(m: proto.IMessageContextInfo, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.MessageContextInfo; @@ -9895,10 +9895,10 @@ export namespace proto { class MessageKey implements IMessageKey { constructor(p?: proto.IMessageKey); - public remoteJid: string; - public fromMe: boolean; - public id: string; - public participant: string; + public remoteJid?: (string|null); + public fromMe?: (boolean|null); + public id?: (string|null); + public participant?: (string|null); public static create(properties?: proto.IMessageKey): proto.MessageKey; public static encode(m: proto.IMessageKey, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.MessageKey; @@ -9916,9 +9916,9 @@ export namespace proto { class MessageSecretMessage implements IMessageSecretMessage { constructor(p?: proto.IMessageSecretMessage); - public version: number; - public encIv: Uint8Array; - public encPayload: Uint8Array; + public version?: (number|null); + public encIv?: (Uint8Array|null); + public encPayload?: (Uint8Array|null); public static create(properties?: proto.IMessageSecretMessage): proto.MessageSecretMessage; public static encode(m: proto.IMessageSecretMessage, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.MessageSecretMessage; @@ -9936,9 +9936,9 @@ export namespace proto { class Money implements IMoney { constructor(p?: proto.IMoney); - public value: (number|Long); - public offset: number; - public currencyCode: string; + public value?: (number|Long|null); + public offset?: (number|null); + public currencyCode?: (string|null); public static create(properties?: proto.IMoney): proto.Money; public static encode(m: proto.IMoney, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Money; @@ -9997,50 +9997,50 @@ export namespace proto { class MsgOpaqueData implements IMsgOpaqueData { constructor(p?: proto.IMsgOpaqueData); - public body: string; - public caption: string; - public lng: number; - public isLive: boolean; - public lat: number; - public paymentAmount1000: number; - public paymentNoteMsgBody: string; - public matchedText: string; - public title: string; - public description: string; - public futureproofBuffer: Uint8Array; - public clientUrl: string; - public loc: string; - public pollName: string; + public body?: (string|null); + public caption?: (string|null); + public lng?: (number|null); + public isLive?: (boolean|null); + public lat?: (number|null); + public paymentAmount1000?: (number|null); + public paymentNoteMsgBody?: (string|null); + public matchedText?: (string|null); + public title?: (string|null); + public description?: (string|null); + public futureproofBuffer?: (Uint8Array|null); + public clientUrl?: (string|null); + public loc?: (string|null); + public pollName?: (string|null); public pollOptions: proto.MsgOpaqueData.IPollOption[]; - public pollSelectableOptionsCount: number; - public messageSecret: Uint8Array; - public originalSelfAuthor: string; - public senderTimestampMs: (number|Long); - public pollUpdateParentKey: string; + public pollSelectableOptionsCount?: (number|null); + public messageSecret?: (Uint8Array|null); + public originalSelfAuthor?: (string|null); + public senderTimestampMs?: (number|Long|null); + public pollUpdateParentKey?: (string|null); public encPollVote?: (proto.IPollEncValue|null); - public isSentCagPollCreation: boolean; - public pollContentType: proto.MsgOpaqueData.PollContentType; - public pollType: proto.MsgOpaqueData.PollType; - public correctOptionIndex: number; + public isSentCagPollCreation?: (boolean|null); + public pollContentType?: (proto.MsgOpaqueData.PollContentType|null); + public pollType?: (proto.MsgOpaqueData.PollType|null); + public correctOptionIndex?: (number|null); public pollVotesSnapshot?: (proto.MsgOpaqueData.IPollVotesSnapshot|null); - public encReactionTargetMessageKey: string; - public encReactionEncPayload: Uint8Array; - public encReactionEncIv: Uint8Array; - public botMessageSecret: Uint8Array; - public targetMessageKey: string; - public encPayload: Uint8Array; - public encIv: Uint8Array; - public eventName: string; - public isEventCanceled: boolean; - public eventDescription: string; - public eventJoinLink: string; - public eventStartTime: (number|Long); + public encReactionTargetMessageKey?: (string|null); + public encReactionEncPayload?: (Uint8Array|null); + public encReactionEncIv?: (Uint8Array|null); + public botMessageSecret?: (Uint8Array|null); + public targetMessageKey?: (string|null); + public encPayload?: (Uint8Array|null); + public encIv?: (Uint8Array|null); + public eventName?: (string|null); + public isEventCanceled?: (boolean|null); + public eventDescription?: (string|null); + public eventJoinLink?: (string|null); + public eventStartTime?: (number|Long|null); public eventLocation?: (proto.MsgOpaqueData.IEventLocation|null); - public eventEndTime: (number|Long); - public eventIsScheduledCall: boolean; - public eventExtraGuestsAllowed: boolean; - public plainProtobufBytes: Uint8Array; - public quarantineExtractedText: string; + public eventEndTime?: (number|Long|null); + public eventIsScheduledCall?: (boolean|null); + public eventExtraGuestsAllowed?: (boolean|null); + public plainProtobufBytes?: (Uint8Array|null); + public quarantineExtractedText?: (string|null); public static create(properties?: proto.IMsgOpaqueData): proto.MsgOpaqueData; public static encode(m: proto.IMsgOpaqueData, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.MsgOpaqueData; @@ -10063,12 +10063,12 @@ export namespace proto { class EventLocation implements IEventLocation { constructor(p?: proto.MsgOpaqueData.IEventLocation); - public degreesLatitude: number; - public degreesLongitude: number; - public name: string; - public address: string; - public url: string; - public jpegThumbnail: Uint8Array; + public degreesLatitude?: (number|null); + public degreesLongitude?: (number|null); + public name?: (string|null); + public address?: (string|null); + public url?: (string|null); + public jpegThumbnail?: (Uint8Array|null); public static create(properties?: proto.MsgOpaqueData.IEventLocation): proto.MsgOpaqueData.EventLocation; public static encode(m: proto.MsgOpaqueData.IEventLocation, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.MsgOpaqueData.EventLocation; @@ -10091,8 +10091,8 @@ export namespace proto { class PollOption implements IPollOption { constructor(p?: proto.MsgOpaqueData.IPollOption); - public name: string; - public hash: string; + public name?: (string|null); + public hash?: (string|null); public static create(properties?: proto.MsgOpaqueData.IPollOption): proto.MsgOpaqueData.PollOption; public static encode(m: proto.MsgOpaqueData.IPollOption, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.MsgOpaqueData.PollOption; @@ -10115,7 +10115,7 @@ export namespace proto { class PollVoteSnapshot implements IPollVoteSnapshot { constructor(p?: proto.MsgOpaqueData.IPollVoteSnapshot); public option?: (proto.MsgOpaqueData.IPollOption|null); - public optionVoteCount: number; + public optionVoteCount?: (number|null); public static create(properties?: proto.MsgOpaqueData.IPollVoteSnapshot): proto.MsgOpaqueData.PollVoteSnapshot; public static encode(m: proto.MsgOpaqueData.IPollVoteSnapshot, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.MsgOpaqueData.PollVoteSnapshot; @@ -10245,8 +10245,8 @@ export namespace proto { class NoiseCertificate implements INoiseCertificate { constructor(p?: proto.INoiseCertificate); - public details: Uint8Array; - public signature: Uint8Array; + public details?: (Uint8Array|null); + public signature?: (Uint8Array|null); public static create(properties?: proto.INoiseCertificate): proto.NoiseCertificate; public static encode(m: proto.INoiseCertificate, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.NoiseCertificate; @@ -10268,11 +10268,11 @@ export namespace proto { class Details implements IDetails { constructor(p?: proto.NoiseCertificate.IDetails); - public serial: number; - public issuer: string; - public expires: (number|Long); - public subject: string; - public key: Uint8Array; + public serial?: (number|null); + public issuer?: (string|null); + public expires?: (number|Long|null); + public subject?: (string|null); + public key?: (Uint8Array|null); public static create(properties?: proto.NoiseCertificate.IDetails): proto.NoiseCertificate.Details; public static encode(m: proto.NoiseCertificate.IDetails, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.NoiseCertificate.Details; @@ -10294,8 +10294,8 @@ export namespace proto { constructor(p?: proto.INotificationMessageInfo); public key?: (proto.IMessageKey|null); public message?: (proto.IMessage|null); - public messageTimestamp: (number|Long); - public participant: string; + public messageTimestamp?: (number|Long|null); + public participant?: (string|null); public static create(properties?: proto.INotificationMessageInfo): proto.NotificationMessageInfo; public static encode(m: proto.INotificationMessageInfo, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.NotificationMessageInfo; @@ -10316,12 +10316,12 @@ export namespace proto { class NotificationSettings implements INotificationSettings { constructor(p?: proto.INotificationSettings); - public messageVibrate: string; - public messagePopup: string; - public messageLight: string; - public lowPriorityNotifications: boolean; - public reactionsMuted: boolean; - public callVibrate: string; + public messageVibrate?: (string|null); + public messagePopup?: (string|null); + public messageLight?: (string|null); + public lowPriorityNotifications?: (boolean|null); + public reactionsMuted?: (boolean|null); + public callVibrate?: (string|null); public static create(properties?: proto.INotificationSettings): proto.NotificationSettings; public static encode(m: proto.INotificationSettings, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.NotificationSettings; @@ -10339,9 +10339,9 @@ export namespace proto { class PairingRequest implements IPairingRequest { constructor(p?: proto.IPairingRequest); - public companionPublicKey: Uint8Array; - public companionIdentityKey: Uint8Array; - public advSecret: Uint8Array; + public companionPublicKey?: (Uint8Array|null); + public companionIdentityKey?: (Uint8Array|null); + public advSecret?: (Uint8Array|null); public static create(properties?: proto.IPairingRequest): proto.PairingRequest; public static encode(m: proto.IPairingRequest, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.PairingRequest; @@ -10359,9 +10359,9 @@ export namespace proto { class PastParticipant implements IPastParticipant { constructor(p?: proto.IPastParticipant); - public userJid: string; - public leaveReason: proto.PastParticipant.LeaveReason; - public leaveTs: (number|Long); + public userJid?: (string|null); + public leaveReason?: (proto.PastParticipant.LeaveReason|null); + public leaveTs?: (number|Long|null); public static create(properties?: proto.IPastParticipant): proto.PastParticipant; public static encode(m: proto.IPastParticipant, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.PastParticipant; @@ -10386,7 +10386,7 @@ export namespace proto { class PastParticipants implements IPastParticipants { constructor(p?: proto.IPastParticipants); - public groupJid: string; + public groupJid?: (string|null); public pastParticipants: proto.IPastParticipant[]; public static create(properties?: proto.IPastParticipants): proto.PastParticipants; public static encode(m: proto.IPastParticipants, w?: $protobuf.Writer): $protobuf.Writer; @@ -10413,17 +10413,17 @@ export namespace proto { class PatchDebugData implements IPatchDebugData { constructor(p?: proto.IPatchDebugData); - public currentLthash: Uint8Array; - public newLthash: Uint8Array; - public patchVersion: Uint8Array; - public collectionName: Uint8Array; - public firstFourBytesFromAHashOfSnapshotMacKey: Uint8Array; - public newLthashSubtract: Uint8Array; - public numberAdd: number; - public numberRemove: number; - public numberOverride: number; - public senderPlatform: proto.PatchDebugData.Platform; - public isSenderPrimary: boolean; + public currentLthash?: (Uint8Array|null); + public newLthash?: (Uint8Array|null); + public patchVersion?: (Uint8Array|null); + public collectionName?: (Uint8Array|null); + public firstFourBytesFromAHashOfSnapshotMacKey?: (Uint8Array|null); + public newLthashSubtract?: (Uint8Array|null); + public numberAdd?: (number|null); + public numberRemove?: (number|null); + public numberOverride?: (number|null); + public senderPlatform?: (proto.PatchDebugData.Platform|null); + public isSenderPrimary?: (boolean|null); public static create(properties?: proto.IPatchDebugData): proto.PatchDebugData; public static encode(m: proto.IPatchDebugData, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.PatchDebugData; @@ -10466,16 +10466,16 @@ export namespace proto { class PaymentBackground implements IPaymentBackground { constructor(p?: proto.IPaymentBackground); - public id: string; - public fileLength: (number|Long); - public width: number; - public height: number; - public mimetype: string; - public placeholderArgb: number; - public textArgb: number; - public subtextArgb: number; + public id?: (string|null); + public fileLength?: (number|Long|null); + public width?: (number|null); + public height?: (number|null); + public mimetype?: (string|null); + public placeholderArgb?: (number|null); + public textArgb?: (number|null); + public subtextArgb?: (number|null); public mediaData?: (proto.PaymentBackground.IMediaData|null); - public type: proto.PaymentBackground.Type; + public type?: (proto.PaymentBackground.Type|null); public static create(properties?: proto.IPaymentBackground): proto.PaymentBackground; public static encode(m: proto.IPaymentBackground, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.PaymentBackground; @@ -10497,11 +10497,11 @@ export namespace proto { class MediaData implements IMediaData { constructor(p?: proto.PaymentBackground.IMediaData); - public mediaKey: Uint8Array; - public mediaKeyTimestamp: (number|Long); - public fileSha256: Uint8Array; - public fileEncSha256: Uint8Array; - public directPath: string; + public mediaKey?: (Uint8Array|null); + public mediaKeyTimestamp?: (number|Long|null); + public fileSha256?: (Uint8Array|null); + public fileEncSha256?: (Uint8Array|null); + public directPath?: (string|null); public static create(properties?: proto.PaymentBackground.IMediaData): proto.PaymentBackground.MediaData; public static encode(m: proto.PaymentBackground.IMediaData, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.PaymentBackground.MediaData; @@ -10535,17 +10535,17 @@ export namespace proto { class PaymentInfo implements IPaymentInfo { constructor(p?: proto.IPaymentInfo); - public currencyDeprecated: proto.PaymentInfo.Currency; - public amount1000: (number|Long); - public receiverJid: string; - public status: proto.PaymentInfo.Status; - public transactionTimestamp: (number|Long); + public currencyDeprecated?: (proto.PaymentInfo.Currency|null); + public amount1000?: (number|Long|null); + public receiverJid?: (string|null); + public status?: (proto.PaymentInfo.Status|null); + public transactionTimestamp?: (number|Long|null); public requestMessageKey?: (proto.IMessageKey|null); - public expiryTimestamp: (number|Long); - public futureproofed: boolean; - public currency: string; - public txnStatus: proto.PaymentInfo.TxnStatus; - public useNoviFiatFormat: boolean; + public expiryTimestamp?: (number|Long|null); + public futureproofed?: (boolean|null); + public currency?: (string|null); + public txnStatus?: (proto.PaymentInfo.TxnStatus|null); + public useNoviFiatFormat?: (boolean|null); public primaryAmount?: (proto.IMoney|null); public exchangeAmount?: (proto.IMoney|null); public static create(properties?: proto.IPaymentInfo): proto.PaymentInfo; @@ -10622,8 +10622,8 @@ export namespace proto { class PhoneNumberToLIDMapping implements IPhoneNumberToLIDMapping { constructor(p?: proto.IPhoneNumberToLIDMapping); - public pnJid: string; - public lidJid: string; + public pnJid?: (string|null); + public lidJid?: (string|null); public static create(properties?: proto.IPhoneNumberToLIDMapping): proto.PhoneNumberToLIDMapping; public static encode(m: proto.IPhoneNumberToLIDMapping, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.PhoneNumberToLIDMapping; @@ -10641,9 +10641,9 @@ export namespace proto { class PhotoChange implements IPhotoChange { constructor(p?: proto.IPhotoChange); - public oldPhoto: Uint8Array; - public newPhoto: Uint8Array; - public newPhotoId: number; + public oldPhoto?: (Uint8Array|null); + public newPhoto?: (Uint8Array|null); + public newPhotoId?: (number|null); public static create(properties?: proto.IPhotoChange): proto.PhotoChange; public static encode(m: proto.IPhotoChange, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.PhotoChange; @@ -10663,10 +10663,10 @@ export namespace proto { class PinInChat implements IPinInChat { constructor(p?: proto.IPinInChat); - public type: proto.PinInChat.Type; + public type?: (proto.PinInChat.Type|null); public key?: (proto.IMessageKey|null); - public senderTimestampMs: (number|Long); - public serverTimestampMs: (number|Long); + public senderTimestampMs?: (number|Long|null); + public serverTimestampMs?: (number|Long|null); public messageAddOnContextInfo?: (proto.IMessageAddOnContextInfo|null); public static create(properties?: proto.IPinInChat): proto.PinInChat; public static encode(m: proto.IPinInChat, w?: $protobuf.Writer): $protobuf.Writer; @@ -10695,10 +10695,10 @@ export namespace proto { class Point implements IPoint { constructor(p?: proto.IPoint); - public xDeprecated: number; - public yDeprecated: number; - public x: number; - public y: number; + public xDeprecated?: (number|null); + public yDeprecated?: (number|null); + public x?: (number|null); + public y?: (number|null); public static create(properties?: proto.IPoint): proto.Point; public static encode(m: proto.IPoint, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Point; @@ -10714,7 +10714,7 @@ export namespace proto { class PollAdditionalMetadata implements IPollAdditionalMetadata { constructor(p?: proto.IPollAdditionalMetadata); - public pollInvalidated: boolean; + public pollInvalidated?: (boolean|null); public static create(properties?: proto.IPollAdditionalMetadata): proto.PollAdditionalMetadata; public static encode(m: proto.IPollAdditionalMetadata, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.PollAdditionalMetadata; @@ -10731,8 +10731,8 @@ export namespace proto { class PollEncValue implements IPollEncValue { constructor(p?: proto.IPollEncValue); - public encPayload: Uint8Array; - public encIv: Uint8Array; + public encPayload?: (Uint8Array|null); + public encIv?: (Uint8Array|null); public static create(properties?: proto.IPollEncValue): proto.PollEncValue; public static encode(m: proto.IPollEncValue, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.PollEncValue; @@ -10754,9 +10754,9 @@ export namespace proto { constructor(p?: proto.IPollUpdate); public pollUpdateMessageKey?: (proto.IMessageKey|null); public vote?: (proto.Message.IPollVoteMessage|null); - public senderTimestampMs: (number|Long); - public serverTimestampMs: (number|Long); - public unread: boolean; + public senderTimestampMs?: (number|Long|null); + public serverTimestampMs?: (number|Long|null); + public unread?: (boolean|null); public static create(properties?: proto.IPollUpdate): proto.PollUpdate; public static encode(m: proto.IPollUpdate, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.PollUpdate; @@ -10774,9 +10774,9 @@ export namespace proto { class PreKeyRecordStructure implements IPreKeyRecordStructure { constructor(p?: proto.IPreKeyRecordStructure); - public id: number; - public publicKey: Uint8Array; - public privateKey: Uint8Array; + public id?: (number|null); + public publicKey?: (Uint8Array|null); + public privateKey?: (Uint8Array|null); public static create(properties?: proto.IPreKeyRecordStructure): proto.PreKeyRecordStructure; public static encode(m: proto.IPreKeyRecordStructure, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.PreKeyRecordStructure; @@ -10797,12 +10797,12 @@ export namespace proto { class PreKeySignalMessage implements IPreKeySignalMessage { constructor(p?: proto.IPreKeySignalMessage); - public registrationId: number; - public preKeyId: number; - public signedPreKeyId: number; - public baseKey: Uint8Array; - public identityKey: Uint8Array; - public message: Uint8Array; + public registrationId?: (number|null); + public preKeyId?: (number|null); + public signedPreKeyId?: (number|null); + public baseKey?: (Uint8Array|null); + public identityKey?: (Uint8Array|null); + public message?: (Uint8Array|null); public static create(properties?: proto.IPreKeySignalMessage): proto.PreKeySignalMessage; public static encode(m: proto.IPreKeySignalMessage, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.PreKeySignalMessage; @@ -10818,7 +10818,7 @@ export namespace proto { class PremiumMessageInfo implements IPremiumMessageInfo { constructor(p?: proto.IPremiumMessageInfo); - public serverCampaignId: string; + public serverCampaignId?: (string|null); public static create(properties?: proto.IPremiumMessageInfo): proto.PremiumMessageInfo; public static encode(m: proto.IPremiumMessageInfo, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.PremiumMessageInfo; @@ -10835,8 +10835,8 @@ export namespace proto { class PrimaryEphemeralIdentity implements IPrimaryEphemeralIdentity { constructor(p?: proto.IPrimaryEphemeralIdentity); - public publicKey: Uint8Array; - public nonce: Uint8Array; + public publicKey?: (Uint8Array|null); + public nonce?: (Uint8Array|null); public static create(properties?: proto.IPrimaryEphemeralIdentity): proto.PrimaryEphemeralIdentity; public static encode(m: proto.IPrimaryEphemeralIdentity, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.PrimaryEphemeralIdentity; @@ -10865,13 +10865,13 @@ export namespace proto { class ProcessedVideo implements IProcessedVideo { constructor(p?: proto.IProcessedVideo); - public directPath: string; - public fileSha256: Uint8Array; - public height: number; - public width: number; - public fileLength: (number|Long); - public bitrate: number; - public quality: proto.ProcessedVideo.VideoQuality; + public directPath?: (string|null); + public fileSha256?: (Uint8Array|null); + public height?: (number|null); + public width?: (number|null); + public fileLength?: (number|Long|null); + public bitrate?: (number|null); + public quality?: (proto.ProcessedVideo.VideoQuality|null); public capabilities: string[]; public static create(properties?: proto.IProcessedVideo): proto.ProcessedVideo; public static encode(m: proto.IProcessedVideo, w?: $protobuf.Writer): $protobuf.Writer; @@ -10899,7 +10899,7 @@ export namespace proto { class ProloguePayload implements IProloguePayload { constructor(p?: proto.IProloguePayload); - public companionEphemeralIdentity: Uint8Array; + public companionEphemeralIdentity?: (Uint8Array|null); public commitment?: (proto.ICompanionCommitment|null); public static create(properties?: proto.IProloguePayload): proto.ProloguePayload; public static encode(m: proto.IProloguePayload, w?: $protobuf.Writer): $protobuf.Writer; @@ -10917,8 +10917,8 @@ export namespace proto { class Pushname implements IPushname { constructor(p?: proto.IPushname); - public id: string; - public pushname: string; + public id?: (string|null); + public pushname?: (string|null); public static create(properties?: proto.IPushname): proto.Pushname; public static encode(m: proto.IPushname, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Pushname; @@ -10935,8 +10935,8 @@ export namespace proto { class QuarantinedMessage implements IQuarantinedMessage { constructor(p?: proto.IQuarantinedMessage); - public originalData: Uint8Array; - public extractedText: string; + public originalData?: (Uint8Array|null); + public extractedText?: (string|null); public static create(properties?: proto.IQuarantinedMessage): proto.QuarantinedMessage; public static encode(m: proto.IQuarantinedMessage, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.QuarantinedMessage; @@ -10957,10 +10957,10 @@ export namespace proto { class Reaction implements IReaction { constructor(p?: proto.IReaction); public key?: (proto.IMessageKey|null); - public text: string; - public groupingKey: string; - public senderTimestampMs: (number|Long); - public unread: boolean; + public text?: (string|null); + public groupingKey?: (string|null); + public senderTimestampMs?: (number|Long|null); + public unread?: (boolean|null); public static create(properties?: proto.IReaction): proto.Reaction; public static encode(m: proto.IReaction, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Reaction; @@ -10977,8 +10977,8 @@ export namespace proto { class RecentEmojiWeight implements IRecentEmojiWeight { constructor(p?: proto.IRecentEmojiWeight); - public emoji: string; - public weight: number; + public emoji?: (string|null); + public weight?: (number|null); public static create(properties?: proto.IRecentEmojiWeight): proto.RecentEmojiWeight; public static encode(m: proto.IRecentEmojiWeight, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.RecentEmojiWeight; @@ -11015,10 +11015,10 @@ export namespace proto { class Reportable implements IReportable { constructor(p?: proto.IReportable); - public minVersion: number; - public maxVersion: number; - public notReportableMinVersion: number; - public never: boolean; + public minVersion?: (number|null); + public maxVersion?: (number|null); + public notReportableMinVersion?: (number|null); + public never?: (boolean|null); public static create(properties?: proto.IReportable): proto.Reportable; public static encode(m: proto.IReportable, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Reportable; @@ -11034,7 +11034,7 @@ export namespace proto { class ReportingTokenInfo implements IReportingTokenInfo { constructor(p?: proto.IReportingTokenInfo); - public reportingTag: Uint8Array; + public reportingTag?: (Uint8Array|null); public static create(properties?: proto.IReportingTokenInfo): proto.ReportingTokenInfo; public static encode(m: proto.IReportingTokenInfo, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.ReportingTokenInfo; @@ -11053,10 +11053,10 @@ export namespace proto { class SenderKeyDistributionMessage implements ISenderKeyDistributionMessage { constructor(p?: proto.ISenderKeyDistributionMessage); - public id: number; - public iteration: number; - public chainKey: Uint8Array; - public signingKey: Uint8Array; + public id?: (number|null); + public iteration?: (number|null); + public chainKey?: (Uint8Array|null); + public signingKey?: (Uint8Array|null); public static create(properties?: proto.ISenderKeyDistributionMessage): proto.SenderKeyDistributionMessage; public static encode(m: proto.ISenderKeyDistributionMessage, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.SenderKeyDistributionMessage; @@ -11074,9 +11074,9 @@ export namespace proto { class SenderKeyMessage implements ISenderKeyMessage { constructor(p?: proto.ISenderKeyMessage); - public id: number; - public iteration: number; - public ciphertext: Uint8Array; + public id?: (number|null); + public iteration?: (number|null); + public ciphertext?: (Uint8Array|null); public static create(properties?: proto.ISenderKeyMessage): proto.SenderKeyMessage; public static encode(m: proto.ISenderKeyMessage, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.SenderKeyMessage; @@ -11111,7 +11111,7 @@ export namespace proto { class SenderKeyStateStructure implements ISenderKeyStateStructure { constructor(p?: proto.ISenderKeyStateStructure); - public senderKeyId: number; + public senderKeyId?: (number|null); public senderChainKey?: (proto.SenderKeyStateStructure.ISenderChainKey|null); public senderSigningKey?: (proto.SenderKeyStateStructure.ISenderSigningKey|null); public senderMessageKeys: proto.SenderKeyStateStructure.ISenderMessageKey[]; @@ -11133,8 +11133,8 @@ export namespace proto { class SenderChainKey implements ISenderChainKey { constructor(p?: proto.SenderKeyStateStructure.ISenderChainKey); - public iteration: number; - public seed: Uint8Array; + public iteration?: (number|null); + public seed?: (Uint8Array|null); public static create(properties?: proto.SenderKeyStateStructure.ISenderChainKey): proto.SenderKeyStateStructure.SenderChainKey; public static encode(m: proto.SenderKeyStateStructure.ISenderChainKey, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.SenderKeyStateStructure.SenderChainKey; @@ -11151,8 +11151,8 @@ export namespace proto { class SenderMessageKey implements ISenderMessageKey { constructor(p?: proto.SenderKeyStateStructure.ISenderMessageKey); - public iteration: number; - public seed: Uint8Array; + public iteration?: (number|null); + public seed?: (Uint8Array|null); public static create(properties?: proto.SenderKeyStateStructure.ISenderMessageKey): proto.SenderKeyStateStructure.SenderMessageKey; public static encode(m: proto.SenderKeyStateStructure.ISenderMessageKey, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.SenderKeyStateStructure.SenderMessageKey; @@ -11169,8 +11169,8 @@ export namespace proto { class SenderSigningKey implements ISenderSigningKey { constructor(p?: proto.SenderKeyStateStructure.ISenderSigningKey); - public public: Uint8Array; - public private: Uint8Array; + public public?: (Uint8Array|null); + public private?: (Uint8Array|null); public static create(properties?: proto.SenderKeyStateStructure.ISenderSigningKey): proto.SenderKeyStateStructure.SenderSigningKey; public static encode(m: proto.SenderKeyStateStructure.ISenderSigningKey, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.SenderKeyStateStructure.SenderSigningKey; @@ -11187,7 +11187,7 @@ export namespace proto { class ServerErrorReceipt implements IServerErrorReceipt { constructor(p?: proto.IServerErrorReceipt); - public stanzaId: string; + public stanzaId?: (string|null); public static create(properties?: proto.IServerErrorReceipt): proto.ServerErrorReceipt; public static encode(m: proto.IServerErrorReceipt, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.ServerErrorReceipt; @@ -11215,19 +11215,19 @@ export namespace proto { class SessionStructure implements ISessionStructure { constructor(p?: proto.ISessionStructure); - public sessionVersion: number; - public localIdentityPublic: Uint8Array; - public remoteIdentityPublic: Uint8Array; - public rootKey: Uint8Array; - public previousCounter: number; + public sessionVersion?: (number|null); + public localIdentityPublic?: (Uint8Array|null); + public remoteIdentityPublic?: (Uint8Array|null); + public rootKey?: (Uint8Array|null); + public previousCounter?: (number|null); public senderChain?: (proto.SessionStructure.IChain|null); public receiverChains: proto.SessionStructure.IChain[]; public pendingKeyExchange?: (proto.SessionStructure.IPendingKeyExchange|null); public pendingPreKey?: (proto.SessionStructure.IPendingPreKey|null); - public remoteRegistrationId: number; - public localRegistrationId: number; - public needsRefresh: boolean; - public aliceBaseKey: Uint8Array; + public remoteRegistrationId?: (number|null); + public localRegistrationId?: (number|null); + public needsRefresh?: (boolean|null); + public aliceBaseKey?: (Uint8Array|null); public static create(properties?: proto.ISessionStructure): proto.SessionStructure; public static encode(m: proto.ISessionStructure, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.SessionStructure; @@ -11248,8 +11248,8 @@ export namespace proto { class Chain implements IChain { constructor(p?: proto.SessionStructure.IChain); - public senderRatchetKey: Uint8Array; - public senderRatchetKeyPrivate: Uint8Array; + public senderRatchetKey?: (Uint8Array|null); + public senderRatchetKeyPrivate?: (Uint8Array|null); public chainKey?: (proto.SessionStructure.Chain.IChainKey|null); public messageKeys: proto.SessionStructure.Chain.IMessageKey[]; public static create(properties?: proto.SessionStructure.IChain): proto.SessionStructure.Chain; @@ -11270,8 +11270,8 @@ export namespace proto { class ChainKey implements IChainKey { constructor(p?: proto.SessionStructure.Chain.IChainKey); - public index: number; - public key: Uint8Array; + public index?: (number|null); + public key?: (Uint8Array|null); public static create(properties?: proto.SessionStructure.Chain.IChainKey): proto.SessionStructure.Chain.ChainKey; public static encode(m: proto.SessionStructure.Chain.IChainKey, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.SessionStructure.Chain.ChainKey; @@ -11290,10 +11290,10 @@ export namespace proto { class MessageKey implements IMessageKey { constructor(p?: proto.SessionStructure.Chain.IMessageKey); - public index: number; - public cipherKey: Uint8Array; - public macKey: Uint8Array; - public iv: Uint8Array; + public index?: (number|null); + public cipherKey?: (Uint8Array|null); + public macKey?: (Uint8Array|null); + public iv?: (Uint8Array|null); public static create(properties?: proto.SessionStructure.Chain.IMessageKey): proto.SessionStructure.Chain.MessageKey; public static encode(m: proto.SessionStructure.Chain.IMessageKey, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.SessionStructure.Chain.MessageKey; @@ -11316,13 +11316,13 @@ export namespace proto { class PendingKeyExchange implements IPendingKeyExchange { constructor(p?: proto.SessionStructure.IPendingKeyExchange); - public sequence: number; - public localBaseKey: Uint8Array; - public localBaseKeyPrivate: Uint8Array; - public localRatchetKey: Uint8Array; - public localRatchetKeyPrivate: Uint8Array; - public localIdentityKey: Uint8Array; - public localIdentityKeyPrivate: Uint8Array; + public sequence?: (number|null); + public localBaseKey?: (Uint8Array|null); + public localBaseKeyPrivate?: (Uint8Array|null); + public localRatchetKey?: (Uint8Array|null); + public localRatchetKeyPrivate?: (Uint8Array|null); + public localIdentityKey?: (Uint8Array|null); + public localIdentityKeyPrivate?: (Uint8Array|null); public static create(properties?: proto.SessionStructure.IPendingKeyExchange): proto.SessionStructure.PendingKeyExchange; public static encode(m: proto.SessionStructure.IPendingKeyExchange, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.SessionStructure.PendingKeyExchange; @@ -11340,9 +11340,9 @@ export namespace proto { class PendingPreKey implements IPendingPreKey { constructor(p?: proto.SessionStructure.IPendingPreKey); - public preKeyId: number; - public signedPreKeyId: number; - public baseKey: Uint8Array; + public preKeyId?: (number|null); + public signedPreKeyId?: (number|null); + public baseKey?: (Uint8Array|null); public static create(properties?: proto.SessionStructure.IPendingPreKey): proto.SessionStructure.PendingPreKey; public static encode(m: proto.SessionStructure.IPendingPreKey, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.SessionStructure.PendingPreKey; @@ -11361,9 +11361,9 @@ export namespace proto { class SessionTransparencyMetadata implements ISessionTransparencyMetadata { constructor(p?: proto.ISessionTransparencyMetadata); - public disclaimerText: string; - public hcaId: string; - public sessionTransparencyType: proto.SessionTransparencyType; + public disclaimerText?: (string|null); + public hcaId?: (string|null); + public sessionTransparencyType?: (proto.SessionTransparencyType|null); public static create(properties?: proto.ISessionTransparencyMetadata): proto.SessionTransparencyMetadata; public static encode(m: proto.ISessionTransparencyMetadata, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.SessionTransparencyMetadata; @@ -11387,10 +11387,10 @@ export namespace proto { class SignalMessage implements ISignalMessage { constructor(p?: proto.ISignalMessage); - public ratchetKey: Uint8Array; - public counter: number; - public previousCounter: number; - public ciphertext: Uint8Array; + public ratchetKey?: (Uint8Array|null); + public counter?: (number|null); + public previousCounter?: (number|null); + public ciphertext?: (Uint8Array|null); public static create(properties?: proto.ISignalMessage): proto.SignalMessage; public static encode(m: proto.ISignalMessage, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.SignalMessage; @@ -11410,11 +11410,11 @@ export namespace proto { class SignedPreKeyRecordStructure implements ISignedPreKeyRecordStructure { constructor(p?: proto.ISignedPreKeyRecordStructure); - public id: number; - public publicKey: Uint8Array; - public privateKey: Uint8Array; - public signature: Uint8Array; - public timestamp: (number|Long); + public id?: (number|null); + public publicKey?: (Uint8Array|null); + public privateKey?: (Uint8Array|null); + public signature?: (Uint8Array|null); + public timestamp?: (number|Long|null); public static create(properties?: proto.ISignedPreKeyRecordStructure): proto.SignedPreKeyRecordStructure; public static encode(m: proto.ISignedPreKeyRecordStructure, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.SignedPreKeyRecordStructure; @@ -11437,8 +11437,8 @@ export namespace proto { class StatusAttribution implements IStatusAttribution { constructor(p?: proto.IStatusAttribution); - public type: proto.StatusAttribution.Type; - public actionUrl: string; + public type?: (proto.StatusAttribution.Type|null); + public actionUrl?: (string|null); public statusReshare?: (proto.StatusAttribution.IStatusReshare|null); public externalShare?: (proto.StatusAttribution.IExternalShare|null); public music?: (proto.StatusAttribution.IMusic|null); @@ -11463,7 +11463,7 @@ export namespace proto { class AiCreatedAttribution implements IAiCreatedAttribution { constructor(p?: proto.StatusAttribution.IAiCreatedAttribution); - public source: proto.StatusAttribution.AiCreatedAttribution.Source; + public source?: (proto.StatusAttribution.AiCreatedAttribution.Source|null); public static create(properties?: proto.StatusAttribution.IAiCreatedAttribution): proto.StatusAttribution.AiCreatedAttribution; public static encode(m: proto.StatusAttribution.IAiCreatedAttribution, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.StatusAttribution.AiCreatedAttribution; @@ -11490,10 +11490,10 @@ export namespace proto { class ExternalShare implements IExternalShare { constructor(p?: proto.StatusAttribution.IExternalShare); - public actionUrl: string; - public source: proto.StatusAttribution.ExternalShare.Source; - public duration: number; - public actionFallbackUrl: string; + public actionUrl?: (string|null); + public source?: (proto.StatusAttribution.ExternalShare.Source|null); + public duration?: (number|null); + public actionFallbackUrl?: (string|null); public static create(properties?: proto.StatusAttribution.IExternalShare): proto.StatusAttribution.ExternalShare; public static encode(m: proto.StatusAttribution.IExternalShare, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.StatusAttribution.ExternalShare; @@ -11526,7 +11526,7 @@ export namespace proto { class GroupStatus implements IGroupStatus { constructor(p?: proto.StatusAttribution.IGroupStatus); - public authorJid: string; + public authorJid?: (string|null); public static create(properties?: proto.StatusAttribution.IGroupStatus): proto.StatusAttribution.GroupStatus; public static encode(m: proto.StatusAttribution.IGroupStatus, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.StatusAttribution.GroupStatus; @@ -11547,12 +11547,12 @@ export namespace proto { class Music implements IMusic { constructor(p?: proto.StatusAttribution.IMusic); - public authorName: string; - public songId: string; - public title: string; - public author: string; - public artistAttribution: string; - public isExplicit: boolean; + public authorName?: (string|null); + public songId?: (string|null); + public title?: (string|null); + public author?: (string|null); + public artistAttribution?: (string|null); + public isExplicit?: (boolean|null); public static create(properties?: proto.StatusAttribution.IMusic): proto.StatusAttribution.Music; public static encode(m: proto.StatusAttribution.IMusic, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.StatusAttribution.Music; @@ -11568,7 +11568,7 @@ export namespace proto { class RLAttribution implements IRLAttribution { constructor(p?: proto.StatusAttribution.IRLAttribution); - public source: proto.StatusAttribution.RLAttribution.Source; + public source?: (proto.StatusAttribution.RLAttribution.Source|null); public static create(properties?: proto.StatusAttribution.IRLAttribution): proto.StatusAttribution.RLAttribution; public static encode(m: proto.StatusAttribution.IRLAttribution, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.StatusAttribution.RLAttribution; @@ -11595,7 +11595,7 @@ export namespace proto { class StatusReshare implements IStatusReshare { constructor(p?: proto.StatusAttribution.IStatusReshare); - public source: proto.StatusAttribution.StatusReshare.Source; + public source?: (proto.StatusAttribution.StatusReshare.Source|null); public metadata?: (proto.StatusAttribution.StatusReshare.IMetadata|null); public static create(properties?: proto.StatusAttribution.IStatusReshare): proto.StatusAttribution.StatusReshare; public static encode(m: proto.StatusAttribution.IStatusReshare, w?: $protobuf.Writer): $protobuf.Writer; @@ -11617,10 +11617,10 @@ export namespace proto { class Metadata implements IMetadata { constructor(p?: proto.StatusAttribution.StatusReshare.IMetadata); - public duration: number; - public channelJid: string; - public channelMessageId: number; - public hasMultipleReshares: boolean; + public duration?: (number|null); + public channelJid?: (string|null); + public channelMessageId?: (number|null); + public hasMultipleReshares?: (boolean|null); public static create(properties?: proto.StatusAttribution.StatusReshare.IMetadata): proto.StatusAttribution.StatusReshare.Metadata; public static encode(m: proto.StatusAttribution.StatusReshare.IMetadata, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.StatusAttribution.StatusReshare.Metadata; @@ -11670,14 +11670,14 @@ export namespace proto { } interface IStatusPSA { - campaignId: (number|Long); + campaignId?: (number|Long|null); campaignExpirationTimestamp?: (number|Long|null); } class StatusPSA implements IStatusPSA { constructor(p?: proto.IStatusPSA); - public campaignId: (number|Long); - public campaignExpirationTimestamp: (number|Long); + public campaignId?: (number|Long|null); + public campaignExpirationTimestamp?: (number|Long|null); public static create(properties?: proto.IStatusPSA): proto.StatusPSA; public static encode(m: proto.IStatusPSA, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.StatusPSA; @@ -11706,20 +11706,20 @@ export namespace proto { class StickerMetadata implements IStickerMetadata { constructor(p?: proto.IStickerMetadata); - public url: string; - public fileSha256: Uint8Array; - public fileEncSha256: Uint8Array; - public mediaKey: Uint8Array; - public mimetype: string; - public height: number; - public width: number; - public directPath: string; - public fileLength: (number|Long); - public weight: number; - public lastStickerSentTs: (number|Long); - public isLottie: boolean; - public imageHash: string; - public isAvatarSticker: boolean; + public url?: (string|null); + public fileSha256?: (Uint8Array|null); + public fileEncSha256?: (Uint8Array|null); + public mediaKey?: (Uint8Array|null); + public mimetype?: (string|null); + public height?: (number|null); + public width?: (number|null); + public directPath?: (string|null); + public fileLength?: (number|Long|null); + public weight?: (number|null); + public lastStickerSentTs?: (number|Long|null); + public isLottie?: (boolean|null); + public imageHash?: (string|null); + public isAvatarSticker?: (boolean|null); public static create(properties?: proto.IStickerMetadata): proto.StickerMetadata; public static encode(m: proto.IStickerMetadata, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.StickerMetadata; @@ -11738,10 +11738,10 @@ export namespace proto { class SyncActionData implements ISyncActionData { constructor(p?: proto.ISyncActionData); - public index: Uint8Array; + public index?: (Uint8Array|null); public value?: (proto.ISyncActionValue|null); - public padding: Uint8Array; - public version: number; + public padding?: (Uint8Array|null); + public version?: (number|null); public static create(properties?: proto.ISyncActionData): proto.SyncActionData; public static encode(m: proto.ISyncActionData, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.SyncActionData; @@ -11825,7 +11825,7 @@ export namespace proto { class SyncActionValue implements ISyncActionValue { constructor(p?: proto.ISyncActionValue); - public timestamp: (number|Long); + public timestamp?: (number|Long|null); public starAction?: (proto.SyncActionValue.IStarAction|null); public contactAction?: (proto.SyncActionValue.IContactAction|null); public muteAction?: (proto.SyncActionValue.IMuteAction|null); @@ -11913,9 +11913,9 @@ export namespace proto { class AgentAction implements IAgentAction { constructor(p?: proto.SyncActionValue.IAgentAction); - public name: string; - public deviceID: number; - public isDeleted: boolean; + public name?: (string|null); + public deviceID?: (number|null); + public isDeleted?: (boolean|null); public static create(properties?: proto.SyncActionValue.IAgentAction): proto.SyncActionValue.AgentAction; public static encode(m: proto.SyncActionValue.IAgentAction, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.SyncActionValue.AgentAction; @@ -11931,7 +11931,7 @@ export namespace proto { class AiThreadRenameAction implements IAiThreadRenameAction { constructor(p?: proto.SyncActionValue.IAiThreadRenameAction); - public newTitle: string; + public newTitle?: (string|null); public static create(properties?: proto.SyncActionValue.IAiThreadRenameAction): proto.SyncActionValue.AiThreadRenameAction; public static encode(m: proto.SyncActionValue.IAiThreadRenameAction, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.SyncActionValue.AiThreadRenameAction; @@ -11947,7 +11947,7 @@ export namespace proto { class AndroidUnsupportedActions implements IAndroidUnsupportedActions { constructor(p?: proto.SyncActionValue.IAndroidUnsupportedActions); - public allowed: boolean; + public allowed?: (boolean|null); public static create(properties?: proto.SyncActionValue.IAndroidUnsupportedActions): proto.SyncActionValue.AndroidUnsupportedActions; public static encode(m: proto.SyncActionValue.IAndroidUnsupportedActions, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.SyncActionValue.AndroidUnsupportedActions; @@ -11964,7 +11964,7 @@ export namespace proto { class ArchiveChatAction implements IArchiveChatAction { constructor(p?: proto.SyncActionValue.IArchiveChatAction); - public archived: boolean; + public archived?: (boolean|null); public messageRange?: (proto.SyncActionValue.ISyncActionMessageRange|null); public static create(properties?: proto.SyncActionValue.IArchiveChatAction): proto.SyncActionValue.ArchiveChatAction; public static encode(m: proto.SyncActionValue.IArchiveChatAction, w?: $protobuf.Writer): $protobuf.Writer; @@ -11982,7 +11982,7 @@ export namespace proto { class AvatarUpdatedAction implements IAvatarUpdatedAction { constructor(p?: proto.SyncActionValue.IAvatarUpdatedAction); - public eventType: proto.SyncActionValue.AvatarUpdatedAction.AvatarEventType; + public eventType?: (proto.SyncActionValue.AvatarUpdatedAction.AvatarEventType|null); public recentAvatarStickers: proto.SyncActionValue.IStickerAction[]; public static create(properties?: proto.SyncActionValue.IAvatarUpdatedAction): proto.SyncActionValue.AvatarUpdatedAction; public static encode(m: proto.SyncActionValue.IAvatarUpdatedAction, w?: $protobuf.Writer): $protobuf.Writer; @@ -12008,7 +12008,7 @@ export namespace proto { class BotWelcomeRequestAction implements IBotWelcomeRequestAction { constructor(p?: proto.SyncActionValue.IBotWelcomeRequestAction); - public isSent: boolean; + public isSent?: (boolean|null); public static create(properties?: proto.SyncActionValue.IBotWelcomeRequestAction): proto.SyncActionValue.BotWelcomeRequestAction; public static encode(m: proto.SyncActionValue.IBotWelcomeRequestAction, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.SyncActionValue.BotWelcomeRequestAction; @@ -12019,14 +12019,14 @@ export namespace proto { } interface IBroadcastListParticipant { - lidJid: string; + lidJid?: (string|null); pnJid?: (string|null); } class BroadcastListParticipant implements IBroadcastListParticipant { constructor(p?: proto.SyncActionValue.IBroadcastListParticipant); - public lidJid: string; - public pnJid: string; + public lidJid?: (string|null); + public pnJid?: (string|null); public static create(properties?: proto.SyncActionValue.IBroadcastListParticipant): proto.SyncActionValue.BroadcastListParticipant; public static encode(m: proto.SyncActionValue.IBroadcastListParticipant, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.SyncActionValue.BroadcastListParticipant; @@ -12042,7 +12042,7 @@ export namespace proto { class BusinessBroadcastAssociationAction implements IBusinessBroadcastAssociationAction { constructor(p?: proto.SyncActionValue.IBusinessBroadcastAssociationAction); - public deleted: boolean; + public deleted?: (boolean|null); public static create(properties?: proto.SyncActionValue.IBusinessBroadcastAssociationAction): proto.SyncActionValue.BusinessBroadcastAssociationAction; public static encode(m: proto.SyncActionValue.IBusinessBroadcastAssociationAction, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.SyncActionValue.BusinessBroadcastAssociationAction; @@ -12061,9 +12061,9 @@ export namespace proto { class BusinessBroadcastListAction implements IBusinessBroadcastListAction { constructor(p?: proto.SyncActionValue.IBusinessBroadcastListAction); - public deleted: boolean; + public deleted?: (boolean|null); public participants: proto.SyncActionValue.IBroadcastListParticipant[]; - public listName: string; + public listName?: (string|null); public labelIds: string[]; public static create(properties?: proto.SyncActionValue.IBusinessBroadcastListAction): proto.SyncActionValue.BusinessBroadcastListAction; public static encode(m: proto.SyncActionValue.IBusinessBroadcastListAction, w?: $protobuf.Writer): $protobuf.Writer; @@ -12096,7 +12096,7 @@ export namespace proto { class ChatAssignmentAction implements IChatAssignmentAction { constructor(p?: proto.SyncActionValue.IChatAssignmentAction); - public deviceAgentID: string; + public deviceAgentID?: (string|null); public static create(properties?: proto.SyncActionValue.IChatAssignmentAction): proto.SyncActionValue.ChatAssignmentAction; public static encode(m: proto.SyncActionValue.IChatAssignmentAction, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.SyncActionValue.ChatAssignmentAction; @@ -12112,7 +12112,7 @@ export namespace proto { class ChatAssignmentOpenedStatusAction implements IChatAssignmentOpenedStatusAction { constructor(p?: proto.SyncActionValue.IChatAssignmentOpenedStatusAction); - public chatOpened: boolean; + public chatOpened?: (boolean|null); public static create(properties?: proto.SyncActionValue.IChatAssignmentOpenedStatusAction): proto.SyncActionValue.ChatAssignmentOpenedStatusAction; public static encode(m: proto.SyncActionValue.IChatAssignmentOpenedStatusAction, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.SyncActionValue.ChatAssignmentOpenedStatusAction; @@ -12149,12 +12149,12 @@ export namespace proto { class ContactAction implements IContactAction { constructor(p?: proto.SyncActionValue.IContactAction); - public fullName: string; - public firstName: string; - public lidJid: string; - public saveOnPrimaryAddressbook: boolean; - public pnJid: string; - public username: string; + public fullName?: (string|null); + public firstName?: (string|null); + public lidJid?: (string|null); + public saveOnPrimaryAddressbook?: (boolean|null); + public pnJid?: (string|null); + public username?: (string|null); public static create(properties?: proto.SyncActionValue.IContactAction): proto.SyncActionValue.ContactAction; public static encode(m: proto.SyncActionValue.IContactAction, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.SyncActionValue.ContactAction; @@ -12170,7 +12170,7 @@ export namespace proto { class CtwaPerCustomerDataSharingAction implements ICtwaPerCustomerDataSharingAction { constructor(p?: proto.SyncActionValue.ICtwaPerCustomerDataSharingAction); - public isCtwaPerCustomerDataSharingEnabled: boolean; + public isCtwaPerCustomerDataSharingEnabled?: (boolean|null); public static create(properties?: proto.SyncActionValue.ICtwaPerCustomerDataSharingAction): proto.SyncActionValue.CtwaPerCustomerDataSharingAction; public static encode(m: proto.SyncActionValue.ICtwaPerCustomerDataSharingAction, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.SyncActionValue.CtwaPerCustomerDataSharingAction; @@ -12181,17 +12181,17 @@ export namespace proto { } interface ICustomPaymentMethod { - credentialId: string; - country: string; - type: string; + credentialId?: (string|null); + country?: (string|null); + type?: (string|null); metadata?: (proto.SyncActionValue.ICustomPaymentMethodMetadata[]|null); } class CustomPaymentMethod implements ICustomPaymentMethod { constructor(p?: proto.SyncActionValue.ICustomPaymentMethod); - public credentialId: string; - public country: string; - public type: string; + public credentialId?: (string|null); + public country?: (string|null); + public type?: (string|null); public metadata: proto.SyncActionValue.ICustomPaymentMethodMetadata[]; public static create(properties?: proto.SyncActionValue.ICustomPaymentMethod): proto.SyncActionValue.CustomPaymentMethod; public static encode(m: proto.SyncActionValue.ICustomPaymentMethod, w?: $protobuf.Writer): $protobuf.Writer; @@ -12203,14 +12203,14 @@ export namespace proto { } interface ICustomPaymentMethodMetadata { - key: string; - value: string; + key?: (string|null); + value?: (string|null); } class CustomPaymentMethodMetadata implements ICustomPaymentMethodMetadata { constructor(p?: proto.SyncActionValue.ICustomPaymentMethodMetadata); - public key: string; - public value: string; + public key?: (string|null); + public value?: (string|null); public static create(properties?: proto.SyncActionValue.ICustomPaymentMethodMetadata): proto.SyncActionValue.CustomPaymentMethodMetadata; public static encode(m: proto.SyncActionValue.ICustomPaymentMethodMetadata, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.SyncActionValue.CustomPaymentMethodMetadata; @@ -12259,8 +12259,8 @@ export namespace proto { class DeleteIndividualCallLogAction implements IDeleteIndividualCallLogAction { constructor(p?: proto.SyncActionValue.IDeleteIndividualCallLogAction); - public peerJid: string; - public isIncoming: boolean; + public peerJid?: (string|null); + public isIncoming?: (boolean|null); public static create(properties?: proto.SyncActionValue.IDeleteIndividualCallLogAction): proto.SyncActionValue.DeleteIndividualCallLogAction; public static encode(m: proto.SyncActionValue.IDeleteIndividualCallLogAction, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.SyncActionValue.DeleteIndividualCallLogAction; @@ -12277,8 +12277,8 @@ export namespace proto { class DeleteMessageForMeAction implements IDeleteMessageForMeAction { constructor(p?: proto.SyncActionValue.IDeleteMessageForMeAction); - public deleteMedia: boolean; - public messageTimestamp: (number|Long); + public deleteMedia?: (boolean|null); + public messageTimestamp?: (number|Long|null); public static create(properties?: proto.SyncActionValue.IDeleteMessageForMeAction): proto.SyncActionValue.DeleteMessageForMeAction; public static encode(m: proto.SyncActionValue.IDeleteMessageForMeAction, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.SyncActionValue.DeleteMessageForMeAction; @@ -12294,7 +12294,7 @@ export namespace proto { class DetectedOutcomesStatusAction implements IDetectedOutcomesStatusAction { constructor(p?: proto.SyncActionValue.IDetectedOutcomesStatusAction); - public isEnabled: boolean; + public isEnabled?: (boolean|null); public static create(properties?: proto.SyncActionValue.IDetectedOutcomesStatusAction): proto.SyncActionValue.DetectedOutcomesStatusAction; public static encode(m: proto.SyncActionValue.IDetectedOutcomesStatusAction, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.SyncActionValue.DetectedOutcomesStatusAction; @@ -12310,7 +12310,7 @@ export namespace proto { class ExternalWebBetaAction implements IExternalWebBetaAction { constructor(p?: proto.SyncActionValue.IExternalWebBetaAction); - public isOptIn: boolean; + public isOptIn?: (boolean|null); public static create(properties?: proto.SyncActionValue.IExternalWebBetaAction): proto.SyncActionValue.ExternalWebBetaAction; public static encode(m: proto.SyncActionValue.IExternalWebBetaAction, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.SyncActionValue.ExternalWebBetaAction; @@ -12344,7 +12344,7 @@ export namespace proto { class Favorite implements IFavorite { constructor(p?: proto.SyncActionValue.FavoritesAction.IFavorite); - public id: string; + public id?: (string|null); public static create(properties?: proto.SyncActionValue.FavoritesAction.IFavorite): proto.SyncActionValue.FavoritesAction.Favorite; public static encode(m: proto.SyncActionValue.FavoritesAction.IFavorite, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.SyncActionValue.FavoritesAction.Favorite; @@ -12356,12 +12356,12 @@ export namespace proto { } interface IInteractiveMessageAction { - type: proto.SyncActionValue.InteractiveMessageAction.InteractiveMessageActionMode; + type?: (proto.SyncActionValue.InteractiveMessageAction.InteractiveMessageActionMode|null); } class InteractiveMessageAction implements IInteractiveMessageAction { constructor(p?: proto.SyncActionValue.IInteractiveMessageAction); - public type: proto.SyncActionValue.InteractiveMessageAction.InteractiveMessageActionMode; + public type?: (proto.SyncActionValue.InteractiveMessageAction.InteractiveMessageActionMode|null); public static create(properties?: proto.SyncActionValue.IInteractiveMessageAction): proto.SyncActionValue.InteractiveMessageAction; public static encode(m: proto.SyncActionValue.IInteractiveMessageAction, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.SyncActionValue.InteractiveMessageAction; @@ -12384,7 +12384,7 @@ export namespace proto { class KeyExpiration implements IKeyExpiration { constructor(p?: proto.SyncActionValue.IKeyExpiration); - public expiredKeyEpoch: number; + public expiredKeyEpoch?: (number|null); public static create(properties?: proto.SyncActionValue.IKeyExpiration): proto.SyncActionValue.KeyExpiration; public static encode(m: proto.SyncActionValue.IKeyExpiration, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.SyncActionValue.KeyExpiration; @@ -12400,7 +12400,7 @@ export namespace proto { class LabelAssociationAction implements ILabelAssociationAction { constructor(p?: proto.SyncActionValue.ILabelAssociationAction); - public labeled: boolean; + public labeled?: (boolean|null); public static create(properties?: proto.SyncActionValue.ILabelAssociationAction): proto.SyncActionValue.LabelAssociationAction; public static encode(m: proto.SyncActionValue.ILabelAssociationAction, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.SyncActionValue.LabelAssociationAction; @@ -12424,15 +12424,15 @@ export namespace proto { class LabelEditAction implements ILabelEditAction { constructor(p?: proto.SyncActionValue.ILabelEditAction); - public name: string; - public color: number; - public predefinedId: number; - public deleted: boolean; - public orderIndex: number; - public isActive: boolean; - public type: proto.SyncActionValue.LabelEditAction.ListType; - public isImmutable: boolean; - public muteEndTimeMs: (number|Long); + public name?: (string|null); + public color?: (number|null); + public predefinedId?: (number|null); + public deleted?: (boolean|null); + public orderIndex?: (number|null); + public isActive?: (boolean|null); + public type?: (proto.SyncActionValue.LabelEditAction.ListType|null); + public isImmutable?: (boolean|null); + public muteEndTimeMs?: (number|Long|null); public static create(properties?: proto.SyncActionValue.ILabelEditAction): proto.SyncActionValue.LabelEditAction; public static encode(m: proto.SyncActionValue.ILabelEditAction, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.SyncActionValue.LabelEditAction; @@ -12482,9 +12482,9 @@ export namespace proto { class LidContactAction implements ILidContactAction { constructor(p?: proto.SyncActionValue.ILidContactAction); - public fullName: string; - public firstName: string; - public username: string; + public fullName?: (string|null); + public firstName?: (string|null); + public username?: (string|null); public static create(properties?: proto.SyncActionValue.ILidContactAction): proto.SyncActionValue.LidContactAction; public static encode(m: proto.SyncActionValue.ILidContactAction, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.SyncActionValue.LidContactAction; @@ -12500,7 +12500,7 @@ export namespace proto { class LocaleSetting implements ILocaleSetting { constructor(p?: proto.SyncActionValue.ILocaleSetting); - public locale: string; + public locale?: (string|null); public static create(properties?: proto.SyncActionValue.ILocaleSetting): proto.SyncActionValue.LocaleSetting; public static encode(m: proto.SyncActionValue.ILocaleSetting, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.SyncActionValue.LocaleSetting; @@ -12516,7 +12516,7 @@ export namespace proto { class LockChatAction implements ILockChatAction { constructor(p?: proto.SyncActionValue.ILockChatAction); - public locked: boolean; + public locked?: (boolean|null); public static create(properties?: proto.SyncActionValue.ILockChatAction): proto.SyncActionValue.LockChatAction; public static encode(m: proto.SyncActionValue.ILockChatAction, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.SyncActionValue.LockChatAction; @@ -12532,7 +12532,7 @@ export namespace proto { class MaibaAIFeaturesControlAction implements IMaibaAIFeaturesControlAction { constructor(p?: proto.SyncActionValue.IMaibaAIFeaturesControlAction); - public aiFeatureStatus: proto.SyncActionValue.MaibaAIFeaturesControlAction.MaibaAIFeatureStatus; + public aiFeatureStatus?: (proto.SyncActionValue.MaibaAIFeaturesControlAction.MaibaAIFeatureStatus|null); public static create(properties?: proto.SyncActionValue.IMaibaAIFeaturesControlAction): proto.SyncActionValue.MaibaAIFeaturesControlAction; public static encode(m: proto.SyncActionValue.IMaibaAIFeaturesControlAction, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.SyncActionValue.MaibaAIFeaturesControlAction; @@ -12558,7 +12558,7 @@ export namespace proto { class MarkChatAsReadAction implements IMarkChatAsReadAction { constructor(p?: proto.SyncActionValue.IMarkChatAsReadAction); - public read: boolean; + public read?: (boolean|null); public messageRange?: (proto.SyncActionValue.ISyncActionMessageRange|null); public static create(properties?: proto.SyncActionValue.IMarkChatAsReadAction): proto.SyncActionValue.MarkChatAsReadAction; public static encode(m: proto.SyncActionValue.IMarkChatAsReadAction, w?: $protobuf.Writer): $protobuf.Writer; @@ -12581,13 +12581,13 @@ export namespace proto { class MarketingMessageAction implements IMarketingMessageAction { constructor(p?: proto.SyncActionValue.IMarketingMessageAction); - public name: string; - public message: string; - public type: proto.SyncActionValue.MarketingMessageAction.MarketingMessagePrototypeType; - public createdAt: (number|Long); - public lastSentAt: (number|Long); - public isDeleted: boolean; - public mediaId: string; + public name?: (string|null); + public message?: (string|null); + public type?: (proto.SyncActionValue.MarketingMessageAction.MarketingMessagePrototypeType|null); + public createdAt?: (number|Long|null); + public lastSentAt?: (number|Long|null); + public isDeleted?: (boolean|null); + public mediaId?: (string|null); public static create(properties?: proto.SyncActionValue.IMarketingMessageAction): proto.SyncActionValue.MarketingMessageAction; public static encode(m: proto.SyncActionValue.IMarketingMessageAction, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.SyncActionValue.MarketingMessageAction; @@ -12610,7 +12610,7 @@ export namespace proto { class MarketingMessageBroadcastAction implements IMarketingMessageBroadcastAction { constructor(p?: proto.SyncActionValue.IMarketingMessageBroadcastAction); - public repliedCount: number; + public repliedCount?: (number|null); public static create(properties?: proto.SyncActionValue.IMarketingMessageBroadcastAction): proto.SyncActionValue.MarketingMessageBroadcastAction; public static encode(m: proto.SyncActionValue.IMarketingMessageBroadcastAction, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.SyncActionValue.MarketingMessageBroadcastAction; @@ -12621,18 +12621,18 @@ export namespace proto { } interface IMerchantPaymentPartnerAction { - status: proto.SyncActionValue.MerchantPaymentPartnerAction.Status; - country: string; + status?: (proto.SyncActionValue.MerchantPaymentPartnerAction.Status|null); + country?: (string|null); gatewayName?: (string|null); credentialId?: (string|null); } class MerchantPaymentPartnerAction implements IMerchantPaymentPartnerAction { constructor(p?: proto.SyncActionValue.IMerchantPaymentPartnerAction); - public status: proto.SyncActionValue.MerchantPaymentPartnerAction.Status; - public country: string; - public gatewayName: string; - public credentialId: string; + public status?: (proto.SyncActionValue.MerchantPaymentPartnerAction.Status|null); + public country?: (string|null); + public gatewayName?: (string|null); + public credentialId?: (string|null); public static create(properties?: proto.SyncActionValue.IMerchantPaymentPartnerAction): proto.SyncActionValue.MerchantPaymentPartnerAction; public static encode(m: proto.SyncActionValue.IMerchantPaymentPartnerAction, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.SyncActionValue.MerchantPaymentPartnerAction; @@ -12657,7 +12657,7 @@ export namespace proto { class MusicUserIdAction implements IMusicUserIdAction { constructor(p?: proto.SyncActionValue.IMusicUserIdAction); - public musicUserId: string; + public musicUserId?: (string|null); public musicUserIdMap: { [k: string]: string }; public static create(properties?: proto.SyncActionValue.IMusicUserIdAction): proto.SyncActionValue.MusicUserIdAction; public static encode(m: proto.SyncActionValue.IMusicUserIdAction, w?: $protobuf.Writer): $protobuf.Writer; @@ -12677,10 +12677,10 @@ export namespace proto { class MuteAction implements IMuteAction { constructor(p?: proto.SyncActionValue.IMuteAction); - public muted: boolean; - public muteEndTimestamp: (number|Long); - public autoMuted: boolean; - public muteEveryoneMentionEndTimestamp: (number|Long); + public muted?: (boolean|null); + public muteEndTimestamp?: (number|Long|null); + public autoMuted?: (boolean|null); + public muteEveryoneMentionEndTimestamp?: (number|Long|null); public static create(properties?: proto.SyncActionValue.IMuteAction): proto.SyncActionValue.MuteAction; public static encode(m: proto.SyncActionValue.IMuteAction, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.SyncActionValue.MuteAction; @@ -12696,7 +12696,7 @@ export namespace proto { class NewsletterSavedInterestsAction implements INewsletterSavedInterestsAction { constructor(p?: proto.SyncActionValue.INewsletterSavedInterestsAction); - public newsletterSavedInterests: string; + public newsletterSavedInterests?: (string|null); public static create(properties?: proto.SyncActionValue.INewsletterSavedInterestsAction): proto.SyncActionValue.NewsletterSavedInterestsAction; public static encode(m: proto.SyncActionValue.INewsletterSavedInterestsAction, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.SyncActionValue.NewsletterSavedInterestsAction; @@ -12716,11 +12716,11 @@ export namespace proto { class NoteEditAction implements INoteEditAction { constructor(p?: proto.SyncActionValue.INoteEditAction); - public type: proto.SyncActionValue.NoteEditAction.NoteType; - public chatJid: string; - public createdAt: (number|Long); - public deleted: boolean; - public unstructuredContent: string; + public type?: (proto.SyncActionValue.NoteEditAction.NoteType|null); + public chatJid?: (string|null); + public createdAt?: (number|Long|null); + public deleted?: (boolean|null); + public unstructuredContent?: (string|null); public static create(properties?: proto.SyncActionValue.INoteEditAction): proto.SyncActionValue.NoteEditAction; public static encode(m: proto.SyncActionValue.INoteEditAction, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.SyncActionValue.NoteEditAction; @@ -12744,7 +12744,7 @@ export namespace proto { class NotificationActivitySettingAction implements INotificationActivitySettingAction { constructor(p?: proto.SyncActionValue.INotificationActivitySettingAction); - public notificationActivitySetting: proto.SyncActionValue.NotificationActivitySettingAction.NotificationActivitySetting; + public notificationActivitySetting?: (proto.SyncActionValue.NotificationActivitySettingAction.NotificationActivitySetting|null); public static create(properties?: proto.SyncActionValue.INotificationActivitySettingAction): proto.SyncActionValue.NotificationActivitySettingAction; public static encode(m: proto.SyncActionValue.INotificationActivitySettingAction, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.SyncActionValue.NotificationActivitySettingAction; @@ -12770,7 +12770,7 @@ export namespace proto { class NuxAction implements INuxAction { constructor(p?: proto.SyncActionValue.INuxAction); - public acknowledged: boolean; + public acknowledged?: (boolean|null); public static create(properties?: proto.SyncActionValue.INuxAction): proto.SyncActionValue.NuxAction; public static encode(m: proto.SyncActionValue.INuxAction, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.SyncActionValue.NuxAction; @@ -12786,7 +12786,7 @@ export namespace proto { class PaymentInfoAction implements IPaymentInfoAction { constructor(p?: proto.SyncActionValue.IPaymentInfoAction); - public cpi: string; + public cpi?: (string|null); public static create(properties?: proto.SyncActionValue.IPaymentInfoAction): proto.SyncActionValue.PaymentInfoAction; public static encode(m: proto.SyncActionValue.IPaymentInfoAction, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.SyncActionValue.PaymentInfoAction; @@ -12797,14 +12797,14 @@ export namespace proto { } interface IPaymentTosAction { - paymentNotice: proto.SyncActionValue.PaymentTosAction.PaymentNotice; - accepted: boolean; + paymentNotice?: (proto.SyncActionValue.PaymentTosAction.PaymentNotice|null); + accepted?: (boolean|null); } class PaymentTosAction implements IPaymentTosAction { constructor(p?: proto.SyncActionValue.IPaymentTosAction); - public paymentNotice: proto.SyncActionValue.PaymentTosAction.PaymentNotice; - public accepted: boolean; + public paymentNotice?: (proto.SyncActionValue.PaymentTosAction.PaymentNotice|null); + public accepted?: (boolean|null); public static create(properties?: proto.SyncActionValue.IPaymentTosAction): proto.SyncActionValue.PaymentTosAction; public static encode(m: proto.SyncActionValue.IPaymentTosAction, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.SyncActionValue.PaymentTosAction; @@ -12827,7 +12827,7 @@ export namespace proto { class PinAction implements IPinAction { constructor(p?: proto.SyncActionValue.IPinAction); - public pinned: boolean; + public pinned?: (boolean|null); public static create(properties?: proto.SyncActionValue.IPinAction): proto.SyncActionValue.PinAction; public static encode(m: proto.SyncActionValue.IPinAction, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.SyncActionValue.PinAction; @@ -12843,7 +12843,7 @@ export namespace proto { class PnForLidChatAction implements IPnForLidChatAction { constructor(p?: proto.SyncActionValue.IPnForLidChatAction); - public pnJid: string; + public pnJid?: (string|null); public static create(properties?: proto.SyncActionValue.IPnForLidChatAction): proto.SyncActionValue.PnForLidChatAction; public static encode(m: proto.SyncActionValue.IPnForLidChatAction, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.SyncActionValue.PnForLidChatAction; @@ -12875,7 +12875,7 @@ export namespace proto { class PrimaryVersionAction implements IPrimaryVersionAction { constructor(p?: proto.SyncActionValue.IPrimaryVersionAction); - public version: string; + public version?: (string|null); public static create(properties?: proto.SyncActionValue.IPrimaryVersionAction): proto.SyncActionValue.PrimaryVersionAction; public static encode(m: proto.SyncActionValue.IPrimaryVersionAction, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.SyncActionValue.PrimaryVersionAction; @@ -12891,7 +12891,7 @@ export namespace proto { class PrivacySettingChannelsPersonalisedRecommendationAction implements IPrivacySettingChannelsPersonalisedRecommendationAction { constructor(p?: proto.SyncActionValue.IPrivacySettingChannelsPersonalisedRecommendationAction); - public isUserOptedOut: boolean; + public isUserOptedOut?: (boolean|null); public static create(properties?: proto.SyncActionValue.IPrivacySettingChannelsPersonalisedRecommendationAction): proto.SyncActionValue.PrivacySettingChannelsPersonalisedRecommendationAction; public static encode(m: proto.SyncActionValue.IPrivacySettingChannelsPersonalisedRecommendationAction, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.SyncActionValue.PrivacySettingChannelsPersonalisedRecommendationAction; @@ -12907,7 +12907,7 @@ export namespace proto { class PrivacySettingDisableLinkPreviewsAction implements IPrivacySettingDisableLinkPreviewsAction { constructor(p?: proto.SyncActionValue.IPrivacySettingDisableLinkPreviewsAction); - public isPreviewsDisabled: boolean; + public isPreviewsDisabled?: (boolean|null); public static create(properties?: proto.SyncActionValue.IPrivacySettingDisableLinkPreviewsAction): proto.SyncActionValue.PrivacySettingDisableLinkPreviewsAction; public static encode(m: proto.SyncActionValue.IPrivacySettingDisableLinkPreviewsAction, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.SyncActionValue.PrivacySettingDisableLinkPreviewsAction; @@ -12923,7 +12923,7 @@ export namespace proto { class PrivacySettingRelayAllCalls implements IPrivacySettingRelayAllCalls { constructor(p?: proto.SyncActionValue.IPrivacySettingRelayAllCalls); - public isEnabled: boolean; + public isEnabled?: (boolean|null); public static create(properties?: proto.SyncActionValue.IPrivacySettingRelayAllCalls): proto.SyncActionValue.PrivacySettingRelayAllCalls; public static encode(m: proto.SyncActionValue.IPrivacySettingRelayAllCalls, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.SyncActionValue.PrivacySettingRelayAllCalls; @@ -12939,7 +12939,7 @@ export namespace proto { class PrivateProcessingSettingAction implements IPrivateProcessingSettingAction { constructor(p?: proto.SyncActionValue.IPrivateProcessingSettingAction); - public privateProcessingStatus: proto.SyncActionValue.PrivateProcessingSettingAction.PrivateProcessingStatus; + public privateProcessingStatus?: (proto.SyncActionValue.PrivateProcessingSettingAction.PrivateProcessingStatus|null); public static create(properties?: proto.SyncActionValue.IPrivateProcessingSettingAction): proto.SyncActionValue.PrivateProcessingSettingAction; public static encode(m: proto.SyncActionValue.IPrivateProcessingSettingAction, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.SyncActionValue.PrivateProcessingSettingAction; @@ -12964,7 +12964,7 @@ export namespace proto { class PushNameSetting implements IPushNameSetting { constructor(p?: proto.SyncActionValue.IPushNameSetting); - public name: string; + public name?: (string|null); public static create(properties?: proto.SyncActionValue.IPushNameSetting): proto.SyncActionValue.PushNameSetting; public static encode(m: proto.SyncActionValue.IPushNameSetting, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.SyncActionValue.PushNameSetting; @@ -12984,11 +12984,11 @@ export namespace proto { class QuickReplyAction implements IQuickReplyAction { constructor(p?: proto.SyncActionValue.IQuickReplyAction); - public shortcut: string; - public message: string; + public shortcut?: (string|null); + public message?: (string|null); public keywords: string[]; - public count: number; - public deleted: boolean; + public count?: (number|null); + public deleted?: (boolean|null); public static create(properties?: proto.SyncActionValue.IQuickReplyAction): proto.SyncActionValue.QuickReplyAction; public static encode(m: proto.SyncActionValue.IQuickReplyAction, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.SyncActionValue.QuickReplyAction; @@ -13020,7 +13020,7 @@ export namespace proto { class RemoveRecentStickerAction implements IRemoveRecentStickerAction { constructor(p?: proto.SyncActionValue.IRemoveRecentStickerAction); - public lastStickerSentTs: (number|Long); + public lastStickerSentTs?: (number|Long|null); public static create(properties?: proto.SyncActionValue.IRemoveRecentStickerAction): proto.SyncActionValue.RemoveRecentStickerAction; public static encode(m: proto.SyncActionValue.IRemoveRecentStickerAction, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.SyncActionValue.RemoveRecentStickerAction; @@ -13066,37 +13066,37 @@ export namespace proto { class SettingsSyncAction implements ISettingsSyncAction { constructor(p?: proto.SyncActionValue.ISettingsSyncAction); - public startAtLogin: boolean; - public minimizeToTray: boolean; - public language: string; - public replaceTextWithEmoji: boolean; - public bannerNotificationDisplayMode: proto.SyncActionValue.SettingsSyncAction.DisplayMode; - public unreadCounterBadgeDisplayMode: proto.SyncActionValue.SettingsSyncAction.DisplayMode; - public isMessagesNotificationEnabled: boolean; - public isCallsNotificationEnabled: boolean; - public isReactionsNotificationEnabled: boolean; - public isStatusReactionsNotificationEnabled: boolean; - public isTextPreviewForNotificationEnabled: boolean; - public defaultNotificationToneId: number; - public groupDefaultNotificationToneId: number; - public appTheme: number; - public wallpaperId: number; - public isDoodleWallpaperEnabled: boolean; - public fontSize: number; - public isPhotosAutodownloadEnabled: boolean; - public isAudiosAutodownloadEnabled: boolean; - public isVideosAutodownloadEnabled: boolean; - public isDocumentsAutodownloadEnabled: boolean; - public disableLinkPreviews: boolean; - public notificationToneId: number; - public mediaUploadQuality: proto.SyncActionValue.SettingsSyncAction.MediaQualitySetting; - public isSpellCheckEnabled: boolean; - public isEnterToSendEnabled: boolean; - public isGroupMessageNotificationEnabled: boolean; - public isGroupReactionsNotificationEnabled: boolean; - public isStatusNotificationEnabled: boolean; - public statusNotificationToneId: number; - public shouldPlaySoundForCallNotification: boolean; + public startAtLogin?: (boolean|null); + public minimizeToTray?: (boolean|null); + public language?: (string|null); + public replaceTextWithEmoji?: (boolean|null); + public bannerNotificationDisplayMode?: (proto.SyncActionValue.SettingsSyncAction.DisplayMode|null); + public unreadCounterBadgeDisplayMode?: (proto.SyncActionValue.SettingsSyncAction.DisplayMode|null); + public isMessagesNotificationEnabled?: (boolean|null); + public isCallsNotificationEnabled?: (boolean|null); + public isReactionsNotificationEnabled?: (boolean|null); + public isStatusReactionsNotificationEnabled?: (boolean|null); + public isTextPreviewForNotificationEnabled?: (boolean|null); + public defaultNotificationToneId?: (number|null); + public groupDefaultNotificationToneId?: (number|null); + public appTheme?: (number|null); + public wallpaperId?: (number|null); + public isDoodleWallpaperEnabled?: (boolean|null); + public fontSize?: (number|null); + public isPhotosAutodownloadEnabled?: (boolean|null); + public isAudiosAutodownloadEnabled?: (boolean|null); + public isVideosAutodownloadEnabled?: (boolean|null); + public isDocumentsAutodownloadEnabled?: (boolean|null); + public disableLinkPreviews?: (boolean|null); + public notificationToneId?: (number|null); + public mediaUploadQuality?: (proto.SyncActionValue.SettingsSyncAction.MediaQualitySetting|null); + public isSpellCheckEnabled?: (boolean|null); + public isEnterToSendEnabled?: (boolean|null); + public isGroupMessageNotificationEnabled?: (boolean|null); + public isGroupReactionsNotificationEnabled?: (boolean|null); + public isStatusNotificationEnabled?: (boolean|null); + public statusNotificationToneId?: (number|null); + public shouldPlaySoundForCallNotification?: (boolean|null); public static create(properties?: proto.SyncActionValue.ISettingsSyncAction): proto.SyncActionValue.SettingsSyncAction; public static encode(m: proto.SyncActionValue.ISettingsSyncAction, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.SyncActionValue.SettingsSyncAction; @@ -13171,7 +13171,7 @@ export namespace proto { class StarAction implements IStarAction { constructor(p?: proto.SyncActionValue.IStarAction); - public starred: boolean; + public starred?: (boolean|null); public static create(properties?: proto.SyncActionValue.IStarAction): proto.SyncActionValue.StarAction; public static encode(m: proto.SyncActionValue.IStarAction, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.SyncActionValue.StarAction; @@ -13187,7 +13187,7 @@ export namespace proto { class StatusPostOptInNotificationPreferencesAction implements IStatusPostOptInNotificationPreferencesAction { constructor(p?: proto.SyncActionValue.IStatusPostOptInNotificationPreferencesAction); - public enabled: boolean; + public enabled?: (boolean|null); public static create(properties?: proto.SyncActionValue.IStatusPostOptInNotificationPreferencesAction): proto.SyncActionValue.StatusPostOptInNotificationPreferencesAction; public static encode(m: proto.SyncActionValue.IStatusPostOptInNotificationPreferencesAction, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.SyncActionValue.StatusPostOptInNotificationPreferencesAction; @@ -13204,7 +13204,7 @@ export namespace proto { class StatusPrivacyAction implements IStatusPrivacyAction { constructor(p?: proto.SyncActionValue.IStatusPrivacyAction); - public mode: proto.SyncActionValue.StatusPrivacyAction.StatusDistributionMode; + public mode?: (proto.SyncActionValue.StatusPrivacyAction.StatusDistributionMode|null); public userJid: string[]; public static create(properties?: proto.SyncActionValue.IStatusPrivacyAction): proto.SyncActionValue.StatusPrivacyAction; public static encode(m: proto.SyncActionValue.IStatusPrivacyAction, w?: $protobuf.Writer): $protobuf.Writer; @@ -13243,19 +13243,19 @@ export namespace proto { class StickerAction implements IStickerAction { constructor(p?: proto.SyncActionValue.IStickerAction); - public url: string; - public fileEncSha256: Uint8Array; - public mediaKey: Uint8Array; - public mimetype: string; - public height: number; - public width: number; - public directPath: string; - public fileLength: (number|Long); - public isFavorite: boolean; - public deviceIdHint: number; - public isLottie: boolean; - public imageHash: string; - public isAvatarSticker: boolean; + public url?: (string|null); + public fileEncSha256?: (Uint8Array|null); + public mediaKey?: (Uint8Array|null); + public mimetype?: (string|null); + public height?: (number|null); + public width?: (number|null); + public directPath?: (string|null); + public fileLength?: (number|Long|null); + public isFavorite?: (boolean|null); + public deviceIdHint?: (number|null); + public isLottie?: (boolean|null); + public imageHash?: (string|null); + public isAvatarSticker?: (boolean|null); public static create(properties?: proto.SyncActionValue.IStickerAction): proto.SyncActionValue.StickerAction; public static encode(m: proto.SyncActionValue.IStickerAction, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.SyncActionValue.StickerAction; @@ -13273,9 +13273,9 @@ export namespace proto { class SubscriptionAction implements ISubscriptionAction { constructor(p?: proto.SyncActionValue.ISubscriptionAction); - public isDeactivated: boolean; - public isAutoRenewing: boolean; - public expirationDate: (number|Long); + public isDeactivated?: (boolean|null); + public isAutoRenewing?: (boolean|null); + public expirationDate?: (number|Long|null); public static create(properties?: proto.SyncActionValue.ISubscriptionAction): proto.SyncActionValue.SubscriptionAction; public static encode(m: proto.SyncActionValue.ISubscriptionAction, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.SyncActionValue.SubscriptionAction; @@ -13293,7 +13293,7 @@ export namespace proto { class SyncActionMessage implements ISyncActionMessage { constructor(p?: proto.SyncActionValue.ISyncActionMessage); public key?: (proto.IMessageKey|null); - public timestamp: (number|Long); + public timestamp?: (number|Long|null); public static create(properties?: proto.SyncActionValue.ISyncActionMessage): proto.SyncActionValue.SyncActionMessage; public static encode(m: proto.SyncActionValue.ISyncActionMessage, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.SyncActionValue.SyncActionMessage; @@ -13311,8 +13311,8 @@ export namespace proto { class SyncActionMessageRange implements ISyncActionMessageRange { constructor(p?: proto.SyncActionValue.ISyncActionMessageRange); - public lastMessageTimestamp: (number|Long); - public lastSystemMessageTimestamp: (number|Long); + public lastMessageTimestamp?: (number|Long|null); + public lastSystemMessageTimestamp?: (number|Long|null); public messages: proto.SyncActionValue.ISyncActionMessage[]; public static create(properties?: proto.SyncActionValue.ISyncActionMessageRange): proto.SyncActionValue.SyncActionMessageRange; public static encode(m: proto.SyncActionValue.ISyncActionMessageRange, w?: $protobuf.Writer): $protobuf.Writer; @@ -13329,7 +13329,7 @@ export namespace proto { class TimeFormatAction implements ITimeFormatAction { constructor(p?: proto.SyncActionValue.ITimeFormatAction); - public isTwentyFourHourFormatEnabled: boolean; + public isTwentyFourHourFormatEnabled?: (boolean|null); public static create(properties?: proto.SyncActionValue.ITimeFormatAction): proto.SyncActionValue.TimeFormatAction; public static encode(m: proto.SyncActionValue.ITimeFormatAction, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.SyncActionValue.TimeFormatAction; @@ -13345,7 +13345,7 @@ export namespace proto { class UGCBot implements IUGCBot { constructor(p?: proto.SyncActionValue.IUGCBot); - public definition: Uint8Array; + public definition?: (Uint8Array|null); public static create(properties?: proto.SyncActionValue.IUGCBot): proto.SyncActionValue.UGCBot; public static encode(m: proto.SyncActionValue.IUGCBot, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.SyncActionValue.UGCBot; @@ -13361,7 +13361,7 @@ export namespace proto { class UnarchiveChatsSetting implements IUnarchiveChatsSetting { constructor(p?: proto.SyncActionValue.IUnarchiveChatsSetting); - public unarchiveChats: boolean; + public unarchiveChats?: (boolean|null); public static create(properties?: proto.SyncActionValue.IUnarchiveChatsSetting): proto.SyncActionValue.UnarchiveChatsSetting; public static encode(m: proto.SyncActionValue.IUnarchiveChatsSetting, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.SyncActionValue.UnarchiveChatsSetting; @@ -13377,7 +13377,7 @@ export namespace proto { class UserStatusMuteAction implements IUserStatusMuteAction { constructor(p?: proto.SyncActionValue.IUserStatusMuteAction); - public muted: boolean; + public muted?: (boolean|null); public static create(properties?: proto.SyncActionValue.IUserStatusMuteAction): proto.SyncActionValue.UserStatusMuteAction; public static encode(m: proto.SyncActionValue.IUserStatusMuteAction, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.SyncActionValue.UserStatusMuteAction; @@ -13393,7 +13393,7 @@ export namespace proto { class UsernameChatStartModeAction implements IUsernameChatStartModeAction { constructor(p?: proto.SyncActionValue.IUsernameChatStartModeAction); - public chatStartMode: proto.SyncActionValue.UsernameChatStartModeAction.ChatStartMode; + public chatStartMode?: (proto.SyncActionValue.UsernameChatStartModeAction.ChatStartMode|null); public static create(properties?: proto.SyncActionValue.IUsernameChatStartModeAction): proto.SyncActionValue.UsernameChatStartModeAction; public static encode(m: proto.SyncActionValue.IUsernameChatStartModeAction, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.SyncActionValue.UsernameChatStartModeAction; @@ -13417,7 +13417,7 @@ export namespace proto { class WaffleAccountLinkStateAction implements IWaffleAccountLinkStateAction { constructor(p?: proto.SyncActionValue.IWaffleAccountLinkStateAction); - public linkState: proto.SyncActionValue.WaffleAccountLinkStateAction.AccountLinkState; + public linkState?: (proto.SyncActionValue.WaffleAccountLinkStateAction.AccountLinkState|null); public static create(properties?: proto.SyncActionValue.IWaffleAccountLinkStateAction): proto.SyncActionValue.WaffleAccountLinkStateAction; public static encode(m: proto.SyncActionValue.IWaffleAccountLinkStateAction, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.SyncActionValue.WaffleAccountLinkStateAction; @@ -13442,7 +13442,7 @@ export namespace proto { class WamoUserIdentifierAction implements IWamoUserIdentifierAction { constructor(p?: proto.SyncActionValue.IWamoUserIdentifierAction); - public identifier: string; + public identifier?: (string|null); public static create(properties?: proto.SyncActionValue.IWamoUserIdentifierAction): proto.SyncActionValue.WamoUserIdentifierAction; public static encode(m: proto.SyncActionValue.IWamoUserIdentifierAction, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.SyncActionValue.WamoUserIdentifierAction; @@ -13459,7 +13459,7 @@ export namespace proto { class SyncdIndex implements ISyncdIndex { constructor(p?: proto.ISyncdIndex); - public blob: Uint8Array; + public blob?: (Uint8Array|null); public static create(properties?: proto.ISyncdIndex): proto.SyncdIndex; public static encode(m: proto.ISyncdIndex, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.SyncdIndex; @@ -13476,7 +13476,7 @@ export namespace proto { class SyncdMutation implements ISyncdMutation { constructor(p?: proto.ISyncdMutation); - public operation: proto.SyncdMutation.SyncdOperation; + public operation?: (proto.SyncdMutation.SyncdOperation|null); public record?: (proto.ISyncdRecord|null); public static create(properties?: proto.ISyncdMutation): proto.SyncdMutation; public static encode(m: proto.ISyncdMutation, w?: $protobuf.Writer): $protobuf.Writer; @@ -13528,12 +13528,12 @@ export namespace proto { public version?: (proto.ISyncdVersion|null); public mutations: proto.ISyncdMutation[]; public externalMutations?: (proto.IExternalBlobReference|null); - public snapshotMac: Uint8Array; - public patchMac: Uint8Array; + public snapshotMac?: (Uint8Array|null); + public patchMac?: (Uint8Array|null); public keyId?: (proto.IKeyId|null); public exitCode?: (proto.IExitCode|null); - public deviceIndex: number; - public clientDebugData: Uint8Array; + public deviceIndex?: (number|null); + public clientDebugData?: (Uint8Array|null); public static create(properties?: proto.ISyncdPatch): proto.SyncdPatch; public static encode(m: proto.ISyncdPatch, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.SyncdPatch; @@ -13574,7 +13574,7 @@ export namespace proto { constructor(p?: proto.ISyncdSnapshot); public version?: (proto.ISyncdVersion|null); public records: proto.ISyncdRecord[]; - public mac: Uint8Array; + public mac?: (Uint8Array|null); public keyId?: (proto.IKeyId|null); public static create(properties?: proto.ISyncdSnapshot): proto.SyncdSnapshot; public static encode(m: proto.ISyncdSnapshot, w?: $protobuf.Writer): $protobuf.Writer; @@ -13591,7 +13591,7 @@ export namespace proto { class SyncdValue implements ISyncdValue { constructor(p?: proto.ISyncdValue); - public blob: Uint8Array; + public blob?: (Uint8Array|null); public static create(properties?: proto.ISyncdValue): proto.SyncdValue; public static encode(m: proto.ISyncdValue, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.SyncdValue; @@ -13607,7 +13607,7 @@ export namespace proto { class SyncdVersion implements ISyncdVersion { constructor(p?: proto.ISyncdVersion); - public version: (number|Long); + public version?: (number|Long|null); public static create(properties?: proto.ISyncdVersion): proto.SyncdVersion; public static encode(m: proto.ISyncdVersion, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.SyncdVersion; @@ -13624,8 +13624,8 @@ export namespace proto { class TapLinkAction implements ITapLinkAction { constructor(p?: proto.ITapLinkAction); - public title: string; - public tapUrl: string; + public title?: (string|null); + public tapUrl?: (string|null); public static create(properties?: proto.ITapLinkAction): proto.TapLinkAction; public static encode(m: proto.ITapLinkAction, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.TapLinkAction; @@ -13644,7 +13644,7 @@ export namespace proto { class TemplateButton implements ITemplateButton { constructor(p?: proto.ITemplateButton); - public index: number; + public index?: (number|null); public quickReplyButton?: (proto.TemplateButton.IQuickReplyButton|null); public urlButton?: (proto.TemplateButton.IURLButton|null); public callButton?: (proto.TemplateButton.ICallButton|null); @@ -13686,7 +13686,7 @@ export namespace proto { class QuickReplyButton implements IQuickReplyButton { constructor(p?: proto.TemplateButton.IQuickReplyButton); public displayText?: (proto.Message.IHighlyStructuredMessage|null); - public id: string; + public id?: (string|null); public static create(properties?: proto.TemplateButton.IQuickReplyButton): proto.TemplateButton.QuickReplyButton; public static encode(m: proto.TemplateButton.IQuickReplyButton, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.TemplateButton.QuickReplyButton; @@ -13722,7 +13722,7 @@ export namespace proto { class ThreadID implements IThreadID { constructor(p?: proto.IThreadID); - public threadType: proto.ThreadID.ThreadType; + public threadType?: (proto.ThreadID.ThreadType|null); public threadKey?: (proto.IMessageKey|null); public static create(properties?: proto.IThreadID): proto.ThreadID; public static encode(m: proto.IThreadID, w?: $protobuf.Writer): $protobuf.Writer; @@ -13769,10 +13769,10 @@ export namespace proto { class UrlTrackingMapElement implements IUrlTrackingMapElement { constructor(p?: proto.UrlTrackingMap.IUrlTrackingMapElement); - public originalUrl: string; - public unconsentedUsersUrl: string; - public consentedUsersUrl: string; - public cardIndex: number; + public originalUrl?: (string|null); + public unconsentedUsersUrl?: (string|null); + public consentedUsersUrl?: (string|null); + public cardIndex?: (number|null); public static create(properties?: proto.UrlTrackingMap.IUrlTrackingMapElement): proto.UrlTrackingMap.UrlTrackingMapElement; public static encode(m: proto.UrlTrackingMap.IUrlTrackingMapElement, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.UrlTrackingMap.UrlTrackingMapElement; @@ -13792,10 +13792,10 @@ export namespace proto { class UserPassword implements IUserPassword { constructor(p?: proto.IUserPassword); - public encoding: proto.UserPassword.Encoding; - public transformer: proto.UserPassword.Transformer; + public encoding?: (proto.UserPassword.Encoding|null); + public transformer?: (proto.UserPassword.Transformer|null); public transformerArg: proto.UserPassword.ITransformerArg[]; - public transformedData: Uint8Array; + public transformedData?: (Uint8Array|null); public static create(properties?: proto.IUserPassword): proto.UserPassword; public static encode(m: proto.IUserPassword, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.UserPassword; @@ -13825,7 +13825,7 @@ export namespace proto { class TransformerArg implements ITransformerArg { constructor(p?: proto.UserPassword.ITransformerArg); - public key: string; + public key?: (string|null); public value?: (proto.UserPassword.TransformerArg.IValue|null); public static create(properties?: proto.UserPassword.ITransformerArg): proto.UserPassword.TransformerArg; public static encode(m: proto.UserPassword.ITransformerArg, w?: $protobuf.Writer): $protobuf.Writer; @@ -13860,7 +13860,7 @@ export namespace proto { } interface IUserReceipt { - userJid: string; + userJid?: (string|null); receiptTimestamp?: (number|Long|null); readTimestamp?: (number|Long|null); playedTimestamp?: (number|Long|null); @@ -13870,10 +13870,10 @@ export namespace proto { class UserReceipt implements IUserReceipt { constructor(p?: proto.IUserReceipt); - public userJid: string; - public receiptTimestamp: (number|Long); - public readTimestamp: (number|Long); - public playedTimestamp: (number|Long); + public userJid?: (string|null); + public receiptTimestamp?: (number|Long|null); + public readTimestamp?: (number|Long|null); + public playedTimestamp?: (number|Long|null); public pendingDeviceJid: string[]; public deliveredDeviceJid: string[]; public static create(properties?: proto.IUserReceipt): proto.UserReceipt; @@ -13893,9 +13893,9 @@ export namespace proto { class VerifiedNameCertificate implements IVerifiedNameCertificate { constructor(p?: proto.IVerifiedNameCertificate); - public details: Uint8Array; - public signature: Uint8Array; - public serverSignature: Uint8Array; + public details?: (Uint8Array|null); + public signature?: (Uint8Array|null); + public serverSignature?: (Uint8Array|null); public static create(properties?: proto.IVerifiedNameCertificate): proto.VerifiedNameCertificate; public static encode(m: proto.IVerifiedNameCertificate, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.VerifiedNameCertificate; @@ -13917,11 +13917,11 @@ export namespace proto { class Details implements IDetails { constructor(p?: proto.VerifiedNameCertificate.IDetails); - public serial: (number|Long); - public issuer: string; - public verifiedName: string; + public serial?: (number|Long|null); + public issuer?: (string|null); + public verifiedName?: (string|null); public localizedNames: proto.ILocalizedName[]; - public issueTime: (number|Long); + public issueTime?: (number|Long|null); public static create(properties?: proto.VerifiedNameCertificate.IDetails): proto.VerifiedNameCertificate.Details; public static encode(m: proto.VerifiedNameCertificate.IDetails, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.VerifiedNameCertificate.Details; @@ -13939,8 +13939,8 @@ export namespace proto { class WallpaperSettings implements IWallpaperSettings { constructor(p?: proto.IWallpaperSettings); - public filename: string; - public opacity: number; + public filename?: (string|null); + public opacity?: (number|null); public static create(properties?: proto.IWallpaperSettings): proto.WallpaperSettings; public static encode(m: proto.IWallpaperSettings, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.WallpaperSettings; @@ -14000,51 +14000,51 @@ export namespace proto { class WebFeatures implements IWebFeatures { constructor(p?: proto.IWebFeatures); - public labelsDisplay: proto.WebFeatures.Flag; - public voipIndividualOutgoing: proto.WebFeatures.Flag; - public groupsV3: proto.WebFeatures.Flag; - public groupsV3Create: proto.WebFeatures.Flag; - public changeNumberV2: proto.WebFeatures.Flag; - public queryStatusV3Thumbnail: proto.WebFeatures.Flag; - public liveLocations: proto.WebFeatures.Flag; - public queryVname: proto.WebFeatures.Flag; - public voipIndividualIncoming: proto.WebFeatures.Flag; - public quickRepliesQuery: proto.WebFeatures.Flag; - public payments: proto.WebFeatures.Flag; - public stickerPackQuery: proto.WebFeatures.Flag; - public liveLocationsFinal: proto.WebFeatures.Flag; - public labelsEdit: proto.WebFeatures.Flag; - public mediaUpload: proto.WebFeatures.Flag; - public mediaUploadRichQuickReplies: proto.WebFeatures.Flag; - public vnameV2: proto.WebFeatures.Flag; - public videoPlaybackUrl: proto.WebFeatures.Flag; - public statusRanking: proto.WebFeatures.Flag; - public voipIndividualVideo: proto.WebFeatures.Flag; - public thirdPartyStickers: proto.WebFeatures.Flag; - public frequentlyForwardedSetting: proto.WebFeatures.Flag; - public groupsV4JoinPermission: proto.WebFeatures.Flag; - public recentStickers: proto.WebFeatures.Flag; - public catalog: proto.WebFeatures.Flag; - public starredStickers: proto.WebFeatures.Flag; - public voipGroupCall: proto.WebFeatures.Flag; - public templateMessage: proto.WebFeatures.Flag; - public templateMessageInteractivity: proto.WebFeatures.Flag; - public ephemeralMessages: proto.WebFeatures.Flag; - public e2ENotificationSync: proto.WebFeatures.Flag; - public recentStickersV2: proto.WebFeatures.Flag; - public recentStickersV3: proto.WebFeatures.Flag; - public userNotice: proto.WebFeatures.Flag; - public support: proto.WebFeatures.Flag; - public groupUiiCleanup: proto.WebFeatures.Flag; - public groupDogfoodingInternalOnly: proto.WebFeatures.Flag; - public settingsSync: proto.WebFeatures.Flag; - public archiveV2: proto.WebFeatures.Flag; - public ephemeralAllowGroupMembers: proto.WebFeatures.Flag; - public ephemeral24HDuration: proto.WebFeatures.Flag; - public mdForceUpgrade: proto.WebFeatures.Flag; - public disappearingMode: proto.WebFeatures.Flag; - public externalMdOptInAvailable: proto.WebFeatures.Flag; - public noDeleteMessageTimeLimit: proto.WebFeatures.Flag; + public labelsDisplay?: (proto.WebFeatures.Flag|null); + public voipIndividualOutgoing?: (proto.WebFeatures.Flag|null); + public groupsV3?: (proto.WebFeatures.Flag|null); + public groupsV3Create?: (proto.WebFeatures.Flag|null); + public changeNumberV2?: (proto.WebFeatures.Flag|null); + public queryStatusV3Thumbnail?: (proto.WebFeatures.Flag|null); + public liveLocations?: (proto.WebFeatures.Flag|null); + public queryVname?: (proto.WebFeatures.Flag|null); + public voipIndividualIncoming?: (proto.WebFeatures.Flag|null); + public quickRepliesQuery?: (proto.WebFeatures.Flag|null); + public payments?: (proto.WebFeatures.Flag|null); + public stickerPackQuery?: (proto.WebFeatures.Flag|null); + public liveLocationsFinal?: (proto.WebFeatures.Flag|null); + public labelsEdit?: (proto.WebFeatures.Flag|null); + public mediaUpload?: (proto.WebFeatures.Flag|null); + public mediaUploadRichQuickReplies?: (proto.WebFeatures.Flag|null); + public vnameV2?: (proto.WebFeatures.Flag|null); + public videoPlaybackUrl?: (proto.WebFeatures.Flag|null); + public statusRanking?: (proto.WebFeatures.Flag|null); + public voipIndividualVideo?: (proto.WebFeatures.Flag|null); + public thirdPartyStickers?: (proto.WebFeatures.Flag|null); + public frequentlyForwardedSetting?: (proto.WebFeatures.Flag|null); + public groupsV4JoinPermission?: (proto.WebFeatures.Flag|null); + public recentStickers?: (proto.WebFeatures.Flag|null); + public catalog?: (proto.WebFeatures.Flag|null); + public starredStickers?: (proto.WebFeatures.Flag|null); + public voipGroupCall?: (proto.WebFeatures.Flag|null); + public templateMessage?: (proto.WebFeatures.Flag|null); + public templateMessageInteractivity?: (proto.WebFeatures.Flag|null); + public ephemeralMessages?: (proto.WebFeatures.Flag|null); + public e2ENotificationSync?: (proto.WebFeatures.Flag|null); + public recentStickersV2?: (proto.WebFeatures.Flag|null); + public recentStickersV3?: (proto.WebFeatures.Flag|null); + public userNotice?: (proto.WebFeatures.Flag|null); + public support?: (proto.WebFeatures.Flag|null); + public groupUiiCleanup?: (proto.WebFeatures.Flag|null); + public groupDogfoodingInternalOnly?: (proto.WebFeatures.Flag|null); + public settingsSync?: (proto.WebFeatures.Flag|null); + public archiveV2?: (proto.WebFeatures.Flag|null); + public ephemeralAllowGroupMembers?: (proto.WebFeatures.Flag|null); + public ephemeral24HDuration?: (proto.WebFeatures.Flag|null); + public mdForceUpgrade?: (proto.WebFeatures.Flag|null); + public disappearingMode?: (proto.WebFeatures.Flag|null); + public externalMdOptInAvailable?: (proto.WebFeatures.Flag|null); + public noDeleteMessageTimeLimit?: (proto.WebFeatures.Flag|null); public static create(properties?: proto.IWebFeatures): proto.WebFeatures; public static encode(m: proto.IWebFeatures, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.WebFeatures; @@ -14070,7 +14070,7 @@ export namespace proto { } interface IWebMessageInfo { - key: proto.IMessageKey; + key?: (proto.IMessageKey|null); message?: (proto.IMessage|null); messageTimestamp?: (number|Long|null); status?: (proto.WebMessageInfo.Status|null); @@ -14141,73 +14141,73 @@ export namespace proto { class WebMessageInfo implements IWebMessageInfo { constructor(p?: proto.IWebMessageInfo); - public key: proto.IMessageKey; + public key?: (proto.IMessageKey|null); public message?: (proto.IMessage|null); - public messageTimestamp: (number|Long); - public status: proto.WebMessageInfo.Status; - public participant: string; - public messageC2STimestamp: (number|Long); - public ignore: boolean; - public starred: boolean; - public broadcast: boolean; - public pushName: string; - public mediaCiphertextSha256: Uint8Array; - public multicast: boolean; - public urlText: boolean; - public urlNumber: boolean; - public messageStubType: proto.WebMessageInfo.StubType; - public clearMedia: boolean; + public messageTimestamp?: (number|Long|null); + public status?: (proto.WebMessageInfo.Status|null); + public participant?: (string|null); + public messageC2STimestamp?: (number|Long|null); + public ignore?: (boolean|null); + public starred?: (boolean|null); + public broadcast?: (boolean|null); + public pushName?: (string|null); + public mediaCiphertextSha256?: (Uint8Array|null); + public multicast?: (boolean|null); + public urlText?: (boolean|null); + public urlNumber?: (boolean|null); + public messageStubType?: (proto.WebMessageInfo.StubType|null); + public clearMedia?: (boolean|null); public messageStubParameters: string[]; - public duration: number; + public duration?: (number|null); public labels: string[]; public paymentInfo?: (proto.IPaymentInfo|null); public finalLiveLocation?: (proto.Message.ILiveLocationMessage|null); public quotedPaymentInfo?: (proto.IPaymentInfo|null); - public ephemeralStartTimestamp: (number|Long); - public ephemeralDuration: number; - public ephemeralOffToOn: boolean; - public ephemeralOutOfSync: boolean; - public bizPrivacyStatus: proto.WebMessageInfo.BizPrivacyStatus; - public verifiedBizName: string; + public ephemeralStartTimestamp?: (number|Long|null); + public ephemeralDuration?: (number|null); + public ephemeralOffToOn?: (boolean|null); + public ephemeralOutOfSync?: (boolean|null); + public bizPrivacyStatus?: (proto.WebMessageInfo.BizPrivacyStatus|null); + public verifiedBizName?: (string|null); public mediaData?: (proto.IMediaData|null); public photoChange?: (proto.IPhotoChange|null); public userReceipt: proto.IUserReceipt[]; public reactions: proto.IReaction[]; public quotedStickerData?: (proto.IMediaData|null); - public futureproofData: Uint8Array; + public futureproofData?: (Uint8Array|null); public statusPsa?: (proto.IStatusPSA|null); public pollUpdates: proto.IPollUpdate[]; public pollAdditionalMetadata?: (proto.IPollAdditionalMetadata|null); - public agentId: string; - public statusAlreadyViewed: boolean; - public messageSecret: Uint8Array; + public agentId?: (string|null); + public statusAlreadyViewed?: (boolean|null); + public messageSecret?: (Uint8Array|null); public keepInChat?: (proto.IKeepInChat|null); - public originalSelfAuthorUserJidString: string; - public revokeMessageTimestamp: (number|Long); + public originalSelfAuthorUserJidString?: (string|null); + public revokeMessageTimestamp?: (number|Long|null); public pinInChat?: (proto.IPinInChat|null); public premiumMessageInfo?: (proto.IPremiumMessageInfo|null); - public is1PBizBotMessage: boolean; - public isGroupHistoryMessage: boolean; - public botMessageInvokerJid: string; + public is1PBizBotMessage?: (boolean|null); + public isGroupHistoryMessage?: (boolean|null); + public botMessageInvokerJid?: (string|null); public commentMetadata?: (proto.ICommentMetadata|null); public eventResponses: proto.IEventResponse[]; public reportingTokenInfo?: (proto.IReportingTokenInfo|null); - public newsletterServerId: (number|Long); + public newsletterServerId?: (number|Long|null); public eventAdditionalMetadata?: (proto.IEventAdditionalMetadata|null); - public isMentionedInStatus: boolean; + public isMentionedInStatus?: (boolean|null); public statusMentions: string[]; public targetMessageId?: (proto.IMessageKey|null); public messageAddOns: proto.IMessageAddOn[]; public statusMentionMessageInfo?: (proto.IStatusMentionMessage|null); - public isSupportAiMessage: boolean; + public isSupportAiMessage?: (boolean|null); public statusMentionSources: string[]; public supportAiCitations: proto.ICitation[]; - public botTargetId: string; + public botTargetId?: (string|null); public groupHistoryIndividualMessageInfo?: (proto.IGroupHistoryIndividualMessageInfo|null); public groupHistoryBundleInfo?: (proto.IGroupHistoryBundleInfo|null); public interactiveMessageAdditionalMetadata?: (proto.IInteractiveMessageAdditionalMetadata|null); public quarantinedMessage?: (proto.IQuarantinedMessage|null); - public nonJidMentions: number; + public nonJidMentions?: (number|null); public static create(properties?: proto.IWebMessageInfo): proto.WebMessageInfo; public static encode(m: proto.IWebMessageInfo, w?: $protobuf.Writer): $protobuf.Writer; public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.WebMessageInfo; @@ -14472,9 +14472,9 @@ export namespace proto { class WebNotificationsInfo implements IWebNotificationsInfo { constructor(p?: proto.IWebNotificationsInfo); - public timestamp: (number|Long); - public unreadChats: number; - public notifyMessageCount: number; + public timestamp?: (number|Long|null); + public unreadChats?: (number|null); + public notifyMessageCount?: (number|null); public notifyMessages: proto.IWebMessageInfo[]; public static create(properties?: proto.IWebNotificationsInfo): proto.WebNotificationsInfo; public static encode(m: proto.IWebNotificationsInfo, w?: $protobuf.Writer): $protobuf.Writer; diff --git a/WAProto/index.js b/WAProto/index.js index cfe0fe16..e3c31ea8 100644 --- a/WAProto/index.js +++ b/WAProto/index.js @@ -55,11 +55,43 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - ADVDeviceIdentity.prototype.rawId = 0; - ADVDeviceIdentity.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - ADVDeviceIdentity.prototype.keyIndex = 0; - ADVDeviceIdentity.prototype.accountType = 0; - ADVDeviceIdentity.prototype.deviceType = 0; + ADVDeviceIdentity.prototype.rawId = null; + ADVDeviceIdentity.prototype.timestamp = null; + ADVDeviceIdentity.prototype.keyIndex = null; + ADVDeviceIdentity.prototype.accountType = null; + ADVDeviceIdentity.prototype.deviceType = null; + + let $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) + }); ADVDeviceIdentity.create = function create(properties) { return new ADVDeviceIdentity(properties); @@ -177,34 +209,33 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.rawId = 0; - if ($util.Long) { - var n = new $util.Long(0, 0, true); - d.timestamp = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.timestamp = o.longs === String ? "0" : 0; - d.keyIndex = 0; - d.accountType = o.enums === String ? "E2EE" : 0; - d.deviceType = o.enums === String ? "E2EE" : 0; - } if (m.rawId != null && m.hasOwnProperty("rawId")) { d.rawId = m.rawId; + if (o.oneofs) + d._rawId = "rawId"; } if (m.timestamp != null && m.hasOwnProperty("timestamp")) { if (typeof m.timestamp === "number") d.timestamp = o.longs === String ? String(m.timestamp) : m.timestamp; else d.timestamp = o.longs === String ? longToString(m.timestamp, true) : o.longs === Number ? longToNumber(m.timestamp, true) : m.timestamp; + if (o.oneofs) + d._timestamp = "timestamp"; } if (m.keyIndex != null && m.hasOwnProperty("keyIndex")) { d.keyIndex = m.keyIndex; + if (o.oneofs) + d._keyIndex = "keyIndex"; } if (m.accountType != null && m.hasOwnProperty("accountType")) { d.accountType = o.enums === String ? $root.proto.ADVEncryptionType[m.accountType] === undefined ? m.accountType : $root.proto.ADVEncryptionType[m.accountType] : m.accountType; + if (o.oneofs) + d._accountType = "accountType"; } if (m.deviceType != null && m.hasOwnProperty("deviceType")) { d.deviceType = o.enums === String ? $root.proto.ADVEncryptionType[m.deviceType] === undefined ? m.deviceType : $root.proto.ADVEncryptionType[m.deviceType] : m.deviceType; + if (o.oneofs) + d._deviceType = "deviceType"; } return d; }; @@ -240,11 +271,37 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - ADVKeyIndexList.prototype.rawId = 0; - ADVKeyIndexList.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - ADVKeyIndexList.prototype.currentIndex = 0; + ADVKeyIndexList.prototype.rawId = null; + ADVKeyIndexList.prototype.timestamp = null; + ADVKeyIndexList.prototype.currentIndex = null; ADVKeyIndexList.prototype.validIndexes = $util.emptyArray; - ADVKeyIndexList.prototype.accountType = 0; + ADVKeyIndexList.prototype.accountType = null; + + let $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) + }); ADVKeyIndexList.create = function create(properties) { return new ADVKeyIndexList(properties); @@ -368,27 +425,23 @@ export const proto = $root.proto = (() => { if (o.arrays || o.defaults) { d.validIndexes = []; } - if (o.defaults) { - d.rawId = 0; - if ($util.Long) { - var n = new $util.Long(0, 0, true); - d.timestamp = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.timestamp = o.longs === String ? "0" : 0; - d.currentIndex = 0; - d.accountType = o.enums === String ? "E2EE" : 0; - } if (m.rawId != null && m.hasOwnProperty("rawId")) { d.rawId = m.rawId; + if (o.oneofs) + d._rawId = "rawId"; } if (m.timestamp != null && m.hasOwnProperty("timestamp")) { if (typeof m.timestamp === "number") d.timestamp = o.longs === String ? String(m.timestamp) : m.timestamp; else d.timestamp = o.longs === String ? longToString(m.timestamp, true) : o.longs === Number ? longToNumber(m.timestamp, true) : m.timestamp; + if (o.oneofs) + d._timestamp = "timestamp"; } if (m.currentIndex != null && m.hasOwnProperty("currentIndex")) { d.currentIndex = m.currentIndex; + if (o.oneofs) + d._currentIndex = "currentIndex"; } if (m.validIndexes && m.validIndexes.length) { d.validIndexes = []; @@ -398,6 +451,8 @@ export const proto = $root.proto = (() => { } if (m.accountType != null && m.hasOwnProperty("accountType")) { d.accountType = o.enums === String ? $root.proto.ADVEncryptionType[m.accountType] === undefined ? m.accountType : $root.proto.ADVEncryptionType[m.accountType] : m.accountType; + if (o.oneofs) + d._accountType = "accountType"; } return d; }; @@ -425,10 +480,36 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - ADVSignedDeviceIdentity.prototype.details = $util.newBuffer([]); - ADVSignedDeviceIdentity.prototype.accountSignatureKey = $util.newBuffer([]); - ADVSignedDeviceIdentity.prototype.accountSignature = $util.newBuffer([]); - ADVSignedDeviceIdentity.prototype.deviceSignature = $util.newBuffer([]); + ADVSignedDeviceIdentity.prototype.details = null; + ADVSignedDeviceIdentity.prototype.accountSignatureKey = null; + ADVSignedDeviceIdentity.prototype.accountSignature = null; + ADVSignedDeviceIdentity.prototype.deviceSignature = null; + + let $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) + }); ADVSignedDeviceIdentity.create = function create(properties) { return new ADVSignedDeviceIdentity(properties); @@ -516,47 +597,25 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - if (o.bytes === String) - d.details = ""; - else { - d.details = []; - if (o.bytes !== Array) - d.details = $util.newBuffer(d.details); - } - if (o.bytes === String) - d.accountSignatureKey = ""; - else { - d.accountSignatureKey = []; - if (o.bytes !== Array) - d.accountSignatureKey = $util.newBuffer(d.accountSignatureKey); - } - if (o.bytes === String) - d.accountSignature = ""; - else { - d.accountSignature = []; - if (o.bytes !== Array) - d.accountSignature = $util.newBuffer(d.accountSignature); - } - if (o.bytes === String) - d.deviceSignature = ""; - else { - d.deviceSignature = []; - if (o.bytes !== Array) - d.deviceSignature = $util.newBuffer(d.deviceSignature); - } - } if (m.details != null && m.hasOwnProperty("details")) { d.details = o.bytes === String ? $util.base64.encode(m.details, 0, m.details.length) : o.bytes === Array ? Array.prototype.slice.call(m.details) : m.details; + if (o.oneofs) + d._details = "details"; } if (m.accountSignatureKey != null && m.hasOwnProperty("accountSignatureKey")) { d.accountSignatureKey = o.bytes === String ? $util.base64.encode(m.accountSignatureKey, 0, m.accountSignatureKey.length) : o.bytes === Array ? Array.prototype.slice.call(m.accountSignatureKey) : m.accountSignatureKey; + if (o.oneofs) + d._accountSignatureKey = "accountSignatureKey"; } if (m.accountSignature != null && m.hasOwnProperty("accountSignature")) { d.accountSignature = o.bytes === String ? $util.base64.encode(m.accountSignature, 0, m.accountSignature.length) : o.bytes === Array ? Array.prototype.slice.call(m.accountSignature) : m.accountSignature; + if (o.oneofs) + d._accountSignature = "accountSignature"; } if (m.deviceSignature != null && m.hasOwnProperty("deviceSignature")) { d.deviceSignature = o.bytes === String ? $util.base64.encode(m.deviceSignature, 0, m.deviceSignature.length) : o.bytes === Array ? Array.prototype.slice.call(m.deviceSignature) : m.deviceSignature; + if (o.oneofs) + d._deviceSignature = "deviceSignature"; } return d; }; @@ -584,9 +643,29 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - ADVSignedDeviceIdentityHMAC.prototype.details = $util.newBuffer([]); - ADVSignedDeviceIdentityHMAC.prototype.hmac = $util.newBuffer([]); - ADVSignedDeviceIdentityHMAC.prototype.accountType = 0; + ADVSignedDeviceIdentityHMAC.prototype.details = null; + ADVSignedDeviceIdentityHMAC.prototype.hmac = null; + ADVSignedDeviceIdentityHMAC.prototype.accountType = null; + + let $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) + }); ADVSignedDeviceIdentityHMAC.create = function create(properties) { return new ADVSignedDeviceIdentityHMAC(properties); @@ -672,31 +751,20 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - if (o.bytes === String) - d.details = ""; - else { - d.details = []; - if (o.bytes !== Array) - d.details = $util.newBuffer(d.details); - } - if (o.bytes === String) - d.hmac = ""; - else { - d.hmac = []; - if (o.bytes !== Array) - d.hmac = $util.newBuffer(d.hmac); - } - d.accountType = o.enums === String ? "E2EE" : 0; - } if (m.details != null && m.hasOwnProperty("details")) { d.details = o.bytes === String ? $util.base64.encode(m.details, 0, m.details.length) : o.bytes === Array ? Array.prototype.slice.call(m.details) : m.details; + if (o.oneofs) + d._details = "details"; } if (m.hmac != null && m.hasOwnProperty("hmac")) { d.hmac = o.bytes === String ? $util.base64.encode(m.hmac, 0, m.hmac.length) : o.bytes === Array ? Array.prototype.slice.call(m.hmac) : m.hmac; + if (o.oneofs) + d._hmac = "hmac"; } if (m.accountType != null && m.hasOwnProperty("accountType")) { d.accountType = o.enums === String ? $root.proto.ADVEncryptionType[m.accountType] === undefined ? m.accountType : $root.proto.ADVEncryptionType[m.accountType] : m.accountType; + if (o.oneofs) + d._accountType = "accountType"; } return d; }; @@ -724,9 +792,29 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - ADVSignedKeyIndexList.prototype.details = $util.newBuffer([]); - ADVSignedKeyIndexList.prototype.accountSignature = $util.newBuffer([]); - ADVSignedKeyIndexList.prototype.accountSignatureKey = $util.newBuffer([]); + ADVSignedKeyIndexList.prototype.details = null; + ADVSignedKeyIndexList.prototype.accountSignature = null; + ADVSignedKeyIndexList.prototype.accountSignatureKey = null; + + let $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) + }); ADVSignedKeyIndexList.create = function create(properties) { return new ADVSignedKeyIndexList(properties); @@ -802,37 +890,20 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - if (o.bytes === String) - d.details = ""; - else { - d.details = []; - if (o.bytes !== Array) - d.details = $util.newBuffer(d.details); - } - if (o.bytes === String) - d.accountSignature = ""; - else { - d.accountSignature = []; - if (o.bytes !== Array) - d.accountSignature = $util.newBuffer(d.accountSignature); - } - if (o.bytes === String) - d.accountSignatureKey = ""; - else { - d.accountSignatureKey = []; - if (o.bytes !== Array) - d.accountSignatureKey = $util.newBuffer(d.accountSignatureKey); - } - } if (m.details != null && m.hasOwnProperty("details")) { d.details = o.bytes === String ? $util.base64.encode(m.details, 0, m.details.length) : o.bytes === Array ? Array.prototype.slice.call(m.details) : m.details; + if (o.oneofs) + d._details = "details"; } if (m.accountSignature != null && m.hasOwnProperty("accountSignature")) { d.accountSignature = o.bytes === String ? $util.base64.encode(m.accountSignature, 0, m.accountSignature.length) : o.bytes === Array ? Array.prototype.slice.call(m.accountSignature) : m.accountSignature; + if (o.oneofs) + d._accountSignature = "accountSignature"; } if (m.accountSignatureKey != null && m.hasOwnProperty("accountSignatureKey")) { d.accountSignatureKey = o.bytes === String ? $util.base64.encode(m.accountSignatureKey, 0, m.accountSignatureKey.length) : o.bytes === Array ? Array.prototype.slice.call(m.accountSignatureKey) : m.accountSignatureKey; + if (o.oneofs) + d._accountSignatureKey = "accountSignatureKey"; } return d; }; @@ -862,10 +933,18 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - AIHomeState.prototype.lastFetchTime = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + AIHomeState.prototype.lastFetchTime = null; AIHomeState.prototype.capabilityOptions = $util.emptyArray; AIHomeState.prototype.conversationOptions = $util.emptyArray; + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AIHomeState.prototype, "_lastFetchTime", { + get: $util.oneOfGetter($oneOfFields = ["lastFetchTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + AIHomeState.create = function create(properties) { return new AIHomeState(properties); }; @@ -964,18 +1043,13 @@ export const proto = $root.proto = (() => { d.capabilityOptions = []; d.conversationOptions = []; } - if (o.defaults) { - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.lastFetchTime = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.lastFetchTime = o.longs === String ? "0" : 0; - } if (m.lastFetchTime != null && m.hasOwnProperty("lastFetchTime")) { if (typeof m.lastFetchTime === "number") d.lastFetchTime = o.longs === String ? String(m.lastFetchTime) : m.lastFetchTime; else d.lastFetchTime = o.longs === String ? longToString(m.lastFetchTime) : o.longs === Number ? longToNumber(m.lastFetchTime) : m.lastFetchTime; + if (o.oneofs) + d._lastFetchTime = "lastFetchTime"; } if (m.capabilityOptions && m.capabilityOptions.length) { d.capabilityOptions = []; @@ -1012,14 +1086,64 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - AIHomeOption.prototype.type = 0; - AIHomeOption.prototype.title = ""; - AIHomeOption.prototype.promptText = ""; - AIHomeOption.prototype.sessionId = ""; - AIHomeOption.prototype.imageWdsIdentifier = ""; - AIHomeOption.prototype.imageTintColor = ""; - AIHomeOption.prototype.imageBackgroundColor = ""; - AIHomeOption.prototype.cardTypeId = ""; + AIHomeOption.prototype.type = null; + AIHomeOption.prototype.title = null; + AIHomeOption.prototype.promptText = null; + AIHomeOption.prototype.sessionId = null; + AIHomeOption.prototype.imageWdsIdentifier = null; + AIHomeOption.prototype.imageTintColor = null; + AIHomeOption.prototype.imageBackgroundColor = null; + AIHomeOption.prototype.cardTypeId = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AIHomeOption.prototype, "_type", { + get: $util.oneOfGetter($oneOfFields = ["type"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AIHomeOption.prototype, "_title", { + get: $util.oneOfGetter($oneOfFields = ["title"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AIHomeOption.prototype, "_promptText", { + get: $util.oneOfGetter($oneOfFields = ["promptText"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AIHomeOption.prototype, "_sessionId", { + get: $util.oneOfGetter($oneOfFields = ["sessionId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AIHomeOption.prototype, "_imageWdsIdentifier", { + get: $util.oneOfGetter($oneOfFields = ["imageWdsIdentifier"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AIHomeOption.prototype, "_imageTintColor", { + get: $util.oneOfGetter($oneOfFields = ["imageTintColor"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AIHomeOption.prototype, "_imageBackgroundColor", { + get: $util.oneOfGetter($oneOfFields = ["imageBackgroundColor"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AIHomeOption.prototype, "_cardTypeId", { + get: $util.oneOfGetter($oneOfFields = ["cardTypeId"]), + set: $util.oneOfSetter($oneOfFields) + }); AIHomeOption.create = function create(properties) { return new AIHomeOption(properties); @@ -1156,39 +1280,45 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.type = o.enums === String ? "PROMPT" : 0; - d.title = ""; - d.promptText = ""; - d.sessionId = ""; - d.imageWdsIdentifier = ""; - d.imageTintColor = ""; - d.imageBackgroundColor = ""; - d.cardTypeId = ""; - } if (m.type != null && m.hasOwnProperty("type")) { d.type = o.enums === String ? $root.proto.AIHomeState.AIHomeOption.AIHomeActionType[m.type] === undefined ? m.type : $root.proto.AIHomeState.AIHomeOption.AIHomeActionType[m.type] : m.type; + if (o.oneofs) + d._type = "type"; } if (m.title != null && m.hasOwnProperty("title")) { d.title = m.title; + if (o.oneofs) + d._title = "title"; } if (m.promptText != null && m.hasOwnProperty("promptText")) { d.promptText = m.promptText; + if (o.oneofs) + d._promptText = "promptText"; } if (m.sessionId != null && m.hasOwnProperty("sessionId")) { d.sessionId = m.sessionId; + if (o.oneofs) + d._sessionId = "sessionId"; } if (m.imageWdsIdentifier != null && m.hasOwnProperty("imageWdsIdentifier")) { d.imageWdsIdentifier = m.imageWdsIdentifier; + if (o.oneofs) + d._imageWdsIdentifier = "imageWdsIdentifier"; } if (m.imageTintColor != null && m.hasOwnProperty("imageTintColor")) { d.imageTintColor = m.imageTintColor; + if (o.oneofs) + d._imageTintColor = "imageTintColor"; } if (m.imageBackgroundColor != null && m.hasOwnProperty("imageBackgroundColor")) { d.imageBackgroundColor = m.imageBackgroundColor; + if (o.oneofs) + d._imageBackgroundColor = "imageBackgroundColor"; } if (m.cardTypeId != null && m.hasOwnProperty("cardTypeId")) { d.cardTypeId = m.cardTypeId; + if (o.oneofs) + d._cardTypeId = "cardTypeId"; } return d; }; @@ -1229,9 +1359,29 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - AIMediaCollectionMessage.prototype.collectionId = ""; - AIMediaCollectionMessage.prototype.expectedMediaCount = 0; - AIMediaCollectionMessage.prototype.hasGlobalCaption = false; + AIMediaCollectionMessage.prototype.collectionId = null; + AIMediaCollectionMessage.prototype.expectedMediaCount = null; + AIMediaCollectionMessage.prototype.hasGlobalCaption = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AIMediaCollectionMessage.prototype, "_collectionId", { + get: $util.oneOfGetter($oneOfFields = ["collectionId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AIMediaCollectionMessage.prototype, "_expectedMediaCount", { + get: $util.oneOfGetter($oneOfFields = ["expectedMediaCount"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AIMediaCollectionMessage.prototype, "_hasGlobalCaption", { + get: $util.oneOfGetter($oneOfFields = ["hasGlobalCaption"]), + set: $util.oneOfSetter($oneOfFields) + }); AIMediaCollectionMessage.create = function create(properties) { return new AIMediaCollectionMessage(properties); @@ -1298,19 +1448,20 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.collectionId = ""; - d.expectedMediaCount = 0; - d.hasGlobalCaption = false; - } if (m.collectionId != null && m.hasOwnProperty("collectionId")) { d.collectionId = m.collectionId; + if (o.oneofs) + d._collectionId = "collectionId"; } if (m.expectedMediaCount != null && m.hasOwnProperty("expectedMediaCount")) { d.expectedMediaCount = m.expectedMediaCount; + if (o.oneofs) + d._expectedMediaCount = "expectedMediaCount"; } if (m.hasGlobalCaption != null && m.hasOwnProperty("hasGlobalCaption")) { d.hasGlobalCaption = m.hasGlobalCaption; + if (o.oneofs) + d._hasGlobalCaption = "hasGlobalCaption"; } return d; }; @@ -1338,7 +1489,15 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - AIMediaCollectionMetadata.prototype.collectionId = ""; + AIMediaCollectionMetadata.prototype.collectionId = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AIMediaCollectionMetadata.prototype, "_collectionId", { + get: $util.oneOfGetter($oneOfFields = ["collectionId"]), + set: $util.oneOfSetter($oneOfFields) + }); AIMediaCollectionMetadata.create = function create(properties) { return new AIMediaCollectionMetadata(properties); @@ -1387,11 +1546,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.collectionId = ""; - } if (m.collectionId != null && m.hasOwnProperty("collectionId")) { d.collectionId = m.collectionId; + if (o.oneofs) + d._collectionId = "collectionId"; } return d; }; @@ -1421,7 +1579,27 @@ export const proto = $root.proto = (() => { AIQueryFanout.prototype.messageKey = null; AIQueryFanout.prototype.message = null; - AIQueryFanout.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + AIQueryFanout.prototype.timestamp = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AIQueryFanout.prototype, "_messageKey", { + get: $util.oneOfGetter($oneOfFields = ["messageKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AIQueryFanout.prototype, "_message", { + get: $util.oneOfGetter($oneOfFields = ["message"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AIQueryFanout.prototype, "_timestamp", { + get: $util.oneOfGetter($oneOfFields = ["timestamp"]), + set: $util.oneOfSetter($oneOfFields) + }); AIQueryFanout.create = function create(properties) { return new AIQueryFanout(properties); @@ -1499,26 +1677,23 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.messageKey = null; - d.message = null; - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.timestamp = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.timestamp = o.longs === String ? "0" : 0; - } if (m.messageKey != null && m.hasOwnProperty("messageKey")) { d.messageKey = $root.proto.MessageKey.toObject(m.messageKey, o); + if (o.oneofs) + d._messageKey = "messageKey"; } if (m.message != null && m.hasOwnProperty("message")) { d.message = $root.proto.Message.toObject(m.message, o); + if (o.oneofs) + d._message = "message"; } if (m.timestamp != null && m.hasOwnProperty("timestamp")) { if (typeof m.timestamp === "number") d.timestamp = o.longs === String ? String(m.timestamp) : m.timestamp; else d.timestamp = o.longs === String ? longToString(m.timestamp) : o.longs === Number ? longToNumber(m.timestamp) : m.timestamp; + if (o.oneofs) + d._timestamp = "timestamp"; } return d; }; @@ -1547,7 +1722,21 @@ export const proto = $root.proto = (() => { } AIRegenerateMetadata.prototype.messageKey = null; - AIRegenerateMetadata.prototype.responseTimestampMs = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + AIRegenerateMetadata.prototype.responseTimestampMs = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AIRegenerateMetadata.prototype, "_messageKey", { + get: $util.oneOfGetter($oneOfFields = ["messageKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AIRegenerateMetadata.prototype, "_responseTimestampMs", { + get: $util.oneOfGetter($oneOfFields = ["responseTimestampMs"]), + set: $util.oneOfSetter($oneOfFields) + }); AIRegenerateMetadata.create = function create(properties) { return new AIRegenerateMetadata(properties); @@ -1614,22 +1803,18 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.messageKey = null; - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.responseTimestampMs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.responseTimestampMs = o.longs === String ? "0" : 0; - } if (m.messageKey != null && m.hasOwnProperty("messageKey")) { d.messageKey = $root.proto.MessageKey.toObject(m.messageKey, o); + if (o.oneofs) + d._messageKey = "messageKey"; } if (m.responseTimestampMs != null && m.hasOwnProperty("responseTimestampMs")) { if (typeof m.responseTimestampMs === "number") d.responseTimestampMs = o.longs === String ? String(m.responseTimestampMs) : m.responseTimestampMs; else d.responseTimestampMs = o.longs === String ? longToString(m.responseTimestampMs) : o.longs === Number ? longToNumber(m.responseTimestampMs) : m.responseTimestampMs; + if (o.oneofs) + d._responseTimestampMs = "responseTimestampMs"; } return d; }; @@ -1658,9 +1843,17 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - AIRichResponseCodeMetadata.prototype.codeLanguage = ""; + AIRichResponseCodeMetadata.prototype.codeLanguage = null; AIRichResponseCodeMetadata.prototype.codeBlocks = $util.emptyArray; + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AIRichResponseCodeMetadata.prototype, "_codeLanguage", { + get: $util.oneOfGetter($oneOfFields = ["codeLanguage"]), + set: $util.oneOfSetter($oneOfFields) + }); + AIRichResponseCodeMetadata.create = function create(properties) { return new AIRichResponseCodeMetadata(properties); }; @@ -1731,11 +1924,10 @@ export const proto = $root.proto = (() => { if (o.arrays || o.defaults) { d.codeBlocks = []; } - if (o.defaults) { - d.codeLanguage = ""; - } if (m.codeLanguage != null && m.hasOwnProperty("codeLanguage")) { d.codeLanguage = m.codeLanguage; + if (o.oneofs) + d._codeLanguage = "codeLanguage"; } if (m.codeBlocks && m.codeBlocks.length) { d.codeBlocks = []; @@ -1766,8 +1958,22 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - AIRichResponseCodeBlock.prototype.highlightType = 0; - AIRichResponseCodeBlock.prototype.codeContent = ""; + AIRichResponseCodeBlock.prototype.highlightType = null; + AIRichResponseCodeBlock.prototype.codeContent = null; + + let $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) + }); AIRichResponseCodeBlock.create = function create(properties) { return new AIRichResponseCodeBlock(properties); @@ -1854,15 +2060,15 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.highlightType = o.enums === String ? "AI_RICH_RESPONSE_CODE_HIGHLIGHT_DEFAULT" : 0; - d.codeContent = ""; - } if (m.highlightType != null && m.hasOwnProperty("highlightType")) { d.highlightType = o.enums === String ? $root.proto.AIRichResponseCodeMetadata.AIRichResponseCodeHighlightType[m.highlightType] === undefined ? m.highlightType : $root.proto.AIRichResponseCodeMetadata.AIRichResponseCodeHighlightType[m.highlightType] : m.highlightType; + if (o.oneofs) + d._highlightType = "highlightType"; } if (m.codeContent != null && m.hasOwnProperty("codeContent")) { d.codeContent = m.codeContent; + if (o.oneofs) + d._codeContent = "codeContent"; } return d; }; @@ -1906,7 +2112,15 @@ export const proto = $root.proto = (() => { } AIRichResponseContentItemsMetadata.prototype.itemsMetadata = $util.emptyArray; - AIRichResponseContentItemsMetadata.prototype.contentType = 0; + AIRichResponseContentItemsMetadata.prototype.contentType = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AIRichResponseContentItemsMetadata.prototype, "_contentType", { + get: $util.oneOfGetter($oneOfFields = ["contentType"]), + set: $util.oneOfSetter($oneOfFields) + }); AIRichResponseContentItemsMetadata.create = function create(properties) { return new AIRichResponseContentItemsMetadata(properties); @@ -1991,9 +2205,6 @@ export const proto = $root.proto = (() => { if (o.arrays || o.defaults) { d.itemsMetadata = []; } - if (o.defaults) { - d.contentType = o.enums === String ? "DEFAULT" : 0; - } if (m.itemsMetadata && m.itemsMetadata.length) { d.itemsMetadata = []; for (var j = 0; j < m.itemsMetadata.length; ++j) { @@ -2002,6 +2213,8 @@ export const proto = $root.proto = (() => { } if (m.contentType != null && m.hasOwnProperty("contentType")) { d.contentType = o.enums === String ? $root.proto.AIRichResponseContentItemsMetadata.ContentType[m.contentType] === undefined ? m.contentType : $root.proto.AIRichResponseContentItemsMetadata.ContentType[m.contentType] : m.contentType; + if (o.oneofs) + d._contentType = "contentType"; } return d; }; @@ -2115,10 +2328,36 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - AIRichResponseReelItem.prototype.title = ""; - AIRichResponseReelItem.prototype.profileIconUrl = ""; - AIRichResponseReelItem.prototype.thumbnailUrl = ""; - AIRichResponseReelItem.prototype.videoUrl = ""; + AIRichResponseReelItem.prototype.title = null; + AIRichResponseReelItem.prototype.profileIconUrl = null; + AIRichResponseReelItem.prototype.thumbnailUrl = null; + AIRichResponseReelItem.prototype.videoUrl = null; + + let $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) + }); AIRichResponseReelItem.create = function create(properties) { return new AIRichResponseReelItem(properties); @@ -2194,23 +2433,25 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.title = ""; - d.profileIconUrl = ""; - d.thumbnailUrl = ""; - d.videoUrl = ""; - } if (m.title != null && m.hasOwnProperty("title")) { d.title = m.title; + if (o.oneofs) + d._title = "title"; } if (m.profileIconUrl != null && m.hasOwnProperty("profileIconUrl")) { d.profileIconUrl = m.profileIconUrl; + if (o.oneofs) + d._profileIconUrl = "profileIconUrl"; } if (m.thumbnailUrl != null && m.hasOwnProperty("thumbnailUrl")) { d.thumbnailUrl = m.thumbnailUrl; + if (o.oneofs) + d._thumbnailUrl = "thumbnailUrl"; } if (m.videoUrl != null && m.hasOwnProperty("videoUrl")) { d.videoUrl = m.videoUrl; + if (o.oneofs) + d._videoUrl = "videoUrl"; } return d; }; @@ -2248,10 +2489,36 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - AIRichResponseDynamicMetadata.prototype.type = 0; - AIRichResponseDynamicMetadata.prototype.version = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - AIRichResponseDynamicMetadata.prototype.url = ""; - AIRichResponseDynamicMetadata.prototype.loopCount = 0; + AIRichResponseDynamicMetadata.prototype.type = null; + AIRichResponseDynamicMetadata.prototype.version = null; + AIRichResponseDynamicMetadata.prototype.url = null; + AIRichResponseDynamicMetadata.prototype.loopCount = null; + + let $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) + }); AIRichResponseDynamicMetadata.create = function create(properties) { return new AIRichResponseDynamicMetadata(properties); @@ -2351,30 +2618,28 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.type = o.enums === String ? "AI_RICH_RESPONSE_DYNAMIC_METADATA_TYPE_UNKNOWN" : 0; - if ($util.Long) { - var n = new $util.Long(0, 0, true); - d.version = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.version = o.longs === String ? "0" : 0; - d.url = ""; - d.loopCount = 0; - } if (m.type != null && m.hasOwnProperty("type")) { d.type = o.enums === String ? $root.proto.AIRichResponseDynamicMetadata.AIRichResponseDynamicMetadataType[m.type] === undefined ? m.type : $root.proto.AIRichResponseDynamicMetadata.AIRichResponseDynamicMetadataType[m.type] : m.type; + if (o.oneofs) + d._type = "type"; } if (m.version != null && m.hasOwnProperty("version")) { if (typeof m.version === "number") d.version = o.longs === String ? String(m.version) : m.version; else d.version = o.longs === String ? longToString(m.version, true) : o.longs === Number ? longToNumber(m.version, true) : m.version; + if (o.oneofs) + d._version = "version"; } if (m.url != null && m.hasOwnProperty("url")) { d.url = m.url; + if (o.oneofs) + d._url = "url"; } if (m.loopCount != null && m.hasOwnProperty("loopCount")) { d.loopCount = m.loopCount; + if (o.oneofs) + d._loopCount = "loopCount"; } return d; }; @@ -2414,6 +2679,14 @@ export const proto = $root.proto = (() => { AIRichResponseGridImageMetadata.prototype.gridImageUrl = null; AIRichResponseGridImageMetadata.prototype.imageUrls = $util.emptyArray; + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AIRichResponseGridImageMetadata.prototype, "_gridImageUrl", { + get: $util.oneOfGetter($oneOfFields = ["gridImageUrl"]), + set: $util.oneOfSetter($oneOfFields) + }); + AIRichResponseGridImageMetadata.create = function create(properties) { return new AIRichResponseGridImageMetadata(properties); }; @@ -2486,11 +2759,10 @@ export const proto = $root.proto = (() => { if (o.arrays || o.defaults) { d.imageUrls = []; } - if (o.defaults) { - d.gridImageUrl = null; - } if (m.gridImageUrl != null && m.hasOwnProperty("gridImageUrl")) { d.gridImageUrl = $root.proto.AIRichResponseImageURL.toObject(m.gridImageUrl, o); + if (o.oneofs) + d._gridImageUrl = "gridImageUrl"; } if (m.imageUrls && m.imageUrls.length) { d.imageUrls = []; @@ -2524,9 +2796,29 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - AIRichResponseImageURL.prototype.imagePreviewUrl = ""; - AIRichResponseImageURL.prototype.imageHighResUrl = ""; - AIRichResponseImageURL.prototype.sourceUrl = ""; + AIRichResponseImageURL.prototype.imagePreviewUrl = null; + AIRichResponseImageURL.prototype.imageHighResUrl = null; + AIRichResponseImageURL.prototype.sourceUrl = null; + + let $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) + }); AIRichResponseImageURL.create = function create(properties) { return new AIRichResponseImageURL(properties); @@ -2593,19 +2885,20 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.imagePreviewUrl = ""; - d.imageHighResUrl = ""; - d.sourceUrl = ""; - } if (m.imagePreviewUrl != null && m.hasOwnProperty("imagePreviewUrl")) { d.imagePreviewUrl = m.imagePreviewUrl; + if (o.oneofs) + d._imagePreviewUrl = "imagePreviewUrl"; } if (m.imageHighResUrl != null && m.hasOwnProperty("imageHighResUrl")) { d.imageHighResUrl = m.imageHighResUrl; + if (o.oneofs) + d._imageHighResUrl = "imageHighResUrl"; } if (m.sourceUrl != null && m.hasOwnProperty("sourceUrl")) { d.sourceUrl = m.sourceUrl; + if (o.oneofs) + d._sourceUrl = "sourceUrl"; } return d; }; @@ -2634,9 +2927,35 @@ export const proto = $root.proto = (() => { } AIRichResponseInlineImageMetadata.prototype.imageUrl = null; - AIRichResponseInlineImageMetadata.prototype.imageText = ""; - AIRichResponseInlineImageMetadata.prototype.alignment = 0; - AIRichResponseInlineImageMetadata.prototype.tapLinkUrl = ""; + AIRichResponseInlineImageMetadata.prototype.imageText = null; + AIRichResponseInlineImageMetadata.prototype.alignment = null; + AIRichResponseInlineImageMetadata.prototype.tapLinkUrl = null; + + let $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) + }); AIRichResponseInlineImageMetadata.create = function create(properties) { return new AIRichResponseInlineImageMetadata(properties); @@ -2731,23 +3050,25 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.imageUrl = null; - d.imageText = ""; - d.alignment = o.enums === String ? "AI_RICH_RESPONSE_IMAGE_LAYOUT_LEADING_ALIGNED" : 0; - d.tapLinkUrl = ""; - } if (m.imageUrl != null && m.hasOwnProperty("imageUrl")) { d.imageUrl = $root.proto.AIRichResponseImageURL.toObject(m.imageUrl, o); + if (o.oneofs) + d._imageUrl = "imageUrl"; } if (m.imageText != null && m.hasOwnProperty("imageText")) { d.imageText = m.imageText; + if (o.oneofs) + d._imageText = "imageText"; } if (m.alignment != null && m.hasOwnProperty("alignment")) { d.alignment = o.enums === String ? $root.proto.AIRichResponseInlineImageMetadata.AIRichResponseImageAlignment[m.alignment] === undefined ? m.alignment : $root.proto.AIRichResponseInlineImageMetadata.AIRichResponseImageAlignment[m.alignment] : m.alignment; + if (o.oneofs) + d._alignment = "alignment"; } if (m.tapLinkUrl != null && m.hasOwnProperty("tapLinkUrl")) { d.tapLinkUrl = m.tapLinkUrl; + if (o.oneofs) + d._tapLinkUrl = "tapLinkUrl"; } return d; }; @@ -2784,9 +3105,17 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - AIRichResponseLatexMetadata.prototype.text = ""; + AIRichResponseLatexMetadata.prototype.text = null; AIRichResponseLatexMetadata.prototype.expressions = $util.emptyArray; + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AIRichResponseLatexMetadata.prototype, "_text", { + get: $util.oneOfGetter($oneOfFields = ["text"]), + set: $util.oneOfSetter($oneOfFields) + }); + AIRichResponseLatexMetadata.create = function create(properties) { return new AIRichResponseLatexMetadata(properties); }; @@ -2857,11 +3186,10 @@ export const proto = $root.proto = (() => { if (o.arrays || o.defaults) { d.expressions = []; } - if (o.defaults) { - d.text = ""; - } if (m.text != null && m.hasOwnProperty("text")) { d.text = m.text; + if (o.oneofs) + d._text = "text"; } if (m.expressions && m.expressions.length) { d.expressions = []; @@ -2892,15 +3220,71 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - AIRichResponseLatexExpression.prototype.latexExpression = ""; - AIRichResponseLatexExpression.prototype.url = ""; - AIRichResponseLatexExpression.prototype.width = 0; - AIRichResponseLatexExpression.prototype.height = 0; - AIRichResponseLatexExpression.prototype.fontHeight = 0; - AIRichResponseLatexExpression.prototype.imageTopPadding = 0; - AIRichResponseLatexExpression.prototype.imageLeadingPadding = 0; - AIRichResponseLatexExpression.prototype.imageBottomPadding = 0; - AIRichResponseLatexExpression.prototype.imageTrailingPadding = 0; + AIRichResponseLatexExpression.prototype.latexExpression = null; + AIRichResponseLatexExpression.prototype.url = null; + AIRichResponseLatexExpression.prototype.width = null; + AIRichResponseLatexExpression.prototype.height = null; + AIRichResponseLatexExpression.prototype.fontHeight = null; + AIRichResponseLatexExpression.prototype.imageTopPadding = null; + AIRichResponseLatexExpression.prototype.imageLeadingPadding = null; + AIRichResponseLatexExpression.prototype.imageBottomPadding = null; + AIRichResponseLatexExpression.prototype.imageTrailingPadding = null; + + let $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) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AIRichResponseLatexExpression.prototype, "_imageTopPadding", { + get: $util.oneOfGetter($oneOfFields = ["imageTopPadding"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AIRichResponseLatexExpression.prototype, "_imageLeadingPadding", { + get: $util.oneOfGetter($oneOfFields = ["imageLeadingPadding"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AIRichResponseLatexExpression.prototype, "_imageBottomPadding", { + get: $util.oneOfGetter($oneOfFields = ["imageBottomPadding"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AIRichResponseLatexExpression.prototype, "_imageTrailingPadding", { + get: $util.oneOfGetter($oneOfFields = ["imageTrailingPadding"]), + set: $util.oneOfSetter($oneOfFields) + }); AIRichResponseLatexExpression.create = function create(properties) { return new AIRichResponseLatexExpression(properties); @@ -3021,43 +3405,50 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.latexExpression = ""; - d.url = ""; - d.width = 0; - d.height = 0; - d.fontHeight = 0; - d.imageTopPadding = 0; - d.imageLeadingPadding = 0; - d.imageBottomPadding = 0; - d.imageTrailingPadding = 0; - } if (m.latexExpression != null && m.hasOwnProperty("latexExpression")) { d.latexExpression = m.latexExpression; + if (o.oneofs) + d._latexExpression = "latexExpression"; } if (m.url != null && m.hasOwnProperty("url")) { d.url = m.url; + if (o.oneofs) + d._url = "url"; } if (m.width != null && m.hasOwnProperty("width")) { d.width = o.json && !isFinite(m.width) ? String(m.width) : m.width; + if (o.oneofs) + d._width = "width"; } if (m.height != null && m.hasOwnProperty("height")) { d.height = o.json && !isFinite(m.height) ? String(m.height) : m.height; + if (o.oneofs) + d._height = "height"; } if (m.fontHeight != null && m.hasOwnProperty("fontHeight")) { d.fontHeight = o.json && !isFinite(m.fontHeight) ? String(m.fontHeight) : m.fontHeight; + if (o.oneofs) + d._fontHeight = "fontHeight"; } if (m.imageTopPadding != null && m.hasOwnProperty("imageTopPadding")) { d.imageTopPadding = o.json && !isFinite(m.imageTopPadding) ? String(m.imageTopPadding) : m.imageTopPadding; + if (o.oneofs) + d._imageTopPadding = "imageTopPadding"; } if (m.imageLeadingPadding != null && m.hasOwnProperty("imageLeadingPadding")) { d.imageLeadingPadding = o.json && !isFinite(m.imageLeadingPadding) ? String(m.imageLeadingPadding) : m.imageLeadingPadding; + if (o.oneofs) + d._imageLeadingPadding = "imageLeadingPadding"; } if (m.imageBottomPadding != null && m.hasOwnProperty("imageBottomPadding")) { d.imageBottomPadding = o.json && !isFinite(m.imageBottomPadding) ? String(m.imageBottomPadding) : m.imageBottomPadding; + if (o.oneofs) + d._imageBottomPadding = "imageBottomPadding"; } if (m.imageTrailingPadding != null && m.hasOwnProperty("imageTrailingPadding")) { d.imageTrailingPadding = o.json && !isFinite(m.imageTrailingPadding) ? String(m.imageTrailingPadding) : m.imageTrailingPadding; + if (o.oneofs) + d._imageTrailingPadding = "imageTrailingPadding"; } return d; }; @@ -3089,12 +3480,44 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - AIRichResponseMapMetadata.prototype.centerLatitude = 0; - AIRichResponseMapMetadata.prototype.centerLongitude = 0; - AIRichResponseMapMetadata.prototype.latitudeDelta = 0; - AIRichResponseMapMetadata.prototype.longitudeDelta = 0; + AIRichResponseMapMetadata.prototype.centerLatitude = null; + AIRichResponseMapMetadata.prototype.centerLongitude = null; + AIRichResponseMapMetadata.prototype.latitudeDelta = null; + AIRichResponseMapMetadata.prototype.longitudeDelta = null; AIRichResponseMapMetadata.prototype.annotations = $util.emptyArray; - AIRichResponseMapMetadata.prototype.showInfoList = false; + AIRichResponseMapMetadata.prototype.showInfoList = null; + + let $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) + }); AIRichResponseMapMetadata.create = function create(properties) { return new AIRichResponseMapMetadata(properties); @@ -3202,24 +3625,25 @@ export const proto = $root.proto = (() => { if (o.arrays || o.defaults) { d.annotations = []; } - if (o.defaults) { - d.centerLatitude = 0; - d.centerLongitude = 0; - d.latitudeDelta = 0; - d.longitudeDelta = 0; - d.showInfoList = false; - } if (m.centerLatitude != null && m.hasOwnProperty("centerLatitude")) { d.centerLatitude = o.json && !isFinite(m.centerLatitude) ? String(m.centerLatitude) : m.centerLatitude; + if (o.oneofs) + d._centerLatitude = "centerLatitude"; } if (m.centerLongitude != null && m.hasOwnProperty("centerLongitude")) { d.centerLongitude = o.json && !isFinite(m.centerLongitude) ? String(m.centerLongitude) : m.centerLongitude; + if (o.oneofs) + d._centerLongitude = "centerLongitude"; } if (m.latitudeDelta != null && m.hasOwnProperty("latitudeDelta")) { d.latitudeDelta = o.json && !isFinite(m.latitudeDelta) ? String(m.latitudeDelta) : m.latitudeDelta; + if (o.oneofs) + d._latitudeDelta = "latitudeDelta"; } if (m.longitudeDelta != null && m.hasOwnProperty("longitudeDelta")) { d.longitudeDelta = o.json && !isFinite(m.longitudeDelta) ? String(m.longitudeDelta) : m.longitudeDelta; + if (o.oneofs) + d._longitudeDelta = "longitudeDelta"; } if (m.annotations && m.annotations.length) { d.annotations = []; @@ -3229,6 +3653,8 @@ export const proto = $root.proto = (() => { } if (m.showInfoList != null && m.hasOwnProperty("showInfoList")) { d.showInfoList = m.showInfoList; + if (o.oneofs) + d._showInfoList = "showInfoList"; } return d; }; @@ -3253,11 +3679,43 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - AIRichResponseMapAnnotation.prototype.annotationNumber = 0; - AIRichResponseMapAnnotation.prototype.latitude = 0; - AIRichResponseMapAnnotation.prototype.longitude = 0; - AIRichResponseMapAnnotation.prototype.title = ""; - AIRichResponseMapAnnotation.prototype.body = ""; + AIRichResponseMapAnnotation.prototype.annotationNumber = null; + AIRichResponseMapAnnotation.prototype.latitude = null; + AIRichResponseMapAnnotation.prototype.longitude = null; + AIRichResponseMapAnnotation.prototype.title = null; + AIRichResponseMapAnnotation.prototype.body = null; + + let $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) + }); AIRichResponseMapAnnotation.create = function create(properties) { return new AIRichResponseMapAnnotation(properties); @@ -3342,27 +3800,30 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.annotationNumber = 0; - d.latitude = 0; - d.longitude = 0; - d.title = ""; - d.body = ""; - } if (m.annotationNumber != null && m.hasOwnProperty("annotationNumber")) { d.annotationNumber = m.annotationNumber; + if (o.oneofs) + d._annotationNumber = "annotationNumber"; } if (m.latitude != null && m.hasOwnProperty("latitude")) { d.latitude = o.json && !isFinite(m.latitude) ? String(m.latitude) : m.latitude; + if (o.oneofs) + d._latitude = "latitude"; } if (m.longitude != null && m.hasOwnProperty("longitude")) { d.longitude = o.json && !isFinite(m.longitude) ? String(m.longitude) : m.longitude; + if (o.oneofs) + d._longitude = "longitude"; } if (m.title != null && m.hasOwnProperty("title")) { d.title = m.title; + if (o.oneofs) + d._title = "title"; } if (m.body != null && m.hasOwnProperty("body")) { d.body = m.body; + if (o.oneofs) + d._body = "body"; } return d; }; @@ -3394,11 +3855,31 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - AIRichResponseMessage.prototype.messageType = 0; + AIRichResponseMessage.prototype.messageType = null; AIRichResponseMessage.prototype.submessages = $util.emptyArray; AIRichResponseMessage.prototype.unifiedResponse = null; AIRichResponseMessage.prototype.contextInfo = null; + let $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, "_unifiedResponse", { + get: $util.oneOfGetter($oneOfFields = ["unifiedResponse"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AIRichResponseMessage.prototype, "_contextInfo", { + get: $util.oneOfGetter($oneOfFields = ["contextInfo"]), + set: $util.oneOfSetter($oneOfFields) + }); + AIRichResponseMessage.create = function create(properties) { return new AIRichResponseMessage(properties); }; @@ -3504,13 +3985,10 @@ export const proto = $root.proto = (() => { if (o.arrays || o.defaults) { d.submessages = []; } - if (o.defaults) { - d.messageType = o.enums === String ? "AI_RICH_RESPONSE_TYPE_UNKNOWN" : 0; - d.unifiedResponse = null; - d.contextInfo = null; - } if (m.messageType != null && m.hasOwnProperty("messageType")) { d.messageType = o.enums === String ? $root.proto.AIRichResponseMessageType[m.messageType] === undefined ? m.messageType : $root.proto.AIRichResponseMessageType[m.messageType] : m.messageType; + if (o.oneofs) + d._messageType = "messageType"; } if (m.submessages && m.submessages.length) { d.submessages = []; @@ -3520,9 +3998,13 @@ export const proto = $root.proto = (() => { } if (m.unifiedResponse != null && m.hasOwnProperty("unifiedResponse")) { d.unifiedResponse = $root.proto.AIRichResponseUnifiedResponse.toObject(m.unifiedResponse, o); + if (o.oneofs) + d._unifiedResponse = "unifiedResponse"; } if (m.contextInfo != null && m.hasOwnProperty("contextInfo")) { d.contextInfo = $root.proto.ContextInfo.toObject(m.contextInfo, o); + if (o.oneofs) + d._contextInfo = "contextInfo"; } return d; }; @@ -3557,9 +4039,9 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - AIRichResponseSubMessage.prototype.messageType = 0; + AIRichResponseSubMessage.prototype.messageType = null; AIRichResponseSubMessage.prototype.gridImageMetadata = null; - AIRichResponseSubMessage.prototype.messageText = ""; + AIRichResponseSubMessage.prototype.messageText = null; AIRichResponseSubMessage.prototype.imageMetadata = null; AIRichResponseSubMessage.prototype.codeMetadata = null; AIRichResponseSubMessage.prototype.tableMetadata = null; @@ -3568,6 +4050,68 @@ export const proto = $root.proto = (() => { AIRichResponseSubMessage.prototype.mapMetadata = null; AIRichResponseSubMessage.prototype.contentItemsMetadata = null; + let $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) + }); + AIRichResponseSubMessage.create = function create(properties) { return new AIRichResponseSubMessage(properties); }; @@ -3757,47 +4301,55 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.messageType = o.enums === String ? "AI_RICH_RESPONSE_UNKNOWN" : 0; - d.gridImageMetadata = null; - d.messageText = ""; - d.imageMetadata = null; - d.codeMetadata = null; - d.tableMetadata = null; - d.dynamicMetadata = null; - d.latexMetadata = null; - d.mapMetadata = null; - d.contentItemsMetadata = null; - } if (m.messageType != null && m.hasOwnProperty("messageType")) { d.messageType = o.enums === String ? $root.proto.AIRichResponseSubMessageType[m.messageType] === undefined ? m.messageType : $root.proto.AIRichResponseSubMessageType[m.messageType] : m.messageType; + if (o.oneofs) + d._messageType = "messageType"; } if (m.gridImageMetadata != null && m.hasOwnProperty("gridImageMetadata")) { d.gridImageMetadata = $root.proto.AIRichResponseGridImageMetadata.toObject(m.gridImageMetadata, o); + if (o.oneofs) + d._gridImageMetadata = "gridImageMetadata"; } if (m.messageText != null && m.hasOwnProperty("messageText")) { d.messageText = m.messageText; + if (o.oneofs) + d._messageText = "messageText"; } if (m.imageMetadata != null && m.hasOwnProperty("imageMetadata")) { d.imageMetadata = $root.proto.AIRichResponseInlineImageMetadata.toObject(m.imageMetadata, o); + if (o.oneofs) + d._imageMetadata = "imageMetadata"; } if (m.codeMetadata != null && m.hasOwnProperty("codeMetadata")) { d.codeMetadata = $root.proto.AIRichResponseCodeMetadata.toObject(m.codeMetadata, o); + if (o.oneofs) + d._codeMetadata = "codeMetadata"; } if (m.tableMetadata != null && m.hasOwnProperty("tableMetadata")) { d.tableMetadata = $root.proto.AIRichResponseTableMetadata.toObject(m.tableMetadata, o); + if (o.oneofs) + d._tableMetadata = "tableMetadata"; } if (m.dynamicMetadata != null && m.hasOwnProperty("dynamicMetadata")) { d.dynamicMetadata = $root.proto.AIRichResponseDynamicMetadata.toObject(m.dynamicMetadata, o); + if (o.oneofs) + d._dynamicMetadata = "dynamicMetadata"; } if (m.latexMetadata != null && m.hasOwnProperty("latexMetadata")) { d.latexMetadata = $root.proto.AIRichResponseLatexMetadata.toObject(m.latexMetadata, o); + if (o.oneofs) + d._latexMetadata = "latexMetadata"; } if (m.mapMetadata != null && m.hasOwnProperty("mapMetadata")) { d.mapMetadata = $root.proto.AIRichResponseMapMetadata.toObject(m.mapMetadata, o); + if (o.oneofs) + d._mapMetadata = "mapMetadata"; } if (m.contentItemsMetadata != null && m.hasOwnProperty("contentItemsMetadata")) { d.contentItemsMetadata = $root.proto.AIRichResponseContentItemsMetadata.toObject(m.contentItemsMetadata, o); + if (o.oneofs) + d._contentItemsMetadata = "contentItemsMetadata"; } return d; }; @@ -3842,7 +4394,15 @@ export const proto = $root.proto = (() => { } AIRichResponseTableMetadata.prototype.rows = $util.emptyArray; - AIRichResponseTableMetadata.prototype.title = ""; + AIRichResponseTableMetadata.prototype.title = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AIRichResponseTableMetadata.prototype, "_title", { + get: $util.oneOfGetter($oneOfFields = ["title"]), + set: $util.oneOfSetter($oneOfFields) + }); AIRichResponseTableMetadata.create = function create(properties) { return new AIRichResponseTableMetadata(properties); @@ -3914,9 +4474,6 @@ export const proto = $root.proto = (() => { if (o.arrays || o.defaults) { d.rows = []; } - if (o.defaults) { - d.title = ""; - } if (m.rows && m.rows.length) { d.rows = []; for (var j = 0; j < m.rows.length; ++j) { @@ -3925,6 +4482,8 @@ export const proto = $root.proto = (() => { } if (m.title != null && m.hasOwnProperty("title")) { d.title = m.title; + if (o.oneofs) + d._title = "title"; } return d; }; @@ -3951,7 +4510,15 @@ export const proto = $root.proto = (() => { } AIRichResponseTableRow.prototype.items = $util.emptyArray; - AIRichResponseTableRow.prototype.isHeading = false; + AIRichResponseTableRow.prototype.isHeading = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AIRichResponseTableRow.prototype, "_isHeading", { + get: $util.oneOfGetter($oneOfFields = ["isHeading"]), + set: $util.oneOfSetter($oneOfFields) + }); AIRichResponseTableRow.create = function create(properties) { return new AIRichResponseTableRow(properties); @@ -4021,9 +4588,6 @@ export const proto = $root.proto = (() => { if (o.arrays || o.defaults) { d.items = []; } - if (o.defaults) { - d.isHeading = false; - } if (m.items && m.items.length) { d.items = []; for (var j = 0; j < m.items.length; ++j) { @@ -4032,6 +4596,8 @@ export const proto = $root.proto = (() => { } if (m.isHeading != null && m.hasOwnProperty("isHeading")) { d.isHeading = m.isHeading; + if (o.oneofs) + d._isHeading = "isHeading"; } return d; }; @@ -4062,7 +4628,15 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - AIRichResponseUnifiedResponse.prototype.data = $util.newBuffer([]); + AIRichResponseUnifiedResponse.prototype.data = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AIRichResponseUnifiedResponse.prototype, "_data", { + get: $util.oneOfGetter($oneOfFields = ["data"]), + set: $util.oneOfSetter($oneOfFields) + }); AIRichResponseUnifiedResponse.create = function create(properties) { return new AIRichResponseUnifiedResponse(properties); @@ -4114,17 +4688,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - if (o.bytes === String) - d.data = ""; - else { - d.data = []; - if (o.bytes !== Array) - d.data = $util.newBuffer(d.data); - } - } if (m.data != null && m.hasOwnProperty("data")) { d.data = o.bytes === String ? $util.base64.encode(m.data, 0, m.data.length) : o.bytes === Array ? Array.prototype.slice.call(m.data) : m.data; + if (o.oneofs) + d._data = "data"; } return d; }; @@ -4155,6 +4722,20 @@ export const proto = $root.proto = (() => { AIThreadInfo.prototype.serverInfo = null; AIThreadInfo.prototype.clientInfo = null; + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AIThreadInfo.prototype, "_serverInfo", { + get: $util.oneOfGetter($oneOfFields = ["serverInfo"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AIThreadInfo.prototype, "_clientInfo", { + get: $util.oneOfGetter($oneOfFields = ["clientInfo"]), + set: $util.oneOfSetter($oneOfFields) + }); + AIThreadInfo.create = function create(properties) { return new AIThreadInfo(properties); }; @@ -4215,15 +4796,15 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.serverInfo = null; - d.clientInfo = null; - } if (m.serverInfo != null && m.hasOwnProperty("serverInfo")) { d.serverInfo = $root.proto.AIThreadInfo.AIThreadServerInfo.toObject(m.serverInfo, o); + if (o.oneofs) + d._serverInfo = "serverInfo"; } if (m.clientInfo != null && m.hasOwnProperty("clientInfo")) { d.clientInfo = $root.proto.AIThreadInfo.AIThreadClientInfo.toObject(m.clientInfo, o); + if (o.oneofs) + d._clientInfo = "clientInfo"; } return d; }; @@ -4248,7 +4829,15 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - AIThreadClientInfo.prototype.type = 0; + AIThreadClientInfo.prototype.type = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AIThreadClientInfo.prototype, "_type", { + get: $util.oneOfGetter($oneOfFields = ["type"]), + set: $util.oneOfSetter($oneOfFields) + }); AIThreadClientInfo.create = function create(properties) { return new AIThreadClientInfo(properties); @@ -4314,11 +4903,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.type = o.enums === String ? "UNKNOWN" : 0; - } if (m.type != null && m.hasOwnProperty("type")) { d.type = o.enums === String ? $root.proto.AIThreadInfo.AIThreadClientInfo.AIThreadType[m.type] === undefined ? m.type : $root.proto.AIThreadInfo.AIThreadClientInfo.AIThreadType[m.type] : m.type; + if (o.oneofs) + d._type = "type"; } return d; }; @@ -4354,7 +4942,15 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - AIThreadServerInfo.prototype.title = ""; + AIThreadServerInfo.prototype.title = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AIThreadServerInfo.prototype, "_title", { + get: $util.oneOfGetter($oneOfFields = ["title"]), + set: $util.oneOfSetter($oneOfFields) + }); AIThreadServerInfo.create = function create(properties) { return new AIThreadServerInfo(properties); @@ -4403,11 +4999,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.title = ""; - } if (m.title != null && m.hasOwnProperty("title")) { d.title = m.title; + if (o.oneofs) + d._title = "title"; } return d; }; @@ -4438,10 +5033,36 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - Account.prototype.lid = ""; - Account.prototype.username = ""; - Account.prototype.countryCode = ""; - Account.prototype.isUsernameDeleted = false; + Account.prototype.lid = null; + Account.prototype.username = null; + Account.prototype.countryCode = null; + Account.prototype.isUsernameDeleted = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Account.prototype, "_lid", { + get: $util.oneOfGetter($oneOfFields = ["lid"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Account.prototype, "_username", { + get: $util.oneOfGetter($oneOfFields = ["username"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Account.prototype, "_countryCode", { + get: $util.oneOfGetter($oneOfFields = ["countryCode"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Account.prototype, "_isUsernameDeleted", { + get: $util.oneOfGetter($oneOfFields = ["isUsernameDeleted"]), + set: $util.oneOfSetter($oneOfFields) + }); Account.create = function create(properties) { return new Account(properties); @@ -4517,23 +5138,25 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.lid = ""; - d.username = ""; - d.countryCode = ""; - d.isUsernameDeleted = false; - } if (m.lid != null && m.hasOwnProperty("lid")) { d.lid = m.lid; + if (o.oneofs) + d._lid = "lid"; } if (m.username != null && m.hasOwnProperty("username")) { d.username = m.username; + if (o.oneofs) + d._username = "username"; } if (m.countryCode != null && m.hasOwnProperty("countryCode")) { d.countryCode = m.countryCode; + if (o.oneofs) + d._countryCode = "countryCode"; } if (m.isUsernameDeleted != null && m.hasOwnProperty("isUsernameDeleted")) { d.isUsernameDeleted = m.isUsernameDeleted; + if (o.oneofs) + d._isUsernameDeleted = "isUsernameDeleted"; } return d; }; @@ -4561,8 +5184,22 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - ActionLink.prototype.url = ""; - ActionLink.prototype.buttonTitle = ""; + ActionLink.prototype.url = null; + ActionLink.prototype.buttonTitle = null; + + let $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) + }); ActionLink.create = function create(properties) { return new ActionLink(properties); @@ -4620,15 +5257,15 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.url = ""; - d.buttonTitle = ""; - } if (m.url != null && m.hasOwnProperty("url")) { d.url = m.url; + if (o.oneofs) + d._url = "url"; } if (m.buttonTitle != null && m.hasOwnProperty("buttonTitle")) { d.buttonTitle = m.buttonTitle; + if (o.oneofs) + d._buttonTitle = "buttonTitle"; } return d; }; @@ -4656,10 +5293,36 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - AutoDownloadSettings.prototype.downloadImages = false; - AutoDownloadSettings.prototype.downloadAudio = false; - AutoDownloadSettings.prototype.downloadVideo = false; - AutoDownloadSettings.prototype.downloadDocuments = false; + AutoDownloadSettings.prototype.downloadImages = null; + AutoDownloadSettings.prototype.downloadAudio = null; + AutoDownloadSettings.prototype.downloadVideo = null; + AutoDownloadSettings.prototype.downloadDocuments = null; + + let $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) + }); AutoDownloadSettings.create = function create(properties) { return new AutoDownloadSettings(properties); @@ -4735,23 +5398,25 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.downloadImages = false; - d.downloadAudio = false; - d.downloadVideo = false; - d.downloadDocuments = false; - } if (m.downloadImages != null && m.hasOwnProperty("downloadImages")) { d.downloadImages = m.downloadImages; + if (o.oneofs) + d._downloadImages = "downloadImages"; } if (m.downloadAudio != null && m.hasOwnProperty("downloadAudio")) { d.downloadAudio = m.downloadAudio; + if (o.oneofs) + d._downloadAudio = "downloadAudio"; } if (m.downloadVideo != null && m.hasOwnProperty("downloadVideo")) { d.downloadVideo = m.downloadVideo; + if (o.oneofs) + d._downloadVideo = "downloadVideo"; } if (m.downloadDocuments != null && m.hasOwnProperty("downloadDocuments")) { d.downloadDocuments = m.downloadDocuments; + if (o.oneofs) + d._downloadDocuments = "downloadDocuments"; } return d; }; @@ -4779,8 +5444,22 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - AvatarUserSettings.prototype.fbid = ""; - AvatarUserSettings.prototype.password = ""; + AvatarUserSettings.prototype.fbid = null; + AvatarUserSettings.prototype.password = null; + + let $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) + }); AvatarUserSettings.create = function create(properties) { return new AvatarUserSettings(properties); @@ -4838,15 +5517,15 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.fbid = ""; - d.password = ""; - } if (m.fbid != null && m.hasOwnProperty("fbid")) { d.fbid = m.fbid; + if (o.oneofs) + d._fbid = "fbid"; } if (m.password != null && m.hasOwnProperty("password")) { d.password = m.password; + if (o.oneofs) + d._password = "password"; } return d; }; @@ -4874,11 +5553,43 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - BizAccountLinkInfo.prototype.whatsappBizAcctFbid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - BizAccountLinkInfo.prototype.whatsappAcctNumber = ""; - BizAccountLinkInfo.prototype.issueTime = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - BizAccountLinkInfo.prototype.hostStorage = 0; - BizAccountLinkInfo.prototype.accountType = 0; + BizAccountLinkInfo.prototype.whatsappBizAcctFbid = null; + BizAccountLinkInfo.prototype.whatsappAcctNumber = null; + BizAccountLinkInfo.prototype.issueTime = null; + BizAccountLinkInfo.prototype.hostStorage = null; + BizAccountLinkInfo.prototype.accountType = null; + + let $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) + }); BizAccountLinkInfo.create = function create(properties) { return new BizAccountLinkInfo(properties); @@ -4999,41 +5710,36 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - if ($util.Long) { - var n = new $util.Long(0, 0, true); - d.whatsappBizAcctFbid = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.whatsappBizAcctFbid = o.longs === String ? "0" : 0; - d.whatsappAcctNumber = ""; - if ($util.Long) { - var n = new $util.Long(0, 0, true); - d.issueTime = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.issueTime = o.longs === String ? "0" : 0; - d.hostStorage = o.enums === String ? "ON_PREMISE" : 0; - d.accountType = o.enums === String ? "ENTERPRISE" : 0; - } if (m.whatsappBizAcctFbid != null && m.hasOwnProperty("whatsappBizAcctFbid")) { if (typeof m.whatsappBizAcctFbid === "number") d.whatsappBizAcctFbid = o.longs === String ? String(m.whatsappBizAcctFbid) : m.whatsappBizAcctFbid; else d.whatsappBizAcctFbid = o.longs === String ? longToString(m.whatsappBizAcctFbid, true) : o.longs === Number ? longToNumber(m.whatsappBizAcctFbid, true) : m.whatsappBizAcctFbid; + if (o.oneofs) + d._whatsappBizAcctFbid = "whatsappBizAcctFbid"; } if (m.whatsappAcctNumber != null && m.hasOwnProperty("whatsappAcctNumber")) { d.whatsappAcctNumber = m.whatsappAcctNumber; + if (o.oneofs) + d._whatsappAcctNumber = "whatsappAcctNumber"; } if (m.issueTime != null && m.hasOwnProperty("issueTime")) { if (typeof m.issueTime === "number") d.issueTime = o.longs === String ? String(m.issueTime) : m.issueTime; else d.issueTime = o.longs === String ? longToString(m.issueTime, true) : o.longs === Number ? longToNumber(m.issueTime, true) : m.issueTime; + if (o.oneofs) + d._issueTime = "issueTime"; } if (m.hostStorage != null && m.hasOwnProperty("hostStorage")) { d.hostStorage = o.enums === String ? $root.proto.BizAccountLinkInfo.HostStorageType[m.hostStorage] === undefined ? m.hostStorage : $root.proto.BizAccountLinkInfo.HostStorageType[m.hostStorage] : m.hostStorage; + if (o.oneofs) + d._hostStorage = "hostStorage"; } if (m.accountType != null && m.hasOwnProperty("accountType")) { d.accountType = o.enums === String ? $root.proto.BizAccountLinkInfo.AccountType[m.accountType] === undefined ? m.accountType : $root.proto.BizAccountLinkInfo.AccountType[m.accountType] : m.accountType; + if (o.oneofs) + d._accountType = "accountType"; } return d; }; @@ -5075,7 +5781,21 @@ export const proto = $root.proto = (() => { } BizAccountPayload.prototype.vnameCert = null; - BizAccountPayload.prototype.bizAcctLinkInfo = $util.newBuffer([]); + BizAccountPayload.prototype.bizAcctLinkInfo = null; + + let $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) + }); BizAccountPayload.create = function create(properties) { return new BizAccountPayload(properties); @@ -5138,21 +5858,15 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.vnameCert = null; - if (o.bytes === String) - d.bizAcctLinkInfo = ""; - else { - d.bizAcctLinkInfo = []; - if (o.bytes !== Array) - d.bizAcctLinkInfo = $util.newBuffer(d.bizAcctLinkInfo); - } - } if (m.vnameCert != null && m.hasOwnProperty("vnameCert")) { d.vnameCert = $root.proto.VerifiedNameCertificate.toObject(m.vnameCert, o); + if (o.oneofs) + d._vnameCert = "vnameCert"; } if (m.bizAcctLinkInfo != null && m.hasOwnProperty("bizAcctLinkInfo")) { d.bizAcctLinkInfo = o.bytes === String ? $util.base64.encode(m.bizAcctLinkInfo, 0, m.bizAcctLinkInfo.length) : o.bytes === Array ? Array.prototype.slice.call(m.bizAcctLinkInfo) : m.bizAcctLinkInfo; + if (o.oneofs) + d._bizAcctLinkInfo = "bizAcctLinkInfo"; } return d; }; @@ -5180,14 +5894,64 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - BizIdentityInfo.prototype.vlevel = 0; + BizIdentityInfo.prototype.vlevel = null; BizIdentityInfo.prototype.vnameCert = null; - BizIdentityInfo.prototype.signed = false; - BizIdentityInfo.prototype.revoked = false; - BizIdentityInfo.prototype.hostStorage = 0; - BizIdentityInfo.prototype.actualActors = 0; - BizIdentityInfo.prototype.privacyModeTs = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - BizIdentityInfo.prototype.featureControls = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + BizIdentityInfo.prototype.signed = null; + BizIdentityInfo.prototype.revoked = null; + BizIdentityInfo.prototype.hostStorage = null; + BizIdentityInfo.prototype.actualActors = null; + BizIdentityInfo.prototype.privacyModeTs = null; + BizIdentityInfo.prototype.featureControls = null; + + let $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) + }); BizIdentityInfo.create = function create(properties) { return new BizIdentityInfo(properties); @@ -5358,53 +6122,51 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.vlevel = o.enums === String ? "UNKNOWN" : 0; - d.vnameCert = null; - d.signed = false; - d.revoked = false; - d.hostStorage = o.enums === String ? "ON_PREMISE" : 0; - d.actualActors = o.enums === String ? "SELF" : 0; - if ($util.Long) { - var n = new $util.Long(0, 0, true); - d.privacyModeTs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.privacyModeTs = o.longs === String ? "0" : 0; - if ($util.Long) { - var n = new $util.Long(0, 0, true); - d.featureControls = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.featureControls = o.longs === String ? "0" : 0; - } if (m.vlevel != null && m.hasOwnProperty("vlevel")) { d.vlevel = o.enums === String ? $root.proto.BizIdentityInfo.VerifiedLevelValue[m.vlevel] === undefined ? m.vlevel : $root.proto.BizIdentityInfo.VerifiedLevelValue[m.vlevel] : m.vlevel; + if (o.oneofs) + d._vlevel = "vlevel"; } if (m.vnameCert != null && m.hasOwnProperty("vnameCert")) { d.vnameCert = $root.proto.VerifiedNameCertificate.toObject(m.vnameCert, o); + if (o.oneofs) + d._vnameCert = "vnameCert"; } if (m.signed != null && m.hasOwnProperty("signed")) { d.signed = m.signed; + if (o.oneofs) + d._signed = "signed"; } if (m.revoked != null && m.hasOwnProperty("revoked")) { d.revoked = m.revoked; + if (o.oneofs) + d._revoked = "revoked"; } if (m.hostStorage != null && m.hasOwnProperty("hostStorage")) { d.hostStorage = o.enums === String ? $root.proto.BizIdentityInfo.HostStorageType[m.hostStorage] === undefined ? m.hostStorage : $root.proto.BizIdentityInfo.HostStorageType[m.hostStorage] : m.hostStorage; + if (o.oneofs) + d._hostStorage = "hostStorage"; } if (m.actualActors != null && m.hasOwnProperty("actualActors")) { d.actualActors = o.enums === String ? $root.proto.BizIdentityInfo.ActualActorsType[m.actualActors] === undefined ? m.actualActors : $root.proto.BizIdentityInfo.ActualActorsType[m.actualActors] : m.actualActors; + if (o.oneofs) + d._actualActors = "actualActors"; } if (m.privacyModeTs != null && m.hasOwnProperty("privacyModeTs")) { if (typeof m.privacyModeTs === "number") d.privacyModeTs = o.longs === String ? String(m.privacyModeTs) : m.privacyModeTs; else d.privacyModeTs = o.longs === String ? longToString(m.privacyModeTs, true) : o.longs === Number ? longToNumber(m.privacyModeTs, true) : m.privacyModeTs; + if (o.oneofs) + d._privacyModeTs = "privacyModeTs"; } if (m.featureControls != null && m.hasOwnProperty("featureControls")) { if (typeof m.featureControls === "number") d.featureControls = o.longs === String ? String(m.featureControls) : m.featureControls; else d.featureControls = o.longs === String ? longToString(m.featureControls, true) : o.longs === Number ? longToNumber(m.featureControls, true) : m.featureControls; + if (o.oneofs) + d._featureControls = "featureControls"; } return d; }; @@ -5454,9 +6216,29 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - BotAgeCollectionMetadata.prototype.ageCollectionEligible = false; - BotAgeCollectionMetadata.prototype.shouldTriggerAgeCollectionOnClient = false; - BotAgeCollectionMetadata.prototype.ageCollectionType = 0; + BotAgeCollectionMetadata.prototype.ageCollectionEligible = null; + BotAgeCollectionMetadata.prototype.shouldTriggerAgeCollectionOnClient = null; + BotAgeCollectionMetadata.prototype.ageCollectionType = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotAgeCollectionMetadata.prototype, "_ageCollectionEligible", { + get: $util.oneOfGetter($oneOfFields = ["ageCollectionEligible"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotAgeCollectionMetadata.prototype, "_shouldTriggerAgeCollectionOnClient", { + get: $util.oneOfGetter($oneOfFields = ["shouldTriggerAgeCollectionOnClient"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotAgeCollectionMetadata.prototype, "_ageCollectionType", { + get: $util.oneOfGetter($oneOfFields = ["ageCollectionType"]), + set: $util.oneOfSetter($oneOfFields) + }); BotAgeCollectionMetadata.create = function create(properties) { return new BotAgeCollectionMetadata(properties); @@ -5536,19 +6318,20 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.ageCollectionEligible = false; - d.shouldTriggerAgeCollectionOnClient = false; - d.ageCollectionType = o.enums === String ? "O18_BINARY" : 0; - } if (m.ageCollectionEligible != null && m.hasOwnProperty("ageCollectionEligible")) { d.ageCollectionEligible = m.ageCollectionEligible; + if (o.oneofs) + d._ageCollectionEligible = "ageCollectionEligible"; } if (m.shouldTriggerAgeCollectionOnClient != null && m.hasOwnProperty("shouldTriggerAgeCollectionOnClient")) { d.shouldTriggerAgeCollectionOnClient = m.shouldTriggerAgeCollectionOnClient; + if (o.oneofs) + d._shouldTriggerAgeCollectionOnClient = "shouldTriggerAgeCollectionOnClient"; } if (m.ageCollectionType != null && m.hasOwnProperty("ageCollectionType")) { d.ageCollectionType = o.enums === String ? $root.proto.BotAgeCollectionMetadata.AgeCollectionType[m.ageCollectionType] === undefined ? m.ageCollectionType : $root.proto.BotAgeCollectionMetadata.AgeCollectionType[m.ageCollectionType] : m.ageCollectionType; + if (o.oneofs) + d._ageCollectionType = "ageCollectionType"; } return d; }; @@ -5583,11 +6366,43 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - BotAvatarMetadata.prototype.sentiment = 0; - BotAvatarMetadata.prototype.behaviorGraph = ""; - BotAvatarMetadata.prototype.action = 0; - BotAvatarMetadata.prototype.intensity = 0; - BotAvatarMetadata.prototype.wordCount = 0; + BotAvatarMetadata.prototype.sentiment = null; + BotAvatarMetadata.prototype.behaviorGraph = null; + BotAvatarMetadata.prototype.action = null; + BotAvatarMetadata.prototype.intensity = null; + BotAvatarMetadata.prototype.wordCount = null; + + let $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) + }); BotAvatarMetadata.create = function create(properties) { return new BotAvatarMetadata(properties); @@ -5672,27 +6487,30 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.sentiment = 0; - d.behaviorGraph = ""; - d.action = 0; - d.intensity = 0; - d.wordCount = 0; - } if (m.sentiment != null && m.hasOwnProperty("sentiment")) { d.sentiment = m.sentiment; + if (o.oneofs) + d._sentiment = "sentiment"; } if (m.behaviorGraph != null && m.hasOwnProperty("behaviorGraph")) { d.behaviorGraph = m.behaviorGraph; + if (o.oneofs) + d._behaviorGraph = "behaviorGraph"; } if (m.action != null && m.hasOwnProperty("action")) { d.action = m.action; + if (o.oneofs) + d._action = "action"; } if (m.intensity != null && m.hasOwnProperty("intensity")) { d.intensity = m.intensity; + if (o.oneofs) + d._intensity = "intensity"; } if (m.wordCount != null && m.hasOwnProperty("wordCount")) { d.wordCount = m.wordCount; + if (o.oneofs) + d._wordCount = "wordCount"; } return d; }; @@ -5731,8 +6549,10 @@ export const proto = $root.proto = (() => { if (!w) w = $Writer.create(); if (m.capabilities != null && m.capabilities.length) { + w.uint32(10).fork(); for (var i = 0; i < m.capabilities.length; ++i) - w.uint32(8).int32(m.capabilities[i]); + w.int32(m.capabilities[i]); + w.ldelim(); } return w; }; @@ -6120,7 +6940,15 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - BotDocumentMessageMetadata.prototype.pluginType = 0; + BotDocumentMessageMetadata.prototype.pluginType = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotDocumentMessageMetadata.prototype, "_pluginType", { + get: $util.oneOfGetter($oneOfFields = ["pluginType"]), + set: $util.oneOfSetter($oneOfFields) + }); BotDocumentMessageMetadata.create = function create(properties) { return new BotDocumentMessageMetadata(properties); @@ -6182,11 +7010,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.pluginType = o.enums === String ? "TEXT_EXTRACTION" : 0; - } if (m.pluginType != null && m.hasOwnProperty("pluginType")) { d.pluginType = o.enums === String ? $root.proto.BotDocumentMessageMetadata.DocumentPluginType[m.pluginType] === undefined ? m.pluginType : $root.proto.BotDocumentMessageMetadata.DocumentPluginType[m.pluginType] : m.pluginType; + if (o.oneofs) + d._pluginType = "pluginType"; } return d; }; @@ -6222,13 +7049,57 @@ export const proto = $root.proto = (() => { } BotFeedbackMessage.prototype.messageKey = null; - BotFeedbackMessage.prototype.kind = 0; - BotFeedbackMessage.prototype.text = ""; - BotFeedbackMessage.prototype.kindNegative = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - BotFeedbackMessage.prototype.kindPositive = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - BotFeedbackMessage.prototype.kindReport = 0; + BotFeedbackMessage.prototype.kind = null; + BotFeedbackMessage.prototype.text = null; + BotFeedbackMessage.prototype.kindNegative = null; + BotFeedbackMessage.prototype.kindPositive = null; + BotFeedbackMessage.prototype.kindReport = null; BotFeedbackMessage.prototype.sideBySideSurveyMetadata = null; + let $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) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotFeedbackMessage.prototype, "_sideBySideSurveyMetadata", { + get: $util.oneOfGetter($oneOfFields = ["sideBySideSurveyMetadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + BotFeedbackMessage.create = function create(properties) { return new BotFeedbackMessage(properties); }; @@ -6426,49 +7297,46 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.messageKey = null; - d.kind = o.enums === String ? "BOT_FEEDBACK_POSITIVE" : 0; - d.text = ""; - if ($util.Long) { - var n = new $util.Long(0, 0, true); - d.kindNegative = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.kindNegative = o.longs === String ? "0" : 0; - if ($util.Long) { - var n = new $util.Long(0, 0, true); - d.kindPositive = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.kindPositive = o.longs === String ? "0" : 0; - d.kindReport = o.enums === String ? "NONE" : 0; - d.sideBySideSurveyMetadata = null; - } if (m.messageKey != null && m.hasOwnProperty("messageKey")) { d.messageKey = $root.proto.MessageKey.toObject(m.messageKey, o); + if (o.oneofs) + d._messageKey = "messageKey"; } if (m.kind != null && m.hasOwnProperty("kind")) { d.kind = o.enums === String ? $root.proto.BotFeedbackMessage.BotFeedbackKind[m.kind] === undefined ? m.kind : $root.proto.BotFeedbackMessage.BotFeedbackKind[m.kind] : m.kind; + if (o.oneofs) + d._kind = "kind"; } if (m.text != null && m.hasOwnProperty("text")) { d.text = m.text; + if (o.oneofs) + d._text = "text"; } if (m.kindNegative != null && m.hasOwnProperty("kindNegative")) { if (typeof m.kindNegative === "number") d.kindNegative = o.longs === String ? String(m.kindNegative) : m.kindNegative; else d.kindNegative = o.longs === String ? longToString(m.kindNegative, true) : o.longs === Number ? longToNumber(m.kindNegative, true) : m.kindNegative; + if (o.oneofs) + d._kindNegative = "kindNegative"; } if (m.kindPositive != null && m.hasOwnProperty("kindPositive")) { if (typeof m.kindPositive === "number") d.kindPositive = o.longs === String ? String(m.kindPositive) : m.kindPositive; else d.kindPositive = o.longs === String ? longToString(m.kindPositive, true) : o.longs === Number ? longToNumber(m.kindPositive, true) : m.kindPositive; + if (o.oneofs) + d._kindPositive = "kindPositive"; } if (m.kindReport != null && m.hasOwnProperty("kindReport")) { d.kindReport = o.enums === String ? $root.proto.BotFeedbackMessage.ReportKind[m.kindReport] === undefined ? m.kindReport : $root.proto.BotFeedbackMessage.ReportKind[m.kindReport] : m.kindReport; + if (o.oneofs) + d._kindReport = "kindReport"; } if (m.sideBySideSurveyMetadata != null && m.hasOwnProperty("sideBySideSurveyMetadata")) { d.sideBySideSurveyMetadata = $root.proto.BotFeedbackMessage.SideBySideSurveyMetadata.toObject(m.sideBySideSurveyMetadata, o); + if (o.oneofs) + d._sideBySideSurveyMetadata = "sideBySideSurveyMetadata"; } return d; }; @@ -6540,16 +7408,72 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - SideBySideSurveyMetadata.prototype.selectedRequestId = ""; - SideBySideSurveyMetadata.prototype.surveyId = 0; - SideBySideSurveyMetadata.prototype.simonSessionFbid = ""; - SideBySideSurveyMetadata.prototype.responseOtid = ""; - SideBySideSurveyMetadata.prototype.responseTimestampMsString = ""; - SideBySideSurveyMetadata.prototype.isSelectedResponsePrimary = false; - SideBySideSurveyMetadata.prototype.messageIdToEdit = ""; + SideBySideSurveyMetadata.prototype.selectedRequestId = null; + SideBySideSurveyMetadata.prototype.surveyId = null; + SideBySideSurveyMetadata.prototype.simonSessionFbid = null; + SideBySideSurveyMetadata.prototype.responseOtid = null; + SideBySideSurveyMetadata.prototype.responseTimestampMsString = null; + SideBySideSurveyMetadata.prototype.isSelectedResponsePrimary = null; + SideBySideSurveyMetadata.prototype.messageIdToEdit = null; SideBySideSurveyMetadata.prototype.analyticsData = null; SideBySideSurveyMetadata.prototype.metaAiAnalyticsData = null; + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SideBySideSurveyMetadata.prototype, "_selectedRequestId", { + get: $util.oneOfGetter($oneOfFields = ["selectedRequestId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SideBySideSurveyMetadata.prototype, "_surveyId", { + get: $util.oneOfGetter($oneOfFields = ["surveyId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SideBySideSurveyMetadata.prototype, "_simonSessionFbid", { + get: $util.oneOfGetter($oneOfFields = ["simonSessionFbid"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SideBySideSurveyMetadata.prototype, "_responseOtid", { + get: $util.oneOfGetter($oneOfFields = ["responseOtid"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SideBySideSurveyMetadata.prototype, "_responseTimestampMsString", { + get: $util.oneOfGetter($oneOfFields = ["responseTimestampMsString"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SideBySideSurveyMetadata.prototype, "_isSelectedResponsePrimary", { + get: $util.oneOfGetter($oneOfFields = ["isSelectedResponsePrimary"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SideBySideSurveyMetadata.prototype, "_messageIdToEdit", { + get: $util.oneOfGetter($oneOfFields = ["messageIdToEdit"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SideBySideSurveyMetadata.prototype, "_analyticsData", { + get: $util.oneOfGetter($oneOfFields = ["analyticsData"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SideBySideSurveyMetadata.prototype, "_metaAiAnalyticsData", { + get: $util.oneOfGetter($oneOfFields = ["metaAiAnalyticsData"]), + set: $util.oneOfSetter($oneOfFields) + }); + SideBySideSurveyMetadata.create = function create(properties) { return new SideBySideSurveyMetadata(properties); }; @@ -6673,43 +7597,50 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.selectedRequestId = ""; - d.surveyId = 0; - d.simonSessionFbid = ""; - d.responseOtid = ""; - d.responseTimestampMsString = ""; - d.isSelectedResponsePrimary = false; - d.messageIdToEdit = ""; - d.analyticsData = null; - d.metaAiAnalyticsData = null; - } if (m.selectedRequestId != null && m.hasOwnProperty("selectedRequestId")) { d.selectedRequestId = m.selectedRequestId; + if (o.oneofs) + d._selectedRequestId = "selectedRequestId"; } if (m.surveyId != null && m.hasOwnProperty("surveyId")) { d.surveyId = m.surveyId; + if (o.oneofs) + d._surveyId = "surveyId"; } if (m.simonSessionFbid != null && m.hasOwnProperty("simonSessionFbid")) { d.simonSessionFbid = m.simonSessionFbid; + if (o.oneofs) + d._simonSessionFbid = "simonSessionFbid"; } if (m.responseOtid != null && m.hasOwnProperty("responseOtid")) { d.responseOtid = m.responseOtid; + if (o.oneofs) + d._responseOtid = "responseOtid"; } if (m.responseTimestampMsString != null && m.hasOwnProperty("responseTimestampMsString")) { d.responseTimestampMsString = m.responseTimestampMsString; + if (o.oneofs) + d._responseTimestampMsString = "responseTimestampMsString"; } if (m.isSelectedResponsePrimary != null && m.hasOwnProperty("isSelectedResponsePrimary")) { d.isSelectedResponsePrimary = m.isSelectedResponsePrimary; + if (o.oneofs) + d._isSelectedResponsePrimary = "isSelectedResponsePrimary"; } if (m.messageIdToEdit != null && m.hasOwnProperty("messageIdToEdit")) { d.messageIdToEdit = m.messageIdToEdit; + if (o.oneofs) + d._messageIdToEdit = "messageIdToEdit"; } if (m.analyticsData != null && m.hasOwnProperty("analyticsData")) { d.analyticsData = $root.proto.BotFeedbackMessage.SideBySideSurveyMetadata.SideBySideSurveyAnalyticsData.toObject(m.analyticsData, o); + if (o.oneofs) + d._analyticsData = "analyticsData"; } if (m.metaAiAnalyticsData != null && m.hasOwnProperty("metaAiAnalyticsData")) { d.metaAiAnalyticsData = $root.proto.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.toObject(m.metaAiAnalyticsData, o); + if (o.oneofs) + d._metaAiAnalyticsData = "metaAiAnalyticsData"; } return d; }; @@ -6734,9 +7665,29 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - SideBySideSurveyAnalyticsData.prototype.tessaEvent = ""; - SideBySideSurveyAnalyticsData.prototype.tessaSessionFbid = ""; - SideBySideSurveyAnalyticsData.prototype.simonSessionFbid = ""; + SideBySideSurveyAnalyticsData.prototype.tessaEvent = null; + SideBySideSurveyAnalyticsData.prototype.tessaSessionFbid = null; + SideBySideSurveyAnalyticsData.prototype.simonSessionFbid = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SideBySideSurveyAnalyticsData.prototype, "_tessaEvent", { + get: $util.oneOfGetter($oneOfFields = ["tessaEvent"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SideBySideSurveyAnalyticsData.prototype, "_tessaSessionFbid", { + get: $util.oneOfGetter($oneOfFields = ["tessaSessionFbid"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SideBySideSurveyAnalyticsData.prototype, "_simonSessionFbid", { + get: $util.oneOfGetter($oneOfFields = ["simonSessionFbid"]), + set: $util.oneOfSetter($oneOfFields) + }); SideBySideSurveyAnalyticsData.create = function create(properties) { return new SideBySideSurveyAnalyticsData(properties); @@ -6803,19 +7754,20 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.tessaEvent = ""; - d.tessaSessionFbid = ""; - d.simonSessionFbid = ""; - } if (m.tessaEvent != null && m.hasOwnProperty("tessaEvent")) { d.tessaEvent = m.tessaEvent; + if (o.oneofs) + d._tessaEvent = "tessaEvent"; } if (m.tessaSessionFbid != null && m.hasOwnProperty("tessaSessionFbid")) { d.tessaSessionFbid = m.tessaSessionFbid; + if (o.oneofs) + d._tessaSessionFbid = "tessaSessionFbid"; } if (m.simonSessionFbid != null && m.hasOwnProperty("simonSessionFbid")) { d.simonSessionFbid = m.simonSessionFbid; + if (o.oneofs) + d._simonSessionFbid = "simonSessionFbid"; } return d; }; @@ -6843,16 +7795,72 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - SidebySideSurveyMetaAiAnalyticsData.prototype.surveyId = 0; - SidebySideSurveyMetaAiAnalyticsData.prototype.primaryResponseId = ""; - SidebySideSurveyMetaAiAnalyticsData.prototype.testArmName = ""; - SidebySideSurveyMetaAiAnalyticsData.prototype.timestampMsString = ""; + SidebySideSurveyMetaAiAnalyticsData.prototype.surveyId = null; + SidebySideSurveyMetaAiAnalyticsData.prototype.primaryResponseId = null; + SidebySideSurveyMetaAiAnalyticsData.prototype.testArmName = null; + SidebySideSurveyMetaAiAnalyticsData.prototype.timestampMsString = null; SidebySideSurveyMetaAiAnalyticsData.prototype.ctaImpressionEvent = null; SidebySideSurveyMetaAiAnalyticsData.prototype.ctaClickEvent = null; SidebySideSurveyMetaAiAnalyticsData.prototype.cardImpressionEvent = null; SidebySideSurveyMetaAiAnalyticsData.prototype.responseEvent = null; SidebySideSurveyMetaAiAnalyticsData.prototype.abandonEvent = null; + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SidebySideSurveyMetaAiAnalyticsData.prototype, "_surveyId", { + get: $util.oneOfGetter($oneOfFields = ["surveyId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SidebySideSurveyMetaAiAnalyticsData.prototype, "_primaryResponseId", { + get: $util.oneOfGetter($oneOfFields = ["primaryResponseId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SidebySideSurveyMetaAiAnalyticsData.prototype, "_testArmName", { + get: $util.oneOfGetter($oneOfFields = ["testArmName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SidebySideSurveyMetaAiAnalyticsData.prototype, "_timestampMsString", { + get: $util.oneOfGetter($oneOfFields = ["timestampMsString"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SidebySideSurveyMetaAiAnalyticsData.prototype, "_ctaImpressionEvent", { + get: $util.oneOfGetter($oneOfFields = ["ctaImpressionEvent"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SidebySideSurveyMetaAiAnalyticsData.prototype, "_ctaClickEvent", { + get: $util.oneOfGetter($oneOfFields = ["ctaClickEvent"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SidebySideSurveyMetaAiAnalyticsData.prototype, "_cardImpressionEvent", { + get: $util.oneOfGetter($oneOfFields = ["cardImpressionEvent"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SidebySideSurveyMetaAiAnalyticsData.prototype, "_responseEvent", { + get: $util.oneOfGetter($oneOfFields = ["responseEvent"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SidebySideSurveyMetaAiAnalyticsData.prototype, "_abandonEvent", { + get: $util.oneOfGetter($oneOfFields = ["abandonEvent"]), + set: $util.oneOfSetter($oneOfFields) + }); + SidebySideSurveyMetaAiAnalyticsData.create = function create(properties) { return new SidebySideSurveyMetaAiAnalyticsData(properties); }; @@ -6982,43 +7990,50 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.surveyId = 0; - d.primaryResponseId = ""; - d.testArmName = ""; - d.timestampMsString = ""; - d.ctaImpressionEvent = null; - d.ctaClickEvent = null; - d.cardImpressionEvent = null; - d.responseEvent = null; - d.abandonEvent = null; - } if (m.surveyId != null && m.hasOwnProperty("surveyId")) { d.surveyId = m.surveyId; + if (o.oneofs) + d._surveyId = "surveyId"; } if (m.primaryResponseId != null && m.hasOwnProperty("primaryResponseId")) { d.primaryResponseId = m.primaryResponseId; + if (o.oneofs) + d._primaryResponseId = "primaryResponseId"; } if (m.testArmName != null && m.hasOwnProperty("testArmName")) { d.testArmName = m.testArmName; + if (o.oneofs) + d._testArmName = "testArmName"; } if (m.timestampMsString != null && m.hasOwnProperty("timestampMsString")) { d.timestampMsString = m.timestampMsString; + if (o.oneofs) + d._timestampMsString = "timestampMsString"; } if (m.ctaImpressionEvent != null && m.hasOwnProperty("ctaImpressionEvent")) { d.ctaImpressionEvent = $root.proto.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCTAImpressionEventData.toObject(m.ctaImpressionEvent, o); + if (o.oneofs) + d._ctaImpressionEvent = "ctaImpressionEvent"; } if (m.ctaClickEvent != null && m.hasOwnProperty("ctaClickEvent")) { d.ctaClickEvent = $root.proto.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCTAClickEventData.toObject(m.ctaClickEvent, o); + if (o.oneofs) + d._ctaClickEvent = "ctaClickEvent"; } if (m.cardImpressionEvent != null && m.hasOwnProperty("cardImpressionEvent")) { d.cardImpressionEvent = $root.proto.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyCardImpressionEventData.toObject(m.cardImpressionEvent, o); + if (o.oneofs) + d._cardImpressionEvent = "cardImpressionEvent"; } if (m.responseEvent != null && m.hasOwnProperty("responseEvent")) { d.responseEvent = $root.proto.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyResponseEventData.toObject(m.responseEvent, o); + if (o.oneofs) + d._responseEvent = "responseEvent"; } if (m.abandonEvent != null && m.hasOwnProperty("abandonEvent")) { d.abandonEvent = $root.proto.BotFeedbackMessage.SideBySideSurveyMetadata.SidebySideSurveyMetaAiAnalyticsData.SideBySideSurveyAbandonEventData.toObject(m.abandonEvent, o); + if (o.oneofs) + d._abandonEvent = "abandonEvent"; } return d; }; @@ -7043,7 +8058,15 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - SideBySideSurveyAbandonEventData.prototype.abandonDwellTimeMsString = ""; + SideBySideSurveyAbandonEventData.prototype.abandonDwellTimeMsString = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SideBySideSurveyAbandonEventData.prototype, "_abandonDwellTimeMsString", { + get: $util.oneOfGetter($oneOfFields = ["abandonDwellTimeMsString"]), + set: $util.oneOfSetter($oneOfFields) + }); SideBySideSurveyAbandonEventData.create = function create(properties) { return new SideBySideSurveyAbandonEventData(properties); @@ -7092,11 +8115,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.abandonDwellTimeMsString = ""; - } if (m.abandonDwellTimeMsString != null && m.hasOwnProperty("abandonDwellTimeMsString")) { d.abandonDwellTimeMsString = m.abandonDwellTimeMsString; + if (o.oneofs) + d._abandonDwellTimeMsString = "abandonDwellTimeMsString"; } return d; }; @@ -7124,8 +8146,22 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - SideBySideSurveyCTAClickEventData.prototype.isSurveyExpired = false; - SideBySideSurveyCTAClickEventData.prototype.clickDwellTimeMsString = ""; + SideBySideSurveyCTAClickEventData.prototype.isSurveyExpired = null; + SideBySideSurveyCTAClickEventData.prototype.clickDwellTimeMsString = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SideBySideSurveyCTAClickEventData.prototype, "_isSurveyExpired", { + get: $util.oneOfGetter($oneOfFields = ["isSurveyExpired"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SideBySideSurveyCTAClickEventData.prototype, "_clickDwellTimeMsString", { + get: $util.oneOfGetter($oneOfFields = ["clickDwellTimeMsString"]), + set: $util.oneOfSetter($oneOfFields) + }); SideBySideSurveyCTAClickEventData.create = function create(properties) { return new SideBySideSurveyCTAClickEventData(properties); @@ -7183,15 +8219,15 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.isSurveyExpired = false; - d.clickDwellTimeMsString = ""; - } if (m.isSurveyExpired != null && m.hasOwnProperty("isSurveyExpired")) { d.isSurveyExpired = m.isSurveyExpired; + if (o.oneofs) + d._isSurveyExpired = "isSurveyExpired"; } if (m.clickDwellTimeMsString != null && m.hasOwnProperty("clickDwellTimeMsString")) { d.clickDwellTimeMsString = m.clickDwellTimeMsString; + if (o.oneofs) + d._clickDwellTimeMsString = "clickDwellTimeMsString"; } return d; }; @@ -7219,7 +8255,15 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - SideBySideSurveyCTAImpressionEventData.prototype.isSurveyExpired = false; + SideBySideSurveyCTAImpressionEventData.prototype.isSurveyExpired = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SideBySideSurveyCTAImpressionEventData.prototype, "_isSurveyExpired", { + get: $util.oneOfGetter($oneOfFields = ["isSurveyExpired"]), + set: $util.oneOfSetter($oneOfFields) + }); SideBySideSurveyCTAImpressionEventData.create = function create(properties) { return new SideBySideSurveyCTAImpressionEventData(properties); @@ -7268,11 +8312,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.isSurveyExpired = false; - } if (m.isSurveyExpired != null && m.hasOwnProperty("isSurveyExpired")) { d.isSurveyExpired = m.isSurveyExpired; + if (o.oneofs) + d._isSurveyExpired = "isSurveyExpired"; } return d; }; @@ -7360,8 +8403,22 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - SideBySideSurveyResponseEventData.prototype.responseDwellTimeMsString = ""; - SideBySideSurveyResponseEventData.prototype.selectedResponseId = ""; + SideBySideSurveyResponseEventData.prototype.responseDwellTimeMsString = null; + SideBySideSurveyResponseEventData.prototype.selectedResponseId = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SideBySideSurveyResponseEventData.prototype, "_responseDwellTimeMsString", { + get: $util.oneOfGetter($oneOfFields = ["responseDwellTimeMsString"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SideBySideSurveyResponseEventData.prototype, "_selectedResponseId", { + get: $util.oneOfGetter($oneOfFields = ["selectedResponseId"]), + set: $util.oneOfSetter($oneOfFields) + }); SideBySideSurveyResponseEventData.create = function create(properties) { return new SideBySideSurveyResponseEventData(properties); @@ -7419,15 +8476,15 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.responseDwellTimeMsString = ""; - d.selectedResponseId = ""; - } if (m.responseDwellTimeMsString != null && m.hasOwnProperty("responseDwellTimeMsString")) { d.responseDwellTimeMsString = m.responseDwellTimeMsString; + if (o.oneofs) + d._responseDwellTimeMsString = "responseDwellTimeMsString"; } if (m.selectedResponseId != null && m.hasOwnProperty("selectedResponseId")) { d.selectedResponseId = m.selectedResponseId; + if (o.oneofs) + d._selectedResponseId = "selectedResponseId"; } return d; }; @@ -7560,7 +8617,15 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - BotGroupParticipantMetadata.prototype.botFbid = ""; + BotGroupParticipantMetadata.prototype.botFbid = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotGroupParticipantMetadata.prototype, "_botFbid", { + get: $util.oneOfGetter($oneOfFields = ["botFbid"]), + set: $util.oneOfSetter($oneOfFields) + }); BotGroupParticipantMetadata.create = function create(properties) { return new BotGroupParticipantMetadata(properties); @@ -7609,11 +8674,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.botFbid = ""; - } if (m.botFbid != null && m.hasOwnProperty("botFbid")) { d.botFbid = m.botFbid; + if (o.oneofs) + d._botFbid = "botFbid"; } return d; }; @@ -7641,8 +8705,22 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - BotImagineMetadata.prototype.imagineType = 0; - BotImagineMetadata.prototype.shortPrompt = ""; + BotImagineMetadata.prototype.imagineType = null; + BotImagineMetadata.prototype.shortPrompt = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotImagineMetadata.prototype, "_imagineType", { + get: $util.oneOfGetter($oneOfFields = ["imagineType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotImagineMetadata.prototype, "_shortPrompt", { + get: $util.oneOfGetter($oneOfFields = ["shortPrompt"]), + set: $util.oneOfSetter($oneOfFields) + }); BotImagineMetadata.create = function create(properties) { return new BotImagineMetadata(properties); @@ -7725,15 +8803,15 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.imagineType = o.enums === String ? "UNKNOWN" : 0; - d.shortPrompt = ""; - } if (m.imagineType != null && m.hasOwnProperty("imagineType")) { d.imagineType = o.enums === String ? $root.proto.BotImagineMetadata.ImagineType[m.imagineType] === undefined ? m.imagineType : $root.proto.BotImagineMetadata.ImagineType[m.imagineType] : m.imagineType; + if (o.oneofs) + d._imagineType = "imagineType"; } if (m.shortPrompt != null && m.hasOwnProperty("shortPrompt")) { d.shortPrompt = m.shortPrompt; + if (o.oneofs) + d._shortPrompt = "shortPrompt"; } return d; }; @@ -7772,9 +8850,23 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - BotInfrastructureDiagnostics.prototype.botBackend = 0; + BotInfrastructureDiagnostics.prototype.botBackend = null; BotInfrastructureDiagnostics.prototype.toolsUsed = $util.emptyArray; - BotInfrastructureDiagnostics.prototype.isThinking = false; + BotInfrastructureDiagnostics.prototype.isThinking = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotInfrastructureDiagnostics.prototype, "_botBackend", { + get: $util.oneOfGetter($oneOfFields = ["botBackend"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotInfrastructureDiagnostics.prototype, "_isThinking", { + get: $util.oneOfGetter($oneOfFields = ["isThinking"]), + set: $util.oneOfSetter($oneOfFields) + }); BotInfrastructureDiagnostics.create = function create(properties) { return new BotInfrastructureDiagnostics(properties); @@ -7866,12 +8958,10 @@ export const proto = $root.proto = (() => { if (o.arrays || o.defaults) { d.toolsUsed = []; } - if (o.defaults) { - d.botBackend = o.enums === String ? "AAPI" : 0; - d.isThinking = false; - } if (m.botBackend != null && m.hasOwnProperty("botBackend")) { d.botBackend = o.enums === String ? $root.proto.BotInfrastructureDiagnostics.BotBackend[m.botBackend] === undefined ? m.botBackend : $root.proto.BotInfrastructureDiagnostics.BotBackend[m.botBackend] : m.botBackend; + if (o.oneofs) + d._botBackend = "botBackend"; } if (m.toolsUsed && m.toolsUsed.length) { d.toolsUsed = []; @@ -7881,6 +8971,8 @@ export const proto = $root.proto = (() => { } if (m.isThinking != null && m.hasOwnProperty("isThinking")) { d.isThinking = m.isThinking; + if (o.oneofs) + d._isThinking = "isThinking"; } return d; }; @@ -7915,7 +9007,15 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - BotLinkedAccount.prototype.type = 0; + BotLinkedAccount.prototype.type = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotLinkedAccount.prototype, "_type", { + get: $util.oneOfGetter($oneOfFields = ["type"]), + set: $util.oneOfSetter($oneOfFields) + }); BotLinkedAccount.create = function create(properties) { return new BotLinkedAccount(properties); @@ -7973,11 +9073,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.type = o.enums === String ? "BOT_LINKED_ACCOUNT_TYPE_1P" : 0; - } if (m.type != null && m.hasOwnProperty("type")) { d.type = o.enums === String ? $root.proto.BotLinkedAccount.BotLinkedAccountType[m.type] === undefined ? m.type : $root.proto.BotLinkedAccount.BotLinkedAccountType[m.type] : m.type; + if (o.oneofs) + d._type = "type"; } return d; }; @@ -8013,8 +9112,22 @@ export const proto = $root.proto = (() => { } BotLinkedAccountsMetadata.prototype.accounts = $util.emptyArray; - BotLinkedAccountsMetadata.prototype.acAuthTokens = $util.newBuffer([]); - BotLinkedAccountsMetadata.prototype.acErrorCode = 0; + BotLinkedAccountsMetadata.prototype.acAuthTokens = null; + BotLinkedAccountsMetadata.prototype.acErrorCode = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotLinkedAccountsMetadata.prototype, "_acAuthTokens", { + get: $util.oneOfGetter($oneOfFields = ["acAuthTokens"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotLinkedAccountsMetadata.prototype, "_acErrorCode", { + get: $util.oneOfGetter($oneOfFields = ["acErrorCode"]), + set: $util.oneOfSetter($oneOfFields) + }); BotLinkedAccountsMetadata.create = function create(properties) { return new BotLinkedAccountsMetadata(properties); @@ -8098,16 +9211,6 @@ export const proto = $root.proto = (() => { if (o.arrays || o.defaults) { d.accounts = []; } - if (o.defaults) { - if (o.bytes === String) - d.acAuthTokens = ""; - else { - d.acAuthTokens = []; - if (o.bytes !== Array) - d.acAuthTokens = $util.newBuffer(d.acAuthTokens); - } - d.acErrorCode = 0; - } if (m.accounts && m.accounts.length) { d.accounts = []; for (var j = 0; j < m.accounts.length; ++j) { @@ -8116,9 +9219,13 @@ export const proto = $root.proto = (() => { } if (m.acAuthTokens != null && m.hasOwnProperty("acAuthTokens")) { d.acAuthTokens = o.bytes === String ? $util.base64.encode(m.acAuthTokens, 0, m.acAuthTokens.length) : o.bytes === Array ? Array.prototype.slice.call(m.acAuthTokens) : m.acAuthTokens; + if (o.oneofs) + d._acAuthTokens = "acAuthTokens"; } if (m.acErrorCode != null && m.hasOwnProperty("acErrorCode")) { d.acErrorCode = m.acErrorCode; + if (o.oneofs) + d._acErrorCode = "acErrorCode"; } return d; }; @@ -8146,13 +9253,57 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - BotMediaMetadata.prototype.fileSha256 = ""; - BotMediaMetadata.prototype.mediaKey = ""; - BotMediaMetadata.prototype.fileEncSha256 = ""; - BotMediaMetadata.prototype.directPath = ""; - BotMediaMetadata.prototype.mediaKeyTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - BotMediaMetadata.prototype.mimetype = ""; - BotMediaMetadata.prototype.orientationType = 1; + BotMediaMetadata.prototype.fileSha256 = null; + BotMediaMetadata.prototype.mediaKey = null; + BotMediaMetadata.prototype.fileEncSha256 = null; + BotMediaMetadata.prototype.directPath = null; + BotMediaMetadata.prototype.mediaKeyTimestamp = null; + BotMediaMetadata.prototype.mimetype = null; + BotMediaMetadata.prototype.orientationType = null; + + let $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) + }); BotMediaMetadata.create = function create(properties) { return new BotMediaMetadata(properties); @@ -8279,42 +9430,43 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.fileSha256 = ""; - d.mediaKey = ""; - d.fileEncSha256 = ""; - d.directPath = ""; - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.mediaKeyTimestamp = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.mediaKeyTimestamp = o.longs === String ? "0" : 0; - d.mimetype = ""; - d.orientationType = o.enums === String ? "CENTER" : 1; - } if (m.fileSha256 != null && m.hasOwnProperty("fileSha256")) { d.fileSha256 = m.fileSha256; + if (o.oneofs) + d._fileSha256 = "fileSha256"; } if (m.mediaKey != null && m.hasOwnProperty("mediaKey")) { d.mediaKey = m.mediaKey; + if (o.oneofs) + d._mediaKey = "mediaKey"; } if (m.fileEncSha256 != null && m.hasOwnProperty("fileEncSha256")) { d.fileEncSha256 = m.fileEncSha256; + if (o.oneofs) + d._fileEncSha256 = "fileEncSha256"; } if (m.directPath != null && m.hasOwnProperty("directPath")) { d.directPath = m.directPath; + if (o.oneofs) + d._directPath = "directPath"; } if (m.mediaKeyTimestamp != null && m.hasOwnProperty("mediaKeyTimestamp")) { if (typeof m.mediaKeyTimestamp === "number") d.mediaKeyTimestamp = o.longs === String ? String(m.mediaKeyTimestamp) : m.mediaKeyTimestamp; else d.mediaKeyTimestamp = o.longs === String ? longToString(m.mediaKeyTimestamp) : o.longs === Number ? longToNumber(m.mediaKeyTimestamp) : m.mediaKeyTimestamp; + if (o.oneofs) + d._mediaKeyTimestamp = "mediaKeyTimestamp"; } if (m.mimetype != null && m.hasOwnProperty("mimetype")) { d.mimetype = m.mimetype; + if (o.oneofs) + d._mimetype = "mimetype"; } if (m.orientationType != null && m.hasOwnProperty("orientationType")) { d.orientationType = o.enums === String ? $root.proto.BotMediaMetadata.OrientationType[m.orientationType] === undefined ? m.orientationType : $root.proto.BotMediaMetadata.OrientationType[m.orientationType] : m.orientationType; + if (o.oneofs) + d._orientationType = "orientationType"; } return d; }; @@ -8350,8 +9502,22 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - BotMemoryFact.prototype.fact = ""; - BotMemoryFact.prototype.factId = ""; + BotMemoryFact.prototype.fact = null; + BotMemoryFact.prototype.factId = null; + + let $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) + }); BotMemoryFact.create = function create(properties) { return new BotMemoryFact(properties); @@ -8409,15 +9575,15 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.fact = ""; - d.factId = ""; - } if (m.fact != null && m.hasOwnProperty("fact")) { d.fact = m.fact; + if (o.oneofs) + d._fact = "fact"; } if (m.factId != null && m.hasOwnProperty("factId")) { d.factId = m.factId; + if (o.oneofs) + d._factId = "factId"; } return d; }; @@ -8449,7 +9615,15 @@ export const proto = $root.proto = (() => { BotMemoryMetadata.prototype.addedFacts = $util.emptyArray; BotMemoryMetadata.prototype.removedFacts = $util.emptyArray; - BotMemoryMetadata.prototype.disclaimer = ""; + BotMemoryMetadata.prototype.disclaimer = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotMemoryMetadata.prototype, "_disclaimer", { + get: $util.oneOfGetter($oneOfFields = ["disclaimer"]), + set: $util.oneOfSetter($oneOfFields) + }); BotMemoryMetadata.create = function create(properties) { return new BotMemoryMetadata(properties); @@ -8542,9 +9716,6 @@ export const proto = $root.proto = (() => { d.addedFacts = []; d.removedFacts = []; } - if (o.defaults) { - d.disclaimer = ""; - } if (m.addedFacts && m.addedFacts.length) { d.addedFacts = []; for (var j = 0; j < m.addedFacts.length; ++j) { @@ -8559,6 +9730,8 @@ export const proto = $root.proto = (() => { } if (m.disclaimer != null && m.hasOwnProperty("disclaimer")) { d.disclaimer = m.disclaimer; + if (o.oneofs) + d._disclaimer = "disclaimer"; } return d; }; @@ -8682,7 +9855,15 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - BotMessageOrigin.prototype.type = 0; + BotMessageOrigin.prototype.type = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotMessageOrigin.prototype, "_type", { + get: $util.oneOfGetter($oneOfFields = ["type"]), + set: $util.oneOfSetter($oneOfFields) + }); BotMessageOrigin.create = function create(properties) { return new BotMessageOrigin(properties); @@ -8740,11 +9921,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.type = o.enums === String ? "BOT_MESSAGE_ORIGIN_TYPE_AI_INITIATED" : 0; - } if (m.type != null && m.hasOwnProperty("type")) { d.type = o.enums === String ? $root.proto.BotMessageOrigin.BotMessageOriginType[m.type] === undefined ? m.type : $root.proto.BotMessageOrigin.BotMessageOriginType[m.type] : m.type; + if (o.oneofs) + d._type = "type"; } return d; }; @@ -8874,8 +10054,22 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - BotMessageSharingInfo.prototype.botEntryPointOrigin = 0; - BotMessageSharingInfo.prototype.forwardScore = 0; + BotMessageSharingInfo.prototype.botEntryPointOrigin = null; + BotMessageSharingInfo.prototype.forwardScore = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotMessageSharingInfo.prototype, "_botEntryPointOrigin", { + get: $util.oneOfGetter($oneOfFields = ["botEntryPointOrigin"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotMessageSharingInfo.prototype, "_forwardScore", { + get: $util.oneOfGetter($oneOfFields = ["forwardScore"]), + set: $util.oneOfSetter($oneOfFields) + }); BotMessageSharingInfo.create = function create(properties) { return new BotMessageSharingInfo(properties); @@ -9118,15 +10312,15 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.botEntryPointOrigin = o.enums === String ? "UNDEFINED_ENTRY_POINT" : 0; - d.forwardScore = 0; - } if (m.botEntryPointOrigin != null && m.hasOwnProperty("botEntryPointOrigin")) { d.botEntryPointOrigin = o.enums === String ? $root.proto.BotMetricsEntryPoint[m.botEntryPointOrigin] === undefined ? m.botEntryPointOrigin : $root.proto.BotMetricsEntryPoint[m.botEntryPointOrigin] : m.botEntryPointOrigin; + if (o.oneofs) + d._botEntryPointOrigin = "botEntryPointOrigin"; } if (m.forwardScore != null && m.hasOwnProperty("forwardScore")) { d.forwardScore = m.forwardScore; + if (o.oneofs) + d._forwardScore = "forwardScore"; } return d; }; @@ -9155,16 +10349,16 @@ export const proto = $root.proto = (() => { } BotMetadata.prototype.avatarMetadata = null; - BotMetadata.prototype.personaId = ""; + BotMetadata.prototype.personaId = null; BotMetadata.prototype.pluginMetadata = null; BotMetadata.prototype.suggestedPromptMetadata = null; - BotMetadata.prototype.invokerJid = ""; + BotMetadata.prototype.invokerJid = null; BotMetadata.prototype.sessionMetadata = null; BotMetadata.prototype.memuMetadata = null; - BotMetadata.prototype.timezone = ""; + BotMetadata.prototype.timezone = null; BotMetadata.prototype.reminderMetadata = null; BotMetadata.prototype.modelMetadata = null; - BotMetadata.prototype.messageDisclaimerText = ""; + BotMetadata.prototype.messageDisclaimerText = null; BotMetadata.prototype.progressIndicatorMetadata = null; BotMetadata.prototype.capabilityMetadata = null; BotMetadata.prototype.imagineMetadata = null; @@ -9173,13 +10367,13 @@ export const proto = $root.proto = (() => { BotMetadata.prototype.botMetricsMetadata = null; BotMetadata.prototype.botLinkedAccountsMetadata = null; BotMetadata.prototype.richResponseSourcesMetadata = null; - BotMetadata.prototype.aiConversationContext = $util.newBuffer([]); + BotMetadata.prototype.aiConversationContext = null; BotMetadata.prototype.botPromotionMessageMetadata = null; BotMetadata.prototype.botModeSelectionMetadata = null; BotMetadata.prototype.botQuotaMetadata = null; BotMetadata.prototype.botAgeCollectionMetadata = null; - BotMetadata.prototype.conversationStarterPromptId = ""; - BotMetadata.prototype.botResponseId = ""; + BotMetadata.prototype.conversationStarterPromptId = null; + BotMetadata.prototype.botResponseId = null; BotMetadata.prototype.verificationMetadata = null; BotMetadata.prototype.unifiedResponseMutation = null; BotMetadata.prototype.botMessageOriginMetadata = null; @@ -9192,7 +10386,243 @@ export const proto = $root.proto = (() => { BotMetadata.prototype.botRenderingConfigMetadata = null; BotMetadata.prototype.botInfrastructureDiagnostics = null; BotMetadata.prototype.aiMediaCollectionMetadata = null; - BotMetadata.prototype.internalMetadata = $util.newBuffer([]); + BotMetadata.prototype.internalMetadata = null; + + let $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) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotMetadata.prototype, "_richResponseSourcesMetadata", { + get: $util.oneOfGetter($oneOfFields = ["richResponseSourcesMetadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotMetadata.prototype, "_aiConversationContext", { + get: $util.oneOfGetter($oneOfFields = ["aiConversationContext"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotMetadata.prototype, "_botPromotionMessageMetadata", { + get: $util.oneOfGetter($oneOfFields = ["botPromotionMessageMetadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotMetadata.prototype, "_botModeSelectionMetadata", { + get: $util.oneOfGetter($oneOfFields = ["botModeSelectionMetadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotMetadata.prototype, "_botQuotaMetadata", { + get: $util.oneOfGetter($oneOfFields = ["botQuotaMetadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotMetadata.prototype, "_botAgeCollectionMetadata", { + get: $util.oneOfGetter($oneOfFields = ["botAgeCollectionMetadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotMetadata.prototype, "_conversationStarterPromptId", { + get: $util.oneOfGetter($oneOfFields = ["conversationStarterPromptId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotMetadata.prototype, "_botResponseId", { + get: $util.oneOfGetter($oneOfFields = ["botResponseId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotMetadata.prototype, "_verificationMetadata", { + get: $util.oneOfGetter($oneOfFields = ["verificationMetadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotMetadata.prototype, "_unifiedResponseMutation", { + get: $util.oneOfGetter($oneOfFields = ["unifiedResponseMutation"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotMetadata.prototype, "_botMessageOriginMetadata", { + get: $util.oneOfGetter($oneOfFields = ["botMessageOriginMetadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotMetadata.prototype, "_inThreadSurveyMetadata", { + get: $util.oneOfGetter($oneOfFields = ["inThreadSurveyMetadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotMetadata.prototype, "_botThreadInfo", { + get: $util.oneOfGetter($oneOfFields = ["botThreadInfo"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotMetadata.prototype, "_regenerateMetadata", { + get: $util.oneOfGetter($oneOfFields = ["regenerateMetadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotMetadata.prototype, "_sessionTransparencyMetadata", { + get: $util.oneOfGetter($oneOfFields = ["sessionTransparencyMetadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotMetadata.prototype, "_botDocumentMessageMetadata", { + get: $util.oneOfGetter($oneOfFields = ["botDocumentMessageMetadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotMetadata.prototype, "_botGroupMetadata", { + get: $util.oneOfGetter($oneOfFields = ["botGroupMetadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotMetadata.prototype, "_botRenderingConfigMetadata", { + get: $util.oneOfGetter($oneOfFields = ["botRenderingConfigMetadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotMetadata.prototype, "_botInfrastructureDiagnostics", { + get: $util.oneOfGetter($oneOfFields = ["botInfrastructureDiagnostics"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotMetadata.prototype, "_aiMediaCollectionMetadata", { + get: $util.oneOfGetter($oneOfFields = ["aiMediaCollectionMetadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotMetadata.prototype, "_internalMetadata", { + get: $util.oneOfGetter($oneOfFields = ["internalMetadata"]), + set: $util.oneOfSetter($oneOfFields) + }); BotMetadata.create = function create(properties) { return new BotMetadata(properties); @@ -9651,175 +11081,200 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.avatarMetadata = null; - d.personaId = ""; - d.pluginMetadata = null; - d.suggestedPromptMetadata = null; - d.invokerJid = ""; - d.sessionMetadata = null; - d.memuMetadata = null; - d.timezone = ""; - d.reminderMetadata = null; - d.modelMetadata = null; - d.messageDisclaimerText = ""; - d.progressIndicatorMetadata = null; - d.capabilityMetadata = null; - d.imagineMetadata = null; - d.memoryMetadata = null; - d.renderingMetadata = null; - d.botMetricsMetadata = null; - d.botLinkedAccountsMetadata = null; - d.richResponseSourcesMetadata = null; - if (o.bytes === String) - d.aiConversationContext = ""; - else { - d.aiConversationContext = []; - if (o.bytes !== Array) - d.aiConversationContext = $util.newBuffer(d.aiConversationContext); - } - d.botPromotionMessageMetadata = null; - d.botModeSelectionMetadata = null; - d.botQuotaMetadata = null; - d.botAgeCollectionMetadata = null; - d.conversationStarterPromptId = ""; - d.botResponseId = ""; - d.verificationMetadata = null; - d.unifiedResponseMutation = null; - d.botMessageOriginMetadata = null; - d.inThreadSurveyMetadata = null; - d.botThreadInfo = null; - d.regenerateMetadata = null; - d.sessionTransparencyMetadata = null; - d.botDocumentMessageMetadata = null; - d.botGroupMetadata = null; - d.botRenderingConfigMetadata = null; - d.botInfrastructureDiagnostics = null; - d.aiMediaCollectionMetadata = null; - if (o.bytes === String) - d.internalMetadata = ""; - else { - d.internalMetadata = []; - if (o.bytes !== Array) - d.internalMetadata = $util.newBuffer(d.internalMetadata); - } - } if (m.avatarMetadata != null && m.hasOwnProperty("avatarMetadata")) { d.avatarMetadata = $root.proto.BotAvatarMetadata.toObject(m.avatarMetadata, o); + if (o.oneofs) + d._avatarMetadata = "avatarMetadata"; } if (m.personaId != null && m.hasOwnProperty("personaId")) { d.personaId = m.personaId; + if (o.oneofs) + d._personaId = "personaId"; } if (m.pluginMetadata != null && m.hasOwnProperty("pluginMetadata")) { d.pluginMetadata = $root.proto.BotPluginMetadata.toObject(m.pluginMetadata, o); + if (o.oneofs) + d._pluginMetadata = "pluginMetadata"; } if (m.suggestedPromptMetadata != null && m.hasOwnProperty("suggestedPromptMetadata")) { d.suggestedPromptMetadata = $root.proto.BotSuggestedPromptMetadata.toObject(m.suggestedPromptMetadata, o); + if (o.oneofs) + d._suggestedPromptMetadata = "suggestedPromptMetadata"; } if (m.invokerJid != null && m.hasOwnProperty("invokerJid")) { d.invokerJid = m.invokerJid; + if (o.oneofs) + d._invokerJid = "invokerJid"; } if (m.sessionMetadata != null && m.hasOwnProperty("sessionMetadata")) { d.sessionMetadata = $root.proto.BotSessionMetadata.toObject(m.sessionMetadata, o); + if (o.oneofs) + d._sessionMetadata = "sessionMetadata"; } if (m.memuMetadata != null && m.hasOwnProperty("memuMetadata")) { d.memuMetadata = $root.proto.BotMemuMetadata.toObject(m.memuMetadata, o); + if (o.oneofs) + d._memuMetadata = "memuMetadata"; } if (m.timezone != null && m.hasOwnProperty("timezone")) { d.timezone = m.timezone; + if (o.oneofs) + d._timezone = "timezone"; } if (m.reminderMetadata != null && m.hasOwnProperty("reminderMetadata")) { d.reminderMetadata = $root.proto.BotReminderMetadata.toObject(m.reminderMetadata, o); + if (o.oneofs) + d._reminderMetadata = "reminderMetadata"; } if (m.modelMetadata != null && m.hasOwnProperty("modelMetadata")) { d.modelMetadata = $root.proto.BotModelMetadata.toObject(m.modelMetadata, o); + if (o.oneofs) + d._modelMetadata = "modelMetadata"; } if (m.messageDisclaimerText != null && m.hasOwnProperty("messageDisclaimerText")) { d.messageDisclaimerText = m.messageDisclaimerText; + if (o.oneofs) + d._messageDisclaimerText = "messageDisclaimerText"; } if (m.progressIndicatorMetadata != null && m.hasOwnProperty("progressIndicatorMetadata")) { d.progressIndicatorMetadata = $root.proto.BotProgressIndicatorMetadata.toObject(m.progressIndicatorMetadata, o); + if (o.oneofs) + d._progressIndicatorMetadata = "progressIndicatorMetadata"; } if (m.capabilityMetadata != null && m.hasOwnProperty("capabilityMetadata")) { d.capabilityMetadata = $root.proto.BotCapabilityMetadata.toObject(m.capabilityMetadata, o); + if (o.oneofs) + d._capabilityMetadata = "capabilityMetadata"; } if (m.imagineMetadata != null && m.hasOwnProperty("imagineMetadata")) { d.imagineMetadata = $root.proto.BotImagineMetadata.toObject(m.imagineMetadata, o); + if (o.oneofs) + d._imagineMetadata = "imagineMetadata"; } if (m.memoryMetadata != null && m.hasOwnProperty("memoryMetadata")) { d.memoryMetadata = $root.proto.BotMemoryMetadata.toObject(m.memoryMetadata, o); + if (o.oneofs) + d._memoryMetadata = "memoryMetadata"; } if (m.renderingMetadata != null && m.hasOwnProperty("renderingMetadata")) { d.renderingMetadata = $root.proto.BotRenderingMetadata.toObject(m.renderingMetadata, o); + if (o.oneofs) + d._renderingMetadata = "renderingMetadata"; } if (m.botMetricsMetadata != null && m.hasOwnProperty("botMetricsMetadata")) { d.botMetricsMetadata = $root.proto.BotMetricsMetadata.toObject(m.botMetricsMetadata, o); + if (o.oneofs) + d._botMetricsMetadata = "botMetricsMetadata"; } if (m.botLinkedAccountsMetadata != null && m.hasOwnProperty("botLinkedAccountsMetadata")) { d.botLinkedAccountsMetadata = $root.proto.BotLinkedAccountsMetadata.toObject(m.botLinkedAccountsMetadata, o); + if (o.oneofs) + d._botLinkedAccountsMetadata = "botLinkedAccountsMetadata"; } if (m.richResponseSourcesMetadata != null && m.hasOwnProperty("richResponseSourcesMetadata")) { d.richResponseSourcesMetadata = $root.proto.BotSourcesMetadata.toObject(m.richResponseSourcesMetadata, o); + if (o.oneofs) + d._richResponseSourcesMetadata = "richResponseSourcesMetadata"; } if (m.aiConversationContext != null && m.hasOwnProperty("aiConversationContext")) { d.aiConversationContext = o.bytes === String ? $util.base64.encode(m.aiConversationContext, 0, m.aiConversationContext.length) : o.bytes === Array ? Array.prototype.slice.call(m.aiConversationContext) : m.aiConversationContext; + if (o.oneofs) + d._aiConversationContext = "aiConversationContext"; } if (m.botPromotionMessageMetadata != null && m.hasOwnProperty("botPromotionMessageMetadata")) { d.botPromotionMessageMetadata = $root.proto.BotPromotionMessageMetadata.toObject(m.botPromotionMessageMetadata, o); + if (o.oneofs) + d._botPromotionMessageMetadata = "botPromotionMessageMetadata"; } if (m.botModeSelectionMetadata != null && m.hasOwnProperty("botModeSelectionMetadata")) { d.botModeSelectionMetadata = $root.proto.BotModeSelectionMetadata.toObject(m.botModeSelectionMetadata, o); + if (o.oneofs) + d._botModeSelectionMetadata = "botModeSelectionMetadata"; } if (m.botQuotaMetadata != null && m.hasOwnProperty("botQuotaMetadata")) { d.botQuotaMetadata = $root.proto.BotQuotaMetadata.toObject(m.botQuotaMetadata, o); + if (o.oneofs) + d._botQuotaMetadata = "botQuotaMetadata"; } if (m.botAgeCollectionMetadata != null && m.hasOwnProperty("botAgeCollectionMetadata")) { d.botAgeCollectionMetadata = $root.proto.BotAgeCollectionMetadata.toObject(m.botAgeCollectionMetadata, o); + if (o.oneofs) + d._botAgeCollectionMetadata = "botAgeCollectionMetadata"; } if (m.conversationStarterPromptId != null && m.hasOwnProperty("conversationStarterPromptId")) { d.conversationStarterPromptId = m.conversationStarterPromptId; + if (o.oneofs) + d._conversationStarterPromptId = "conversationStarterPromptId"; } if (m.botResponseId != null && m.hasOwnProperty("botResponseId")) { d.botResponseId = m.botResponseId; + if (o.oneofs) + d._botResponseId = "botResponseId"; } if (m.verificationMetadata != null && m.hasOwnProperty("verificationMetadata")) { d.verificationMetadata = $root.proto.BotSignatureVerificationMetadata.toObject(m.verificationMetadata, o); + if (o.oneofs) + d._verificationMetadata = "verificationMetadata"; } if (m.unifiedResponseMutation != null && m.hasOwnProperty("unifiedResponseMutation")) { d.unifiedResponseMutation = $root.proto.BotUnifiedResponseMutation.toObject(m.unifiedResponseMutation, o); + if (o.oneofs) + d._unifiedResponseMutation = "unifiedResponseMutation"; } if (m.botMessageOriginMetadata != null && m.hasOwnProperty("botMessageOriginMetadata")) { d.botMessageOriginMetadata = $root.proto.BotMessageOriginMetadata.toObject(m.botMessageOriginMetadata, o); + if (o.oneofs) + d._botMessageOriginMetadata = "botMessageOriginMetadata"; } if (m.inThreadSurveyMetadata != null && m.hasOwnProperty("inThreadSurveyMetadata")) { d.inThreadSurveyMetadata = $root.proto.InThreadSurveyMetadata.toObject(m.inThreadSurveyMetadata, o); + if (o.oneofs) + d._inThreadSurveyMetadata = "inThreadSurveyMetadata"; } if (m.botThreadInfo != null && m.hasOwnProperty("botThreadInfo")) { d.botThreadInfo = $root.proto.AIThreadInfo.toObject(m.botThreadInfo, o); + if (o.oneofs) + d._botThreadInfo = "botThreadInfo"; } if (m.regenerateMetadata != null && m.hasOwnProperty("regenerateMetadata")) { d.regenerateMetadata = $root.proto.AIRegenerateMetadata.toObject(m.regenerateMetadata, o); + if (o.oneofs) + d._regenerateMetadata = "regenerateMetadata"; } if (m.sessionTransparencyMetadata != null && m.hasOwnProperty("sessionTransparencyMetadata")) { d.sessionTransparencyMetadata = $root.proto.SessionTransparencyMetadata.toObject(m.sessionTransparencyMetadata, o); + if (o.oneofs) + d._sessionTransparencyMetadata = "sessionTransparencyMetadata"; } if (m.botDocumentMessageMetadata != null && m.hasOwnProperty("botDocumentMessageMetadata")) { d.botDocumentMessageMetadata = $root.proto.BotDocumentMessageMetadata.toObject(m.botDocumentMessageMetadata, o); + if (o.oneofs) + d._botDocumentMessageMetadata = "botDocumentMessageMetadata"; } if (m.botGroupMetadata != null && m.hasOwnProperty("botGroupMetadata")) { d.botGroupMetadata = $root.proto.BotGroupMetadata.toObject(m.botGroupMetadata, o); + if (o.oneofs) + d._botGroupMetadata = "botGroupMetadata"; } if (m.botRenderingConfigMetadata != null && m.hasOwnProperty("botRenderingConfigMetadata")) { d.botRenderingConfigMetadata = $root.proto.BotRenderingConfigMetadata.toObject(m.botRenderingConfigMetadata, o); + if (o.oneofs) + d._botRenderingConfigMetadata = "botRenderingConfigMetadata"; } if (m.botInfrastructureDiagnostics != null && m.hasOwnProperty("botInfrastructureDiagnostics")) { d.botInfrastructureDiagnostics = $root.proto.BotInfrastructureDiagnostics.toObject(m.botInfrastructureDiagnostics, o); + if (o.oneofs) + d._botInfrastructureDiagnostics = "botInfrastructureDiagnostics"; } if (m.aiMediaCollectionMetadata != null && m.hasOwnProperty("aiMediaCollectionMetadata")) { d.aiMediaCollectionMetadata = $root.proto.AIMediaCollectionMetadata.toObject(m.aiMediaCollectionMetadata, o); + if (o.oneofs) + d._aiMediaCollectionMetadata = "aiMediaCollectionMetadata"; } if (m.internalMetadata != null && m.hasOwnProperty("internalMetadata")) { d.internalMetadata = o.bytes === String ? $util.base64.encode(m.internalMetadata, 0, m.internalMetadata.length) : o.bytes === Array ? Array.prototype.slice.call(m.internalMetadata) : m.internalMetadata; + if (o.oneofs) + d._internalMetadata = "internalMetadata"; } return d; }; @@ -9897,9 +11352,29 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - BotMetricsMetadata.prototype.destinationId = ""; - BotMetricsMetadata.prototype.destinationEntryPoint = 0; - BotMetricsMetadata.prototype.threadOrigin = 1; + BotMetricsMetadata.prototype.destinationId = null; + BotMetricsMetadata.prototype.destinationEntryPoint = null; + BotMetricsMetadata.prototype.threadOrigin = null; + + let $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) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotMetricsMetadata.prototype, "_threadOrigin", { + get: $util.oneOfGetter($oneOfFields = ["threadOrigin"]), + set: $util.oneOfSetter($oneOfFields) + }); BotMetricsMetadata.create = function create(properties) { return new BotMetricsMetadata(properties); @@ -10176,19 +11651,20 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.destinationId = ""; - d.destinationEntryPoint = o.enums === String ? "UNDEFINED_ENTRY_POINT" : 0; - d.threadOrigin = o.enums === String ? "AI_TAB_THREAD" : 1; - } if (m.destinationId != null && m.hasOwnProperty("destinationId")) { d.destinationId = m.destinationId; + if (o.oneofs) + d._destinationId = "destinationId"; } if (m.destinationEntryPoint != null && m.hasOwnProperty("destinationEntryPoint")) { d.destinationEntryPoint = o.enums === String ? $root.proto.BotMetricsEntryPoint[m.destinationEntryPoint] === undefined ? m.destinationEntryPoint : $root.proto.BotMetricsEntryPoint[m.destinationEntryPoint] : m.destinationEntryPoint; + if (o.oneofs) + d._destinationEntryPoint = "destinationEntryPoint"; } if (m.threadOrigin != null && m.hasOwnProperty("threadOrigin")) { d.threadOrigin = o.enums === String ? $root.proto.BotMetricsThreadEntryPoint[m.threadOrigin] === undefined ? m.threadOrigin : $root.proto.BotMetricsThreadEntryPoint[m.threadOrigin] : m.threadOrigin; + if (o.oneofs) + d._threadOrigin = "threadOrigin"; } return d; }; @@ -10239,12 +11715,16 @@ export const proto = $root.proto = (() => { if (!w) w = $Writer.create(); if (m.mode != null && m.mode.length) { + w.uint32(10).fork(); for (var i = 0; i < m.mode.length; ++i) - w.uint32(8).int32(m.mode[i]); + w.int32(m.mode[i]); + w.ldelim(); } if (m.overrideMode != null && m.overrideMode.length) { + w.uint32(18).fork(); for (var i = 0; i < m.overrideMode.length; ++i) - w.uint32(16).uint32(m.overrideMode[i]); + w.uint32(m.overrideMode[i]); + w.ldelim(); } return w; }; @@ -10378,9 +11858,29 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - BotModelMetadata.prototype.modelType = 0; - BotModelMetadata.prototype.premiumModelStatus = 0; - BotModelMetadata.prototype.modelNameOverride = ""; + BotModelMetadata.prototype.modelType = null; + BotModelMetadata.prototype.premiumModelStatus = null; + BotModelMetadata.prototype.modelNameOverride = null; + + let $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) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotModelMetadata.prototype, "_modelNameOverride", { + get: $util.oneOfGetter($oneOfFields = ["modelNameOverride"]), + set: $util.oneOfSetter($oneOfFields) + }); BotModelMetadata.create = function create(properties) { return new BotModelMetadata(properties); @@ -10481,19 +11981,20 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.modelType = o.enums === String ? "UNKNOWN_TYPE" : 0; - d.premiumModelStatus = o.enums === String ? "UNKNOWN_STATUS" : 0; - d.modelNameOverride = ""; - } if (m.modelType != null && m.hasOwnProperty("modelType")) { d.modelType = o.enums === String ? $root.proto.BotModelMetadata.ModelType[m.modelType] === undefined ? m.modelType : $root.proto.BotModelMetadata.ModelType[m.modelType] : m.modelType; + if (o.oneofs) + d._modelType = "modelType"; } if (m.premiumModelStatus != null && m.hasOwnProperty("premiumModelStatus")) { d.premiumModelStatus = o.enums === String ? $root.proto.BotModelMetadata.PremiumModelStatus[m.premiumModelStatus] === undefined ? m.premiumModelStatus : $root.proto.BotModelMetadata.PremiumModelStatus[m.premiumModelStatus] : m.premiumModelStatus; + if (o.oneofs) + d._premiumModelStatus = "premiumModelStatus"; } if (m.modelNameOverride != null && m.hasOwnProperty("modelNameOverride")) { d.modelNameOverride = m.modelNameOverride; + if (o.oneofs) + d._modelNameOverride = "modelNameOverride"; } return d; }; @@ -10537,18 +12038,92 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - BotPluginMetadata.prototype.provider = 0; - BotPluginMetadata.prototype.pluginType = 0; - BotPluginMetadata.prototype.thumbnailCdnUrl = ""; - BotPluginMetadata.prototype.profilePhotoCdnUrl = ""; - BotPluginMetadata.prototype.searchProviderUrl = ""; - BotPluginMetadata.prototype.referenceIndex = 0; - BotPluginMetadata.prototype.expectedLinksCount = 0; - BotPluginMetadata.prototype.searchQuery = ""; + BotPluginMetadata.prototype.provider = null; + BotPluginMetadata.prototype.pluginType = null; + BotPluginMetadata.prototype.thumbnailCdnUrl = null; + BotPluginMetadata.prototype.profilePhotoCdnUrl = null; + BotPluginMetadata.prototype.searchProviderUrl = null; + BotPluginMetadata.prototype.referenceIndex = null; + BotPluginMetadata.prototype.expectedLinksCount = null; + BotPluginMetadata.prototype.searchQuery = null; BotPluginMetadata.prototype.parentPluginMessageKey = null; - BotPluginMetadata.prototype.deprecatedField = 0; - BotPluginMetadata.prototype.parentPluginType = 0; - BotPluginMetadata.prototype.faviconCdnUrl = ""; + BotPluginMetadata.prototype.deprecatedField = null; + BotPluginMetadata.prototype.parentPluginType = null; + BotPluginMetadata.prototype.faviconCdnUrl = null; + + let $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) + }); BotPluginMetadata.create = function create(properties) { return new BotPluginMetadata(properties); @@ -10770,55 +12345,65 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.provider = o.enums === String ? "UNKNOWN" : 0; - d.pluginType = o.enums === String ? "UNKNOWN_PLUGIN" : 0; - d.thumbnailCdnUrl = ""; - d.profilePhotoCdnUrl = ""; - d.searchProviderUrl = ""; - d.referenceIndex = 0; - d.expectedLinksCount = 0; - d.searchQuery = ""; - d.parentPluginMessageKey = null; - d.deprecatedField = o.enums === String ? "UNKNOWN_PLUGIN" : 0; - d.parentPluginType = o.enums === String ? "UNKNOWN_PLUGIN" : 0; - d.faviconCdnUrl = ""; - } if (m.provider != null && m.hasOwnProperty("provider")) { d.provider = o.enums === String ? $root.proto.BotPluginMetadata.SearchProvider[m.provider] === undefined ? m.provider : $root.proto.BotPluginMetadata.SearchProvider[m.provider] : m.provider; + if (o.oneofs) + d._provider = "provider"; } if (m.pluginType != null && m.hasOwnProperty("pluginType")) { d.pluginType = o.enums === String ? $root.proto.BotPluginMetadata.PluginType[m.pluginType] === undefined ? m.pluginType : $root.proto.BotPluginMetadata.PluginType[m.pluginType] : m.pluginType; + if (o.oneofs) + d._pluginType = "pluginType"; } if (m.thumbnailCdnUrl != null && m.hasOwnProperty("thumbnailCdnUrl")) { d.thumbnailCdnUrl = m.thumbnailCdnUrl; + if (o.oneofs) + d._thumbnailCdnUrl = "thumbnailCdnUrl"; } if (m.profilePhotoCdnUrl != null && m.hasOwnProperty("profilePhotoCdnUrl")) { d.profilePhotoCdnUrl = m.profilePhotoCdnUrl; + if (o.oneofs) + d._profilePhotoCdnUrl = "profilePhotoCdnUrl"; } if (m.searchProviderUrl != null && m.hasOwnProperty("searchProviderUrl")) { d.searchProviderUrl = m.searchProviderUrl; + if (o.oneofs) + d._searchProviderUrl = "searchProviderUrl"; } if (m.referenceIndex != null && m.hasOwnProperty("referenceIndex")) { d.referenceIndex = m.referenceIndex; + if (o.oneofs) + d._referenceIndex = "referenceIndex"; } if (m.expectedLinksCount != null && m.hasOwnProperty("expectedLinksCount")) { d.expectedLinksCount = m.expectedLinksCount; + if (o.oneofs) + d._expectedLinksCount = "expectedLinksCount"; } if (m.searchQuery != null && m.hasOwnProperty("searchQuery")) { d.searchQuery = m.searchQuery; + if (o.oneofs) + d._searchQuery = "searchQuery"; } if (m.parentPluginMessageKey != null && m.hasOwnProperty("parentPluginMessageKey")) { d.parentPluginMessageKey = $root.proto.MessageKey.toObject(m.parentPluginMessageKey, o); + if (o.oneofs) + d._parentPluginMessageKey = "parentPluginMessageKey"; } if (m.deprecatedField != null && m.hasOwnProperty("deprecatedField")) { d.deprecatedField = o.enums === String ? $root.proto.BotPluginMetadata.PluginType[m.deprecatedField] === undefined ? m.deprecatedField : $root.proto.BotPluginMetadata.PluginType[m.deprecatedField] : m.deprecatedField; + if (o.oneofs) + d._deprecatedField = "deprecatedField"; } if (m.parentPluginType != null && m.hasOwnProperty("parentPluginType")) { d.parentPluginType = o.enums === String ? $root.proto.BotPluginMetadata.PluginType[m.parentPluginType] === undefined ? m.parentPluginType : $root.proto.BotPluginMetadata.PluginType[m.parentPluginType] : m.parentPluginType; + if (o.oneofs) + d._parentPluginType = "parentPluginType"; } if (m.faviconCdnUrl != null && m.hasOwnProperty("faviconCdnUrl")) { d.faviconCdnUrl = m.faviconCdnUrl; + if (o.oneofs) + d._faviconCdnUrl = "faviconCdnUrl"; } return d; }; @@ -10864,9 +12449,23 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - BotProgressIndicatorMetadata.prototype.progressDescription = ""; + BotProgressIndicatorMetadata.prototype.progressDescription = null; BotProgressIndicatorMetadata.prototype.stepsMetadata = $util.emptyArray; - BotProgressIndicatorMetadata.prototype.estimatedCompletionTime = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + BotProgressIndicatorMetadata.prototype.estimatedCompletionTime = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotProgressIndicatorMetadata.prototype, "_progressDescription", { + get: $util.oneOfGetter($oneOfFields = ["progressDescription"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotProgressIndicatorMetadata.prototype, "_estimatedCompletionTime", { + get: $util.oneOfGetter($oneOfFields = ["estimatedCompletionTime"]), + set: $util.oneOfSetter($oneOfFields) + }); BotProgressIndicatorMetadata.create = function create(properties) { return new BotProgressIndicatorMetadata(properties); @@ -10954,16 +12553,10 @@ export const proto = $root.proto = (() => { if (o.arrays || o.defaults) { d.stepsMetadata = []; } - if (o.defaults) { - d.progressDescription = ""; - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.estimatedCompletionTime = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.estimatedCompletionTime = o.longs === String ? "0" : 0; - } if (m.progressDescription != null && m.hasOwnProperty("progressDescription")) { d.progressDescription = m.progressDescription; + if (o.oneofs) + d._progressDescription = "progressDescription"; } if (m.stepsMetadata && m.stepsMetadata.length) { d.stepsMetadata = []; @@ -10976,6 +12569,8 @@ export const proto = $root.proto = (() => { d.estimatedCompletionTime = o.longs === String ? String(m.estimatedCompletionTime) : m.estimatedCompletionTime; else d.estimatedCompletionTime = o.longs === String ? longToString(m.estimatedCompletionTime) : o.longs === Number ? longToNumber(m.estimatedCompletionTime) : m.estimatedCompletionTime; + if (o.oneofs) + d._estimatedCompletionTime = "estimatedCompletionTime"; } return d; }; @@ -11002,14 +12597,46 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - BotPlanningStepMetadata.prototype.statusTitle = ""; - BotPlanningStepMetadata.prototype.statusBody = ""; + BotPlanningStepMetadata.prototype.statusTitle = null; + BotPlanningStepMetadata.prototype.statusBody = null; BotPlanningStepMetadata.prototype.sourcesMetadata = $util.emptyArray; - BotPlanningStepMetadata.prototype.status = 0; - BotPlanningStepMetadata.prototype.isReasoning = false; - BotPlanningStepMetadata.prototype.isEnhancedSearch = false; + BotPlanningStepMetadata.prototype.status = null; + BotPlanningStepMetadata.prototype.isReasoning = null; + BotPlanningStepMetadata.prototype.isEnhancedSearch = null; BotPlanningStepMetadata.prototype.sections = $util.emptyArray; + let $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) + }); + BotPlanningStepMetadata.create = function create(properties) { return new BotPlanningStepMetadata(properties); }; @@ -11158,18 +12785,15 @@ export const proto = $root.proto = (() => { d.sourcesMetadata = []; d.sections = []; } - if (o.defaults) { - d.statusTitle = ""; - d.statusBody = ""; - d.status = o.enums === String ? "UNKNOWN" : 0; - d.isReasoning = false; - d.isEnhancedSearch = false; - } if (m.statusTitle != null && m.hasOwnProperty("statusTitle")) { d.statusTitle = m.statusTitle; + if (o.oneofs) + d._statusTitle = "statusTitle"; } if (m.statusBody != null && m.hasOwnProperty("statusBody")) { d.statusBody = m.statusBody; + if (o.oneofs) + d._statusBody = "statusBody"; } if (m.sourcesMetadata && m.sourcesMetadata.length) { d.sourcesMetadata = []; @@ -11179,12 +12803,18 @@ export const proto = $root.proto = (() => { } if (m.status != null && m.hasOwnProperty("status")) { d.status = o.enums === String ? $root.proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.PlanningStepStatus[m.status] === undefined ? m.status : $root.proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.PlanningStepStatus[m.status] : m.status; + if (o.oneofs) + d._status = "status"; } if (m.isReasoning != null && m.hasOwnProperty("isReasoning")) { d.isReasoning = m.isReasoning; + if (o.oneofs) + d._isReasoning = "isReasoning"; } if (m.isEnhancedSearch != null && m.hasOwnProperty("isEnhancedSearch")) { d.isEnhancedSearch = m.isEnhancedSearch; + if (o.oneofs) + d._isEnhancedSearch = "isEnhancedSearch"; } if (m.sections && m.sections.length) { d.sections = []; @@ -11215,10 +12845,36 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - BotPlanningSearchSourceMetadata.prototype.title = ""; - BotPlanningSearchSourceMetadata.prototype.provider = 0; - BotPlanningSearchSourceMetadata.prototype.sourceUrl = ""; - BotPlanningSearchSourceMetadata.prototype.favIconUrl = ""; + BotPlanningSearchSourceMetadata.prototype.title = null; + BotPlanningSearchSourceMetadata.prototype.provider = null; + BotPlanningSearchSourceMetadata.prototype.sourceUrl = null; + BotPlanningSearchSourceMetadata.prototype.favIconUrl = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotPlanningSearchSourceMetadata.prototype, "_title", { + get: $util.oneOfGetter($oneOfFields = ["title"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotPlanningSearchSourceMetadata.prototype, "_provider", { + get: $util.oneOfGetter($oneOfFields = ["provider"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotPlanningSearchSourceMetadata.prototype, "_sourceUrl", { + get: $util.oneOfGetter($oneOfFields = ["sourceUrl"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotPlanningSearchSourceMetadata.prototype, "_favIconUrl", { + get: $util.oneOfGetter($oneOfFields = ["favIconUrl"]), + set: $util.oneOfSetter($oneOfFields) + }); BotPlanningSearchSourceMetadata.create = function create(properties) { return new BotPlanningSearchSourceMetadata(properties); @@ -11315,23 +12971,25 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.title = ""; - d.provider = o.enums === String ? "UNKNOWN_PROVIDER" : 0; - d.sourceUrl = ""; - d.favIconUrl = ""; - } if (m.title != null && m.hasOwnProperty("title")) { d.title = m.title; + if (o.oneofs) + d._title = "title"; } if (m.provider != null && m.hasOwnProperty("provider")) { d.provider = o.enums === String ? $root.proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotSearchSourceProvider[m.provider] === undefined ? m.provider : $root.proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotSearchSourceProvider[m.provider] : m.provider; + if (o.oneofs) + d._provider = "provider"; } if (m.sourceUrl != null && m.hasOwnProperty("sourceUrl")) { d.sourceUrl = m.sourceUrl; + if (o.oneofs) + d._sourceUrl = "sourceUrl"; } if (m.favIconUrl != null && m.hasOwnProperty("favIconUrl")) { d.favIconUrl = m.favIconUrl; + if (o.oneofs) + d._favIconUrl = "favIconUrl"; } return d; }; @@ -11359,9 +13017,29 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - BotPlanningSearchSourcesMetadata.prototype.sourceTitle = ""; - BotPlanningSearchSourcesMetadata.prototype.provider = 0; - BotPlanningSearchSourcesMetadata.prototype.sourceUrl = ""; + BotPlanningSearchSourcesMetadata.prototype.sourceTitle = null; + BotPlanningSearchSourcesMetadata.prototype.provider = null; + BotPlanningSearchSourcesMetadata.prototype.sourceUrl = null; + + let $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) + }); BotPlanningSearchSourcesMetadata.create = function create(properties) { return new BotPlanningSearchSourcesMetadata(properties); @@ -11449,19 +13127,20 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.sourceTitle = ""; - d.provider = o.enums === String ? "UNKNOWN" : 0; - d.sourceUrl = ""; - } if (m.sourceTitle != null && m.hasOwnProperty("sourceTitle")) { d.sourceTitle = m.sourceTitle; + if (o.oneofs) + d._sourceTitle = "sourceTitle"; } if (m.provider != null && m.hasOwnProperty("provider")) { d.provider = o.enums === String ? $root.proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata.BotPlanningSearchSourceProvider[m.provider] === undefined ? m.provider : $root.proto.BotProgressIndicatorMetadata.BotPlanningStepMetadata.BotPlanningSearchSourcesMetadata.BotPlanningSearchSourceProvider[m.provider] : m.provider; + if (o.oneofs) + d._provider = "provider"; } if (m.sourceUrl != null && m.hasOwnProperty("sourceUrl")) { d.sourceUrl = m.sourceUrl; + if (o.oneofs) + d._sourceUrl = "sourceUrl"; } return d; }; @@ -11499,10 +13178,24 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - BotPlanningStepSectionMetadata.prototype.sectionTitle = ""; - BotPlanningStepSectionMetadata.prototype.sectionBody = ""; + BotPlanningStepSectionMetadata.prototype.sectionTitle = null; + BotPlanningStepSectionMetadata.prototype.sectionBody = null; BotPlanningStepSectionMetadata.prototype.sourcesMetadata = $util.emptyArray; + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotPlanningStepSectionMetadata.prototype, "_sectionTitle", { + get: $util.oneOfGetter($oneOfFields = ["sectionTitle"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotPlanningStepSectionMetadata.prototype, "_sectionBody", { + get: $util.oneOfGetter($oneOfFields = ["sectionBody"]), + set: $util.oneOfSetter($oneOfFields) + }); + BotPlanningStepSectionMetadata.create = function create(properties) { return new BotPlanningStepSectionMetadata(properties); }; @@ -11582,15 +13275,15 @@ export const proto = $root.proto = (() => { if (o.arrays || o.defaults) { d.sourcesMetadata = []; } - if (o.defaults) { - d.sectionTitle = ""; - d.sectionBody = ""; - } if (m.sectionTitle != null && m.hasOwnProperty("sectionTitle")) { d.sectionTitle = m.sectionTitle; + if (o.oneofs) + d._sectionTitle = "sectionTitle"; } if (m.sectionBody != null && m.hasOwnProperty("sectionBody")) { d.sectionBody = m.sectionBody; + if (o.oneofs) + d._sectionBody = "sectionBody"; } if (m.sourcesMetadata && m.sourcesMetadata.length) { d.sourcesMetadata = []; @@ -11648,8 +13341,22 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - BotPromotionMessageMetadata.prototype.promotionType = 0; - BotPromotionMessageMetadata.prototype.buttonTitle = ""; + BotPromotionMessageMetadata.prototype.promotionType = null; + BotPromotionMessageMetadata.prototype.buttonTitle = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotPromotionMessageMetadata.prototype, "_promotionType", { + get: $util.oneOfGetter($oneOfFields = ["promotionType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotPromotionMessageMetadata.prototype, "_buttonTitle", { + get: $util.oneOfGetter($oneOfFields = ["buttonTitle"]), + set: $util.oneOfSetter($oneOfFields) + }); BotPromotionMessageMetadata.create = function create(properties) { return new BotPromotionMessageMetadata(properties); @@ -11724,15 +13431,15 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.promotionType = o.enums === String ? "UNKNOWN_TYPE" : 0; - d.buttonTitle = ""; - } if (m.promotionType != null && m.hasOwnProperty("promotionType")) { d.promotionType = o.enums === String ? $root.proto.BotPromotionMessageMetadata.BotPromotionType[m.promotionType] === undefined ? m.promotionType : $root.proto.BotPromotionMessageMetadata.BotPromotionType[m.promotionType] : m.promotionType; + if (o.oneofs) + d._promotionType = "promotionType"; } if (m.buttonTitle != null && m.hasOwnProperty("buttonTitle")) { d.buttonTitle = m.buttonTitle; + if (o.oneofs) + d._buttonTitle = "buttonTitle"; } return d; }; @@ -11768,8 +13475,22 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - BotPromptSuggestion.prototype.prompt = ""; - BotPromptSuggestion.prototype.promptId = ""; + BotPromptSuggestion.prototype.prompt = null; + BotPromptSuggestion.prototype.promptId = null; + + let $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) + }); BotPromptSuggestion.create = function create(properties) { return new BotPromptSuggestion(properties); @@ -11827,15 +13548,15 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.prompt = ""; - d.promptId = ""; - } if (m.prompt != null && m.hasOwnProperty("prompt")) { d.prompt = m.prompt; + if (o.oneofs) + d._prompt = "prompt"; } if (m.promptId != null && m.hasOwnProperty("promptId")) { d.promptId = m.promptId; + if (o.oneofs) + d._promptId = "promptId"; } return d; }; @@ -12052,9 +13773,29 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - BotFeatureQuotaMetadata.prototype.featureType = 0; - BotFeatureQuotaMetadata.prototype.remainingQuota = 0; - BotFeatureQuotaMetadata.prototype.expirationTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + BotFeatureQuotaMetadata.prototype.featureType = null; + BotFeatureQuotaMetadata.prototype.remainingQuota = null; + BotFeatureQuotaMetadata.prototype.expirationTimestamp = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotFeatureQuotaMetadata.prototype, "_featureType", { + get: $util.oneOfGetter($oneOfFields = ["featureType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotFeatureQuotaMetadata.prototype, "_remainingQuota", { + get: $util.oneOfGetter($oneOfFields = ["remainingQuota"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotFeatureQuotaMetadata.prototype, "_expirationTimestamp", { + get: $util.oneOfGetter($oneOfFields = ["expirationTimestamp"]), + set: $util.oneOfSetter($oneOfFields) + }); BotFeatureQuotaMetadata.create = function create(properties) { return new BotFeatureQuotaMetadata(properties); @@ -12141,26 +13882,23 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.featureType = o.enums === String ? "UNKNOWN_FEATURE" : 0; - d.remainingQuota = 0; - if ($util.Long) { - var n = new $util.Long(0, 0, true); - d.expirationTimestamp = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.expirationTimestamp = o.longs === String ? "0" : 0; - } if (m.featureType != null && m.hasOwnProperty("featureType")) { d.featureType = o.enums === String ? $root.proto.BotQuotaMetadata.BotFeatureQuotaMetadata.BotFeatureType[m.featureType] === undefined ? m.featureType : $root.proto.BotQuotaMetadata.BotFeatureQuotaMetadata.BotFeatureType[m.featureType] : m.featureType; + if (o.oneofs) + d._featureType = "featureType"; } if (m.remainingQuota != null && m.hasOwnProperty("remainingQuota")) { d.remainingQuota = m.remainingQuota; + if (o.oneofs) + d._remainingQuota = "remainingQuota"; } if (m.expirationTimestamp != null && m.hasOwnProperty("expirationTimestamp")) { if (typeof m.expirationTimestamp === "number") d.expirationTimestamp = o.longs === String ? String(m.expirationTimestamp) : m.expirationTimestamp; else d.expirationTimestamp = o.longs === String ? longToString(m.expirationTimestamp, true) : o.longs === Number ? longToNumber(m.expirationTimestamp, true) : m.expirationTimestamp; + if (o.oneofs) + d._expirationTimestamp = "expirationTimestamp"; } return d; }; @@ -12199,10 +13937,42 @@ export const proto = $root.proto = (() => { } BotReminderMetadata.prototype.requestMessageKey = null; - BotReminderMetadata.prototype.action = 1; - BotReminderMetadata.prototype.name = ""; - BotReminderMetadata.prototype.nextTriggerTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - BotReminderMetadata.prototype.frequency = 1; + BotReminderMetadata.prototype.action = null; + BotReminderMetadata.prototype.name = null; + BotReminderMetadata.prototype.nextTriggerTimestamp = null; + BotReminderMetadata.prototype.frequency = null; + + let $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) + }); BotReminderMetadata.create = function create(properties) { return new BotReminderMetadata(properties); @@ -12342,34 +14112,33 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.requestMessageKey = null; - d.action = o.enums === String ? "NOTIFY" : 1; - d.name = ""; - if ($util.Long) { - var n = new $util.Long(0, 0, true); - d.nextTriggerTimestamp = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.nextTriggerTimestamp = o.longs === String ? "0" : 0; - d.frequency = o.enums === String ? "ONCE" : 1; - } if (m.requestMessageKey != null && m.hasOwnProperty("requestMessageKey")) { d.requestMessageKey = $root.proto.MessageKey.toObject(m.requestMessageKey, o); + if (o.oneofs) + d._requestMessageKey = "requestMessageKey"; } if (m.action != null && m.hasOwnProperty("action")) { d.action = o.enums === String ? $root.proto.BotReminderMetadata.ReminderAction[m.action] === undefined ? m.action : $root.proto.BotReminderMetadata.ReminderAction[m.action] : m.action; + if (o.oneofs) + d._action = "action"; } if (m.name != null && m.hasOwnProperty("name")) { d.name = m.name; + if (o.oneofs) + d._name = "name"; } if (m.nextTriggerTimestamp != null && m.hasOwnProperty("nextTriggerTimestamp")) { if (typeof m.nextTriggerTimestamp === "number") d.nextTriggerTimestamp = o.longs === String ? String(m.nextTriggerTimestamp) : m.nextTriggerTimestamp; else d.nextTriggerTimestamp = o.longs === String ? longToString(m.nextTriggerTimestamp, true) : o.longs === Number ? longToNumber(m.nextTriggerTimestamp, true) : m.nextTriggerTimestamp; + if (o.oneofs) + d._nextTriggerTimestamp = "nextTriggerTimestamp"; } if (m.frequency != null && m.hasOwnProperty("frequency")) { d.frequency = o.enums === String ? $root.proto.BotReminderMetadata.ReminderFrequency[m.frequency] === undefined ? m.frequency : $root.proto.BotReminderMetadata.ReminderFrequency[m.frequency] : m.frequency; + if (o.oneofs) + d._frequency = "frequency"; } return d; }; @@ -12416,8 +14185,22 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - BotRenderingConfigMetadata.prototype.bloksVersioningId = ""; - BotRenderingConfigMetadata.prototype.pixelDensity = 0; + BotRenderingConfigMetadata.prototype.bloksVersioningId = null; + BotRenderingConfigMetadata.prototype.pixelDensity = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotRenderingConfigMetadata.prototype, "_bloksVersioningId", { + get: $util.oneOfGetter($oneOfFields = ["bloksVersioningId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotRenderingConfigMetadata.prototype, "_pixelDensity", { + get: $util.oneOfGetter($oneOfFields = ["pixelDensity"]), + set: $util.oneOfSetter($oneOfFields) + }); BotRenderingConfigMetadata.create = function create(properties) { return new BotRenderingConfigMetadata(properties); @@ -12475,15 +14258,15 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.bloksVersioningId = ""; - d.pixelDensity = 0; - } if (m.bloksVersioningId != null && m.hasOwnProperty("bloksVersioningId")) { d.bloksVersioningId = m.bloksVersioningId; + if (o.oneofs) + d._bloksVersioningId = "bloksVersioningId"; } if (m.pixelDensity != null && m.hasOwnProperty("pixelDensity")) { d.pixelDensity = o.json && !isFinite(m.pixelDensity) ? String(m.pixelDensity) : m.pixelDensity; + if (o.oneofs) + d._pixelDensity = "pixelDensity"; } return d; }; @@ -12605,9 +14388,17 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - Keyword.prototype.value = ""; + Keyword.prototype.value = null; Keyword.prototype.associatedPrompts = $util.emptyArray; + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Keyword.prototype, "_value", { + get: $util.oneOfGetter($oneOfFields = ["value"]), + set: $util.oneOfSetter($oneOfFields) + }); + Keyword.create = function create(properties) { return new Keyword(properties); }; @@ -12676,11 +14467,10 @@ export const proto = $root.proto = (() => { if (o.arrays || o.defaults) { d.associatedPrompts = []; } - if (o.defaults) { - d.value = ""; - } if (m.value != null && m.hasOwnProperty("value")) { d.value = m.value; + if (o.oneofs) + d._value = "value"; } if (m.associatedPrompts && m.associatedPrompts.length) { d.associatedPrompts = []; @@ -12717,8 +14507,22 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - BotSessionMetadata.prototype.sessionId = ""; - BotSessionMetadata.prototype.sessionSource = 0; + BotSessionMetadata.prototype.sessionId = null; + BotSessionMetadata.prototype.sessionSource = null; + + let $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) + }); BotSessionMetadata.create = function create(properties) { return new BotSessionMetadata(properties); @@ -12813,15 +14617,15 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.sessionId = ""; - d.sessionSource = o.enums === String ? "NONE" : 0; - } if (m.sessionId != null && m.hasOwnProperty("sessionId")) { d.sessionId = m.sessionId; + if (o.oneofs) + d._sessionId = "sessionId"; } if (m.sessionSource != null && m.hasOwnProperty("sessionSource")) { d.sessionSource = o.enums === String ? $root.proto.BotSessionSource[m.sessionSource] === undefined ? m.sessionSource : $root.proto.BotSessionSource[m.sessionSource] : m.sessionSource; + if (o.oneofs) + d._sessionSource = "sessionSource"; } return d; }; @@ -12959,11 +14763,31 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - BotSignatureVerificationUseCaseProof.prototype.version = 0; - BotSignatureVerificationUseCaseProof.prototype.useCase = 0; - BotSignatureVerificationUseCaseProof.prototype.signature = $util.newBuffer([]); + BotSignatureVerificationUseCaseProof.prototype.version = null; + BotSignatureVerificationUseCaseProof.prototype.useCase = null; + BotSignatureVerificationUseCaseProof.prototype.signature = null; BotSignatureVerificationUseCaseProof.prototype.certificateChain = $util.emptyArray; + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotSignatureVerificationUseCaseProof.prototype, "_version", { + get: $util.oneOfGetter($oneOfFields = ["version"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotSignatureVerificationUseCaseProof.prototype, "_useCase", { + get: $util.oneOfGetter($oneOfFields = ["useCase"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotSignatureVerificationUseCaseProof.prototype, "_signature", { + get: $util.oneOfGetter($oneOfFields = ["signature"]), + set: $util.oneOfSetter($oneOfFields) + }); + BotSignatureVerificationUseCaseProof.create = function create(properties) { return new BotSignatureVerificationUseCaseProof(properties); }; @@ -13069,25 +14893,20 @@ export const proto = $root.proto = (() => { if (o.arrays || o.defaults) { d.certificateChain = []; } - if (o.defaults) { - d.version = 0; - d.useCase = o.enums === String ? "UNSPECIFIED" : 0; - if (o.bytes === String) - d.signature = ""; - else { - d.signature = []; - if (o.bytes !== Array) - d.signature = $util.newBuffer(d.signature); - } - } if (m.version != null && m.hasOwnProperty("version")) { d.version = m.version; + if (o.oneofs) + d._version = "version"; } if (m.useCase != null && m.hasOwnProperty("useCase")) { d.useCase = o.enums === String ? $root.proto.BotSignatureVerificationUseCaseProof.BotSignatureUseCase[m.useCase] === undefined ? m.useCase : $root.proto.BotSignatureVerificationUseCaseProof.BotSignatureUseCase[m.useCase] : m.useCase; + if (o.oneofs) + d._useCase = "useCase"; } if (m.signature != null && m.hasOwnProperty("signature")) { d.signature = o.bytes === String ? $util.base64.encode(m.signature, 0, m.signature.length) : o.bytes === Array ? Array.prototype.slice.call(m.signature) : m.signature; + if (o.oneofs) + d._signature = "signature"; } if (m.certificateChain && m.certificateChain.length) { d.certificateChain = []; @@ -13221,13 +15040,57 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - BotSourceItem.prototype.provider = 0; - BotSourceItem.prototype.thumbnailCdnUrl = ""; - BotSourceItem.prototype.sourceProviderUrl = ""; - BotSourceItem.prototype.sourceQuery = ""; - BotSourceItem.prototype.faviconCdnUrl = ""; - BotSourceItem.prototype.citationNumber = 0; - BotSourceItem.prototype.sourceTitle = ""; + BotSourceItem.prototype.provider = null; + BotSourceItem.prototype.thumbnailCdnUrl = null; + BotSourceItem.prototype.sourceProviderUrl = null; + BotSourceItem.prototype.sourceQuery = null; + BotSourceItem.prototype.faviconCdnUrl = null; + BotSourceItem.prototype.citationNumber = null; + BotSourceItem.prototype.sourceTitle = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotSourceItem.prototype, "_provider", { + get: $util.oneOfGetter($oneOfFields = ["provider"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotSourceItem.prototype, "_thumbnailCdnUrl", { + get: $util.oneOfGetter($oneOfFields = ["thumbnailCdnUrl"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotSourceItem.prototype, "_sourceProviderUrl", { + get: $util.oneOfGetter($oneOfFields = ["sourceProviderUrl"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotSourceItem.prototype, "_sourceQuery", { + get: $util.oneOfGetter($oneOfFields = ["sourceQuery"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotSourceItem.prototype, "_faviconCdnUrl", { + get: $util.oneOfGetter($oneOfFields = ["faviconCdnUrl"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotSourceItem.prototype, "_citationNumber", { + get: $util.oneOfGetter($oneOfFields = ["citationNumber"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotSourceItem.prototype, "_sourceTitle", { + get: $util.oneOfGetter($oneOfFields = ["sourceTitle"]), + set: $util.oneOfSetter($oneOfFields) + }); BotSourceItem.create = function create(properties) { return new BotSourceItem(properties); @@ -13355,35 +15218,40 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.provider = o.enums === String ? "UNKNOWN" : 0; - d.thumbnailCdnUrl = ""; - d.sourceProviderUrl = ""; - d.sourceQuery = ""; - d.faviconCdnUrl = ""; - d.citationNumber = 0; - d.sourceTitle = ""; - } if (m.provider != null && m.hasOwnProperty("provider")) { d.provider = o.enums === String ? $root.proto.BotSourcesMetadata.BotSourceItem.SourceProvider[m.provider] === undefined ? m.provider : $root.proto.BotSourcesMetadata.BotSourceItem.SourceProvider[m.provider] : m.provider; + if (o.oneofs) + d._provider = "provider"; } if (m.thumbnailCdnUrl != null && m.hasOwnProperty("thumbnailCdnUrl")) { d.thumbnailCdnUrl = m.thumbnailCdnUrl; + if (o.oneofs) + d._thumbnailCdnUrl = "thumbnailCdnUrl"; } if (m.sourceProviderUrl != null && m.hasOwnProperty("sourceProviderUrl")) { d.sourceProviderUrl = m.sourceProviderUrl; + if (o.oneofs) + d._sourceProviderUrl = "sourceProviderUrl"; } if (m.sourceQuery != null && m.hasOwnProperty("sourceQuery")) { d.sourceQuery = m.sourceQuery; + if (o.oneofs) + d._sourceQuery = "sourceQuery"; } if (m.faviconCdnUrl != null && m.hasOwnProperty("faviconCdnUrl")) { d.faviconCdnUrl = m.faviconCdnUrl; + if (o.oneofs) + d._faviconCdnUrl = "faviconCdnUrl"; } if (m.citationNumber != null && m.hasOwnProperty("citationNumber")) { d.citationNumber = m.citationNumber; + if (o.oneofs) + d._citationNumber = "citationNumber"; } if (m.sourceTitle != null && m.hasOwnProperty("sourceTitle")) { d.sourceTitle = m.sourceTitle; + if (o.oneofs) + d._sourceTitle = "sourceTitle"; } return d; }; @@ -13426,9 +15294,29 @@ export const proto = $root.proto = (() => { } BotSuggestedPromptMetadata.prototype.suggestedPrompts = $util.emptyArray; - BotSuggestedPromptMetadata.prototype.selectedPromptIndex = 0; + BotSuggestedPromptMetadata.prototype.selectedPromptIndex = null; BotSuggestedPromptMetadata.prototype.promptSuggestions = null; - BotSuggestedPromptMetadata.prototype.selectedPromptId = ""; + BotSuggestedPromptMetadata.prototype.selectedPromptId = null; + + let $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) + }); BotSuggestedPromptMetadata.create = function create(properties) { return new BotSuggestedPromptMetadata(properties); @@ -13518,11 +15406,6 @@ export const proto = $root.proto = (() => { if (o.arrays || o.defaults) { d.suggestedPrompts = []; } - if (o.defaults) { - d.selectedPromptIndex = 0; - d.promptSuggestions = null; - d.selectedPromptId = ""; - } if (m.suggestedPrompts && m.suggestedPrompts.length) { d.suggestedPrompts = []; for (var j = 0; j < m.suggestedPrompts.length; ++j) { @@ -13531,12 +15414,18 @@ export const proto = $root.proto = (() => { } if (m.selectedPromptIndex != null && m.hasOwnProperty("selectedPromptIndex")) { d.selectedPromptIndex = m.selectedPromptIndex; + if (o.oneofs) + d._selectedPromptIndex = "selectedPromptIndex"; } if (m.promptSuggestions != null && m.hasOwnProperty("promptSuggestions")) { d.promptSuggestions = $root.proto.BotPromptSuggestions.toObject(m.promptSuggestions, o); + if (o.oneofs) + d._promptSuggestions = "promptSuggestions"; } if (m.selectedPromptId != null && m.hasOwnProperty("selectedPromptId")) { d.selectedPromptId = m.selectedPromptId; + if (o.oneofs) + d._selectedPromptId = "selectedPromptId"; } return d; }; @@ -13568,6 +15457,14 @@ export const proto = $root.proto = (() => { BotUnifiedResponseMutation.prototype.sbsMetadata = null; BotUnifiedResponseMutation.prototype.mediaDetailsMetadataList = $util.emptyArray; + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotUnifiedResponseMutation.prototype, "_sbsMetadata", { + get: $util.oneOfGetter($oneOfFields = ["sbsMetadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + BotUnifiedResponseMutation.create = function create(properties) { return new BotUnifiedResponseMutation(properties); }; @@ -13640,11 +15537,10 @@ export const proto = $root.proto = (() => { if (o.arrays || o.defaults) { d.mediaDetailsMetadataList = []; } - if (o.defaults) { - d.sbsMetadata = null; - } if (m.sbsMetadata != null && m.hasOwnProperty("sbsMetadata")) { d.sbsMetadata = $root.proto.BotUnifiedResponseMutation.SideBySideMetadata.toObject(m.sbsMetadata, o); + if (o.oneofs) + d._sbsMetadata = "sbsMetadata"; } if (m.mediaDetailsMetadataList && m.mediaDetailsMetadataList.length) { d.mediaDetailsMetadataList = []; @@ -13675,10 +15571,30 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - MediaDetailsMetadata.prototype.id = ""; + MediaDetailsMetadata.prototype.id = null; MediaDetailsMetadata.prototype.highResMedia = null; MediaDetailsMetadata.prototype.previewMedia = null; + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MediaDetailsMetadata.prototype, "_id", { + get: $util.oneOfGetter($oneOfFields = ["id"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MediaDetailsMetadata.prototype, "_highResMedia", { + get: $util.oneOfGetter($oneOfFields = ["highResMedia"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MediaDetailsMetadata.prototype, "_previewMedia", { + get: $util.oneOfGetter($oneOfFields = ["previewMedia"]), + set: $util.oneOfSetter($oneOfFields) + }); + MediaDetailsMetadata.create = function create(properties) { return new MediaDetailsMetadata(properties); }; @@ -13748,19 +15664,20 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.id = ""; - d.highResMedia = null; - d.previewMedia = null; - } if (m.id != null && m.hasOwnProperty("id")) { d.id = m.id; + if (o.oneofs) + d._id = "id"; } if (m.highResMedia != null && m.hasOwnProperty("highResMedia")) { d.highResMedia = $root.proto.BotMediaMetadata.toObject(m.highResMedia, o); + if (o.oneofs) + d._highResMedia = "highResMedia"; } if (m.previewMedia != null && m.hasOwnProperty("previewMedia")) { d.previewMedia = $root.proto.BotMediaMetadata.toObject(m.previewMedia, o); + if (o.oneofs) + d._previewMedia = "previewMedia"; } return d; }; @@ -13788,8 +15705,22 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - SideBySideMetadata.prototype.primaryResponseId = ""; - SideBySideMetadata.prototype.surveyCtaHasRendered = false; + SideBySideMetadata.prototype.primaryResponseId = null; + SideBySideMetadata.prototype.surveyCtaHasRendered = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SideBySideMetadata.prototype, "_primaryResponseId", { + get: $util.oneOfGetter($oneOfFields = ["primaryResponseId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SideBySideMetadata.prototype, "_surveyCtaHasRendered", { + get: $util.oneOfGetter($oneOfFields = ["surveyCtaHasRendered"]), + set: $util.oneOfSetter($oneOfFields) + }); SideBySideMetadata.create = function create(properties) { return new SideBySideMetadata(properties); @@ -13847,15 +15778,15 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.primaryResponseId = ""; - d.surveyCtaHasRendered = false; - } if (m.primaryResponseId != null && m.hasOwnProperty("primaryResponseId")) { d.primaryResponseId = m.primaryResponseId; + if (o.oneofs) + d._primaryResponseId = "primaryResponseId"; } if (m.surveyCtaHasRendered != null && m.hasOwnProperty("surveyCtaHasRendered")) { d.surveyCtaHasRendered = m.surveyCtaHasRendered; + if (o.oneofs) + d._surveyCtaHasRendered = "surveyCtaHasRendered"; } return d; }; @@ -13887,21 +15818,107 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - CallLogRecord.prototype.callResult = 0; - CallLogRecord.prototype.isDndMode = false; - CallLogRecord.prototype.silenceReason = 0; - CallLogRecord.prototype.duration = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - CallLogRecord.prototype.startTime = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - CallLogRecord.prototype.isIncoming = false; - CallLogRecord.prototype.isVideo = false; - CallLogRecord.prototype.isCallLink = false; - CallLogRecord.prototype.callLinkToken = ""; - CallLogRecord.prototype.scheduledCallId = ""; - CallLogRecord.prototype.callId = ""; - CallLogRecord.prototype.callCreatorJid = ""; - CallLogRecord.prototype.groupJid = ""; + CallLogRecord.prototype.callResult = null; + CallLogRecord.prototype.isDndMode = null; + CallLogRecord.prototype.silenceReason = null; + CallLogRecord.prototype.duration = null; + CallLogRecord.prototype.startTime = null; + CallLogRecord.prototype.isIncoming = null; + CallLogRecord.prototype.isVideo = null; + CallLogRecord.prototype.isCallLink = null; + CallLogRecord.prototype.callLinkToken = null; + CallLogRecord.prototype.scheduledCallId = null; + CallLogRecord.prototype.callId = null; + CallLogRecord.prototype.callCreatorJid = null; + CallLogRecord.prototype.groupJid = null; CallLogRecord.prototype.participants = $util.emptyArray; - CallLogRecord.prototype.callType = 0; + CallLogRecord.prototype.callType = null; + + let $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) + }); CallLogRecord.create = function create(properties) { return new CallLogRecord(properties); @@ -14191,74 +16208,76 @@ export const proto = $root.proto = (() => { if (o.arrays || o.defaults) { d.participants = []; } - if (o.defaults) { - d.callResult = o.enums === String ? "CONNECTED" : 0; - d.isDndMode = false; - d.silenceReason = o.enums === String ? "NONE" : 0; - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.duration = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.duration = o.longs === String ? "0" : 0; - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.startTime = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.startTime = o.longs === String ? "0" : 0; - d.isIncoming = false; - d.isVideo = false; - d.isCallLink = false; - d.callLinkToken = ""; - d.scheduledCallId = ""; - d.callId = ""; - d.callCreatorJid = ""; - d.groupJid = ""; - d.callType = o.enums === String ? "REGULAR" : 0; - } if (m.callResult != null && m.hasOwnProperty("callResult")) { d.callResult = o.enums === String ? $root.proto.CallLogRecord.CallResult[m.callResult] === undefined ? m.callResult : $root.proto.CallLogRecord.CallResult[m.callResult] : m.callResult; + if (o.oneofs) + d._callResult = "callResult"; } if (m.isDndMode != null && m.hasOwnProperty("isDndMode")) { d.isDndMode = m.isDndMode; + if (o.oneofs) + d._isDndMode = "isDndMode"; } if (m.silenceReason != null && m.hasOwnProperty("silenceReason")) { d.silenceReason = o.enums === String ? $root.proto.CallLogRecord.SilenceReason[m.silenceReason] === undefined ? m.silenceReason : $root.proto.CallLogRecord.SilenceReason[m.silenceReason] : m.silenceReason; + if (o.oneofs) + d._silenceReason = "silenceReason"; } if (m.duration != null && m.hasOwnProperty("duration")) { if (typeof m.duration === "number") d.duration = o.longs === String ? String(m.duration) : m.duration; else d.duration = o.longs === String ? longToString(m.duration) : o.longs === Number ? longToNumber(m.duration) : m.duration; + if (o.oneofs) + d._duration = "duration"; } if (m.startTime != null && m.hasOwnProperty("startTime")) { if (typeof m.startTime === "number") d.startTime = o.longs === String ? String(m.startTime) : m.startTime; else d.startTime = o.longs === String ? longToString(m.startTime) : o.longs === Number ? longToNumber(m.startTime) : m.startTime; + if (o.oneofs) + d._startTime = "startTime"; } if (m.isIncoming != null && m.hasOwnProperty("isIncoming")) { d.isIncoming = m.isIncoming; + if (o.oneofs) + d._isIncoming = "isIncoming"; } if (m.isVideo != null && m.hasOwnProperty("isVideo")) { d.isVideo = m.isVideo; + if (o.oneofs) + d._isVideo = "isVideo"; } if (m.isCallLink != null && m.hasOwnProperty("isCallLink")) { d.isCallLink = m.isCallLink; + if (o.oneofs) + d._isCallLink = "isCallLink"; } if (m.callLinkToken != null && m.hasOwnProperty("callLinkToken")) { d.callLinkToken = m.callLinkToken; + if (o.oneofs) + d._callLinkToken = "callLinkToken"; } if (m.scheduledCallId != null && m.hasOwnProperty("scheduledCallId")) { d.scheduledCallId = m.scheduledCallId; + if (o.oneofs) + d._scheduledCallId = "scheduledCallId"; } if (m.callId != null && m.hasOwnProperty("callId")) { d.callId = m.callId; + if (o.oneofs) + d._callId = "callId"; } if (m.callCreatorJid != null && m.hasOwnProperty("callCreatorJid")) { d.callCreatorJid = m.callCreatorJid; + if (o.oneofs) + d._callCreatorJid = "callCreatorJid"; } if (m.groupJid != null && m.hasOwnProperty("groupJid")) { d.groupJid = m.groupJid; + if (o.oneofs) + d._groupJid = "groupJid"; } if (m.participants && m.participants.length) { d.participants = []; @@ -14268,6 +16287,8 @@ export const proto = $root.proto = (() => { } if (m.callType != null && m.hasOwnProperty("callType")) { d.callType = o.enums === String ? $root.proto.CallLogRecord.CallType[m.callType] === undefined ? m.callType : $root.proto.CallLogRecord.CallType[m.callType] : m.callType; + if (o.oneofs) + d._callType = "callType"; } return d; }; @@ -14316,8 +16337,22 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - ParticipantInfo.prototype.userJid = ""; - ParticipantInfo.prototype.callResult = 0; + ParticipantInfo.prototype.userJid = null; + ParticipantInfo.prototype.callResult = null; + + let $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) + }); ParticipantInfo.create = function create(properties) { return new ParticipantInfo(properties); @@ -14424,15 +16459,15 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.userJid = ""; - d.callResult = o.enums === String ? "CONNECTED" : 0; - } if (m.userJid != null && m.hasOwnProperty("userJid")) { d.userJid = m.userJid; + if (o.oneofs) + d._userJid = "userJid"; } if (m.callResult != null && m.hasOwnProperty("callResult")) { d.callResult = o.enums === String ? $root.proto.CallLogRecord.CallResult[m.callResult] === undefined ? m.callResult : $root.proto.CallLogRecord.CallResult[m.callResult] : m.callResult; + if (o.oneofs) + d._callResult = "callResult"; } return d; }; @@ -14475,6 +16510,20 @@ export const proto = $root.proto = (() => { CertChain.prototype.leaf = null; CertChain.prototype.intermediate = null; + let $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) + }); + CertChain.create = function create(properties) { return new CertChain(properties); }; @@ -14535,15 +16584,15 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.leaf = null; - d.intermediate = null; - } if (m.leaf != null && m.hasOwnProperty("leaf")) { d.leaf = $root.proto.CertChain.NoiseCertificate.toObject(m.leaf, o); + if (o.oneofs) + d._leaf = "leaf"; } if (m.intermediate != null && m.hasOwnProperty("intermediate")) { d.intermediate = $root.proto.CertChain.NoiseCertificate.toObject(m.intermediate, o); + if (o.oneofs) + d._intermediate = "intermediate"; } return d; }; @@ -14568,8 +16617,22 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - NoiseCertificate.prototype.details = $util.newBuffer([]); - NoiseCertificate.prototype.signature = $util.newBuffer([]); + NoiseCertificate.prototype.details = null; + NoiseCertificate.prototype.signature = null; + + let $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) + }); NoiseCertificate.create = function create(properties) { return new NoiseCertificate(properties); @@ -14633,27 +16696,15 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - if (o.bytes === String) - d.details = ""; - else { - d.details = []; - if (o.bytes !== Array) - d.details = $util.newBuffer(d.details); - } - if (o.bytes === String) - d.signature = ""; - else { - d.signature = []; - if (o.bytes !== Array) - d.signature = $util.newBuffer(d.signature); - } - } if (m.details != null && m.hasOwnProperty("details")) { d.details = o.bytes === String ? $util.base64.encode(m.details, 0, m.details.length) : o.bytes === Array ? Array.prototype.slice.call(m.details) : m.details; + if (o.oneofs) + d._details = "details"; } if (m.signature != null && m.hasOwnProperty("signature")) { d.signature = o.bytes === String ? $util.base64.encode(m.signature, 0, m.signature.length) : o.bytes === Array ? Array.prototype.slice.call(m.signature) : m.signature; + if (o.oneofs) + d._signature = "signature"; } return d; }; @@ -14678,11 +16729,43 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - Details.prototype.serial = 0; - Details.prototype.issuerSerial = 0; - Details.prototype.key = $util.newBuffer([]); - Details.prototype.notBefore = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - Details.prototype.notAfter = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + Details.prototype.serial = null; + Details.prototype.issuerSerial = null; + Details.prototype.key = null; + Details.prototype.notBefore = null; + Details.prototype.notAfter = null; + + let $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) + }); Details.create = function create(properties) { return new Details(properties); @@ -14784,47 +16867,36 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.serial = 0; - d.issuerSerial = 0; - if (o.bytes === String) - d.key = ""; - else { - d.key = []; - if (o.bytes !== Array) - d.key = $util.newBuffer(d.key); - } - if ($util.Long) { - var n = new $util.Long(0, 0, true); - d.notBefore = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.notBefore = o.longs === String ? "0" : 0; - if ($util.Long) { - var n = new $util.Long(0, 0, true); - d.notAfter = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.notAfter = o.longs === String ? "0" : 0; - } if (m.serial != null && m.hasOwnProperty("serial")) { d.serial = m.serial; + if (o.oneofs) + d._serial = "serial"; } if (m.issuerSerial != null && m.hasOwnProperty("issuerSerial")) { d.issuerSerial = m.issuerSerial; + if (o.oneofs) + d._issuerSerial = "issuerSerial"; } if (m.key != null && m.hasOwnProperty("key")) { d.key = o.bytes === String ? $util.base64.encode(m.key, 0, m.key.length) : o.bytes === Array ? Array.prototype.slice.call(m.key) : m.key; + if (o.oneofs) + d._key = "key"; } if (m.notBefore != null && m.hasOwnProperty("notBefore")) { if (typeof m.notBefore === "number") d.notBefore = o.longs === String ? String(m.notBefore) : m.notBefore; else d.notBefore = o.longs === String ? longToString(m.notBefore, true) : o.longs === Number ? longToNumber(m.notBefore, true) : m.notBefore; + if (o.oneofs) + d._notBefore = "notBefore"; } if (m.notAfter != null && m.hasOwnProperty("notAfter")) { if (typeof m.notAfter === "number") d.notAfter = o.longs === String ? String(m.notAfter) : m.notAfter; else d.notAfter = o.longs === String ? longToString(m.notAfter, true) : o.longs === Number ? longToNumber(m.notAfter, true) : m.notAfter; + if (o.oneofs) + d._notAfter = "notAfter"; } return d; }; @@ -14858,9 +16930,23 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - ChatLockSettings.prototype.hideLockedChats = false; + ChatLockSettings.prototype.hideLockedChats = null; ChatLockSettings.prototype.secretCode = null; + let $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) + }); + ChatLockSettings.create = function create(properties) { return new ChatLockSettings(properties); }; @@ -14919,15 +17005,15 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.hideLockedChats = false; - d.secretCode = null; - } if (m.hideLockedChats != null && m.hasOwnProperty("hideLockedChats")) { d.hideLockedChats = m.hideLockedChats; + if (o.oneofs) + d._hideLockedChats = "hideLockedChats"; } if (m.secretCode != null && m.hasOwnProperty("secretCode")) { d.secretCode = $root.proto.UserPassword.toObject(m.secretCode, o); + if (o.oneofs) + d._secretCode = "secretCode"; } return d; }; @@ -14957,6 +17043,14 @@ export const proto = $root.proto = (() => { ChatRowOpaqueData.prototype.draftMessage = null; + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ChatRowOpaqueData.prototype, "_draftMessage", { + get: $util.oneOfGetter($oneOfFields = ["draftMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + ChatRowOpaqueData.create = function create(properties) { return new ChatRowOpaqueData(properties); }; @@ -15006,11 +17100,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.draftMessage = null; - } if (m.draftMessage != null && m.hasOwnProperty("draftMessage")) { d.draftMessage = $root.proto.ChatRowOpaqueData.DraftMessage.toObject(m.draftMessage, o); + if (o.oneofs) + d._draftMessage = "draftMessage"; } return d; }; @@ -15035,11 +17128,43 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - DraftMessage.prototype.text = ""; - DraftMessage.prototype.omittedUrl = ""; + DraftMessage.prototype.text = null; + DraftMessage.prototype.omittedUrl = null; DraftMessage.prototype.ctwaContextLinkData = null; DraftMessage.prototype.ctwaContext = null; - DraftMessage.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + DraftMessage.prototype.timestamp = null; + + let $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) + }); DraftMessage.create = function create(properties) { return new DraftMessage(properties); @@ -15135,34 +17260,33 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.text = ""; - d.omittedUrl = ""; - d.ctwaContextLinkData = null; - d.ctwaContext = null; - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.timestamp = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.timestamp = o.longs === String ? "0" : 0; - } if (m.text != null && m.hasOwnProperty("text")) { d.text = m.text; + if (o.oneofs) + d._text = "text"; } if (m.omittedUrl != null && m.hasOwnProperty("omittedUrl")) { d.omittedUrl = m.omittedUrl; + if (o.oneofs) + d._omittedUrl = "omittedUrl"; } if (m.ctwaContextLinkData != null && m.hasOwnProperty("ctwaContextLinkData")) { d.ctwaContextLinkData = $root.proto.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData.toObject(m.ctwaContextLinkData, o); + if (o.oneofs) + d._ctwaContextLinkData = "ctwaContextLinkData"; } if (m.ctwaContext != null && m.hasOwnProperty("ctwaContext")) { d.ctwaContext = $root.proto.ChatRowOpaqueData.DraftMessage.CtwaContextData.toObject(m.ctwaContext, o); + if (o.oneofs) + d._ctwaContext = "ctwaContext"; } if (m.timestamp != null && m.hasOwnProperty("timestamp")) { if (typeof m.timestamp === "number") d.timestamp = o.longs === String ? String(m.timestamp) : m.timestamp; else d.timestamp = o.longs === String ? longToString(m.timestamp) : o.longs === Number ? longToNumber(m.timestamp) : m.timestamp; + if (o.oneofs) + d._timestamp = "timestamp"; } return d; }; @@ -15187,18 +17311,92 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - CtwaContextData.prototype.conversionSource = ""; - CtwaContextData.prototype.conversionData = $util.newBuffer([]); - CtwaContextData.prototype.sourceUrl = ""; - CtwaContextData.prototype.sourceId = ""; - CtwaContextData.prototype.sourceType = ""; - CtwaContextData.prototype.title = ""; - CtwaContextData.prototype.description = ""; - CtwaContextData.prototype.thumbnail = ""; - CtwaContextData.prototype.thumbnailUrl = ""; - CtwaContextData.prototype.mediaType = 0; - CtwaContextData.prototype.mediaUrl = ""; - CtwaContextData.prototype.isSuspiciousLink = false; + CtwaContextData.prototype.conversionSource = null; + CtwaContextData.prototype.conversionData = null; + CtwaContextData.prototype.sourceUrl = null; + CtwaContextData.prototype.sourceId = null; + CtwaContextData.prototype.sourceType = null; + CtwaContextData.prototype.title = null; + CtwaContextData.prototype.description = null; + CtwaContextData.prototype.thumbnail = null; + CtwaContextData.prototype.thumbnailUrl = null; + CtwaContextData.prototype.mediaType = null; + CtwaContextData.prototype.mediaUrl = null; + CtwaContextData.prototype.isSuspiciousLink = null; + + let $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) + }); CtwaContextData.create = function create(properties) { return new CtwaContextData(properties); @@ -15366,61 +17564,65 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.conversionSource = ""; - if (o.bytes === String) - d.conversionData = ""; - else { - d.conversionData = []; - if (o.bytes !== Array) - d.conversionData = $util.newBuffer(d.conversionData); - } - d.sourceUrl = ""; - d.sourceId = ""; - d.sourceType = ""; - d.title = ""; - d.description = ""; - d.thumbnail = ""; - d.thumbnailUrl = ""; - d.mediaType = o.enums === String ? "NONE" : 0; - d.mediaUrl = ""; - d.isSuspiciousLink = false; - } if (m.conversionSource != null && m.hasOwnProperty("conversionSource")) { d.conversionSource = m.conversionSource; + if (o.oneofs) + d._conversionSource = "conversionSource"; } if (m.conversionData != null && m.hasOwnProperty("conversionData")) { d.conversionData = o.bytes === String ? $util.base64.encode(m.conversionData, 0, m.conversionData.length) : o.bytes === Array ? Array.prototype.slice.call(m.conversionData) : m.conversionData; + if (o.oneofs) + d._conversionData = "conversionData"; } if (m.sourceUrl != null && m.hasOwnProperty("sourceUrl")) { d.sourceUrl = m.sourceUrl; + if (o.oneofs) + d._sourceUrl = "sourceUrl"; } if (m.sourceId != null && m.hasOwnProperty("sourceId")) { d.sourceId = m.sourceId; + if (o.oneofs) + d._sourceId = "sourceId"; } if (m.sourceType != null && m.hasOwnProperty("sourceType")) { d.sourceType = m.sourceType; + if (o.oneofs) + d._sourceType = "sourceType"; } if (m.title != null && m.hasOwnProperty("title")) { d.title = m.title; + if (o.oneofs) + d._title = "title"; } if (m.description != null && m.hasOwnProperty("description")) { d.description = m.description; + if (o.oneofs) + d._description = "description"; } if (m.thumbnail != null && m.hasOwnProperty("thumbnail")) { d.thumbnail = m.thumbnail; + if (o.oneofs) + d._thumbnail = "thumbnail"; } if (m.thumbnailUrl != null && m.hasOwnProperty("thumbnailUrl")) { d.thumbnailUrl = m.thumbnailUrl; + if (o.oneofs) + d._thumbnailUrl = "thumbnailUrl"; } if (m.mediaType != null && m.hasOwnProperty("mediaType")) { d.mediaType = o.enums === String ? $root.proto.ChatRowOpaqueData.DraftMessage.CtwaContextData.ContextInfoExternalAdReplyInfoMediaType[m.mediaType] === undefined ? m.mediaType : $root.proto.ChatRowOpaqueData.DraftMessage.CtwaContextData.ContextInfoExternalAdReplyInfoMediaType[m.mediaType] : m.mediaType; + if (o.oneofs) + d._mediaType = "mediaType"; } if (m.mediaUrl != null && m.hasOwnProperty("mediaUrl")) { d.mediaUrl = m.mediaUrl; + if (o.oneofs) + d._mediaUrl = "mediaUrl"; } if (m.isSuspiciousLink != null && m.hasOwnProperty("isSuspiciousLink")) { d.isSuspiciousLink = m.isSuspiciousLink; + if (o.oneofs) + d._isSuspiciousLink = "isSuspiciousLink"; } return d; }; @@ -15456,10 +17658,36 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - CtwaContextLinkData.prototype.context = ""; - CtwaContextLinkData.prototype.sourceUrl = ""; - CtwaContextLinkData.prototype.icebreaker = ""; - CtwaContextLinkData.prototype.phone = ""; + CtwaContextLinkData.prototype.context = null; + CtwaContextLinkData.prototype.sourceUrl = null; + CtwaContextLinkData.prototype.icebreaker = null; + CtwaContextLinkData.prototype.phone = null; + + let $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) + }); CtwaContextLinkData.create = function create(properties) { return new CtwaContextLinkData(properties); @@ -15535,23 +17763,25 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.context = ""; - d.sourceUrl = ""; - d.icebreaker = ""; - d.phone = ""; - } if (m.context != null && m.hasOwnProperty("context")) { d.context = m.context; + if (o.oneofs) + d._context = "context"; } if (m.sourceUrl != null && m.hasOwnProperty("sourceUrl")) { d.sourceUrl = m.sourceUrl; + if (o.oneofs) + d._sourceUrl = "sourceUrl"; } if (m.icebreaker != null && m.hasOwnProperty("icebreaker")) { d.icebreaker = m.icebreaker; + if (o.oneofs) + d._icebreaker = "icebreaker"; } if (m.phone != null && m.hasOwnProperty("phone")) { d.phone = m.phone; + if (o.oneofs) + d._phone = "phone"; } return d; }; @@ -15585,10 +17815,36 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - Citation.prototype.title = ""; - Citation.prototype.subtitle = ""; - Citation.prototype.cmsId = ""; - Citation.prototype.imageUrl = ""; + Citation.prototype.title = null; + Citation.prototype.subtitle = null; + Citation.prototype.cmsId = null; + Citation.prototype.imageUrl = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Citation.prototype, "_title", { + get: $util.oneOfGetter($oneOfFields = ["title"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Citation.prototype, "_subtitle", { + get: $util.oneOfGetter($oneOfFields = ["subtitle"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Citation.prototype, "_cmsId", { + get: $util.oneOfGetter($oneOfFields = ["cmsId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Citation.prototype, "_imageUrl", { + get: $util.oneOfGetter($oneOfFields = ["imageUrl"]), + set: $util.oneOfSetter($oneOfFields) + }); Citation.create = function create(properties) { return new Citation(properties); @@ -15597,10 +17853,14 @@ export const proto = $root.proto = (() => { Citation.encode = function encode(m, w) { if (!w) w = $Writer.create(); - w.uint32(10).string(m.title); - w.uint32(18).string(m.subtitle); - w.uint32(26).string(m.cmsId); - w.uint32(34).string(m.imageUrl); + if (m.title != null && Object.hasOwnProperty.call(m, "title")) + w.uint32(10).string(m.title); + if (m.subtitle != null && Object.hasOwnProperty.call(m, "subtitle")) + w.uint32(18).string(m.subtitle); + if (m.cmsId != null && Object.hasOwnProperty.call(m, "cmsId")) + w.uint32(26).string(m.cmsId); + if (m.imageUrl != null && Object.hasOwnProperty.call(m, "imageUrl")) + w.uint32(34).string(m.imageUrl); return w; }; @@ -15634,14 +17894,6 @@ export const proto = $root.proto = (() => { break; } } - if (!m.hasOwnProperty("title")) - throw $util.ProtocolError("missing required 'title'", { instance: m }); - if (!m.hasOwnProperty("subtitle")) - throw $util.ProtocolError("missing required 'subtitle'", { instance: m }); - if (!m.hasOwnProperty("cmsId")) - throw $util.ProtocolError("missing required 'cmsId'", { instance: m }); - if (!m.hasOwnProperty("imageUrl")) - throw $util.ProtocolError("missing required 'imageUrl'", { instance: m }); return m; }; @@ -15668,23 +17920,25 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.title = ""; - d.subtitle = ""; - d.cmsId = ""; - d.imageUrl = ""; - } if (m.title != null && m.hasOwnProperty("title")) { d.title = m.title; + if (o.oneofs) + d._title = "title"; } if (m.subtitle != null && m.hasOwnProperty("subtitle")) { d.subtitle = m.subtitle; + if (o.oneofs) + d._subtitle = "subtitle"; } if (m.cmsId != null && m.hasOwnProperty("cmsId")) { d.cmsId = m.cmsId; + if (o.oneofs) + d._cmsId = "cmsId"; } if (m.imageUrl != null && m.hasOwnProperty("imageUrl")) { d.imageUrl = m.imageUrl; + if (o.oneofs) + d._imageUrl = "imageUrl"; } return d; }; @@ -15712,10 +17966,36 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - ClientPairingProps.prototype.isChatDbLidMigrated = false; - ClientPairingProps.prototype.isSyncdPureLidSession = false; - ClientPairingProps.prototype.isSyncdSnapshotRecoveryEnabled = false; - ClientPairingProps.prototype.isHsThumbnailSyncEnabled = false; + ClientPairingProps.prototype.isChatDbLidMigrated = null; + ClientPairingProps.prototype.isSyncdPureLidSession = null; + ClientPairingProps.prototype.isSyncdSnapshotRecoveryEnabled = null; + ClientPairingProps.prototype.isHsThumbnailSyncEnabled = null; + + let $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) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ClientPairingProps.prototype, "_isSyncdSnapshotRecoveryEnabled", { + get: $util.oneOfGetter($oneOfFields = ["isSyncdSnapshotRecoveryEnabled"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ClientPairingProps.prototype, "_isHsThumbnailSyncEnabled", { + get: $util.oneOfGetter($oneOfFields = ["isHsThumbnailSyncEnabled"]), + set: $util.oneOfSetter($oneOfFields) + }); ClientPairingProps.create = function create(properties) { return new ClientPairingProps(properties); @@ -15791,23 +18071,25 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.isChatDbLidMigrated = false; - d.isSyncdPureLidSession = false; - d.isSyncdSnapshotRecoveryEnabled = false; - d.isHsThumbnailSyncEnabled = false; - } if (m.isChatDbLidMigrated != null && m.hasOwnProperty("isChatDbLidMigrated")) { d.isChatDbLidMigrated = m.isChatDbLidMigrated; + if (o.oneofs) + d._isChatDbLidMigrated = "isChatDbLidMigrated"; } if (m.isSyncdPureLidSession != null && m.hasOwnProperty("isSyncdPureLidSession")) { d.isSyncdPureLidSession = m.isSyncdPureLidSession; + if (o.oneofs) + d._isSyncdPureLidSession = "isSyncdPureLidSession"; } if (m.isSyncdSnapshotRecoveryEnabled != null && m.hasOwnProperty("isSyncdSnapshotRecoveryEnabled")) { d.isSyncdSnapshotRecoveryEnabled = m.isSyncdSnapshotRecoveryEnabled; + if (o.oneofs) + d._isSyncdSnapshotRecoveryEnabled = "isSyncdSnapshotRecoveryEnabled"; } if (m.isHsThumbnailSyncEnabled != null && m.hasOwnProperty("isHsThumbnailSyncEnabled")) { d.isHsThumbnailSyncEnabled = m.isHsThumbnailSyncEnabled; + if (o.oneofs) + d._isHsThumbnailSyncEnabled = "isHsThumbnailSyncEnabled"; } return d; }; @@ -15836,40 +18118,240 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - ClientPayload.prototype.username = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - ClientPayload.prototype.passive = false; + ClientPayload.prototype.username = null; + ClientPayload.prototype.passive = null; ClientPayload.prototype.userAgent = null; ClientPayload.prototype.webInfo = null; - ClientPayload.prototype.pushName = ""; - ClientPayload.prototype.sessionId = 0; - ClientPayload.prototype.shortConnect = false; - ClientPayload.prototype.connectType = 0; - ClientPayload.prototype.connectReason = 0; + ClientPayload.prototype.pushName = null; + ClientPayload.prototype.sessionId = null; + ClientPayload.prototype.shortConnect = null; + ClientPayload.prototype.connectType = null; + ClientPayload.prototype.connectReason = null; ClientPayload.prototype.shards = $util.emptyArray; ClientPayload.prototype.dnsSource = null; - ClientPayload.prototype.connectAttemptCount = 0; - ClientPayload.prototype.device = 0; + ClientPayload.prototype.connectAttemptCount = null; + ClientPayload.prototype.device = null; ClientPayload.prototype.devicePairingData = null; - ClientPayload.prototype.product = 0; - ClientPayload.prototype.fbCat = $util.newBuffer([]); - ClientPayload.prototype.fbUserAgent = $util.newBuffer([]); - ClientPayload.prototype.oc = false; - ClientPayload.prototype.lc = 0; - ClientPayload.prototype.iosAppExtension = 0; - ClientPayload.prototype.fbAppId = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - ClientPayload.prototype.fbDeviceId = $util.newBuffer([]); - ClientPayload.prototype.pull = false; - ClientPayload.prototype.paddingBytes = $util.newBuffer([]); - ClientPayload.prototype.yearClass = 0; - ClientPayload.prototype.memClass = 0; + ClientPayload.prototype.product = null; + ClientPayload.prototype.fbCat = null; + ClientPayload.prototype.fbUserAgent = null; + ClientPayload.prototype.oc = null; + ClientPayload.prototype.lc = null; + ClientPayload.prototype.iosAppExtension = null; + ClientPayload.prototype.fbAppId = null; + ClientPayload.prototype.fbDeviceId = null; + ClientPayload.prototype.pull = null; + ClientPayload.prototype.paddingBytes = null; + ClientPayload.prototype.yearClass = null; + ClientPayload.prototype.memClass = null; ClientPayload.prototype.interopData = null; - ClientPayload.prototype.trafficAnonymization = 0; - ClientPayload.prototype.lidDbMigrated = false; - ClientPayload.prototype.accountType = 0; - ClientPayload.prototype.connectionSequenceInfo = 0; - ClientPayload.prototype.paaLink = false; - ClientPayload.prototype.preacksCount = 0; - ClientPayload.prototype.processingQueueSize = 0; + ClientPayload.prototype.trafficAnonymization = null; + ClientPayload.prototype.lidDbMigrated = null; + ClientPayload.prototype.accountType = null; + ClientPayload.prototype.connectionSequenceInfo = null; + ClientPayload.prototype.paaLink = null; + ClientPayload.prototype.preacksCount = null; + ClientPayload.prototype.processingQueueSize = null; + + let $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) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ClientPayload.prototype, "_lidDbMigrated", { + get: $util.oneOfGetter($oneOfFields = ["lidDbMigrated"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ClientPayload.prototype, "_accountType", { + get: $util.oneOfGetter($oneOfFields = ["accountType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ClientPayload.prototype, "_connectionSequenceInfo", { + get: $util.oneOfGetter($oneOfFields = ["connectionSequenceInfo"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ClientPayload.prototype, "_paaLink", { + get: $util.oneOfGetter($oneOfFields = ["paaLink"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ClientPayload.prototype, "_preacksCount", { + get: $util.oneOfGetter($oneOfFields = ["preacksCount"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ClientPayload.prototype, "_processingQueueSize", { + get: $util.oneOfGetter($oneOfFields = ["processingQueueSize"]), + set: $util.oneOfSetter($oneOfFields) + }); ClientPayload.create = function create(properties) { return new ClientPayload(properties); @@ -15897,8 +18379,10 @@ export const proto = $root.proto = (() => { if (m.connectReason != null && Object.hasOwnProperty.call(m, "connectReason")) w.uint32(104).int32(m.connectReason); if (m.shards != null && m.shards.length) { + w.uint32(114).fork(); for (var i = 0; i < m.shards.length; ++i) - w.uint32(112).int32(m.shards[i]); + w.int32(m.shards[i]); + w.ldelim(); } if (m.dnsSource != null && Object.hasOwnProperty.call(m, "dnsSource")) $root.proto.ClientPayload.DNSSource.encode(m.dnsSource, w.uint32(122).fork()).ldelim(); @@ -16434,102 +18918,53 @@ export const proto = $root.proto = (() => { if (o.arrays || o.defaults) { d.shards = []; } - if (o.defaults) { - if ($util.Long) { - var n = new $util.Long(0, 0, true); - d.username = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.username = o.longs === String ? "0" : 0; - d.passive = false; - d.userAgent = null; - d.webInfo = null; - d.pushName = ""; - d.sessionId = 0; - d.shortConnect = false; - d.connectType = o.enums === String ? "CELLULAR_UNKNOWN" : 0; - d.connectReason = o.enums === String ? "PUSH" : 0; - d.dnsSource = null; - d.connectAttemptCount = 0; - d.device = 0; - d.devicePairingData = null; - d.product = o.enums === String ? "WHATSAPP" : 0; - if (o.bytes === String) - d.fbCat = ""; - else { - d.fbCat = []; - if (o.bytes !== Array) - d.fbCat = $util.newBuffer(d.fbCat); - } - if (o.bytes === String) - d.fbUserAgent = ""; - else { - d.fbUserAgent = []; - if (o.bytes !== Array) - d.fbUserAgent = $util.newBuffer(d.fbUserAgent); - } - d.oc = false; - d.lc = 0; - d.iosAppExtension = o.enums === String ? "SHARE_EXTENSION" : 0; - if ($util.Long) { - var n = new $util.Long(0, 0, true); - d.fbAppId = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.fbAppId = o.longs === String ? "0" : 0; - if (o.bytes === String) - d.fbDeviceId = ""; - else { - d.fbDeviceId = []; - if (o.bytes !== Array) - d.fbDeviceId = $util.newBuffer(d.fbDeviceId); - } - d.pull = false; - if (o.bytes === String) - d.paddingBytes = ""; - else { - d.paddingBytes = []; - if (o.bytes !== Array) - d.paddingBytes = $util.newBuffer(d.paddingBytes); - } - d.yearClass = 0; - d.memClass = 0; - d.interopData = null; - d.trafficAnonymization = o.enums === String ? "OFF" : 0; - d.lidDbMigrated = false; - d.accountType = o.enums === String ? "DEFAULT" : 0; - d.connectionSequenceInfo = 0; - d.paaLink = false; - d.preacksCount = 0; - d.processingQueueSize = 0; - } if (m.username != null && m.hasOwnProperty("username")) { if (typeof m.username === "number") d.username = o.longs === String ? String(m.username) : m.username; else d.username = o.longs === String ? longToString(m.username, true) : o.longs === Number ? longToNumber(m.username, true) : m.username; + if (o.oneofs) + d._username = "username"; } if (m.passive != null && m.hasOwnProperty("passive")) { d.passive = m.passive; + if (o.oneofs) + d._passive = "passive"; } if (m.userAgent != null && m.hasOwnProperty("userAgent")) { d.userAgent = $root.proto.ClientPayload.UserAgent.toObject(m.userAgent, o); + if (o.oneofs) + d._userAgent = "userAgent"; } if (m.webInfo != null && m.hasOwnProperty("webInfo")) { d.webInfo = $root.proto.ClientPayload.WebInfo.toObject(m.webInfo, o); + if (o.oneofs) + d._webInfo = "webInfo"; } if (m.pushName != null && m.hasOwnProperty("pushName")) { d.pushName = m.pushName; + if (o.oneofs) + d._pushName = "pushName"; } if (m.sessionId != null && m.hasOwnProperty("sessionId")) { d.sessionId = m.sessionId; + if (o.oneofs) + d._sessionId = "sessionId"; } if (m.shortConnect != null && m.hasOwnProperty("shortConnect")) { d.shortConnect = m.shortConnect; + if (o.oneofs) + d._shortConnect = "shortConnect"; } if (m.connectType != null && m.hasOwnProperty("connectType")) { d.connectType = o.enums === String ? $root.proto.ClientPayload.ConnectType[m.connectType] === undefined ? m.connectType : $root.proto.ClientPayload.ConnectType[m.connectType] : m.connectType; + if (o.oneofs) + d._connectType = "connectType"; } if (m.connectReason != null && m.hasOwnProperty("connectReason")) { d.connectReason = o.enums === String ? $root.proto.ClientPayload.ConnectReason[m.connectReason] === undefined ? m.connectReason : $root.proto.ClientPayload.ConnectReason[m.connectReason] : m.connectReason; + if (o.oneofs) + d._connectReason = "connectReason"; } if (m.shards && m.shards.length) { d.shards = []; @@ -16539,78 +18974,126 @@ export const proto = $root.proto = (() => { } if (m.dnsSource != null && m.hasOwnProperty("dnsSource")) { d.dnsSource = $root.proto.ClientPayload.DNSSource.toObject(m.dnsSource, o); + if (o.oneofs) + d._dnsSource = "dnsSource"; } if (m.connectAttemptCount != null && m.hasOwnProperty("connectAttemptCount")) { d.connectAttemptCount = m.connectAttemptCount; + if (o.oneofs) + d._connectAttemptCount = "connectAttemptCount"; } if (m.device != null && m.hasOwnProperty("device")) { d.device = m.device; + if (o.oneofs) + d._device = "device"; } if (m.devicePairingData != null && m.hasOwnProperty("devicePairingData")) { d.devicePairingData = $root.proto.ClientPayload.DevicePairingRegistrationData.toObject(m.devicePairingData, o); + if (o.oneofs) + d._devicePairingData = "devicePairingData"; } if (m.product != null && m.hasOwnProperty("product")) { d.product = o.enums === String ? $root.proto.ClientPayload.Product[m.product] === undefined ? m.product : $root.proto.ClientPayload.Product[m.product] : m.product; + if (o.oneofs) + d._product = "product"; } if (m.fbCat != null && m.hasOwnProperty("fbCat")) { d.fbCat = o.bytes === String ? $util.base64.encode(m.fbCat, 0, m.fbCat.length) : o.bytes === Array ? Array.prototype.slice.call(m.fbCat) : m.fbCat; + if (o.oneofs) + d._fbCat = "fbCat"; } if (m.fbUserAgent != null && m.hasOwnProperty("fbUserAgent")) { d.fbUserAgent = o.bytes === String ? $util.base64.encode(m.fbUserAgent, 0, m.fbUserAgent.length) : o.bytes === Array ? Array.prototype.slice.call(m.fbUserAgent) : m.fbUserAgent; + if (o.oneofs) + d._fbUserAgent = "fbUserAgent"; } if (m.oc != null && m.hasOwnProperty("oc")) { d.oc = m.oc; + if (o.oneofs) + d._oc = "oc"; } if (m.lc != null && m.hasOwnProperty("lc")) { d.lc = m.lc; + if (o.oneofs) + d._lc = "lc"; } if (m.iosAppExtension != null && m.hasOwnProperty("iosAppExtension")) { d.iosAppExtension = o.enums === String ? $root.proto.ClientPayload.IOSAppExtension[m.iosAppExtension] === undefined ? m.iosAppExtension : $root.proto.ClientPayload.IOSAppExtension[m.iosAppExtension] : m.iosAppExtension; + if (o.oneofs) + d._iosAppExtension = "iosAppExtension"; } if (m.fbAppId != null && m.hasOwnProperty("fbAppId")) { if (typeof m.fbAppId === "number") d.fbAppId = o.longs === String ? String(m.fbAppId) : m.fbAppId; else d.fbAppId = o.longs === String ? longToString(m.fbAppId, true) : o.longs === Number ? longToNumber(m.fbAppId, true) : m.fbAppId; + if (o.oneofs) + d._fbAppId = "fbAppId"; } if (m.fbDeviceId != null && m.hasOwnProperty("fbDeviceId")) { d.fbDeviceId = o.bytes === String ? $util.base64.encode(m.fbDeviceId, 0, m.fbDeviceId.length) : o.bytes === Array ? Array.prototype.slice.call(m.fbDeviceId) : m.fbDeviceId; + if (o.oneofs) + d._fbDeviceId = "fbDeviceId"; } if (m.pull != null && m.hasOwnProperty("pull")) { d.pull = m.pull; + if (o.oneofs) + d._pull = "pull"; } if (m.paddingBytes != null && m.hasOwnProperty("paddingBytes")) { d.paddingBytes = o.bytes === String ? $util.base64.encode(m.paddingBytes, 0, m.paddingBytes.length) : o.bytes === Array ? Array.prototype.slice.call(m.paddingBytes) : m.paddingBytes; + if (o.oneofs) + d._paddingBytes = "paddingBytes"; } if (m.yearClass != null && m.hasOwnProperty("yearClass")) { d.yearClass = m.yearClass; + if (o.oneofs) + d._yearClass = "yearClass"; } if (m.memClass != null && m.hasOwnProperty("memClass")) { d.memClass = m.memClass; + if (o.oneofs) + d._memClass = "memClass"; } if (m.interopData != null && m.hasOwnProperty("interopData")) { d.interopData = $root.proto.ClientPayload.InteropData.toObject(m.interopData, o); + if (o.oneofs) + d._interopData = "interopData"; } if (m.trafficAnonymization != null && m.hasOwnProperty("trafficAnonymization")) { d.trafficAnonymization = o.enums === String ? $root.proto.ClientPayload.TrafficAnonymization[m.trafficAnonymization] === undefined ? m.trafficAnonymization : $root.proto.ClientPayload.TrafficAnonymization[m.trafficAnonymization] : m.trafficAnonymization; + if (o.oneofs) + d._trafficAnonymization = "trafficAnonymization"; } if (m.lidDbMigrated != null && m.hasOwnProperty("lidDbMigrated")) { d.lidDbMigrated = m.lidDbMigrated; + if (o.oneofs) + d._lidDbMigrated = "lidDbMigrated"; } if (m.accountType != null && m.hasOwnProperty("accountType")) { d.accountType = o.enums === String ? $root.proto.ClientPayload.AccountType[m.accountType] === undefined ? m.accountType : $root.proto.ClientPayload.AccountType[m.accountType] : m.accountType; + if (o.oneofs) + d._accountType = "accountType"; } if (m.connectionSequenceInfo != null && m.hasOwnProperty("connectionSequenceInfo")) { d.connectionSequenceInfo = m.connectionSequenceInfo; + if (o.oneofs) + d._connectionSequenceInfo = "connectionSequenceInfo"; } if (m.paaLink != null && m.hasOwnProperty("paaLink")) { d.paaLink = m.paaLink; + if (o.oneofs) + d._paaLink = "paaLink"; } if (m.preacksCount != null && m.hasOwnProperty("preacksCount")) { d.preacksCount = m.preacksCount; + if (o.oneofs) + d._preacksCount = "preacksCount"; } if (m.processingQueueSize != null && m.hasOwnProperty("processingQueueSize")) { d.processingQueueSize = m.processingQueueSize; + if (o.oneofs) + d._processingQueueSize = "processingQueueSize"; } return d; }; @@ -16674,8 +19157,22 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - DNSSource.prototype.dnsMethod = 0; - DNSSource.prototype.appCached = false; + DNSSource.prototype.dnsMethod = null; + DNSSource.prototype.appCached = null; + + let $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) + }); DNSSource.create = function create(properties) { return new DNSSource(properties); @@ -16770,15 +19267,15 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.dnsMethod = o.enums === String ? "SYSTEM" : 0; - d.appCached = false; - } if (m.dnsMethod != null && m.hasOwnProperty("dnsMethod")) { d.dnsMethod = o.enums === String ? $root.proto.ClientPayload.DNSSource.DNSResolutionMethod[m.dnsMethod] === undefined ? m.dnsMethod : $root.proto.ClientPayload.DNSSource.DNSResolutionMethod[m.dnsMethod] : m.dnsMethod; + if (o.oneofs) + d._dnsMethod = "dnsMethod"; } if (m.appCached != null && m.hasOwnProperty("appCached")) { d.appCached = m.appCached; + if (o.oneofs) + d._appCached = "appCached"; } return d; }; @@ -16819,14 +19316,64 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - DevicePairingRegistrationData.prototype.eRegid = $util.newBuffer([]); - DevicePairingRegistrationData.prototype.eKeytype = $util.newBuffer([]); - DevicePairingRegistrationData.prototype.eIdent = $util.newBuffer([]); - DevicePairingRegistrationData.prototype.eSkeyId = $util.newBuffer([]); - DevicePairingRegistrationData.prototype.eSkeyVal = $util.newBuffer([]); - DevicePairingRegistrationData.prototype.eSkeySig = $util.newBuffer([]); - DevicePairingRegistrationData.prototype.buildHash = $util.newBuffer([]); - DevicePairingRegistrationData.prototype.deviceProps = $util.newBuffer([]); + DevicePairingRegistrationData.prototype.eRegid = null; + DevicePairingRegistrationData.prototype.eKeytype = null; + DevicePairingRegistrationData.prototype.eIdent = null; + DevicePairingRegistrationData.prototype.eSkeyId = null; + DevicePairingRegistrationData.prototype.eSkeyVal = null; + DevicePairingRegistrationData.prototype.eSkeySig = null; + DevicePairingRegistrationData.prototype.buildHash = null; + DevicePairingRegistrationData.prototype.deviceProps = null; + + let $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) + }); DevicePairingRegistrationData.create = function create(properties) { return new DevicePairingRegistrationData(properties); @@ -16962,87 +19509,45 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - if (o.bytes === String) - d.eRegid = ""; - else { - d.eRegid = []; - if (o.bytes !== Array) - d.eRegid = $util.newBuffer(d.eRegid); - } - if (o.bytes === String) - d.eKeytype = ""; - else { - d.eKeytype = []; - if (o.bytes !== Array) - d.eKeytype = $util.newBuffer(d.eKeytype); - } - if (o.bytes === String) - d.eIdent = ""; - else { - d.eIdent = []; - if (o.bytes !== Array) - d.eIdent = $util.newBuffer(d.eIdent); - } - if (o.bytes === String) - d.eSkeyId = ""; - else { - d.eSkeyId = []; - if (o.bytes !== Array) - d.eSkeyId = $util.newBuffer(d.eSkeyId); - } - if (o.bytes === String) - d.eSkeyVal = ""; - else { - d.eSkeyVal = []; - if (o.bytes !== Array) - d.eSkeyVal = $util.newBuffer(d.eSkeyVal); - } - if (o.bytes === String) - d.eSkeySig = ""; - else { - d.eSkeySig = []; - if (o.bytes !== Array) - d.eSkeySig = $util.newBuffer(d.eSkeySig); - } - if (o.bytes === String) - d.buildHash = ""; - else { - d.buildHash = []; - if (o.bytes !== Array) - d.buildHash = $util.newBuffer(d.buildHash); - } - if (o.bytes === String) - d.deviceProps = ""; - else { - d.deviceProps = []; - if (o.bytes !== Array) - d.deviceProps = $util.newBuffer(d.deviceProps); - } - } if (m.eRegid != null && m.hasOwnProperty("eRegid")) { d.eRegid = o.bytes === String ? $util.base64.encode(m.eRegid, 0, m.eRegid.length) : o.bytes === Array ? Array.prototype.slice.call(m.eRegid) : m.eRegid; + if (o.oneofs) + d._eRegid = "eRegid"; } if (m.eKeytype != null && m.hasOwnProperty("eKeytype")) { d.eKeytype = o.bytes === String ? $util.base64.encode(m.eKeytype, 0, m.eKeytype.length) : o.bytes === Array ? Array.prototype.slice.call(m.eKeytype) : m.eKeytype; + if (o.oneofs) + d._eKeytype = "eKeytype"; } if (m.eIdent != null && m.hasOwnProperty("eIdent")) { d.eIdent = o.bytes === String ? $util.base64.encode(m.eIdent, 0, m.eIdent.length) : o.bytes === Array ? Array.prototype.slice.call(m.eIdent) : m.eIdent; + if (o.oneofs) + d._eIdent = "eIdent"; } if (m.eSkeyId != null && m.hasOwnProperty("eSkeyId")) { d.eSkeyId = o.bytes === String ? $util.base64.encode(m.eSkeyId, 0, m.eSkeyId.length) : o.bytes === Array ? Array.prototype.slice.call(m.eSkeyId) : m.eSkeyId; + if (o.oneofs) + d._eSkeyId = "eSkeyId"; } if (m.eSkeyVal != null && m.hasOwnProperty("eSkeyVal")) { d.eSkeyVal = o.bytes === String ? $util.base64.encode(m.eSkeyVal, 0, m.eSkeyVal.length) : o.bytes === Array ? Array.prototype.slice.call(m.eSkeyVal) : m.eSkeyVal; + if (o.oneofs) + d._eSkeyVal = "eSkeyVal"; } if (m.eSkeySig != null && m.hasOwnProperty("eSkeySig")) { d.eSkeySig = o.bytes === String ? $util.base64.encode(m.eSkeySig, 0, m.eSkeySig.length) : o.bytes === Array ? Array.prototype.slice.call(m.eSkeySig) : m.eSkeySig; + if (o.oneofs) + d._eSkeySig = "eSkeySig"; } if (m.buildHash != null && m.hasOwnProperty("buildHash")) { d.buildHash = o.bytes === String ? $util.base64.encode(m.buildHash, 0, m.buildHash.length) : o.bytes === Array ? Array.prototype.slice.call(m.buildHash) : m.buildHash; + if (o.oneofs) + d._buildHash = "buildHash"; } if (m.deviceProps != null && m.hasOwnProperty("deviceProps")) { d.deviceProps = o.bytes === String ? $util.base64.encode(m.deviceProps, 0, m.deviceProps.length) : o.bytes === Array ? Array.prototype.slice.call(m.deviceProps) : m.deviceProps; + if (o.oneofs) + d._deviceProps = "deviceProps"; } return d; }; @@ -17078,9 +19583,29 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - InteropData.prototype.accountId = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - InteropData.prototype.token = $util.newBuffer([]); - InteropData.prototype.enableReadReceipts = false; + InteropData.prototype.accountId = null; + InteropData.prototype.token = null; + InteropData.prototype.enableReadReceipts = null; + + let $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) + }); InteropData.create = function create(properties) { return new InteropData(properties); @@ -17157,32 +19682,23 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - if ($util.Long) { - var n = new $util.Long(0, 0, true); - d.accountId = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.accountId = o.longs === String ? "0" : 0; - if (o.bytes === String) - d.token = ""; - else { - d.token = []; - if (o.bytes !== Array) - d.token = $util.newBuffer(d.token); - } - d.enableReadReceipts = false; - } if (m.accountId != null && m.hasOwnProperty("accountId")) { if (typeof m.accountId === "number") d.accountId = o.longs === String ? String(m.accountId) : m.accountId; else d.accountId = o.longs === String ? longToString(m.accountId, true) : o.longs === Number ? longToNumber(m.accountId, true) : m.accountId; + if (o.oneofs) + d._accountId = "accountId"; } if (m.token != null && m.hasOwnProperty("token")) { d.token = o.bytes === String ? $util.base64.encode(m.token, 0, m.token.length) : o.bytes === Array ? Array.prototype.slice.call(m.token) : m.token; + if (o.oneofs) + d._token = "token"; } if (m.enableReadReceipts != null && m.hasOwnProperty("enableReadReceipts")) { d.enableReadReceipts = m.enableReadReceipts; + if (o.oneofs) + d._enableReadReceipts = "enableReadReceipts"; } return d; }; @@ -17227,22 +19743,120 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - UserAgent.prototype.platform = 0; + UserAgent.prototype.platform = null; UserAgent.prototype.appVersion = null; - UserAgent.prototype.mcc = ""; - UserAgent.prototype.mnc = ""; - UserAgent.prototype.osVersion = ""; - UserAgent.prototype.manufacturer = ""; - UserAgent.prototype.device = ""; - UserAgent.prototype.osBuildNumber = ""; - UserAgent.prototype.phoneId = ""; - UserAgent.prototype.releaseChannel = 0; - UserAgent.prototype.localeLanguageIso6391 = ""; - UserAgent.prototype.localeCountryIso31661Alpha2 = ""; - UserAgent.prototype.deviceBoard = ""; - UserAgent.prototype.deviceExpId = ""; - UserAgent.prototype.deviceType = 0; - UserAgent.prototype.deviceModelType = ""; + UserAgent.prototype.mcc = null; + UserAgent.prototype.mnc = null; + UserAgent.prototype.osVersion = null; + UserAgent.prototype.manufacturer = null; + UserAgent.prototype.device = null; + UserAgent.prototype.osBuildNumber = null; + UserAgent.prototype.phoneId = null; + UserAgent.prototype.releaseChannel = null; + UserAgent.prototype.localeLanguageIso6391 = null; + UserAgent.prototype.localeCountryIso31661Alpha2 = null; + UserAgent.prototype.deviceBoard = null; + UserAgent.prototype.deviceExpId = null; + UserAgent.prototype.deviceType = null; + UserAgent.prototype.deviceModelType = null; + + let $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) + }); UserAgent.create = function create(properties) { return new UserAgent(properties); @@ -17631,71 +20245,85 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.platform = o.enums === String ? "ANDROID" : 0; - d.appVersion = null; - d.mcc = ""; - d.mnc = ""; - d.osVersion = ""; - d.manufacturer = ""; - d.device = ""; - d.osBuildNumber = ""; - d.phoneId = ""; - d.releaseChannel = o.enums === String ? "RELEASE" : 0; - d.localeLanguageIso6391 = ""; - d.localeCountryIso31661Alpha2 = ""; - d.deviceBoard = ""; - d.deviceExpId = ""; - d.deviceType = o.enums === String ? "PHONE" : 0; - d.deviceModelType = ""; - } if (m.platform != null && m.hasOwnProperty("platform")) { d.platform = o.enums === String ? $root.proto.ClientPayload.UserAgent.Platform[m.platform] === undefined ? m.platform : $root.proto.ClientPayload.UserAgent.Platform[m.platform] : m.platform; + if (o.oneofs) + d._platform = "platform"; } if (m.appVersion != null && m.hasOwnProperty("appVersion")) { d.appVersion = $root.proto.ClientPayload.UserAgent.AppVersion.toObject(m.appVersion, o); + if (o.oneofs) + d._appVersion = "appVersion"; } if (m.mcc != null && m.hasOwnProperty("mcc")) { d.mcc = m.mcc; + if (o.oneofs) + d._mcc = "mcc"; } if (m.mnc != null && m.hasOwnProperty("mnc")) { d.mnc = m.mnc; + if (o.oneofs) + d._mnc = "mnc"; } if (m.osVersion != null && m.hasOwnProperty("osVersion")) { d.osVersion = m.osVersion; + if (o.oneofs) + d._osVersion = "osVersion"; } if (m.manufacturer != null && m.hasOwnProperty("manufacturer")) { d.manufacturer = m.manufacturer; + if (o.oneofs) + d._manufacturer = "manufacturer"; } if (m.device != null && m.hasOwnProperty("device")) { d.device = m.device; + if (o.oneofs) + d._device = "device"; } if (m.osBuildNumber != null && m.hasOwnProperty("osBuildNumber")) { d.osBuildNumber = m.osBuildNumber; + if (o.oneofs) + d._osBuildNumber = "osBuildNumber"; } if (m.phoneId != null && m.hasOwnProperty("phoneId")) { d.phoneId = m.phoneId; + if (o.oneofs) + d._phoneId = "phoneId"; } if (m.releaseChannel != null && m.hasOwnProperty("releaseChannel")) { d.releaseChannel = o.enums === String ? $root.proto.ClientPayload.UserAgent.ReleaseChannel[m.releaseChannel] === undefined ? m.releaseChannel : $root.proto.ClientPayload.UserAgent.ReleaseChannel[m.releaseChannel] : m.releaseChannel; + if (o.oneofs) + d._releaseChannel = "releaseChannel"; } if (m.localeLanguageIso6391 != null && m.hasOwnProperty("localeLanguageIso6391")) { d.localeLanguageIso6391 = m.localeLanguageIso6391; + if (o.oneofs) + d._localeLanguageIso6391 = "localeLanguageIso6391"; } if (m.localeCountryIso31661Alpha2 != null && m.hasOwnProperty("localeCountryIso31661Alpha2")) { d.localeCountryIso31661Alpha2 = m.localeCountryIso31661Alpha2; + if (o.oneofs) + d._localeCountryIso31661Alpha2 = "localeCountryIso31661Alpha2"; } if (m.deviceBoard != null && m.hasOwnProperty("deviceBoard")) { d.deviceBoard = m.deviceBoard; + if (o.oneofs) + d._deviceBoard = "deviceBoard"; } if (m.deviceExpId != null && m.hasOwnProperty("deviceExpId")) { d.deviceExpId = m.deviceExpId; + if (o.oneofs) + d._deviceExpId = "deviceExpId"; } if (m.deviceType != null && m.hasOwnProperty("deviceType")) { d.deviceType = o.enums === String ? $root.proto.ClientPayload.UserAgent.DeviceType[m.deviceType] === undefined ? m.deviceType : $root.proto.ClientPayload.UserAgent.DeviceType[m.deviceType] : m.deviceType; + if (o.oneofs) + d._deviceType = "deviceType"; } if (m.deviceModelType != null && m.hasOwnProperty("deviceModelType")) { d.deviceModelType = m.deviceModelType; + if (o.oneofs) + d._deviceModelType = "deviceModelType"; } return d; }; @@ -17720,11 +20348,43 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - AppVersion.prototype.primary = 0; - AppVersion.prototype.secondary = 0; - AppVersion.prototype.tertiary = 0; - AppVersion.prototype.quaternary = 0; - AppVersion.prototype.quinary = 0; + AppVersion.prototype.primary = null; + AppVersion.prototype.secondary = null; + AppVersion.prototype.tertiary = null; + AppVersion.prototype.quaternary = null; + AppVersion.prototype.quinary = null; + + let $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) + }); AppVersion.create = function create(properties) { return new AppVersion(properties); @@ -17809,27 +20469,30 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.primary = 0; - d.secondary = 0; - d.tertiary = 0; - d.quaternary = 0; - d.quinary = 0; - } if (m.primary != null && m.hasOwnProperty("primary")) { d.primary = m.primary; + if (o.oneofs) + d._primary = "primary"; } if (m.secondary != null && m.hasOwnProperty("secondary")) { d.secondary = m.secondary; + if (o.oneofs) + d._secondary = "secondary"; } if (m.tertiary != null && m.hasOwnProperty("tertiary")) { d.tertiary = m.tertiary; + if (o.oneofs) + d._tertiary = "tertiary"; } if (m.quaternary != null && m.hasOwnProperty("quaternary")) { d.quaternary = m.quaternary; + if (o.oneofs) + d._quaternary = "quaternary"; } if (m.quinary != null && m.hasOwnProperty("quinary")) { d.quinary = m.quinary; + if (o.oneofs) + d._quinary = "quinary"; } return d; }; @@ -17922,12 +20585,50 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - WebInfo.prototype.refToken = ""; - WebInfo.prototype.version = ""; + WebInfo.prototype.refToken = null; + WebInfo.prototype.version = null; WebInfo.prototype.webdPayload = null; - WebInfo.prototype.webSubPlatform = 0; - WebInfo.prototype.browser = ""; - WebInfo.prototype.browserVersion = ""; + WebInfo.prototype.webSubPlatform = null; + WebInfo.prototype.browser = null; + WebInfo.prototype.browserVersion = null; + + let $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) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebInfo.prototype, "_browser", { + get: $util.oneOfGetter($oneOfFields = ["browser"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebInfo.prototype, "_browserVersion", { + get: $util.oneOfGetter($oneOfFields = ["browserVersion"]), + set: $util.oneOfSetter($oneOfFields) + }); WebInfo.create = function create(properties) { return new WebInfo(properties); @@ -18052,31 +20753,35 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.refToken = ""; - d.version = ""; - d.webdPayload = null; - d.webSubPlatform = o.enums === String ? "WEB_BROWSER" : 0; - d.browser = ""; - d.browserVersion = ""; - } if (m.refToken != null && m.hasOwnProperty("refToken")) { d.refToken = m.refToken; + if (o.oneofs) + d._refToken = "refToken"; } if (m.version != null && m.hasOwnProperty("version")) { d.version = m.version; + if (o.oneofs) + d._version = "version"; } if (m.webdPayload != null && m.hasOwnProperty("webdPayload")) { d.webdPayload = $root.proto.ClientPayload.WebInfo.WebdPayload.toObject(m.webdPayload, o); + if (o.oneofs) + d._webdPayload = "webdPayload"; } if (m.webSubPlatform != null && m.hasOwnProperty("webSubPlatform")) { d.webSubPlatform = o.enums === String ? $root.proto.ClientPayload.WebInfo.WebSubPlatform[m.webSubPlatform] === undefined ? m.webSubPlatform : $root.proto.ClientPayload.WebInfo.WebSubPlatform[m.webSubPlatform] : m.webSubPlatform; + if (o.oneofs) + d._webSubPlatform = "webSubPlatform"; } if (m.browser != null && m.hasOwnProperty("browser")) { d.browser = m.browser; + if (o.oneofs) + d._browser = "browser"; } if (m.browserVersion != null && m.hasOwnProperty("browserVersion")) { d.browserVersion = m.browserVersion; + if (o.oneofs) + d._browserVersion = "browserVersion"; } return d; }; @@ -18112,17 +20817,85 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - WebdPayload.prototype.usesParticipantInKey = false; - WebdPayload.prototype.supportsStarredMessages = false; - WebdPayload.prototype.supportsDocumentMessages = false; - WebdPayload.prototype.supportsUrlMessages = false; - WebdPayload.prototype.supportsMediaRetry = false; - WebdPayload.prototype.supportsE2EImage = false; - WebdPayload.prototype.supportsE2EVideo = false; - WebdPayload.prototype.supportsE2EAudio = false; - WebdPayload.prototype.supportsE2EDocument = false; - WebdPayload.prototype.documentTypes = ""; - WebdPayload.prototype.features = $util.newBuffer([]); + WebdPayload.prototype.usesParticipantInKey = null; + WebdPayload.prototype.supportsStarredMessages = null; + WebdPayload.prototype.supportsDocumentMessages = null; + WebdPayload.prototype.supportsUrlMessages = null; + WebdPayload.prototype.supportsMediaRetry = null; + WebdPayload.prototype.supportsE2EImage = null; + WebdPayload.prototype.supportsE2EVideo = null; + WebdPayload.prototype.supportsE2EAudio = null; + WebdPayload.prototype.supportsE2EDocument = null; + WebdPayload.prototype.documentTypes = null; + WebdPayload.prototype.features = null; + + let $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) + }); WebdPayload.create = function create(properties) { return new WebdPayload(properties); @@ -18264,57 +21037,60 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.usesParticipantInKey = false; - d.supportsStarredMessages = false; - d.supportsDocumentMessages = false; - d.supportsUrlMessages = false; - d.supportsMediaRetry = false; - d.supportsE2EImage = false; - d.supportsE2EVideo = false; - d.supportsE2EAudio = false; - d.supportsE2EDocument = false; - d.documentTypes = ""; - if (o.bytes === String) - d.features = ""; - else { - d.features = []; - if (o.bytes !== Array) - d.features = $util.newBuffer(d.features); - } - } if (m.usesParticipantInKey != null && m.hasOwnProperty("usesParticipantInKey")) { d.usesParticipantInKey = m.usesParticipantInKey; + if (o.oneofs) + d._usesParticipantInKey = "usesParticipantInKey"; } if (m.supportsStarredMessages != null && m.hasOwnProperty("supportsStarredMessages")) { d.supportsStarredMessages = m.supportsStarredMessages; + if (o.oneofs) + d._supportsStarredMessages = "supportsStarredMessages"; } if (m.supportsDocumentMessages != null && m.hasOwnProperty("supportsDocumentMessages")) { d.supportsDocumentMessages = m.supportsDocumentMessages; + if (o.oneofs) + d._supportsDocumentMessages = "supportsDocumentMessages"; } if (m.supportsUrlMessages != null && m.hasOwnProperty("supportsUrlMessages")) { d.supportsUrlMessages = m.supportsUrlMessages; + if (o.oneofs) + d._supportsUrlMessages = "supportsUrlMessages"; } if (m.supportsMediaRetry != null && m.hasOwnProperty("supportsMediaRetry")) { d.supportsMediaRetry = m.supportsMediaRetry; + if (o.oneofs) + d._supportsMediaRetry = "supportsMediaRetry"; } if (m.supportsE2EImage != null && m.hasOwnProperty("supportsE2EImage")) { d.supportsE2EImage = m.supportsE2EImage; + if (o.oneofs) + d._supportsE2EImage = "supportsE2EImage"; } if (m.supportsE2EVideo != null && m.hasOwnProperty("supportsE2EVideo")) { d.supportsE2EVideo = m.supportsE2EVideo; + if (o.oneofs) + d._supportsE2EVideo = "supportsE2EVideo"; } if (m.supportsE2EAudio != null && m.hasOwnProperty("supportsE2EAudio")) { d.supportsE2EAudio = m.supportsE2EAudio; + if (o.oneofs) + d._supportsE2EAudio = "supportsE2EAudio"; } if (m.supportsE2EDocument != null && m.hasOwnProperty("supportsE2EDocument")) { d.supportsE2EDocument = m.supportsE2EDocument; + if (o.oneofs) + d._supportsE2EDocument = "supportsE2EDocument"; } if (m.documentTypes != null && m.hasOwnProperty("documentTypes")) { d.documentTypes = m.documentTypes; + if (o.oneofs) + d._documentTypes = "documentTypes"; } if (m.features != null && m.hasOwnProperty("features")) { d.features = o.bytes === String ? $util.base64.encode(m.features, 0, m.features.length) : o.bytes === Array ? Array.prototype.slice.call(m.features) : m.features; + if (o.oneofs) + d._features = "features"; } return d; }; @@ -18360,7 +21136,21 @@ export const proto = $root.proto = (() => { } CommentMetadata.prototype.commentParentKey = null; - CommentMetadata.prototype.replyCount = 0; + CommentMetadata.prototype.replyCount = null; + + let $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) + }); CommentMetadata.create = function create(properties) { return new CommentMetadata(properties); @@ -18420,15 +21210,15 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.commentParentKey = null; - d.replyCount = 0; - } if (m.commentParentKey != null && m.hasOwnProperty("commentParentKey")) { d.commentParentKey = $root.proto.MessageKey.toObject(m.commentParentKey, o); + if (o.oneofs) + d._commentParentKey = "commentParentKey"; } if (m.replyCount != null && m.hasOwnProperty("replyCount")) { d.replyCount = m.replyCount; + if (o.oneofs) + d._replyCount = "replyCount"; } return d; }; @@ -18456,7 +21246,15 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - CompanionCommitment.prototype.hash = $util.newBuffer([]); + CompanionCommitment.prototype.hash = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CompanionCommitment.prototype, "_hash", { + get: $util.oneOfGetter($oneOfFields = ["hash"]), + set: $util.oneOfSetter($oneOfFields) + }); CompanionCommitment.create = function create(properties) { return new CompanionCommitment(properties); @@ -18508,17 +21306,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - if (o.bytes === String) - d.hash = ""; - else { - d.hash = []; - if (o.bytes !== Array) - d.hash = $util.newBuffer(d.hash); - } - } if (m.hash != null && m.hasOwnProperty("hash")) { d.hash = o.bytes === String ? $util.base64.encode(m.hash, 0, m.hash.length) : o.bytes === Array ? Array.prototype.slice.call(m.hash) : m.hash; + if (o.oneofs) + d._hash = "hash"; } return d; }; @@ -18546,9 +21337,29 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - CompanionEphemeralIdentity.prototype.publicKey = $util.newBuffer([]); - CompanionEphemeralIdentity.prototype.deviceType = 0; - CompanionEphemeralIdentity.prototype.ref = ""; + CompanionEphemeralIdentity.prototype.publicKey = null; + CompanionEphemeralIdentity.prototype.deviceType = null; + CompanionEphemeralIdentity.prototype.ref = null; + + let $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) + }); CompanionEphemeralIdentity.create = function create(properties) { return new CompanionEphemeralIdentity(properties); @@ -18723,25 +21534,20 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - if (o.bytes === String) - d.publicKey = ""; - else { - d.publicKey = []; - if (o.bytes !== Array) - d.publicKey = $util.newBuffer(d.publicKey); - } - d.deviceType = o.enums === String ? "UNKNOWN" : 0; - d.ref = ""; - } if (m.publicKey != null && m.hasOwnProperty("publicKey")) { d.publicKey = o.bytes === String ? $util.base64.encode(m.publicKey, 0, m.publicKey.length) : o.bytes === Array ? Array.prototype.slice.call(m.publicKey) : m.publicKey; + if (o.oneofs) + d._publicKey = "publicKey"; } if (m.deviceType != null && m.hasOwnProperty("deviceType")) { d.deviceType = o.enums === String ? $root.proto.DeviceProps.PlatformType[m.deviceType] === undefined ? m.deviceType : $root.proto.DeviceProps.PlatformType[m.deviceType] : m.deviceType; + if (o.oneofs) + d._deviceType = "deviceType"; } if (m.ref != null && m.hasOwnProperty("ref")) { d.ref = m.ref; + if (o.oneofs) + d._ref = "ref"; } return d; }; @@ -18771,7 +21577,15 @@ export const proto = $root.proto = (() => { } Config.prototype.field = $util.emptyObject; - Config.prototype.version = 0; + Config.prototype.version = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Config.prototype, "_version", { + get: $util.oneOfGetter($oneOfFields = ["version"]), + set: $util.oneOfSetter($oneOfFields) + }); Config.create = function create(properties) { return new Config(properties); @@ -18862,9 +21676,6 @@ export const proto = $root.proto = (() => { if (o.objects || o.defaults) { d.field = {}; } - if (o.defaults) { - d.version = 0; - } var ks2; if (m.field && (ks2 = Object.keys(m.field)).length) { d.field = {}; @@ -18874,6 +21685,8 @@ export const proto = $root.proto = (() => { } if (m.version != null && m.hasOwnProperty("version")) { d.version = m.version; + if (o.oneofs) + d._version = "version"; } return d; }; @@ -18904,65 +21717,397 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - ContextInfo.prototype.stanzaId = ""; - ContextInfo.prototype.participant = ""; + ContextInfo.prototype.stanzaId = null; + ContextInfo.prototype.participant = null; ContextInfo.prototype.quotedMessage = null; - ContextInfo.prototype.remoteJid = ""; + ContextInfo.prototype.remoteJid = null; ContextInfo.prototype.mentionedJid = $util.emptyArray; - ContextInfo.prototype.conversionSource = ""; - ContextInfo.prototype.conversionData = $util.newBuffer([]); - ContextInfo.prototype.conversionDelaySeconds = 0; - ContextInfo.prototype.forwardingScore = 0; - ContextInfo.prototype.isForwarded = false; + ContextInfo.prototype.conversionSource = null; + ContextInfo.prototype.conversionData = null; + ContextInfo.prototype.conversionDelaySeconds = null; + ContextInfo.prototype.forwardingScore = null; + ContextInfo.prototype.isForwarded = null; ContextInfo.prototype.quotedAd = null; ContextInfo.prototype.placeholderKey = null; - ContextInfo.prototype.expiration = 0; - ContextInfo.prototype.ephemeralSettingTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - ContextInfo.prototype.ephemeralSharedSecret = $util.newBuffer([]); + ContextInfo.prototype.expiration = null; + ContextInfo.prototype.ephemeralSettingTimestamp = null; + ContextInfo.prototype.ephemeralSharedSecret = null; ContextInfo.prototype.externalAdReply = null; - ContextInfo.prototype.entryPointConversionSource = ""; - ContextInfo.prototype.entryPointConversionApp = ""; - ContextInfo.prototype.entryPointConversionDelaySeconds = 0; + ContextInfo.prototype.entryPointConversionSource = null; + ContextInfo.prototype.entryPointConversionApp = null; + ContextInfo.prototype.entryPointConversionDelaySeconds = null; ContextInfo.prototype.disappearingMode = null; ContextInfo.prototype.actionLink = null; - ContextInfo.prototype.groupSubject = ""; - ContextInfo.prototype.parentGroupJid = ""; - ContextInfo.prototype.trustBannerType = ""; - ContextInfo.prototype.trustBannerAction = 0; - ContextInfo.prototype.isSampled = false; + ContextInfo.prototype.groupSubject = null; + ContextInfo.prototype.parentGroupJid = null; + ContextInfo.prototype.trustBannerType = null; + ContextInfo.prototype.trustBannerAction = null; + ContextInfo.prototype.isSampled = null; ContextInfo.prototype.groupMentions = $util.emptyArray; ContextInfo.prototype.utm = null; ContextInfo.prototype.forwardedNewsletterMessageInfo = null; ContextInfo.prototype.businessMessageForwardInfo = null; - ContextInfo.prototype.smbClientCampaignId = ""; - ContextInfo.prototype.smbServerCampaignId = ""; + ContextInfo.prototype.smbClientCampaignId = null; + ContextInfo.prototype.smbServerCampaignId = null; ContextInfo.prototype.dataSharingContext = null; - ContextInfo.prototype.alwaysShowAdAttribution = false; + ContextInfo.prototype.alwaysShowAdAttribution = null; ContextInfo.prototype.featureEligibilities = null; - ContextInfo.prototype.entryPointConversionExternalSource = ""; - ContextInfo.prototype.entryPointConversionExternalMedium = ""; - ContextInfo.prototype.ctwaSignals = ""; - ContextInfo.prototype.ctwaPayload = $util.newBuffer([]); + ContextInfo.prototype.entryPointConversionExternalSource = null; + ContextInfo.prototype.entryPointConversionExternalMedium = null; + ContextInfo.prototype.ctwaSignals = null; + ContextInfo.prototype.ctwaPayload = null; ContextInfo.prototype.forwardedAiBotMessageInfo = null; - ContextInfo.prototype.statusAttributionType = 0; + ContextInfo.prototype.statusAttributionType = null; ContextInfo.prototype.urlTrackingMap = null; - ContextInfo.prototype.pairedMediaType = 0; - ContextInfo.prototype.rankingVersion = 0; + ContextInfo.prototype.pairedMediaType = null; + ContextInfo.prototype.rankingVersion = null; ContextInfo.prototype.memberLabel = null; - ContextInfo.prototype.isQuestion = false; - ContextInfo.prototype.statusSourceType = 0; + ContextInfo.prototype.isQuestion = null; + ContextInfo.prototype.statusSourceType = null; ContextInfo.prototype.statusAttributions = $util.emptyArray; - ContextInfo.prototype.isGroupStatus = false; - ContextInfo.prototype.forwardOrigin = 0; + ContextInfo.prototype.isGroupStatus = null; + ContextInfo.prototype.forwardOrigin = null; ContextInfo.prototype.questionReplyQuotedMessage = null; ContextInfo.prototype.statusAudienceMetadata = null; - ContextInfo.prototype.nonJidMentions = 0; - ContextInfo.prototype.quotedType = 0; + ContextInfo.prototype.nonJidMentions = null; + ContextInfo.prototype.quotedType = null; ContextInfo.prototype.botMessageSharingInfo = null; - ContextInfo.prototype.isSpoiler = false; + ContextInfo.prototype.isSpoiler = null; ContextInfo.prototype.mediaDomainInfo = null; ContextInfo.prototype.partiallySelectedContent = null; + let $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) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ContextInfo.prototype, "_memberLabel", { + get: $util.oneOfGetter($oneOfFields = ["memberLabel"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ContextInfo.prototype, "_isQuestion", { + get: $util.oneOfGetter($oneOfFields = ["isQuestion"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ContextInfo.prototype, "_statusSourceType", { + get: $util.oneOfGetter($oneOfFields = ["statusSourceType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ContextInfo.prototype, "_isGroupStatus", { + get: $util.oneOfGetter($oneOfFields = ["isGroupStatus"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ContextInfo.prototype, "_forwardOrigin", { + get: $util.oneOfGetter($oneOfFields = ["forwardOrigin"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ContextInfo.prototype, "_questionReplyQuotedMessage", { + get: $util.oneOfGetter($oneOfFields = ["questionReplyQuotedMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ContextInfo.prototype, "_statusAudienceMetadata", { + get: $util.oneOfGetter($oneOfFields = ["statusAudienceMetadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ContextInfo.prototype, "_nonJidMentions", { + get: $util.oneOfGetter($oneOfFields = ["nonJidMentions"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ContextInfo.prototype, "_quotedType", { + get: $util.oneOfGetter($oneOfFields = ["quotedType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ContextInfo.prototype, "_botMessageSharingInfo", { + get: $util.oneOfGetter($oneOfFields = ["botMessageSharingInfo"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ContextInfo.prototype, "_isSpoiler", { + get: $util.oneOfGetter($oneOfFields = ["isSpoiler"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ContextInfo.prototype, "_mediaDomainInfo", { + get: $util.oneOfGetter($oneOfFields = ["mediaDomainInfo"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ContextInfo.prototype, "_partiallySelectedContent", { + get: $util.oneOfGetter($oneOfFields = ["partiallySelectedContent"]), + set: $util.oneOfSetter($oneOfFields) + }); + ContextInfo.create = function create(properties) { return new ContextInfo(properties); }; @@ -19750,96 +22895,25 @@ export const proto = $root.proto = (() => { d.groupMentions = []; d.statusAttributions = []; } - if (o.defaults) { - d.stanzaId = ""; - d.participant = ""; - d.quotedMessage = null; - d.remoteJid = ""; - d.conversionSource = ""; - if (o.bytes === String) - d.conversionData = ""; - else { - d.conversionData = []; - if (o.bytes !== Array) - d.conversionData = $util.newBuffer(d.conversionData); - } - d.conversionDelaySeconds = 0; - d.forwardingScore = 0; - d.isForwarded = false; - d.quotedAd = null; - d.placeholderKey = null; - d.expiration = 0; - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.ephemeralSettingTimestamp = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.ephemeralSettingTimestamp = o.longs === String ? "0" : 0; - if (o.bytes === String) - d.ephemeralSharedSecret = ""; - else { - d.ephemeralSharedSecret = []; - if (o.bytes !== Array) - d.ephemeralSharedSecret = $util.newBuffer(d.ephemeralSharedSecret); - } - d.externalAdReply = null; - d.entryPointConversionSource = ""; - d.entryPointConversionApp = ""; - d.entryPointConversionDelaySeconds = 0; - d.disappearingMode = null; - d.actionLink = null; - d.groupSubject = ""; - d.parentGroupJid = ""; - d.trustBannerType = ""; - d.trustBannerAction = 0; - d.isSampled = false; - d.utm = null; - d.forwardedNewsletterMessageInfo = null; - d.businessMessageForwardInfo = null; - d.smbClientCampaignId = ""; - d.smbServerCampaignId = ""; - d.dataSharingContext = null; - d.alwaysShowAdAttribution = false; - d.featureEligibilities = null; - d.entryPointConversionExternalSource = ""; - d.entryPointConversionExternalMedium = ""; - d.ctwaSignals = ""; - if (o.bytes === String) - d.ctwaPayload = ""; - else { - d.ctwaPayload = []; - if (o.bytes !== Array) - d.ctwaPayload = $util.newBuffer(d.ctwaPayload); - } - d.forwardedAiBotMessageInfo = null; - d.statusAttributionType = o.enums === String ? "NONE" : 0; - d.urlTrackingMap = null; - d.pairedMediaType = o.enums === String ? "NOT_PAIRED_MEDIA" : 0; - d.rankingVersion = 0; - d.memberLabel = null; - d.isQuestion = false; - d.statusSourceType = o.enums === String ? "IMAGE" : 0; - d.isGroupStatus = false; - d.forwardOrigin = o.enums === String ? "UNKNOWN" : 0; - d.questionReplyQuotedMessage = null; - d.statusAudienceMetadata = null; - d.nonJidMentions = 0; - d.quotedType = o.enums === String ? "EXPLICIT" : 0; - d.botMessageSharingInfo = null; - d.isSpoiler = false; - d.mediaDomainInfo = null; - d.partiallySelectedContent = null; - } if (m.stanzaId != null && m.hasOwnProperty("stanzaId")) { d.stanzaId = m.stanzaId; + if (o.oneofs) + d._stanzaId = "stanzaId"; } if (m.participant != null && m.hasOwnProperty("participant")) { d.participant = m.participant; + if (o.oneofs) + d._participant = "participant"; } if (m.quotedMessage != null && m.hasOwnProperty("quotedMessage")) { d.quotedMessage = $root.proto.Message.toObject(m.quotedMessage, o); + if (o.oneofs) + d._quotedMessage = "quotedMessage"; } if (m.remoteJid != null && m.hasOwnProperty("remoteJid")) { d.remoteJid = m.remoteJid; + if (o.oneofs) + d._remoteJid = "remoteJid"; } if (m.mentionedJid && m.mentionedJid.length) { d.mentionedJid = []; @@ -19849,69 +22923,111 @@ export const proto = $root.proto = (() => { } if (m.conversionSource != null && m.hasOwnProperty("conversionSource")) { d.conversionSource = m.conversionSource; + if (o.oneofs) + d._conversionSource = "conversionSource"; } if (m.conversionData != null && m.hasOwnProperty("conversionData")) { d.conversionData = o.bytes === String ? $util.base64.encode(m.conversionData, 0, m.conversionData.length) : o.bytes === Array ? Array.prototype.slice.call(m.conversionData) : m.conversionData; + if (o.oneofs) + d._conversionData = "conversionData"; } if (m.conversionDelaySeconds != null && m.hasOwnProperty("conversionDelaySeconds")) { d.conversionDelaySeconds = m.conversionDelaySeconds; + if (o.oneofs) + d._conversionDelaySeconds = "conversionDelaySeconds"; } if (m.forwardingScore != null && m.hasOwnProperty("forwardingScore")) { d.forwardingScore = m.forwardingScore; + if (o.oneofs) + d._forwardingScore = "forwardingScore"; } if (m.isForwarded != null && m.hasOwnProperty("isForwarded")) { d.isForwarded = m.isForwarded; + if (o.oneofs) + d._isForwarded = "isForwarded"; } if (m.quotedAd != null && m.hasOwnProperty("quotedAd")) { d.quotedAd = $root.proto.ContextInfo.AdReplyInfo.toObject(m.quotedAd, o); + if (o.oneofs) + d._quotedAd = "quotedAd"; } if (m.placeholderKey != null && m.hasOwnProperty("placeholderKey")) { d.placeholderKey = $root.proto.MessageKey.toObject(m.placeholderKey, o); + if (o.oneofs) + d._placeholderKey = "placeholderKey"; } if (m.expiration != null && m.hasOwnProperty("expiration")) { d.expiration = m.expiration; + if (o.oneofs) + d._expiration = "expiration"; } if (m.ephemeralSettingTimestamp != null && m.hasOwnProperty("ephemeralSettingTimestamp")) { if (typeof m.ephemeralSettingTimestamp === "number") d.ephemeralSettingTimestamp = o.longs === String ? String(m.ephemeralSettingTimestamp) : m.ephemeralSettingTimestamp; else d.ephemeralSettingTimestamp = o.longs === String ? longToString(m.ephemeralSettingTimestamp) : o.longs === Number ? longToNumber(m.ephemeralSettingTimestamp) : m.ephemeralSettingTimestamp; + if (o.oneofs) + d._ephemeralSettingTimestamp = "ephemeralSettingTimestamp"; } if (m.ephemeralSharedSecret != null && m.hasOwnProperty("ephemeralSharedSecret")) { d.ephemeralSharedSecret = o.bytes === String ? $util.base64.encode(m.ephemeralSharedSecret, 0, m.ephemeralSharedSecret.length) : o.bytes === Array ? Array.prototype.slice.call(m.ephemeralSharedSecret) : m.ephemeralSharedSecret; + if (o.oneofs) + d._ephemeralSharedSecret = "ephemeralSharedSecret"; } if (m.externalAdReply != null && m.hasOwnProperty("externalAdReply")) { d.externalAdReply = $root.proto.ContextInfo.ExternalAdReplyInfo.toObject(m.externalAdReply, o); + if (o.oneofs) + d._externalAdReply = "externalAdReply"; } if (m.entryPointConversionSource != null && m.hasOwnProperty("entryPointConversionSource")) { d.entryPointConversionSource = m.entryPointConversionSource; + if (o.oneofs) + d._entryPointConversionSource = "entryPointConversionSource"; } if (m.entryPointConversionApp != null && m.hasOwnProperty("entryPointConversionApp")) { d.entryPointConversionApp = m.entryPointConversionApp; + if (o.oneofs) + d._entryPointConversionApp = "entryPointConversionApp"; } if (m.entryPointConversionDelaySeconds != null && m.hasOwnProperty("entryPointConversionDelaySeconds")) { d.entryPointConversionDelaySeconds = m.entryPointConversionDelaySeconds; + if (o.oneofs) + d._entryPointConversionDelaySeconds = "entryPointConversionDelaySeconds"; } if (m.disappearingMode != null && m.hasOwnProperty("disappearingMode")) { d.disappearingMode = $root.proto.DisappearingMode.toObject(m.disappearingMode, o); + if (o.oneofs) + d._disappearingMode = "disappearingMode"; } if (m.actionLink != null && m.hasOwnProperty("actionLink")) { d.actionLink = $root.proto.ActionLink.toObject(m.actionLink, o); + if (o.oneofs) + d._actionLink = "actionLink"; } if (m.groupSubject != null && m.hasOwnProperty("groupSubject")) { d.groupSubject = m.groupSubject; + if (o.oneofs) + d._groupSubject = "groupSubject"; } if (m.parentGroupJid != null && m.hasOwnProperty("parentGroupJid")) { d.parentGroupJid = m.parentGroupJid; + if (o.oneofs) + d._parentGroupJid = "parentGroupJid"; } if (m.trustBannerType != null && m.hasOwnProperty("trustBannerType")) { d.trustBannerType = m.trustBannerType; + if (o.oneofs) + d._trustBannerType = "trustBannerType"; } if (m.trustBannerAction != null && m.hasOwnProperty("trustBannerAction")) { d.trustBannerAction = m.trustBannerAction; + if (o.oneofs) + d._trustBannerAction = "trustBannerAction"; } if (m.isSampled != null && m.hasOwnProperty("isSampled")) { d.isSampled = m.isSampled; + if (o.oneofs) + d._isSampled = "isSampled"; } if (m.groupMentions && m.groupMentions.length) { d.groupMentions = []; @@ -19921,63 +23037,103 @@ export const proto = $root.proto = (() => { } if (m.utm != null && m.hasOwnProperty("utm")) { d.utm = $root.proto.ContextInfo.UTMInfo.toObject(m.utm, o); + if (o.oneofs) + d._utm = "utm"; } if (m.forwardedNewsletterMessageInfo != null && m.hasOwnProperty("forwardedNewsletterMessageInfo")) { d.forwardedNewsletterMessageInfo = $root.proto.ContextInfo.ForwardedNewsletterMessageInfo.toObject(m.forwardedNewsletterMessageInfo, o); + if (o.oneofs) + d._forwardedNewsletterMessageInfo = "forwardedNewsletterMessageInfo"; } if (m.businessMessageForwardInfo != null && m.hasOwnProperty("businessMessageForwardInfo")) { d.businessMessageForwardInfo = $root.proto.ContextInfo.BusinessMessageForwardInfo.toObject(m.businessMessageForwardInfo, o); + if (o.oneofs) + d._businessMessageForwardInfo = "businessMessageForwardInfo"; } if (m.smbClientCampaignId != null && m.hasOwnProperty("smbClientCampaignId")) { d.smbClientCampaignId = m.smbClientCampaignId; + if (o.oneofs) + d._smbClientCampaignId = "smbClientCampaignId"; } if (m.smbServerCampaignId != null && m.hasOwnProperty("smbServerCampaignId")) { d.smbServerCampaignId = m.smbServerCampaignId; + if (o.oneofs) + d._smbServerCampaignId = "smbServerCampaignId"; } if (m.dataSharingContext != null && m.hasOwnProperty("dataSharingContext")) { d.dataSharingContext = $root.proto.ContextInfo.DataSharingContext.toObject(m.dataSharingContext, o); + if (o.oneofs) + d._dataSharingContext = "dataSharingContext"; } if (m.alwaysShowAdAttribution != null && m.hasOwnProperty("alwaysShowAdAttribution")) { d.alwaysShowAdAttribution = m.alwaysShowAdAttribution; + if (o.oneofs) + d._alwaysShowAdAttribution = "alwaysShowAdAttribution"; } if (m.featureEligibilities != null && m.hasOwnProperty("featureEligibilities")) { d.featureEligibilities = $root.proto.ContextInfo.FeatureEligibilities.toObject(m.featureEligibilities, o); + if (o.oneofs) + d._featureEligibilities = "featureEligibilities"; } if (m.entryPointConversionExternalSource != null && m.hasOwnProperty("entryPointConversionExternalSource")) { d.entryPointConversionExternalSource = m.entryPointConversionExternalSource; + if (o.oneofs) + d._entryPointConversionExternalSource = "entryPointConversionExternalSource"; } if (m.entryPointConversionExternalMedium != null && m.hasOwnProperty("entryPointConversionExternalMedium")) { d.entryPointConversionExternalMedium = m.entryPointConversionExternalMedium; + if (o.oneofs) + d._entryPointConversionExternalMedium = "entryPointConversionExternalMedium"; } if (m.ctwaSignals != null && m.hasOwnProperty("ctwaSignals")) { d.ctwaSignals = m.ctwaSignals; + if (o.oneofs) + d._ctwaSignals = "ctwaSignals"; } if (m.ctwaPayload != null && m.hasOwnProperty("ctwaPayload")) { d.ctwaPayload = o.bytes === String ? $util.base64.encode(m.ctwaPayload, 0, m.ctwaPayload.length) : o.bytes === Array ? Array.prototype.slice.call(m.ctwaPayload) : m.ctwaPayload; + if (o.oneofs) + d._ctwaPayload = "ctwaPayload"; } if (m.forwardedAiBotMessageInfo != null && m.hasOwnProperty("forwardedAiBotMessageInfo")) { d.forwardedAiBotMessageInfo = $root.proto.ForwardedAIBotMessageInfo.toObject(m.forwardedAiBotMessageInfo, o); + if (o.oneofs) + d._forwardedAiBotMessageInfo = "forwardedAiBotMessageInfo"; } if (m.statusAttributionType != null && m.hasOwnProperty("statusAttributionType")) { d.statusAttributionType = o.enums === String ? $root.proto.ContextInfo.StatusAttributionType[m.statusAttributionType] === undefined ? m.statusAttributionType : $root.proto.ContextInfo.StatusAttributionType[m.statusAttributionType] : m.statusAttributionType; + if (o.oneofs) + d._statusAttributionType = "statusAttributionType"; } if (m.urlTrackingMap != null && m.hasOwnProperty("urlTrackingMap")) { d.urlTrackingMap = $root.proto.UrlTrackingMap.toObject(m.urlTrackingMap, o); + if (o.oneofs) + d._urlTrackingMap = "urlTrackingMap"; } if (m.pairedMediaType != null && m.hasOwnProperty("pairedMediaType")) { d.pairedMediaType = o.enums === String ? $root.proto.ContextInfo.PairedMediaType[m.pairedMediaType] === undefined ? m.pairedMediaType : $root.proto.ContextInfo.PairedMediaType[m.pairedMediaType] : m.pairedMediaType; + if (o.oneofs) + d._pairedMediaType = "pairedMediaType"; } if (m.rankingVersion != null && m.hasOwnProperty("rankingVersion")) { d.rankingVersion = m.rankingVersion; + if (o.oneofs) + d._rankingVersion = "rankingVersion"; } if (m.memberLabel != null && m.hasOwnProperty("memberLabel")) { d.memberLabel = $root.proto.MemberLabel.toObject(m.memberLabel, o); + if (o.oneofs) + d._memberLabel = "memberLabel"; } if (m.isQuestion != null && m.hasOwnProperty("isQuestion")) { d.isQuestion = m.isQuestion; + if (o.oneofs) + d._isQuestion = "isQuestion"; } if (m.statusSourceType != null && m.hasOwnProperty("statusSourceType")) { d.statusSourceType = o.enums === String ? $root.proto.ContextInfo.StatusSourceType[m.statusSourceType] === undefined ? m.statusSourceType : $root.proto.ContextInfo.StatusSourceType[m.statusSourceType] : m.statusSourceType; + if (o.oneofs) + d._statusSourceType = "statusSourceType"; } if (m.statusAttributions && m.statusAttributions.length) { d.statusAttributions = []; @@ -19987,33 +23143,53 @@ export const proto = $root.proto = (() => { } if (m.isGroupStatus != null && m.hasOwnProperty("isGroupStatus")) { d.isGroupStatus = m.isGroupStatus; + if (o.oneofs) + d._isGroupStatus = "isGroupStatus"; } if (m.forwardOrigin != null && m.hasOwnProperty("forwardOrigin")) { d.forwardOrigin = o.enums === String ? $root.proto.ContextInfo.ForwardOrigin[m.forwardOrigin] === undefined ? m.forwardOrigin : $root.proto.ContextInfo.ForwardOrigin[m.forwardOrigin] : m.forwardOrigin; + if (o.oneofs) + d._forwardOrigin = "forwardOrigin"; } if (m.questionReplyQuotedMessage != null && m.hasOwnProperty("questionReplyQuotedMessage")) { d.questionReplyQuotedMessage = $root.proto.ContextInfo.QuestionReplyQuotedMessage.toObject(m.questionReplyQuotedMessage, o); + if (o.oneofs) + d._questionReplyQuotedMessage = "questionReplyQuotedMessage"; } if (m.statusAudienceMetadata != null && m.hasOwnProperty("statusAudienceMetadata")) { d.statusAudienceMetadata = $root.proto.ContextInfo.StatusAudienceMetadata.toObject(m.statusAudienceMetadata, o); + if (o.oneofs) + d._statusAudienceMetadata = "statusAudienceMetadata"; } if (m.nonJidMentions != null && m.hasOwnProperty("nonJidMentions")) { d.nonJidMentions = m.nonJidMentions; + if (o.oneofs) + d._nonJidMentions = "nonJidMentions"; } if (m.quotedType != null && m.hasOwnProperty("quotedType")) { d.quotedType = o.enums === String ? $root.proto.ContextInfo.QuotedType[m.quotedType] === undefined ? m.quotedType : $root.proto.ContextInfo.QuotedType[m.quotedType] : m.quotedType; + if (o.oneofs) + d._quotedType = "quotedType"; } if (m.botMessageSharingInfo != null && m.hasOwnProperty("botMessageSharingInfo")) { d.botMessageSharingInfo = $root.proto.BotMessageSharingInfo.toObject(m.botMessageSharingInfo, o); + if (o.oneofs) + d._botMessageSharingInfo = "botMessageSharingInfo"; } if (m.isSpoiler != null && m.hasOwnProperty("isSpoiler")) { d.isSpoiler = m.isSpoiler; + if (o.oneofs) + d._isSpoiler = "isSpoiler"; } if (m.mediaDomainInfo != null && m.hasOwnProperty("mediaDomainInfo")) { d.mediaDomainInfo = $root.proto.MediaDomainInfo.toObject(m.mediaDomainInfo, o); + if (o.oneofs) + d._mediaDomainInfo = "mediaDomainInfo"; } if (m.partiallySelectedContent != null && m.hasOwnProperty("partiallySelectedContent")) { d.partiallySelectedContent = $root.proto.ContextInfo.PartiallySelectedContent.toObject(m.partiallySelectedContent, o); + if (o.oneofs) + d._partiallySelectedContent = "partiallySelectedContent"; } return d; }; @@ -20038,10 +23214,36 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - AdReplyInfo.prototype.advertiserName = ""; - AdReplyInfo.prototype.mediaType = 0; - AdReplyInfo.prototype.jpegThumbnail = $util.newBuffer([]); - AdReplyInfo.prototype.caption = ""; + AdReplyInfo.prototype.advertiserName = null; + AdReplyInfo.prototype.mediaType = null; + AdReplyInfo.prototype.jpegThumbnail = null; + AdReplyInfo.prototype.caption = null; + + let $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) + }); AdReplyInfo.create = function create(properties) { return new AdReplyInfo(properties); @@ -20137,29 +23339,25 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.advertiserName = ""; - d.mediaType = o.enums === String ? "NONE" : 0; - if (o.bytes === String) - d.jpegThumbnail = ""; - else { - d.jpegThumbnail = []; - if (o.bytes !== Array) - d.jpegThumbnail = $util.newBuffer(d.jpegThumbnail); - } - d.caption = ""; - } if (m.advertiserName != null && m.hasOwnProperty("advertiserName")) { d.advertiserName = m.advertiserName; + if (o.oneofs) + d._advertiserName = "advertiserName"; } if (m.mediaType != null && m.hasOwnProperty("mediaType")) { d.mediaType = o.enums === String ? $root.proto.ContextInfo.AdReplyInfo.MediaType[m.mediaType] === undefined ? m.mediaType : $root.proto.ContextInfo.AdReplyInfo.MediaType[m.mediaType] : m.mediaType; + if (o.oneofs) + d._mediaType = "mediaType"; } if (m.jpegThumbnail != null && m.hasOwnProperty("jpegThumbnail")) { d.jpegThumbnail = o.bytes === String ? $util.base64.encode(m.jpegThumbnail, 0, m.jpegThumbnail.length) : o.bytes === Array ? Array.prototype.slice.call(m.jpegThumbnail) : m.jpegThumbnail; + if (o.oneofs) + d._jpegThumbnail = "jpegThumbnail"; } if (m.caption != null && m.hasOwnProperty("caption")) { d.caption = m.caption; + if (o.oneofs) + d._caption = "caption"; } return d; }; @@ -20195,7 +23393,15 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - BusinessMessageForwardInfo.prototype.businessOwnerJid = ""; + BusinessMessageForwardInfo.prototype.businessOwnerJid = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BusinessMessageForwardInfo.prototype, "_businessOwnerJid", { + get: $util.oneOfGetter($oneOfFields = ["businessOwnerJid"]), + set: $util.oneOfSetter($oneOfFields) + }); BusinessMessageForwardInfo.create = function create(properties) { return new BusinessMessageForwardInfo(properties); @@ -20244,11 +23450,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.businessOwnerJid = ""; - } if (m.businessOwnerJid != null && m.hasOwnProperty("businessOwnerJid")) { d.businessOwnerJid = m.businessOwnerJid; + if (o.oneofs) + d._businessOwnerJid = "businessOwnerJid"; } return d; }; @@ -20277,10 +23482,30 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - DataSharingContext.prototype.showMmDisclosure = false; - DataSharingContext.prototype.encryptedSignalTokenConsented = ""; + DataSharingContext.prototype.showMmDisclosure = null; + DataSharingContext.prototype.encryptedSignalTokenConsented = null; DataSharingContext.prototype.parameters = $util.emptyArray; - DataSharingContext.prototype.dataSharingFlags = 0; + DataSharingContext.prototype.dataSharingFlags = null; + + let $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) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DataSharingContext.prototype, "_dataSharingFlags", { + get: $util.oneOfGetter($oneOfFields = ["dataSharingFlags"]), + set: $util.oneOfSetter($oneOfFields) + }); DataSharingContext.create = function create(properties) { return new DataSharingContext(properties); @@ -20370,16 +23595,15 @@ export const proto = $root.proto = (() => { if (o.arrays || o.defaults) { d.parameters = []; } - if (o.defaults) { - d.showMmDisclosure = false; - d.encryptedSignalTokenConsented = ""; - d.dataSharingFlags = 0; - } if (m.showMmDisclosure != null && m.hasOwnProperty("showMmDisclosure")) { d.showMmDisclosure = m.showMmDisclosure; + if (o.oneofs) + d._showMmDisclosure = "showMmDisclosure"; } if (m.encryptedSignalTokenConsented != null && m.hasOwnProperty("encryptedSignalTokenConsented")) { d.encryptedSignalTokenConsented = m.encryptedSignalTokenConsented; + if (o.oneofs) + d._encryptedSignalTokenConsented = "encryptedSignalTokenConsented"; } if (m.parameters && m.parameters.length) { d.parameters = []; @@ -20389,6 +23613,8 @@ export const proto = $root.proto = (() => { } if (m.dataSharingFlags != null && m.hasOwnProperty("dataSharingFlags")) { d.dataSharingFlags = m.dataSharingFlags; + if (o.oneofs) + d._dataSharingFlags = "dataSharingFlags"; } return d; }; @@ -20420,12 +23646,44 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - Parameters.prototype.key = ""; - Parameters.prototype.stringData = ""; - Parameters.prototype.intData = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - Parameters.prototype.floatData = 0; + Parameters.prototype.key = null; + Parameters.prototype.stringData = null; + Parameters.prototype.intData = null; + Parameters.prototype.floatData = null; Parameters.prototype.contents = null; + let $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) + }); + Parameters.create = function create(properties) { return new Parameters(properties); }; @@ -20518,34 +23776,33 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.key = ""; - d.stringData = ""; - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.intData = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.intData = o.longs === String ? "0" : 0; - d.floatData = 0; - d.contents = null; - } if (m.key != null && m.hasOwnProperty("key")) { d.key = m.key; + if (o.oneofs) + d._key = "key"; } if (m.stringData != null && m.hasOwnProperty("stringData")) { d.stringData = m.stringData; + if (o.oneofs) + d._stringData = "stringData"; } if (m.intData != null && m.hasOwnProperty("intData")) { if (typeof m.intData === "number") d.intData = o.longs === String ? String(m.intData) : m.intData; else d.intData = o.longs === String ? longToString(m.intData) : o.longs === Number ? longToNumber(m.intData) : m.intData; + if (o.oneofs) + d._intData = "intData"; } if (m.floatData != null && m.hasOwnProperty("floatData")) { d.floatData = o.json && !isFinite(m.floatData) ? String(m.floatData) : m.floatData; + if (o.oneofs) + d._floatData = "floatData"; } if (m.contents != null && m.hasOwnProperty("contents")) { d.contents = $root.proto.ContextInfo.DataSharingContext.Parameters.toObject(m.contents, o); + if (o.oneofs) + d._contents = "contents"; } return d; }; @@ -20576,33 +23833,197 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - ExternalAdReplyInfo.prototype.title = ""; - ExternalAdReplyInfo.prototype.body = ""; - ExternalAdReplyInfo.prototype.mediaType = 0; - ExternalAdReplyInfo.prototype.thumbnailUrl = ""; - ExternalAdReplyInfo.prototype.mediaUrl = ""; - ExternalAdReplyInfo.prototype.thumbnail = $util.newBuffer([]); - ExternalAdReplyInfo.prototype.sourceType = ""; - ExternalAdReplyInfo.prototype.sourceId = ""; - ExternalAdReplyInfo.prototype.sourceUrl = ""; - ExternalAdReplyInfo.prototype.containsAutoReply = false; - ExternalAdReplyInfo.prototype.renderLargerThumbnail = false; - ExternalAdReplyInfo.prototype.showAdAttribution = false; - ExternalAdReplyInfo.prototype.ctwaClid = ""; - ExternalAdReplyInfo.prototype.ref = ""; - ExternalAdReplyInfo.prototype.clickToWhatsappCall = false; - ExternalAdReplyInfo.prototype.adContextPreviewDismissed = false; - ExternalAdReplyInfo.prototype.sourceApp = ""; - ExternalAdReplyInfo.prototype.automatedGreetingMessageShown = false; - ExternalAdReplyInfo.prototype.greetingMessageBody = ""; - ExternalAdReplyInfo.prototype.ctaPayload = ""; - ExternalAdReplyInfo.prototype.disableNudge = false; - ExternalAdReplyInfo.prototype.originalImageUrl = ""; - ExternalAdReplyInfo.prototype.automatedGreetingMessageCtaType = ""; - ExternalAdReplyInfo.prototype.wtwaAdFormat = false; - ExternalAdReplyInfo.prototype.adType = 0; - ExternalAdReplyInfo.prototype.wtwaWebsiteUrl = ""; - ExternalAdReplyInfo.prototype.adPreviewUrl = ""; + ExternalAdReplyInfo.prototype.title = null; + ExternalAdReplyInfo.prototype.body = null; + ExternalAdReplyInfo.prototype.mediaType = null; + ExternalAdReplyInfo.prototype.thumbnailUrl = null; + ExternalAdReplyInfo.prototype.mediaUrl = null; + ExternalAdReplyInfo.prototype.thumbnail = null; + ExternalAdReplyInfo.prototype.sourceType = null; + ExternalAdReplyInfo.prototype.sourceId = null; + ExternalAdReplyInfo.prototype.sourceUrl = null; + ExternalAdReplyInfo.prototype.containsAutoReply = null; + ExternalAdReplyInfo.prototype.renderLargerThumbnail = null; + ExternalAdReplyInfo.prototype.showAdAttribution = null; + ExternalAdReplyInfo.prototype.ctwaClid = null; + ExternalAdReplyInfo.prototype.ref = null; + ExternalAdReplyInfo.prototype.clickToWhatsappCall = null; + ExternalAdReplyInfo.prototype.adContextPreviewDismissed = null; + ExternalAdReplyInfo.prototype.sourceApp = null; + ExternalAdReplyInfo.prototype.automatedGreetingMessageShown = null; + ExternalAdReplyInfo.prototype.greetingMessageBody = null; + ExternalAdReplyInfo.prototype.ctaPayload = null; + ExternalAdReplyInfo.prototype.disableNudge = null; + ExternalAdReplyInfo.prototype.originalImageUrl = null; + ExternalAdReplyInfo.prototype.automatedGreetingMessageCtaType = null; + ExternalAdReplyInfo.prototype.wtwaAdFormat = null; + ExternalAdReplyInfo.prototype.adType = null; + ExternalAdReplyInfo.prototype.wtwaWebsiteUrl = null; + ExternalAdReplyInfo.prototype.adPreviewUrl = null; + + let $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) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ExternalAdReplyInfo.prototype, "_automatedGreetingMessageCtaType", { + get: $util.oneOfGetter($oneOfFields = ["automatedGreetingMessageCtaType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ExternalAdReplyInfo.prototype, "_wtwaAdFormat", { + get: $util.oneOfGetter($oneOfFields = ["wtwaAdFormat"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ExternalAdReplyInfo.prototype, "_adType", { + get: $util.oneOfGetter($oneOfFields = ["adType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ExternalAdReplyInfo.prototype, "_wtwaWebsiteUrl", { + get: $util.oneOfGetter($oneOfFields = ["wtwaWebsiteUrl"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ExternalAdReplyInfo.prototype, "_adPreviewUrl", { + get: $util.oneOfGetter($oneOfFields = ["adPreviewUrl"]), + set: $util.oneOfSetter($oneOfFields) + }); ExternalAdReplyInfo.create = function create(properties) { return new ExternalAdReplyInfo(properties); @@ -20918,121 +24339,140 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.title = ""; - d.body = ""; - d.mediaType = o.enums === String ? "NONE" : 0; - d.thumbnailUrl = ""; - d.mediaUrl = ""; - if (o.bytes === String) - d.thumbnail = ""; - else { - d.thumbnail = []; - if (o.bytes !== Array) - d.thumbnail = $util.newBuffer(d.thumbnail); - } - d.sourceType = ""; - d.sourceId = ""; - d.sourceUrl = ""; - d.containsAutoReply = false; - d.renderLargerThumbnail = false; - d.showAdAttribution = false; - d.ctwaClid = ""; - d.ref = ""; - d.clickToWhatsappCall = false; - d.adContextPreviewDismissed = false; - d.sourceApp = ""; - d.automatedGreetingMessageShown = false; - d.greetingMessageBody = ""; - d.ctaPayload = ""; - d.disableNudge = false; - d.originalImageUrl = ""; - d.automatedGreetingMessageCtaType = ""; - d.wtwaAdFormat = false; - d.adType = o.enums === String ? "CTWA" : 0; - d.wtwaWebsiteUrl = ""; - d.adPreviewUrl = ""; - } if (m.title != null && m.hasOwnProperty("title")) { d.title = m.title; + if (o.oneofs) + d._title = "title"; } if (m.body != null && m.hasOwnProperty("body")) { d.body = m.body; + if (o.oneofs) + d._body = "body"; } if (m.mediaType != null && m.hasOwnProperty("mediaType")) { d.mediaType = o.enums === String ? $root.proto.ContextInfo.ExternalAdReplyInfo.MediaType[m.mediaType] === undefined ? m.mediaType : $root.proto.ContextInfo.ExternalAdReplyInfo.MediaType[m.mediaType] : m.mediaType; + if (o.oneofs) + d._mediaType = "mediaType"; } if (m.thumbnailUrl != null && m.hasOwnProperty("thumbnailUrl")) { d.thumbnailUrl = m.thumbnailUrl; + if (o.oneofs) + d._thumbnailUrl = "thumbnailUrl"; } if (m.mediaUrl != null && m.hasOwnProperty("mediaUrl")) { d.mediaUrl = m.mediaUrl; + if (o.oneofs) + d._mediaUrl = "mediaUrl"; } if (m.thumbnail != null && m.hasOwnProperty("thumbnail")) { d.thumbnail = o.bytes === String ? $util.base64.encode(m.thumbnail, 0, m.thumbnail.length) : o.bytes === Array ? Array.prototype.slice.call(m.thumbnail) : m.thumbnail; + if (o.oneofs) + d._thumbnail = "thumbnail"; } if (m.sourceType != null && m.hasOwnProperty("sourceType")) { d.sourceType = m.sourceType; + if (o.oneofs) + d._sourceType = "sourceType"; } if (m.sourceId != null && m.hasOwnProperty("sourceId")) { d.sourceId = m.sourceId; + if (o.oneofs) + d._sourceId = "sourceId"; } if (m.sourceUrl != null && m.hasOwnProperty("sourceUrl")) { d.sourceUrl = m.sourceUrl; + if (o.oneofs) + d._sourceUrl = "sourceUrl"; } if (m.containsAutoReply != null && m.hasOwnProperty("containsAutoReply")) { d.containsAutoReply = m.containsAutoReply; + if (o.oneofs) + d._containsAutoReply = "containsAutoReply"; } if (m.renderLargerThumbnail != null && m.hasOwnProperty("renderLargerThumbnail")) { d.renderLargerThumbnail = m.renderLargerThumbnail; + if (o.oneofs) + d._renderLargerThumbnail = "renderLargerThumbnail"; } if (m.showAdAttribution != null && m.hasOwnProperty("showAdAttribution")) { d.showAdAttribution = m.showAdAttribution; + if (o.oneofs) + d._showAdAttribution = "showAdAttribution"; } if (m.ctwaClid != null && m.hasOwnProperty("ctwaClid")) { d.ctwaClid = m.ctwaClid; + if (o.oneofs) + d._ctwaClid = "ctwaClid"; } if (m.ref != null && m.hasOwnProperty("ref")) { d.ref = m.ref; + if (o.oneofs) + d._ref = "ref"; } if (m.clickToWhatsappCall != null && m.hasOwnProperty("clickToWhatsappCall")) { d.clickToWhatsappCall = m.clickToWhatsappCall; + if (o.oneofs) + d._clickToWhatsappCall = "clickToWhatsappCall"; } if (m.adContextPreviewDismissed != null && m.hasOwnProperty("adContextPreviewDismissed")) { d.adContextPreviewDismissed = m.adContextPreviewDismissed; + if (o.oneofs) + d._adContextPreviewDismissed = "adContextPreviewDismissed"; } if (m.sourceApp != null && m.hasOwnProperty("sourceApp")) { d.sourceApp = m.sourceApp; + if (o.oneofs) + d._sourceApp = "sourceApp"; } if (m.automatedGreetingMessageShown != null && m.hasOwnProperty("automatedGreetingMessageShown")) { d.automatedGreetingMessageShown = m.automatedGreetingMessageShown; + if (o.oneofs) + d._automatedGreetingMessageShown = "automatedGreetingMessageShown"; } if (m.greetingMessageBody != null && m.hasOwnProperty("greetingMessageBody")) { d.greetingMessageBody = m.greetingMessageBody; + if (o.oneofs) + d._greetingMessageBody = "greetingMessageBody"; } if (m.ctaPayload != null && m.hasOwnProperty("ctaPayload")) { d.ctaPayload = m.ctaPayload; + if (o.oneofs) + d._ctaPayload = "ctaPayload"; } if (m.disableNudge != null && m.hasOwnProperty("disableNudge")) { d.disableNudge = m.disableNudge; + if (o.oneofs) + d._disableNudge = "disableNudge"; } if (m.originalImageUrl != null && m.hasOwnProperty("originalImageUrl")) { d.originalImageUrl = m.originalImageUrl; + if (o.oneofs) + d._originalImageUrl = "originalImageUrl"; } if (m.automatedGreetingMessageCtaType != null && m.hasOwnProperty("automatedGreetingMessageCtaType")) { d.automatedGreetingMessageCtaType = m.automatedGreetingMessageCtaType; + if (o.oneofs) + d._automatedGreetingMessageCtaType = "automatedGreetingMessageCtaType"; } if (m.wtwaAdFormat != null && m.hasOwnProperty("wtwaAdFormat")) { d.wtwaAdFormat = m.wtwaAdFormat; + if (o.oneofs) + d._wtwaAdFormat = "wtwaAdFormat"; } if (m.adType != null && m.hasOwnProperty("adType")) { d.adType = o.enums === String ? $root.proto.ContextInfo.ExternalAdReplyInfo.AdType[m.adType] === undefined ? m.adType : $root.proto.ContextInfo.ExternalAdReplyInfo.AdType[m.adType] : m.adType; + if (o.oneofs) + d._adType = "adType"; } if (m.wtwaWebsiteUrl != null && m.hasOwnProperty("wtwaWebsiteUrl")) { d.wtwaWebsiteUrl = m.wtwaWebsiteUrl; + if (o.oneofs) + d._wtwaWebsiteUrl = "wtwaWebsiteUrl"; } if (m.adPreviewUrl != null && m.hasOwnProperty("adPreviewUrl")) { d.adPreviewUrl = m.adPreviewUrl; + if (o.oneofs) + d._adPreviewUrl = "adPreviewUrl"; } return d; }; @@ -21075,11 +24515,43 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - FeatureEligibilities.prototype.cannotBeReactedTo = false; - FeatureEligibilities.prototype.cannotBeRanked = false; - FeatureEligibilities.prototype.canRequestFeedback = false; - FeatureEligibilities.prototype.canBeReshared = false; - FeatureEligibilities.prototype.canReceiveMultiReact = false; + FeatureEligibilities.prototype.cannotBeReactedTo = null; + FeatureEligibilities.prototype.cannotBeRanked = null; + FeatureEligibilities.prototype.canRequestFeedback = null; + FeatureEligibilities.prototype.canBeReshared = null; + FeatureEligibilities.prototype.canReceiveMultiReact = null; + + let $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) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(FeatureEligibilities.prototype, "_canReceiveMultiReact", { + get: $util.oneOfGetter($oneOfFields = ["canReceiveMultiReact"]), + set: $util.oneOfSetter($oneOfFields) + }); FeatureEligibilities.create = function create(properties) { return new FeatureEligibilities(properties); @@ -21164,27 +24636,30 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.cannotBeReactedTo = false; - d.cannotBeRanked = false; - d.canRequestFeedback = false; - d.canBeReshared = false; - d.canReceiveMultiReact = false; - } if (m.cannotBeReactedTo != null && m.hasOwnProperty("cannotBeReactedTo")) { d.cannotBeReactedTo = m.cannotBeReactedTo; + if (o.oneofs) + d._cannotBeReactedTo = "cannotBeReactedTo"; } if (m.cannotBeRanked != null && m.hasOwnProperty("cannotBeRanked")) { d.cannotBeRanked = m.cannotBeRanked; + if (o.oneofs) + d._cannotBeRanked = "cannotBeRanked"; } if (m.canRequestFeedback != null && m.hasOwnProperty("canRequestFeedback")) { d.canRequestFeedback = m.canRequestFeedback; + if (o.oneofs) + d._canRequestFeedback = "canRequestFeedback"; } if (m.canBeReshared != null && m.hasOwnProperty("canBeReshared")) { d.canBeReshared = m.canBeReshared; + if (o.oneofs) + d._canBeReshared = "canBeReshared"; } if (m.canReceiveMultiReact != null && m.hasOwnProperty("canReceiveMultiReact")) { d.canReceiveMultiReact = m.canReceiveMultiReact; + if (o.oneofs) + d._canReceiveMultiReact = "canReceiveMultiReact"; } return d; }; @@ -21223,12 +24698,50 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - ForwardedNewsletterMessageInfo.prototype.newsletterJid = ""; - ForwardedNewsletterMessageInfo.prototype.serverMessageId = 0; - ForwardedNewsletterMessageInfo.prototype.newsletterName = ""; - ForwardedNewsletterMessageInfo.prototype.contentType = 1; - ForwardedNewsletterMessageInfo.prototype.accessibilityText = ""; - ForwardedNewsletterMessageInfo.prototype.profileName = ""; + ForwardedNewsletterMessageInfo.prototype.newsletterJid = null; + ForwardedNewsletterMessageInfo.prototype.serverMessageId = null; + ForwardedNewsletterMessageInfo.prototype.newsletterName = null; + ForwardedNewsletterMessageInfo.prototype.contentType = null; + ForwardedNewsletterMessageInfo.prototype.accessibilityText = null; + ForwardedNewsletterMessageInfo.prototype.profileName = null; + + let $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) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ForwardedNewsletterMessageInfo.prototype, "_profileName", { + get: $util.oneOfGetter($oneOfFields = ["profileName"]), + set: $util.oneOfSetter($oneOfFields) + }); ForwardedNewsletterMessageInfo.create = function create(properties) { return new ForwardedNewsletterMessageInfo(properties); @@ -21339,31 +24852,35 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.newsletterJid = ""; - d.serverMessageId = 0; - d.newsletterName = ""; - d.contentType = o.enums === String ? "UPDATE" : 1; - d.accessibilityText = ""; - d.profileName = ""; - } if (m.newsletterJid != null && m.hasOwnProperty("newsletterJid")) { d.newsletterJid = m.newsletterJid; + if (o.oneofs) + d._newsletterJid = "newsletterJid"; } if (m.serverMessageId != null && m.hasOwnProperty("serverMessageId")) { d.serverMessageId = m.serverMessageId; + if (o.oneofs) + d._serverMessageId = "serverMessageId"; } if (m.newsletterName != null && m.hasOwnProperty("newsletterName")) { d.newsletterName = m.newsletterName; + if (o.oneofs) + d._newsletterName = "newsletterName"; } if (m.contentType != null && m.hasOwnProperty("contentType")) { d.contentType = o.enums === String ? $root.proto.ContextInfo.ForwardedNewsletterMessageInfo.ContentType[m.contentType] === undefined ? m.contentType : $root.proto.ContextInfo.ForwardedNewsletterMessageInfo.ContentType[m.contentType] : m.contentType; + if (o.oneofs) + d._contentType = "contentType"; } if (m.accessibilityText != null && m.hasOwnProperty("accessibilityText")) { d.accessibilityText = m.accessibilityText; + if (o.oneofs) + d._accessibilityText = "accessibilityText"; } if (m.profileName != null && m.hasOwnProperty("profileName")) { d.profileName = m.profileName; + if (o.oneofs) + d._profileName = "profileName"; } return d; }; @@ -21413,7 +24930,15 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - PartiallySelectedContent.prototype.text = ""; + PartiallySelectedContent.prototype.text = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PartiallySelectedContent.prototype, "_text", { + get: $util.oneOfGetter($oneOfFields = ["text"]), + set: $util.oneOfSetter($oneOfFields) + }); PartiallySelectedContent.create = function create(properties) { return new PartiallySelectedContent(properties); @@ -21462,11 +24987,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.text = ""; - } if (m.text != null && m.hasOwnProperty("text")) { d.text = m.text; + if (o.oneofs) + d._text = "text"; } return d; }; @@ -21494,10 +25018,30 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - QuestionReplyQuotedMessage.prototype.serverQuestionId = 0; + QuestionReplyQuotedMessage.prototype.serverQuestionId = null; QuestionReplyQuotedMessage.prototype.quotedQuestion = null; QuestionReplyQuotedMessage.prototype.quotedResponse = null; + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(QuestionReplyQuotedMessage.prototype, "_serverQuestionId", { + get: $util.oneOfGetter($oneOfFields = ["serverQuestionId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(QuestionReplyQuotedMessage.prototype, "_quotedQuestion", { + get: $util.oneOfGetter($oneOfFields = ["quotedQuestion"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(QuestionReplyQuotedMessage.prototype, "_quotedResponse", { + get: $util.oneOfGetter($oneOfFields = ["quotedResponse"]), + set: $util.oneOfSetter($oneOfFields) + }); + QuestionReplyQuotedMessage.create = function create(properties) { return new QuestionReplyQuotedMessage(properties); }; @@ -21567,19 +25111,20 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.serverQuestionId = 0; - d.quotedQuestion = null; - d.quotedResponse = null; - } if (m.serverQuestionId != null && m.hasOwnProperty("serverQuestionId")) { d.serverQuestionId = m.serverQuestionId; + if (o.oneofs) + d._serverQuestionId = "serverQuestionId"; } if (m.quotedQuestion != null && m.hasOwnProperty("quotedQuestion")) { d.quotedQuestion = $root.proto.Message.toObject(m.quotedQuestion, o); + if (o.oneofs) + d._quotedQuestion = "quotedQuestion"; } if (m.quotedResponse != null && m.hasOwnProperty("quotedResponse")) { d.quotedResponse = $root.proto.Message.toObject(m.quotedResponse, o); + if (o.oneofs) + d._quotedResponse = "quotedResponse"; } return d; }; @@ -21624,9 +25169,29 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - StatusAudienceMetadata.prototype.audienceType = 0; - StatusAudienceMetadata.prototype.listName = ""; - StatusAudienceMetadata.prototype.listEmoji = ""; + StatusAudienceMetadata.prototype.audienceType = null; + StatusAudienceMetadata.prototype.listName = null; + StatusAudienceMetadata.prototype.listEmoji = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StatusAudienceMetadata.prototype, "_audienceType", { + get: $util.oneOfGetter($oneOfFields = ["audienceType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StatusAudienceMetadata.prototype, "_listName", { + get: $util.oneOfGetter($oneOfFields = ["listName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StatusAudienceMetadata.prototype, "_listEmoji", { + get: $util.oneOfGetter($oneOfFields = ["listEmoji"]), + set: $util.oneOfSetter($oneOfFields) + }); StatusAudienceMetadata.create = function create(properties) { return new StatusAudienceMetadata(properties); @@ -21706,19 +25271,20 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.audienceType = o.enums === String ? "UNKNOWN" : 0; - d.listName = ""; - d.listEmoji = ""; - } if (m.audienceType != null && m.hasOwnProperty("audienceType")) { d.audienceType = o.enums === String ? $root.proto.ContextInfo.StatusAudienceMetadata.AudienceType[m.audienceType] === undefined ? m.audienceType : $root.proto.ContextInfo.StatusAudienceMetadata.AudienceType[m.audienceType] : m.audienceType; + if (o.oneofs) + d._audienceType = "audienceType"; } if (m.listName != null && m.hasOwnProperty("listName")) { d.listName = m.listName; + if (o.oneofs) + d._listName = "listName"; } if (m.listEmoji != null && m.hasOwnProperty("listEmoji")) { d.listEmoji = m.listEmoji; + if (o.oneofs) + d._listEmoji = "listEmoji"; } return d; }; @@ -21764,8 +25330,22 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - UTMInfo.prototype.utmSource = ""; - UTMInfo.prototype.utmCampaign = ""; + UTMInfo.prototype.utmSource = null; + UTMInfo.prototype.utmCampaign = null; + + let $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) + }); UTMInfo.create = function create(properties) { return new UTMInfo(properties); @@ -21823,15 +25403,15 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.utmSource = ""; - d.utmCampaign = ""; - } if (m.utmSource != null && m.hasOwnProperty("utmSource")) { d.utmSource = m.utmSource; + if (o.oneofs) + d._utmSource = "utmSource"; } if (m.utmCampaign != null && m.hasOwnProperty("utmCampaign")) { d.utmCampaign = m.utmCampaign; + if (o.oneofs) + d._utmCampaign = "utmCampaign"; } return d; }; @@ -21864,60 +25444,374 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - Conversation.prototype.id = ""; + Conversation.prototype.id = null; Conversation.prototype.messages = $util.emptyArray; - Conversation.prototype.newJid = ""; - Conversation.prototype.oldJid = ""; - Conversation.prototype.lastMsgTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - Conversation.prototype.unreadCount = 0; - Conversation.prototype.readOnly = false; - Conversation.prototype.endOfHistoryTransfer = false; - Conversation.prototype.ephemeralExpiration = 0; - Conversation.prototype.ephemeralSettingTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - Conversation.prototype.endOfHistoryTransferType = 0; - Conversation.prototype.conversationTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - Conversation.prototype.name = ""; - Conversation.prototype.pHash = ""; - Conversation.prototype.notSpam = false; - Conversation.prototype.archived = false; + Conversation.prototype.newJid = null; + Conversation.prototype.oldJid = null; + Conversation.prototype.lastMsgTimestamp = null; + Conversation.prototype.unreadCount = null; + Conversation.prototype.readOnly = null; + Conversation.prototype.endOfHistoryTransfer = null; + Conversation.prototype.ephemeralExpiration = null; + Conversation.prototype.ephemeralSettingTimestamp = null; + Conversation.prototype.endOfHistoryTransferType = null; + Conversation.prototype.conversationTimestamp = null; + Conversation.prototype.name = null; + Conversation.prototype.pHash = null; + Conversation.prototype.notSpam = null; + Conversation.prototype.archived = null; Conversation.prototype.disappearingMode = null; - Conversation.prototype.unreadMentionCount = 0; - Conversation.prototype.markedAsUnread = false; + Conversation.prototype.unreadMentionCount = null; + Conversation.prototype.markedAsUnread = null; Conversation.prototype.participant = $util.emptyArray; - Conversation.prototype.tcToken = $util.newBuffer([]); - Conversation.prototype.tcTokenTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - Conversation.prototype.contactPrimaryIdentityKey = $util.newBuffer([]); - Conversation.prototype.pinned = 0; - Conversation.prototype.muteEndTime = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + Conversation.prototype.tcToken = null; + Conversation.prototype.tcTokenTimestamp = null; + Conversation.prototype.contactPrimaryIdentityKey = null; + Conversation.prototype.pinned = null; + Conversation.prototype.muteEndTime = null; Conversation.prototype.wallpaper = null; - Conversation.prototype.mediaVisibility = 0; - Conversation.prototype.tcTokenSenderTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - Conversation.prototype.suspended = false; - Conversation.prototype.terminated = false; - Conversation.prototype.createdAt = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - Conversation.prototype.createdBy = ""; - Conversation.prototype.description = ""; - Conversation.prototype.support = false; - Conversation.prototype.isParentGroup = false; - Conversation.prototype.parentGroupId = ""; - Conversation.prototype.isDefaultSubgroup = false; - Conversation.prototype.displayName = ""; - Conversation.prototype.pnJid = ""; - Conversation.prototype.shareOwnPn = false; - Conversation.prototype.pnhDuplicateLidThread = false; - Conversation.prototype.lidJid = ""; - Conversation.prototype.username = ""; - Conversation.prototype.lidOriginType = ""; - Conversation.prototype.commentsCount = 0; - Conversation.prototype.locked = false; - Conversation.prototype.systemMessageToInsert = 1; - Conversation.prototype.capiCreatedGroup = false; - Conversation.prototype.accountLid = ""; - Conversation.prototype.limitSharing = false; - Conversation.prototype.limitSharingSettingTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - Conversation.prototype.limitSharingTrigger = 0; - Conversation.prototype.limitSharingInitiatedByMe = false; - Conversation.prototype.maibaAiThreadEnabled = false; + Conversation.prototype.mediaVisibility = null; + Conversation.prototype.tcTokenSenderTimestamp = null; + Conversation.prototype.suspended = null; + Conversation.prototype.terminated = null; + Conversation.prototype.createdAt = null; + Conversation.prototype.createdBy = null; + Conversation.prototype.description = null; + Conversation.prototype.support = null; + Conversation.prototype.isParentGroup = null; + Conversation.prototype.parentGroupId = null; + Conversation.prototype.isDefaultSubgroup = null; + Conversation.prototype.displayName = null; + Conversation.prototype.pnJid = null; + Conversation.prototype.shareOwnPn = null; + Conversation.prototype.pnhDuplicateLidThread = null; + Conversation.prototype.lidJid = null; + Conversation.prototype.username = null; + Conversation.prototype.lidOriginType = null; + Conversation.prototype.commentsCount = null; + Conversation.prototype.locked = null; + Conversation.prototype.systemMessageToInsert = null; + Conversation.prototype.capiCreatedGroup = null; + Conversation.prototype.accountLid = null; + Conversation.prototype.limitSharing = null; + Conversation.prototype.limitSharingSettingTimestamp = null; + Conversation.prototype.limitSharingTrigger = null; + Conversation.prototype.limitSharingInitiatedByMe = null; + Conversation.prototype.maibaAiThreadEnabled = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Conversation.prototype, "_id", { + get: $util.oneOfGetter($oneOfFields = ["id"]), + set: $util.oneOfSetter($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) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Conversation.prototype, "_limitSharingSettingTimestamp", { + get: $util.oneOfGetter($oneOfFields = ["limitSharingSettingTimestamp"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Conversation.prototype, "_limitSharingTrigger", { + get: $util.oneOfGetter($oneOfFields = ["limitSharingTrigger"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Conversation.prototype, "_limitSharingInitiatedByMe", { + get: $util.oneOfGetter($oneOfFields = ["limitSharingInitiatedByMe"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Conversation.prototype, "_maibaAiThreadEnabled", { + get: $util.oneOfGetter($oneOfFields = ["maibaAiThreadEnabled"]), + set: $util.oneOfSetter($oneOfFields) + }); Conversation.create = function create(properties) { return new Conversation(properties); @@ -21926,7 +25820,8 @@ export const proto = $root.proto = (() => { Conversation.encode = function encode(m, w) { if (!w) w = $Writer.create(); - w.uint32(10).string(m.id); + if (m.id != null && Object.hasOwnProperty.call(m, "id")) + w.uint32(10).string(m.id); if (m.messages != null && m.messages.length) { for (var i = 0; i < m.messages.length; ++i) $root.proto.HistorySyncMsg.encode(m.messages[i], w.uint32(18).fork()).ldelim(); @@ -22274,8 +26169,6 @@ export const proto = $root.proto = (() => { break; } } - if (!m.hasOwnProperty("id")) - throw $util.ProtocolError("missing required 'id'", { instance: m }); return m; }; @@ -22612,106 +26505,10 @@ export const proto = $root.proto = (() => { d.messages = []; d.participant = []; } - if (o.defaults) { - d.id = ""; - d.newJid = ""; - d.oldJid = ""; - if ($util.Long) { - var n = new $util.Long(0, 0, true); - d.lastMsgTimestamp = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.lastMsgTimestamp = o.longs === String ? "0" : 0; - d.unreadCount = 0; - d.readOnly = false; - d.endOfHistoryTransfer = false; - d.ephemeralExpiration = 0; - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.ephemeralSettingTimestamp = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.ephemeralSettingTimestamp = o.longs === String ? "0" : 0; - d.endOfHistoryTransferType = o.enums === String ? "COMPLETE_BUT_MORE_MESSAGES_REMAIN_ON_PRIMARY" : 0; - if ($util.Long) { - var n = new $util.Long(0, 0, true); - d.conversationTimestamp = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.conversationTimestamp = o.longs === String ? "0" : 0; - d.name = ""; - d.pHash = ""; - d.notSpam = false; - d.archived = false; - d.disappearingMode = null; - d.unreadMentionCount = 0; - d.markedAsUnread = false; - if (o.bytes === String) - d.tcToken = ""; - else { - d.tcToken = []; - if (o.bytes !== Array) - d.tcToken = $util.newBuffer(d.tcToken); - } - if ($util.Long) { - var n = new $util.Long(0, 0, true); - d.tcTokenTimestamp = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.tcTokenTimestamp = o.longs === String ? "0" : 0; - if (o.bytes === String) - d.contactPrimaryIdentityKey = ""; - else { - d.contactPrimaryIdentityKey = []; - if (o.bytes !== Array) - d.contactPrimaryIdentityKey = $util.newBuffer(d.contactPrimaryIdentityKey); - } - d.pinned = 0; - if ($util.Long) { - var n = new $util.Long(0, 0, true); - d.muteEndTime = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.muteEndTime = o.longs === String ? "0" : 0; - d.wallpaper = null; - d.mediaVisibility = o.enums === String ? "DEFAULT" : 0; - if ($util.Long) { - var n = new $util.Long(0, 0, true); - d.tcTokenSenderTimestamp = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.tcTokenSenderTimestamp = o.longs === String ? "0" : 0; - d.suspended = false; - d.terminated = false; - if ($util.Long) { - var n = new $util.Long(0, 0, true); - d.createdAt = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.createdAt = o.longs === String ? "0" : 0; - d.createdBy = ""; - d.description = ""; - d.support = false; - d.isParentGroup = false; - d.isDefaultSubgroup = false; - d.parentGroupId = ""; - d.displayName = ""; - d.pnJid = ""; - d.shareOwnPn = false; - d.pnhDuplicateLidThread = false; - d.lidJid = ""; - d.username = ""; - d.lidOriginType = ""; - d.commentsCount = 0; - d.locked = false; - d.systemMessageToInsert = o.enums === String ? "E2EE_MSG" : 1; - d.capiCreatedGroup = false; - d.accountLid = ""; - d.limitSharing = false; - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.limitSharingSettingTimestamp = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.limitSharingSettingTimestamp = o.longs === String ? "0" : 0; - d.limitSharingTrigger = o.enums === String ? "UNKNOWN" : 0; - d.limitSharingInitiatedByMe = false; - d.maibaAiThreadEnabled = false; - } if (m.id != null && m.hasOwnProperty("id")) { d.id = m.id; + if (o.oneofs) + d._id = "id"; } if (m.messages && m.messages.length) { d.messages = []; @@ -22721,63 +26518,97 @@ export const proto = $root.proto = (() => { } if (m.newJid != null && m.hasOwnProperty("newJid")) { d.newJid = m.newJid; + if (o.oneofs) + d._newJid = "newJid"; } if (m.oldJid != null && m.hasOwnProperty("oldJid")) { d.oldJid = m.oldJid; + if (o.oneofs) + d._oldJid = "oldJid"; } if (m.lastMsgTimestamp != null && m.hasOwnProperty("lastMsgTimestamp")) { if (typeof m.lastMsgTimestamp === "number") d.lastMsgTimestamp = o.longs === String ? String(m.lastMsgTimestamp) : m.lastMsgTimestamp; else d.lastMsgTimestamp = o.longs === String ? longToString(m.lastMsgTimestamp, true) : o.longs === Number ? longToNumber(m.lastMsgTimestamp, true) : m.lastMsgTimestamp; + if (o.oneofs) + d._lastMsgTimestamp = "lastMsgTimestamp"; } if (m.unreadCount != null && m.hasOwnProperty("unreadCount")) { d.unreadCount = m.unreadCount; + if (o.oneofs) + d._unreadCount = "unreadCount"; } if (m.readOnly != null && m.hasOwnProperty("readOnly")) { d.readOnly = m.readOnly; + if (o.oneofs) + d._readOnly = "readOnly"; } if (m.endOfHistoryTransfer != null && m.hasOwnProperty("endOfHistoryTransfer")) { d.endOfHistoryTransfer = m.endOfHistoryTransfer; + if (o.oneofs) + d._endOfHistoryTransfer = "endOfHistoryTransfer"; } if (m.ephemeralExpiration != null && m.hasOwnProperty("ephemeralExpiration")) { d.ephemeralExpiration = m.ephemeralExpiration; + if (o.oneofs) + d._ephemeralExpiration = "ephemeralExpiration"; } if (m.ephemeralSettingTimestamp != null && m.hasOwnProperty("ephemeralSettingTimestamp")) { if (typeof m.ephemeralSettingTimestamp === "number") d.ephemeralSettingTimestamp = o.longs === String ? String(m.ephemeralSettingTimestamp) : m.ephemeralSettingTimestamp; else d.ephemeralSettingTimestamp = o.longs === String ? longToString(m.ephemeralSettingTimestamp) : o.longs === Number ? longToNumber(m.ephemeralSettingTimestamp) : m.ephemeralSettingTimestamp; + if (o.oneofs) + d._ephemeralSettingTimestamp = "ephemeralSettingTimestamp"; } if (m.endOfHistoryTransferType != null && m.hasOwnProperty("endOfHistoryTransferType")) { d.endOfHistoryTransferType = o.enums === String ? $root.proto.Conversation.EndOfHistoryTransferType[m.endOfHistoryTransferType] === undefined ? m.endOfHistoryTransferType : $root.proto.Conversation.EndOfHistoryTransferType[m.endOfHistoryTransferType] : m.endOfHistoryTransferType; + if (o.oneofs) + d._endOfHistoryTransferType = "endOfHistoryTransferType"; } if (m.conversationTimestamp != null && m.hasOwnProperty("conversationTimestamp")) { if (typeof m.conversationTimestamp === "number") d.conversationTimestamp = o.longs === String ? String(m.conversationTimestamp) : m.conversationTimestamp; else d.conversationTimestamp = o.longs === String ? longToString(m.conversationTimestamp, true) : o.longs === Number ? longToNumber(m.conversationTimestamp, true) : m.conversationTimestamp; + if (o.oneofs) + d._conversationTimestamp = "conversationTimestamp"; } if (m.name != null && m.hasOwnProperty("name")) { d.name = m.name; + if (o.oneofs) + d._name = "name"; } if (m.pHash != null && m.hasOwnProperty("pHash")) { d.pHash = m.pHash; + if (o.oneofs) + d._pHash = "pHash"; } if (m.notSpam != null && m.hasOwnProperty("notSpam")) { d.notSpam = m.notSpam; + if (o.oneofs) + d._notSpam = "notSpam"; } if (m.archived != null && m.hasOwnProperty("archived")) { d.archived = m.archived; + if (o.oneofs) + d._archived = "archived"; } if (m.disappearingMode != null && m.hasOwnProperty("disappearingMode")) { d.disappearingMode = $root.proto.DisappearingMode.toObject(m.disappearingMode, o); + if (o.oneofs) + d._disappearingMode = "disappearingMode"; } if (m.unreadMentionCount != null && m.hasOwnProperty("unreadMentionCount")) { d.unreadMentionCount = m.unreadMentionCount; + if (o.oneofs) + d._unreadMentionCount = "unreadMentionCount"; } if (m.markedAsUnread != null && m.hasOwnProperty("markedAsUnread")) { d.markedAsUnread = m.markedAsUnread; + if (o.oneofs) + d._markedAsUnread = "markedAsUnread"; } if (m.participant && m.participant.length) { d.participant = []; @@ -22787,120 +26618,188 @@ export const proto = $root.proto = (() => { } if (m.tcToken != null && m.hasOwnProperty("tcToken")) { d.tcToken = o.bytes === String ? $util.base64.encode(m.tcToken, 0, m.tcToken.length) : o.bytes === Array ? Array.prototype.slice.call(m.tcToken) : m.tcToken; + if (o.oneofs) + d._tcToken = "tcToken"; } if (m.tcTokenTimestamp != null && m.hasOwnProperty("tcTokenTimestamp")) { if (typeof m.tcTokenTimestamp === "number") d.tcTokenTimestamp = o.longs === String ? String(m.tcTokenTimestamp) : m.tcTokenTimestamp; else d.tcTokenTimestamp = o.longs === String ? longToString(m.tcTokenTimestamp, true) : o.longs === Number ? longToNumber(m.tcTokenTimestamp, true) : m.tcTokenTimestamp; + if (o.oneofs) + d._tcTokenTimestamp = "tcTokenTimestamp"; } if (m.contactPrimaryIdentityKey != null && m.hasOwnProperty("contactPrimaryIdentityKey")) { d.contactPrimaryIdentityKey = o.bytes === String ? $util.base64.encode(m.contactPrimaryIdentityKey, 0, m.contactPrimaryIdentityKey.length) : o.bytes === Array ? Array.prototype.slice.call(m.contactPrimaryIdentityKey) : m.contactPrimaryIdentityKey; + if (o.oneofs) + d._contactPrimaryIdentityKey = "contactPrimaryIdentityKey"; } if (m.pinned != null && m.hasOwnProperty("pinned")) { d.pinned = m.pinned; + if (o.oneofs) + d._pinned = "pinned"; } if (m.muteEndTime != null && m.hasOwnProperty("muteEndTime")) { if (typeof m.muteEndTime === "number") d.muteEndTime = o.longs === String ? String(m.muteEndTime) : m.muteEndTime; else d.muteEndTime = o.longs === String ? longToString(m.muteEndTime, true) : o.longs === Number ? longToNumber(m.muteEndTime, true) : m.muteEndTime; + if (o.oneofs) + d._muteEndTime = "muteEndTime"; } if (m.wallpaper != null && m.hasOwnProperty("wallpaper")) { d.wallpaper = $root.proto.WallpaperSettings.toObject(m.wallpaper, o); + if (o.oneofs) + d._wallpaper = "wallpaper"; } if (m.mediaVisibility != null && m.hasOwnProperty("mediaVisibility")) { d.mediaVisibility = o.enums === String ? $root.proto.MediaVisibility[m.mediaVisibility] === undefined ? m.mediaVisibility : $root.proto.MediaVisibility[m.mediaVisibility] : m.mediaVisibility; + if (o.oneofs) + d._mediaVisibility = "mediaVisibility"; } if (m.tcTokenSenderTimestamp != null && m.hasOwnProperty("tcTokenSenderTimestamp")) { if (typeof m.tcTokenSenderTimestamp === "number") d.tcTokenSenderTimestamp = o.longs === String ? String(m.tcTokenSenderTimestamp) : m.tcTokenSenderTimestamp; else d.tcTokenSenderTimestamp = o.longs === String ? longToString(m.tcTokenSenderTimestamp, true) : o.longs === Number ? longToNumber(m.tcTokenSenderTimestamp, true) : m.tcTokenSenderTimestamp; + if (o.oneofs) + d._tcTokenSenderTimestamp = "tcTokenSenderTimestamp"; } if (m.suspended != null && m.hasOwnProperty("suspended")) { d.suspended = m.suspended; + if (o.oneofs) + d._suspended = "suspended"; } if (m.terminated != null && m.hasOwnProperty("terminated")) { d.terminated = m.terminated; + if (o.oneofs) + d._terminated = "terminated"; } if (m.createdAt != null && m.hasOwnProperty("createdAt")) { if (typeof m.createdAt === "number") d.createdAt = o.longs === String ? String(m.createdAt) : m.createdAt; else d.createdAt = o.longs === String ? longToString(m.createdAt, true) : o.longs === Number ? longToNumber(m.createdAt, true) : m.createdAt; + if (o.oneofs) + d._createdAt = "createdAt"; } if (m.createdBy != null && m.hasOwnProperty("createdBy")) { d.createdBy = m.createdBy; + if (o.oneofs) + d._createdBy = "createdBy"; } if (m.description != null && m.hasOwnProperty("description")) { d.description = m.description; + if (o.oneofs) + d._description = "description"; } if (m.support != null && m.hasOwnProperty("support")) { d.support = m.support; + if (o.oneofs) + d._support = "support"; } if (m.isParentGroup != null && m.hasOwnProperty("isParentGroup")) { d.isParentGroup = m.isParentGroup; + if (o.oneofs) + d._isParentGroup = "isParentGroup"; } if (m.isDefaultSubgroup != null && m.hasOwnProperty("isDefaultSubgroup")) { d.isDefaultSubgroup = m.isDefaultSubgroup; + if (o.oneofs) + d._isDefaultSubgroup = "isDefaultSubgroup"; } if (m.parentGroupId != null && m.hasOwnProperty("parentGroupId")) { d.parentGroupId = m.parentGroupId; + if (o.oneofs) + d._parentGroupId = "parentGroupId"; } if (m.displayName != null && m.hasOwnProperty("displayName")) { d.displayName = m.displayName; + if (o.oneofs) + d._displayName = "displayName"; } if (m.pnJid != null && m.hasOwnProperty("pnJid")) { d.pnJid = m.pnJid; + if (o.oneofs) + d._pnJid = "pnJid"; } if (m.shareOwnPn != null && m.hasOwnProperty("shareOwnPn")) { d.shareOwnPn = m.shareOwnPn; + if (o.oneofs) + d._shareOwnPn = "shareOwnPn"; } if (m.pnhDuplicateLidThread != null && m.hasOwnProperty("pnhDuplicateLidThread")) { d.pnhDuplicateLidThread = m.pnhDuplicateLidThread; + if (o.oneofs) + d._pnhDuplicateLidThread = "pnhDuplicateLidThread"; } if (m.lidJid != null && m.hasOwnProperty("lidJid")) { d.lidJid = m.lidJid; + if (o.oneofs) + d._lidJid = "lidJid"; } if (m.username != null && m.hasOwnProperty("username")) { d.username = m.username; + if (o.oneofs) + d._username = "username"; } if (m.lidOriginType != null && m.hasOwnProperty("lidOriginType")) { d.lidOriginType = m.lidOriginType; + if (o.oneofs) + d._lidOriginType = "lidOriginType"; } if (m.commentsCount != null && m.hasOwnProperty("commentsCount")) { d.commentsCount = m.commentsCount; + if (o.oneofs) + d._commentsCount = "commentsCount"; } if (m.locked != null && m.hasOwnProperty("locked")) { d.locked = m.locked; + if (o.oneofs) + d._locked = "locked"; } if (m.systemMessageToInsert != null && m.hasOwnProperty("systemMessageToInsert")) { d.systemMessageToInsert = o.enums === String ? $root.proto.PrivacySystemMessage[m.systemMessageToInsert] === undefined ? m.systemMessageToInsert : $root.proto.PrivacySystemMessage[m.systemMessageToInsert] : m.systemMessageToInsert; + if (o.oneofs) + d._systemMessageToInsert = "systemMessageToInsert"; } if (m.capiCreatedGroup != null && m.hasOwnProperty("capiCreatedGroup")) { d.capiCreatedGroup = m.capiCreatedGroup; + if (o.oneofs) + d._capiCreatedGroup = "capiCreatedGroup"; } if (m.accountLid != null && m.hasOwnProperty("accountLid")) { d.accountLid = m.accountLid; + if (o.oneofs) + d._accountLid = "accountLid"; } if (m.limitSharing != null && m.hasOwnProperty("limitSharing")) { d.limitSharing = m.limitSharing; + if (o.oneofs) + d._limitSharing = "limitSharing"; } if (m.limitSharingSettingTimestamp != null && m.hasOwnProperty("limitSharingSettingTimestamp")) { if (typeof m.limitSharingSettingTimestamp === "number") d.limitSharingSettingTimestamp = o.longs === String ? String(m.limitSharingSettingTimestamp) : m.limitSharingSettingTimestamp; else d.limitSharingSettingTimestamp = o.longs === String ? longToString(m.limitSharingSettingTimestamp) : o.longs === Number ? longToNumber(m.limitSharingSettingTimestamp) : m.limitSharingSettingTimestamp; + if (o.oneofs) + d._limitSharingSettingTimestamp = "limitSharingSettingTimestamp"; } if (m.limitSharingTrigger != null && m.hasOwnProperty("limitSharingTrigger")) { d.limitSharingTrigger = o.enums === String ? $root.proto.LimitSharing.TriggerType[m.limitSharingTrigger] === undefined ? m.limitSharingTrigger : $root.proto.LimitSharing.TriggerType[m.limitSharingTrigger] : m.limitSharingTrigger; + if (o.oneofs) + d._limitSharingTrigger = "limitSharingTrigger"; } if (m.limitSharingInitiatedByMe != null && m.hasOwnProperty("limitSharingInitiatedByMe")) { d.limitSharingInitiatedByMe = m.limitSharingInitiatedByMe; + if (o.oneofs) + d._limitSharingInitiatedByMe = "limitSharingInitiatedByMe"; } if (m.maibaAiThreadEnabled != null && m.hasOwnProperty("maibaAiThreadEnabled")) { d.maibaAiThreadEnabled = m.maibaAiThreadEnabled; + if (o.oneofs) + d._maibaAiThreadEnabled = "maibaAiThreadEnabled"; } return d; }; @@ -22937,13 +26836,51 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - DeviceCapabilities.prototype.chatLockSupportLevel = 0; + DeviceCapabilities.prototype.chatLockSupportLevel = null; DeviceCapabilities.prototype.lidMigration = null; DeviceCapabilities.prototype.businessBroadcast = null; DeviceCapabilities.prototype.userHasAvatar = null; - DeviceCapabilities.prototype.memberNameTagPrimarySupport = 0; + DeviceCapabilities.prototype.memberNameTagPrimarySupport = null; DeviceCapabilities.prototype.aiThread = null; + let $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) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DeviceCapabilities.prototype, "_businessBroadcast", { + get: $util.oneOfGetter($oneOfFields = ["businessBroadcast"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DeviceCapabilities.prototype, "_userHasAvatar", { + get: $util.oneOfGetter($oneOfFields = ["userHasAvatar"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DeviceCapabilities.prototype, "_memberNameTagPrimarySupport", { + get: $util.oneOfGetter($oneOfFields = ["memberNameTagPrimarySupport"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DeviceCapabilities.prototype, "_aiThread", { + get: $util.oneOfGetter($oneOfFields = ["aiThread"]), + set: $util.oneOfSetter($oneOfFields) + }); + DeviceCapabilities.create = function create(properties) { return new DeviceCapabilities(properties); }; @@ -23078,31 +27015,35 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.chatLockSupportLevel = o.enums === String ? "NONE" : 0; - d.lidMigration = null; - d.businessBroadcast = null; - d.userHasAvatar = null; - d.memberNameTagPrimarySupport = o.enums === String ? "DISABLED" : 0; - d.aiThread = null; - } if (m.chatLockSupportLevel != null && m.hasOwnProperty("chatLockSupportLevel")) { d.chatLockSupportLevel = o.enums === String ? $root.proto.DeviceCapabilities.ChatLockSupportLevel[m.chatLockSupportLevel] === undefined ? m.chatLockSupportLevel : $root.proto.DeviceCapabilities.ChatLockSupportLevel[m.chatLockSupportLevel] : m.chatLockSupportLevel; + if (o.oneofs) + d._chatLockSupportLevel = "chatLockSupportLevel"; } if (m.lidMigration != null && m.hasOwnProperty("lidMigration")) { d.lidMigration = $root.proto.DeviceCapabilities.LIDMigration.toObject(m.lidMigration, o); + if (o.oneofs) + d._lidMigration = "lidMigration"; } if (m.businessBroadcast != null && m.hasOwnProperty("businessBroadcast")) { d.businessBroadcast = $root.proto.DeviceCapabilities.BusinessBroadcast.toObject(m.businessBroadcast, o); + if (o.oneofs) + d._businessBroadcast = "businessBroadcast"; } if (m.userHasAvatar != null && m.hasOwnProperty("userHasAvatar")) { d.userHasAvatar = $root.proto.DeviceCapabilities.UserHasAvatar.toObject(m.userHasAvatar, o); + if (o.oneofs) + d._userHasAvatar = "userHasAvatar"; } if (m.memberNameTagPrimarySupport != null && m.hasOwnProperty("memberNameTagPrimarySupport")) { d.memberNameTagPrimarySupport = o.enums === String ? $root.proto.DeviceCapabilities.MemberNameTagPrimarySupport[m.memberNameTagPrimarySupport] === undefined ? m.memberNameTagPrimarySupport : $root.proto.DeviceCapabilities.MemberNameTagPrimarySupport[m.memberNameTagPrimarySupport] : m.memberNameTagPrimarySupport; + if (o.oneofs) + d._memberNameTagPrimarySupport = "memberNameTagPrimarySupport"; } if (m.aiThread != null && m.hasOwnProperty("aiThread")) { d.aiThread = $root.proto.DeviceCapabilities.AiThread.toObject(m.aiThread, o); + if (o.oneofs) + d._aiThread = "aiThread"; } return d; }; @@ -23127,7 +27068,15 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - AiThread.prototype.supportLevel = 0; + AiThread.prototype.supportLevel = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AiThread.prototype, "_supportLevel", { + get: $util.oneOfGetter($oneOfFields = ["supportLevel"]), + set: $util.oneOfSetter($oneOfFields) + }); AiThread.create = function create(properties) { return new AiThread(properties); @@ -23193,11 +27142,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.supportLevel = o.enums === String ? "NONE" : 0; - } if (m.supportLevel != null && m.hasOwnProperty("supportLevel")) { d.supportLevel = o.enums === String ? $root.proto.DeviceCapabilities.AiThread.SupportLevel[m.supportLevel] === undefined ? m.supportLevel : $root.proto.DeviceCapabilities.AiThread.SupportLevel[m.supportLevel] : m.supportLevel; + if (o.oneofs) + d._supportLevel = "supportLevel"; } return d; }; @@ -23233,7 +27181,15 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - BusinessBroadcast.prototype.importListEnabled = false; + BusinessBroadcast.prototype.importListEnabled = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BusinessBroadcast.prototype, "_importListEnabled", { + get: $util.oneOfGetter($oneOfFields = ["importListEnabled"]), + set: $util.oneOfSetter($oneOfFields) + }); BusinessBroadcast.create = function create(properties) { return new BusinessBroadcast(properties); @@ -23282,11 +27238,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.importListEnabled = false; - } if (m.importListEnabled != null && m.hasOwnProperty("importListEnabled")) { d.importListEnabled = m.importListEnabled; + if (o.oneofs) + d._importListEnabled = "importListEnabled"; } return d; }; @@ -23322,7 +27277,15 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - LIDMigration.prototype.chatDbMigrationTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + LIDMigration.prototype.chatDbMigrationTimestamp = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(LIDMigration.prototype, "_chatDbMigrationTimestamp", { + get: $util.oneOfGetter($oneOfFields = ["chatDbMigrationTimestamp"]), + set: $util.oneOfSetter($oneOfFields) + }); LIDMigration.create = function create(properties) { return new LIDMigration(properties); @@ -23378,18 +27341,13 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - if ($util.Long) { - var n = new $util.Long(0, 0, true); - d.chatDbMigrationTimestamp = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.chatDbMigrationTimestamp = o.longs === String ? "0" : 0; - } if (m.chatDbMigrationTimestamp != null && m.hasOwnProperty("chatDbMigrationTimestamp")) { if (typeof m.chatDbMigrationTimestamp === "number") d.chatDbMigrationTimestamp = o.longs === String ? String(m.chatDbMigrationTimestamp) : m.chatDbMigrationTimestamp; else d.chatDbMigrationTimestamp = o.longs === String ? longToString(m.chatDbMigrationTimestamp, true) : o.longs === Number ? longToNumber(m.chatDbMigrationTimestamp, true) : m.chatDbMigrationTimestamp; + if (o.oneofs) + d._chatDbMigrationTimestamp = "chatDbMigrationTimestamp"; } return d; }; @@ -23425,7 +27383,15 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - UserHasAvatar.prototype.userHasAvatar = false; + UserHasAvatar.prototype.userHasAvatar = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(UserHasAvatar.prototype, "_userHasAvatar", { + get: $util.oneOfGetter($oneOfFields = ["userHasAvatar"]), + set: $util.oneOfSetter($oneOfFields) + }); UserHasAvatar.create = function create(properties) { return new UserHasAvatar(properties); @@ -23474,11 +27440,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.userHasAvatar = false; - } if (m.userHasAvatar != null && m.hasOwnProperty("userHasAvatar")) { d.userHasAvatar = m.userHasAvatar; + if (o.oneofs) + d._userHasAvatar = "userHasAvatar"; } return d; }; @@ -23509,8 +27474,22 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - DeviceConsistencyCodeMessage.prototype.generation = 0; - DeviceConsistencyCodeMessage.prototype.signature = $util.newBuffer([]); + DeviceConsistencyCodeMessage.prototype.generation = null; + DeviceConsistencyCodeMessage.prototype.signature = null; + + let $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) + }); DeviceConsistencyCodeMessage.create = function create(properties) { return new DeviceConsistencyCodeMessage(properties); @@ -23571,21 +27550,15 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.generation = 0; - if (o.bytes === String) - d.signature = ""; - else { - d.signature = []; - if (o.bytes !== Array) - d.signature = $util.newBuffer(d.signature); - } - } if (m.generation != null && m.hasOwnProperty("generation")) { d.generation = m.generation; + if (o.oneofs) + d._generation = "generation"; } if (m.signature != null && m.hasOwnProperty("signature")) { d.signature = o.bytes === String ? $util.base64.encode(m.signature, 0, m.signature.length) : o.bytes === Array ? Array.prototype.slice.call(m.signature) : m.signature; + if (o.oneofs) + d._signature = "signature"; } return d; }; @@ -23615,15 +27588,53 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - DeviceListMetadata.prototype.senderKeyHash = $util.newBuffer([]); - DeviceListMetadata.prototype.senderTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + DeviceListMetadata.prototype.senderKeyHash = null; + DeviceListMetadata.prototype.senderTimestamp = null; DeviceListMetadata.prototype.senderKeyIndexes = $util.emptyArray; - DeviceListMetadata.prototype.senderAccountType = 0; - DeviceListMetadata.prototype.receiverAccountType = 0; - DeviceListMetadata.prototype.recipientKeyHash = $util.newBuffer([]); - DeviceListMetadata.prototype.recipientTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + DeviceListMetadata.prototype.senderAccountType = null; + DeviceListMetadata.prototype.receiverAccountType = null; + DeviceListMetadata.prototype.recipientKeyHash = null; + DeviceListMetadata.prototype.recipientTimestamp = null; DeviceListMetadata.prototype.recipientKeyIndexes = $util.emptyArray; + let $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) + }); + DeviceListMetadata.create = function create(properties) { return new DeviceListMetadata(properties); }; @@ -23816,42 +27827,18 @@ export const proto = $root.proto = (() => { d.senderKeyIndexes = []; d.recipientKeyIndexes = []; } - if (o.defaults) { - if (o.bytes === String) - d.senderKeyHash = ""; - else { - d.senderKeyHash = []; - if (o.bytes !== Array) - d.senderKeyHash = $util.newBuffer(d.senderKeyHash); - } - if ($util.Long) { - var n = new $util.Long(0, 0, true); - d.senderTimestamp = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.senderTimestamp = o.longs === String ? "0" : 0; - d.senderAccountType = o.enums === String ? "E2EE" : 0; - d.receiverAccountType = o.enums === String ? "E2EE" : 0; - if (o.bytes === String) - d.recipientKeyHash = ""; - else { - d.recipientKeyHash = []; - if (o.bytes !== Array) - d.recipientKeyHash = $util.newBuffer(d.recipientKeyHash); - } - if ($util.Long) { - var n = new $util.Long(0, 0, true); - d.recipientTimestamp = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.recipientTimestamp = o.longs === String ? "0" : 0; - } if (m.senderKeyHash != null && m.hasOwnProperty("senderKeyHash")) { d.senderKeyHash = o.bytes === String ? $util.base64.encode(m.senderKeyHash, 0, m.senderKeyHash.length) : o.bytes === Array ? Array.prototype.slice.call(m.senderKeyHash) : m.senderKeyHash; + if (o.oneofs) + d._senderKeyHash = "senderKeyHash"; } if (m.senderTimestamp != null && m.hasOwnProperty("senderTimestamp")) { if (typeof m.senderTimestamp === "number") d.senderTimestamp = o.longs === String ? String(m.senderTimestamp) : m.senderTimestamp; else d.senderTimestamp = o.longs === String ? longToString(m.senderTimestamp, true) : o.longs === Number ? longToNumber(m.senderTimestamp, true) : m.senderTimestamp; + if (o.oneofs) + d._senderTimestamp = "senderTimestamp"; } if (m.senderKeyIndexes && m.senderKeyIndexes.length) { d.senderKeyIndexes = []; @@ -23861,18 +27848,26 @@ export const proto = $root.proto = (() => { } if (m.senderAccountType != null && m.hasOwnProperty("senderAccountType")) { d.senderAccountType = o.enums === String ? $root.proto.ADVEncryptionType[m.senderAccountType] === undefined ? m.senderAccountType : $root.proto.ADVEncryptionType[m.senderAccountType] : m.senderAccountType; + if (o.oneofs) + d._senderAccountType = "senderAccountType"; } if (m.receiverAccountType != null && m.hasOwnProperty("receiverAccountType")) { d.receiverAccountType = o.enums === String ? $root.proto.ADVEncryptionType[m.receiverAccountType] === undefined ? m.receiverAccountType : $root.proto.ADVEncryptionType[m.receiverAccountType] : m.receiverAccountType; + if (o.oneofs) + d._receiverAccountType = "receiverAccountType"; } if (m.recipientKeyHash != null && m.hasOwnProperty("recipientKeyHash")) { d.recipientKeyHash = o.bytes === String ? $util.base64.encode(m.recipientKeyHash, 0, m.recipientKeyHash.length) : o.bytes === Array ? Array.prototype.slice.call(m.recipientKeyHash) : m.recipientKeyHash; + if (o.oneofs) + d._recipientKeyHash = "recipientKeyHash"; } if (m.recipientTimestamp != null && m.hasOwnProperty("recipientTimestamp")) { if (typeof m.recipientTimestamp === "number") d.recipientTimestamp = o.longs === String ? String(m.recipientTimestamp) : m.recipientTimestamp; else d.recipientTimestamp = o.longs === String ? longToString(m.recipientTimestamp, true) : o.longs === Number ? longToNumber(m.recipientTimestamp, true) : m.recipientTimestamp; + if (o.oneofs) + d._recipientTimestamp = "recipientTimestamp"; } if (m.recipientKeyIndexes && m.recipientKeyIndexes.length) { d.recipientKeyIndexes = []; @@ -23906,12 +27901,44 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - DeviceProps.prototype.os = ""; + DeviceProps.prototype.os = null; DeviceProps.prototype.version = null; - DeviceProps.prototype.platformType = 0; - DeviceProps.prototype.requireFullSync = false; + DeviceProps.prototype.platformType = null; + DeviceProps.prototype.requireFullSync = null; DeviceProps.prototype.historySyncConfig = null; + let $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) + }); + DeviceProps.create = function create(properties) { return new DeviceProps(properties); }; @@ -24104,27 +28131,30 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.os = ""; - d.version = null; - d.platformType = o.enums === String ? "UNKNOWN" : 0; - d.requireFullSync = false; - d.historySyncConfig = null; - } if (m.os != null && m.hasOwnProperty("os")) { d.os = m.os; + if (o.oneofs) + d._os = "os"; } if (m.version != null && m.hasOwnProperty("version")) { d.version = $root.proto.DeviceProps.AppVersion.toObject(m.version, o); + if (o.oneofs) + d._version = "version"; } if (m.platformType != null && m.hasOwnProperty("platformType")) { d.platformType = o.enums === String ? $root.proto.DeviceProps.PlatformType[m.platformType] === undefined ? m.platformType : $root.proto.DeviceProps.PlatformType[m.platformType] : m.platformType; + if (o.oneofs) + d._platformType = "platformType"; } if (m.requireFullSync != null && m.hasOwnProperty("requireFullSync")) { d.requireFullSync = m.requireFullSync; + if (o.oneofs) + d._requireFullSync = "requireFullSync"; } if (m.historySyncConfig != null && m.hasOwnProperty("historySyncConfig")) { d.historySyncConfig = $root.proto.DeviceProps.HistorySyncConfig.toObject(m.historySyncConfig, o); + if (o.oneofs) + d._historySyncConfig = "historySyncConfig"; } return d; }; @@ -24149,11 +28179,43 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - AppVersion.prototype.primary = 0; - AppVersion.prototype.secondary = 0; - AppVersion.prototype.tertiary = 0; - AppVersion.prototype.quaternary = 0; - AppVersion.prototype.quinary = 0; + AppVersion.prototype.primary = null; + AppVersion.prototype.secondary = null; + AppVersion.prototype.tertiary = null; + AppVersion.prototype.quaternary = null; + AppVersion.prototype.quinary = null; + + let $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) + }); AppVersion.create = function create(properties) { return new AppVersion(properties); @@ -24238,27 +28300,30 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.primary = 0; - d.secondary = 0; - d.tertiary = 0; - d.quaternary = 0; - d.quinary = 0; - } if (m.primary != null && m.hasOwnProperty("primary")) { d.primary = m.primary; + if (o.oneofs) + d._primary = "primary"; } if (m.secondary != null && m.hasOwnProperty("secondary")) { d.secondary = m.secondary; + if (o.oneofs) + d._secondary = "secondary"; } if (m.tertiary != null && m.hasOwnProperty("tertiary")) { d.tertiary = m.tertiary; + if (o.oneofs) + d._tertiary = "tertiary"; } if (m.quaternary != null && m.hasOwnProperty("quaternary")) { d.quaternary = m.quaternary; + if (o.oneofs) + d._quaternary = "quaternary"; } if (m.quinary != null && m.hasOwnProperty("quinary")) { d.quinary = m.quinary; + if (o.oneofs) + d._quinary = "quinary"; } return d; }; @@ -24286,26 +28351,148 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - HistorySyncConfig.prototype.fullSyncDaysLimit = 0; - HistorySyncConfig.prototype.fullSyncSizeMbLimit = 0; - HistorySyncConfig.prototype.storageQuotaMb = 0; - HistorySyncConfig.prototype.inlineInitialPayloadInE2EeMsg = false; - HistorySyncConfig.prototype.recentSyncDaysLimit = 0; - HistorySyncConfig.prototype.supportCallLogHistory = false; - HistorySyncConfig.prototype.supportBotUserAgentChatHistory = false; - HistorySyncConfig.prototype.supportCagReactionsAndPolls = false; - HistorySyncConfig.prototype.supportBizHostedMsg = false; - HistorySyncConfig.prototype.supportRecentSyncChunkMessageCountTuning = false; - HistorySyncConfig.prototype.supportHostedGroupMsg = false; - HistorySyncConfig.prototype.supportFbidBotChatHistory = false; - HistorySyncConfig.prototype.supportAddOnHistorySyncMigration = false; - HistorySyncConfig.prototype.supportMessageAssociation = false; - HistorySyncConfig.prototype.supportGroupHistory = false; - HistorySyncConfig.prototype.onDemandReady = false; - HistorySyncConfig.prototype.supportGuestChat = false; - HistorySyncConfig.prototype.completeOnDemandReady = false; - HistorySyncConfig.prototype.thumbnailSyncDaysLimit = 0; - HistorySyncConfig.prototype.initialSyncMaxMessagesPerChat = 0; + HistorySyncConfig.prototype.fullSyncDaysLimit = null; + HistorySyncConfig.prototype.fullSyncSizeMbLimit = null; + HistorySyncConfig.prototype.storageQuotaMb = null; + HistorySyncConfig.prototype.inlineInitialPayloadInE2EeMsg = null; + HistorySyncConfig.prototype.recentSyncDaysLimit = null; + HistorySyncConfig.prototype.supportCallLogHistory = null; + HistorySyncConfig.prototype.supportBotUserAgentChatHistory = null; + HistorySyncConfig.prototype.supportCagReactionsAndPolls = null; + HistorySyncConfig.prototype.supportBizHostedMsg = null; + HistorySyncConfig.prototype.supportRecentSyncChunkMessageCountTuning = null; + HistorySyncConfig.prototype.supportHostedGroupMsg = null; + HistorySyncConfig.prototype.supportFbidBotChatHistory = null; + HistorySyncConfig.prototype.supportAddOnHistorySyncMigration = null; + HistorySyncConfig.prototype.supportMessageAssociation = null; + HistorySyncConfig.prototype.supportGroupHistory = null; + HistorySyncConfig.prototype.onDemandReady = null; + HistorySyncConfig.prototype.supportGuestChat = null; + HistorySyncConfig.prototype.completeOnDemandReady = null; + HistorySyncConfig.prototype.thumbnailSyncDaysLimit = null; + HistorySyncConfig.prototype.initialSyncMaxMessagesPerChat = null; + + let $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) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HistorySyncConfig.prototype, "_supportGroupHistory", { + get: $util.oneOfGetter($oneOfFields = ["supportGroupHistory"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HistorySyncConfig.prototype, "_onDemandReady", { + get: $util.oneOfGetter($oneOfFields = ["onDemandReady"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HistorySyncConfig.prototype, "_supportGuestChat", { + get: $util.oneOfGetter($oneOfFields = ["supportGuestChat"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HistorySyncConfig.prototype, "_completeOnDemandReady", { + get: $util.oneOfGetter($oneOfFields = ["completeOnDemandReady"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HistorySyncConfig.prototype, "_thumbnailSyncDaysLimit", { + get: $util.oneOfGetter($oneOfFields = ["thumbnailSyncDaysLimit"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HistorySyncConfig.prototype, "_initialSyncMaxMessagesPerChat", { + get: $util.oneOfGetter($oneOfFields = ["initialSyncMaxMessagesPerChat"]), + set: $util.oneOfSetter($oneOfFields) + }); HistorySyncConfig.create = function create(properties) { return new HistorySyncConfig(properties); @@ -24525,87 +28712,105 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.fullSyncDaysLimit = 0; - d.fullSyncSizeMbLimit = 0; - d.storageQuotaMb = 0; - d.inlineInitialPayloadInE2EeMsg = false; - d.recentSyncDaysLimit = 0; - d.supportCallLogHistory = false; - d.supportBotUserAgentChatHistory = false; - d.supportCagReactionsAndPolls = false; - d.supportBizHostedMsg = false; - d.supportRecentSyncChunkMessageCountTuning = false; - d.supportHostedGroupMsg = false; - d.supportFbidBotChatHistory = false; - d.supportAddOnHistorySyncMigration = false; - d.supportMessageAssociation = false; - d.supportGroupHistory = false; - d.onDemandReady = false; - d.supportGuestChat = false; - d.completeOnDemandReady = false; - d.thumbnailSyncDaysLimit = 0; - d.initialSyncMaxMessagesPerChat = 0; - } if (m.fullSyncDaysLimit != null && m.hasOwnProperty("fullSyncDaysLimit")) { d.fullSyncDaysLimit = m.fullSyncDaysLimit; + if (o.oneofs) + d._fullSyncDaysLimit = "fullSyncDaysLimit"; } if (m.fullSyncSizeMbLimit != null && m.hasOwnProperty("fullSyncSizeMbLimit")) { d.fullSyncSizeMbLimit = m.fullSyncSizeMbLimit; + if (o.oneofs) + d._fullSyncSizeMbLimit = "fullSyncSizeMbLimit"; } if (m.storageQuotaMb != null && m.hasOwnProperty("storageQuotaMb")) { d.storageQuotaMb = m.storageQuotaMb; + if (o.oneofs) + d._storageQuotaMb = "storageQuotaMb"; } if (m.inlineInitialPayloadInE2EeMsg != null && m.hasOwnProperty("inlineInitialPayloadInE2EeMsg")) { d.inlineInitialPayloadInE2EeMsg = m.inlineInitialPayloadInE2EeMsg; + if (o.oneofs) + d._inlineInitialPayloadInE2EeMsg = "inlineInitialPayloadInE2EeMsg"; } if (m.recentSyncDaysLimit != null && m.hasOwnProperty("recentSyncDaysLimit")) { d.recentSyncDaysLimit = m.recentSyncDaysLimit; + if (o.oneofs) + d._recentSyncDaysLimit = "recentSyncDaysLimit"; } if (m.supportCallLogHistory != null && m.hasOwnProperty("supportCallLogHistory")) { d.supportCallLogHistory = m.supportCallLogHistory; + if (o.oneofs) + d._supportCallLogHistory = "supportCallLogHistory"; } if (m.supportBotUserAgentChatHistory != null && m.hasOwnProperty("supportBotUserAgentChatHistory")) { d.supportBotUserAgentChatHistory = m.supportBotUserAgentChatHistory; + if (o.oneofs) + d._supportBotUserAgentChatHistory = "supportBotUserAgentChatHistory"; } if (m.supportCagReactionsAndPolls != null && m.hasOwnProperty("supportCagReactionsAndPolls")) { d.supportCagReactionsAndPolls = m.supportCagReactionsAndPolls; + if (o.oneofs) + d._supportCagReactionsAndPolls = "supportCagReactionsAndPolls"; } if (m.supportBizHostedMsg != null && m.hasOwnProperty("supportBizHostedMsg")) { d.supportBizHostedMsg = m.supportBizHostedMsg; + if (o.oneofs) + d._supportBizHostedMsg = "supportBizHostedMsg"; } if (m.supportRecentSyncChunkMessageCountTuning != null && m.hasOwnProperty("supportRecentSyncChunkMessageCountTuning")) { d.supportRecentSyncChunkMessageCountTuning = m.supportRecentSyncChunkMessageCountTuning; + if (o.oneofs) + d._supportRecentSyncChunkMessageCountTuning = "supportRecentSyncChunkMessageCountTuning"; } if (m.supportHostedGroupMsg != null && m.hasOwnProperty("supportHostedGroupMsg")) { d.supportHostedGroupMsg = m.supportHostedGroupMsg; + if (o.oneofs) + d._supportHostedGroupMsg = "supportHostedGroupMsg"; } if (m.supportFbidBotChatHistory != null && m.hasOwnProperty("supportFbidBotChatHistory")) { d.supportFbidBotChatHistory = m.supportFbidBotChatHistory; + if (o.oneofs) + d._supportFbidBotChatHistory = "supportFbidBotChatHistory"; } if (m.supportAddOnHistorySyncMigration != null && m.hasOwnProperty("supportAddOnHistorySyncMigration")) { d.supportAddOnHistorySyncMigration = m.supportAddOnHistorySyncMigration; + if (o.oneofs) + d._supportAddOnHistorySyncMigration = "supportAddOnHistorySyncMigration"; } if (m.supportMessageAssociation != null && m.hasOwnProperty("supportMessageAssociation")) { d.supportMessageAssociation = m.supportMessageAssociation; + if (o.oneofs) + d._supportMessageAssociation = "supportMessageAssociation"; } if (m.supportGroupHistory != null && m.hasOwnProperty("supportGroupHistory")) { d.supportGroupHistory = m.supportGroupHistory; + if (o.oneofs) + d._supportGroupHistory = "supportGroupHistory"; } if (m.onDemandReady != null && m.hasOwnProperty("onDemandReady")) { d.onDemandReady = m.onDemandReady; + if (o.oneofs) + d._onDemandReady = "onDemandReady"; } if (m.supportGuestChat != null && m.hasOwnProperty("supportGuestChat")) { d.supportGuestChat = m.supportGuestChat; + if (o.oneofs) + d._supportGuestChat = "supportGuestChat"; } if (m.completeOnDemandReady != null && m.hasOwnProperty("completeOnDemandReady")) { d.completeOnDemandReady = m.completeOnDemandReady; + if (o.oneofs) + d._completeOnDemandReady = "completeOnDemandReady"; } if (m.thumbnailSyncDaysLimit != null && m.hasOwnProperty("thumbnailSyncDaysLimit")) { d.thumbnailSyncDaysLimit = m.thumbnailSyncDaysLimit; + if (o.oneofs) + d._thumbnailSyncDaysLimit = "thumbnailSyncDaysLimit"; } if (m.initialSyncMaxMessagesPerChat != null && m.hasOwnProperty("initialSyncMaxMessagesPerChat")) { d.initialSyncMaxMessagesPerChat = m.initialSyncMaxMessagesPerChat; + if (o.oneofs) + d._initialSyncMaxMessagesPerChat = "initialSyncMaxMessagesPerChat"; } return d; }; @@ -24666,10 +28871,36 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - DisappearingMode.prototype.initiator = 0; - DisappearingMode.prototype.trigger = 0; - DisappearingMode.prototype.initiatorDeviceJid = ""; - DisappearingMode.prototype.initiatedByMe = false; + DisappearingMode.prototype.initiator = null; + DisappearingMode.prototype.trigger = null; + DisappearingMode.prototype.initiatorDeviceJid = null; + DisappearingMode.prototype.initiatedByMe = null; + + let $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) + }); DisappearingMode.create = function create(properties) { return new DisappearingMode(properties); @@ -24795,23 +29026,25 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.initiator = o.enums === String ? "CHANGED_IN_CHAT" : 0; - d.trigger = o.enums === String ? "UNKNOWN" : 0; - d.initiatorDeviceJid = ""; - d.initiatedByMe = false; - } if (m.initiator != null && m.hasOwnProperty("initiator")) { d.initiator = o.enums === String ? $root.proto.DisappearingMode.Initiator[m.initiator] === undefined ? m.initiator : $root.proto.DisappearingMode.Initiator[m.initiator] : m.initiator; + if (o.oneofs) + d._initiator = "initiator"; } if (m.trigger != null && m.hasOwnProperty("trigger")) { d.trigger = o.enums === String ? $root.proto.DisappearingMode.Trigger[m.trigger] === undefined ? m.trigger : $root.proto.DisappearingMode.Trigger[m.trigger] : m.trigger; + if (o.oneofs) + d._trigger = "trigger"; } if (m.initiatorDeviceJid != null && m.hasOwnProperty("initiatorDeviceJid")) { d.initiatorDeviceJid = m.initiatorDeviceJid; + if (o.oneofs) + d._initiatorDeviceJid = "initiatorDeviceJid"; } if (m.initiatedByMe != null && m.hasOwnProperty("initiatedByMe")) { d.initiatedByMe = m.initiatedByMe; + if (o.oneofs) + d._initiatedByMe = "initiatedByMe"; } return d; }; @@ -24965,9 +29198,23 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - EmbeddedMessage.prototype.stanzaId = ""; + EmbeddedMessage.prototype.stanzaId = null; EmbeddedMessage.prototype.message = null; + let $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) + }); + EmbeddedMessage.create = function create(properties) { return new EmbeddedMessage(properties); }; @@ -25026,15 +29273,15 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.stanzaId = ""; - d.message = null; - } if (m.stanzaId != null && m.hasOwnProperty("stanzaId")) { d.stanzaId = m.stanzaId; + if (o.oneofs) + d._stanzaId = "stanzaId"; } if (m.message != null && m.hasOwnProperty("message")) { d.message = $root.proto.Message.toObject(m.message, o); + if (o.oneofs) + d._message = "message"; } return d; }; @@ -25062,20 +29309,106 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - EmbeddedMusic.prototype.musicContentMediaId = ""; - EmbeddedMusic.prototype.songId = ""; - EmbeddedMusic.prototype.author = ""; - EmbeddedMusic.prototype.title = ""; - EmbeddedMusic.prototype.artworkDirectPath = ""; - EmbeddedMusic.prototype.artworkSha256 = $util.newBuffer([]); - EmbeddedMusic.prototype.artworkEncSha256 = $util.newBuffer([]); - EmbeddedMusic.prototype.artistAttribution = ""; - EmbeddedMusic.prototype.countryBlocklist = $util.newBuffer([]); - EmbeddedMusic.prototype.isExplicit = false; - EmbeddedMusic.prototype.artworkMediaKey = $util.newBuffer([]); - EmbeddedMusic.prototype.musicSongStartTimeInMs = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - EmbeddedMusic.prototype.derivedContentStartTimeInMs = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - EmbeddedMusic.prototype.overlapDurationInMs = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + EmbeddedMusic.prototype.musicContentMediaId = null; + EmbeddedMusic.prototype.songId = null; + EmbeddedMusic.prototype.author = null; + EmbeddedMusic.prototype.title = null; + EmbeddedMusic.prototype.artworkDirectPath = null; + EmbeddedMusic.prototype.artworkSha256 = null; + EmbeddedMusic.prototype.artworkEncSha256 = null; + EmbeddedMusic.prototype.artistAttribution = null; + EmbeddedMusic.prototype.countryBlocklist = null; + EmbeddedMusic.prototype.isExplicit = null; + EmbeddedMusic.prototype.artworkMediaKey = null; + EmbeddedMusic.prototype.musicSongStartTimeInMs = null; + EmbeddedMusic.prototype.derivedContentStartTimeInMs = null; + EmbeddedMusic.prototype.overlapDurationInMs = null; + + let $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, "_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) + }); + + // 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, "_musicSongStartTimeInMs", { + get: $util.oneOfGetter($oneOfFields = ["musicSongStartTimeInMs"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(EmbeddedMusic.prototype, "_derivedContentStartTimeInMs", { + get: $util.oneOfGetter($oneOfFields = ["derivedContentStartTimeInMs"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(EmbeddedMusic.prototype, "_overlapDurationInMs", { + get: $util.oneOfGetter($oneOfFields = ["overlapDurationInMs"]), + set: $util.oneOfSetter($oneOfFields) + }); EmbeddedMusic.create = function create(properties) { return new EmbeddedMusic(properties); @@ -25274,108 +29607,84 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.musicContentMediaId = ""; - d.songId = ""; - d.author = ""; - d.title = ""; - d.artworkDirectPath = ""; - if (o.bytes === String) - d.artworkSha256 = ""; - else { - d.artworkSha256 = []; - if (o.bytes !== Array) - d.artworkSha256 = $util.newBuffer(d.artworkSha256); - } - if (o.bytes === String) - d.artworkEncSha256 = ""; - else { - d.artworkEncSha256 = []; - if (o.bytes !== Array) - d.artworkEncSha256 = $util.newBuffer(d.artworkEncSha256); - } - d.artistAttribution = ""; - if (o.bytes === String) - d.countryBlocklist = ""; - else { - d.countryBlocklist = []; - if (o.bytes !== Array) - d.countryBlocklist = $util.newBuffer(d.countryBlocklist); - } - d.isExplicit = false; - if (o.bytes === String) - d.artworkMediaKey = ""; - else { - d.artworkMediaKey = []; - if (o.bytes !== Array) - d.artworkMediaKey = $util.newBuffer(d.artworkMediaKey); - } - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.musicSongStartTimeInMs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.musicSongStartTimeInMs = o.longs === String ? "0" : 0; - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.derivedContentStartTimeInMs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.derivedContentStartTimeInMs = o.longs === String ? "0" : 0; - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.overlapDurationInMs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.overlapDurationInMs = o.longs === String ? "0" : 0; - } if (m.musicContentMediaId != null && m.hasOwnProperty("musicContentMediaId")) { d.musicContentMediaId = m.musicContentMediaId; + if (o.oneofs) + d._musicContentMediaId = "musicContentMediaId"; } if (m.songId != null && m.hasOwnProperty("songId")) { d.songId = m.songId; + if (o.oneofs) + d._songId = "songId"; } if (m.author != null && m.hasOwnProperty("author")) { d.author = m.author; + if (o.oneofs) + d._author = "author"; } if (m.title != null && m.hasOwnProperty("title")) { d.title = m.title; + if (o.oneofs) + d._title = "title"; } if (m.artworkDirectPath != null && m.hasOwnProperty("artworkDirectPath")) { d.artworkDirectPath = m.artworkDirectPath; + if (o.oneofs) + d._artworkDirectPath = "artworkDirectPath"; } if (m.artworkSha256 != null && m.hasOwnProperty("artworkSha256")) { d.artworkSha256 = o.bytes === String ? $util.base64.encode(m.artworkSha256, 0, m.artworkSha256.length) : o.bytes === Array ? Array.prototype.slice.call(m.artworkSha256) : m.artworkSha256; + if (o.oneofs) + d._artworkSha256 = "artworkSha256"; } if (m.artworkEncSha256 != null && m.hasOwnProperty("artworkEncSha256")) { d.artworkEncSha256 = o.bytes === String ? $util.base64.encode(m.artworkEncSha256, 0, m.artworkEncSha256.length) : o.bytes === Array ? Array.prototype.slice.call(m.artworkEncSha256) : m.artworkEncSha256; + if (o.oneofs) + d._artworkEncSha256 = "artworkEncSha256"; } if (m.artistAttribution != null && m.hasOwnProperty("artistAttribution")) { d.artistAttribution = m.artistAttribution; + if (o.oneofs) + d._artistAttribution = "artistAttribution"; } if (m.countryBlocklist != null && m.hasOwnProperty("countryBlocklist")) { d.countryBlocklist = o.bytes === String ? $util.base64.encode(m.countryBlocklist, 0, m.countryBlocklist.length) : o.bytes === Array ? Array.prototype.slice.call(m.countryBlocklist) : m.countryBlocklist; + if (o.oneofs) + d._countryBlocklist = "countryBlocklist"; } if (m.isExplicit != null && m.hasOwnProperty("isExplicit")) { d.isExplicit = m.isExplicit; + if (o.oneofs) + d._isExplicit = "isExplicit"; } if (m.artworkMediaKey != null && m.hasOwnProperty("artworkMediaKey")) { d.artworkMediaKey = o.bytes === String ? $util.base64.encode(m.artworkMediaKey, 0, m.artworkMediaKey.length) : o.bytes === Array ? Array.prototype.slice.call(m.artworkMediaKey) : m.artworkMediaKey; + if (o.oneofs) + d._artworkMediaKey = "artworkMediaKey"; } if (m.musicSongStartTimeInMs != null && m.hasOwnProperty("musicSongStartTimeInMs")) { if (typeof m.musicSongStartTimeInMs === "number") d.musicSongStartTimeInMs = o.longs === String ? String(m.musicSongStartTimeInMs) : m.musicSongStartTimeInMs; else d.musicSongStartTimeInMs = o.longs === String ? longToString(m.musicSongStartTimeInMs) : o.longs === Number ? longToNumber(m.musicSongStartTimeInMs) : m.musicSongStartTimeInMs; + if (o.oneofs) + d._musicSongStartTimeInMs = "musicSongStartTimeInMs"; } if (m.derivedContentStartTimeInMs != null && m.hasOwnProperty("derivedContentStartTimeInMs")) { if (typeof m.derivedContentStartTimeInMs === "number") d.derivedContentStartTimeInMs = o.longs === String ? String(m.derivedContentStartTimeInMs) : m.derivedContentStartTimeInMs; else d.derivedContentStartTimeInMs = o.longs === String ? longToString(m.derivedContentStartTimeInMs) : o.longs === Number ? longToNumber(m.derivedContentStartTimeInMs) : m.derivedContentStartTimeInMs; + if (o.oneofs) + d._derivedContentStartTimeInMs = "derivedContentStartTimeInMs"; } if (m.overlapDurationInMs != null && m.hasOwnProperty("overlapDurationInMs")) { if (typeof m.overlapDurationInMs === "number") d.overlapDurationInMs = o.longs === String ? String(m.overlapDurationInMs) : m.overlapDurationInMs; else d.overlapDurationInMs = o.longs === String ? longToString(m.overlapDurationInMs) : o.longs === Number ? longToNumber(m.overlapDurationInMs) : m.overlapDurationInMs; + if (o.oneofs) + d._overlapDurationInMs = "overlapDurationInMs"; } return d; }; @@ -25403,8 +29712,22 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - EncryptedPairingRequest.prototype.encryptedPayload = $util.newBuffer([]); - EncryptedPairingRequest.prototype.iv = $util.newBuffer([]); + EncryptedPairingRequest.prototype.encryptedPayload = null; + EncryptedPairingRequest.prototype.iv = null; + + let $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) + }); EncryptedPairingRequest.create = function create(properties) { return new EncryptedPairingRequest(properties); @@ -25468,27 +29791,15 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - if (o.bytes === String) - d.encryptedPayload = ""; - else { - d.encryptedPayload = []; - if (o.bytes !== Array) - d.encryptedPayload = $util.newBuffer(d.encryptedPayload); - } - if (o.bytes === String) - d.iv = ""; - else { - d.iv = []; - if (o.bytes !== Array) - d.iv = $util.newBuffer(d.iv); - } - } if (m.encryptedPayload != null && m.hasOwnProperty("encryptedPayload")) { d.encryptedPayload = o.bytes === String ? $util.base64.encode(m.encryptedPayload, 0, m.encryptedPayload.length) : o.bytes === Array ? Array.prototype.slice.call(m.encryptedPayload) : m.encryptedPayload; + if (o.oneofs) + d._encryptedPayload = "encryptedPayload"; } if (m.iv != null && m.hasOwnProperty("iv")) { d.iv = o.bytes === String ? $util.base64.encode(m.iv, 0, m.iv.length) : o.bytes === Array ? Array.prototype.slice.call(m.iv) : m.iv; + if (o.oneofs) + d._iv = "iv"; } return d; }; @@ -25516,8 +29827,22 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - EphemeralSetting.prototype.duration = 0; - EphemeralSetting.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + EphemeralSetting.prototype.duration = null; + EphemeralSetting.prototype.timestamp = null; + + let $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) + }); EphemeralSetting.create = function create(properties) { return new EphemeralSetting(properties); @@ -25582,22 +29907,18 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.duration = 0; - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.timestamp = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.timestamp = o.longs === String ? "0" : 0; - } if (m.duration != null && m.hasOwnProperty("duration")) { d.duration = m.duration; + if (o.oneofs) + d._duration = "duration"; } if (m.timestamp != null && m.hasOwnProperty("timestamp")) { if (typeof m.timestamp === "number") d.timestamp = o.longs === String ? String(m.timestamp) : m.timestamp; else d.timestamp = o.longs === String ? longToString(m.timestamp) : o.longs === Number ? longToNumber(m.timestamp) : m.timestamp; + if (o.oneofs) + d._timestamp = "timestamp"; } return d; }; @@ -25625,7 +29946,15 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - EventAdditionalMetadata.prototype.isStale = false; + EventAdditionalMetadata.prototype.isStale = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(EventAdditionalMetadata.prototype, "_isStale", { + get: $util.oneOfGetter($oneOfFields = ["isStale"]), + set: $util.oneOfSetter($oneOfFields) + }); EventAdditionalMetadata.create = function create(properties) { return new EventAdditionalMetadata(properties); @@ -25674,11 +30003,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.isStale = false; - } if (m.isStale != null && m.hasOwnProperty("isStale")) { d.isStale = m.isStale; + if (o.oneofs) + d._isStale = "isStale"; } return d; }; @@ -25707,9 +30035,35 @@ export const proto = $root.proto = (() => { } EventResponse.prototype.eventResponseMessageKey = null; - EventResponse.prototype.timestampMs = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + EventResponse.prototype.timestampMs = null; EventResponse.prototype.eventResponseMessage = null; - EventResponse.prototype.unread = false; + EventResponse.prototype.unread = null; + + let $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) + }); EventResponse.create = function create(properties) { return new EventResponse(properties); @@ -25796,30 +30150,28 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.eventResponseMessageKey = null; - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.timestampMs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.timestampMs = o.longs === String ? "0" : 0; - d.eventResponseMessage = null; - d.unread = false; - } if (m.eventResponseMessageKey != null && m.hasOwnProperty("eventResponseMessageKey")) { d.eventResponseMessageKey = $root.proto.MessageKey.toObject(m.eventResponseMessageKey, o); + if (o.oneofs) + d._eventResponseMessageKey = "eventResponseMessageKey"; } if (m.timestampMs != null && m.hasOwnProperty("timestampMs")) { if (typeof m.timestampMs === "number") d.timestampMs = o.longs === String ? String(m.timestampMs) : m.timestampMs; else d.timestampMs = o.longs === String ? longToString(m.timestampMs) : o.longs === Number ? longToNumber(m.timestampMs) : m.timestampMs; + if (o.oneofs) + d._timestampMs = "timestampMs"; } if (m.eventResponseMessage != null && m.hasOwnProperty("eventResponseMessage")) { d.eventResponseMessage = $root.proto.Message.EventResponseMessage.toObject(m.eventResponseMessage, o); + if (o.oneofs) + d._eventResponseMessage = "eventResponseMessage"; } if (m.unread != null && m.hasOwnProperty("unread")) { d.unread = m.unread; + if (o.oneofs) + d._unread = "unread"; } return d; }; @@ -25847,8 +30199,22 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - ExitCode.prototype.code = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - ExitCode.prototype.text = ""; + ExitCode.prototype.code = null; + ExitCode.prototype.text = null; + + let $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) + }); ExitCode.create = function create(properties) { return new ExitCode(properties); @@ -25913,22 +30279,18 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - if ($util.Long) { - var n = new $util.Long(0, 0, true); - d.code = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.code = o.longs === String ? "0" : 0; - d.text = ""; - } if (m.code != null && m.hasOwnProperty("code")) { if (typeof m.code === "number") d.code = o.longs === String ? String(m.code) : m.code; else d.code = o.longs === String ? longToString(m.code, true) : o.longs === Number ? longToNumber(m.code, true) : m.code; + if (o.oneofs) + d._code = "code"; } if (m.text != null && m.hasOwnProperty("text")) { d.text = m.text; + if (o.oneofs) + d._text = "text"; } return d; }; @@ -25956,12 +30318,50 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - ExternalBlobReference.prototype.mediaKey = $util.newBuffer([]); - ExternalBlobReference.prototype.directPath = ""; - ExternalBlobReference.prototype.handle = ""; - ExternalBlobReference.prototype.fileSizeBytes = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - ExternalBlobReference.prototype.fileSha256 = $util.newBuffer([]); - ExternalBlobReference.prototype.fileEncSha256 = $util.newBuffer([]); + ExternalBlobReference.prototype.mediaKey = null; + ExternalBlobReference.prototype.directPath = null; + ExternalBlobReference.prototype.handle = null; + ExternalBlobReference.prototype.fileSizeBytes = null; + ExternalBlobReference.prototype.fileSha256 = null; + ExternalBlobReference.prototype.fileEncSha256 = null; + + let $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) + }); ExternalBlobReference.create = function create(properties) { return new ExternalBlobReference(properties); @@ -26071,56 +30471,38 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - if (o.bytes === String) - d.mediaKey = ""; - else { - d.mediaKey = []; - if (o.bytes !== Array) - d.mediaKey = $util.newBuffer(d.mediaKey); - } - d.directPath = ""; - d.handle = ""; - if ($util.Long) { - var n = new $util.Long(0, 0, true); - d.fileSizeBytes = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.fileSizeBytes = o.longs === String ? "0" : 0; - if (o.bytes === String) - d.fileSha256 = ""; - else { - d.fileSha256 = []; - if (o.bytes !== Array) - d.fileSha256 = $util.newBuffer(d.fileSha256); - } - if (o.bytes === String) - d.fileEncSha256 = ""; - else { - d.fileEncSha256 = []; - if (o.bytes !== Array) - d.fileEncSha256 = $util.newBuffer(d.fileEncSha256); - } - } if (m.mediaKey != null && m.hasOwnProperty("mediaKey")) { d.mediaKey = o.bytes === String ? $util.base64.encode(m.mediaKey, 0, m.mediaKey.length) : o.bytes === Array ? Array.prototype.slice.call(m.mediaKey) : m.mediaKey; + if (o.oneofs) + d._mediaKey = "mediaKey"; } if (m.directPath != null && m.hasOwnProperty("directPath")) { d.directPath = m.directPath; + if (o.oneofs) + d._directPath = "directPath"; } if (m.handle != null && m.hasOwnProperty("handle")) { d.handle = m.handle; + if (o.oneofs) + d._handle = "handle"; } if (m.fileSizeBytes != null && m.hasOwnProperty("fileSizeBytes")) { if (typeof m.fileSizeBytes === "number") d.fileSizeBytes = o.longs === String ? String(m.fileSizeBytes) : m.fileSizeBytes; else d.fileSizeBytes = o.longs === String ? longToString(m.fileSizeBytes, true) : o.longs === Number ? longToNumber(m.fileSizeBytes, true) : m.fileSizeBytes; + if (o.oneofs) + d._fileSizeBytes = "fileSizeBytes"; } if (m.fileSha256 != null && m.hasOwnProperty("fileSha256")) { d.fileSha256 = o.bytes === String ? $util.base64.encode(m.fileSha256, 0, m.fileSha256.length) : o.bytes === Array ? Array.prototype.slice.call(m.fileSha256) : m.fileSha256; + if (o.oneofs) + d._fileSha256 = "fileSha256"; } if (m.fileEncSha256 != null && m.hasOwnProperty("fileEncSha256")) { d.fileEncSha256 = o.bytes === String ? $util.base64.encode(m.fileEncSha256, 0, m.fileEncSha256.length) : o.bytes === Array ? Array.prototype.slice.call(m.fileEncSha256) : m.fileEncSha256; + if (o.oneofs) + d._fileEncSha256 = "fileEncSha256"; } return d; }; @@ -26149,12 +30531,38 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - Field.prototype.minVersion = 0; - Field.prototype.maxVersion = 0; - Field.prototype.notReportableMinVersion = 0; - Field.prototype.isMessage = false; + Field.prototype.minVersion = null; + Field.prototype.maxVersion = null; + Field.prototype.notReportableMinVersion = null; + Field.prototype.isMessage = null; Field.prototype.subfield = $util.emptyObject; + let $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) + }); + Field.create = function create(properties) { return new Field(properties); }; @@ -26271,23 +30679,25 @@ export const proto = $root.proto = (() => { if (o.objects || o.defaults) { d.subfield = {}; } - if (o.defaults) { - d.minVersion = 0; - d.maxVersion = 0; - d.notReportableMinVersion = 0; - d.isMessage = false; - } if (m.minVersion != null && m.hasOwnProperty("minVersion")) { d.minVersion = m.minVersion; + if (o.oneofs) + d._minVersion = "minVersion"; } if (m.maxVersion != null && m.hasOwnProperty("maxVersion")) { d.maxVersion = m.maxVersion; + if (o.oneofs) + d._maxVersion = "maxVersion"; } if (m.notReportableMinVersion != null && m.hasOwnProperty("notReportableMinVersion")) { d.notReportableMinVersion = m.notReportableMinVersion; + if (o.oneofs) + d._notReportableMinVersion = "notReportableMinVersion"; } if (m.isMessage != null && m.hasOwnProperty("isMessage")) { d.isMessage = m.isMessage; + if (o.oneofs) + d._isMessage = "isMessage"; } var ks2; if (m.subfield && (ks2 = Object.keys(m.subfield)).length) { @@ -26322,9 +30732,29 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - ForwardedAIBotMessageInfo.prototype.botName = ""; - ForwardedAIBotMessageInfo.prototype.botJid = ""; - ForwardedAIBotMessageInfo.prototype.creatorName = ""; + ForwardedAIBotMessageInfo.prototype.botName = null; + ForwardedAIBotMessageInfo.prototype.botJid = null; + ForwardedAIBotMessageInfo.prototype.creatorName = null; + + let $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) + }); ForwardedAIBotMessageInfo.create = function create(properties) { return new ForwardedAIBotMessageInfo(properties); @@ -26391,19 +30821,20 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.botName = ""; - d.botJid = ""; - d.creatorName = ""; - } if (m.botName != null && m.hasOwnProperty("botName")) { d.botName = m.botName; + if (o.oneofs) + d._botName = "botName"; } if (m.botJid != null && m.hasOwnProperty("botJid")) { d.botJid = m.botJid; + if (o.oneofs) + d._botJid = "botJid"; } if (m.creatorName != null && m.hasOwnProperty("creatorName")) { d.creatorName = m.creatorName; + if (o.oneofs) + d._creatorName = "creatorName"; } return d; }; @@ -26432,25 +30863,147 @@ export const proto = $root.proto = (() => { } GlobalSettings.prototype.lightThemeWallpaper = null; - GlobalSettings.prototype.mediaVisibility = 0; + GlobalSettings.prototype.mediaVisibility = null; GlobalSettings.prototype.darkThemeWallpaper = null; GlobalSettings.prototype.autoDownloadWiFi = null; GlobalSettings.prototype.autoDownloadCellular = null; GlobalSettings.prototype.autoDownloadRoaming = null; - GlobalSettings.prototype.showIndividualNotificationsPreview = false; - GlobalSettings.prototype.showGroupNotificationsPreview = false; - GlobalSettings.prototype.disappearingModeDuration = 0; - GlobalSettings.prototype.disappearingModeTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + GlobalSettings.prototype.showIndividualNotificationsPreview = null; + GlobalSettings.prototype.showGroupNotificationsPreview = null; + GlobalSettings.prototype.disappearingModeDuration = null; + GlobalSettings.prototype.disappearingModeTimestamp = null; GlobalSettings.prototype.avatarUserSettings = null; - GlobalSettings.prototype.fontSize = 0; - GlobalSettings.prototype.securityNotifications = false; - GlobalSettings.prototype.autoUnarchiveChats = false; - GlobalSettings.prototype.videoQualityMode = 0; - GlobalSettings.prototype.photoQualityMode = 0; + GlobalSettings.prototype.fontSize = null; + GlobalSettings.prototype.securityNotifications = null; + GlobalSettings.prototype.autoUnarchiveChats = null; + GlobalSettings.prototype.videoQualityMode = null; + GlobalSettings.prototype.photoQualityMode = null; GlobalSettings.prototype.individualNotificationSettings = null; GlobalSettings.prototype.groupNotificationSettings = null; GlobalSettings.prototype.chatLockSettings = null; - GlobalSettings.prototype.chatDbLidMigrationTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + GlobalSettings.prototype.chatDbLidMigrationTimestamp = null; + + let $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) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(GlobalSettings.prototype, "_chatDbLidMigrationTimestamp", { + get: $util.oneOfGetter($oneOfFields = ["chatDbLidMigrationTimestamp"]), + set: $util.oneOfSetter($oneOfFields) + }); GlobalSettings.create = function create(properties) { return new GlobalSettings(properties); @@ -26719,101 +31272,111 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.lightThemeWallpaper = null; - d.mediaVisibility = o.enums === String ? "DEFAULT" : 0; - d.darkThemeWallpaper = null; - d.autoDownloadWiFi = null; - d.autoDownloadCellular = null; - d.autoDownloadRoaming = null; - d.showIndividualNotificationsPreview = false; - d.showGroupNotificationsPreview = false; - d.disappearingModeDuration = 0; - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.disappearingModeTimestamp = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.disappearingModeTimestamp = o.longs === String ? "0" : 0; - d.avatarUserSettings = null; - d.fontSize = 0; - d.securityNotifications = false; - d.autoUnarchiveChats = false; - d.videoQualityMode = 0; - d.photoQualityMode = 0; - d.individualNotificationSettings = null; - d.groupNotificationSettings = null; - d.chatLockSettings = null; - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.chatDbLidMigrationTimestamp = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.chatDbLidMigrationTimestamp = o.longs === String ? "0" : 0; - } if (m.lightThemeWallpaper != null && m.hasOwnProperty("lightThemeWallpaper")) { d.lightThemeWallpaper = $root.proto.WallpaperSettings.toObject(m.lightThemeWallpaper, o); + if (o.oneofs) + d._lightThemeWallpaper = "lightThemeWallpaper"; } if (m.mediaVisibility != null && m.hasOwnProperty("mediaVisibility")) { d.mediaVisibility = o.enums === String ? $root.proto.MediaVisibility[m.mediaVisibility] === undefined ? m.mediaVisibility : $root.proto.MediaVisibility[m.mediaVisibility] : m.mediaVisibility; + if (o.oneofs) + d._mediaVisibility = "mediaVisibility"; } if (m.darkThemeWallpaper != null && m.hasOwnProperty("darkThemeWallpaper")) { d.darkThemeWallpaper = $root.proto.WallpaperSettings.toObject(m.darkThemeWallpaper, o); + if (o.oneofs) + d._darkThemeWallpaper = "darkThemeWallpaper"; } if (m.autoDownloadWiFi != null && m.hasOwnProperty("autoDownloadWiFi")) { d.autoDownloadWiFi = $root.proto.AutoDownloadSettings.toObject(m.autoDownloadWiFi, o); + if (o.oneofs) + d._autoDownloadWiFi = "autoDownloadWiFi"; } if (m.autoDownloadCellular != null && m.hasOwnProperty("autoDownloadCellular")) { d.autoDownloadCellular = $root.proto.AutoDownloadSettings.toObject(m.autoDownloadCellular, o); + if (o.oneofs) + d._autoDownloadCellular = "autoDownloadCellular"; } if (m.autoDownloadRoaming != null && m.hasOwnProperty("autoDownloadRoaming")) { d.autoDownloadRoaming = $root.proto.AutoDownloadSettings.toObject(m.autoDownloadRoaming, o); + if (o.oneofs) + d._autoDownloadRoaming = "autoDownloadRoaming"; } if (m.showIndividualNotificationsPreview != null && m.hasOwnProperty("showIndividualNotificationsPreview")) { d.showIndividualNotificationsPreview = m.showIndividualNotificationsPreview; + if (o.oneofs) + d._showIndividualNotificationsPreview = "showIndividualNotificationsPreview"; } if (m.showGroupNotificationsPreview != null && m.hasOwnProperty("showGroupNotificationsPreview")) { d.showGroupNotificationsPreview = m.showGroupNotificationsPreview; + if (o.oneofs) + d._showGroupNotificationsPreview = "showGroupNotificationsPreview"; } if (m.disappearingModeDuration != null && m.hasOwnProperty("disappearingModeDuration")) { d.disappearingModeDuration = m.disappearingModeDuration; + if (o.oneofs) + d._disappearingModeDuration = "disappearingModeDuration"; } if (m.disappearingModeTimestamp != null && m.hasOwnProperty("disappearingModeTimestamp")) { if (typeof m.disappearingModeTimestamp === "number") d.disappearingModeTimestamp = o.longs === String ? String(m.disappearingModeTimestamp) : m.disappearingModeTimestamp; else d.disappearingModeTimestamp = o.longs === String ? longToString(m.disappearingModeTimestamp) : o.longs === Number ? longToNumber(m.disappearingModeTimestamp) : m.disappearingModeTimestamp; + if (o.oneofs) + d._disappearingModeTimestamp = "disappearingModeTimestamp"; } if (m.avatarUserSettings != null && m.hasOwnProperty("avatarUserSettings")) { d.avatarUserSettings = $root.proto.AvatarUserSettings.toObject(m.avatarUserSettings, o); + if (o.oneofs) + d._avatarUserSettings = "avatarUserSettings"; } if (m.fontSize != null && m.hasOwnProperty("fontSize")) { d.fontSize = m.fontSize; + if (o.oneofs) + d._fontSize = "fontSize"; } if (m.securityNotifications != null && m.hasOwnProperty("securityNotifications")) { d.securityNotifications = m.securityNotifications; + if (o.oneofs) + d._securityNotifications = "securityNotifications"; } if (m.autoUnarchiveChats != null && m.hasOwnProperty("autoUnarchiveChats")) { d.autoUnarchiveChats = m.autoUnarchiveChats; + if (o.oneofs) + d._autoUnarchiveChats = "autoUnarchiveChats"; } if (m.videoQualityMode != null && m.hasOwnProperty("videoQualityMode")) { d.videoQualityMode = m.videoQualityMode; + if (o.oneofs) + d._videoQualityMode = "videoQualityMode"; } if (m.photoQualityMode != null && m.hasOwnProperty("photoQualityMode")) { d.photoQualityMode = m.photoQualityMode; + if (o.oneofs) + d._photoQualityMode = "photoQualityMode"; } if (m.individualNotificationSettings != null && m.hasOwnProperty("individualNotificationSettings")) { d.individualNotificationSettings = $root.proto.NotificationSettings.toObject(m.individualNotificationSettings, o); + if (o.oneofs) + d._individualNotificationSettings = "individualNotificationSettings"; } if (m.groupNotificationSettings != null && m.hasOwnProperty("groupNotificationSettings")) { d.groupNotificationSettings = $root.proto.NotificationSettings.toObject(m.groupNotificationSettings, o); + if (o.oneofs) + d._groupNotificationSettings = "groupNotificationSettings"; } if (m.chatLockSettings != null && m.hasOwnProperty("chatLockSettings")) { d.chatLockSettings = $root.proto.ChatLockSettings.toObject(m.chatLockSettings, o); + if (o.oneofs) + d._chatLockSettings = "chatLockSettings"; } if (m.chatDbLidMigrationTimestamp != null && m.hasOwnProperty("chatDbLidMigrationTimestamp")) { if (typeof m.chatDbLidMigrationTimestamp === "number") d.chatDbLidMigrationTimestamp = o.longs === String ? String(m.chatDbLidMigrationTimestamp) : m.chatDbLidMigrationTimestamp; else d.chatDbLidMigrationTimestamp = o.longs === String ? longToString(m.chatDbLidMigrationTimestamp) : o.longs === Number ? longToNumber(m.chatDbLidMigrationTimestamp) : m.chatDbLidMigrationTimestamp; + if (o.oneofs) + d._chatDbLidMigrationTimestamp = "chatDbLidMigrationTimestamp"; } return d; }; @@ -26842,7 +31405,21 @@ export const proto = $root.proto = (() => { } GroupHistoryBundleInfo.prototype.deprecatedMessageHistoryBundle = null; - GroupHistoryBundleInfo.prototype.processState = 0; + GroupHistoryBundleInfo.prototype.processState = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(GroupHistoryBundleInfo.prototype, "_deprecatedMessageHistoryBundle", { + get: $util.oneOfGetter($oneOfFields = ["deprecatedMessageHistoryBundle"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(GroupHistoryBundleInfo.prototype, "_processState", { + get: $util.oneOfGetter($oneOfFields = ["processState"]), + set: $util.oneOfSetter($oneOfFields) + }); GroupHistoryBundleInfo.create = function create(properties) { return new GroupHistoryBundleInfo(properties); @@ -26927,15 +31504,15 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.deprecatedMessageHistoryBundle = null; - d.processState = o.enums === String ? "NOT_INJECTED" : 0; - } if (m.deprecatedMessageHistoryBundle != null && m.hasOwnProperty("deprecatedMessageHistoryBundle")) { d.deprecatedMessageHistoryBundle = $root.proto.Message.MessageHistoryBundle.toObject(m.deprecatedMessageHistoryBundle, o); + if (o.oneofs) + d._deprecatedMessageHistoryBundle = "deprecatedMessageHistoryBundle"; } if (m.processState != null && m.hasOwnProperty("processState")) { d.processState = o.enums === String ? $root.proto.GroupHistoryBundleInfo.ProcessState[m.processState] === undefined ? m.processState : $root.proto.GroupHistoryBundleInfo.ProcessState[m.processState] : m.processState; + if (o.oneofs) + d._processState = "processState"; } return d; }; @@ -26974,7 +31551,21 @@ export const proto = $root.proto = (() => { } GroupHistoryIndividualMessageInfo.prototype.bundleMessageKey = null; - GroupHistoryIndividualMessageInfo.prototype.editedAfterReceivedAsHistory = false; + GroupHistoryIndividualMessageInfo.prototype.editedAfterReceivedAsHistory = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(GroupHistoryIndividualMessageInfo.prototype, "_bundleMessageKey", { + get: $util.oneOfGetter($oneOfFields = ["bundleMessageKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(GroupHistoryIndividualMessageInfo.prototype, "_editedAfterReceivedAsHistory", { + get: $util.oneOfGetter($oneOfFields = ["editedAfterReceivedAsHistory"]), + set: $util.oneOfSetter($oneOfFields) + }); GroupHistoryIndividualMessageInfo.create = function create(properties) { return new GroupHistoryIndividualMessageInfo(properties); @@ -27034,15 +31625,15 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.bundleMessageKey = null; - d.editedAfterReceivedAsHistory = false; - } if (m.bundleMessageKey != null && m.hasOwnProperty("bundleMessageKey")) { d.bundleMessageKey = $root.proto.MessageKey.toObject(m.bundleMessageKey, o); + if (o.oneofs) + d._bundleMessageKey = "bundleMessageKey"; } if (m.editedAfterReceivedAsHistory != null && m.hasOwnProperty("editedAfterReceivedAsHistory")) { d.editedAfterReceivedAsHistory = m.editedAfterReceivedAsHistory; + if (o.oneofs) + d._editedAfterReceivedAsHistory = "editedAfterReceivedAsHistory"; } return d; }; @@ -27070,8 +31661,22 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - GroupMention.prototype.groupJid = ""; - GroupMention.prototype.groupSubject = ""; + GroupMention.prototype.groupJid = null; + GroupMention.prototype.groupSubject = null; + + let $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) + }); GroupMention.create = function create(properties) { return new GroupMention(properties); @@ -27129,15 +31734,15 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.groupJid = ""; - d.groupSubject = ""; - } if (m.groupJid != null && m.hasOwnProperty("groupJid")) { d.groupJid = m.groupJid; + if (o.oneofs) + d._groupJid = "groupJid"; } if (m.groupSubject != null && m.hasOwnProperty("groupSubject")) { d.groupSubject = m.groupSubject; + if (o.oneofs) + d._groupSubject = "groupSubject"; } return d; }; @@ -27165,10 +31770,30 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - GroupParticipant.prototype.userJid = ""; - GroupParticipant.prototype.rank = 0; + GroupParticipant.prototype.userJid = null; + GroupParticipant.prototype.rank = null; GroupParticipant.prototype.memberLabel = null; + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(GroupParticipant.prototype, "_userJid", { + get: $util.oneOfGetter($oneOfFields = ["userJid"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(GroupParticipant.prototype, "_rank", { + get: $util.oneOfGetter($oneOfFields = ["rank"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(GroupParticipant.prototype, "_memberLabel", { + get: $util.oneOfGetter($oneOfFields = ["memberLabel"]), + set: $util.oneOfSetter($oneOfFields) + }); + GroupParticipant.create = function create(properties) { return new GroupParticipant(properties); }; @@ -27176,7 +31801,8 @@ export const proto = $root.proto = (() => { GroupParticipant.encode = function encode(m, w) { if (!w) w = $Writer.create(); - w.uint32(10).string(m.userJid); + if (m.userJid != null && Object.hasOwnProperty.call(m, "userJid")) + w.uint32(10).string(m.userJid); if (m.rank != null && Object.hasOwnProperty.call(m, "rank")) w.uint32(16).int32(m.rank); if (m.memberLabel != null && Object.hasOwnProperty.call(m, "memberLabel")) @@ -27210,8 +31836,6 @@ export const proto = $root.proto = (() => { break; } } - if (!m.hasOwnProperty("userJid")) - throw $util.ProtocolError("missing required 'userJid'", { instance: m }); return m; }; @@ -27254,19 +31878,20 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.userJid = ""; - d.rank = o.enums === String ? "REGULAR" : 0; - d.memberLabel = null; - } if (m.userJid != null && m.hasOwnProperty("userJid")) { d.userJid = m.userJid; + if (o.oneofs) + d._userJid = "userJid"; } if (m.rank != null && m.hasOwnProperty("rank")) { d.rank = o.enums === String ? $root.proto.GroupParticipant.Rank[m.rank] === undefined ? m.rank : $root.proto.GroupParticipant.Rank[m.rank] : m.rank; + if (o.oneofs) + d._rank = "rank"; } if (m.memberLabel != null && m.hasOwnProperty("memberLabel")) { d.memberLabel = $root.proto.MemberLabel.toObject(m.memberLabel, o); + if (o.oneofs) + d._memberLabel = "memberLabel"; } return d; }; @@ -27306,6 +31931,26 @@ export const proto = $root.proto = (() => { HandshakeMessage.prototype.serverHello = null; HandshakeMessage.prototype.clientFinish = null; + let $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) + }); + HandshakeMessage.create = function create(properties) { return new HandshakeMessage(properties); }; @@ -27377,19 +32022,20 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.clientHello = null; - d.serverHello = null; - d.clientFinish = null; - } if (m.clientHello != null && m.hasOwnProperty("clientHello")) { d.clientHello = $root.proto.HandshakeMessage.ClientHello.toObject(m.clientHello, o); + if (o.oneofs) + d._clientHello = "clientHello"; } if (m.serverHello != null && m.hasOwnProperty("serverHello")) { d.serverHello = $root.proto.HandshakeMessage.ServerHello.toObject(m.serverHello, o); + if (o.oneofs) + d._serverHello = "serverHello"; } if (m.clientFinish != null && m.hasOwnProperty("clientFinish")) { d.clientFinish = $root.proto.HandshakeMessage.ClientFinish.toObject(m.clientFinish, o); + if (o.oneofs) + d._clientFinish = "clientFinish"; } return d; }; @@ -27414,9 +32060,29 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - ClientFinish.prototype["static"] = $util.newBuffer([]); - ClientFinish.prototype.payload = $util.newBuffer([]); - ClientFinish.prototype.extendedCiphertext = $util.newBuffer([]); + ClientFinish.prototype["static"] = null; + ClientFinish.prototype.payload = null; + ClientFinish.prototype.extendedCiphertext = null; + + let $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) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ClientFinish.prototype, "_extendedCiphertext", { + get: $util.oneOfGetter($oneOfFields = ["extendedCiphertext"]), + set: $util.oneOfSetter($oneOfFields) + }); ClientFinish.create = function create(properties) { return new ClientFinish(properties); @@ -27492,37 +32158,20 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - if (o.bytes === String) - d["static"] = ""; - else { - d["static"] = []; - if (o.bytes !== Array) - d["static"] = $util.newBuffer(d["static"]); - } - if (o.bytes === String) - d.payload = ""; - else { - d.payload = []; - if (o.bytes !== Array) - d.payload = $util.newBuffer(d.payload); - } - if (o.bytes === String) - d.extendedCiphertext = ""; - else { - d.extendedCiphertext = []; - if (o.bytes !== Array) - d.extendedCiphertext = $util.newBuffer(d.extendedCiphertext); - } - } if (m["static"] != null && m.hasOwnProperty("static")) { d["static"] = o.bytes === String ? $util.base64.encode(m["static"], 0, m["static"].length) : o.bytes === Array ? Array.prototype.slice.call(m["static"]) : m["static"]; + if (o.oneofs) + d._static = "static"; } if (m.payload != null && m.hasOwnProperty("payload")) { d.payload = o.bytes === String ? $util.base64.encode(m.payload, 0, m.payload.length) : o.bytes === Array ? Array.prototype.slice.call(m.payload) : m.payload; + if (o.oneofs) + d._payload = "payload"; } if (m.extendedCiphertext != null && m.hasOwnProperty("extendedCiphertext")) { d.extendedCiphertext = o.bytes === String ? $util.base64.encode(m.extendedCiphertext, 0, m.extendedCiphertext.length) : o.bytes === Array ? Array.prototype.slice.call(m.extendedCiphertext) : m.extendedCiphertext; + if (o.oneofs) + d._extendedCiphertext = "extendedCiphertext"; } return d; }; @@ -27550,11 +32199,43 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - ClientHello.prototype.ephemeral = $util.newBuffer([]); - ClientHello.prototype["static"] = $util.newBuffer([]); - ClientHello.prototype.payload = $util.newBuffer([]); - ClientHello.prototype.useExtended = false; - ClientHello.prototype.extendedCiphertext = $util.newBuffer([]); + ClientHello.prototype.ephemeral = null; + ClientHello.prototype["static"] = null; + ClientHello.prototype.payload = null; + ClientHello.prototype.useExtended = null; + ClientHello.prototype.extendedCiphertext = null; + + let $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) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ClientHello.prototype, "_useExtended", { + get: $util.oneOfGetter($oneOfFields = ["useExtended"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ClientHello.prototype, "_extendedCiphertext", { + get: $util.oneOfGetter($oneOfFields = ["extendedCiphertext"]), + set: $util.oneOfSetter($oneOfFields) + }); ClientHello.create = function create(properties) { return new ClientHello(properties); @@ -27651,51 +32332,30 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - if (o.bytes === String) - d.ephemeral = ""; - else { - d.ephemeral = []; - if (o.bytes !== Array) - d.ephemeral = $util.newBuffer(d.ephemeral); - } - if (o.bytes === String) - d["static"] = ""; - else { - d["static"] = []; - if (o.bytes !== Array) - d["static"] = $util.newBuffer(d["static"]); - } - if (o.bytes === String) - d.payload = ""; - else { - d.payload = []; - if (o.bytes !== Array) - d.payload = $util.newBuffer(d.payload); - } - d.useExtended = false; - if (o.bytes === String) - d.extendedCiphertext = ""; - else { - d.extendedCiphertext = []; - if (o.bytes !== Array) - d.extendedCiphertext = $util.newBuffer(d.extendedCiphertext); - } - } if (m.ephemeral != null && m.hasOwnProperty("ephemeral")) { d.ephemeral = o.bytes === String ? $util.base64.encode(m.ephemeral, 0, m.ephemeral.length) : o.bytes === Array ? Array.prototype.slice.call(m.ephemeral) : m.ephemeral; + if (o.oneofs) + d._ephemeral = "ephemeral"; } if (m["static"] != null && m.hasOwnProperty("static")) { d["static"] = o.bytes === String ? $util.base64.encode(m["static"], 0, m["static"].length) : o.bytes === Array ? Array.prototype.slice.call(m["static"]) : m["static"]; + if (o.oneofs) + d._static = "static"; } if (m.payload != null && m.hasOwnProperty("payload")) { d.payload = o.bytes === String ? $util.base64.encode(m.payload, 0, m.payload.length) : o.bytes === Array ? Array.prototype.slice.call(m.payload) : m.payload; + if (o.oneofs) + d._payload = "payload"; } if (m.useExtended != null && m.hasOwnProperty("useExtended")) { d.useExtended = m.useExtended; + if (o.oneofs) + d._useExtended = "useExtended"; } if (m.extendedCiphertext != null && m.hasOwnProperty("extendedCiphertext")) { d.extendedCiphertext = o.bytes === String ? $util.base64.encode(m.extendedCiphertext, 0, m.extendedCiphertext.length) : o.bytes === Array ? Array.prototype.slice.call(m.extendedCiphertext) : m.extendedCiphertext; + if (o.oneofs) + d._extendedCiphertext = "extendedCiphertext"; } return d; }; @@ -27723,10 +32383,36 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - ServerHello.prototype.ephemeral = $util.newBuffer([]); - ServerHello.prototype["static"] = $util.newBuffer([]); - ServerHello.prototype.payload = $util.newBuffer([]); - ServerHello.prototype.extendedStatic = $util.newBuffer([]); + ServerHello.prototype.ephemeral = null; + ServerHello.prototype["static"] = null; + ServerHello.prototype.payload = null; + ServerHello.prototype.extendedStatic = null; + + let $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) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ServerHello.prototype, "_extendedStatic", { + get: $util.oneOfGetter($oneOfFields = ["extendedStatic"]), + set: $util.oneOfSetter($oneOfFields) + }); ServerHello.create = function create(properties) { return new ServerHello(properties); @@ -27814,47 +32500,25 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - if (o.bytes === String) - d.ephemeral = ""; - else { - d.ephemeral = []; - if (o.bytes !== Array) - d.ephemeral = $util.newBuffer(d.ephemeral); - } - if (o.bytes === String) - d["static"] = ""; - else { - d["static"] = []; - if (o.bytes !== Array) - d["static"] = $util.newBuffer(d["static"]); - } - if (o.bytes === String) - d.payload = ""; - else { - d.payload = []; - if (o.bytes !== Array) - d.payload = $util.newBuffer(d.payload); - } - if (o.bytes === String) - d.extendedStatic = ""; - else { - d.extendedStatic = []; - if (o.bytes !== Array) - d.extendedStatic = $util.newBuffer(d.extendedStatic); - } - } if (m.ephemeral != null && m.hasOwnProperty("ephemeral")) { d.ephemeral = o.bytes === String ? $util.base64.encode(m.ephemeral, 0, m.ephemeral.length) : o.bytes === Array ? Array.prototype.slice.call(m.ephemeral) : m.ephemeral; + if (o.oneofs) + d._ephemeral = "ephemeral"; } if (m["static"] != null && m.hasOwnProperty("static")) { d["static"] = o.bytes === String ? $util.base64.encode(m["static"], 0, m["static"].length) : o.bytes === Array ? Array.prototype.slice.call(m["static"]) : m["static"]; + if (o.oneofs) + d._static = "static"; } if (m.payload != null && m.hasOwnProperty("payload")) { d.payload = o.bytes === String ? $util.base64.encode(m.payload, 0, m.payload.length) : o.bytes === Array ? Array.prototype.slice.call(m.payload) : m.payload; + if (o.oneofs) + d._payload = "payload"; } if (m.extendedStatic != null && m.hasOwnProperty("extendedStatic")) { d.extendedStatic = o.bytes === String ? $util.base64.encode(m.extendedStatic, 0, m.extendedStatic.length) : o.bytes === Array ? Array.prototype.slice.call(m.extendedStatic) : m.extendedStatic; + if (o.oneofs) + d._extendedStatic = "extendedStatic"; } return d; }; @@ -27893,24 +32557,80 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - HistorySync.prototype.syncType = 0; + HistorySync.prototype.syncType = null; HistorySync.prototype.conversations = $util.emptyArray; HistorySync.prototype.statusV3Messages = $util.emptyArray; - HistorySync.prototype.chunkOrder = 0; - HistorySync.prototype.progress = 0; + HistorySync.prototype.chunkOrder = null; + HistorySync.prototype.progress = null; HistorySync.prototype.pushnames = $util.emptyArray; HistorySync.prototype.globalSettings = null; - HistorySync.prototype.threadIdUserSecret = $util.newBuffer([]); - HistorySync.prototype.threadDsTimeframeOffset = 0; + HistorySync.prototype.threadIdUserSecret = null; + HistorySync.prototype.threadDsTimeframeOffset = null; HistorySync.prototype.recentStickers = $util.emptyArray; HistorySync.prototype.pastParticipants = $util.emptyArray; HistorySync.prototype.callLogRecords = $util.emptyArray; - HistorySync.prototype.aiWaitListState = 0; + HistorySync.prototype.aiWaitListState = null; HistorySync.prototype.phoneNumberToLidMappings = $util.emptyArray; - HistorySync.prototype.companionMetaNonce = ""; - HistorySync.prototype.shareableChatIdentifierEncryptionKey = $util.newBuffer([]); + HistorySync.prototype.companionMetaNonce = null; + HistorySync.prototype.shareableChatIdentifierEncryptionKey = null; HistorySync.prototype.accounts = $util.emptyArray; + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HistorySync.prototype, "_syncType", { + get: $util.oneOfGetter($oneOfFields = ["syncType"]), + set: $util.oneOfSetter($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) + }); + HistorySync.create = function create(properties) { return new HistorySync(properties); }; @@ -27918,7 +32638,8 @@ export const proto = $root.proto = (() => { HistorySync.encode = function encode(m, w) { if (!w) w = $Writer.create(); - w.uint32(8).int32(m.syncType); + if (m.syncType != null && Object.hasOwnProperty.call(m, "syncType")) + w.uint32(8).int32(m.syncType); if (m.conversations != null && m.conversations.length) { for (var i = 0; i < m.conversations.length; ++i) $root.proto.Conversation.encode(m.conversations[i], w.uint32(18).fork()).ldelim(); @@ -28068,8 +32789,6 @@ export const proto = $root.proto = (() => { break; } } - if (!m.hasOwnProperty("syncType")) - throw $util.ProtocolError("missing required 'syncType'", { instance: m }); return m; }; @@ -28255,31 +32974,10 @@ export const proto = $root.proto = (() => { d.phoneNumberToLidMappings = []; d.accounts = []; } - if (o.defaults) { - d.syncType = o.enums === String ? "INITIAL_BOOTSTRAP" : 0; - d.chunkOrder = 0; - d.progress = 0; - d.globalSettings = null; - if (o.bytes === String) - d.threadIdUserSecret = ""; - else { - d.threadIdUserSecret = []; - if (o.bytes !== Array) - d.threadIdUserSecret = $util.newBuffer(d.threadIdUserSecret); - } - d.threadDsTimeframeOffset = 0; - d.aiWaitListState = o.enums === String ? "IN_WAITLIST" : 0; - d.companionMetaNonce = ""; - if (o.bytes === String) - d.shareableChatIdentifierEncryptionKey = ""; - else { - d.shareableChatIdentifierEncryptionKey = []; - if (o.bytes !== Array) - d.shareableChatIdentifierEncryptionKey = $util.newBuffer(d.shareableChatIdentifierEncryptionKey); - } - } if (m.syncType != null && m.hasOwnProperty("syncType")) { d.syncType = o.enums === String ? $root.proto.HistorySync.HistorySyncType[m.syncType] === undefined ? m.syncType : $root.proto.HistorySync.HistorySyncType[m.syncType] : m.syncType; + if (o.oneofs) + d._syncType = "syncType"; } if (m.conversations && m.conversations.length) { d.conversations = []; @@ -28295,9 +32993,13 @@ export const proto = $root.proto = (() => { } if (m.chunkOrder != null && m.hasOwnProperty("chunkOrder")) { d.chunkOrder = m.chunkOrder; + if (o.oneofs) + d._chunkOrder = "chunkOrder"; } if (m.progress != null && m.hasOwnProperty("progress")) { d.progress = m.progress; + if (o.oneofs) + d._progress = "progress"; } if (m.pushnames && m.pushnames.length) { d.pushnames = []; @@ -28307,12 +33009,18 @@ export const proto = $root.proto = (() => { } if (m.globalSettings != null && m.hasOwnProperty("globalSettings")) { d.globalSettings = $root.proto.GlobalSettings.toObject(m.globalSettings, o); + if (o.oneofs) + d._globalSettings = "globalSettings"; } if (m.threadIdUserSecret != null && m.hasOwnProperty("threadIdUserSecret")) { d.threadIdUserSecret = o.bytes === String ? $util.base64.encode(m.threadIdUserSecret, 0, m.threadIdUserSecret.length) : o.bytes === Array ? Array.prototype.slice.call(m.threadIdUserSecret) : m.threadIdUserSecret; + if (o.oneofs) + d._threadIdUserSecret = "threadIdUserSecret"; } if (m.threadDsTimeframeOffset != null && m.hasOwnProperty("threadDsTimeframeOffset")) { d.threadDsTimeframeOffset = m.threadDsTimeframeOffset; + if (o.oneofs) + d._threadDsTimeframeOffset = "threadDsTimeframeOffset"; } if (m.recentStickers && m.recentStickers.length) { d.recentStickers = []; @@ -28334,6 +33042,8 @@ export const proto = $root.proto = (() => { } if (m.aiWaitListState != null && m.hasOwnProperty("aiWaitListState")) { d.aiWaitListState = o.enums === String ? $root.proto.HistorySync.BotAIWaitListState[m.aiWaitListState] === undefined ? m.aiWaitListState : $root.proto.HistorySync.BotAIWaitListState[m.aiWaitListState] : m.aiWaitListState; + if (o.oneofs) + d._aiWaitListState = "aiWaitListState"; } if (m.phoneNumberToLidMappings && m.phoneNumberToLidMappings.length) { d.phoneNumberToLidMappings = []; @@ -28343,9 +33053,13 @@ export const proto = $root.proto = (() => { } if (m.companionMetaNonce != null && m.hasOwnProperty("companionMetaNonce")) { d.companionMetaNonce = m.companionMetaNonce; + if (o.oneofs) + d._companionMetaNonce = "companionMetaNonce"; } if (m.shareableChatIdentifierEncryptionKey != null && m.hasOwnProperty("shareableChatIdentifierEncryptionKey")) { d.shareableChatIdentifierEncryptionKey = o.bytes === String ? $util.base64.encode(m.shareableChatIdentifierEncryptionKey, 0, m.shareableChatIdentifierEncryptionKey.length) : o.bytes === Array ? Array.prototype.slice.call(m.shareableChatIdentifierEncryptionKey) : m.shareableChatIdentifierEncryptionKey; + if (o.oneofs) + d._shareableChatIdentifierEncryptionKey = "shareableChatIdentifierEncryptionKey"; } if (m.accounts && m.accounts.length) { d.accounts = []; @@ -28399,7 +33113,21 @@ export const proto = $root.proto = (() => { } HistorySyncMsg.prototype.message = null; - HistorySyncMsg.prototype.msgOrderId = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + HistorySyncMsg.prototype.msgOrderId = null; + + let $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) + }); HistorySyncMsg.create = function create(properties) { return new HistorySyncMsg(properties); @@ -28466,22 +33194,18 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.message = null; - if ($util.Long) { - var n = new $util.Long(0, 0, true); - d.msgOrderId = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.msgOrderId = o.longs === String ? "0" : 0; - } if (m.message != null && m.hasOwnProperty("message")) { d.message = $root.proto.WebMessageInfo.toObject(m.message, o); + if (o.oneofs) + d._message = "message"; } if (m.msgOrderId != null && m.hasOwnProperty("msgOrderId")) { if (typeof m.msgOrderId === "number") d.msgOrderId = o.longs === String ? String(m.msgOrderId) : m.msgOrderId; else d.msgOrderId = o.longs === String ? longToString(m.msgOrderId, true) : o.longs === Number ? longToNumber(m.msgOrderId, true) : m.msgOrderId; + if (o.oneofs) + d._msgOrderId = "msgOrderId"; } return d; }; @@ -28509,13 +33233,19 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - HydratedTemplateButton.prototype.index = 0; + HydratedTemplateButton.prototype.index = null; HydratedTemplateButton.prototype.quickReplyButton = null; HydratedTemplateButton.prototype.urlButton = null; HydratedTemplateButton.prototype.callButton = null; let $oneOfFields; + // Virtual OneOf for proto3 optional field + Object.defineProperty(HydratedTemplateButton.prototype, "_index", { + get: $util.oneOfGetter($oneOfFields = ["index"]), + set: $util.oneOfSetter($oneOfFields) + }); + Object.defineProperty(HydratedTemplateButton.prototype, "hydratedButton", { get: $util.oneOfGetter($oneOfFields = ["quickReplyButton", "urlButton", "callButton"]), set: $util.oneOfSetter($oneOfFields) @@ -28601,9 +33331,6 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.index = 0; - } if (m.quickReplyButton != null && m.hasOwnProperty("quickReplyButton")) { d.quickReplyButton = $root.proto.HydratedTemplateButton.HydratedQuickReplyButton.toObject(m.quickReplyButton, o); if (o.oneofs) @@ -28621,6 +33348,8 @@ export const proto = $root.proto = (() => { } if (m.index != null && m.hasOwnProperty("index")) { d.index = m.index; + if (o.oneofs) + d._index = "index"; } return d; }; @@ -28645,8 +33374,22 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - HydratedCallButton.prototype.displayText = ""; - HydratedCallButton.prototype.phoneNumber = ""; + HydratedCallButton.prototype.displayText = null; + HydratedCallButton.prototype.phoneNumber = null; + + let $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) + }); HydratedCallButton.create = function create(properties) { return new HydratedCallButton(properties); @@ -28704,15 +33447,15 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.displayText = ""; - d.phoneNumber = ""; - } if (m.displayText != null && m.hasOwnProperty("displayText")) { d.displayText = m.displayText; + if (o.oneofs) + d._displayText = "displayText"; } if (m.phoneNumber != null && m.hasOwnProperty("phoneNumber")) { d.phoneNumber = m.phoneNumber; + if (o.oneofs) + d._phoneNumber = "phoneNumber"; } return d; }; @@ -28740,8 +33483,22 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - HydratedQuickReplyButton.prototype.displayText = ""; - HydratedQuickReplyButton.prototype.id = ""; + HydratedQuickReplyButton.prototype.displayText = null; + HydratedQuickReplyButton.prototype.id = null; + + let $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) + }); HydratedQuickReplyButton.create = function create(properties) { return new HydratedQuickReplyButton(properties); @@ -28799,15 +33556,15 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.displayText = ""; - d.id = ""; - } if (m.displayText != null && m.hasOwnProperty("displayText")) { d.displayText = m.displayText; + if (o.oneofs) + d._displayText = "displayText"; } if (m.id != null && m.hasOwnProperty("id")) { d.id = m.id; + if (o.oneofs) + d._id = "id"; } return d; }; @@ -28835,10 +33592,36 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - HydratedURLButton.prototype.displayText = ""; - HydratedURLButton.prototype.url = ""; - HydratedURLButton.prototype.consentedUsersUrl = ""; - HydratedURLButton.prototype.webviewPresentation = 1; + HydratedURLButton.prototype.displayText = null; + HydratedURLButton.prototype.url = null; + HydratedURLButton.prototype.consentedUsersUrl = null; + HydratedURLButton.prototype.webviewPresentation = null; + + let $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) + }); HydratedURLButton.create = function create(properties) { return new HydratedURLButton(properties); @@ -28931,23 +33714,25 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.displayText = ""; - d.url = ""; - d.consentedUsersUrl = ""; - d.webviewPresentation = o.enums === String ? "FULL" : 1; - } if (m.displayText != null && m.hasOwnProperty("displayText")) { d.displayText = m.displayText; + if (o.oneofs) + d._displayText = "displayText"; } if (m.url != null && m.hasOwnProperty("url")) { d.url = m.url; + if (o.oneofs) + d._url = "url"; } if (m.consentedUsersUrl != null && m.hasOwnProperty("consentedUsersUrl")) { d.consentedUsersUrl = m.consentedUsersUrl; + if (o.oneofs) + d._consentedUsersUrl = "consentedUsersUrl"; } if (m.webviewPresentation != null && m.hasOwnProperty("webviewPresentation")) { d.webviewPresentation = o.enums === String ? $root.proto.HydratedTemplateButton.HydratedURLButton.WebviewPresentationType[m.webviewPresentation] === undefined ? m.webviewPresentation : $root.proto.HydratedTemplateButton.HydratedURLButton.WebviewPresentationType[m.webviewPresentation] : m.webviewPresentation; + if (o.oneofs) + d._webviewPresentation = "webviewPresentation"; } return d; }; @@ -28986,8 +33771,22 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - IdentityKeyPairStructure.prototype.publicKey = $util.newBuffer([]); - IdentityKeyPairStructure.prototype.privateKey = $util.newBuffer([]); + IdentityKeyPairStructure.prototype.publicKey = null; + IdentityKeyPairStructure.prototype.privateKey = null; + + let $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) + }); IdentityKeyPairStructure.create = function create(properties) { return new IdentityKeyPairStructure(properties); @@ -29051,27 +33850,15 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - if (o.bytes === String) - d.publicKey = ""; - else { - d.publicKey = []; - if (o.bytes !== Array) - d.publicKey = $util.newBuffer(d.publicKey); - } - if (o.bytes === String) - d.privateKey = ""; - else { - d.privateKey = []; - if (o.bytes !== Array) - d.privateKey = $util.newBuffer(d.privateKey); - } - } if (m.publicKey != null && m.hasOwnProperty("publicKey")) { d.publicKey = o.bytes === String ? $util.base64.encode(m.publicKey, 0, m.publicKey.length) : o.bytes === Array ? Array.prototype.slice.call(m.publicKey) : m.publicKey; + if (o.oneofs) + d._publicKey = "publicKey"; } if (m.privateKey != null && m.hasOwnProperty("privateKey")) { d.privateKey = o.bytes === String ? $util.base64.encode(m.privateKey, 0, m.privateKey.length) : o.bytes === Array ? Array.prototype.slice.call(m.privateKey) : m.privateKey; + if (o.oneofs) + d._privateKey = "privateKey"; } return d; }; @@ -29101,24 +33888,122 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - InThreadSurveyMetadata.prototype.tessaSessionId = ""; - InThreadSurveyMetadata.prototype.simonSessionId = ""; - InThreadSurveyMetadata.prototype.simonSurveyId = ""; - InThreadSurveyMetadata.prototype.tessaRootId = ""; - InThreadSurveyMetadata.prototype.requestId = ""; - InThreadSurveyMetadata.prototype.tessaEvent = ""; - InThreadSurveyMetadata.prototype.invitationHeaderText = ""; - InThreadSurveyMetadata.prototype.invitationBodyText = ""; - InThreadSurveyMetadata.prototype.invitationCtaText = ""; - InThreadSurveyMetadata.prototype.invitationCtaUrl = ""; - InThreadSurveyMetadata.prototype.surveyTitle = ""; + InThreadSurveyMetadata.prototype.tessaSessionId = null; + InThreadSurveyMetadata.prototype.simonSessionId = null; + InThreadSurveyMetadata.prototype.simonSurveyId = null; + InThreadSurveyMetadata.prototype.tessaRootId = null; + InThreadSurveyMetadata.prototype.requestId = null; + InThreadSurveyMetadata.prototype.tessaEvent = null; + InThreadSurveyMetadata.prototype.invitationHeaderText = null; + InThreadSurveyMetadata.prototype.invitationBodyText = null; + InThreadSurveyMetadata.prototype.invitationCtaText = null; + InThreadSurveyMetadata.prototype.invitationCtaUrl = null; + InThreadSurveyMetadata.prototype.surveyTitle = null; InThreadSurveyMetadata.prototype.questions = $util.emptyArray; - InThreadSurveyMetadata.prototype.surveyContinueButtonText = ""; - InThreadSurveyMetadata.prototype.surveySubmitButtonText = ""; - InThreadSurveyMetadata.prototype.privacyStatementFull = ""; + InThreadSurveyMetadata.prototype.surveyContinueButtonText = null; + InThreadSurveyMetadata.prototype.surveySubmitButtonText = null; + InThreadSurveyMetadata.prototype.privacyStatementFull = null; InThreadSurveyMetadata.prototype.privacyStatementParts = $util.emptyArray; - InThreadSurveyMetadata.prototype.feedbackToastText = ""; - InThreadSurveyMetadata.prototype.startQuestionIndex = 0; + InThreadSurveyMetadata.prototype.feedbackToastText = null; + InThreadSurveyMetadata.prototype.startQuestionIndex = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(InThreadSurveyMetadata.prototype, "_tessaSessionId", { + get: $util.oneOfGetter($oneOfFields = ["tessaSessionId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(InThreadSurveyMetadata.prototype, "_simonSessionId", { + get: $util.oneOfGetter($oneOfFields = ["simonSessionId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(InThreadSurveyMetadata.prototype, "_simonSurveyId", { + get: $util.oneOfGetter($oneOfFields = ["simonSurveyId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(InThreadSurveyMetadata.prototype, "_tessaRootId", { + get: $util.oneOfGetter($oneOfFields = ["tessaRootId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(InThreadSurveyMetadata.prototype, "_requestId", { + get: $util.oneOfGetter($oneOfFields = ["requestId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(InThreadSurveyMetadata.prototype, "_tessaEvent", { + get: $util.oneOfGetter($oneOfFields = ["tessaEvent"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(InThreadSurveyMetadata.prototype, "_invitationHeaderText", { + get: $util.oneOfGetter($oneOfFields = ["invitationHeaderText"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(InThreadSurveyMetadata.prototype, "_invitationBodyText", { + get: $util.oneOfGetter($oneOfFields = ["invitationBodyText"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(InThreadSurveyMetadata.prototype, "_invitationCtaText", { + get: $util.oneOfGetter($oneOfFields = ["invitationCtaText"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(InThreadSurveyMetadata.prototype, "_invitationCtaUrl", { + get: $util.oneOfGetter($oneOfFields = ["invitationCtaUrl"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(InThreadSurveyMetadata.prototype, "_surveyTitle", { + get: $util.oneOfGetter($oneOfFields = ["surveyTitle"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(InThreadSurveyMetadata.prototype, "_surveyContinueButtonText", { + get: $util.oneOfGetter($oneOfFields = ["surveyContinueButtonText"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(InThreadSurveyMetadata.prototype, "_surveySubmitButtonText", { + get: $util.oneOfGetter($oneOfFields = ["surveySubmitButtonText"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(InThreadSurveyMetadata.prototype, "_privacyStatementFull", { + get: $util.oneOfGetter($oneOfFields = ["privacyStatementFull"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(InThreadSurveyMetadata.prototype, "_feedbackToastText", { + get: $util.oneOfGetter($oneOfFields = ["feedbackToastText"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(InThreadSurveyMetadata.prototype, "_startQuestionIndex", { + get: $util.oneOfGetter($oneOfFields = ["startQuestionIndex"]), + set: $util.oneOfSetter($oneOfFields) + }); InThreadSurveyMetadata.create = function create(properties) { return new InThreadSurveyMetadata(properties); @@ -29346,56 +34231,60 @@ export const proto = $root.proto = (() => { d.questions = []; d.privacyStatementParts = []; } - if (o.defaults) { - d.tessaSessionId = ""; - d.simonSessionId = ""; - d.simonSurveyId = ""; - d.tessaRootId = ""; - d.requestId = ""; - d.tessaEvent = ""; - d.invitationHeaderText = ""; - d.invitationBodyText = ""; - d.invitationCtaText = ""; - d.invitationCtaUrl = ""; - d.surveyTitle = ""; - d.surveyContinueButtonText = ""; - d.surveySubmitButtonText = ""; - d.privacyStatementFull = ""; - d.feedbackToastText = ""; - d.startQuestionIndex = 0; - } if (m.tessaSessionId != null && m.hasOwnProperty("tessaSessionId")) { d.tessaSessionId = m.tessaSessionId; + if (o.oneofs) + d._tessaSessionId = "tessaSessionId"; } if (m.simonSessionId != null && m.hasOwnProperty("simonSessionId")) { d.simonSessionId = m.simonSessionId; + if (o.oneofs) + d._simonSessionId = "simonSessionId"; } if (m.simonSurveyId != null && m.hasOwnProperty("simonSurveyId")) { d.simonSurveyId = m.simonSurveyId; + if (o.oneofs) + d._simonSurveyId = "simonSurveyId"; } if (m.tessaRootId != null && m.hasOwnProperty("tessaRootId")) { d.tessaRootId = m.tessaRootId; + if (o.oneofs) + d._tessaRootId = "tessaRootId"; } if (m.requestId != null && m.hasOwnProperty("requestId")) { d.requestId = m.requestId; + if (o.oneofs) + d._requestId = "requestId"; } if (m.tessaEvent != null && m.hasOwnProperty("tessaEvent")) { d.tessaEvent = m.tessaEvent; + if (o.oneofs) + d._tessaEvent = "tessaEvent"; } if (m.invitationHeaderText != null && m.hasOwnProperty("invitationHeaderText")) { d.invitationHeaderText = m.invitationHeaderText; + if (o.oneofs) + d._invitationHeaderText = "invitationHeaderText"; } if (m.invitationBodyText != null && m.hasOwnProperty("invitationBodyText")) { d.invitationBodyText = m.invitationBodyText; + if (o.oneofs) + d._invitationBodyText = "invitationBodyText"; } if (m.invitationCtaText != null && m.hasOwnProperty("invitationCtaText")) { d.invitationCtaText = m.invitationCtaText; + if (o.oneofs) + d._invitationCtaText = "invitationCtaText"; } if (m.invitationCtaUrl != null && m.hasOwnProperty("invitationCtaUrl")) { d.invitationCtaUrl = m.invitationCtaUrl; + if (o.oneofs) + d._invitationCtaUrl = "invitationCtaUrl"; } if (m.surveyTitle != null && m.hasOwnProperty("surveyTitle")) { d.surveyTitle = m.surveyTitle; + if (o.oneofs) + d._surveyTitle = "surveyTitle"; } if (m.questions && m.questions.length) { d.questions = []; @@ -29405,12 +34294,18 @@ export const proto = $root.proto = (() => { } if (m.surveyContinueButtonText != null && m.hasOwnProperty("surveyContinueButtonText")) { d.surveyContinueButtonText = m.surveyContinueButtonText; + if (o.oneofs) + d._surveyContinueButtonText = "surveyContinueButtonText"; } if (m.surveySubmitButtonText != null && m.hasOwnProperty("surveySubmitButtonText")) { d.surveySubmitButtonText = m.surveySubmitButtonText; + if (o.oneofs) + d._surveySubmitButtonText = "surveySubmitButtonText"; } if (m.privacyStatementFull != null && m.hasOwnProperty("privacyStatementFull")) { d.privacyStatementFull = m.privacyStatementFull; + if (o.oneofs) + d._privacyStatementFull = "privacyStatementFull"; } if (m.privacyStatementParts && m.privacyStatementParts.length) { d.privacyStatementParts = []; @@ -29420,9 +34315,13 @@ export const proto = $root.proto = (() => { } if (m.feedbackToastText != null && m.hasOwnProperty("feedbackToastText")) { d.feedbackToastText = m.feedbackToastText; + if (o.oneofs) + d._feedbackToastText = "feedbackToastText"; } if (m.startQuestionIndex != null && m.hasOwnProperty("startQuestionIndex")) { d.startQuestionIndex = m.startQuestionIndex; + if (o.oneofs) + d._startQuestionIndex = "startQuestionIndex"; } return d; }; @@ -29447,9 +34346,29 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - InThreadSurveyOption.prototype.stringValue = ""; - InThreadSurveyOption.prototype.numericValue = 0; - InThreadSurveyOption.prototype.textTranslated = ""; + InThreadSurveyOption.prototype.stringValue = null; + InThreadSurveyOption.prototype.numericValue = null; + InThreadSurveyOption.prototype.textTranslated = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(InThreadSurveyOption.prototype, "_stringValue", { + get: $util.oneOfGetter($oneOfFields = ["stringValue"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(InThreadSurveyOption.prototype, "_numericValue", { + get: $util.oneOfGetter($oneOfFields = ["numericValue"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(InThreadSurveyOption.prototype, "_textTranslated", { + get: $util.oneOfGetter($oneOfFields = ["textTranslated"]), + set: $util.oneOfSetter($oneOfFields) + }); InThreadSurveyOption.create = function create(properties) { return new InThreadSurveyOption(properties); @@ -29516,19 +34435,20 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.stringValue = ""; - d.numericValue = 0; - d.textTranslated = ""; - } if (m.stringValue != null && m.hasOwnProperty("stringValue")) { d.stringValue = m.stringValue; + if (o.oneofs) + d._stringValue = "stringValue"; } if (m.numericValue != null && m.hasOwnProperty("numericValue")) { d.numericValue = m.numericValue; + if (o.oneofs) + d._numericValue = "numericValue"; } if (m.textTranslated != null && m.hasOwnProperty("textTranslated")) { d.textTranslated = m.textTranslated; + if (o.oneofs) + d._textTranslated = "textTranslated"; } return d; }; @@ -29556,8 +34476,22 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - InThreadSurveyPrivacyStatementPart.prototype.text = ""; - InThreadSurveyPrivacyStatementPart.prototype.url = ""; + InThreadSurveyPrivacyStatementPart.prototype.text = null; + InThreadSurveyPrivacyStatementPart.prototype.url = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(InThreadSurveyPrivacyStatementPart.prototype, "_text", { + get: $util.oneOfGetter($oneOfFields = ["text"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(InThreadSurveyPrivacyStatementPart.prototype, "_url", { + get: $util.oneOfGetter($oneOfFields = ["url"]), + set: $util.oneOfSetter($oneOfFields) + }); InThreadSurveyPrivacyStatementPart.create = function create(properties) { return new InThreadSurveyPrivacyStatementPart(properties); @@ -29615,15 +34549,15 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.text = ""; - d.url = ""; - } if (m.text != null && m.hasOwnProperty("text")) { d.text = m.text; + if (o.oneofs) + d._text = "text"; } if (m.url != null && m.hasOwnProperty("url")) { d.url = m.url; + if (o.oneofs) + d._url = "url"; } return d; }; @@ -29652,10 +34586,24 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - InThreadSurveyQuestion.prototype.questionText = ""; - InThreadSurveyQuestion.prototype.questionId = ""; + InThreadSurveyQuestion.prototype.questionText = null; + InThreadSurveyQuestion.prototype.questionId = null; InThreadSurveyQuestion.prototype.questionOptions = $util.emptyArray; + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(InThreadSurveyQuestion.prototype, "_questionText", { + get: $util.oneOfGetter($oneOfFields = ["questionText"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(InThreadSurveyQuestion.prototype, "_questionId", { + get: $util.oneOfGetter($oneOfFields = ["questionId"]), + set: $util.oneOfSetter($oneOfFields) + }); + InThreadSurveyQuestion.create = function create(properties) { return new InThreadSurveyQuestion(properties); }; @@ -29735,15 +34683,15 @@ export const proto = $root.proto = (() => { if (o.arrays || o.defaults) { d.questionOptions = []; } - if (o.defaults) { - d.questionText = ""; - d.questionId = ""; - } if (m.questionText != null && m.hasOwnProperty("questionText")) { d.questionText = m.questionText; + if (o.oneofs) + d._questionText = "questionText"; } if (m.questionId != null && m.hasOwnProperty("questionId")) { d.questionId = m.questionId; + if (o.oneofs) + d._questionId = "questionId"; } if (m.questionOptions && m.questionOptions.length) { d.questionOptions = []; @@ -29782,9 +34730,9 @@ export const proto = $root.proto = (() => { } InteractiveAnnotation.prototype.polygonVertices = $util.emptyArray; - InteractiveAnnotation.prototype.shouldSkipConfirmation = false; + InteractiveAnnotation.prototype.shouldSkipConfirmation = null; InteractiveAnnotation.prototype.embeddedContent = null; - InteractiveAnnotation.prototype.statusLinkType = 1; + InteractiveAnnotation.prototype.statusLinkType = null; InteractiveAnnotation.prototype.location = null; InteractiveAnnotation.prototype.newsletter = null; InteractiveAnnotation.prototype.embeddedAction = null; @@ -29792,6 +34740,24 @@ export const proto = $root.proto = (() => { let $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) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(InteractiveAnnotation.prototype, "_statusLinkType", { + get: $util.oneOfGetter($oneOfFields = ["statusLinkType"]), + set: $util.oneOfSetter($oneOfFields) + }); + Object.defineProperty(InteractiveAnnotation.prototype, "action", { get: $util.oneOfGetter($oneOfFields = ["location", "newsletter", "embeddedAction", "tapAction"]), set: $util.oneOfSetter($oneOfFields) @@ -29946,11 +34912,6 @@ export const proto = $root.proto = (() => { if (o.arrays || o.defaults) { d.polygonVertices = []; } - if (o.defaults) { - d.shouldSkipConfirmation = false; - d.embeddedContent = null; - d.statusLinkType = o.enums === String ? "RASTERIZED_LINK_PREVIEW" : 1; - } if (m.polygonVertices && m.polygonVertices.length) { d.polygonVertices = []; for (var j = 0; j < m.polygonVertices.length; ++j) { @@ -29969,9 +34930,13 @@ export const proto = $root.proto = (() => { } if (m.shouldSkipConfirmation != null && m.hasOwnProperty("shouldSkipConfirmation")) { d.shouldSkipConfirmation = m.shouldSkipConfirmation; + if (o.oneofs) + d._shouldSkipConfirmation = "shouldSkipConfirmation"; } if (m.embeddedContent != null && m.hasOwnProperty("embeddedContent")) { d.embeddedContent = $root.proto.EmbeddedContent.toObject(m.embeddedContent, o); + if (o.oneofs) + d._embeddedContent = "embeddedContent"; } if (m.embeddedAction != null && m.hasOwnProperty("embeddedAction")) { d.embeddedAction = m.embeddedAction; @@ -29985,6 +34950,8 @@ export const proto = $root.proto = (() => { } if (m.statusLinkType != null && m.hasOwnProperty("statusLinkType")) { d.statusLinkType = o.enums === String ? $root.proto.InteractiveAnnotation.StatusLinkType[m.statusLinkType] === undefined ? m.statusLinkType : $root.proto.InteractiveAnnotation.StatusLinkType[m.statusLinkType] : m.statusLinkType; + if (o.oneofs) + d._statusLinkType = "statusLinkType"; } return d; }; @@ -30020,7 +34987,15 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - InteractiveMessageAdditionalMetadata.prototype.isGalaxyFlowCompleted = false; + InteractiveMessageAdditionalMetadata.prototype.isGalaxyFlowCompleted = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(InteractiveMessageAdditionalMetadata.prototype, "_isGalaxyFlowCompleted", { + get: $util.oneOfGetter($oneOfFields = ["isGalaxyFlowCompleted"]), + set: $util.oneOfSetter($oneOfFields) + }); InteractiveMessageAdditionalMetadata.create = function create(properties) { return new InteractiveMessageAdditionalMetadata(properties); @@ -30069,11 +35044,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.isGalaxyFlowCompleted = false; - } if (m.isGalaxyFlowCompleted != null && m.hasOwnProperty("isGalaxyFlowCompleted")) { d.isGalaxyFlowCompleted = m.isGalaxyFlowCompleted; + if (o.oneofs) + d._isGalaxyFlowCompleted = "isGalaxyFlowCompleted"; } return d; }; @@ -30101,12 +35075,50 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - KeepInChat.prototype.keepType = 0; - KeepInChat.prototype.serverTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + KeepInChat.prototype.keepType = null; + KeepInChat.prototype.serverTimestamp = null; KeepInChat.prototype.key = null; - KeepInChat.prototype.deviceJid = ""; - KeepInChat.prototype.clientTimestampMs = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - KeepInChat.prototype.serverTimestampMs = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + KeepInChat.prototype.deviceJid = null; + KeepInChat.prototype.clientTimestampMs = null; + KeepInChat.prototype.serverTimestampMs = null; + + let $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) + }); KeepInChat.create = function create(properties) { return new KeepInChat(properties); @@ -30240,52 +35252,44 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.keepType = o.enums === String ? "UNKNOWN" : 0; - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.serverTimestamp = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.serverTimestamp = o.longs === String ? "0" : 0; - d.key = null; - d.deviceJid = ""; - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.clientTimestampMs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.clientTimestampMs = o.longs === String ? "0" : 0; - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.serverTimestampMs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.serverTimestampMs = o.longs === String ? "0" : 0; - } if (m.keepType != null && m.hasOwnProperty("keepType")) { d.keepType = o.enums === String ? $root.proto.KeepType[m.keepType] === undefined ? m.keepType : $root.proto.KeepType[m.keepType] : m.keepType; + if (o.oneofs) + d._keepType = "keepType"; } if (m.serverTimestamp != null && m.hasOwnProperty("serverTimestamp")) { if (typeof m.serverTimestamp === "number") d.serverTimestamp = o.longs === String ? String(m.serverTimestamp) : m.serverTimestamp; else d.serverTimestamp = o.longs === String ? longToString(m.serverTimestamp) : o.longs === Number ? longToNumber(m.serverTimestamp) : m.serverTimestamp; + if (o.oneofs) + d._serverTimestamp = "serverTimestamp"; } if (m.key != null && m.hasOwnProperty("key")) { d.key = $root.proto.MessageKey.toObject(m.key, o); + if (o.oneofs) + d._key = "key"; } if (m.deviceJid != null && m.hasOwnProperty("deviceJid")) { d.deviceJid = m.deviceJid; + if (o.oneofs) + d._deviceJid = "deviceJid"; } if (m.clientTimestampMs != null && m.hasOwnProperty("clientTimestampMs")) { if (typeof m.clientTimestampMs === "number") d.clientTimestampMs = o.longs === String ? String(m.clientTimestampMs) : m.clientTimestampMs; else d.clientTimestampMs = o.longs === String ? longToString(m.clientTimestampMs) : o.longs === Number ? longToNumber(m.clientTimestampMs) : m.clientTimestampMs; + if (o.oneofs) + d._clientTimestampMs = "clientTimestampMs"; } if (m.serverTimestampMs != null && m.hasOwnProperty("serverTimestampMs")) { if (typeof m.serverTimestampMs === "number") d.serverTimestampMs = o.longs === String ? String(m.serverTimestampMs) : m.serverTimestampMs; else d.serverTimestampMs = o.longs === String ? longToString(m.serverTimestampMs) : o.longs === Number ? longToNumber(m.serverTimestampMs) : m.serverTimestampMs; + if (o.oneofs) + d._serverTimestampMs = "serverTimestampMs"; } return d; }; @@ -30321,11 +35325,43 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - KeyExchangeMessage.prototype.id = 0; - KeyExchangeMessage.prototype.baseKey = $util.newBuffer([]); - KeyExchangeMessage.prototype.ratchetKey = $util.newBuffer([]); - KeyExchangeMessage.prototype.identityKey = $util.newBuffer([]); - KeyExchangeMessage.prototype.baseKeySignature = $util.newBuffer([]); + KeyExchangeMessage.prototype.id = null; + KeyExchangeMessage.prototype.baseKey = null; + KeyExchangeMessage.prototype.ratchetKey = null; + KeyExchangeMessage.prototype.identityKey = null; + KeyExchangeMessage.prototype.baseKeySignature = null; + + let $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) + }); KeyExchangeMessage.create = function create(properties) { return new KeyExchangeMessage(properties); @@ -30422,51 +35458,30 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.id = 0; - if (o.bytes === String) - d.baseKey = ""; - else { - d.baseKey = []; - if (o.bytes !== Array) - d.baseKey = $util.newBuffer(d.baseKey); - } - if (o.bytes === String) - d.ratchetKey = ""; - else { - d.ratchetKey = []; - if (o.bytes !== Array) - d.ratchetKey = $util.newBuffer(d.ratchetKey); - } - if (o.bytes === String) - d.identityKey = ""; - else { - d.identityKey = []; - if (o.bytes !== Array) - d.identityKey = $util.newBuffer(d.identityKey); - } - if (o.bytes === String) - d.baseKeySignature = ""; - else { - d.baseKeySignature = []; - if (o.bytes !== Array) - d.baseKeySignature = $util.newBuffer(d.baseKeySignature); - } - } if (m.id != null && m.hasOwnProperty("id")) { d.id = m.id; + if (o.oneofs) + d._id = "id"; } if (m.baseKey != null && m.hasOwnProperty("baseKey")) { d.baseKey = o.bytes === String ? $util.base64.encode(m.baseKey, 0, m.baseKey.length) : o.bytes === Array ? Array.prototype.slice.call(m.baseKey) : m.baseKey; + if (o.oneofs) + d._baseKey = "baseKey"; } if (m.ratchetKey != null && m.hasOwnProperty("ratchetKey")) { d.ratchetKey = o.bytes === String ? $util.base64.encode(m.ratchetKey, 0, m.ratchetKey.length) : o.bytes === Array ? Array.prototype.slice.call(m.ratchetKey) : m.ratchetKey; + if (o.oneofs) + d._ratchetKey = "ratchetKey"; } if (m.identityKey != null && m.hasOwnProperty("identityKey")) { d.identityKey = o.bytes === String ? $util.base64.encode(m.identityKey, 0, m.identityKey.length) : o.bytes === Array ? Array.prototype.slice.call(m.identityKey) : m.identityKey; + if (o.oneofs) + d._identityKey = "identityKey"; } if (m.baseKeySignature != null && m.hasOwnProperty("baseKeySignature")) { d.baseKeySignature = o.bytes === String ? $util.base64.encode(m.baseKeySignature, 0, m.baseKeySignature.length) : o.bytes === Array ? Array.prototype.slice.call(m.baseKeySignature) : m.baseKeySignature; + if (o.oneofs) + d._baseKeySignature = "baseKeySignature"; } return d; }; @@ -30494,7 +35509,15 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - KeyId.prototype.id = $util.newBuffer([]); + KeyId.prototype.id = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(KeyId.prototype, "_id", { + get: $util.oneOfGetter($oneOfFields = ["id"]), + set: $util.oneOfSetter($oneOfFields) + }); KeyId.create = function create(properties) { return new KeyId(properties); @@ -30546,17 +35569,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - if (o.bytes === String) - d.id = ""; - else { - d.id = []; - if (o.bytes !== Array) - d.id = $util.newBuffer(d.id); - } - } if (m.id != null && m.hasOwnProperty("id")) { d.id = o.bytes === String ? $util.base64.encode(m.id, 0, m.id.length) : o.bytes === Array ? Array.prototype.slice.call(m.id) : m.id; + if (o.oneofs) + d._id = "id"; } return d; }; @@ -30584,9 +35600,29 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - LIDMigrationMapping.prototype.pn = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - LIDMigrationMapping.prototype.assignedLid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - LIDMigrationMapping.prototype.latestLid = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + LIDMigrationMapping.prototype.pn = null; + LIDMigrationMapping.prototype.assignedLid = null; + LIDMigrationMapping.prototype.latestLid = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(LIDMigrationMapping.prototype, "_pn", { + get: $util.oneOfGetter($oneOfFields = ["pn"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(LIDMigrationMapping.prototype, "_assignedLid", { + get: $util.oneOfGetter($oneOfFields = ["assignedLid"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(LIDMigrationMapping.prototype, "_latestLid", { + get: $util.oneOfGetter($oneOfFields = ["latestLid"]), + set: $util.oneOfSetter($oneOfFields) + }); LIDMigrationMapping.create = function create(properties) { return new LIDMigrationMapping(properties); @@ -30595,8 +35631,10 @@ export const proto = $root.proto = (() => { LIDMigrationMapping.encode = function encode(m, w) { if (!w) w = $Writer.create(); - w.uint32(8).uint64(m.pn); - w.uint32(16).uint64(m.assignedLid); + if (m.pn != null && Object.hasOwnProperty.call(m, "pn")) + w.uint32(8).uint64(m.pn); + if (m.assignedLid != null && Object.hasOwnProperty.call(m, "assignedLid")) + w.uint32(16).uint64(m.assignedLid); if (m.latestLid != null && Object.hasOwnProperty.call(m, "latestLid")) w.uint32(24).uint64(m.latestLid); return w; @@ -30628,10 +35666,6 @@ export const proto = $root.proto = (() => { break; } } - if (!m.hasOwnProperty("pn")) - throw $util.ProtocolError("missing required 'pn'", { instance: m }); - if (!m.hasOwnProperty("assignedLid")) - throw $util.ProtocolError("missing required 'assignedLid'", { instance: m }); return m; }; @@ -30676,40 +35710,29 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - if ($util.Long) { - var n = new $util.Long(0, 0, true); - d.pn = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.pn = o.longs === String ? "0" : 0; - if ($util.Long) { - var n = new $util.Long(0, 0, true); - d.assignedLid = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.assignedLid = o.longs === String ? "0" : 0; - if ($util.Long) { - var n = new $util.Long(0, 0, true); - d.latestLid = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.latestLid = o.longs === String ? "0" : 0; - } if (m.pn != null && m.hasOwnProperty("pn")) { if (typeof m.pn === "number") d.pn = o.longs === String ? String(m.pn) : m.pn; else d.pn = o.longs === String ? longToString(m.pn, true) : o.longs === Number ? longToNumber(m.pn, true) : m.pn; + if (o.oneofs) + d._pn = "pn"; } if (m.assignedLid != null && m.hasOwnProperty("assignedLid")) { if (typeof m.assignedLid === "number") d.assignedLid = o.longs === String ? String(m.assignedLid) : m.assignedLid; else d.assignedLid = o.longs === String ? longToString(m.assignedLid, true) : o.longs === Number ? longToNumber(m.assignedLid, true) : m.assignedLid; + if (o.oneofs) + d._assignedLid = "assignedLid"; } if (m.latestLid != null && m.hasOwnProperty("latestLid")) { if (typeof m.latestLid === "number") d.latestLid = o.longs === String ? String(m.latestLid) : m.latestLid; else d.latestLid = o.longs === String ? longToString(m.latestLid, true) : o.longs === Number ? longToNumber(m.latestLid, true) : m.latestLid; + if (o.oneofs) + d._latestLid = "latestLid"; } return d; }; @@ -30737,7 +35760,15 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - LIDMigrationMappingSyncMessage.prototype.encodedMappingPayload = $util.newBuffer([]); + LIDMigrationMappingSyncMessage.prototype.encodedMappingPayload = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(LIDMigrationMappingSyncMessage.prototype, "_encodedMappingPayload", { + get: $util.oneOfGetter($oneOfFields = ["encodedMappingPayload"]), + set: $util.oneOfSetter($oneOfFields) + }); LIDMigrationMappingSyncMessage.create = function create(properties) { return new LIDMigrationMappingSyncMessage(properties); @@ -30789,17 +35820,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - if (o.bytes === String) - d.encodedMappingPayload = ""; - else { - d.encodedMappingPayload = []; - if (o.bytes !== Array) - d.encodedMappingPayload = $util.newBuffer(d.encodedMappingPayload); - } - } if (m.encodedMappingPayload != null && m.hasOwnProperty("encodedMappingPayload")) { d.encodedMappingPayload = o.bytes === String ? $util.base64.encode(m.encodedMappingPayload, 0, m.encodedMappingPayload.length) : o.bytes === Array ? Array.prototype.slice.call(m.encodedMappingPayload) : m.encodedMappingPayload; + if (o.oneofs) + d._encodedMappingPayload = "encodedMappingPayload"; } return d; }; @@ -30829,7 +35853,15 @@ export const proto = $root.proto = (() => { } LIDMigrationMappingSyncPayload.prototype.pnToLidMappings = $util.emptyArray; - LIDMigrationMappingSyncPayload.prototype.chatDbMigrationTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + LIDMigrationMappingSyncPayload.prototype.chatDbMigrationTimestamp = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(LIDMigrationMappingSyncPayload.prototype, "_chatDbMigrationTimestamp", { + get: $util.oneOfGetter($oneOfFields = ["chatDbMigrationTimestamp"]), + set: $util.oneOfSetter($oneOfFields) + }); LIDMigrationMappingSyncPayload.create = function create(properties) { return new LIDMigrationMappingSyncPayload(properties); @@ -30908,13 +35940,6 @@ export const proto = $root.proto = (() => { if (o.arrays || o.defaults) { d.pnToLidMappings = []; } - if (o.defaults) { - if ($util.Long) { - var n = new $util.Long(0, 0, true); - d.chatDbMigrationTimestamp = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.chatDbMigrationTimestamp = o.longs === String ? "0" : 0; - } if (m.pnToLidMappings && m.pnToLidMappings.length) { d.pnToLidMappings = []; for (var j = 0; j < m.pnToLidMappings.length; ++j) { @@ -30926,6 +35951,8 @@ export const proto = $root.proto = (() => { d.chatDbMigrationTimestamp = o.longs === String ? String(m.chatDbMigrationTimestamp) : m.chatDbMigrationTimestamp; else d.chatDbMigrationTimestamp = o.longs === String ? longToString(m.chatDbMigrationTimestamp, true) : o.longs === Number ? longToNumber(m.chatDbMigrationTimestamp, true) : m.chatDbMigrationTimestamp; + if (o.oneofs) + d._chatDbMigrationTimestamp = "chatDbMigrationTimestamp"; } return d; }; @@ -30956,6 +35983,20 @@ export const proto = $root.proto = (() => { LegacyMessage.prototype.eventResponseMessage = null; LegacyMessage.prototype.pollVote = null; + let $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) + }); + LegacyMessage.create = function create(properties) { return new LegacyMessage(properties); }; @@ -31016,15 +36057,15 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.eventResponseMessage = null; - d.pollVote = null; - } if (m.eventResponseMessage != null && m.hasOwnProperty("eventResponseMessage")) { d.eventResponseMessage = $root.proto.Message.EventResponseMessage.toObject(m.eventResponseMessage, o); + if (o.oneofs) + d._eventResponseMessage = "eventResponseMessage"; } if (m.pollVote != null && m.hasOwnProperty("pollVote")) { d.pollVote = $root.proto.Message.PollVoteMessage.toObject(m.pollVote, o); + if (o.oneofs) + d._pollVote = "pollVote"; } return d; }; @@ -31052,10 +36093,36 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - LimitSharing.prototype.sharingLimited = false; - LimitSharing.prototype.trigger = 0; - LimitSharing.prototype.limitSharingSettingTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - LimitSharing.prototype.initiatedByMe = false; + LimitSharing.prototype.sharingLimited = null; + LimitSharing.prototype.trigger = null; + LimitSharing.prototype.limitSharingSettingTimestamp = null; + LimitSharing.prototype.initiatedByMe = null; + + let $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) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(LimitSharing.prototype, "_limitSharingSettingTimestamp", { + get: $util.oneOfGetter($oneOfFields = ["limitSharingSettingTimestamp"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(LimitSharing.prototype, "_initiatedByMe", { + get: $util.oneOfGetter($oneOfFields = ["initiatedByMe"]), + set: $util.oneOfSetter($oneOfFields) + }); LimitSharing.create = function create(properties) { return new LimitSharing(properties); @@ -31159,30 +36226,28 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.sharingLimited = false; - d.trigger = o.enums === String ? "UNKNOWN" : 0; - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.limitSharingSettingTimestamp = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.limitSharingSettingTimestamp = o.longs === String ? "0" : 0; - d.initiatedByMe = false; - } if (m.sharingLimited != null && m.hasOwnProperty("sharingLimited")) { d.sharingLimited = m.sharingLimited; + if (o.oneofs) + d._sharingLimited = "sharingLimited"; } if (m.trigger != null && m.hasOwnProperty("trigger")) { d.trigger = o.enums === String ? $root.proto.LimitSharing.TriggerType[m.trigger] === undefined ? m.trigger : $root.proto.LimitSharing.TriggerType[m.trigger] : m.trigger; + if (o.oneofs) + d._trigger = "trigger"; } if (m.limitSharingSettingTimestamp != null && m.hasOwnProperty("limitSharingSettingTimestamp")) { if (typeof m.limitSharingSettingTimestamp === "number") d.limitSharingSettingTimestamp = o.longs === String ? String(m.limitSharingSettingTimestamp) : m.limitSharingSettingTimestamp; else d.limitSharingSettingTimestamp = o.longs === String ? longToString(m.limitSharingSettingTimestamp) : o.longs === Number ? longToNumber(m.limitSharingSettingTimestamp) : m.limitSharingSettingTimestamp; + if (o.oneofs) + d._limitSharingSettingTimestamp = "limitSharingSettingTimestamp"; } if (m.initiatedByMe != null && m.hasOwnProperty("initiatedByMe")) { d.initiatedByMe = m.initiatedByMe; + if (o.oneofs) + d._initiatedByMe = "initiatedByMe"; } return d; }; @@ -31219,9 +36284,29 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - LocalizedName.prototype.lg = ""; - LocalizedName.prototype.lc = ""; - LocalizedName.prototype.verifiedName = ""; + LocalizedName.prototype.lg = null; + LocalizedName.prototype.lc = null; + LocalizedName.prototype.verifiedName = null; + + let $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) + }); LocalizedName.create = function create(properties) { return new LocalizedName(properties); @@ -31288,19 +36373,20 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.lg = ""; - d.lc = ""; - d.verifiedName = ""; - } if (m.lg != null && m.hasOwnProperty("lg")) { d.lg = m.lg; + if (o.oneofs) + d._lg = "lg"; } if (m.lc != null && m.hasOwnProperty("lc")) { d.lc = m.lc; + if (o.oneofs) + d._lc = "lc"; } if (m.verifiedName != null && m.hasOwnProperty("verifiedName")) { d.verifiedName = m.verifiedName; + if (o.oneofs) + d._verifiedName = "verifiedName"; } return d; }; @@ -31328,9 +36414,29 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - Location.prototype.degreesLatitude = 0; - Location.prototype.degreesLongitude = 0; - Location.prototype.name = ""; + Location.prototype.degreesLatitude = null; + Location.prototype.degreesLongitude = null; + Location.prototype.name = null; + + let $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) + }); Location.create = function create(properties) { return new Location(properties); @@ -31397,19 +36503,20 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.degreesLatitude = 0; - d.degreesLongitude = 0; - d.name = ""; - } if (m.degreesLatitude != null && m.hasOwnProperty("degreesLatitude")) { d.degreesLatitude = o.json && !isFinite(m.degreesLatitude) ? String(m.degreesLatitude) : m.degreesLatitude; + if (o.oneofs) + d._degreesLatitude = "degreesLatitude"; } if (m.degreesLongitude != null && m.hasOwnProperty("degreesLongitude")) { d.degreesLongitude = o.json && !isFinite(m.degreesLongitude) ? String(m.degreesLongitude) : m.degreesLongitude; + if (o.oneofs) + d._degreesLongitude = "degreesLongitude"; } if (m.name != null && m.hasOwnProperty("name")) { d.name = m.name; + if (o.oneofs) + d._name = "name"; } return d; }; @@ -31437,7 +36544,15 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - MediaData.prototype.localPath = ""; + MediaData.prototype.localPath = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MediaData.prototype, "_localPath", { + get: $util.oneOfGetter($oneOfFields = ["localPath"]), + set: $util.oneOfSetter($oneOfFields) + }); MediaData.create = function create(properties) { return new MediaData(properties); @@ -31486,11 +36601,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.localPath = ""; - } if (m.localPath != null && m.hasOwnProperty("localPath")) { d.localPath = m.localPath; + if (o.oneofs) + d._localPath = "localPath"; } return d; }; @@ -31518,8 +36632,22 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - MediaDomainInfo.prototype.mediaKeyDomain = 0; - MediaDomainInfo.prototype.e2EeMediaKey = $util.newBuffer([]); + MediaDomainInfo.prototype.mediaKeyDomain = null; + MediaDomainInfo.prototype.e2EeMediaKey = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MediaDomainInfo.prototype, "_mediaKeyDomain", { + get: $util.oneOfGetter($oneOfFields = ["mediaKeyDomain"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MediaDomainInfo.prototype, "_e2EeMediaKey", { + get: $util.oneOfGetter($oneOfFields = ["e2EeMediaKey"]), + set: $util.oneOfSetter($oneOfFields) + }); MediaDomainInfo.create = function create(properties) { return new MediaDomainInfo(properties); @@ -31597,21 +36725,15 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.mediaKeyDomain = o.enums === String ? "MEDIA_KEY_DOMAIN_UNKNOWN" : 0; - if (o.bytes === String) - d.e2EeMediaKey = ""; - else { - d.e2EeMediaKey = []; - if (o.bytes !== Array) - d.e2EeMediaKey = $util.newBuffer(d.e2EeMediaKey); - } - } if (m.mediaKeyDomain != null && m.hasOwnProperty("mediaKeyDomain")) { d.mediaKeyDomain = o.enums === String ? $root.proto.MediaKeyDomain[m.mediaKeyDomain] === undefined ? m.mediaKeyDomain : $root.proto.MediaKeyDomain[m.mediaKeyDomain] : m.mediaKeyDomain; + if (o.oneofs) + d._mediaKeyDomain = "mediaKeyDomain"; } if (m.e2EeMediaKey != null && m.hasOwnProperty("e2EeMediaKey")) { d.e2EeMediaKey = o.bytes === String ? $util.base64.encode(m.e2EeMediaKey, 0, m.e2EeMediaKey.length) : o.bytes === Array ? Array.prototype.slice.call(m.e2EeMediaKey) : m.e2EeMediaKey; + if (o.oneofs) + d._e2EeMediaKey = "e2EeMediaKey"; } return d; }; @@ -31647,9 +36769,29 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - MediaNotifyMessage.prototype.expressPathUrl = ""; - MediaNotifyMessage.prototype.fileEncSha256 = $util.newBuffer([]); - MediaNotifyMessage.prototype.fileLength = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + MediaNotifyMessage.prototype.expressPathUrl = null; + MediaNotifyMessage.prototype.fileEncSha256 = null; + MediaNotifyMessage.prototype.fileLength = null; + + let $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) + }); MediaNotifyMessage.create = function create(properties) { return new MediaNotifyMessage(properties); @@ -31726,32 +36868,23 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.expressPathUrl = ""; - if (o.bytes === String) - d.fileEncSha256 = ""; - else { - d.fileEncSha256 = []; - if (o.bytes !== Array) - d.fileEncSha256 = $util.newBuffer(d.fileEncSha256); - } - if ($util.Long) { - var n = new $util.Long(0, 0, true); - d.fileLength = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.fileLength = o.longs === String ? "0" : 0; - } if (m.expressPathUrl != null && m.hasOwnProperty("expressPathUrl")) { d.expressPathUrl = m.expressPathUrl; + if (o.oneofs) + d._expressPathUrl = "expressPathUrl"; } if (m.fileEncSha256 != null && m.hasOwnProperty("fileEncSha256")) { d.fileEncSha256 = o.bytes === String ? $util.base64.encode(m.fileEncSha256, 0, m.fileEncSha256.length) : o.bytes === Array ? Array.prototype.slice.call(m.fileEncSha256) : m.fileEncSha256; + if (o.oneofs) + d._fileEncSha256 = "fileEncSha256"; } if (m.fileLength != null && m.hasOwnProperty("fileLength")) { if (typeof m.fileLength === "number") d.fileLength = o.longs === String ? String(m.fileLength) : m.fileLength; else d.fileLength = o.longs === String ? longToString(m.fileLength, true) : o.longs === Number ? longToNumber(m.fileLength, true) : m.fileLength; + if (o.oneofs) + d._fileLength = "fileLength"; } return d; }; @@ -31779,10 +36912,36 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - MediaRetryNotification.prototype.stanzaId = ""; - MediaRetryNotification.prototype.directPath = ""; - MediaRetryNotification.prototype.result = 0; - MediaRetryNotification.prototype.messageSecret = $util.newBuffer([]); + MediaRetryNotification.prototype.stanzaId = null; + MediaRetryNotification.prototype.directPath = null; + MediaRetryNotification.prototype.result = null; + MediaRetryNotification.prototype.messageSecret = null; + + let $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) + }); MediaRetryNotification.create = function create(properties) { return new MediaRetryNotification(properties); @@ -31882,29 +37041,25 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.stanzaId = ""; - d.directPath = ""; - d.result = o.enums === String ? "GENERAL_ERROR" : 0; - if (o.bytes === String) - d.messageSecret = ""; - else { - d.messageSecret = []; - if (o.bytes !== Array) - d.messageSecret = $util.newBuffer(d.messageSecret); - } - } if (m.stanzaId != null && m.hasOwnProperty("stanzaId")) { d.stanzaId = m.stanzaId; + if (o.oneofs) + d._stanzaId = "stanzaId"; } if (m.directPath != null && m.hasOwnProperty("directPath")) { d.directPath = m.directPath; + if (o.oneofs) + d._directPath = "directPath"; } if (m.result != null && m.hasOwnProperty("result")) { d.result = o.enums === String ? $root.proto.MediaRetryNotification.ResultType[m.result] === undefined ? m.result : $root.proto.MediaRetryNotification.ResultType[m.result] : m.result; + if (o.oneofs) + d._result = "result"; } if (m.messageSecret != null && m.hasOwnProperty("messageSecret")) { d.messageSecret = o.bytes === String ? $util.base64.encode(m.messageSecret, 0, m.messageSecret.length) : o.bytes === Array ? Array.prototype.slice.call(m.messageSecret) : m.messageSecret; + if (o.oneofs) + d._messageSecret = "messageSecret"; } return d; }; @@ -31949,8 +37104,22 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - MemberLabel.prototype.label = ""; - MemberLabel.prototype.labelTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + MemberLabel.prototype.label = null; + MemberLabel.prototype.labelTimestamp = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MemberLabel.prototype, "_label", { + get: $util.oneOfGetter($oneOfFields = ["label"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MemberLabel.prototype, "_labelTimestamp", { + get: $util.oneOfGetter($oneOfFields = ["labelTimestamp"]), + set: $util.oneOfSetter($oneOfFields) + }); MemberLabel.create = function create(properties) { return new MemberLabel(properties); @@ -32015,22 +37184,18 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.label = ""; - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.labelTimestamp = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.labelTimestamp = o.longs === String ? "0" : 0; - } if (m.label != null && m.hasOwnProperty("label")) { d.label = m.label; + if (o.oneofs) + d._label = "label"; } if (m.labelTimestamp != null && m.hasOwnProperty("labelTimestamp")) { if (typeof m.labelTimestamp === "number") d.labelTimestamp = o.longs === String ? String(m.labelTimestamp) : m.labelTimestamp; else d.labelTimestamp = o.longs === String ? longToString(m.labelTimestamp) : o.longs === Number ? longToNumber(m.labelTimestamp) : m.labelTimestamp; + if (o.oneofs) + d._labelTimestamp = "labelTimestamp"; } return d; }; @@ -32058,7 +37223,7 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - Message.prototype.conversation = ""; + Message.prototype.conversation = null; Message.prototype.senderKeyDistributionMessage = null; Message.prototype.imageMessage = null; Message.prototype.contactMessage = null; @@ -32158,6 +37323,602 @@ export const proto = $root.proto = (() => { Message.prototype.spoilerMessage = null; Message.prototype.pollCreationMessageV6 = null; + let $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, "_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) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_limitSharingMessage", { + get: $util.oneOfGetter($oneOfFields = ["limitSharingMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_botTaskMessage", { + get: $util.oneOfGetter($oneOfFields = ["botTaskMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_questionMessage", { + get: $util.oneOfGetter($oneOfFields = ["questionMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_messageHistoryNotice", { + get: $util.oneOfGetter($oneOfFields = ["messageHistoryNotice"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_groupStatusMessageV2", { + get: $util.oneOfGetter($oneOfFields = ["groupStatusMessageV2"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_botForwardedMessage", { + get: $util.oneOfGetter($oneOfFields = ["botForwardedMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_statusQuestionAnswerMessage", { + get: $util.oneOfGetter($oneOfFields = ["statusQuestionAnswerMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_questionReplyMessage", { + get: $util.oneOfGetter($oneOfFields = ["questionReplyMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_questionResponseMessage", { + get: $util.oneOfGetter($oneOfFields = ["questionResponseMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_statusQuotedMessage", { + get: $util.oneOfGetter($oneOfFields = ["statusQuotedMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_statusStickerInteractionMessage", { + get: $util.oneOfGetter($oneOfFields = ["statusStickerInteractionMessage"]), + 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, "_newsletterFollowerInviteMessageV2", { + get: $util.oneOfGetter($oneOfFields = ["newsletterFollowerInviteMessageV2"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_pollResultSnapshotMessageV3", { + get: $util.oneOfGetter($oneOfFields = ["pollResultSnapshotMessageV3"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_newsletterAdminProfileMessage", { + get: $util.oneOfGetter($oneOfFields = ["newsletterAdminProfileMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_newsletterAdminProfileMessageV2", { + get: $util.oneOfGetter($oneOfFields = ["newsletterAdminProfileMessageV2"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_spoilerMessage", { + get: $util.oneOfGetter($oneOfFields = ["spoilerMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Message.prototype, "_pollCreationMessageV6", { + get: $util.oneOfGetter($oneOfFields = ["pollCreationMessageV6"]), + set: $util.oneOfSetter($oneOfFields) + }); + Message.create = function create(properties) { return new Message(properties); }; @@ -33283,403 +39044,500 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.conversation = ""; - d.senderKeyDistributionMessage = null; - d.imageMessage = null; - d.contactMessage = null; - d.locationMessage = null; - d.extendedTextMessage = null; - d.documentMessage = null; - d.audioMessage = null; - d.videoMessage = null; - d.call = null; - d.chat = null; - d.protocolMessage = null; - d.contactsArrayMessage = null; - d.highlyStructuredMessage = null; - d.fastRatchetKeySenderKeyDistributionMessage = null; - d.sendPaymentMessage = null; - d.liveLocationMessage = null; - d.requestPaymentMessage = null; - d.declinePaymentRequestMessage = null; - d.cancelPaymentRequestMessage = null; - d.templateMessage = null; - d.stickerMessage = null; - d.groupInviteMessage = null; - d.templateButtonReplyMessage = null; - d.productMessage = null; - d.deviceSentMessage = null; - d.messageContextInfo = null; - d.listMessage = null; - d.viewOnceMessage = null; - d.orderMessage = null; - d.listResponseMessage = null; - d.ephemeralMessage = null; - d.invoiceMessage = null; - d.buttonsMessage = null; - d.buttonsResponseMessage = null; - d.paymentInviteMessage = null; - d.interactiveMessage = null; - d.reactionMessage = null; - d.stickerSyncRmrMessage = null; - d.interactiveResponseMessage = null; - d.pollCreationMessage = null; - d.pollUpdateMessage = null; - d.keepInChatMessage = null; - d.documentWithCaptionMessage = null; - d.requestPhoneNumberMessage = null; - d.viewOnceMessageV2 = null; - d.encReactionMessage = null; - d.editedMessage = null; - d.viewOnceMessageV2Extension = null; - d.pollCreationMessageV2 = null; - d.scheduledCallCreationMessage = null; - d.groupMentionedMessage = null; - d.pinInChatMessage = null; - d.pollCreationMessageV3 = null; - d.scheduledCallEditMessage = null; - d.ptvMessage = null; - d.botInvokeMessage = null; - d.callLogMesssage = null; - d.messageHistoryBundle = null; - d.encCommentMessage = null; - d.bcallMessage = null; - d.lottieStickerMessage = null; - d.eventMessage = null; - d.encEventResponseMessage = null; - d.commentMessage = null; - d.newsletterAdminInviteMessage = null; - d.placeholderMessage = null; - d.secretEncryptedMessage = null; - d.albumMessage = null; - d.eventCoverImage = null; - d.stickerPackMessage = null; - d.statusMentionMessage = null; - d.pollResultSnapshotMessage = null; - d.pollCreationOptionImageMessage = null; - d.associatedChildMessage = null; - d.groupStatusMentionMessage = null; - d.pollCreationMessageV4 = null; - d.statusAddYours = null; - d.groupStatusMessage = null; - d.richResponseMessage = null; - d.statusNotificationMessage = null; - d.limitSharingMessage = null; - d.botTaskMessage = null; - d.questionMessage = null; - d.messageHistoryNotice = null; - d.groupStatusMessageV2 = null; - d.botForwardedMessage = null; - d.statusQuestionAnswerMessage = null; - d.questionReplyMessage = null; - d.questionResponseMessage = null; - d.statusQuotedMessage = null; - d.statusStickerInteractionMessage = null; - d.pollCreationMessageV5 = null; - d.newsletterFollowerInviteMessageV2 = null; - d.pollResultSnapshotMessageV3 = null; - d.newsletterAdminProfileMessage = null; - d.newsletterAdminProfileMessageV2 = null; - d.spoilerMessage = null; - d.pollCreationMessageV6 = null; - } if (m.conversation != null && m.hasOwnProperty("conversation")) { d.conversation = m.conversation; + if (o.oneofs) + d._conversation = "conversation"; } if (m.senderKeyDistributionMessage != null && m.hasOwnProperty("senderKeyDistributionMessage")) { d.senderKeyDistributionMessage = $root.proto.Message.SenderKeyDistributionMessage.toObject(m.senderKeyDistributionMessage, o); + if (o.oneofs) + d._senderKeyDistributionMessage = "senderKeyDistributionMessage"; } if (m.imageMessage != null && m.hasOwnProperty("imageMessage")) { d.imageMessage = $root.proto.Message.ImageMessage.toObject(m.imageMessage, o); + if (o.oneofs) + d._imageMessage = "imageMessage"; } if (m.contactMessage != null && m.hasOwnProperty("contactMessage")) { d.contactMessage = $root.proto.Message.ContactMessage.toObject(m.contactMessage, o); + if (o.oneofs) + d._contactMessage = "contactMessage"; } if (m.locationMessage != null && m.hasOwnProperty("locationMessage")) { d.locationMessage = $root.proto.Message.LocationMessage.toObject(m.locationMessage, o); + if (o.oneofs) + d._locationMessage = "locationMessage"; } if (m.extendedTextMessage != null && m.hasOwnProperty("extendedTextMessage")) { d.extendedTextMessage = $root.proto.Message.ExtendedTextMessage.toObject(m.extendedTextMessage, o); + if (o.oneofs) + d._extendedTextMessage = "extendedTextMessage"; } if (m.documentMessage != null && m.hasOwnProperty("documentMessage")) { d.documentMessage = $root.proto.Message.DocumentMessage.toObject(m.documentMessage, o); + if (o.oneofs) + d._documentMessage = "documentMessage"; } if (m.audioMessage != null && m.hasOwnProperty("audioMessage")) { d.audioMessage = $root.proto.Message.AudioMessage.toObject(m.audioMessage, o); + if (o.oneofs) + d._audioMessage = "audioMessage"; } if (m.videoMessage != null && m.hasOwnProperty("videoMessage")) { d.videoMessage = $root.proto.Message.VideoMessage.toObject(m.videoMessage, o); + if (o.oneofs) + d._videoMessage = "videoMessage"; } if (m.call != null && m.hasOwnProperty("call")) { d.call = $root.proto.Message.Call.toObject(m.call, o); + if (o.oneofs) + d._call = "call"; } if (m.chat != null && m.hasOwnProperty("chat")) { d.chat = $root.proto.Message.Chat.toObject(m.chat, o); + if (o.oneofs) + d._chat = "chat"; } if (m.protocolMessage != null && m.hasOwnProperty("protocolMessage")) { d.protocolMessage = $root.proto.Message.ProtocolMessage.toObject(m.protocolMessage, o); + if (o.oneofs) + d._protocolMessage = "protocolMessage"; } if (m.contactsArrayMessage != null && m.hasOwnProperty("contactsArrayMessage")) { d.contactsArrayMessage = $root.proto.Message.ContactsArrayMessage.toObject(m.contactsArrayMessage, o); + if (o.oneofs) + d._contactsArrayMessage = "contactsArrayMessage"; } if (m.highlyStructuredMessage != null && m.hasOwnProperty("highlyStructuredMessage")) { d.highlyStructuredMessage = $root.proto.Message.HighlyStructuredMessage.toObject(m.highlyStructuredMessage, o); + if (o.oneofs) + d._highlyStructuredMessage = "highlyStructuredMessage"; } if (m.fastRatchetKeySenderKeyDistributionMessage != null && m.hasOwnProperty("fastRatchetKeySenderKeyDistributionMessage")) { d.fastRatchetKeySenderKeyDistributionMessage = $root.proto.Message.SenderKeyDistributionMessage.toObject(m.fastRatchetKeySenderKeyDistributionMessage, o); + if (o.oneofs) + d._fastRatchetKeySenderKeyDistributionMessage = "fastRatchetKeySenderKeyDistributionMessage"; } if (m.sendPaymentMessage != null && m.hasOwnProperty("sendPaymentMessage")) { d.sendPaymentMessage = $root.proto.Message.SendPaymentMessage.toObject(m.sendPaymentMessage, o); + if (o.oneofs) + d._sendPaymentMessage = "sendPaymentMessage"; } if (m.liveLocationMessage != null && m.hasOwnProperty("liveLocationMessage")) { d.liveLocationMessage = $root.proto.Message.LiveLocationMessage.toObject(m.liveLocationMessage, o); + if (o.oneofs) + d._liveLocationMessage = "liveLocationMessage"; } if (m.requestPaymentMessage != null && m.hasOwnProperty("requestPaymentMessage")) { d.requestPaymentMessage = $root.proto.Message.RequestPaymentMessage.toObject(m.requestPaymentMessage, o); + if (o.oneofs) + d._requestPaymentMessage = "requestPaymentMessage"; } if (m.declinePaymentRequestMessage != null && m.hasOwnProperty("declinePaymentRequestMessage")) { d.declinePaymentRequestMessage = $root.proto.Message.DeclinePaymentRequestMessage.toObject(m.declinePaymentRequestMessage, o); + if (o.oneofs) + d._declinePaymentRequestMessage = "declinePaymentRequestMessage"; } if (m.cancelPaymentRequestMessage != null && m.hasOwnProperty("cancelPaymentRequestMessage")) { d.cancelPaymentRequestMessage = $root.proto.Message.CancelPaymentRequestMessage.toObject(m.cancelPaymentRequestMessage, o); + if (o.oneofs) + d._cancelPaymentRequestMessage = "cancelPaymentRequestMessage"; } if (m.templateMessage != null && m.hasOwnProperty("templateMessage")) { d.templateMessage = $root.proto.Message.TemplateMessage.toObject(m.templateMessage, o); + if (o.oneofs) + d._templateMessage = "templateMessage"; } if (m.stickerMessage != null && m.hasOwnProperty("stickerMessage")) { d.stickerMessage = $root.proto.Message.StickerMessage.toObject(m.stickerMessage, o); + if (o.oneofs) + d._stickerMessage = "stickerMessage"; } if (m.groupInviteMessage != null && m.hasOwnProperty("groupInviteMessage")) { d.groupInviteMessage = $root.proto.Message.GroupInviteMessage.toObject(m.groupInviteMessage, o); + if (o.oneofs) + d._groupInviteMessage = "groupInviteMessage"; } if (m.templateButtonReplyMessage != null && m.hasOwnProperty("templateButtonReplyMessage")) { d.templateButtonReplyMessage = $root.proto.Message.TemplateButtonReplyMessage.toObject(m.templateButtonReplyMessage, o); + if (o.oneofs) + d._templateButtonReplyMessage = "templateButtonReplyMessage"; } if (m.productMessage != null && m.hasOwnProperty("productMessage")) { d.productMessage = $root.proto.Message.ProductMessage.toObject(m.productMessage, o); + if (o.oneofs) + d._productMessage = "productMessage"; } if (m.deviceSentMessage != null && m.hasOwnProperty("deviceSentMessage")) { d.deviceSentMessage = $root.proto.Message.DeviceSentMessage.toObject(m.deviceSentMessage, o); + if (o.oneofs) + d._deviceSentMessage = "deviceSentMessage"; } if (m.messageContextInfo != null && m.hasOwnProperty("messageContextInfo")) { d.messageContextInfo = $root.proto.MessageContextInfo.toObject(m.messageContextInfo, o); + if (o.oneofs) + d._messageContextInfo = "messageContextInfo"; } if (m.listMessage != null && m.hasOwnProperty("listMessage")) { d.listMessage = $root.proto.Message.ListMessage.toObject(m.listMessage, o); + if (o.oneofs) + d._listMessage = "listMessage"; } if (m.viewOnceMessage != null && m.hasOwnProperty("viewOnceMessage")) { d.viewOnceMessage = $root.proto.Message.FutureProofMessage.toObject(m.viewOnceMessage, o); + if (o.oneofs) + d._viewOnceMessage = "viewOnceMessage"; } if (m.orderMessage != null && m.hasOwnProperty("orderMessage")) { d.orderMessage = $root.proto.Message.OrderMessage.toObject(m.orderMessage, o); + if (o.oneofs) + d._orderMessage = "orderMessage"; } if (m.listResponseMessage != null && m.hasOwnProperty("listResponseMessage")) { d.listResponseMessage = $root.proto.Message.ListResponseMessage.toObject(m.listResponseMessage, o); + if (o.oneofs) + d._listResponseMessage = "listResponseMessage"; } if (m.ephemeralMessage != null && m.hasOwnProperty("ephemeralMessage")) { d.ephemeralMessage = $root.proto.Message.FutureProofMessage.toObject(m.ephemeralMessage, o); + if (o.oneofs) + d._ephemeralMessage = "ephemeralMessage"; } if (m.invoiceMessage != null && m.hasOwnProperty("invoiceMessage")) { d.invoiceMessage = $root.proto.Message.InvoiceMessage.toObject(m.invoiceMessage, o); + if (o.oneofs) + d._invoiceMessage = "invoiceMessage"; } if (m.buttonsMessage != null && m.hasOwnProperty("buttonsMessage")) { d.buttonsMessage = $root.proto.Message.ButtonsMessage.toObject(m.buttonsMessage, o); + if (o.oneofs) + d._buttonsMessage = "buttonsMessage"; } if (m.buttonsResponseMessage != null && m.hasOwnProperty("buttonsResponseMessage")) { d.buttonsResponseMessage = $root.proto.Message.ButtonsResponseMessage.toObject(m.buttonsResponseMessage, o); + if (o.oneofs) + d._buttonsResponseMessage = "buttonsResponseMessage"; } if (m.paymentInviteMessage != null && m.hasOwnProperty("paymentInviteMessage")) { d.paymentInviteMessage = $root.proto.Message.PaymentInviteMessage.toObject(m.paymentInviteMessage, o); + if (o.oneofs) + d._paymentInviteMessage = "paymentInviteMessage"; } if (m.interactiveMessage != null && m.hasOwnProperty("interactiveMessage")) { d.interactiveMessage = $root.proto.Message.InteractiveMessage.toObject(m.interactiveMessage, o); + if (o.oneofs) + d._interactiveMessage = "interactiveMessage"; } if (m.reactionMessage != null && m.hasOwnProperty("reactionMessage")) { d.reactionMessage = $root.proto.Message.ReactionMessage.toObject(m.reactionMessage, o); + if (o.oneofs) + d._reactionMessage = "reactionMessage"; } if (m.stickerSyncRmrMessage != null && m.hasOwnProperty("stickerSyncRmrMessage")) { d.stickerSyncRmrMessage = $root.proto.Message.StickerSyncRMRMessage.toObject(m.stickerSyncRmrMessage, o); + if (o.oneofs) + d._stickerSyncRmrMessage = "stickerSyncRmrMessage"; } if (m.interactiveResponseMessage != null && m.hasOwnProperty("interactiveResponseMessage")) { d.interactiveResponseMessage = $root.proto.Message.InteractiveResponseMessage.toObject(m.interactiveResponseMessage, o); + if (o.oneofs) + d._interactiveResponseMessage = "interactiveResponseMessage"; } if (m.pollCreationMessage != null && m.hasOwnProperty("pollCreationMessage")) { d.pollCreationMessage = $root.proto.Message.PollCreationMessage.toObject(m.pollCreationMessage, o); + if (o.oneofs) + d._pollCreationMessage = "pollCreationMessage"; } if (m.pollUpdateMessage != null && m.hasOwnProperty("pollUpdateMessage")) { d.pollUpdateMessage = $root.proto.Message.PollUpdateMessage.toObject(m.pollUpdateMessage, o); + if (o.oneofs) + d._pollUpdateMessage = "pollUpdateMessage"; } if (m.keepInChatMessage != null && m.hasOwnProperty("keepInChatMessage")) { d.keepInChatMessage = $root.proto.Message.KeepInChatMessage.toObject(m.keepInChatMessage, o); + if (o.oneofs) + d._keepInChatMessage = "keepInChatMessage"; } if (m.documentWithCaptionMessage != null && m.hasOwnProperty("documentWithCaptionMessage")) { d.documentWithCaptionMessage = $root.proto.Message.FutureProofMessage.toObject(m.documentWithCaptionMessage, o); + if (o.oneofs) + d._documentWithCaptionMessage = "documentWithCaptionMessage"; } if (m.requestPhoneNumberMessage != null && m.hasOwnProperty("requestPhoneNumberMessage")) { d.requestPhoneNumberMessage = $root.proto.Message.RequestPhoneNumberMessage.toObject(m.requestPhoneNumberMessage, o); + if (o.oneofs) + d._requestPhoneNumberMessage = "requestPhoneNumberMessage"; } if (m.viewOnceMessageV2 != null && m.hasOwnProperty("viewOnceMessageV2")) { d.viewOnceMessageV2 = $root.proto.Message.FutureProofMessage.toObject(m.viewOnceMessageV2, o); + if (o.oneofs) + d._viewOnceMessageV2 = "viewOnceMessageV2"; } if (m.encReactionMessage != null && m.hasOwnProperty("encReactionMessage")) { d.encReactionMessage = $root.proto.Message.EncReactionMessage.toObject(m.encReactionMessage, o); + if (o.oneofs) + d._encReactionMessage = "encReactionMessage"; } if (m.editedMessage != null && m.hasOwnProperty("editedMessage")) { d.editedMessage = $root.proto.Message.FutureProofMessage.toObject(m.editedMessage, o); + if (o.oneofs) + d._editedMessage = "editedMessage"; } if (m.viewOnceMessageV2Extension != null && m.hasOwnProperty("viewOnceMessageV2Extension")) { d.viewOnceMessageV2Extension = $root.proto.Message.FutureProofMessage.toObject(m.viewOnceMessageV2Extension, o); + if (o.oneofs) + d._viewOnceMessageV2Extension = "viewOnceMessageV2Extension"; } if (m.pollCreationMessageV2 != null && m.hasOwnProperty("pollCreationMessageV2")) { d.pollCreationMessageV2 = $root.proto.Message.PollCreationMessage.toObject(m.pollCreationMessageV2, o); + if (o.oneofs) + d._pollCreationMessageV2 = "pollCreationMessageV2"; } if (m.scheduledCallCreationMessage != null && m.hasOwnProperty("scheduledCallCreationMessage")) { d.scheduledCallCreationMessage = $root.proto.Message.ScheduledCallCreationMessage.toObject(m.scheduledCallCreationMessage, o); + if (o.oneofs) + d._scheduledCallCreationMessage = "scheduledCallCreationMessage"; } if (m.groupMentionedMessage != null && m.hasOwnProperty("groupMentionedMessage")) { d.groupMentionedMessage = $root.proto.Message.FutureProofMessage.toObject(m.groupMentionedMessage, o); + if (o.oneofs) + d._groupMentionedMessage = "groupMentionedMessage"; } if (m.pinInChatMessage != null && m.hasOwnProperty("pinInChatMessage")) { d.pinInChatMessage = $root.proto.Message.PinInChatMessage.toObject(m.pinInChatMessage, o); + if (o.oneofs) + d._pinInChatMessage = "pinInChatMessage"; } if (m.pollCreationMessageV3 != null && m.hasOwnProperty("pollCreationMessageV3")) { d.pollCreationMessageV3 = $root.proto.Message.PollCreationMessage.toObject(m.pollCreationMessageV3, o); + if (o.oneofs) + d._pollCreationMessageV3 = "pollCreationMessageV3"; } if (m.scheduledCallEditMessage != null && m.hasOwnProperty("scheduledCallEditMessage")) { d.scheduledCallEditMessage = $root.proto.Message.ScheduledCallEditMessage.toObject(m.scheduledCallEditMessage, o); + if (o.oneofs) + d._scheduledCallEditMessage = "scheduledCallEditMessage"; } if (m.ptvMessage != null && m.hasOwnProperty("ptvMessage")) { d.ptvMessage = $root.proto.Message.VideoMessage.toObject(m.ptvMessage, o); + if (o.oneofs) + d._ptvMessage = "ptvMessage"; } if (m.botInvokeMessage != null && m.hasOwnProperty("botInvokeMessage")) { d.botInvokeMessage = $root.proto.Message.FutureProofMessage.toObject(m.botInvokeMessage, o); + if (o.oneofs) + d._botInvokeMessage = "botInvokeMessage"; } if (m.callLogMesssage != null && m.hasOwnProperty("callLogMesssage")) { d.callLogMesssage = $root.proto.Message.CallLogMessage.toObject(m.callLogMesssage, o); + if (o.oneofs) + d._callLogMesssage = "callLogMesssage"; } if (m.messageHistoryBundle != null && m.hasOwnProperty("messageHistoryBundle")) { d.messageHistoryBundle = $root.proto.Message.MessageHistoryBundle.toObject(m.messageHistoryBundle, o); + if (o.oneofs) + d._messageHistoryBundle = "messageHistoryBundle"; } if (m.encCommentMessage != null && m.hasOwnProperty("encCommentMessage")) { d.encCommentMessage = $root.proto.Message.EncCommentMessage.toObject(m.encCommentMessage, o); + if (o.oneofs) + d._encCommentMessage = "encCommentMessage"; } if (m.bcallMessage != null && m.hasOwnProperty("bcallMessage")) { d.bcallMessage = $root.proto.Message.BCallMessage.toObject(m.bcallMessage, o); + if (o.oneofs) + d._bcallMessage = "bcallMessage"; } if (m.lottieStickerMessage != null && m.hasOwnProperty("lottieStickerMessage")) { d.lottieStickerMessage = $root.proto.Message.FutureProofMessage.toObject(m.lottieStickerMessage, o); + if (o.oneofs) + d._lottieStickerMessage = "lottieStickerMessage"; } if (m.eventMessage != null && m.hasOwnProperty("eventMessage")) { d.eventMessage = $root.proto.Message.EventMessage.toObject(m.eventMessage, o); + if (o.oneofs) + d._eventMessage = "eventMessage"; } if (m.encEventResponseMessage != null && m.hasOwnProperty("encEventResponseMessage")) { d.encEventResponseMessage = $root.proto.Message.EncEventResponseMessage.toObject(m.encEventResponseMessage, o); + if (o.oneofs) + d._encEventResponseMessage = "encEventResponseMessage"; } if (m.commentMessage != null && m.hasOwnProperty("commentMessage")) { d.commentMessage = $root.proto.Message.CommentMessage.toObject(m.commentMessage, o); + if (o.oneofs) + d._commentMessage = "commentMessage"; } if (m.newsletterAdminInviteMessage != null && m.hasOwnProperty("newsletterAdminInviteMessage")) { d.newsletterAdminInviteMessage = $root.proto.Message.NewsletterAdminInviteMessage.toObject(m.newsletterAdminInviteMessage, o); + if (o.oneofs) + d._newsletterAdminInviteMessage = "newsletterAdminInviteMessage"; } if (m.placeholderMessage != null && m.hasOwnProperty("placeholderMessage")) { d.placeholderMessage = $root.proto.Message.PlaceholderMessage.toObject(m.placeholderMessage, o); + if (o.oneofs) + d._placeholderMessage = "placeholderMessage"; } if (m.secretEncryptedMessage != null && m.hasOwnProperty("secretEncryptedMessage")) { d.secretEncryptedMessage = $root.proto.Message.SecretEncryptedMessage.toObject(m.secretEncryptedMessage, o); + if (o.oneofs) + d._secretEncryptedMessage = "secretEncryptedMessage"; } if (m.albumMessage != null && m.hasOwnProperty("albumMessage")) { d.albumMessage = $root.proto.Message.AlbumMessage.toObject(m.albumMessage, o); + if (o.oneofs) + d._albumMessage = "albumMessage"; } if (m.eventCoverImage != null && m.hasOwnProperty("eventCoverImage")) { d.eventCoverImage = $root.proto.Message.FutureProofMessage.toObject(m.eventCoverImage, o); + if (o.oneofs) + d._eventCoverImage = "eventCoverImage"; } if (m.stickerPackMessage != null && m.hasOwnProperty("stickerPackMessage")) { d.stickerPackMessage = $root.proto.Message.StickerPackMessage.toObject(m.stickerPackMessage, o); + if (o.oneofs) + d._stickerPackMessage = "stickerPackMessage"; } if (m.statusMentionMessage != null && m.hasOwnProperty("statusMentionMessage")) { d.statusMentionMessage = $root.proto.Message.FutureProofMessage.toObject(m.statusMentionMessage, o); + if (o.oneofs) + d._statusMentionMessage = "statusMentionMessage"; } if (m.pollResultSnapshotMessage != null && m.hasOwnProperty("pollResultSnapshotMessage")) { d.pollResultSnapshotMessage = $root.proto.Message.PollResultSnapshotMessage.toObject(m.pollResultSnapshotMessage, o); + if (o.oneofs) + d._pollResultSnapshotMessage = "pollResultSnapshotMessage"; } if (m.pollCreationOptionImageMessage != null && m.hasOwnProperty("pollCreationOptionImageMessage")) { d.pollCreationOptionImageMessage = $root.proto.Message.FutureProofMessage.toObject(m.pollCreationOptionImageMessage, o); + if (o.oneofs) + d._pollCreationOptionImageMessage = "pollCreationOptionImageMessage"; } if (m.associatedChildMessage != null && m.hasOwnProperty("associatedChildMessage")) { d.associatedChildMessage = $root.proto.Message.FutureProofMessage.toObject(m.associatedChildMessage, o); + if (o.oneofs) + d._associatedChildMessage = "associatedChildMessage"; } if (m.groupStatusMentionMessage != null && m.hasOwnProperty("groupStatusMentionMessage")) { d.groupStatusMentionMessage = $root.proto.Message.FutureProofMessage.toObject(m.groupStatusMentionMessage, o); + if (o.oneofs) + d._groupStatusMentionMessage = "groupStatusMentionMessage"; } if (m.pollCreationMessageV4 != null && m.hasOwnProperty("pollCreationMessageV4")) { d.pollCreationMessageV4 = $root.proto.Message.FutureProofMessage.toObject(m.pollCreationMessageV4, o); + if (o.oneofs) + d._pollCreationMessageV4 = "pollCreationMessageV4"; } if (m.statusAddYours != null && m.hasOwnProperty("statusAddYours")) { d.statusAddYours = $root.proto.Message.FutureProofMessage.toObject(m.statusAddYours, o); + if (o.oneofs) + d._statusAddYours = "statusAddYours"; } if (m.groupStatusMessage != null && m.hasOwnProperty("groupStatusMessage")) { d.groupStatusMessage = $root.proto.Message.FutureProofMessage.toObject(m.groupStatusMessage, o); + if (o.oneofs) + d._groupStatusMessage = "groupStatusMessage"; } if (m.richResponseMessage != null && m.hasOwnProperty("richResponseMessage")) { d.richResponseMessage = $root.proto.AIRichResponseMessage.toObject(m.richResponseMessage, o); + if (o.oneofs) + d._richResponseMessage = "richResponseMessage"; } if (m.statusNotificationMessage != null && m.hasOwnProperty("statusNotificationMessage")) { d.statusNotificationMessage = $root.proto.Message.StatusNotificationMessage.toObject(m.statusNotificationMessage, o); + if (o.oneofs) + d._statusNotificationMessage = "statusNotificationMessage"; } if (m.limitSharingMessage != null && m.hasOwnProperty("limitSharingMessage")) { d.limitSharingMessage = $root.proto.Message.FutureProofMessage.toObject(m.limitSharingMessage, o); + if (o.oneofs) + d._limitSharingMessage = "limitSharingMessage"; } if (m.botTaskMessage != null && m.hasOwnProperty("botTaskMessage")) { d.botTaskMessage = $root.proto.Message.FutureProofMessage.toObject(m.botTaskMessage, o); + if (o.oneofs) + d._botTaskMessage = "botTaskMessage"; } if (m.questionMessage != null && m.hasOwnProperty("questionMessage")) { d.questionMessage = $root.proto.Message.FutureProofMessage.toObject(m.questionMessage, o); + if (o.oneofs) + d._questionMessage = "questionMessage"; } if (m.messageHistoryNotice != null && m.hasOwnProperty("messageHistoryNotice")) { d.messageHistoryNotice = $root.proto.Message.MessageHistoryNotice.toObject(m.messageHistoryNotice, o); + if (o.oneofs) + d._messageHistoryNotice = "messageHistoryNotice"; } if (m.groupStatusMessageV2 != null && m.hasOwnProperty("groupStatusMessageV2")) { d.groupStatusMessageV2 = $root.proto.Message.FutureProofMessage.toObject(m.groupStatusMessageV2, o); + if (o.oneofs) + d._groupStatusMessageV2 = "groupStatusMessageV2"; } if (m.botForwardedMessage != null && m.hasOwnProperty("botForwardedMessage")) { d.botForwardedMessage = $root.proto.Message.FutureProofMessage.toObject(m.botForwardedMessage, o); + if (o.oneofs) + d._botForwardedMessage = "botForwardedMessage"; } if (m.statusQuestionAnswerMessage != null && m.hasOwnProperty("statusQuestionAnswerMessage")) { d.statusQuestionAnswerMessage = $root.proto.Message.StatusQuestionAnswerMessage.toObject(m.statusQuestionAnswerMessage, o); + if (o.oneofs) + d._statusQuestionAnswerMessage = "statusQuestionAnswerMessage"; } if (m.questionReplyMessage != null && m.hasOwnProperty("questionReplyMessage")) { d.questionReplyMessage = $root.proto.Message.FutureProofMessage.toObject(m.questionReplyMessage, o); + if (o.oneofs) + d._questionReplyMessage = "questionReplyMessage"; } if (m.questionResponseMessage != null && m.hasOwnProperty("questionResponseMessage")) { d.questionResponseMessage = $root.proto.Message.QuestionResponseMessage.toObject(m.questionResponseMessage, o); + if (o.oneofs) + d._questionResponseMessage = "questionResponseMessage"; } if (m.statusQuotedMessage != null && m.hasOwnProperty("statusQuotedMessage")) { d.statusQuotedMessage = $root.proto.Message.StatusQuotedMessage.toObject(m.statusQuotedMessage, o); + if (o.oneofs) + d._statusQuotedMessage = "statusQuotedMessage"; } if (m.statusStickerInteractionMessage != null && m.hasOwnProperty("statusStickerInteractionMessage")) { d.statusStickerInteractionMessage = $root.proto.Message.StatusStickerInteractionMessage.toObject(m.statusStickerInteractionMessage, o); + if (o.oneofs) + d._statusStickerInteractionMessage = "statusStickerInteractionMessage"; } if (m.pollCreationMessageV5 != null && m.hasOwnProperty("pollCreationMessageV5")) { d.pollCreationMessageV5 = $root.proto.Message.PollCreationMessage.toObject(m.pollCreationMessageV5, o); + if (o.oneofs) + d._pollCreationMessageV5 = "pollCreationMessageV5"; } if (m.newsletterFollowerInviteMessageV2 != null && m.hasOwnProperty("newsletterFollowerInviteMessageV2")) { d.newsletterFollowerInviteMessageV2 = $root.proto.Message.NewsletterFollowerInviteMessage.toObject(m.newsletterFollowerInviteMessageV2, o); + if (o.oneofs) + d._newsletterFollowerInviteMessageV2 = "newsletterFollowerInviteMessageV2"; } if (m.pollResultSnapshotMessageV3 != null && m.hasOwnProperty("pollResultSnapshotMessageV3")) { d.pollResultSnapshotMessageV3 = $root.proto.Message.PollResultSnapshotMessage.toObject(m.pollResultSnapshotMessageV3, o); + if (o.oneofs) + d._pollResultSnapshotMessageV3 = "pollResultSnapshotMessageV3"; } if (m.newsletterAdminProfileMessage != null && m.hasOwnProperty("newsletterAdminProfileMessage")) { d.newsletterAdminProfileMessage = $root.proto.Message.FutureProofMessage.toObject(m.newsletterAdminProfileMessage, o); + if (o.oneofs) + d._newsletterAdminProfileMessage = "newsletterAdminProfileMessage"; } if (m.newsletterAdminProfileMessageV2 != null && m.hasOwnProperty("newsletterAdminProfileMessageV2")) { d.newsletterAdminProfileMessageV2 = $root.proto.Message.FutureProofMessage.toObject(m.newsletterAdminProfileMessageV2, o); + if (o.oneofs) + d._newsletterAdminProfileMessageV2 = "newsletterAdminProfileMessageV2"; } if (m.spoilerMessage != null && m.hasOwnProperty("spoilerMessage")) { d.spoilerMessage = $root.proto.Message.FutureProofMessage.toObject(m.spoilerMessage, o); + if (o.oneofs) + d._spoilerMessage = "spoilerMessage"; } if (m.pollCreationMessageV6 != null && m.hasOwnProperty("pollCreationMessageV6")) { d.pollCreationMessageV6 = $root.proto.Message.FutureProofMessage.toObject(m.pollCreationMessageV6, o); + if (o.oneofs) + d._pollCreationMessageV6 = "pollCreationMessageV6"; } return d; }; @@ -33704,10 +39562,30 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - AlbumMessage.prototype.expectedImageCount = 0; - AlbumMessage.prototype.expectedVideoCount = 0; + AlbumMessage.prototype.expectedImageCount = null; + AlbumMessage.prototype.expectedVideoCount = null; AlbumMessage.prototype.contextInfo = null; + let $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) + }); + AlbumMessage.create = function create(properties) { return new AlbumMessage(properties); }; @@ -33775,19 +39653,20 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.expectedImageCount = 0; - d.expectedVideoCount = 0; - d.contextInfo = null; - } if (m.expectedImageCount != null && m.hasOwnProperty("expectedImageCount")) { d.expectedImageCount = m.expectedImageCount; + if (o.oneofs) + d._expectedImageCount = "expectedImageCount"; } if (m.expectedVideoCount != null && m.hasOwnProperty("expectedVideoCount")) { d.expectedVideoCount = m.expectedVideoCount; + if (o.oneofs) + d._expectedVideoCount = "expectedVideoCount"; } if (m.contextInfo != null && m.hasOwnProperty("contextInfo")) { d.contextInfo = $root.proto.ContextInfo.toObject(m.contextInfo, o); + if (o.oneofs) + d._contextInfo = "contextInfo"; } return d; }; @@ -33817,7 +39696,15 @@ export const proto = $root.proto = (() => { } AppStateFatalExceptionNotification.prototype.collectionNames = $util.emptyArray; - AppStateFatalExceptionNotification.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + AppStateFatalExceptionNotification.prototype.timestamp = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AppStateFatalExceptionNotification.prototype, "_timestamp", { + get: $util.oneOfGetter($oneOfFields = ["timestamp"]), + set: $util.oneOfSetter($oneOfFields) + }); AppStateFatalExceptionNotification.create = function create(properties) { return new AppStateFatalExceptionNotification(properties); @@ -33894,13 +39781,6 @@ export const proto = $root.proto = (() => { if (o.arrays || o.defaults) { d.collectionNames = []; } - if (o.defaults) { - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.timestamp = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.timestamp = o.longs === String ? "0" : 0; - } if (m.collectionNames && m.collectionNames.length) { d.collectionNames = []; for (var j = 0; j < m.collectionNames.length; ++j) { @@ -33912,6 +39792,8 @@ export const proto = $root.proto = (() => { d.timestamp = o.longs === String ? String(m.timestamp) : m.timestamp; else d.timestamp = o.longs === String ? longToString(m.timestamp) : o.longs === Number ? longToNumber(m.timestamp) : m.timestamp; + if (o.oneofs) + d._timestamp = "timestamp"; } return d; }; @@ -33942,6 +39824,20 @@ export const proto = $root.proto = (() => { AppStateSyncKey.prototype.keyId = null; AppStateSyncKey.prototype.keyData = null; + let $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) + }); + AppStateSyncKey.create = function create(properties) { return new AppStateSyncKey(properties); }; @@ -34002,15 +39898,15 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.keyId = null; - d.keyData = null; - } if (m.keyId != null && m.hasOwnProperty("keyId")) { d.keyId = $root.proto.Message.AppStateSyncKeyId.toObject(m.keyId, o); + if (o.oneofs) + d._keyId = "keyId"; } if (m.keyData != null && m.hasOwnProperty("keyData")) { d.keyData = $root.proto.Message.AppStateSyncKeyData.toObject(m.keyData, o); + if (o.oneofs) + d._keyData = "keyData"; } return d; }; @@ -34038,9 +39934,29 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - AppStateSyncKeyData.prototype.keyData = $util.newBuffer([]); + AppStateSyncKeyData.prototype.keyData = null; AppStateSyncKeyData.prototype.fingerprint = null; - AppStateSyncKeyData.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + AppStateSyncKeyData.prototype.timestamp = null; + + let $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) + }); AppStateSyncKeyData.create = function create(properties) { return new AppStateSyncKeyData(properties); @@ -34119,32 +40035,23 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - if (o.bytes === String) - d.keyData = ""; - else { - d.keyData = []; - if (o.bytes !== Array) - d.keyData = $util.newBuffer(d.keyData); - } - d.fingerprint = null; - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.timestamp = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.timestamp = o.longs === String ? "0" : 0; - } if (m.keyData != null && m.hasOwnProperty("keyData")) { d.keyData = o.bytes === String ? $util.base64.encode(m.keyData, 0, m.keyData.length) : o.bytes === Array ? Array.prototype.slice.call(m.keyData) : m.keyData; + if (o.oneofs) + d._keyData = "keyData"; } if (m.fingerprint != null && m.hasOwnProperty("fingerprint")) { d.fingerprint = $root.proto.Message.AppStateSyncKeyFingerprint.toObject(m.fingerprint, o); + if (o.oneofs) + d._fingerprint = "fingerprint"; } if (m.timestamp != null && m.hasOwnProperty("timestamp")) { if (typeof m.timestamp === "number") d.timestamp = o.longs === String ? String(m.timestamp) : m.timestamp; else d.timestamp = o.longs === String ? longToString(m.timestamp) : o.longs === Number ? longToNumber(m.timestamp) : m.timestamp; + if (o.oneofs) + d._timestamp = "timestamp"; } return d; }; @@ -34173,10 +40080,24 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - AppStateSyncKeyFingerprint.prototype.rawId = 0; - AppStateSyncKeyFingerprint.prototype.currentIndex = 0; + AppStateSyncKeyFingerprint.prototype.rawId = null; + AppStateSyncKeyFingerprint.prototype.currentIndex = null; AppStateSyncKeyFingerprint.prototype.deviceIndexes = $util.emptyArray; + let $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) + }); + AppStateSyncKeyFingerprint.create = function create(properties) { return new AppStateSyncKeyFingerprint(properties); }; @@ -34261,15 +40182,15 @@ export const proto = $root.proto = (() => { if (o.arrays || o.defaults) { d.deviceIndexes = []; } - if (o.defaults) { - d.rawId = 0; - d.currentIndex = 0; - } if (m.rawId != null && m.hasOwnProperty("rawId")) { d.rawId = m.rawId; + if (o.oneofs) + d._rawId = "rawId"; } if (m.currentIndex != null && m.hasOwnProperty("currentIndex")) { d.currentIndex = m.currentIndex; + if (o.oneofs) + d._currentIndex = "currentIndex"; } if (m.deviceIndexes && m.deviceIndexes.length) { d.deviceIndexes = []; @@ -34303,7 +40224,15 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - AppStateSyncKeyId.prototype.keyId = $util.newBuffer([]); + AppStateSyncKeyId.prototype.keyId = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AppStateSyncKeyId.prototype, "_keyId", { + get: $util.oneOfGetter($oneOfFields = ["keyId"]), + set: $util.oneOfSetter($oneOfFields) + }); AppStateSyncKeyId.create = function create(properties) { return new AppStateSyncKeyId(properties); @@ -34355,17 +40284,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - if (o.bytes === String) - d.keyId = ""; - else { - d.keyId = []; - if (o.bytes !== Array) - d.keyId = $util.newBuffer(d.keyId); - } - } if (m.keyId != null && m.hasOwnProperty("keyId")) { d.keyId = o.bytes === String ? $util.base64.encode(m.keyId, 0, m.keyId.length) : o.bytes === Array ? Array.prototype.slice.call(m.keyId) : m.keyId; + if (o.oneofs) + d._keyId = "keyId"; } return d; }; @@ -34585,22 +40507,120 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - AudioMessage.prototype.url = ""; - AudioMessage.prototype.mimetype = ""; - AudioMessage.prototype.fileSha256 = $util.newBuffer([]); - AudioMessage.prototype.fileLength = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - AudioMessage.prototype.seconds = 0; - AudioMessage.prototype.ptt = false; - AudioMessage.prototype.mediaKey = $util.newBuffer([]); - AudioMessage.prototype.fileEncSha256 = $util.newBuffer([]); - AudioMessage.prototype.directPath = ""; - AudioMessage.prototype.mediaKeyTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + AudioMessage.prototype.url = null; + AudioMessage.prototype.mimetype = null; + AudioMessage.prototype.fileSha256 = null; + AudioMessage.prototype.fileLength = null; + AudioMessage.prototype.seconds = null; + AudioMessage.prototype.ptt = null; + AudioMessage.prototype.mediaKey = null; + AudioMessage.prototype.fileEncSha256 = null; + AudioMessage.prototype.directPath = null; + AudioMessage.prototype.mediaKeyTimestamp = null; AudioMessage.prototype.contextInfo = null; - AudioMessage.prototype.streamingSidecar = $util.newBuffer([]); - AudioMessage.prototype.waveform = $util.newBuffer([]); - AudioMessage.prototype.backgroundArgb = 0; - AudioMessage.prototype.viewOnce = false; - AudioMessage.prototype.accessibilityLabel = ""; + AudioMessage.prototype.streamingSidecar = null; + AudioMessage.prototype.waveform = null; + AudioMessage.prototype.backgroundArgb = null; + AudioMessage.prototype.viewOnce = null; + AudioMessage.prototype.accessibilityLabel = null; + + let $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) + }); AudioMessage.create = function create(properties) { return new AudioMessage(properties); @@ -34815,115 +40835,91 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.url = ""; - d.mimetype = ""; - if (o.bytes === String) - d.fileSha256 = ""; - else { - d.fileSha256 = []; - if (o.bytes !== Array) - d.fileSha256 = $util.newBuffer(d.fileSha256); - } - if ($util.Long) { - var n = new $util.Long(0, 0, true); - d.fileLength = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.fileLength = o.longs === String ? "0" : 0; - d.seconds = 0; - d.ptt = false; - if (o.bytes === String) - d.mediaKey = ""; - else { - d.mediaKey = []; - if (o.bytes !== Array) - d.mediaKey = $util.newBuffer(d.mediaKey); - } - if (o.bytes === String) - d.fileEncSha256 = ""; - else { - d.fileEncSha256 = []; - if (o.bytes !== Array) - d.fileEncSha256 = $util.newBuffer(d.fileEncSha256); - } - d.directPath = ""; - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.mediaKeyTimestamp = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.mediaKeyTimestamp = o.longs === String ? "0" : 0; - d.contextInfo = null; - if (o.bytes === String) - d.streamingSidecar = ""; - else { - d.streamingSidecar = []; - if (o.bytes !== Array) - d.streamingSidecar = $util.newBuffer(d.streamingSidecar); - } - if (o.bytes === String) - d.waveform = ""; - else { - d.waveform = []; - if (o.bytes !== Array) - d.waveform = $util.newBuffer(d.waveform); - } - d.backgroundArgb = 0; - d.viewOnce = false; - d.accessibilityLabel = ""; - } if (m.url != null && m.hasOwnProperty("url")) { d.url = m.url; + if (o.oneofs) + d._url = "url"; } if (m.mimetype != null && m.hasOwnProperty("mimetype")) { d.mimetype = m.mimetype; + if (o.oneofs) + d._mimetype = "mimetype"; } if (m.fileSha256 != null && m.hasOwnProperty("fileSha256")) { d.fileSha256 = o.bytes === String ? $util.base64.encode(m.fileSha256, 0, m.fileSha256.length) : o.bytes === Array ? Array.prototype.slice.call(m.fileSha256) : m.fileSha256; + if (o.oneofs) + d._fileSha256 = "fileSha256"; } if (m.fileLength != null && m.hasOwnProperty("fileLength")) { if (typeof m.fileLength === "number") d.fileLength = o.longs === String ? String(m.fileLength) : m.fileLength; else d.fileLength = o.longs === String ? longToString(m.fileLength, true) : o.longs === Number ? longToNumber(m.fileLength, true) : m.fileLength; + if (o.oneofs) + d._fileLength = "fileLength"; } if (m.seconds != null && m.hasOwnProperty("seconds")) { d.seconds = m.seconds; + if (o.oneofs) + d._seconds = "seconds"; } if (m.ptt != null && m.hasOwnProperty("ptt")) { d.ptt = m.ptt; + if (o.oneofs) + d._ptt = "ptt"; } if (m.mediaKey != null && m.hasOwnProperty("mediaKey")) { d.mediaKey = o.bytes === String ? $util.base64.encode(m.mediaKey, 0, m.mediaKey.length) : o.bytes === Array ? Array.prototype.slice.call(m.mediaKey) : m.mediaKey; + if (o.oneofs) + d._mediaKey = "mediaKey"; } if (m.fileEncSha256 != null && m.hasOwnProperty("fileEncSha256")) { d.fileEncSha256 = o.bytes === String ? $util.base64.encode(m.fileEncSha256, 0, m.fileEncSha256.length) : o.bytes === Array ? Array.prototype.slice.call(m.fileEncSha256) : m.fileEncSha256; + if (o.oneofs) + d._fileEncSha256 = "fileEncSha256"; } if (m.directPath != null && m.hasOwnProperty("directPath")) { d.directPath = m.directPath; + if (o.oneofs) + d._directPath = "directPath"; } if (m.mediaKeyTimestamp != null && m.hasOwnProperty("mediaKeyTimestamp")) { if (typeof m.mediaKeyTimestamp === "number") d.mediaKeyTimestamp = o.longs === String ? String(m.mediaKeyTimestamp) : m.mediaKeyTimestamp; else d.mediaKeyTimestamp = o.longs === String ? longToString(m.mediaKeyTimestamp) : o.longs === Number ? longToNumber(m.mediaKeyTimestamp) : m.mediaKeyTimestamp; + if (o.oneofs) + d._mediaKeyTimestamp = "mediaKeyTimestamp"; } if (m.contextInfo != null && m.hasOwnProperty("contextInfo")) { d.contextInfo = $root.proto.ContextInfo.toObject(m.contextInfo, o); + if (o.oneofs) + d._contextInfo = "contextInfo"; } if (m.streamingSidecar != null && m.hasOwnProperty("streamingSidecar")) { d.streamingSidecar = o.bytes === String ? $util.base64.encode(m.streamingSidecar, 0, m.streamingSidecar.length) : o.bytes === Array ? Array.prototype.slice.call(m.streamingSidecar) : m.streamingSidecar; + if (o.oneofs) + d._streamingSidecar = "streamingSidecar"; } if (m.waveform != null && m.hasOwnProperty("waveform")) { d.waveform = o.bytes === String ? $util.base64.encode(m.waveform, 0, m.waveform.length) : o.bytes === Array ? Array.prototype.slice.call(m.waveform) : m.waveform; + if (o.oneofs) + d._waveform = "waveform"; } if (m.backgroundArgb != null && m.hasOwnProperty("backgroundArgb")) { d.backgroundArgb = m.backgroundArgb; + if (o.oneofs) + d._backgroundArgb = "backgroundArgb"; } if (m.viewOnce != null && m.hasOwnProperty("viewOnce")) { d.viewOnce = m.viewOnce; + if (o.oneofs) + d._viewOnce = "viewOnce"; } if (m.accessibilityLabel != null && m.hasOwnProperty("accessibilityLabel")) { d.accessibilityLabel = m.accessibilityLabel; + if (o.oneofs) + d._accessibilityLabel = "accessibilityLabel"; } return d; }; @@ -34951,10 +40947,36 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - BCallMessage.prototype.sessionId = ""; - BCallMessage.prototype.mediaType = 0; - BCallMessage.prototype.masterKey = $util.newBuffer([]); - BCallMessage.prototype.caption = ""; + BCallMessage.prototype.sessionId = null; + BCallMessage.prototype.mediaType = null; + BCallMessage.prototype.masterKey = null; + BCallMessage.prototype.caption = null; + + let $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) + }); BCallMessage.create = function create(properties) { return new BCallMessage(properties); @@ -35050,29 +41072,25 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.sessionId = ""; - d.mediaType = o.enums === String ? "UNKNOWN" : 0; - if (o.bytes === String) - d.masterKey = ""; - else { - d.masterKey = []; - if (o.bytes !== Array) - d.masterKey = $util.newBuffer(d.masterKey); - } - d.caption = ""; - } if (m.sessionId != null && m.hasOwnProperty("sessionId")) { d.sessionId = m.sessionId; + if (o.oneofs) + d._sessionId = "sessionId"; } if (m.mediaType != null && m.hasOwnProperty("mediaType")) { d.mediaType = o.enums === String ? $root.proto.Message.BCallMessage.MediaType[m.mediaType] === undefined ? m.mediaType : $root.proto.Message.BCallMessage.MediaType[m.mediaType] : m.mediaType; + if (o.oneofs) + d._mediaType = "mediaType"; } if (m.masterKey != null && m.hasOwnProperty("masterKey")) { d.masterKey = o.bytes === String ? $util.base64.encode(m.masterKey, 0, m.masterKey.length) : o.bytes === Array ? Array.prototype.slice.call(m.masterKey) : m.masterKey; + if (o.oneofs) + d._masterKey = "masterKey"; } if (m.caption != null && m.hasOwnProperty("caption")) { d.caption = m.caption; + if (o.oneofs) + d._caption = "caption"; } return d; }; @@ -35109,11 +41127,11 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - ButtonsMessage.prototype.contentText = ""; - ButtonsMessage.prototype.footerText = ""; + ButtonsMessage.prototype.contentText = null; + ButtonsMessage.prototype.footerText = null; ButtonsMessage.prototype.contextInfo = null; ButtonsMessage.prototype.buttons = $util.emptyArray; - ButtonsMessage.prototype.headerType = 0; + ButtonsMessage.prototype.headerType = null; ButtonsMessage.prototype.text = null; ButtonsMessage.prototype.documentMessage = null; ButtonsMessage.prototype.imageMessage = null; @@ -35122,6 +41140,30 @@ export const proto = $root.proto = (() => { let $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) + }); + Object.defineProperty(ButtonsMessage.prototype, "header", { get: $util.oneOfGetter($oneOfFields = ["text", "documentMessage", "imageMessage", "videoMessage", "locationMessage"]), set: $util.oneOfSetter($oneOfFields) @@ -35312,12 +41354,6 @@ export const proto = $root.proto = (() => { if (o.arrays || o.defaults) { d.buttons = []; } - if (o.defaults) { - d.contentText = ""; - d.footerText = ""; - d.contextInfo = null; - d.headerType = o.enums === String ? "UNKNOWN" : 0; - } if (m.text != null && m.hasOwnProperty("text")) { d.text = m.text; if (o.oneofs) @@ -35345,12 +41381,18 @@ export const proto = $root.proto = (() => { } if (m.contentText != null && m.hasOwnProperty("contentText")) { d.contentText = m.contentText; + if (o.oneofs) + d._contentText = "contentText"; } if (m.footerText != null && m.hasOwnProperty("footerText")) { d.footerText = m.footerText; + if (o.oneofs) + d._footerText = "footerText"; } if (m.contextInfo != null && m.hasOwnProperty("contextInfo")) { d.contextInfo = $root.proto.ContextInfo.toObject(m.contextInfo, o); + if (o.oneofs) + d._contextInfo = "contextInfo"; } if (m.buttons && m.buttons.length) { d.buttons = []; @@ -35360,6 +41402,8 @@ export const proto = $root.proto = (() => { } if (m.headerType != null && m.hasOwnProperty("headerType")) { d.headerType = o.enums === String ? $root.proto.Message.ButtonsMessage.HeaderType[m.headerType] === undefined ? m.headerType : $root.proto.Message.ButtonsMessage.HeaderType[m.headerType] : m.headerType; + if (o.oneofs) + d._headerType = "headerType"; } return d; }; @@ -35384,11 +41428,37 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - Button.prototype.buttonId = ""; + Button.prototype.buttonId = null; Button.prototype.buttonText = null; - Button.prototype.type = 0; + Button.prototype.type = null; Button.prototype.nativeFlowInfo = null; + let $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) + }); + Button.create = function create(properties) { return new Button(properties); }; @@ -35484,23 +41554,25 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.buttonId = ""; - d.buttonText = null; - d.type = o.enums === String ? "UNKNOWN" : 0; - d.nativeFlowInfo = null; - } if (m.buttonId != null && m.hasOwnProperty("buttonId")) { d.buttonId = m.buttonId; + if (o.oneofs) + d._buttonId = "buttonId"; } if (m.buttonText != null && m.hasOwnProperty("buttonText")) { d.buttonText = $root.proto.Message.ButtonsMessage.Button.ButtonText.toObject(m.buttonText, o); + if (o.oneofs) + d._buttonText = "buttonText"; } if (m.type != null && m.hasOwnProperty("type")) { d.type = o.enums === String ? $root.proto.Message.ButtonsMessage.Button.Type[m.type] === undefined ? m.type : $root.proto.Message.ButtonsMessage.Button.Type[m.type] : m.type; + if (o.oneofs) + d._type = "type"; } if (m.nativeFlowInfo != null && m.hasOwnProperty("nativeFlowInfo")) { d.nativeFlowInfo = $root.proto.Message.ButtonsMessage.Button.NativeFlowInfo.toObject(m.nativeFlowInfo, o); + if (o.oneofs) + d._nativeFlowInfo = "nativeFlowInfo"; } return d; }; @@ -35525,7 +41597,15 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - ButtonText.prototype.displayText = ""; + ButtonText.prototype.displayText = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ButtonText.prototype, "_displayText", { + get: $util.oneOfGetter($oneOfFields = ["displayText"]), + set: $util.oneOfSetter($oneOfFields) + }); ButtonText.create = function create(properties) { return new ButtonText(properties); @@ -35574,11 +41654,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.displayText = ""; - } if (m.displayText != null && m.hasOwnProperty("displayText")) { d.displayText = m.displayText; + if (o.oneofs) + d._displayText = "displayText"; } return d; }; @@ -35606,8 +41685,22 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - NativeFlowInfo.prototype.name = ""; - NativeFlowInfo.prototype.paramsJson = ""; + NativeFlowInfo.prototype.name = null; + NativeFlowInfo.prototype.paramsJson = null; + + let $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) + }); NativeFlowInfo.create = function create(properties) { return new NativeFlowInfo(properties); @@ -35665,15 +41758,15 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.name = ""; - d.paramsJson = ""; - } if (m.name != null && m.hasOwnProperty("name")) { d.name = m.name; + if (o.oneofs) + d._name = "name"; } if (m.paramsJson != null && m.hasOwnProperty("paramsJson")) { d.paramsJson = m.paramsJson; + if (o.oneofs) + d._paramsJson = "paramsJson"; } return d; }; @@ -35727,13 +41820,31 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - ButtonsResponseMessage.prototype.selectedButtonId = ""; + ButtonsResponseMessage.prototype.selectedButtonId = null; ButtonsResponseMessage.prototype.contextInfo = null; - ButtonsResponseMessage.prototype.type = 0; + ButtonsResponseMessage.prototype.type = null; ButtonsResponseMessage.prototype.selectedDisplayText = null; let $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) + }); + Object.defineProperty(ButtonsResponseMessage.prototype, "response", { get: $util.oneOfGetter($oneOfFields = ["selectedDisplayText"]), set: $util.oneOfSetter($oneOfFields) @@ -35828,13 +41939,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.selectedButtonId = ""; - d.contextInfo = null; - d.type = o.enums === String ? "UNKNOWN" : 0; - } if (m.selectedButtonId != null && m.hasOwnProperty("selectedButtonId")) { d.selectedButtonId = m.selectedButtonId; + if (o.oneofs) + d._selectedButtonId = "selectedButtonId"; } if (m.selectedDisplayText != null && m.hasOwnProperty("selectedDisplayText")) { d.selectedDisplayText = m.selectedDisplayText; @@ -35843,9 +41951,13 @@ export const proto = $root.proto = (() => { } if (m.contextInfo != null && m.hasOwnProperty("contextInfo")) { d.contextInfo = $root.proto.ContextInfo.toObject(m.contextInfo, o); + if (o.oneofs) + d._contextInfo = "contextInfo"; } if (m.type != null && m.hasOwnProperty("type")) { d.type = o.enums === String ? $root.proto.Message.ButtonsResponseMessage.Type[m.type] === undefined ? m.type : $root.proto.Message.ButtonsResponseMessage.Type[m.type] : m.type; + if (o.oneofs) + d._type = "type"; } return d; }; @@ -35880,17 +41992,79 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - Call.prototype.callKey = $util.newBuffer([]); - Call.prototype.conversionSource = ""; - Call.prototype.conversionData = $util.newBuffer([]); - Call.prototype.conversionDelaySeconds = 0; - Call.prototype.ctwaSignals = ""; - Call.prototype.ctwaPayload = $util.newBuffer([]); + Call.prototype.callKey = null; + Call.prototype.conversionSource = null; + Call.prototype.conversionData = null; + Call.prototype.conversionDelaySeconds = null; + Call.prototype.ctwaSignals = null; + Call.prototype.ctwaPayload = null; Call.prototype.contextInfo = null; - Call.prototype.nativeFlowCallButtonPayload = ""; - Call.prototype.deeplinkPayload = ""; + Call.prototype.nativeFlowCallButtonPayload = null; + Call.prototype.deeplinkPayload = null; Call.prototype.messageContextInfo = null; + let $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) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Call.prototype, "_contextInfo", { + get: $util.oneOfGetter($oneOfFields = ["contextInfo"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Call.prototype, "_nativeFlowCallButtonPayload", { + get: $util.oneOfGetter($oneOfFields = ["nativeFlowCallButtonPayload"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Call.prototype, "_deeplinkPayload", { + get: $util.oneOfGetter($oneOfFields = ["deeplinkPayload"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Call.prototype, "_messageContextInfo", { + get: $util.oneOfGetter($oneOfFields = ["messageContextInfo"]), + set: $util.oneOfSetter($oneOfFields) + }); + Call.create = function create(properties) { return new Call(properties); }; @@ -36032,65 +42206,55 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - if (o.bytes === String) - d.callKey = ""; - else { - d.callKey = []; - if (o.bytes !== Array) - d.callKey = $util.newBuffer(d.callKey); - } - d.conversionSource = ""; - if (o.bytes === String) - d.conversionData = ""; - else { - d.conversionData = []; - if (o.bytes !== Array) - d.conversionData = $util.newBuffer(d.conversionData); - } - d.conversionDelaySeconds = 0; - d.ctwaSignals = ""; - if (o.bytes === String) - d.ctwaPayload = ""; - else { - d.ctwaPayload = []; - if (o.bytes !== Array) - d.ctwaPayload = $util.newBuffer(d.ctwaPayload); - } - d.contextInfo = null; - d.nativeFlowCallButtonPayload = ""; - d.deeplinkPayload = ""; - d.messageContextInfo = null; - } if (m.callKey != null && m.hasOwnProperty("callKey")) { d.callKey = o.bytes === String ? $util.base64.encode(m.callKey, 0, m.callKey.length) : o.bytes === Array ? Array.prototype.slice.call(m.callKey) : m.callKey; + if (o.oneofs) + d._callKey = "callKey"; } if (m.conversionSource != null && m.hasOwnProperty("conversionSource")) { d.conversionSource = m.conversionSource; + if (o.oneofs) + d._conversionSource = "conversionSource"; } if (m.conversionData != null && m.hasOwnProperty("conversionData")) { d.conversionData = o.bytes === String ? $util.base64.encode(m.conversionData, 0, m.conversionData.length) : o.bytes === Array ? Array.prototype.slice.call(m.conversionData) : m.conversionData; + if (o.oneofs) + d._conversionData = "conversionData"; } if (m.conversionDelaySeconds != null && m.hasOwnProperty("conversionDelaySeconds")) { d.conversionDelaySeconds = m.conversionDelaySeconds; + if (o.oneofs) + d._conversionDelaySeconds = "conversionDelaySeconds"; } if (m.ctwaSignals != null && m.hasOwnProperty("ctwaSignals")) { d.ctwaSignals = m.ctwaSignals; + if (o.oneofs) + d._ctwaSignals = "ctwaSignals"; } if (m.ctwaPayload != null && m.hasOwnProperty("ctwaPayload")) { d.ctwaPayload = o.bytes === String ? $util.base64.encode(m.ctwaPayload, 0, m.ctwaPayload.length) : o.bytes === Array ? Array.prototype.slice.call(m.ctwaPayload) : m.ctwaPayload; + if (o.oneofs) + d._ctwaPayload = "ctwaPayload"; } if (m.contextInfo != null && m.hasOwnProperty("contextInfo")) { d.contextInfo = $root.proto.ContextInfo.toObject(m.contextInfo, o); + if (o.oneofs) + d._contextInfo = "contextInfo"; } if (m.nativeFlowCallButtonPayload != null && m.hasOwnProperty("nativeFlowCallButtonPayload")) { d.nativeFlowCallButtonPayload = m.nativeFlowCallButtonPayload; + if (o.oneofs) + d._nativeFlowCallButtonPayload = "nativeFlowCallButtonPayload"; } if (m.deeplinkPayload != null && m.hasOwnProperty("deeplinkPayload")) { d.deeplinkPayload = m.deeplinkPayload; + if (o.oneofs) + d._deeplinkPayload = "deeplinkPayload"; } if (m.messageContextInfo != null && m.hasOwnProperty("messageContextInfo")) { d.messageContextInfo = $root.proto.MessageContextInfo.toObject(m.messageContextInfo, o); + if (o.oneofs) + d._messageContextInfo = "messageContextInfo"; } return d; }; @@ -36119,12 +42283,38 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - CallLogMessage.prototype.isVideo = false; - CallLogMessage.prototype.callOutcome = 0; - CallLogMessage.prototype.durationSecs = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - CallLogMessage.prototype.callType = 0; + CallLogMessage.prototype.isVideo = null; + CallLogMessage.prototype.callOutcome = null; + CallLogMessage.prototype.durationSecs = null; + CallLogMessage.prototype.callType = null; CallLogMessage.prototype.participants = $util.emptyArray; + let $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) + }); + CallLogMessage.create = function create(properties) { return new CallLogMessage(properties); }; @@ -36283,30 +42473,28 @@ export const proto = $root.proto = (() => { if (o.arrays || o.defaults) { d.participants = []; } - if (o.defaults) { - d.isVideo = false; - d.callOutcome = o.enums === String ? "CONNECTED" : 0; - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.durationSecs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.durationSecs = o.longs === String ? "0" : 0; - d.callType = o.enums === String ? "REGULAR" : 0; - } if (m.isVideo != null && m.hasOwnProperty("isVideo")) { d.isVideo = m.isVideo; + if (o.oneofs) + d._isVideo = "isVideo"; } if (m.callOutcome != null && m.hasOwnProperty("callOutcome")) { d.callOutcome = o.enums === String ? $root.proto.Message.CallLogMessage.CallOutcome[m.callOutcome] === undefined ? m.callOutcome : $root.proto.Message.CallLogMessage.CallOutcome[m.callOutcome] : m.callOutcome; + if (o.oneofs) + d._callOutcome = "callOutcome"; } if (m.durationSecs != null && m.hasOwnProperty("durationSecs")) { if (typeof m.durationSecs === "number") d.durationSecs = o.longs === String ? String(m.durationSecs) : m.durationSecs; else d.durationSecs = o.longs === String ? longToString(m.durationSecs) : o.longs === Number ? longToNumber(m.durationSecs) : m.durationSecs; + if (o.oneofs) + d._durationSecs = "durationSecs"; } if (m.callType != null && m.hasOwnProperty("callType")) { d.callType = o.enums === String ? $root.proto.Message.CallLogMessage.CallType[m.callType] === undefined ? m.callType : $root.proto.Message.CallLogMessage.CallType[m.callType] : m.callType; + if (o.oneofs) + d._callType = "callType"; } if (m.participants && m.participants.length) { d.participants = []; @@ -36350,8 +42538,22 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - CallParticipant.prototype.jid = ""; - CallParticipant.prototype.callOutcome = 0; + CallParticipant.prototype.jid = null; + CallParticipant.prototype.callOutcome = null; + + let $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) + }); CallParticipant.create = function create(properties) { return new CallParticipant(properties); @@ -36446,15 +42648,15 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.jid = ""; - d.callOutcome = o.enums === String ? "CONNECTED" : 0; - } if (m.jid != null && m.hasOwnProperty("jid")) { d.jid = m.jid; + if (o.oneofs) + d._jid = "jid"; } if (m.callOutcome != null && m.hasOwnProperty("callOutcome")) { d.callOutcome = o.enums === String ? $root.proto.Message.CallLogMessage.CallOutcome[m.callOutcome] === undefined ? m.callOutcome : $root.proto.Message.CallLogMessage.CallOutcome[m.callOutcome] : m.callOutcome; + if (o.oneofs) + d._callOutcome = "callOutcome"; } return d; }; @@ -36495,6 +42697,14 @@ export const proto = $root.proto = (() => { CancelPaymentRequestMessage.prototype.key = null; + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CancelPaymentRequestMessage.prototype, "_key", { + get: $util.oneOfGetter($oneOfFields = ["key"]), + set: $util.oneOfSetter($oneOfFields) + }); + CancelPaymentRequestMessage.create = function create(properties) { return new CancelPaymentRequestMessage(properties); }; @@ -36544,11 +42754,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.key = null; - } if (m.key != null && m.hasOwnProperty("key")) { d.key = $root.proto.MessageKey.toObject(m.key, o); + if (o.oneofs) + d._key = "key"; } return d; }; @@ -36576,8 +42785,22 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - Chat.prototype.displayName = ""; - Chat.prototype.id = ""; + Chat.prototype.displayName = null; + Chat.prototype.id = null; + + let $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) + }); Chat.create = function create(properties) { return new Chat(properties); @@ -36635,15 +42858,15 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.displayName = ""; - d.id = ""; - } if (m.displayName != null && m.hasOwnProperty("displayName")) { d.displayName = m.displayName; + if (o.oneofs) + d._displayName = "displayName"; } if (m.id != null && m.hasOwnProperty("id")) { d.id = m.id; + if (o.oneofs) + d._id = "id"; } return d; }; @@ -36671,12 +42894,50 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - CloudAPIThreadControlNotification.prototype.status = 0; - CloudAPIThreadControlNotification.prototype.senderNotificationTimestampMs = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - CloudAPIThreadControlNotification.prototype.consumerLid = ""; - CloudAPIThreadControlNotification.prototype.consumerPhoneNumber = ""; + CloudAPIThreadControlNotification.prototype.status = null; + CloudAPIThreadControlNotification.prototype.senderNotificationTimestampMs = null; + CloudAPIThreadControlNotification.prototype.consumerLid = null; + CloudAPIThreadControlNotification.prototype.consumerPhoneNumber = null; CloudAPIThreadControlNotification.prototype.notificationContent = null; - CloudAPIThreadControlNotification.prototype.shouldSuppressNotification = false; + CloudAPIThreadControlNotification.prototype.shouldSuppressNotification = null; + + let $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) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CloudAPIThreadControlNotification.prototype, "_notificationContent", { + get: $util.oneOfGetter($oneOfFields = ["notificationContent"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CloudAPIThreadControlNotification.prototype, "_shouldSuppressNotification", { + get: $util.oneOfGetter($oneOfFields = ["shouldSuppressNotification"]), + set: $util.oneOfSetter($oneOfFields) + }); CloudAPIThreadControlNotification.create = function create(properties) { return new CloudAPIThreadControlNotification(properties); @@ -36796,38 +43057,38 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.status = o.enums === String ? "UNKNOWN" : 0; - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.senderNotificationTimestampMs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.senderNotificationTimestampMs = o.longs === String ? "0" : 0; - d.consumerLid = ""; - d.consumerPhoneNumber = ""; - d.notificationContent = null; - d.shouldSuppressNotification = false; - } if (m.status != null && m.hasOwnProperty("status")) { d.status = o.enums === String ? $root.proto.Message.CloudAPIThreadControlNotification.CloudAPIThreadControl[m.status] === undefined ? m.status : $root.proto.Message.CloudAPIThreadControlNotification.CloudAPIThreadControl[m.status] : m.status; + if (o.oneofs) + d._status = "status"; } if (m.senderNotificationTimestampMs != null && m.hasOwnProperty("senderNotificationTimestampMs")) { if (typeof m.senderNotificationTimestampMs === "number") d.senderNotificationTimestampMs = o.longs === String ? String(m.senderNotificationTimestampMs) : m.senderNotificationTimestampMs; else d.senderNotificationTimestampMs = o.longs === String ? longToString(m.senderNotificationTimestampMs) : o.longs === Number ? longToNumber(m.senderNotificationTimestampMs) : m.senderNotificationTimestampMs; + if (o.oneofs) + d._senderNotificationTimestampMs = "senderNotificationTimestampMs"; } if (m.consumerLid != null && m.hasOwnProperty("consumerLid")) { d.consumerLid = m.consumerLid; + if (o.oneofs) + d._consumerLid = "consumerLid"; } if (m.consumerPhoneNumber != null && m.hasOwnProperty("consumerPhoneNumber")) { d.consumerPhoneNumber = m.consumerPhoneNumber; + if (o.oneofs) + d._consumerPhoneNumber = "consumerPhoneNumber"; } if (m.notificationContent != null && m.hasOwnProperty("notificationContent")) { d.notificationContent = $root.proto.Message.CloudAPIThreadControlNotification.CloudAPIThreadControlNotificationContent.toObject(m.notificationContent, o); + if (o.oneofs) + d._notificationContent = "notificationContent"; } if (m.shouldSuppressNotification != null && m.hasOwnProperty("shouldSuppressNotification")) { d.shouldSuppressNotification = m.shouldSuppressNotification; + if (o.oneofs) + d._shouldSuppressNotification = "shouldSuppressNotification"; } return d; }; @@ -36860,8 +43121,22 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - CloudAPIThreadControlNotificationContent.prototype.handoffNotificationText = ""; - CloudAPIThreadControlNotificationContent.prototype.extraJson = ""; + CloudAPIThreadControlNotificationContent.prototype.handoffNotificationText = null; + CloudAPIThreadControlNotificationContent.prototype.extraJson = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CloudAPIThreadControlNotificationContent.prototype, "_handoffNotificationText", { + get: $util.oneOfGetter($oneOfFields = ["handoffNotificationText"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CloudAPIThreadControlNotificationContent.prototype, "_extraJson", { + get: $util.oneOfGetter($oneOfFields = ["extraJson"]), + set: $util.oneOfSetter($oneOfFields) + }); CloudAPIThreadControlNotificationContent.create = function create(properties) { return new CloudAPIThreadControlNotificationContent(properties); @@ -36919,15 +43194,15 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.handoffNotificationText = ""; - d.extraJson = ""; - } if (m.handoffNotificationText != null && m.hasOwnProperty("handoffNotificationText")) { d.handoffNotificationText = m.handoffNotificationText; + if (o.oneofs) + d._handoffNotificationText = "handoffNotificationText"; } if (m.extraJson != null && m.hasOwnProperty("extraJson")) { d.extraJson = m.extraJson; + if (o.oneofs) + d._extraJson = "extraJson"; } return d; }; @@ -36961,6 +43236,20 @@ export const proto = $root.proto = (() => { CommentMessage.prototype.message = null; CommentMessage.prototype.targetMessageKey = null; + let $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) + }); + CommentMessage.create = function create(properties) { return new CommentMessage(properties); }; @@ -37021,15 +43310,15 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.message = null; - d.targetMessageKey = null; - } if (m.message != null && m.hasOwnProperty("message")) { d.message = $root.proto.Message.toObject(m.message, o); + if (o.oneofs) + d._message = "message"; } if (m.targetMessageKey != null && m.hasOwnProperty("targetMessageKey")) { d.targetMessageKey = $root.proto.MessageKey.toObject(m.targetMessageKey, o); + if (o.oneofs) + d._targetMessageKey = "targetMessageKey"; } return d; }; @@ -37057,10 +43346,36 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - ContactMessage.prototype.displayName = ""; - ContactMessage.prototype.vcard = ""; + ContactMessage.prototype.displayName = null; + ContactMessage.prototype.vcard = null; ContactMessage.prototype.contextInfo = null; - ContactMessage.prototype.isSelfContact = false; + ContactMessage.prototype.isSelfContact = null; + + let $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) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ContactMessage.prototype, "_isSelfContact", { + get: $util.oneOfGetter($oneOfFields = ["isSelfContact"]), + set: $util.oneOfSetter($oneOfFields) + }); ContactMessage.create = function create(properties) { return new ContactMessage(properties); @@ -37138,23 +43453,25 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.displayName = ""; - d.vcard = ""; - d.contextInfo = null; - d.isSelfContact = false; - } if (m.displayName != null && m.hasOwnProperty("displayName")) { d.displayName = m.displayName; + if (o.oneofs) + d._displayName = "displayName"; } if (m.vcard != null && m.hasOwnProperty("vcard")) { d.vcard = m.vcard; + if (o.oneofs) + d._vcard = "vcard"; } if (m.contextInfo != null && m.hasOwnProperty("contextInfo")) { d.contextInfo = $root.proto.ContextInfo.toObject(m.contextInfo, o); + if (o.oneofs) + d._contextInfo = "contextInfo"; } if (m.isSelfContact != null && m.hasOwnProperty("isSelfContact")) { d.isSelfContact = m.isSelfContact; + if (o.oneofs) + d._isSelfContact = "isSelfContact"; } return d; }; @@ -37183,10 +43500,24 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - ContactsArrayMessage.prototype.displayName = ""; + ContactsArrayMessage.prototype.displayName = null; ContactsArrayMessage.prototype.contacts = $util.emptyArray; ContactsArrayMessage.prototype.contextInfo = null; + let $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) + }); + ContactsArrayMessage.create = function create(properties) { return new ContactsArrayMessage(properties); }; @@ -37268,12 +43599,10 @@ export const proto = $root.proto = (() => { if (o.arrays || o.defaults) { d.contacts = []; } - if (o.defaults) { - d.displayName = ""; - d.contextInfo = null; - } if (m.displayName != null && m.hasOwnProperty("displayName")) { d.displayName = m.displayName; + if (o.oneofs) + d._displayName = "displayName"; } if (m.contacts && m.contacts.length) { d.contacts = []; @@ -37283,6 +43612,8 @@ export const proto = $root.proto = (() => { } if (m.contextInfo != null && m.hasOwnProperty("contextInfo")) { d.contextInfo = $root.proto.ContextInfo.toObject(m.contextInfo, o); + if (o.oneofs) + d._contextInfo = "contextInfo"; } return d; }; @@ -37312,6 +43643,14 @@ export const proto = $root.proto = (() => { DeclinePaymentRequestMessage.prototype.key = null; + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DeclinePaymentRequestMessage.prototype, "_key", { + get: $util.oneOfGetter($oneOfFields = ["key"]), + set: $util.oneOfSetter($oneOfFields) + }); + DeclinePaymentRequestMessage.create = function create(properties) { return new DeclinePaymentRequestMessage(properties); }; @@ -37361,11 +43700,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.key = null; - } if (m.key != null && m.hasOwnProperty("key")) { d.key = $root.proto.MessageKey.toObject(m.key, o); + if (o.oneofs) + d._key = "key"; } return d; }; @@ -37393,9 +43731,29 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - DeviceSentMessage.prototype.destinationJid = ""; + DeviceSentMessage.prototype.destinationJid = null; DeviceSentMessage.prototype.message = null; - DeviceSentMessage.prototype.phash = ""; + DeviceSentMessage.prototype.phash = null; + + let $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) + }); DeviceSentMessage.create = function create(properties) { return new DeviceSentMessage(properties); @@ -37464,19 +43822,20 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.destinationJid = ""; - d.message = null; - d.phash = ""; - } if (m.destinationJid != null && m.hasOwnProperty("destinationJid")) { d.destinationJid = m.destinationJid; + if (o.oneofs) + d._destinationJid = "destinationJid"; } if (m.message != null && m.hasOwnProperty("message")) { d.message = $root.proto.Message.toObject(m.message, o); + if (o.oneofs) + d._message = "message"; } if (m.phash != null && m.hasOwnProperty("phash")) { d.phash = m.phash; + if (o.oneofs) + d._phash = "phash"; } return d; }; @@ -37504,27 +43863,155 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - DocumentMessage.prototype.url = ""; - DocumentMessage.prototype.mimetype = ""; - DocumentMessage.prototype.title = ""; - DocumentMessage.prototype.fileSha256 = $util.newBuffer([]); - DocumentMessage.prototype.fileLength = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - DocumentMessage.prototype.pageCount = 0; - DocumentMessage.prototype.mediaKey = $util.newBuffer([]); - DocumentMessage.prototype.fileName = ""; - DocumentMessage.prototype.fileEncSha256 = $util.newBuffer([]); - DocumentMessage.prototype.directPath = ""; - DocumentMessage.prototype.mediaKeyTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - DocumentMessage.prototype.contactVcard = false; - DocumentMessage.prototype.thumbnailDirectPath = ""; - DocumentMessage.prototype.thumbnailSha256 = $util.newBuffer([]); - DocumentMessage.prototype.thumbnailEncSha256 = $util.newBuffer([]); - DocumentMessage.prototype.jpegThumbnail = $util.newBuffer([]); + DocumentMessage.prototype.url = null; + DocumentMessage.prototype.mimetype = null; + DocumentMessage.prototype.title = null; + DocumentMessage.prototype.fileSha256 = null; + DocumentMessage.prototype.fileLength = null; + DocumentMessage.prototype.pageCount = null; + DocumentMessage.prototype.mediaKey = null; + DocumentMessage.prototype.fileName = null; + DocumentMessage.prototype.fileEncSha256 = null; + DocumentMessage.prototype.directPath = null; + DocumentMessage.prototype.mediaKeyTimestamp = null; + DocumentMessage.prototype.contactVcard = null; + DocumentMessage.prototype.thumbnailDirectPath = null; + DocumentMessage.prototype.thumbnailSha256 = null; + DocumentMessage.prototype.thumbnailEncSha256 = null; + DocumentMessage.prototype.jpegThumbnail = null; DocumentMessage.prototype.contextInfo = null; - DocumentMessage.prototype.thumbnailHeight = 0; - DocumentMessage.prototype.thumbnailWidth = 0; - DocumentMessage.prototype.caption = ""; - DocumentMessage.prototype.accessibilityLabel = ""; + DocumentMessage.prototype.thumbnailHeight = null; + DocumentMessage.prototype.thumbnailWidth = null; + DocumentMessage.prototype.caption = null; + DocumentMessage.prototype.accessibilityLabel = null; + + let $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) + }); DocumentMessage.create = function create(properties) { return new DocumentMessage(properties); @@ -37787,141 +44274,116 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.url = ""; - d.mimetype = ""; - d.title = ""; - if (o.bytes === String) - d.fileSha256 = ""; - else { - d.fileSha256 = []; - if (o.bytes !== Array) - d.fileSha256 = $util.newBuffer(d.fileSha256); - } - if ($util.Long) { - var n = new $util.Long(0, 0, true); - d.fileLength = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.fileLength = o.longs === String ? "0" : 0; - d.pageCount = 0; - if (o.bytes === String) - d.mediaKey = ""; - else { - d.mediaKey = []; - if (o.bytes !== Array) - d.mediaKey = $util.newBuffer(d.mediaKey); - } - d.fileName = ""; - if (o.bytes === String) - d.fileEncSha256 = ""; - else { - d.fileEncSha256 = []; - if (o.bytes !== Array) - d.fileEncSha256 = $util.newBuffer(d.fileEncSha256); - } - d.directPath = ""; - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.mediaKeyTimestamp = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.mediaKeyTimestamp = o.longs === String ? "0" : 0; - d.contactVcard = false; - d.thumbnailDirectPath = ""; - if (o.bytes === String) - d.thumbnailSha256 = ""; - else { - d.thumbnailSha256 = []; - if (o.bytes !== Array) - d.thumbnailSha256 = $util.newBuffer(d.thumbnailSha256); - } - if (o.bytes === String) - d.thumbnailEncSha256 = ""; - else { - d.thumbnailEncSha256 = []; - if (o.bytes !== Array) - d.thumbnailEncSha256 = $util.newBuffer(d.thumbnailEncSha256); - } - if (o.bytes === String) - d.jpegThumbnail = ""; - else { - d.jpegThumbnail = []; - if (o.bytes !== Array) - d.jpegThumbnail = $util.newBuffer(d.jpegThumbnail); - } - d.contextInfo = null; - d.thumbnailHeight = 0; - d.thumbnailWidth = 0; - d.caption = ""; - d.accessibilityLabel = ""; - } if (m.url != null && m.hasOwnProperty("url")) { d.url = m.url; + if (o.oneofs) + d._url = "url"; } if (m.mimetype != null && m.hasOwnProperty("mimetype")) { d.mimetype = m.mimetype; + if (o.oneofs) + d._mimetype = "mimetype"; } if (m.title != null && m.hasOwnProperty("title")) { d.title = m.title; + if (o.oneofs) + d._title = "title"; } if (m.fileSha256 != null && m.hasOwnProperty("fileSha256")) { d.fileSha256 = o.bytes === String ? $util.base64.encode(m.fileSha256, 0, m.fileSha256.length) : o.bytes === Array ? Array.prototype.slice.call(m.fileSha256) : m.fileSha256; + if (o.oneofs) + d._fileSha256 = "fileSha256"; } if (m.fileLength != null && m.hasOwnProperty("fileLength")) { if (typeof m.fileLength === "number") d.fileLength = o.longs === String ? String(m.fileLength) : m.fileLength; else d.fileLength = o.longs === String ? longToString(m.fileLength, true) : o.longs === Number ? longToNumber(m.fileLength, true) : m.fileLength; + if (o.oneofs) + d._fileLength = "fileLength"; } if (m.pageCount != null && m.hasOwnProperty("pageCount")) { d.pageCount = m.pageCount; + if (o.oneofs) + d._pageCount = "pageCount"; } if (m.mediaKey != null && m.hasOwnProperty("mediaKey")) { d.mediaKey = o.bytes === String ? $util.base64.encode(m.mediaKey, 0, m.mediaKey.length) : o.bytes === Array ? Array.prototype.slice.call(m.mediaKey) : m.mediaKey; + if (o.oneofs) + d._mediaKey = "mediaKey"; } if (m.fileName != null && m.hasOwnProperty("fileName")) { d.fileName = m.fileName; + if (o.oneofs) + d._fileName = "fileName"; } if (m.fileEncSha256 != null && m.hasOwnProperty("fileEncSha256")) { d.fileEncSha256 = o.bytes === String ? $util.base64.encode(m.fileEncSha256, 0, m.fileEncSha256.length) : o.bytes === Array ? Array.prototype.slice.call(m.fileEncSha256) : m.fileEncSha256; + if (o.oneofs) + d._fileEncSha256 = "fileEncSha256"; } if (m.directPath != null && m.hasOwnProperty("directPath")) { d.directPath = m.directPath; + if (o.oneofs) + d._directPath = "directPath"; } if (m.mediaKeyTimestamp != null && m.hasOwnProperty("mediaKeyTimestamp")) { if (typeof m.mediaKeyTimestamp === "number") d.mediaKeyTimestamp = o.longs === String ? String(m.mediaKeyTimestamp) : m.mediaKeyTimestamp; else d.mediaKeyTimestamp = o.longs === String ? longToString(m.mediaKeyTimestamp) : o.longs === Number ? longToNumber(m.mediaKeyTimestamp) : m.mediaKeyTimestamp; + if (o.oneofs) + d._mediaKeyTimestamp = "mediaKeyTimestamp"; } if (m.contactVcard != null && m.hasOwnProperty("contactVcard")) { d.contactVcard = m.contactVcard; + if (o.oneofs) + d._contactVcard = "contactVcard"; } if (m.thumbnailDirectPath != null && m.hasOwnProperty("thumbnailDirectPath")) { d.thumbnailDirectPath = m.thumbnailDirectPath; + if (o.oneofs) + d._thumbnailDirectPath = "thumbnailDirectPath"; } if (m.thumbnailSha256 != null && m.hasOwnProperty("thumbnailSha256")) { d.thumbnailSha256 = o.bytes === String ? $util.base64.encode(m.thumbnailSha256, 0, m.thumbnailSha256.length) : o.bytes === Array ? Array.prototype.slice.call(m.thumbnailSha256) : m.thumbnailSha256; + if (o.oneofs) + d._thumbnailSha256 = "thumbnailSha256"; } if (m.thumbnailEncSha256 != null && m.hasOwnProperty("thumbnailEncSha256")) { d.thumbnailEncSha256 = o.bytes === String ? $util.base64.encode(m.thumbnailEncSha256, 0, m.thumbnailEncSha256.length) : o.bytes === Array ? Array.prototype.slice.call(m.thumbnailEncSha256) : m.thumbnailEncSha256; + if (o.oneofs) + d._thumbnailEncSha256 = "thumbnailEncSha256"; } if (m.jpegThumbnail != null && m.hasOwnProperty("jpegThumbnail")) { d.jpegThumbnail = o.bytes === String ? $util.base64.encode(m.jpegThumbnail, 0, m.jpegThumbnail.length) : o.bytes === Array ? Array.prototype.slice.call(m.jpegThumbnail) : m.jpegThumbnail; + if (o.oneofs) + d._jpegThumbnail = "jpegThumbnail"; } if (m.contextInfo != null && m.hasOwnProperty("contextInfo")) { d.contextInfo = $root.proto.ContextInfo.toObject(m.contextInfo, o); + if (o.oneofs) + d._contextInfo = "contextInfo"; } if (m.thumbnailHeight != null && m.hasOwnProperty("thumbnailHeight")) { d.thumbnailHeight = m.thumbnailHeight; + if (o.oneofs) + d._thumbnailHeight = "thumbnailHeight"; } if (m.thumbnailWidth != null && m.hasOwnProperty("thumbnailWidth")) { d.thumbnailWidth = m.thumbnailWidth; + if (o.oneofs) + d._thumbnailWidth = "thumbnailWidth"; } if (m.caption != null && m.hasOwnProperty("caption")) { d.caption = m.caption; + if (o.oneofs) + d._caption = "caption"; } if (m.accessibilityLabel != null && m.hasOwnProperty("accessibilityLabel")) { d.accessibilityLabel = m.accessibilityLabel; + if (o.oneofs) + d._accessibilityLabel = "accessibilityLabel"; } return d; }; @@ -37950,8 +44412,28 @@ export const proto = $root.proto = (() => { } EncCommentMessage.prototype.targetMessageKey = null; - EncCommentMessage.prototype.encPayload = $util.newBuffer([]); - EncCommentMessage.prototype.encIv = $util.newBuffer([]); + EncCommentMessage.prototype.encPayload = null; + EncCommentMessage.prototype.encIv = null; + + let $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) + }); EncCommentMessage.create = function create(properties) { return new EncCommentMessage(properties); @@ -38026,31 +44508,20 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.targetMessageKey = null; - if (o.bytes === String) - d.encPayload = ""; - else { - d.encPayload = []; - if (o.bytes !== Array) - d.encPayload = $util.newBuffer(d.encPayload); - } - if (o.bytes === String) - d.encIv = ""; - else { - d.encIv = []; - if (o.bytes !== Array) - d.encIv = $util.newBuffer(d.encIv); - } - } if (m.targetMessageKey != null && m.hasOwnProperty("targetMessageKey")) { d.targetMessageKey = $root.proto.MessageKey.toObject(m.targetMessageKey, o); + if (o.oneofs) + d._targetMessageKey = "targetMessageKey"; } if (m.encPayload != null && m.hasOwnProperty("encPayload")) { d.encPayload = o.bytes === String ? $util.base64.encode(m.encPayload, 0, m.encPayload.length) : o.bytes === Array ? Array.prototype.slice.call(m.encPayload) : m.encPayload; + if (o.oneofs) + d._encPayload = "encPayload"; } if (m.encIv != null && m.hasOwnProperty("encIv")) { d.encIv = o.bytes === String ? $util.base64.encode(m.encIv, 0, m.encIv.length) : o.bytes === Array ? Array.prototype.slice.call(m.encIv) : m.encIv; + if (o.oneofs) + d._encIv = "encIv"; } return d; }; @@ -38079,8 +44550,28 @@ export const proto = $root.proto = (() => { } EncEventResponseMessage.prototype.eventCreationMessageKey = null; - EncEventResponseMessage.prototype.encPayload = $util.newBuffer([]); - EncEventResponseMessage.prototype.encIv = $util.newBuffer([]); + EncEventResponseMessage.prototype.encPayload = null; + EncEventResponseMessage.prototype.encIv = null; + + let $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) + }); EncEventResponseMessage.create = function create(properties) { return new EncEventResponseMessage(properties); @@ -38155,31 +44646,20 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.eventCreationMessageKey = null; - if (o.bytes === String) - d.encPayload = ""; - else { - d.encPayload = []; - if (o.bytes !== Array) - d.encPayload = $util.newBuffer(d.encPayload); - } - if (o.bytes === String) - d.encIv = ""; - else { - d.encIv = []; - if (o.bytes !== Array) - d.encIv = $util.newBuffer(d.encIv); - } - } if (m.eventCreationMessageKey != null && m.hasOwnProperty("eventCreationMessageKey")) { d.eventCreationMessageKey = $root.proto.MessageKey.toObject(m.eventCreationMessageKey, o); + if (o.oneofs) + d._eventCreationMessageKey = "eventCreationMessageKey"; } if (m.encPayload != null && m.hasOwnProperty("encPayload")) { d.encPayload = o.bytes === String ? $util.base64.encode(m.encPayload, 0, m.encPayload.length) : o.bytes === Array ? Array.prototype.slice.call(m.encPayload) : m.encPayload; + if (o.oneofs) + d._encPayload = "encPayload"; } if (m.encIv != null && m.hasOwnProperty("encIv")) { d.encIv = o.bytes === String ? $util.base64.encode(m.encIv, 0, m.encIv.length) : o.bytes === Array ? Array.prototype.slice.call(m.encIv) : m.encIv; + if (o.oneofs) + d._encIv = "encIv"; } return d; }; @@ -38208,8 +44688,28 @@ export const proto = $root.proto = (() => { } EncReactionMessage.prototype.targetMessageKey = null; - EncReactionMessage.prototype.encPayload = $util.newBuffer([]); - EncReactionMessage.prototype.encIv = $util.newBuffer([]); + EncReactionMessage.prototype.encPayload = null; + EncReactionMessage.prototype.encIv = null; + + let $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) + }); EncReactionMessage.create = function create(properties) { return new EncReactionMessage(properties); @@ -38284,31 +44784,20 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.targetMessageKey = null; - if (o.bytes === String) - d.encPayload = ""; - else { - d.encPayload = []; - if (o.bytes !== Array) - d.encPayload = $util.newBuffer(d.encPayload); - } - if (o.bytes === String) - d.encIv = ""; - else { - d.encIv = []; - if (o.bytes !== Array) - d.encIv = $util.newBuffer(d.encIv); - } - } if (m.targetMessageKey != null && m.hasOwnProperty("targetMessageKey")) { d.targetMessageKey = $root.proto.MessageKey.toObject(m.targetMessageKey, o); + if (o.oneofs) + d._targetMessageKey = "targetMessageKey"; } if (m.encPayload != null && m.hasOwnProperty("encPayload")) { d.encPayload = o.bytes === String ? $util.base64.encode(m.encPayload, 0, m.encPayload.length) : o.bytes === Array ? Array.prototype.slice.call(m.encPayload) : m.encPayload; + if (o.oneofs) + d._encPayload = "encPayload"; } if (m.encIv != null && m.hasOwnProperty("encIv")) { d.encIv = o.bytes === String ? $util.base64.encode(m.encIv, 0, m.encIv.length) : o.bytes === Array ? Array.prototype.slice.call(m.encIv) : m.encIv; + if (o.oneofs) + d._encIv = "encIv"; } return d; }; @@ -38337,17 +44826,91 @@ export const proto = $root.proto = (() => { } EventMessage.prototype.contextInfo = null; - EventMessage.prototype.isCanceled = false; - EventMessage.prototype.name = ""; - EventMessage.prototype.description = ""; + EventMessage.prototype.isCanceled = null; + EventMessage.prototype.name = null; + EventMessage.prototype.description = null; EventMessage.prototype.location = null; - EventMessage.prototype.joinLink = ""; - EventMessage.prototype.startTime = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - EventMessage.prototype.endTime = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - EventMessage.prototype.extraGuestsAllowed = false; - EventMessage.prototype.isScheduleCall = false; - EventMessage.prototype.hasReminder = false; - EventMessage.prototype.reminderOffsetSec = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + EventMessage.prototype.joinLink = null; + EventMessage.prototype.startTime = null; + EventMessage.prototype.endTime = null; + EventMessage.prototype.extraGuestsAllowed = null; + EventMessage.prototype.isScheduleCall = null; + EventMessage.prototype.hasReminder = null; + EventMessage.prototype.reminderOffsetSec = null; + + let $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) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(EventMessage.prototype, "_isScheduleCall", { + get: $util.oneOfGetter($oneOfFields = ["isScheduleCall"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(EventMessage.prototype, "_hasReminder", { + get: $util.oneOfGetter($oneOfFields = ["hasReminder"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(EventMessage.prototype, "_reminderOffsetSec", { + get: $util.oneOfGetter($oneOfFields = ["reminderOffsetSec"]), + set: $util.oneOfSetter($oneOfFields) + }); EventMessage.create = function create(properties) { return new EventMessage(properties); @@ -38520,76 +45083,74 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.contextInfo = null; - d.isCanceled = false; - d.name = ""; - d.description = ""; - d.location = null; - d.joinLink = ""; - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.startTime = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.startTime = o.longs === String ? "0" : 0; - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.endTime = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.endTime = o.longs === String ? "0" : 0; - d.extraGuestsAllowed = false; - d.isScheduleCall = false; - d.hasReminder = false; - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.reminderOffsetSec = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.reminderOffsetSec = o.longs === String ? "0" : 0; - } if (m.contextInfo != null && m.hasOwnProperty("contextInfo")) { d.contextInfo = $root.proto.ContextInfo.toObject(m.contextInfo, o); + if (o.oneofs) + d._contextInfo = "contextInfo"; } if (m.isCanceled != null && m.hasOwnProperty("isCanceled")) { d.isCanceled = m.isCanceled; + if (o.oneofs) + d._isCanceled = "isCanceled"; } if (m.name != null && m.hasOwnProperty("name")) { d.name = m.name; + if (o.oneofs) + d._name = "name"; } if (m.description != null && m.hasOwnProperty("description")) { d.description = m.description; + if (o.oneofs) + d._description = "description"; } if (m.location != null && m.hasOwnProperty("location")) { d.location = $root.proto.Message.LocationMessage.toObject(m.location, o); + if (o.oneofs) + d._location = "location"; } if (m.joinLink != null && m.hasOwnProperty("joinLink")) { d.joinLink = m.joinLink; + if (o.oneofs) + d._joinLink = "joinLink"; } if (m.startTime != null && m.hasOwnProperty("startTime")) { if (typeof m.startTime === "number") d.startTime = o.longs === String ? String(m.startTime) : m.startTime; else d.startTime = o.longs === String ? longToString(m.startTime) : o.longs === Number ? longToNumber(m.startTime) : m.startTime; + if (o.oneofs) + d._startTime = "startTime"; } if (m.endTime != null && m.hasOwnProperty("endTime")) { if (typeof m.endTime === "number") d.endTime = o.longs === String ? String(m.endTime) : m.endTime; else d.endTime = o.longs === String ? longToString(m.endTime) : o.longs === Number ? longToNumber(m.endTime) : m.endTime; + if (o.oneofs) + d._endTime = "endTime"; } if (m.extraGuestsAllowed != null && m.hasOwnProperty("extraGuestsAllowed")) { d.extraGuestsAllowed = m.extraGuestsAllowed; + if (o.oneofs) + d._extraGuestsAllowed = "extraGuestsAllowed"; } if (m.isScheduleCall != null && m.hasOwnProperty("isScheduleCall")) { d.isScheduleCall = m.isScheduleCall; + if (o.oneofs) + d._isScheduleCall = "isScheduleCall"; } if (m.hasReminder != null && m.hasOwnProperty("hasReminder")) { d.hasReminder = m.hasReminder; + if (o.oneofs) + d._hasReminder = "hasReminder"; } if (m.reminderOffsetSec != null && m.hasOwnProperty("reminderOffsetSec")) { if (typeof m.reminderOffsetSec === "number") d.reminderOffsetSec = o.longs === String ? String(m.reminderOffsetSec) : m.reminderOffsetSec; else d.reminderOffsetSec = o.longs === String ? longToString(m.reminderOffsetSec) : o.longs === Number ? longToNumber(m.reminderOffsetSec) : m.reminderOffsetSec; + if (o.oneofs) + d._reminderOffsetSec = "reminderOffsetSec"; } return d; }; @@ -38617,9 +45178,29 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - EventResponseMessage.prototype.response = 0; - EventResponseMessage.prototype.timestampMs = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - EventResponseMessage.prototype.extraGuestCount = 0; + EventResponseMessage.prototype.response = null; + EventResponseMessage.prototype.timestampMs = null; + EventResponseMessage.prototype.extraGuestCount = null; + + let $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) + }); EventResponseMessage.create = function create(properties) { return new EventResponseMessage(properties); @@ -38714,26 +45295,23 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.response = o.enums === String ? "UNKNOWN" : 0; - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.timestampMs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.timestampMs = o.longs === String ? "0" : 0; - d.extraGuestCount = 0; - } if (m.response != null && m.hasOwnProperty("response")) { d.response = o.enums === String ? $root.proto.Message.EventResponseMessage.EventResponseType[m.response] === undefined ? m.response : $root.proto.Message.EventResponseMessage.EventResponseType[m.response] : m.response; + if (o.oneofs) + d._response = "response"; } if (m.timestampMs != null && m.hasOwnProperty("timestampMs")) { if (typeof m.timestampMs === "number") d.timestampMs = o.longs === String ? String(m.timestampMs) : m.timestampMs; else d.timestampMs = o.longs === String ? longToString(m.timestampMs) : o.longs === Number ? longToNumber(m.timestampMs) : m.timestampMs; + if (o.oneofs) + d._timestampMs = "timestampMs"; } if (m.extraGuestCount != null && m.hasOwnProperty("extraGuestCount")) { d.extraGuestCount = m.extraGuestCount; + if (o.oneofs) + d._extraGuestCount = "extraGuestCount"; } return d; }; @@ -38771,39 +45349,227 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - ExtendedTextMessage.prototype.text = ""; - ExtendedTextMessage.prototype.matchedText = ""; - ExtendedTextMessage.prototype.description = ""; - ExtendedTextMessage.prototype.title = ""; - ExtendedTextMessage.prototype.textArgb = 0; - ExtendedTextMessage.prototype.backgroundArgb = 0; - ExtendedTextMessage.prototype.font = 0; - ExtendedTextMessage.prototype.previewType = 0; - ExtendedTextMessage.prototype.jpegThumbnail = $util.newBuffer([]); + ExtendedTextMessage.prototype.text = null; + ExtendedTextMessage.prototype.matchedText = null; + ExtendedTextMessage.prototype.description = null; + ExtendedTextMessage.prototype.title = null; + ExtendedTextMessage.prototype.textArgb = null; + ExtendedTextMessage.prototype.backgroundArgb = null; + ExtendedTextMessage.prototype.font = null; + ExtendedTextMessage.prototype.previewType = null; + ExtendedTextMessage.prototype.jpegThumbnail = null; ExtendedTextMessage.prototype.contextInfo = null; - ExtendedTextMessage.prototype.doNotPlayInline = false; - ExtendedTextMessage.prototype.thumbnailDirectPath = ""; - ExtendedTextMessage.prototype.thumbnailSha256 = $util.newBuffer([]); - ExtendedTextMessage.prototype.thumbnailEncSha256 = $util.newBuffer([]); - ExtendedTextMessage.prototype.mediaKey = $util.newBuffer([]); - ExtendedTextMessage.prototype.mediaKeyTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - ExtendedTextMessage.prototype.thumbnailHeight = 0; - ExtendedTextMessage.prototype.thumbnailWidth = 0; - ExtendedTextMessage.prototype.inviteLinkGroupType = 0; - ExtendedTextMessage.prototype.inviteLinkParentGroupSubjectV2 = ""; - ExtendedTextMessage.prototype.inviteLinkParentGroupThumbnailV2 = $util.newBuffer([]); - ExtendedTextMessage.prototype.inviteLinkGroupTypeV2 = 0; - ExtendedTextMessage.prototype.viewOnce = false; - ExtendedTextMessage.prototype.videoHeight = 0; - ExtendedTextMessage.prototype.videoWidth = 0; + ExtendedTextMessage.prototype.doNotPlayInline = null; + ExtendedTextMessage.prototype.thumbnailDirectPath = null; + ExtendedTextMessage.prototype.thumbnailSha256 = null; + ExtendedTextMessage.prototype.thumbnailEncSha256 = null; + ExtendedTextMessage.prototype.mediaKey = null; + ExtendedTextMessage.prototype.mediaKeyTimestamp = null; + ExtendedTextMessage.prototype.thumbnailHeight = null; + ExtendedTextMessage.prototype.thumbnailWidth = null; + ExtendedTextMessage.prototype.inviteLinkGroupType = null; + ExtendedTextMessage.prototype.inviteLinkParentGroupSubjectV2 = null; + ExtendedTextMessage.prototype.inviteLinkParentGroupThumbnailV2 = null; + ExtendedTextMessage.prototype.inviteLinkGroupTypeV2 = null; + ExtendedTextMessage.prototype.viewOnce = null; + ExtendedTextMessage.prototype.videoHeight = null; + ExtendedTextMessage.prototype.videoWidth = null; ExtendedTextMessage.prototype.faviconMMSMetadata = null; ExtendedTextMessage.prototype.linkPreviewMetadata = null; ExtendedTextMessage.prototype.paymentLinkMetadata = null; ExtendedTextMessage.prototype.endCardTiles = $util.emptyArray; - ExtendedTextMessage.prototype.videoContentUrl = ""; + ExtendedTextMessage.prototype.videoContentUrl = null; ExtendedTextMessage.prototype.musicMetadata = null; ExtendedTextMessage.prototype.paymentExtendedMetadata = null; + let $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) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ExtendedTextMessage.prototype, "_linkPreviewMetadata", { + get: $util.oneOfGetter($oneOfFields = ["linkPreviewMetadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ExtendedTextMessage.prototype, "_paymentLinkMetadata", { + get: $util.oneOfGetter($oneOfFields = ["paymentLinkMetadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ExtendedTextMessage.prototype, "_videoContentUrl", { + get: $util.oneOfGetter($oneOfFields = ["videoContentUrl"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ExtendedTextMessage.prototype, "_musicMetadata", { + get: $util.oneOfGetter($oneOfFields = ["musicMetadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ExtendedTextMessage.prototype, "_paymentExtendedMetadata", { + get: $util.oneOfGetter($oneOfFields = ["paymentExtendedMetadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + ExtendedTextMessage.create = function create(properties) { return new ExtendedTextMessage(properties); }; @@ -39286,159 +46052,148 @@ export const proto = $root.proto = (() => { if (o.arrays || o.defaults) { d.endCardTiles = []; } - if (o.defaults) { - d.text = ""; - d.matchedText = ""; - d.description = ""; - d.title = ""; - d.textArgb = 0; - d.backgroundArgb = 0; - d.font = o.enums === String ? "SYSTEM" : 0; - d.previewType = o.enums === String ? "NONE" : 0; - if (o.bytes === String) - d.jpegThumbnail = ""; - else { - d.jpegThumbnail = []; - if (o.bytes !== Array) - d.jpegThumbnail = $util.newBuffer(d.jpegThumbnail); - } - d.contextInfo = null; - d.doNotPlayInline = false; - d.thumbnailDirectPath = ""; - if (o.bytes === String) - d.thumbnailSha256 = ""; - else { - d.thumbnailSha256 = []; - if (o.bytes !== Array) - d.thumbnailSha256 = $util.newBuffer(d.thumbnailSha256); - } - if (o.bytes === String) - d.thumbnailEncSha256 = ""; - else { - d.thumbnailEncSha256 = []; - if (o.bytes !== Array) - d.thumbnailEncSha256 = $util.newBuffer(d.thumbnailEncSha256); - } - if (o.bytes === String) - d.mediaKey = ""; - else { - d.mediaKey = []; - if (o.bytes !== Array) - d.mediaKey = $util.newBuffer(d.mediaKey); - } - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.mediaKeyTimestamp = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.mediaKeyTimestamp = o.longs === String ? "0" : 0; - d.thumbnailHeight = 0; - d.thumbnailWidth = 0; - d.inviteLinkGroupType = o.enums === String ? "DEFAULT" : 0; - d.inviteLinkParentGroupSubjectV2 = ""; - if (o.bytes === String) - d.inviteLinkParentGroupThumbnailV2 = ""; - else { - d.inviteLinkParentGroupThumbnailV2 = []; - if (o.bytes !== Array) - d.inviteLinkParentGroupThumbnailV2 = $util.newBuffer(d.inviteLinkParentGroupThumbnailV2); - } - d.inviteLinkGroupTypeV2 = o.enums === String ? "DEFAULT" : 0; - d.viewOnce = false; - d.videoHeight = 0; - d.videoWidth = 0; - d.faviconMMSMetadata = null; - d.linkPreviewMetadata = null; - d.paymentLinkMetadata = null; - d.videoContentUrl = ""; - d.musicMetadata = null; - d.paymentExtendedMetadata = null; - } if (m.text != null && m.hasOwnProperty("text")) { d.text = m.text; + if (o.oneofs) + d._text = "text"; } if (m.matchedText != null && m.hasOwnProperty("matchedText")) { d.matchedText = m.matchedText; + if (o.oneofs) + d._matchedText = "matchedText"; } if (m.description != null && m.hasOwnProperty("description")) { d.description = m.description; + if (o.oneofs) + d._description = "description"; } if (m.title != null && m.hasOwnProperty("title")) { d.title = m.title; + if (o.oneofs) + d._title = "title"; } if (m.textArgb != null && m.hasOwnProperty("textArgb")) { d.textArgb = m.textArgb; + if (o.oneofs) + d._textArgb = "textArgb"; } if (m.backgroundArgb != null && m.hasOwnProperty("backgroundArgb")) { d.backgroundArgb = m.backgroundArgb; + if (o.oneofs) + d._backgroundArgb = "backgroundArgb"; } if (m.font != null && m.hasOwnProperty("font")) { d.font = o.enums === String ? $root.proto.Message.ExtendedTextMessage.FontType[m.font] === undefined ? m.font : $root.proto.Message.ExtendedTextMessage.FontType[m.font] : m.font; + if (o.oneofs) + d._font = "font"; } if (m.previewType != null && m.hasOwnProperty("previewType")) { d.previewType = o.enums === String ? $root.proto.Message.ExtendedTextMessage.PreviewType[m.previewType] === undefined ? m.previewType : $root.proto.Message.ExtendedTextMessage.PreviewType[m.previewType] : m.previewType; + if (o.oneofs) + d._previewType = "previewType"; } if (m.jpegThumbnail != null && m.hasOwnProperty("jpegThumbnail")) { d.jpegThumbnail = o.bytes === String ? $util.base64.encode(m.jpegThumbnail, 0, m.jpegThumbnail.length) : o.bytes === Array ? Array.prototype.slice.call(m.jpegThumbnail) : m.jpegThumbnail; + if (o.oneofs) + d._jpegThumbnail = "jpegThumbnail"; } if (m.contextInfo != null && m.hasOwnProperty("contextInfo")) { d.contextInfo = $root.proto.ContextInfo.toObject(m.contextInfo, o); + if (o.oneofs) + d._contextInfo = "contextInfo"; } if (m.doNotPlayInline != null && m.hasOwnProperty("doNotPlayInline")) { d.doNotPlayInline = m.doNotPlayInline; + if (o.oneofs) + d._doNotPlayInline = "doNotPlayInline"; } if (m.thumbnailDirectPath != null && m.hasOwnProperty("thumbnailDirectPath")) { d.thumbnailDirectPath = m.thumbnailDirectPath; + if (o.oneofs) + d._thumbnailDirectPath = "thumbnailDirectPath"; } if (m.thumbnailSha256 != null && m.hasOwnProperty("thumbnailSha256")) { d.thumbnailSha256 = o.bytes === String ? $util.base64.encode(m.thumbnailSha256, 0, m.thumbnailSha256.length) : o.bytes === Array ? Array.prototype.slice.call(m.thumbnailSha256) : m.thumbnailSha256; + if (o.oneofs) + d._thumbnailSha256 = "thumbnailSha256"; } if (m.thumbnailEncSha256 != null && m.hasOwnProperty("thumbnailEncSha256")) { d.thumbnailEncSha256 = o.bytes === String ? $util.base64.encode(m.thumbnailEncSha256, 0, m.thumbnailEncSha256.length) : o.bytes === Array ? Array.prototype.slice.call(m.thumbnailEncSha256) : m.thumbnailEncSha256; + if (o.oneofs) + d._thumbnailEncSha256 = "thumbnailEncSha256"; } if (m.mediaKey != null && m.hasOwnProperty("mediaKey")) { d.mediaKey = o.bytes === String ? $util.base64.encode(m.mediaKey, 0, m.mediaKey.length) : o.bytes === Array ? Array.prototype.slice.call(m.mediaKey) : m.mediaKey; + if (o.oneofs) + d._mediaKey = "mediaKey"; } if (m.mediaKeyTimestamp != null && m.hasOwnProperty("mediaKeyTimestamp")) { if (typeof m.mediaKeyTimestamp === "number") d.mediaKeyTimestamp = o.longs === String ? String(m.mediaKeyTimestamp) : m.mediaKeyTimestamp; else d.mediaKeyTimestamp = o.longs === String ? longToString(m.mediaKeyTimestamp) : o.longs === Number ? longToNumber(m.mediaKeyTimestamp) : m.mediaKeyTimestamp; + if (o.oneofs) + d._mediaKeyTimestamp = "mediaKeyTimestamp"; } if (m.thumbnailHeight != null && m.hasOwnProperty("thumbnailHeight")) { d.thumbnailHeight = m.thumbnailHeight; + if (o.oneofs) + d._thumbnailHeight = "thumbnailHeight"; } if (m.thumbnailWidth != null && m.hasOwnProperty("thumbnailWidth")) { d.thumbnailWidth = m.thumbnailWidth; + if (o.oneofs) + d._thumbnailWidth = "thumbnailWidth"; } if (m.inviteLinkGroupType != null && m.hasOwnProperty("inviteLinkGroupType")) { d.inviteLinkGroupType = o.enums === String ? $root.proto.Message.ExtendedTextMessage.InviteLinkGroupType[m.inviteLinkGroupType] === undefined ? m.inviteLinkGroupType : $root.proto.Message.ExtendedTextMessage.InviteLinkGroupType[m.inviteLinkGroupType] : m.inviteLinkGroupType; + if (o.oneofs) + d._inviteLinkGroupType = "inviteLinkGroupType"; } if (m.inviteLinkParentGroupSubjectV2 != null && m.hasOwnProperty("inviteLinkParentGroupSubjectV2")) { d.inviteLinkParentGroupSubjectV2 = m.inviteLinkParentGroupSubjectV2; + if (o.oneofs) + d._inviteLinkParentGroupSubjectV2 = "inviteLinkParentGroupSubjectV2"; } if (m.inviteLinkParentGroupThumbnailV2 != null && m.hasOwnProperty("inviteLinkParentGroupThumbnailV2")) { d.inviteLinkParentGroupThumbnailV2 = o.bytes === String ? $util.base64.encode(m.inviteLinkParentGroupThumbnailV2, 0, m.inviteLinkParentGroupThumbnailV2.length) : o.bytes === Array ? Array.prototype.slice.call(m.inviteLinkParentGroupThumbnailV2) : m.inviteLinkParentGroupThumbnailV2; + if (o.oneofs) + d._inviteLinkParentGroupThumbnailV2 = "inviteLinkParentGroupThumbnailV2"; } if (m.inviteLinkGroupTypeV2 != null && m.hasOwnProperty("inviteLinkGroupTypeV2")) { d.inviteLinkGroupTypeV2 = o.enums === String ? $root.proto.Message.ExtendedTextMessage.InviteLinkGroupType[m.inviteLinkGroupTypeV2] === undefined ? m.inviteLinkGroupTypeV2 : $root.proto.Message.ExtendedTextMessage.InviteLinkGroupType[m.inviteLinkGroupTypeV2] : m.inviteLinkGroupTypeV2; + if (o.oneofs) + d._inviteLinkGroupTypeV2 = "inviteLinkGroupTypeV2"; } if (m.viewOnce != null && m.hasOwnProperty("viewOnce")) { d.viewOnce = m.viewOnce; + if (o.oneofs) + d._viewOnce = "viewOnce"; } if (m.videoHeight != null && m.hasOwnProperty("videoHeight")) { d.videoHeight = m.videoHeight; + if (o.oneofs) + d._videoHeight = "videoHeight"; } if (m.videoWidth != null && m.hasOwnProperty("videoWidth")) { d.videoWidth = m.videoWidth; + if (o.oneofs) + d._videoWidth = "videoWidth"; } if (m.faviconMMSMetadata != null && m.hasOwnProperty("faviconMMSMetadata")) { d.faviconMMSMetadata = $root.proto.Message.MMSThumbnailMetadata.toObject(m.faviconMMSMetadata, o); + if (o.oneofs) + d._faviconMMSMetadata = "faviconMMSMetadata"; } if (m.linkPreviewMetadata != null && m.hasOwnProperty("linkPreviewMetadata")) { d.linkPreviewMetadata = $root.proto.Message.LinkPreviewMetadata.toObject(m.linkPreviewMetadata, o); + if (o.oneofs) + d._linkPreviewMetadata = "linkPreviewMetadata"; } if (m.paymentLinkMetadata != null && m.hasOwnProperty("paymentLinkMetadata")) { d.paymentLinkMetadata = $root.proto.Message.PaymentLinkMetadata.toObject(m.paymentLinkMetadata, o); + if (o.oneofs) + d._paymentLinkMetadata = "paymentLinkMetadata"; } if (m.endCardTiles && m.endCardTiles.length) { d.endCardTiles = []; @@ -39448,12 +46203,18 @@ export const proto = $root.proto = (() => { } if (m.videoContentUrl != null && m.hasOwnProperty("videoContentUrl")) { d.videoContentUrl = m.videoContentUrl; + if (o.oneofs) + d._videoContentUrl = "videoContentUrl"; } if (m.musicMetadata != null && m.hasOwnProperty("musicMetadata")) { d.musicMetadata = $root.proto.EmbeddedMusic.toObject(m.musicMetadata, o); + if (o.oneofs) + d._musicMetadata = "musicMetadata"; } if (m.paymentExtendedMetadata != null && m.hasOwnProperty("paymentExtendedMetadata")) { d.paymentExtendedMetadata = $root.proto.Message.PaymentExtendedMetadata.toObject(m.paymentExtendedMetadata, o); + if (o.oneofs) + d._paymentExtendedMetadata = "paymentExtendedMetadata"; } return d; }; @@ -39514,7 +46275,15 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - FullHistorySyncOnDemandRequestMetadata.prototype.requestId = ""; + FullHistorySyncOnDemandRequestMetadata.prototype.requestId = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(FullHistorySyncOnDemandRequestMetadata.prototype, "_requestId", { + get: $util.oneOfGetter($oneOfFields = ["requestId"]), + set: $util.oneOfSetter($oneOfFields) + }); FullHistorySyncOnDemandRequestMetadata.create = function create(properties) { return new FullHistorySyncOnDemandRequestMetadata(properties); @@ -39563,11 +46332,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.requestId = ""; - } if (m.requestId != null && m.hasOwnProperty("requestId")) { d.requestId = m.requestId; + if (o.oneofs) + d._requestId = "requestId"; } return d; }; @@ -39597,6 +46365,14 @@ export const proto = $root.proto = (() => { FutureProofMessage.prototype.message = null; + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(FutureProofMessage.prototype, "_message", { + get: $util.oneOfGetter($oneOfFields = ["message"]), + set: $util.oneOfSetter($oneOfFields) + }); + FutureProofMessage.create = function create(properties) { return new FutureProofMessage(properties); }; @@ -39646,11 +46422,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.message = null; - } if (m.message != null && m.hasOwnProperty("message")) { d.message = $root.proto.Message.toObject(m.message, o); + if (o.oneofs) + d._message = "message"; } return d; }; @@ -39678,14 +46453,64 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - GroupInviteMessage.prototype.groupJid = ""; - GroupInviteMessage.prototype.inviteCode = ""; - GroupInviteMessage.prototype.inviteExpiration = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - GroupInviteMessage.prototype.groupName = ""; - GroupInviteMessage.prototype.jpegThumbnail = $util.newBuffer([]); - GroupInviteMessage.prototype.caption = ""; + GroupInviteMessage.prototype.groupJid = null; + GroupInviteMessage.prototype.inviteCode = null; + GroupInviteMessage.prototype.inviteExpiration = null; + GroupInviteMessage.prototype.groupName = null; + GroupInviteMessage.prototype.jpegThumbnail = null; + GroupInviteMessage.prototype.caption = null; GroupInviteMessage.prototype.contextInfo = null; - GroupInviteMessage.prototype.groupType = 0; + GroupInviteMessage.prototype.groupType = null; + + let $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) + }); GroupInviteMessage.create = function create(properties) { return new GroupInviteMessage(properties); @@ -39822,52 +46647,48 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.groupJid = ""; - d.inviteCode = ""; - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.inviteExpiration = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.inviteExpiration = o.longs === String ? "0" : 0; - d.groupName = ""; - if (o.bytes === String) - d.jpegThumbnail = ""; - else { - d.jpegThumbnail = []; - if (o.bytes !== Array) - d.jpegThumbnail = $util.newBuffer(d.jpegThumbnail); - } - d.caption = ""; - d.contextInfo = null; - d.groupType = o.enums === String ? "DEFAULT" : 0; - } if (m.groupJid != null && m.hasOwnProperty("groupJid")) { d.groupJid = m.groupJid; + if (o.oneofs) + d._groupJid = "groupJid"; } if (m.inviteCode != null && m.hasOwnProperty("inviteCode")) { d.inviteCode = m.inviteCode; + if (o.oneofs) + d._inviteCode = "inviteCode"; } if (m.inviteExpiration != null && m.hasOwnProperty("inviteExpiration")) { if (typeof m.inviteExpiration === "number") d.inviteExpiration = o.longs === String ? String(m.inviteExpiration) : m.inviteExpiration; else d.inviteExpiration = o.longs === String ? longToString(m.inviteExpiration) : o.longs === Number ? longToNumber(m.inviteExpiration) : m.inviteExpiration; + if (o.oneofs) + d._inviteExpiration = "inviteExpiration"; } if (m.groupName != null && m.hasOwnProperty("groupName")) { d.groupName = m.groupName; + if (o.oneofs) + d._groupName = "groupName"; } if (m.jpegThumbnail != null && m.hasOwnProperty("jpegThumbnail")) { d.jpegThumbnail = o.bytes === String ? $util.base64.encode(m.jpegThumbnail, 0, m.jpegThumbnail.length) : o.bytes === Array ? Array.prototype.slice.call(m.jpegThumbnail) : m.jpegThumbnail; + if (o.oneofs) + d._jpegThumbnail = "jpegThumbnail"; } if (m.caption != null && m.hasOwnProperty("caption")) { d.caption = m.caption; + if (o.oneofs) + d._caption = "caption"; } if (m.contextInfo != null && m.hasOwnProperty("contextInfo")) { d.contextInfo = $root.proto.ContextInfo.toObject(m.contextInfo, o); + if (o.oneofs) + d._contextInfo = "contextInfo"; } if (m.groupType != null && m.hasOwnProperty("groupType")) { d.groupType = o.enums === String ? $root.proto.Message.GroupInviteMessage.GroupType[m.groupType] === undefined ? m.groupType : $root.proto.Message.GroupInviteMessage.GroupType[m.groupType] : m.groupType; + if (o.oneofs) + d._groupType = "groupType"; } return d; }; @@ -39904,16 +46725,60 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - HighlyStructuredMessage.prototype.namespace = ""; - HighlyStructuredMessage.prototype.elementName = ""; + HighlyStructuredMessage.prototype.namespace = null; + HighlyStructuredMessage.prototype.elementName = null; HighlyStructuredMessage.prototype.params = $util.emptyArray; - HighlyStructuredMessage.prototype.fallbackLg = ""; - HighlyStructuredMessage.prototype.fallbackLc = ""; + HighlyStructuredMessage.prototype.fallbackLg = null; + HighlyStructuredMessage.prototype.fallbackLc = null; HighlyStructuredMessage.prototype.localizableParams = $util.emptyArray; - HighlyStructuredMessage.prototype.deterministicLg = ""; - HighlyStructuredMessage.prototype.deterministicLc = ""; + HighlyStructuredMessage.prototype.deterministicLg = null; + HighlyStructuredMessage.prototype.deterministicLc = null; HighlyStructuredMessage.prototype.hydratedHsm = null; + let $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) + }); + HighlyStructuredMessage.create = function create(properties) { return new HighlyStructuredMessage(properties); }; @@ -40059,20 +46924,15 @@ export const proto = $root.proto = (() => { d.params = []; d.localizableParams = []; } - if (o.defaults) { - d.namespace = ""; - d.elementName = ""; - d.fallbackLg = ""; - d.fallbackLc = ""; - d.deterministicLg = ""; - d.deterministicLc = ""; - d.hydratedHsm = null; - } if (m.namespace != null && m.hasOwnProperty("namespace")) { d.namespace = m.namespace; + if (o.oneofs) + d._namespace = "namespace"; } if (m.elementName != null && m.hasOwnProperty("elementName")) { d.elementName = m.elementName; + if (o.oneofs) + d._elementName = "elementName"; } if (m.params && m.params.length) { d.params = []; @@ -40082,9 +46942,13 @@ export const proto = $root.proto = (() => { } if (m.fallbackLg != null && m.hasOwnProperty("fallbackLg")) { d.fallbackLg = m.fallbackLg; + if (o.oneofs) + d._fallbackLg = "fallbackLg"; } if (m.fallbackLc != null && m.hasOwnProperty("fallbackLc")) { d.fallbackLc = m.fallbackLc; + if (o.oneofs) + d._fallbackLc = "fallbackLc"; } if (m.localizableParams && m.localizableParams.length) { d.localizableParams = []; @@ -40094,12 +46958,18 @@ export const proto = $root.proto = (() => { } if (m.deterministicLg != null && m.hasOwnProperty("deterministicLg")) { d.deterministicLg = m.deterministicLg; + if (o.oneofs) + d._deterministicLg = "deterministicLg"; } if (m.deterministicLc != null && m.hasOwnProperty("deterministicLc")) { d.deterministicLc = m.deterministicLc; + if (o.oneofs) + d._deterministicLc = "deterministicLc"; } if (m.hydratedHsm != null && m.hasOwnProperty("hydratedHsm")) { d.hydratedHsm = $root.proto.Message.TemplateMessage.toObject(m.hydratedHsm, o); + if (o.oneofs) + d._hydratedHsm = "hydratedHsm"; } return d; }; @@ -40124,12 +46994,18 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - HSMLocalizableParameter.prototype["default"] = ""; + HSMLocalizableParameter.prototype["default"] = null; HSMLocalizableParameter.prototype.currency = null; HSMLocalizableParameter.prototype.dateTime = null; let $oneOfFields; + // Virtual OneOf for proto3 optional field + Object.defineProperty(HSMLocalizableParameter.prototype, "_default", { + get: $util.oneOfGetter($oneOfFields = ["default"]), + set: $util.oneOfSetter($oneOfFields) + }); + Object.defineProperty(HSMLocalizableParameter.prototype, "paramOneof", { get: $util.oneOfGetter($oneOfFields = ["currency", "dateTime"]), set: $util.oneOfSetter($oneOfFields) @@ -40204,11 +47080,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d["default"] = ""; - } if (m["default"] != null && m.hasOwnProperty("default")) { d["default"] = m["default"]; + if (o.oneofs) + d._default = "default"; } if (m.currency != null && m.hasOwnProperty("currency")) { d.currency = $root.proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMCurrency.toObject(m.currency, o); @@ -40243,8 +47118,22 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - HSMCurrency.prototype.currencyCode = ""; - HSMCurrency.prototype.amount1000 = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + HSMCurrency.prototype.currencyCode = null; + HSMCurrency.prototype.amount1000 = null; + + let $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) + }); HSMCurrency.create = function create(properties) { return new HSMCurrency(properties); @@ -40309,22 +47198,18 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.currencyCode = ""; - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.amount1000 = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.amount1000 = o.longs === String ? "0" : 0; - } if (m.currencyCode != null && m.hasOwnProperty("currencyCode")) { d.currencyCode = m.currencyCode; + if (o.oneofs) + d._currencyCode = "currencyCode"; } if (m.amount1000 != null && m.hasOwnProperty("amount1000")) { if (typeof m.amount1000 === "number") d.amount1000 = o.longs === String ? String(m.amount1000) : m.amount1000; else d.amount1000 = o.longs === String ? longToString(m.amount1000) : o.longs === Number ? longToNumber(m.amount1000) : m.amount1000; + if (o.oneofs) + d._amount1000 = "amount1000"; } return d; }; @@ -40455,13 +47340,57 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - HSMDateTimeComponent.prototype.dayOfWeek = 1; - HSMDateTimeComponent.prototype.year = 0; - HSMDateTimeComponent.prototype.month = 0; - HSMDateTimeComponent.prototype.dayOfMonth = 0; - HSMDateTimeComponent.prototype.hour = 0; - HSMDateTimeComponent.prototype.minute = 0; - HSMDateTimeComponent.prototype.calendar = 1; + HSMDateTimeComponent.prototype.dayOfWeek = null; + HSMDateTimeComponent.prototype.year = null; + HSMDateTimeComponent.prototype.month = null; + HSMDateTimeComponent.prototype.dayOfMonth = null; + HSMDateTimeComponent.prototype.hour = null; + HSMDateTimeComponent.prototype.minute = null; + HSMDateTimeComponent.prototype.calendar = null; + + let $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) + }); HSMDateTimeComponent.create = function create(properties) { return new HSMDateTimeComponent(properties); @@ -40610,35 +47539,40 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.dayOfWeek = o.enums === String ? "MONDAY" : 1; - d.year = 0; - d.month = 0; - d.dayOfMonth = 0; - d.hour = 0; - d.minute = 0; - d.calendar = o.enums === String ? "GREGORIAN" : 1; - } if (m.dayOfWeek != null && m.hasOwnProperty("dayOfWeek")) { d.dayOfWeek = o.enums === String ? $root.proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent.DayOfWeekType[m.dayOfWeek] === undefined ? m.dayOfWeek : $root.proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent.DayOfWeekType[m.dayOfWeek] : m.dayOfWeek; + if (o.oneofs) + d._dayOfWeek = "dayOfWeek"; } if (m.year != null && m.hasOwnProperty("year")) { d.year = m.year; + if (o.oneofs) + d._year = "year"; } if (m.month != null && m.hasOwnProperty("month")) { d.month = m.month; + if (o.oneofs) + d._month = "month"; } if (m.dayOfMonth != null && m.hasOwnProperty("dayOfMonth")) { d.dayOfMonth = m.dayOfMonth; + if (o.oneofs) + d._dayOfMonth = "dayOfMonth"; } if (m.hour != null && m.hasOwnProperty("hour")) { d.hour = m.hour; + if (o.oneofs) + d._hour = "hour"; } if (m.minute != null && m.hasOwnProperty("minute")) { d.minute = m.minute; + if (o.oneofs) + d._minute = "minute"; } if (m.calendar != null && m.hasOwnProperty("calendar")) { d.calendar = o.enums === String ? $root.proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent.CalendarType[m.calendar] === undefined ? m.calendar : $root.proto.Message.HighlyStructuredMessage.HSMLocalizableParameter.HSMDateTime.HSMDateTimeComponent.CalendarType[m.calendar] : m.calendar; + if (o.oneofs) + d._calendar = "calendar"; } return d; }; @@ -40685,7 +47619,15 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - HSMDateTimeUnixEpoch.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + HSMDateTimeUnixEpoch.prototype.timestamp = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HSMDateTimeUnixEpoch.prototype, "_timestamp", { + get: $util.oneOfGetter($oneOfFields = ["timestamp"]), + set: $util.oneOfSetter($oneOfFields) + }); HSMDateTimeUnixEpoch.create = function create(properties) { return new HSMDateTimeUnixEpoch(properties); @@ -40741,18 +47683,13 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.timestamp = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.timestamp = o.longs === String ? "0" : 0; - } if (m.timestamp != null && m.hasOwnProperty("timestamp")) { if (typeof m.timestamp === "number") d.timestamp = o.longs === String ? String(m.timestamp) : m.timestamp; else d.timestamp = o.longs === String ? longToString(m.timestamp) : o.longs === Number ? longToNumber(m.timestamp) : m.timestamp; + if (o.oneofs) + d._timestamp = "timestamp"; } return d; }; @@ -40789,7 +47726,15 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - HistorySyncMessageAccessStatus.prototype.completeAccessGranted = false; + HistorySyncMessageAccessStatus.prototype.completeAccessGranted = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HistorySyncMessageAccessStatus.prototype, "_completeAccessGranted", { + get: $util.oneOfGetter($oneOfFields = ["completeAccessGranted"]), + set: $util.oneOfSetter($oneOfFields) + }); HistorySyncMessageAccessStatus.create = function create(properties) { return new HistorySyncMessageAccessStatus(properties); @@ -40838,11 +47783,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.completeAccessGranted = false; - } if (m.completeAccessGranted != null && m.hasOwnProperty("completeAccessGranted")) { d.completeAccessGranted = m.completeAccessGranted; + if (o.oneofs) + d._completeAccessGranted = "completeAccessGranted"; } return d; }; @@ -40870,22 +47814,114 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - HistorySyncNotification.prototype.fileSha256 = $util.newBuffer([]); - HistorySyncNotification.prototype.fileLength = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - HistorySyncNotification.prototype.mediaKey = $util.newBuffer([]); - HistorySyncNotification.prototype.fileEncSha256 = $util.newBuffer([]); - HistorySyncNotification.prototype.directPath = ""; - HistorySyncNotification.prototype.syncType = 0; - HistorySyncNotification.prototype.chunkOrder = 0; - HistorySyncNotification.prototype.originalMessageId = ""; - HistorySyncNotification.prototype.progress = 0; - HistorySyncNotification.prototype.oldestMsgInChunkTimestampSec = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - HistorySyncNotification.prototype.initialHistBootstrapInlinePayload = $util.newBuffer([]); - HistorySyncNotification.prototype.peerDataRequestSessionId = ""; + HistorySyncNotification.prototype.fileSha256 = null; + HistorySyncNotification.prototype.fileLength = null; + HistorySyncNotification.prototype.mediaKey = null; + HistorySyncNotification.prototype.fileEncSha256 = null; + HistorySyncNotification.prototype.directPath = null; + HistorySyncNotification.prototype.syncType = null; + HistorySyncNotification.prototype.chunkOrder = null; + HistorySyncNotification.prototype.originalMessageId = null; + HistorySyncNotification.prototype.progress = null; + HistorySyncNotification.prototype.oldestMsgInChunkTimestampSec = null; + HistorySyncNotification.prototype.initialHistBootstrapInlinePayload = null; + HistorySyncNotification.prototype.peerDataRequestSessionId = null; HistorySyncNotification.prototype.fullHistorySyncOnDemandRequestMetadata = null; - HistorySyncNotification.prototype.encHandle = ""; + HistorySyncNotification.prototype.encHandle = null; HistorySyncNotification.prototype.messageAccessStatus = null; + let $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) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HistorySyncNotification.prototype, "_messageAccessStatus", { + get: $util.oneOfGetter($oneOfFields = ["messageAccessStatus"]), + set: $util.oneOfSetter($oneOfFields) + }); + HistorySyncNotification.create = function create(properties) { return new HistorySyncNotification(properties); }; @@ -41130,105 +48166,86 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - if (o.bytes === String) - d.fileSha256 = ""; - else { - d.fileSha256 = []; - if (o.bytes !== Array) - d.fileSha256 = $util.newBuffer(d.fileSha256); - } - if ($util.Long) { - var n = new $util.Long(0, 0, true); - d.fileLength = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.fileLength = o.longs === String ? "0" : 0; - if (o.bytes === String) - d.mediaKey = ""; - else { - d.mediaKey = []; - if (o.bytes !== Array) - d.mediaKey = $util.newBuffer(d.mediaKey); - } - if (o.bytes === String) - d.fileEncSha256 = ""; - else { - d.fileEncSha256 = []; - if (o.bytes !== Array) - d.fileEncSha256 = $util.newBuffer(d.fileEncSha256); - } - d.directPath = ""; - d.syncType = o.enums === String ? "INITIAL_BOOTSTRAP" : 0; - d.chunkOrder = 0; - d.originalMessageId = ""; - d.progress = 0; - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.oldestMsgInChunkTimestampSec = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.oldestMsgInChunkTimestampSec = o.longs === String ? "0" : 0; - if (o.bytes === String) - d.initialHistBootstrapInlinePayload = ""; - else { - d.initialHistBootstrapInlinePayload = []; - if (o.bytes !== Array) - d.initialHistBootstrapInlinePayload = $util.newBuffer(d.initialHistBootstrapInlinePayload); - } - d.peerDataRequestSessionId = ""; - d.fullHistorySyncOnDemandRequestMetadata = null; - d.encHandle = ""; - d.messageAccessStatus = null; - } if (m.fileSha256 != null && m.hasOwnProperty("fileSha256")) { d.fileSha256 = o.bytes === String ? $util.base64.encode(m.fileSha256, 0, m.fileSha256.length) : o.bytes === Array ? Array.prototype.slice.call(m.fileSha256) : m.fileSha256; + if (o.oneofs) + d._fileSha256 = "fileSha256"; } if (m.fileLength != null && m.hasOwnProperty("fileLength")) { if (typeof m.fileLength === "number") d.fileLength = o.longs === String ? String(m.fileLength) : m.fileLength; else d.fileLength = o.longs === String ? longToString(m.fileLength, true) : o.longs === Number ? longToNumber(m.fileLength, true) : m.fileLength; + if (o.oneofs) + d._fileLength = "fileLength"; } if (m.mediaKey != null && m.hasOwnProperty("mediaKey")) { d.mediaKey = o.bytes === String ? $util.base64.encode(m.mediaKey, 0, m.mediaKey.length) : o.bytes === Array ? Array.prototype.slice.call(m.mediaKey) : m.mediaKey; + if (o.oneofs) + d._mediaKey = "mediaKey"; } if (m.fileEncSha256 != null && m.hasOwnProperty("fileEncSha256")) { d.fileEncSha256 = o.bytes === String ? $util.base64.encode(m.fileEncSha256, 0, m.fileEncSha256.length) : o.bytes === Array ? Array.prototype.slice.call(m.fileEncSha256) : m.fileEncSha256; + if (o.oneofs) + d._fileEncSha256 = "fileEncSha256"; } if (m.directPath != null && m.hasOwnProperty("directPath")) { d.directPath = m.directPath; + if (o.oneofs) + d._directPath = "directPath"; } if (m.syncType != null && m.hasOwnProperty("syncType")) { d.syncType = o.enums === String ? $root.proto.Message.HistorySyncType[m.syncType] === undefined ? m.syncType : $root.proto.Message.HistorySyncType[m.syncType] : m.syncType; + if (o.oneofs) + d._syncType = "syncType"; } if (m.chunkOrder != null && m.hasOwnProperty("chunkOrder")) { d.chunkOrder = m.chunkOrder; + if (o.oneofs) + d._chunkOrder = "chunkOrder"; } if (m.originalMessageId != null && m.hasOwnProperty("originalMessageId")) { d.originalMessageId = m.originalMessageId; + if (o.oneofs) + d._originalMessageId = "originalMessageId"; } if (m.progress != null && m.hasOwnProperty("progress")) { d.progress = m.progress; + if (o.oneofs) + d._progress = "progress"; } if (m.oldestMsgInChunkTimestampSec != null && m.hasOwnProperty("oldestMsgInChunkTimestampSec")) { if (typeof m.oldestMsgInChunkTimestampSec === "number") d.oldestMsgInChunkTimestampSec = o.longs === String ? String(m.oldestMsgInChunkTimestampSec) : m.oldestMsgInChunkTimestampSec; else d.oldestMsgInChunkTimestampSec = o.longs === String ? longToString(m.oldestMsgInChunkTimestampSec) : o.longs === Number ? longToNumber(m.oldestMsgInChunkTimestampSec) : m.oldestMsgInChunkTimestampSec; + if (o.oneofs) + d._oldestMsgInChunkTimestampSec = "oldestMsgInChunkTimestampSec"; } if (m.initialHistBootstrapInlinePayload != null && m.hasOwnProperty("initialHistBootstrapInlinePayload")) { d.initialHistBootstrapInlinePayload = o.bytes === String ? $util.base64.encode(m.initialHistBootstrapInlinePayload, 0, m.initialHistBootstrapInlinePayload.length) : o.bytes === Array ? Array.prototype.slice.call(m.initialHistBootstrapInlinePayload) : m.initialHistBootstrapInlinePayload; + if (o.oneofs) + d._initialHistBootstrapInlinePayload = "initialHistBootstrapInlinePayload"; } if (m.peerDataRequestSessionId != null && m.hasOwnProperty("peerDataRequestSessionId")) { d.peerDataRequestSessionId = m.peerDataRequestSessionId; + if (o.oneofs) + d._peerDataRequestSessionId = "peerDataRequestSessionId"; } if (m.fullHistorySyncOnDemandRequestMetadata != null && m.hasOwnProperty("fullHistorySyncOnDemandRequestMetadata")) { d.fullHistorySyncOnDemandRequestMetadata = $root.proto.Message.FullHistorySyncOnDemandRequestMetadata.toObject(m.fullHistorySyncOnDemandRequestMetadata, o); + if (o.oneofs) + d._fullHistorySyncOnDemandRequestMetadata = "fullHistorySyncOnDemandRequestMetadata"; } if (m.encHandle != null && m.hasOwnProperty("encHandle")) { d.encHandle = m.encHandle; + if (o.oneofs) + d._encHandle = "encHandle"; } if (m.messageAccessStatus != null && m.hasOwnProperty("messageAccessStatus")) { d.messageAccessStatus = $root.proto.Message.HistorySyncMessageAccessStatus.toObject(m.messageAccessStatus, o); + if (o.oneofs) + d._messageAccessStatus = "messageAccessStatus"; } return d; }; @@ -41273,36 +48290,200 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - ImageMessage.prototype.url = ""; - ImageMessage.prototype.mimetype = ""; - ImageMessage.prototype.caption = ""; - ImageMessage.prototype.fileSha256 = $util.newBuffer([]); - ImageMessage.prototype.fileLength = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - ImageMessage.prototype.height = 0; - ImageMessage.prototype.width = 0; - ImageMessage.prototype.mediaKey = $util.newBuffer([]); - ImageMessage.prototype.fileEncSha256 = $util.newBuffer([]); + ImageMessage.prototype.url = null; + ImageMessage.prototype.mimetype = null; + ImageMessage.prototype.caption = null; + ImageMessage.prototype.fileSha256 = null; + ImageMessage.prototype.fileLength = null; + ImageMessage.prototype.height = null; + ImageMessage.prototype.width = null; + ImageMessage.prototype.mediaKey = null; + ImageMessage.prototype.fileEncSha256 = null; ImageMessage.prototype.interactiveAnnotations = $util.emptyArray; - ImageMessage.prototype.directPath = ""; - ImageMessage.prototype.mediaKeyTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - ImageMessage.prototype.jpegThumbnail = $util.newBuffer([]); + ImageMessage.prototype.directPath = null; + ImageMessage.prototype.mediaKeyTimestamp = null; + ImageMessage.prototype.jpegThumbnail = null; ImageMessage.prototype.contextInfo = null; - ImageMessage.prototype.firstScanSidecar = $util.newBuffer([]); - ImageMessage.prototype.firstScanLength = 0; - ImageMessage.prototype.experimentGroupId = 0; - ImageMessage.prototype.scansSidecar = $util.newBuffer([]); + ImageMessage.prototype.firstScanSidecar = null; + ImageMessage.prototype.firstScanLength = null; + ImageMessage.prototype.experimentGroupId = null; + ImageMessage.prototype.scansSidecar = null; ImageMessage.prototype.scanLengths = $util.emptyArray; - ImageMessage.prototype.midQualityFileSha256 = $util.newBuffer([]); - ImageMessage.prototype.midQualityFileEncSha256 = $util.newBuffer([]); - ImageMessage.prototype.viewOnce = false; - ImageMessage.prototype.thumbnailDirectPath = ""; - ImageMessage.prototype.thumbnailSha256 = $util.newBuffer([]); - ImageMessage.prototype.thumbnailEncSha256 = $util.newBuffer([]); - ImageMessage.prototype.staticUrl = ""; + ImageMessage.prototype.midQualityFileSha256 = null; + ImageMessage.prototype.midQualityFileEncSha256 = null; + ImageMessage.prototype.viewOnce = null; + ImageMessage.prototype.thumbnailDirectPath = null; + ImageMessage.prototype.thumbnailSha256 = null; + ImageMessage.prototype.thumbnailEncSha256 = null; + ImageMessage.prototype.staticUrl = null; ImageMessage.prototype.annotations = $util.emptyArray; - ImageMessage.prototype.imageSourceType = 0; - ImageMessage.prototype.accessibilityLabel = ""; - ImageMessage.prototype.qrUrl = ""; + ImageMessage.prototype.imageSourceType = null; + ImageMessage.prototype.accessibilityLabel = null; + ImageMessage.prototype.qrUrl = null; + + let $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) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ImageMessage.prototype, "_qrUrl", { + get: $util.oneOfGetter($oneOfFields = ["qrUrl"]), + set: $util.oneOfSetter($oneOfFields) + }); ImageMessage.create = function create(properties) { return new ImageMessage(properties); @@ -41350,8 +48531,10 @@ export const proto = $root.proto = (() => { if (m.scansSidecar != null && Object.hasOwnProperty.call(m, "scansSidecar")) w.uint32(170).bytes(m.scansSidecar); if (m.scanLengths != null && m.scanLengths.length) { + w.uint32(178).fork(); for (var i = 0; i < m.scanLengths.length; ++i) - w.uint32(176).uint32(m.scanLengths[i]); + w.uint32(m.scanLengths[i]); + w.ldelim(); } if (m.midQualityFileSha256 != null && Object.hasOwnProperty.call(m, "midQualityFileSha256")) w.uint32(186).bytes(m.midQualityFileSha256); @@ -41720,132 +48903,53 @@ export const proto = $root.proto = (() => { d.scanLengths = []; d.annotations = []; } - if (o.defaults) { - d.url = ""; - d.mimetype = ""; - d.caption = ""; - if (o.bytes === String) - d.fileSha256 = ""; - else { - d.fileSha256 = []; - if (o.bytes !== Array) - d.fileSha256 = $util.newBuffer(d.fileSha256); - } - if ($util.Long) { - var n = new $util.Long(0, 0, true); - d.fileLength = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.fileLength = o.longs === String ? "0" : 0; - d.height = 0; - d.width = 0; - if (o.bytes === String) - d.mediaKey = ""; - else { - d.mediaKey = []; - if (o.bytes !== Array) - d.mediaKey = $util.newBuffer(d.mediaKey); - } - if (o.bytes === String) - d.fileEncSha256 = ""; - else { - d.fileEncSha256 = []; - if (o.bytes !== Array) - d.fileEncSha256 = $util.newBuffer(d.fileEncSha256); - } - d.directPath = ""; - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.mediaKeyTimestamp = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.mediaKeyTimestamp = o.longs === String ? "0" : 0; - if (o.bytes === String) - d.jpegThumbnail = ""; - else { - d.jpegThumbnail = []; - if (o.bytes !== Array) - d.jpegThumbnail = $util.newBuffer(d.jpegThumbnail); - } - d.contextInfo = null; - if (o.bytes === String) - d.firstScanSidecar = ""; - else { - d.firstScanSidecar = []; - if (o.bytes !== Array) - d.firstScanSidecar = $util.newBuffer(d.firstScanSidecar); - } - d.firstScanLength = 0; - d.experimentGroupId = 0; - if (o.bytes === String) - d.scansSidecar = ""; - else { - d.scansSidecar = []; - if (o.bytes !== Array) - d.scansSidecar = $util.newBuffer(d.scansSidecar); - } - if (o.bytes === String) - d.midQualityFileSha256 = ""; - else { - d.midQualityFileSha256 = []; - if (o.bytes !== Array) - d.midQualityFileSha256 = $util.newBuffer(d.midQualityFileSha256); - } - if (o.bytes === String) - d.midQualityFileEncSha256 = ""; - else { - d.midQualityFileEncSha256 = []; - if (o.bytes !== Array) - d.midQualityFileEncSha256 = $util.newBuffer(d.midQualityFileEncSha256); - } - d.viewOnce = false; - d.thumbnailDirectPath = ""; - if (o.bytes === String) - d.thumbnailSha256 = ""; - else { - d.thumbnailSha256 = []; - if (o.bytes !== Array) - d.thumbnailSha256 = $util.newBuffer(d.thumbnailSha256); - } - if (o.bytes === String) - d.thumbnailEncSha256 = ""; - else { - d.thumbnailEncSha256 = []; - if (o.bytes !== Array) - d.thumbnailEncSha256 = $util.newBuffer(d.thumbnailEncSha256); - } - d.staticUrl = ""; - d.imageSourceType = o.enums === String ? "USER_IMAGE" : 0; - d.accessibilityLabel = ""; - d.qrUrl = ""; - } if (m.url != null && m.hasOwnProperty("url")) { d.url = m.url; + if (o.oneofs) + d._url = "url"; } if (m.mimetype != null && m.hasOwnProperty("mimetype")) { d.mimetype = m.mimetype; + if (o.oneofs) + d._mimetype = "mimetype"; } if (m.caption != null && m.hasOwnProperty("caption")) { d.caption = m.caption; + if (o.oneofs) + d._caption = "caption"; } if (m.fileSha256 != null && m.hasOwnProperty("fileSha256")) { d.fileSha256 = o.bytes === String ? $util.base64.encode(m.fileSha256, 0, m.fileSha256.length) : o.bytes === Array ? Array.prototype.slice.call(m.fileSha256) : m.fileSha256; + if (o.oneofs) + d._fileSha256 = "fileSha256"; } if (m.fileLength != null && m.hasOwnProperty("fileLength")) { if (typeof m.fileLength === "number") d.fileLength = o.longs === String ? String(m.fileLength) : m.fileLength; else d.fileLength = o.longs === String ? longToString(m.fileLength, true) : o.longs === Number ? longToNumber(m.fileLength, true) : m.fileLength; + if (o.oneofs) + d._fileLength = "fileLength"; } if (m.height != null && m.hasOwnProperty("height")) { d.height = m.height; + if (o.oneofs) + d._height = "height"; } if (m.width != null && m.hasOwnProperty("width")) { d.width = m.width; + if (o.oneofs) + d._width = "width"; } if (m.mediaKey != null && m.hasOwnProperty("mediaKey")) { d.mediaKey = o.bytes === String ? $util.base64.encode(m.mediaKey, 0, m.mediaKey.length) : o.bytes === Array ? Array.prototype.slice.call(m.mediaKey) : m.mediaKey; + if (o.oneofs) + d._mediaKey = "mediaKey"; } if (m.fileEncSha256 != null && m.hasOwnProperty("fileEncSha256")) { d.fileEncSha256 = o.bytes === String ? $util.base64.encode(m.fileEncSha256, 0, m.fileEncSha256.length) : o.bytes === Array ? Array.prototype.slice.call(m.fileEncSha256) : m.fileEncSha256; + if (o.oneofs) + d._fileEncSha256 = "fileEncSha256"; } if (m.interactiveAnnotations && m.interactiveAnnotations.length) { d.interactiveAnnotations = []; @@ -41855,30 +48959,46 @@ export const proto = $root.proto = (() => { } if (m.directPath != null && m.hasOwnProperty("directPath")) { d.directPath = m.directPath; + if (o.oneofs) + d._directPath = "directPath"; } if (m.mediaKeyTimestamp != null && m.hasOwnProperty("mediaKeyTimestamp")) { if (typeof m.mediaKeyTimestamp === "number") d.mediaKeyTimestamp = o.longs === String ? String(m.mediaKeyTimestamp) : m.mediaKeyTimestamp; else d.mediaKeyTimestamp = o.longs === String ? longToString(m.mediaKeyTimestamp) : o.longs === Number ? longToNumber(m.mediaKeyTimestamp) : m.mediaKeyTimestamp; + if (o.oneofs) + d._mediaKeyTimestamp = "mediaKeyTimestamp"; } if (m.jpegThumbnail != null && m.hasOwnProperty("jpegThumbnail")) { d.jpegThumbnail = o.bytes === String ? $util.base64.encode(m.jpegThumbnail, 0, m.jpegThumbnail.length) : o.bytes === Array ? Array.prototype.slice.call(m.jpegThumbnail) : m.jpegThumbnail; + if (o.oneofs) + d._jpegThumbnail = "jpegThumbnail"; } if (m.contextInfo != null && m.hasOwnProperty("contextInfo")) { d.contextInfo = $root.proto.ContextInfo.toObject(m.contextInfo, o); + if (o.oneofs) + d._contextInfo = "contextInfo"; } if (m.firstScanSidecar != null && m.hasOwnProperty("firstScanSidecar")) { d.firstScanSidecar = o.bytes === String ? $util.base64.encode(m.firstScanSidecar, 0, m.firstScanSidecar.length) : o.bytes === Array ? Array.prototype.slice.call(m.firstScanSidecar) : m.firstScanSidecar; + if (o.oneofs) + d._firstScanSidecar = "firstScanSidecar"; } if (m.firstScanLength != null && m.hasOwnProperty("firstScanLength")) { d.firstScanLength = m.firstScanLength; + if (o.oneofs) + d._firstScanLength = "firstScanLength"; } if (m.experimentGroupId != null && m.hasOwnProperty("experimentGroupId")) { d.experimentGroupId = m.experimentGroupId; + if (o.oneofs) + d._experimentGroupId = "experimentGroupId"; } if (m.scansSidecar != null && m.hasOwnProperty("scansSidecar")) { d.scansSidecar = o.bytes === String ? $util.base64.encode(m.scansSidecar, 0, m.scansSidecar.length) : o.bytes === Array ? Array.prototype.slice.call(m.scansSidecar) : m.scansSidecar; + if (o.oneofs) + d._scansSidecar = "scansSidecar"; } if (m.scanLengths && m.scanLengths.length) { d.scanLengths = []; @@ -41888,24 +49008,38 @@ export const proto = $root.proto = (() => { } if (m.midQualityFileSha256 != null && m.hasOwnProperty("midQualityFileSha256")) { d.midQualityFileSha256 = o.bytes === String ? $util.base64.encode(m.midQualityFileSha256, 0, m.midQualityFileSha256.length) : o.bytes === Array ? Array.prototype.slice.call(m.midQualityFileSha256) : m.midQualityFileSha256; + if (o.oneofs) + d._midQualityFileSha256 = "midQualityFileSha256"; } if (m.midQualityFileEncSha256 != null && m.hasOwnProperty("midQualityFileEncSha256")) { d.midQualityFileEncSha256 = o.bytes === String ? $util.base64.encode(m.midQualityFileEncSha256, 0, m.midQualityFileEncSha256.length) : o.bytes === Array ? Array.prototype.slice.call(m.midQualityFileEncSha256) : m.midQualityFileEncSha256; + if (o.oneofs) + d._midQualityFileEncSha256 = "midQualityFileEncSha256"; } if (m.viewOnce != null && m.hasOwnProperty("viewOnce")) { d.viewOnce = m.viewOnce; + if (o.oneofs) + d._viewOnce = "viewOnce"; } if (m.thumbnailDirectPath != null && m.hasOwnProperty("thumbnailDirectPath")) { d.thumbnailDirectPath = m.thumbnailDirectPath; + if (o.oneofs) + d._thumbnailDirectPath = "thumbnailDirectPath"; } if (m.thumbnailSha256 != null && m.hasOwnProperty("thumbnailSha256")) { d.thumbnailSha256 = o.bytes === String ? $util.base64.encode(m.thumbnailSha256, 0, m.thumbnailSha256.length) : o.bytes === Array ? Array.prototype.slice.call(m.thumbnailSha256) : m.thumbnailSha256; + if (o.oneofs) + d._thumbnailSha256 = "thumbnailSha256"; } if (m.thumbnailEncSha256 != null && m.hasOwnProperty("thumbnailEncSha256")) { d.thumbnailEncSha256 = o.bytes === String ? $util.base64.encode(m.thumbnailEncSha256, 0, m.thumbnailEncSha256.length) : o.bytes === Array ? Array.prototype.slice.call(m.thumbnailEncSha256) : m.thumbnailEncSha256; + if (o.oneofs) + d._thumbnailEncSha256 = "thumbnailEncSha256"; } if (m.staticUrl != null && m.hasOwnProperty("staticUrl")) { d.staticUrl = m.staticUrl; + if (o.oneofs) + d._staticUrl = "staticUrl"; } if (m.annotations && m.annotations.length) { d.annotations = []; @@ -41915,12 +49049,18 @@ export const proto = $root.proto = (() => { } if (m.imageSourceType != null && m.hasOwnProperty("imageSourceType")) { d.imageSourceType = o.enums === String ? $root.proto.Message.ImageMessage.ImageSourceType[m.imageSourceType] === undefined ? m.imageSourceType : $root.proto.Message.ImageMessage.ImageSourceType[m.imageSourceType] : m.imageSourceType; + if (o.oneofs) + d._imageSourceType = "imageSourceType"; } if (m.accessibilityLabel != null && m.hasOwnProperty("accessibilityLabel")) { d.accessibilityLabel = m.accessibilityLabel; + if (o.oneofs) + d._accessibilityLabel = "accessibilityLabel"; } if (m.qrUrl != null && m.hasOwnProperty("qrUrl")) { d.qrUrl = m.qrUrl; + if (o.oneofs) + d._qrUrl = "qrUrl"; } return d; }; @@ -41957,7 +49097,15 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - InitialSecurityNotificationSettingSync.prototype.securityNotificationEnabled = false; + InitialSecurityNotificationSettingSync.prototype.securityNotificationEnabled = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(InitialSecurityNotificationSettingSync.prototype, "_securityNotificationEnabled", { + get: $util.oneOfGetter($oneOfFields = ["securityNotificationEnabled"]), + set: $util.oneOfSetter($oneOfFields) + }); InitialSecurityNotificationSettingSync.create = function create(properties) { return new InitialSecurityNotificationSettingSync(properties); @@ -42006,11 +49154,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.securityNotificationEnabled = false; - } if (m.securityNotificationEnabled != null && m.hasOwnProperty("securityNotificationEnabled")) { d.securityNotificationEnabled = m.securityNotificationEnabled; + if (o.oneofs) + d._securityNotificationEnabled = "securityNotificationEnabled"; } return d; }; @@ -42051,6 +49198,42 @@ export const proto = $root.proto = (() => { let $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, "_bloksWidget", { + get: $util.oneOfGetter($oneOfFields = ["bloksWidget"]), + 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) + }); + Object.defineProperty(InteractiveMessage.prototype, "interactiveMessage", { get: $util.oneOfGetter($oneOfFields = ["shopStorefrontMessage", "collectionMessage", "nativeFlowMessage", "carouselMessage"]), set: $util.oneOfSetter($oneOfFields) @@ -42204,22 +49387,20 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.header = null; - d.body = null; - d.footer = null; - d.bloksWidget = null; - d.contextInfo = null; - d.urlTrackingMap = null; - } if (m.header != null && m.hasOwnProperty("header")) { d.header = $root.proto.Message.InteractiveMessage.Header.toObject(m.header, o); + if (o.oneofs) + d._header = "header"; } if (m.body != null && m.hasOwnProperty("body")) { d.body = $root.proto.Message.InteractiveMessage.Body.toObject(m.body, o); + if (o.oneofs) + d._body = "body"; } if (m.footer != null && m.hasOwnProperty("footer")) { d.footer = $root.proto.Message.InteractiveMessage.Footer.toObject(m.footer, o); + if (o.oneofs) + d._footer = "footer"; } if (m.shopStorefrontMessage != null && m.hasOwnProperty("shopStorefrontMessage")) { d.shopStorefrontMessage = $root.proto.Message.InteractiveMessage.ShopMessage.toObject(m.shopStorefrontMessage, o); @@ -42243,12 +49424,18 @@ export const proto = $root.proto = (() => { } if (m.bloksWidget != null && m.hasOwnProperty("bloksWidget")) { d.bloksWidget = $root.proto.Message.InteractiveMessage.BloksWidget.toObject(m.bloksWidget, o); + if (o.oneofs) + d._bloksWidget = "bloksWidget"; } if (m.contextInfo != null && m.hasOwnProperty("contextInfo")) { d.contextInfo = $root.proto.ContextInfo.toObject(m.contextInfo, o); + if (o.oneofs) + d._contextInfo = "contextInfo"; } if (m.urlTrackingMap != null && m.hasOwnProperty("urlTrackingMap")) { d.urlTrackingMap = $root.proto.UrlTrackingMap.toObject(m.urlTrackingMap, o); + if (o.oneofs) + d._urlTrackingMap = "urlTrackingMap"; } return d; }; @@ -42273,9 +49460,29 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - BloksWidget.prototype.uuid = ""; - BloksWidget.prototype.data = ""; - BloksWidget.prototype.type = ""; + BloksWidget.prototype.uuid = null; + BloksWidget.prototype.data = null; + BloksWidget.prototype.type = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BloksWidget.prototype, "_uuid", { + get: $util.oneOfGetter($oneOfFields = ["uuid"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BloksWidget.prototype, "_data", { + get: $util.oneOfGetter($oneOfFields = ["data"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BloksWidget.prototype, "_type", { + get: $util.oneOfGetter($oneOfFields = ["type"]), + set: $util.oneOfSetter($oneOfFields) + }); BloksWidget.create = function create(properties) { return new BloksWidget(properties); @@ -42342,19 +49549,20 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.uuid = ""; - d.data = ""; - d.type = ""; - } if (m.uuid != null && m.hasOwnProperty("uuid")) { d.uuid = m.uuid; + if (o.oneofs) + d._uuid = "uuid"; } if (m.data != null && m.hasOwnProperty("data")) { d.data = m.data; + if (o.oneofs) + d._data = "data"; } if (m.type != null && m.hasOwnProperty("type")) { d.type = m.type; + if (o.oneofs) + d._type = "type"; } return d; }; @@ -42382,7 +49590,15 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - Body.prototype.text = ""; + Body.prototype.text = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Body.prototype, "_text", { + get: $util.oneOfGetter($oneOfFields = ["text"]), + set: $util.oneOfSetter($oneOfFields) + }); Body.create = function create(properties) { return new Body(properties); @@ -42431,11 +49647,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.text = ""; - } if (m.text != null && m.hasOwnProperty("text")) { d.text = m.text; + if (o.oneofs) + d._text = "text"; } return d; }; @@ -42465,8 +49680,22 @@ export const proto = $root.proto = (() => { } CarouselMessage.prototype.cards = $util.emptyArray; - CarouselMessage.prototype.messageVersion = 0; - CarouselMessage.prototype.carouselCardType = 0; + CarouselMessage.prototype.messageVersion = null; + CarouselMessage.prototype.carouselCardType = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CarouselMessage.prototype, "_messageVersion", { + get: $util.oneOfGetter($oneOfFields = ["messageVersion"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CarouselMessage.prototype, "_carouselCardType", { + get: $util.oneOfGetter($oneOfFields = ["carouselCardType"]), + set: $util.oneOfSetter($oneOfFields) + }); CarouselMessage.create = function create(properties) { return new CarouselMessage(properties); @@ -42564,10 +49793,6 @@ export const proto = $root.proto = (() => { if (o.arrays || o.defaults) { d.cards = []; } - if (o.defaults) { - d.messageVersion = 0; - d.carouselCardType = o.enums === String ? "UNKNOWN" : 0; - } if (m.cards && m.cards.length) { d.cards = []; for (var j = 0; j < m.cards.length; ++j) { @@ -42576,9 +49801,13 @@ export const proto = $root.proto = (() => { } if (m.messageVersion != null && m.hasOwnProperty("messageVersion")) { d.messageVersion = m.messageVersion; + if (o.oneofs) + d._messageVersion = "messageVersion"; } if (m.carouselCardType != null && m.hasOwnProperty("carouselCardType")) { d.carouselCardType = o.enums === String ? $root.proto.Message.InteractiveMessage.CarouselMessage.CarouselCardType[m.carouselCardType] === undefined ? m.carouselCardType : $root.proto.Message.InteractiveMessage.CarouselMessage.CarouselCardType[m.carouselCardType] : m.carouselCardType; + if (o.oneofs) + d._carouselCardType = "carouselCardType"; } return d; }; @@ -42614,9 +49843,29 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - CollectionMessage.prototype.bizJid = ""; - CollectionMessage.prototype.id = ""; - CollectionMessage.prototype.messageVersion = 0; + CollectionMessage.prototype.bizJid = null; + CollectionMessage.prototype.id = null; + CollectionMessage.prototype.messageVersion = null; + + let $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) + }); CollectionMessage.create = function create(properties) { return new CollectionMessage(properties); @@ -42683,19 +49932,20 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.bizJid = ""; - d.id = ""; - d.messageVersion = 0; - } if (m.bizJid != null && m.hasOwnProperty("bizJid")) { d.bizJid = m.bizJid; + if (o.oneofs) + d._bizJid = "bizJid"; } if (m.id != null && m.hasOwnProperty("id")) { d.id = m.id; + if (o.oneofs) + d._id = "id"; } if (m.messageVersion != null && m.hasOwnProperty("messageVersion")) { d.messageVersion = m.messageVersion; + if (o.oneofs) + d._messageVersion = "messageVersion"; } return d; }; @@ -42723,12 +49973,24 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - Footer.prototype.text = ""; - Footer.prototype.hasMediaAttachment = false; + Footer.prototype.text = null; + Footer.prototype.hasMediaAttachment = null; Footer.prototype.audioMessage = null; let $oneOfFields; + // Virtual OneOf for proto3 optional field + Object.defineProperty(Footer.prototype, "_text", { + get: $util.oneOfGetter($oneOfFields = ["text"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Footer.prototype, "_hasMediaAttachment", { + get: $util.oneOfGetter($oneOfFields = ["hasMediaAttachment"]), + set: $util.oneOfSetter($oneOfFields) + }); + Object.defineProperty(Footer.prototype, "media", { get: $util.oneOfGetter($oneOfFields = ["audioMessage"]), set: $util.oneOfSetter($oneOfFields) @@ -42801,12 +50063,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.text = ""; - d.hasMediaAttachment = false; - } if (m.text != null && m.hasOwnProperty("text")) { d.text = m.text; + if (o.oneofs) + d._text = "text"; } if (m.audioMessage != null && m.hasOwnProperty("audioMessage")) { d.audioMessage = $root.proto.Message.AudioMessage.toObject(m.audioMessage, o); @@ -42815,6 +50075,8 @@ export const proto = $root.proto = (() => { } if (m.hasMediaAttachment != null && m.hasOwnProperty("hasMediaAttachment")) { d.hasMediaAttachment = m.hasMediaAttachment; + if (o.oneofs) + d._hasMediaAttachment = "hasMediaAttachment"; } return d; }; @@ -42842,9 +50104,9 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - Header.prototype.title = ""; - Header.prototype.subtitle = ""; - Header.prototype.hasMediaAttachment = false; + Header.prototype.title = null; + Header.prototype.subtitle = null; + Header.prototype.hasMediaAttachment = null; Header.prototype.bloksWidget = null; Header.prototype.documentMessage = null; Header.prototype.imageMessage = null; @@ -42855,6 +50117,30 @@ export const proto = $root.proto = (() => { let $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) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Header.prototype, "_bloksWidget", { + get: $util.oneOfGetter($oneOfFields = ["bloksWidget"]), + set: $util.oneOfSetter($oneOfFields) + }); + Object.defineProperty(Header.prototype, "media", { get: $util.oneOfGetter($oneOfFields = ["documentMessage", "imageMessage", "jpegThumbnail", "videoMessage", "locationMessage", "productMessage"]), set: $util.oneOfSetter($oneOfFields) @@ -43003,17 +50289,15 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.title = ""; - d.subtitle = ""; - d.hasMediaAttachment = false; - d.bloksWidget = null; - } if (m.title != null && m.hasOwnProperty("title")) { d.title = m.title; + if (o.oneofs) + d._title = "title"; } if (m.subtitle != null && m.hasOwnProperty("subtitle")) { d.subtitle = m.subtitle; + if (o.oneofs) + d._subtitle = "subtitle"; } if (m.documentMessage != null && m.hasOwnProperty("documentMessage")) { d.documentMessage = $root.proto.Message.DocumentMessage.toObject(m.documentMessage, o); @@ -43027,6 +50311,8 @@ export const proto = $root.proto = (() => { } if (m.hasMediaAttachment != null && m.hasOwnProperty("hasMediaAttachment")) { d.hasMediaAttachment = m.hasMediaAttachment; + if (o.oneofs) + d._hasMediaAttachment = "hasMediaAttachment"; } if (m.jpegThumbnail != null && m.hasOwnProperty("jpegThumbnail")) { d.jpegThumbnail = o.bytes === String ? $util.base64.encode(m.jpegThumbnail, 0, m.jpegThumbnail.length) : o.bytes === Array ? Array.prototype.slice.call(m.jpegThumbnail) : m.jpegThumbnail; @@ -43050,6 +50336,8 @@ export const proto = $root.proto = (() => { } if (m.bloksWidget != null && m.hasOwnProperty("bloksWidget")) { d.bloksWidget = $root.proto.Message.InteractiveMessage.BloksWidget.toObject(m.bloksWidget, o); + if (o.oneofs) + d._bloksWidget = "bloksWidget"; } return d; }; @@ -43079,8 +50367,22 @@ export const proto = $root.proto = (() => { } NativeFlowMessage.prototype.buttons = $util.emptyArray; - NativeFlowMessage.prototype.messageParamsJson = ""; - NativeFlowMessage.prototype.messageVersion = 0; + NativeFlowMessage.prototype.messageParamsJson = null; + NativeFlowMessage.prototype.messageVersion = null; + + let $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) + }); NativeFlowMessage.create = function create(properties) { return new NativeFlowMessage(properties); @@ -43161,10 +50463,6 @@ export const proto = $root.proto = (() => { if (o.arrays || o.defaults) { d.buttons = []; } - if (o.defaults) { - d.messageParamsJson = ""; - d.messageVersion = 0; - } if (m.buttons && m.buttons.length) { d.buttons = []; for (var j = 0; j < m.buttons.length; ++j) { @@ -43173,9 +50471,13 @@ export const proto = $root.proto = (() => { } if (m.messageParamsJson != null && m.hasOwnProperty("messageParamsJson")) { d.messageParamsJson = m.messageParamsJson; + if (o.oneofs) + d._messageParamsJson = "messageParamsJson"; } if (m.messageVersion != null && m.hasOwnProperty("messageVersion")) { d.messageVersion = m.messageVersion; + if (o.oneofs) + d._messageVersion = "messageVersion"; } return d; }; @@ -43200,8 +50502,22 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - NativeFlowButton.prototype.name = ""; - NativeFlowButton.prototype.buttonParamsJson = ""; + NativeFlowButton.prototype.name = null; + NativeFlowButton.prototype.buttonParamsJson = null; + + let $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) + }); NativeFlowButton.create = function create(properties) { return new NativeFlowButton(properties); @@ -43259,15 +50575,15 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.name = ""; - d.buttonParamsJson = ""; - } if (m.name != null && m.hasOwnProperty("name")) { d.name = m.name; + if (o.oneofs) + d._name = "name"; } if (m.buttonParamsJson != null && m.hasOwnProperty("buttonParamsJson")) { d.buttonParamsJson = m.buttonParamsJson; + if (o.oneofs) + d._buttonParamsJson = "buttonParamsJson"; } return d; }; @@ -43298,9 +50614,29 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - ShopMessage.prototype.id = ""; - ShopMessage.prototype.surface = 0; - ShopMessage.prototype.messageVersion = 0; + ShopMessage.prototype.id = null; + ShopMessage.prototype.surface = null; + ShopMessage.prototype.messageVersion = null; + + let $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) + }); ShopMessage.create = function create(properties) { return new ShopMessage(properties); @@ -43388,19 +50724,20 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.id = ""; - d.surface = o.enums === String ? "UNKNOWN_SURFACE" : 0; - d.messageVersion = 0; - } if (m.id != null && m.hasOwnProperty("id")) { d.id = m.id; + if (o.oneofs) + d._id = "id"; } if (m.surface != null && m.hasOwnProperty("surface")) { d.surface = o.enums === String ? $root.proto.Message.InteractiveMessage.ShopMessage.Surface[m.surface] === undefined ? m.surface : $root.proto.Message.InteractiveMessage.ShopMessage.Surface[m.surface] : m.surface; + if (o.oneofs) + d._surface = "surface"; } if (m.messageVersion != null && m.hasOwnProperty("messageVersion")) { d.messageVersion = m.messageVersion; + if (o.oneofs) + d._messageVersion = "messageVersion"; } return d; }; @@ -43446,6 +50783,18 @@ export const proto = $root.proto = (() => { let $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) + }); + Object.defineProperty(InteractiveResponseMessage.prototype, "interactiveResponseMessage", { get: $util.oneOfGetter($oneOfFields = ["nativeFlowResponseMessage"]), set: $util.oneOfSetter($oneOfFields) @@ -43522,12 +50871,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.body = null; - d.contextInfo = null; - } if (m.body != null && m.hasOwnProperty("body")) { d.body = $root.proto.Message.InteractiveResponseMessage.Body.toObject(m.body, o); + if (o.oneofs) + d._body = "body"; } if (m.nativeFlowResponseMessage != null && m.hasOwnProperty("nativeFlowResponseMessage")) { d.nativeFlowResponseMessage = $root.proto.Message.InteractiveResponseMessage.NativeFlowResponseMessage.toObject(m.nativeFlowResponseMessage, o); @@ -43536,6 +50883,8 @@ export const proto = $root.proto = (() => { } if (m.contextInfo != null && m.hasOwnProperty("contextInfo")) { d.contextInfo = $root.proto.ContextInfo.toObject(m.contextInfo, o); + if (o.oneofs) + d._contextInfo = "contextInfo"; } return d; }; @@ -43560,8 +50909,22 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - Body.prototype.text = ""; - Body.prototype.format = 0; + Body.prototype.text = null; + Body.prototype.format = null; + + let $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) + }); Body.create = function create(properties) { return new Body(properties); @@ -43632,15 +50995,15 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.text = ""; - d.format = o.enums === String ? "DEFAULT" : 0; - } if (m.text != null && m.hasOwnProperty("text")) { d.text = m.text; + if (o.oneofs) + d._text = "text"; } if (m.format != null && m.hasOwnProperty("format")) { d.format = o.enums === String ? $root.proto.Message.InteractiveResponseMessage.Body.Format[m.format] === undefined ? m.format : $root.proto.Message.InteractiveResponseMessage.Body.Format[m.format] : m.format; + if (o.oneofs) + d._format = "format"; } return d; }; @@ -43675,9 +51038,29 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - NativeFlowResponseMessage.prototype.name = ""; - NativeFlowResponseMessage.prototype.paramsJson = ""; - NativeFlowResponseMessage.prototype.version = 0; + NativeFlowResponseMessage.prototype.name = null; + NativeFlowResponseMessage.prototype.paramsJson = null; + NativeFlowResponseMessage.prototype.version = null; + + let $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) + }); NativeFlowResponseMessage.create = function create(properties) { return new NativeFlowResponseMessage(properties); @@ -43744,19 +51127,20 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.name = ""; - d.paramsJson = ""; - d.version = 0; - } if (m.name != null && m.hasOwnProperty("name")) { d.name = m.name; + if (o.oneofs) + d._name = "name"; } if (m.paramsJson != null && m.hasOwnProperty("paramsJson")) { d.paramsJson = m.paramsJson; + if (o.oneofs) + d._paramsJson = "paramsJson"; } if (m.version != null && m.hasOwnProperty("version")) { d.version = m.version; + if (o.oneofs) + d._version = "version"; } return d; }; @@ -43787,16 +51171,78 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - InvoiceMessage.prototype.note = ""; - InvoiceMessage.prototype.token = ""; - InvoiceMessage.prototype.attachmentType = 0; - InvoiceMessage.prototype.attachmentMimetype = ""; - InvoiceMessage.prototype.attachmentMediaKey = $util.newBuffer([]); - InvoiceMessage.prototype.attachmentMediaKeyTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - InvoiceMessage.prototype.attachmentFileSha256 = $util.newBuffer([]); - InvoiceMessage.prototype.attachmentFileEncSha256 = $util.newBuffer([]); - InvoiceMessage.prototype.attachmentDirectPath = ""; - InvoiceMessage.prototype.attachmentJpegThumbnail = $util.newBuffer([]); + InvoiceMessage.prototype.note = null; + InvoiceMessage.prototype.token = null; + InvoiceMessage.prototype.attachmentType = null; + InvoiceMessage.prototype.attachmentMimetype = null; + InvoiceMessage.prototype.attachmentMediaKey = null; + InvoiceMessage.prototype.attachmentMediaKeyTimestamp = null; + InvoiceMessage.prototype.attachmentFileSha256 = null; + InvoiceMessage.prototype.attachmentFileEncSha256 = null; + InvoiceMessage.prototype.attachmentDirectPath = null; + InvoiceMessage.prototype.attachmentJpegThumbnail = null; + + let $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) + }); InvoiceMessage.create = function create(properties) { return new InvoiceMessage(properties); @@ -43958,78 +51404,58 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.note = ""; - d.token = ""; - d.attachmentType = o.enums === String ? "IMAGE" : 0; - d.attachmentMimetype = ""; - if (o.bytes === String) - d.attachmentMediaKey = ""; - else { - d.attachmentMediaKey = []; - if (o.bytes !== Array) - d.attachmentMediaKey = $util.newBuffer(d.attachmentMediaKey); - } - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.attachmentMediaKeyTimestamp = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.attachmentMediaKeyTimestamp = o.longs === String ? "0" : 0; - if (o.bytes === String) - d.attachmentFileSha256 = ""; - else { - d.attachmentFileSha256 = []; - if (o.bytes !== Array) - d.attachmentFileSha256 = $util.newBuffer(d.attachmentFileSha256); - } - if (o.bytes === String) - d.attachmentFileEncSha256 = ""; - else { - d.attachmentFileEncSha256 = []; - if (o.bytes !== Array) - d.attachmentFileEncSha256 = $util.newBuffer(d.attachmentFileEncSha256); - } - d.attachmentDirectPath = ""; - if (o.bytes === String) - d.attachmentJpegThumbnail = ""; - else { - d.attachmentJpegThumbnail = []; - if (o.bytes !== Array) - d.attachmentJpegThumbnail = $util.newBuffer(d.attachmentJpegThumbnail); - } - } if (m.note != null && m.hasOwnProperty("note")) { d.note = m.note; + if (o.oneofs) + d._note = "note"; } if (m.token != null && m.hasOwnProperty("token")) { d.token = m.token; + if (o.oneofs) + d._token = "token"; } if (m.attachmentType != null && m.hasOwnProperty("attachmentType")) { d.attachmentType = o.enums === String ? $root.proto.Message.InvoiceMessage.AttachmentType[m.attachmentType] === undefined ? m.attachmentType : $root.proto.Message.InvoiceMessage.AttachmentType[m.attachmentType] : m.attachmentType; + if (o.oneofs) + d._attachmentType = "attachmentType"; } if (m.attachmentMimetype != null && m.hasOwnProperty("attachmentMimetype")) { d.attachmentMimetype = m.attachmentMimetype; + if (o.oneofs) + d._attachmentMimetype = "attachmentMimetype"; } if (m.attachmentMediaKey != null && m.hasOwnProperty("attachmentMediaKey")) { d.attachmentMediaKey = o.bytes === String ? $util.base64.encode(m.attachmentMediaKey, 0, m.attachmentMediaKey.length) : o.bytes === Array ? Array.prototype.slice.call(m.attachmentMediaKey) : m.attachmentMediaKey; + if (o.oneofs) + d._attachmentMediaKey = "attachmentMediaKey"; } if (m.attachmentMediaKeyTimestamp != null && m.hasOwnProperty("attachmentMediaKeyTimestamp")) { if (typeof m.attachmentMediaKeyTimestamp === "number") d.attachmentMediaKeyTimestamp = o.longs === String ? String(m.attachmentMediaKeyTimestamp) : m.attachmentMediaKeyTimestamp; else d.attachmentMediaKeyTimestamp = o.longs === String ? longToString(m.attachmentMediaKeyTimestamp) : o.longs === Number ? longToNumber(m.attachmentMediaKeyTimestamp) : m.attachmentMediaKeyTimestamp; + if (o.oneofs) + d._attachmentMediaKeyTimestamp = "attachmentMediaKeyTimestamp"; } if (m.attachmentFileSha256 != null && m.hasOwnProperty("attachmentFileSha256")) { d.attachmentFileSha256 = o.bytes === String ? $util.base64.encode(m.attachmentFileSha256, 0, m.attachmentFileSha256.length) : o.bytes === Array ? Array.prototype.slice.call(m.attachmentFileSha256) : m.attachmentFileSha256; + if (o.oneofs) + d._attachmentFileSha256 = "attachmentFileSha256"; } if (m.attachmentFileEncSha256 != null && m.hasOwnProperty("attachmentFileEncSha256")) { d.attachmentFileEncSha256 = o.bytes === String ? $util.base64.encode(m.attachmentFileEncSha256, 0, m.attachmentFileEncSha256.length) : o.bytes === Array ? Array.prototype.slice.call(m.attachmentFileEncSha256) : m.attachmentFileEncSha256; + if (o.oneofs) + d._attachmentFileEncSha256 = "attachmentFileEncSha256"; } if (m.attachmentDirectPath != null && m.hasOwnProperty("attachmentDirectPath")) { d.attachmentDirectPath = m.attachmentDirectPath; + if (o.oneofs) + d._attachmentDirectPath = "attachmentDirectPath"; } if (m.attachmentJpegThumbnail != null && m.hasOwnProperty("attachmentJpegThumbnail")) { d.attachmentJpegThumbnail = o.bytes === String ? $util.base64.encode(m.attachmentJpegThumbnail, 0, m.attachmentJpegThumbnail.length) : o.bytes === Array ? Array.prototype.slice.call(m.attachmentJpegThumbnail) : m.attachmentJpegThumbnail; + if (o.oneofs) + d._attachmentJpegThumbnail = "attachmentJpegThumbnail"; } return d; }; @@ -44065,8 +51491,28 @@ export const proto = $root.proto = (() => { } KeepInChatMessage.prototype.key = null; - KeepInChatMessage.prototype.keepType = 0; - KeepInChatMessage.prototype.timestampMs = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + KeepInChatMessage.prototype.keepType = null; + KeepInChatMessage.prototype.timestampMs = null; + + let $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) + }); KeepInChatMessage.create = function create(properties) { return new KeepInChatMessage(properties); @@ -44159,26 +51605,23 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.key = null; - d.keepType = o.enums === String ? "UNKNOWN" : 0; - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.timestampMs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.timestampMs = o.longs === String ? "0" : 0; - } if (m.key != null && m.hasOwnProperty("key")) { d.key = $root.proto.MessageKey.toObject(m.key, o); + if (o.oneofs) + d._key = "key"; } if (m.keepType != null && m.hasOwnProperty("keepType")) { d.keepType = o.enums === String ? $root.proto.KeepType[m.keepType] === undefined ? m.keepType : $root.proto.KeepType[m.keepType] : m.keepType; + if (o.oneofs) + d._keepType = "keepType"; } if (m.timestampMs != null && m.hasOwnProperty("timestampMs")) { if (typeof m.timestampMs === "number") d.timestampMs = o.longs === String ? String(m.timestampMs) : m.timestampMs; else d.timestampMs = o.longs === String ? longToString(m.timestampMs) : o.longs === Number ? longToNumber(m.timestampMs) : m.timestampMs; + if (o.oneofs) + d._timestampMs = "timestampMs"; } return d; }; @@ -44208,13 +51651,69 @@ export const proto = $root.proto = (() => { LinkPreviewMetadata.prototype.paymentLinkMetadata = null; LinkPreviewMetadata.prototype.urlMetadata = null; - LinkPreviewMetadata.prototype.fbExperimentId = 0; - LinkPreviewMetadata.prototype.linkMediaDuration = 0; - LinkPreviewMetadata.prototype.socialMediaPostType = 0; - LinkPreviewMetadata.prototype.linkInlineVideoMuted = false; - LinkPreviewMetadata.prototype.videoContentUrl = ""; + LinkPreviewMetadata.prototype.fbExperimentId = null; + LinkPreviewMetadata.prototype.linkMediaDuration = null; + LinkPreviewMetadata.prototype.socialMediaPostType = null; + LinkPreviewMetadata.prototype.linkInlineVideoMuted = null; + LinkPreviewMetadata.prototype.videoContentUrl = null; LinkPreviewMetadata.prototype.musicMetadata = null; - LinkPreviewMetadata.prototype.videoContentCaption = ""; + LinkPreviewMetadata.prototype.videoContentCaption = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(LinkPreviewMetadata.prototype, "_paymentLinkMetadata", { + get: $util.oneOfGetter($oneOfFields = ["paymentLinkMetadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(LinkPreviewMetadata.prototype, "_urlMetadata", { + get: $util.oneOfGetter($oneOfFields = ["urlMetadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(LinkPreviewMetadata.prototype, "_fbExperimentId", { + get: $util.oneOfGetter($oneOfFields = ["fbExperimentId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(LinkPreviewMetadata.prototype, "_linkMediaDuration", { + get: $util.oneOfGetter($oneOfFields = ["linkMediaDuration"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(LinkPreviewMetadata.prototype, "_socialMediaPostType", { + get: $util.oneOfGetter($oneOfFields = ["socialMediaPostType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(LinkPreviewMetadata.prototype, "_linkInlineVideoMuted", { + get: $util.oneOfGetter($oneOfFields = ["linkInlineVideoMuted"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(LinkPreviewMetadata.prototype, "_videoContentUrl", { + get: $util.oneOfGetter($oneOfFields = ["videoContentUrl"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(LinkPreviewMetadata.prototype, "_musicMetadata", { + get: $util.oneOfGetter($oneOfFields = ["musicMetadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(LinkPreviewMetadata.prototype, "_videoContentCaption", { + get: $util.oneOfGetter($oneOfFields = ["videoContentCaption"]), + set: $util.oneOfSetter($oneOfFields) + }); LinkPreviewMetadata.create = function create(properties) { return new LinkPreviewMetadata(properties); @@ -44370,43 +51869,50 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.paymentLinkMetadata = null; - d.urlMetadata = null; - d.fbExperimentId = 0; - d.linkMediaDuration = 0; - d.socialMediaPostType = o.enums === String ? "NONE" : 0; - d.linkInlineVideoMuted = false; - d.videoContentUrl = ""; - d.musicMetadata = null; - d.videoContentCaption = ""; - } if (m.paymentLinkMetadata != null && m.hasOwnProperty("paymentLinkMetadata")) { d.paymentLinkMetadata = $root.proto.Message.PaymentLinkMetadata.toObject(m.paymentLinkMetadata, o); + if (o.oneofs) + d._paymentLinkMetadata = "paymentLinkMetadata"; } if (m.urlMetadata != null && m.hasOwnProperty("urlMetadata")) { d.urlMetadata = $root.proto.Message.URLMetadata.toObject(m.urlMetadata, o); + if (o.oneofs) + d._urlMetadata = "urlMetadata"; } if (m.fbExperimentId != null && m.hasOwnProperty("fbExperimentId")) { d.fbExperimentId = m.fbExperimentId; + if (o.oneofs) + d._fbExperimentId = "fbExperimentId"; } if (m.linkMediaDuration != null && m.hasOwnProperty("linkMediaDuration")) { d.linkMediaDuration = m.linkMediaDuration; + if (o.oneofs) + d._linkMediaDuration = "linkMediaDuration"; } if (m.socialMediaPostType != null && m.hasOwnProperty("socialMediaPostType")) { d.socialMediaPostType = o.enums === String ? $root.proto.Message.LinkPreviewMetadata.SocialMediaPostType[m.socialMediaPostType] === undefined ? m.socialMediaPostType : $root.proto.Message.LinkPreviewMetadata.SocialMediaPostType[m.socialMediaPostType] : m.socialMediaPostType; + if (o.oneofs) + d._socialMediaPostType = "socialMediaPostType"; } if (m.linkInlineVideoMuted != null && m.hasOwnProperty("linkInlineVideoMuted")) { d.linkInlineVideoMuted = m.linkInlineVideoMuted; + if (o.oneofs) + d._linkInlineVideoMuted = "linkInlineVideoMuted"; } if (m.videoContentUrl != null && m.hasOwnProperty("videoContentUrl")) { d.videoContentUrl = m.videoContentUrl; + if (o.oneofs) + d._videoContentUrl = "videoContentUrl"; } if (m.musicMetadata != null && m.hasOwnProperty("musicMetadata")) { d.musicMetadata = $root.proto.EmbeddedMusic.toObject(m.musicMetadata, o); + if (o.oneofs) + d._musicMetadata = "musicMetadata"; } if (m.videoContentCaption != null && m.hasOwnProperty("videoContentCaption")) { d.videoContentCaption = m.videoContentCaption; + if (o.oneofs) + d._videoContentCaption = "videoContentCaption"; } return d; }; @@ -44446,15 +51952,59 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - ListMessage.prototype.title = ""; - ListMessage.prototype.description = ""; - ListMessage.prototype.buttonText = ""; - ListMessage.prototype.listType = 0; + ListMessage.prototype.title = null; + ListMessage.prototype.description = null; + ListMessage.prototype.buttonText = null; + ListMessage.prototype.listType = null; ListMessage.prototype.sections = $util.emptyArray; ListMessage.prototype.productListInfo = null; - ListMessage.prototype.footerText = ""; + ListMessage.prototype.footerText = null; ListMessage.prototype.contextInfo = null; + let $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) + }); + ListMessage.create = function create(properties) { return new ListMessage(properties); }; @@ -44600,26 +52150,25 @@ export const proto = $root.proto = (() => { if (o.arrays || o.defaults) { d.sections = []; } - if (o.defaults) { - d.title = ""; - d.description = ""; - d.buttonText = ""; - d.listType = o.enums === String ? "UNKNOWN" : 0; - d.productListInfo = null; - d.footerText = ""; - d.contextInfo = null; - } if (m.title != null && m.hasOwnProperty("title")) { d.title = m.title; + if (o.oneofs) + d._title = "title"; } if (m.description != null && m.hasOwnProperty("description")) { d.description = m.description; + if (o.oneofs) + d._description = "description"; } if (m.buttonText != null && m.hasOwnProperty("buttonText")) { d.buttonText = m.buttonText; + if (o.oneofs) + d._buttonText = "buttonText"; } if (m.listType != null && m.hasOwnProperty("listType")) { d.listType = o.enums === String ? $root.proto.Message.ListMessage.ListType[m.listType] === undefined ? m.listType : $root.proto.Message.ListMessage.ListType[m.listType] : m.listType; + if (o.oneofs) + d._listType = "listType"; } if (m.sections && m.sections.length) { d.sections = []; @@ -44629,12 +52178,18 @@ export const proto = $root.proto = (() => { } if (m.productListInfo != null && m.hasOwnProperty("productListInfo")) { d.productListInfo = $root.proto.Message.ListMessage.ProductListInfo.toObject(m.productListInfo, o); + if (o.oneofs) + d._productListInfo = "productListInfo"; } if (m.footerText != null && m.hasOwnProperty("footerText")) { d.footerText = m.footerText; + if (o.oneofs) + d._footerText = "footerText"; } if (m.contextInfo != null && m.hasOwnProperty("contextInfo")) { d.contextInfo = $root.proto.ContextInfo.toObject(m.contextInfo, o); + if (o.oneofs) + d._contextInfo = "contextInfo"; } return d; }; @@ -44667,7 +52222,15 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - Product.prototype.productId = ""; + Product.prototype.productId = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Product.prototype, "_productId", { + get: $util.oneOfGetter($oneOfFields = ["productId"]), + set: $util.oneOfSetter($oneOfFields) + }); Product.create = function create(properties) { return new Product(properties); @@ -44716,11 +52279,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.productId = ""; - } if (m.productId != null && m.hasOwnProperty("productId")) { d.productId = m.productId; + if (o.oneofs) + d._productId = "productId"; } return d; }; @@ -44748,8 +52310,22 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - ProductListHeaderImage.prototype.productId = ""; - ProductListHeaderImage.prototype.jpegThumbnail = $util.newBuffer([]); + ProductListHeaderImage.prototype.productId = null; + ProductListHeaderImage.prototype.jpegThumbnail = null; + + let $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) + }); ProductListHeaderImage.create = function create(properties) { return new ProductListHeaderImage(properties); @@ -44810,21 +52386,15 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.productId = ""; - if (o.bytes === String) - d.jpegThumbnail = ""; - else { - d.jpegThumbnail = []; - if (o.bytes !== Array) - d.jpegThumbnail = $util.newBuffer(d.jpegThumbnail); - } - } if (m.productId != null && m.hasOwnProperty("productId")) { d.productId = m.productId; + if (o.oneofs) + d._productId = "productId"; } if (m.jpegThumbnail != null && m.hasOwnProperty("jpegThumbnail")) { d.jpegThumbnail = o.bytes === String ? $util.base64.encode(m.jpegThumbnail, 0, m.jpegThumbnail.length) : o.bytes === Array ? Array.prototype.slice.call(m.jpegThumbnail) : m.jpegThumbnail; + if (o.oneofs) + d._jpegThumbnail = "jpegThumbnail"; } return d; }; @@ -44855,7 +52425,21 @@ export const proto = $root.proto = (() => { ProductListInfo.prototype.productSections = $util.emptyArray; ProductListInfo.prototype.headerImage = null; - ProductListInfo.prototype.businessOwnerJid = ""; + ProductListInfo.prototype.businessOwnerJid = null; + + let $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) + }); ProductListInfo.create = function create(properties) { return new ProductListInfo(properties); @@ -44938,10 +52522,6 @@ export const proto = $root.proto = (() => { if (o.arrays || o.defaults) { d.productSections = []; } - if (o.defaults) { - d.headerImage = null; - d.businessOwnerJid = ""; - } if (m.productSections && m.productSections.length) { d.productSections = []; for (var j = 0; j < m.productSections.length; ++j) { @@ -44950,9 +52530,13 @@ export const proto = $root.proto = (() => { } if (m.headerImage != null && m.hasOwnProperty("headerImage")) { d.headerImage = $root.proto.Message.ListMessage.ProductListHeaderImage.toObject(m.headerImage, o); + if (o.oneofs) + d._headerImage = "headerImage"; } if (m.businessOwnerJid != null && m.hasOwnProperty("businessOwnerJid")) { d.businessOwnerJid = m.businessOwnerJid; + if (o.oneofs) + d._businessOwnerJid = "businessOwnerJid"; } return d; }; @@ -44981,9 +52565,17 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - ProductSection.prototype.title = ""; + ProductSection.prototype.title = null; ProductSection.prototype.products = $util.emptyArray; + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ProductSection.prototype, "_title", { + get: $util.oneOfGetter($oneOfFields = ["title"]), + set: $util.oneOfSetter($oneOfFields) + }); + ProductSection.create = function create(properties) { return new ProductSection(properties); }; @@ -45054,11 +52646,10 @@ export const proto = $root.proto = (() => { if (o.arrays || o.defaults) { d.products = []; } - if (o.defaults) { - d.title = ""; - } if (m.title != null && m.hasOwnProperty("title")) { d.title = m.title; + if (o.oneofs) + d._title = "title"; } if (m.products && m.products.length) { d.products = []; @@ -45092,9 +52683,29 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - Row.prototype.title = ""; - Row.prototype.description = ""; - Row.prototype.rowId = ""; + Row.prototype.title = null; + Row.prototype.description = null; + Row.prototype.rowId = null; + + let $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) + }); Row.create = function create(properties) { return new Row(properties); @@ -45161,19 +52772,20 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.title = ""; - d.description = ""; - d.rowId = ""; - } if (m.title != null && m.hasOwnProperty("title")) { d.title = m.title; + if (o.oneofs) + d._title = "title"; } if (m.description != null && m.hasOwnProperty("description")) { d.description = m.description; + if (o.oneofs) + d._description = "description"; } if (m.rowId != null && m.hasOwnProperty("rowId")) { d.rowId = m.rowId; + if (o.oneofs) + d._rowId = "rowId"; } return d; }; @@ -45202,9 +52814,17 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - Section.prototype.title = ""; + Section.prototype.title = null; Section.prototype.rows = $util.emptyArray; + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Section.prototype, "_title", { + get: $util.oneOfGetter($oneOfFields = ["title"]), + set: $util.oneOfSetter($oneOfFields) + }); + Section.create = function create(properties) { return new Section(properties); }; @@ -45275,11 +52895,10 @@ export const proto = $root.proto = (() => { if (o.arrays || o.defaults) { d.rows = []; } - if (o.defaults) { - d.title = ""; - } if (m.title != null && m.hasOwnProperty("title")) { d.title = m.title; + if (o.oneofs) + d._title = "title"; } if (m.rows && m.rows.length) { d.rows = []; @@ -45316,11 +52935,43 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - ListResponseMessage.prototype.title = ""; - ListResponseMessage.prototype.listType = 0; + ListResponseMessage.prototype.title = null; + ListResponseMessage.prototype.listType = null; ListResponseMessage.prototype.singleSelectReply = null; ListResponseMessage.prototype.contextInfo = null; - ListResponseMessage.prototype.description = ""; + ListResponseMessage.prototype.description = null; + + let $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) + }); ListResponseMessage.create = function create(properties) { return new ListResponseMessage(properties); @@ -45422,27 +53073,30 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.title = ""; - d.listType = o.enums === String ? "UNKNOWN" : 0; - d.singleSelectReply = null; - d.contextInfo = null; - d.description = ""; - } if (m.title != null && m.hasOwnProperty("title")) { d.title = m.title; + if (o.oneofs) + d._title = "title"; } if (m.listType != null && m.hasOwnProperty("listType")) { d.listType = o.enums === String ? $root.proto.Message.ListResponseMessage.ListType[m.listType] === undefined ? m.listType : $root.proto.Message.ListResponseMessage.ListType[m.listType] : m.listType; + if (o.oneofs) + d._listType = "listType"; } if (m.singleSelectReply != null && m.hasOwnProperty("singleSelectReply")) { d.singleSelectReply = $root.proto.Message.ListResponseMessage.SingleSelectReply.toObject(m.singleSelectReply, o); + if (o.oneofs) + d._singleSelectReply = "singleSelectReply"; } if (m.contextInfo != null && m.hasOwnProperty("contextInfo")) { d.contextInfo = $root.proto.ContextInfo.toObject(m.contextInfo, o); + if (o.oneofs) + d._contextInfo = "contextInfo"; } if (m.description != null && m.hasOwnProperty("description")) { d.description = m.description; + if (o.oneofs) + d._description = "description"; } return d; }; @@ -45474,7 +53128,15 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - SingleSelectReply.prototype.selectedRowId = ""; + SingleSelectReply.prototype.selectedRowId = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SingleSelectReply.prototype, "_selectedRowId", { + get: $util.oneOfGetter($oneOfFields = ["selectedRowId"]), + set: $util.oneOfSetter($oneOfFields) + }); SingleSelectReply.create = function create(properties) { return new SingleSelectReply(properties); @@ -45523,11 +53185,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.selectedRowId = ""; - } if (m.selectedRowId != null && m.hasOwnProperty("selectedRowId")) { d.selectedRowId = m.selectedRowId; + if (o.oneofs) + d._selectedRowId = "selectedRowId"; } return d; }; @@ -45558,17 +53219,79 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - LiveLocationMessage.prototype.degreesLatitude = 0; - LiveLocationMessage.prototype.degreesLongitude = 0; - LiveLocationMessage.prototype.accuracyInMeters = 0; - LiveLocationMessage.prototype.speedInMps = 0; - LiveLocationMessage.prototype.degreesClockwiseFromMagneticNorth = 0; - LiveLocationMessage.prototype.caption = ""; - LiveLocationMessage.prototype.sequenceNumber = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - LiveLocationMessage.prototype.timeOffset = 0; - LiveLocationMessage.prototype.jpegThumbnail = $util.newBuffer([]); + LiveLocationMessage.prototype.degreesLatitude = null; + LiveLocationMessage.prototype.degreesLongitude = null; + LiveLocationMessage.prototype.accuracyInMeters = null; + LiveLocationMessage.prototype.speedInMps = null; + LiveLocationMessage.prototype.degreesClockwiseFromMagneticNorth = null; + LiveLocationMessage.prototype.caption = null; + LiveLocationMessage.prototype.sequenceNumber = null; + LiveLocationMessage.prototype.timeOffset = null; + LiveLocationMessage.prototype.jpegThumbnail = null; LiveLocationMessage.prototype.contextInfo = null; + let $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) + }); + LiveLocationMessage.create = function create(properties) { return new LiveLocationMessage(properties); }; @@ -45709,60 +53432,58 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.degreesLatitude = 0; - d.degreesLongitude = 0; - d.accuracyInMeters = 0; - d.speedInMps = 0; - d.degreesClockwiseFromMagneticNorth = 0; - d.caption = ""; - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.sequenceNumber = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.sequenceNumber = o.longs === String ? "0" : 0; - d.timeOffset = 0; - if (o.bytes === String) - d.jpegThumbnail = ""; - else { - d.jpegThumbnail = []; - if (o.bytes !== Array) - d.jpegThumbnail = $util.newBuffer(d.jpegThumbnail); - } - d.contextInfo = null; - } if (m.degreesLatitude != null && m.hasOwnProperty("degreesLatitude")) { d.degreesLatitude = o.json && !isFinite(m.degreesLatitude) ? String(m.degreesLatitude) : m.degreesLatitude; + if (o.oneofs) + d._degreesLatitude = "degreesLatitude"; } if (m.degreesLongitude != null && m.hasOwnProperty("degreesLongitude")) { d.degreesLongitude = o.json && !isFinite(m.degreesLongitude) ? String(m.degreesLongitude) : m.degreesLongitude; + if (o.oneofs) + d._degreesLongitude = "degreesLongitude"; } if (m.accuracyInMeters != null && m.hasOwnProperty("accuracyInMeters")) { d.accuracyInMeters = m.accuracyInMeters; + if (o.oneofs) + d._accuracyInMeters = "accuracyInMeters"; } if (m.speedInMps != null && m.hasOwnProperty("speedInMps")) { d.speedInMps = o.json && !isFinite(m.speedInMps) ? String(m.speedInMps) : m.speedInMps; + if (o.oneofs) + d._speedInMps = "speedInMps"; } if (m.degreesClockwiseFromMagneticNorth != null && m.hasOwnProperty("degreesClockwiseFromMagneticNorth")) { d.degreesClockwiseFromMagneticNorth = m.degreesClockwiseFromMagneticNorth; + if (o.oneofs) + d._degreesClockwiseFromMagneticNorth = "degreesClockwiseFromMagneticNorth"; } if (m.caption != null && m.hasOwnProperty("caption")) { d.caption = m.caption; + if (o.oneofs) + d._caption = "caption"; } if (m.sequenceNumber != null && m.hasOwnProperty("sequenceNumber")) { if (typeof m.sequenceNumber === "number") d.sequenceNumber = o.longs === String ? String(m.sequenceNumber) : m.sequenceNumber; else d.sequenceNumber = o.longs === String ? longToString(m.sequenceNumber) : o.longs === Number ? longToNumber(m.sequenceNumber) : m.sequenceNumber; + if (o.oneofs) + d._sequenceNumber = "sequenceNumber"; } if (m.timeOffset != null && m.hasOwnProperty("timeOffset")) { d.timeOffset = m.timeOffset; + if (o.oneofs) + d._timeOffset = "timeOffset"; } if (m.jpegThumbnail != null && m.hasOwnProperty("jpegThumbnail")) { d.jpegThumbnail = o.bytes === String ? $util.base64.encode(m.jpegThumbnail, 0, m.jpegThumbnail.length) : o.bytes === Array ? Array.prototype.slice.call(m.jpegThumbnail) : m.jpegThumbnail; + if (o.oneofs) + d._jpegThumbnail = "jpegThumbnail"; } if (m.contextInfo != null && m.hasOwnProperty("contextInfo")) { d.contextInfo = $root.proto.ContextInfo.toObject(m.contextInfo, o); + if (o.oneofs) + d._contextInfo = "contextInfo"; } return d; }; @@ -45790,19 +53511,93 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - LocationMessage.prototype.degreesLatitude = 0; - LocationMessage.prototype.degreesLongitude = 0; - LocationMessage.prototype.name = ""; - LocationMessage.prototype.address = ""; - LocationMessage.prototype.url = ""; - LocationMessage.prototype.isLive = false; - LocationMessage.prototype.accuracyInMeters = 0; - LocationMessage.prototype.speedInMps = 0; - LocationMessage.prototype.degreesClockwiseFromMagneticNorth = 0; - LocationMessage.prototype.comment = ""; - LocationMessage.prototype.jpegThumbnail = $util.newBuffer([]); + LocationMessage.prototype.degreesLatitude = null; + LocationMessage.prototype.degreesLongitude = null; + LocationMessage.prototype.name = null; + LocationMessage.prototype.address = null; + LocationMessage.prototype.url = null; + LocationMessage.prototype.isLive = null; + LocationMessage.prototype.accuracyInMeters = null; + LocationMessage.prototype.speedInMps = null; + LocationMessage.prototype.degreesClockwiseFromMagneticNorth = null; + LocationMessage.prototype.comment = null; + LocationMessage.prototype.jpegThumbnail = null; LocationMessage.prototype.contextInfo = null; + let $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) + }); + LocationMessage.create = function create(properties) { return new LocationMessage(properties); }; @@ -45954,61 +53749,65 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.degreesLatitude = 0; - d.degreesLongitude = 0; - d.name = ""; - d.address = ""; - d.url = ""; - d.isLive = false; - d.accuracyInMeters = 0; - d.speedInMps = 0; - d.degreesClockwiseFromMagneticNorth = 0; - d.comment = ""; - if (o.bytes === String) - d.jpegThumbnail = ""; - else { - d.jpegThumbnail = []; - if (o.bytes !== Array) - d.jpegThumbnail = $util.newBuffer(d.jpegThumbnail); - } - d.contextInfo = null; - } if (m.degreesLatitude != null && m.hasOwnProperty("degreesLatitude")) { d.degreesLatitude = o.json && !isFinite(m.degreesLatitude) ? String(m.degreesLatitude) : m.degreesLatitude; + if (o.oneofs) + d._degreesLatitude = "degreesLatitude"; } if (m.degreesLongitude != null && m.hasOwnProperty("degreesLongitude")) { d.degreesLongitude = o.json && !isFinite(m.degreesLongitude) ? String(m.degreesLongitude) : m.degreesLongitude; + if (o.oneofs) + d._degreesLongitude = "degreesLongitude"; } if (m.name != null && m.hasOwnProperty("name")) { d.name = m.name; + if (o.oneofs) + d._name = "name"; } if (m.address != null && m.hasOwnProperty("address")) { d.address = m.address; + if (o.oneofs) + d._address = "address"; } if (m.url != null && m.hasOwnProperty("url")) { d.url = m.url; + if (o.oneofs) + d._url = "url"; } if (m.isLive != null && m.hasOwnProperty("isLive")) { d.isLive = m.isLive; + if (o.oneofs) + d._isLive = "isLive"; } if (m.accuracyInMeters != null && m.hasOwnProperty("accuracyInMeters")) { d.accuracyInMeters = m.accuracyInMeters; + if (o.oneofs) + d._accuracyInMeters = "accuracyInMeters"; } if (m.speedInMps != null && m.hasOwnProperty("speedInMps")) { d.speedInMps = o.json && !isFinite(m.speedInMps) ? String(m.speedInMps) : m.speedInMps; + if (o.oneofs) + d._speedInMps = "speedInMps"; } if (m.degreesClockwiseFromMagneticNorth != null && m.hasOwnProperty("degreesClockwiseFromMagneticNorth")) { d.degreesClockwiseFromMagneticNorth = m.degreesClockwiseFromMagneticNorth; + if (o.oneofs) + d._degreesClockwiseFromMagneticNorth = "degreesClockwiseFromMagneticNorth"; } if (m.comment != null && m.hasOwnProperty("comment")) { d.comment = m.comment; + if (o.oneofs) + d._comment = "comment"; } if (m.jpegThumbnail != null && m.hasOwnProperty("jpegThumbnail")) { d.jpegThumbnail = o.bytes === String ? $util.base64.encode(m.jpegThumbnail, 0, m.jpegThumbnail.length) : o.bytes === Array ? Array.prototype.slice.call(m.jpegThumbnail) : m.jpegThumbnail; + if (o.oneofs) + d._jpegThumbnail = "jpegThumbnail"; } if (m.contextInfo != null && m.hasOwnProperty("contextInfo")) { d.contextInfo = $root.proto.ContextInfo.toObject(m.contextInfo, o); + if (o.oneofs) + d._contextInfo = "contextInfo"; } return d; }; @@ -46036,13 +53835,57 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - MMSThumbnailMetadata.prototype.thumbnailDirectPath = ""; - MMSThumbnailMetadata.prototype.thumbnailSha256 = $util.newBuffer([]); - MMSThumbnailMetadata.prototype.thumbnailEncSha256 = $util.newBuffer([]); - MMSThumbnailMetadata.prototype.mediaKey = $util.newBuffer([]); - MMSThumbnailMetadata.prototype.mediaKeyTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - MMSThumbnailMetadata.prototype.thumbnailHeight = 0; - MMSThumbnailMetadata.prototype.thumbnailWidth = 0; + MMSThumbnailMetadata.prototype.thumbnailDirectPath = null; + MMSThumbnailMetadata.prototype.thumbnailSha256 = null; + MMSThumbnailMetadata.prototype.thumbnailEncSha256 = null; + MMSThumbnailMetadata.prototype.mediaKey = null; + MMSThumbnailMetadata.prototype.mediaKeyTimestamp = null; + MMSThumbnailMetadata.prototype.thumbnailHeight = null; + MMSThumbnailMetadata.prototype.thumbnailWidth = null; + + let $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) + }); MMSThumbnailMetadata.create = function create(properties) { return new MMSThumbnailMetadata(properties); @@ -46161,60 +54004,43 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.thumbnailDirectPath = ""; - if (o.bytes === String) - d.thumbnailSha256 = ""; - else { - d.thumbnailSha256 = []; - if (o.bytes !== Array) - d.thumbnailSha256 = $util.newBuffer(d.thumbnailSha256); - } - if (o.bytes === String) - d.thumbnailEncSha256 = ""; - else { - d.thumbnailEncSha256 = []; - if (o.bytes !== Array) - d.thumbnailEncSha256 = $util.newBuffer(d.thumbnailEncSha256); - } - if (o.bytes === String) - d.mediaKey = ""; - else { - d.mediaKey = []; - if (o.bytes !== Array) - d.mediaKey = $util.newBuffer(d.mediaKey); - } - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.mediaKeyTimestamp = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.mediaKeyTimestamp = o.longs === String ? "0" : 0; - d.thumbnailHeight = 0; - d.thumbnailWidth = 0; - } if (m.thumbnailDirectPath != null && m.hasOwnProperty("thumbnailDirectPath")) { d.thumbnailDirectPath = m.thumbnailDirectPath; + if (o.oneofs) + d._thumbnailDirectPath = "thumbnailDirectPath"; } if (m.thumbnailSha256 != null && m.hasOwnProperty("thumbnailSha256")) { d.thumbnailSha256 = o.bytes === String ? $util.base64.encode(m.thumbnailSha256, 0, m.thumbnailSha256.length) : o.bytes === Array ? Array.prototype.slice.call(m.thumbnailSha256) : m.thumbnailSha256; + if (o.oneofs) + d._thumbnailSha256 = "thumbnailSha256"; } if (m.thumbnailEncSha256 != null && m.hasOwnProperty("thumbnailEncSha256")) { d.thumbnailEncSha256 = o.bytes === String ? $util.base64.encode(m.thumbnailEncSha256, 0, m.thumbnailEncSha256.length) : o.bytes === Array ? Array.prototype.slice.call(m.thumbnailEncSha256) : m.thumbnailEncSha256; + if (o.oneofs) + d._thumbnailEncSha256 = "thumbnailEncSha256"; } if (m.mediaKey != null && m.hasOwnProperty("mediaKey")) { d.mediaKey = o.bytes === String ? $util.base64.encode(m.mediaKey, 0, m.mediaKey.length) : o.bytes === Array ? Array.prototype.slice.call(m.mediaKey) : m.mediaKey; + if (o.oneofs) + d._mediaKey = "mediaKey"; } if (m.mediaKeyTimestamp != null && m.hasOwnProperty("mediaKeyTimestamp")) { if (typeof m.mediaKeyTimestamp === "number") d.mediaKeyTimestamp = o.longs === String ? String(m.mediaKeyTimestamp) : m.mediaKeyTimestamp; else d.mediaKeyTimestamp = o.longs === String ? longToString(m.mediaKeyTimestamp) : o.longs === Number ? longToNumber(m.mediaKeyTimestamp) : m.mediaKeyTimestamp; + if (o.oneofs) + d._mediaKeyTimestamp = "mediaKeyTimestamp"; } if (m.thumbnailHeight != null && m.hasOwnProperty("thumbnailHeight")) { d.thumbnailHeight = m.thumbnailHeight; + if (o.oneofs) + d._thumbnailHeight = "thumbnailHeight"; } if (m.thumbnailWidth != null && m.hasOwnProperty("thumbnailWidth")) { d.thumbnailWidth = m.thumbnailWidth; + if (o.oneofs) + d._thumbnailWidth = "thumbnailWidth"; } return d; }; @@ -46242,15 +54068,65 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - MessageHistoryBundle.prototype.mimetype = ""; - MessageHistoryBundle.prototype.fileSha256 = $util.newBuffer([]); - MessageHistoryBundle.prototype.mediaKey = $util.newBuffer([]); - MessageHistoryBundle.prototype.fileEncSha256 = $util.newBuffer([]); - MessageHistoryBundle.prototype.directPath = ""; - MessageHistoryBundle.prototype.mediaKeyTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + MessageHistoryBundle.prototype.mimetype = null; + MessageHistoryBundle.prototype.fileSha256 = null; + MessageHistoryBundle.prototype.mediaKey = null; + MessageHistoryBundle.prototype.fileEncSha256 = null; + MessageHistoryBundle.prototype.directPath = null; + MessageHistoryBundle.prototype.mediaKeyTimestamp = null; MessageHistoryBundle.prototype.contextInfo = null; MessageHistoryBundle.prototype.messageHistoryMetadata = null; + let $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) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MessageHistoryBundle.prototype, "_messageHistoryMetadata", { + get: $util.oneOfGetter($oneOfFields = ["messageHistoryMetadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + MessageHistoryBundle.create = function create(properties) { return new MessageHistoryBundle(properties); }; @@ -46381,64 +54257,48 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.mimetype = ""; - if (o.bytes === String) - d.fileSha256 = ""; - else { - d.fileSha256 = []; - if (o.bytes !== Array) - d.fileSha256 = $util.newBuffer(d.fileSha256); - } - if (o.bytes === String) - d.mediaKey = ""; - else { - d.mediaKey = []; - if (o.bytes !== Array) - d.mediaKey = $util.newBuffer(d.mediaKey); - } - if (o.bytes === String) - d.fileEncSha256 = ""; - else { - d.fileEncSha256 = []; - if (o.bytes !== Array) - d.fileEncSha256 = $util.newBuffer(d.fileEncSha256); - } - d.directPath = ""; - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.mediaKeyTimestamp = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.mediaKeyTimestamp = o.longs === String ? "0" : 0; - d.contextInfo = null; - d.messageHistoryMetadata = null; - } if (m.mimetype != null && m.hasOwnProperty("mimetype")) { d.mimetype = m.mimetype; + if (o.oneofs) + d._mimetype = "mimetype"; } if (m.fileSha256 != null && m.hasOwnProperty("fileSha256")) { d.fileSha256 = o.bytes === String ? $util.base64.encode(m.fileSha256, 0, m.fileSha256.length) : o.bytes === Array ? Array.prototype.slice.call(m.fileSha256) : m.fileSha256; + if (o.oneofs) + d._fileSha256 = "fileSha256"; } if (m.mediaKey != null && m.hasOwnProperty("mediaKey")) { d.mediaKey = o.bytes === String ? $util.base64.encode(m.mediaKey, 0, m.mediaKey.length) : o.bytes === Array ? Array.prototype.slice.call(m.mediaKey) : m.mediaKey; + if (o.oneofs) + d._mediaKey = "mediaKey"; } if (m.fileEncSha256 != null && m.hasOwnProperty("fileEncSha256")) { d.fileEncSha256 = o.bytes === String ? $util.base64.encode(m.fileEncSha256, 0, m.fileEncSha256.length) : o.bytes === Array ? Array.prototype.slice.call(m.fileEncSha256) : m.fileEncSha256; + if (o.oneofs) + d._fileEncSha256 = "fileEncSha256"; } if (m.directPath != null && m.hasOwnProperty("directPath")) { d.directPath = m.directPath; + if (o.oneofs) + d._directPath = "directPath"; } if (m.mediaKeyTimestamp != null && m.hasOwnProperty("mediaKeyTimestamp")) { if (typeof m.mediaKeyTimestamp === "number") d.mediaKeyTimestamp = o.longs === String ? String(m.mediaKeyTimestamp) : m.mediaKeyTimestamp; else d.mediaKeyTimestamp = o.longs === String ? longToString(m.mediaKeyTimestamp) : o.longs === Number ? longToNumber(m.mediaKeyTimestamp) : m.mediaKeyTimestamp; + if (o.oneofs) + d._mediaKeyTimestamp = "mediaKeyTimestamp"; } if (m.contextInfo != null && m.hasOwnProperty("contextInfo")) { d.contextInfo = $root.proto.ContextInfo.toObject(m.contextInfo, o); + if (o.oneofs) + d._contextInfo = "contextInfo"; } if (m.messageHistoryMetadata != null && m.hasOwnProperty("messageHistoryMetadata")) { d.messageHistoryMetadata = $root.proto.Message.MessageHistoryMetadata.toObject(m.messageHistoryMetadata, o); + if (o.oneofs) + d._messageHistoryMetadata = "messageHistoryMetadata"; } return d; }; @@ -46469,10 +54329,24 @@ export const proto = $root.proto = (() => { } MessageHistoryMetadata.prototype.historyReceivers = $util.emptyArray; - MessageHistoryMetadata.prototype.oldestMessageTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - MessageHistoryMetadata.prototype.messageCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + MessageHistoryMetadata.prototype.oldestMessageTimestamp = null; + MessageHistoryMetadata.prototype.messageCount = null; MessageHistoryMetadata.prototype.nonHistoryReceivers = $util.emptyArray; + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MessageHistoryMetadata.prototype, "_oldestMessageTimestamp", { + get: $util.oneOfGetter($oneOfFields = ["oldestMessageTimestamp"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MessageHistoryMetadata.prototype, "_messageCount", { + get: $util.oneOfGetter($oneOfFields = ["messageCount"]), + set: $util.oneOfSetter($oneOfFields) + }); + MessageHistoryMetadata.create = function create(properties) { return new MessageHistoryMetadata(properties); }; @@ -46583,18 +54457,6 @@ export const proto = $root.proto = (() => { d.historyReceivers = []; d.nonHistoryReceivers = []; } - if (o.defaults) { - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.oldestMessageTimestamp = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.oldestMessageTimestamp = o.longs === String ? "0" : 0; - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.messageCount = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.messageCount = o.longs === String ? "0" : 0; - } if (m.historyReceivers && m.historyReceivers.length) { d.historyReceivers = []; for (var j = 0; j < m.historyReceivers.length; ++j) { @@ -46606,12 +54468,16 @@ export const proto = $root.proto = (() => { d.oldestMessageTimestamp = o.longs === String ? String(m.oldestMessageTimestamp) : m.oldestMessageTimestamp; else d.oldestMessageTimestamp = o.longs === String ? longToString(m.oldestMessageTimestamp) : o.longs === Number ? longToNumber(m.oldestMessageTimestamp) : m.oldestMessageTimestamp; + if (o.oneofs) + d._oldestMessageTimestamp = "oldestMessageTimestamp"; } if (m.messageCount != null && m.hasOwnProperty("messageCount")) { if (typeof m.messageCount === "number") d.messageCount = o.longs === String ? String(m.messageCount) : m.messageCount; else d.messageCount = o.longs === String ? longToString(m.messageCount) : o.longs === Number ? longToNumber(m.messageCount) : m.messageCount; + if (o.oneofs) + d._messageCount = "messageCount"; } if (m.nonHistoryReceivers && m.nonHistoryReceivers.length) { d.nonHistoryReceivers = []; @@ -46648,6 +54514,20 @@ export const proto = $root.proto = (() => { MessageHistoryNotice.prototype.contextInfo = null; MessageHistoryNotice.prototype.messageHistoryMetadata = null; + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MessageHistoryNotice.prototype, "_contextInfo", { + get: $util.oneOfGetter($oneOfFields = ["contextInfo"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MessageHistoryNotice.prototype, "_messageHistoryMetadata", { + get: $util.oneOfGetter($oneOfFields = ["messageHistoryMetadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + MessageHistoryNotice.create = function create(properties) { return new MessageHistoryNotice(properties); }; @@ -46708,15 +54588,15 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.contextInfo = null; - d.messageHistoryMetadata = null; - } if (m.contextInfo != null && m.hasOwnProperty("contextInfo")) { d.contextInfo = $root.proto.ContextInfo.toObject(m.contextInfo, o); + if (o.oneofs) + d._contextInfo = "contextInfo"; } if (m.messageHistoryMetadata != null && m.hasOwnProperty("messageHistoryMetadata")) { d.messageHistoryMetadata = $root.proto.Message.MessageHistoryMetadata.toObject(m.messageHistoryMetadata, o); + if (o.oneofs) + d._messageHistoryMetadata = "messageHistoryMetadata"; } return d; }; @@ -46744,13 +54624,51 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - NewsletterAdminInviteMessage.prototype.newsletterJid = ""; - NewsletterAdminInviteMessage.prototype.newsletterName = ""; - NewsletterAdminInviteMessage.prototype.jpegThumbnail = $util.newBuffer([]); - NewsletterAdminInviteMessage.prototype.caption = ""; - NewsletterAdminInviteMessage.prototype.inviteExpiration = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + NewsletterAdminInviteMessage.prototype.newsletterJid = null; + NewsletterAdminInviteMessage.prototype.newsletterName = null; + NewsletterAdminInviteMessage.prototype.jpegThumbnail = null; + NewsletterAdminInviteMessage.prototype.caption = null; + NewsletterAdminInviteMessage.prototype.inviteExpiration = null; NewsletterAdminInviteMessage.prototype.contextInfo = null; + let $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) + }); + NewsletterAdminInviteMessage.create = function create(properties) { return new NewsletterAdminInviteMessage(properties); }; @@ -46855,44 +54773,38 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.newsletterJid = ""; - d.newsletterName = ""; - if (o.bytes === String) - d.jpegThumbnail = ""; - else { - d.jpegThumbnail = []; - if (o.bytes !== Array) - d.jpegThumbnail = $util.newBuffer(d.jpegThumbnail); - } - d.caption = ""; - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.inviteExpiration = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.inviteExpiration = o.longs === String ? "0" : 0; - d.contextInfo = null; - } if (m.newsletterJid != null && m.hasOwnProperty("newsletterJid")) { d.newsletterJid = m.newsletterJid; + if (o.oneofs) + d._newsletterJid = "newsletterJid"; } if (m.newsletterName != null && m.hasOwnProperty("newsletterName")) { d.newsletterName = m.newsletterName; + if (o.oneofs) + d._newsletterName = "newsletterName"; } if (m.jpegThumbnail != null && m.hasOwnProperty("jpegThumbnail")) { d.jpegThumbnail = o.bytes === String ? $util.base64.encode(m.jpegThumbnail, 0, m.jpegThumbnail.length) : o.bytes === Array ? Array.prototype.slice.call(m.jpegThumbnail) : m.jpegThumbnail; + if (o.oneofs) + d._jpegThumbnail = "jpegThumbnail"; } if (m.caption != null && m.hasOwnProperty("caption")) { d.caption = m.caption; + if (o.oneofs) + d._caption = "caption"; } if (m.inviteExpiration != null && m.hasOwnProperty("inviteExpiration")) { if (typeof m.inviteExpiration === "number") d.inviteExpiration = o.longs === String ? String(m.inviteExpiration) : m.inviteExpiration; else d.inviteExpiration = o.longs === String ? longToString(m.inviteExpiration) : o.longs === Number ? longToNumber(m.inviteExpiration) : m.inviteExpiration; + if (o.oneofs) + d._inviteExpiration = "inviteExpiration"; } if (m.contextInfo != null && m.hasOwnProperty("contextInfo")) { d.contextInfo = $root.proto.ContextInfo.toObject(m.contextInfo, o); + if (o.oneofs) + d._contextInfo = "contextInfo"; } return d; }; @@ -46920,12 +54832,44 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - NewsletterFollowerInviteMessage.prototype.newsletterJid = ""; - NewsletterFollowerInviteMessage.prototype.newsletterName = ""; - NewsletterFollowerInviteMessage.prototype.jpegThumbnail = $util.newBuffer([]); - NewsletterFollowerInviteMessage.prototype.caption = ""; + NewsletterFollowerInviteMessage.prototype.newsletterJid = null; + NewsletterFollowerInviteMessage.prototype.newsletterName = null; + NewsletterFollowerInviteMessage.prototype.jpegThumbnail = null; + NewsletterFollowerInviteMessage.prototype.caption = null; NewsletterFollowerInviteMessage.prototype.contextInfo = null; + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(NewsletterFollowerInviteMessage.prototype, "_newsletterJid", { + get: $util.oneOfGetter($oneOfFields = ["newsletterJid"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(NewsletterFollowerInviteMessage.prototype, "_newsletterName", { + get: $util.oneOfGetter($oneOfFields = ["newsletterName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(NewsletterFollowerInviteMessage.prototype, "_jpegThumbnail", { + get: $util.oneOfGetter($oneOfFields = ["jpegThumbnail"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(NewsletterFollowerInviteMessage.prototype, "_caption", { + get: $util.oneOfGetter($oneOfFields = ["caption"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(NewsletterFollowerInviteMessage.prototype, "_contextInfo", { + get: $util.oneOfGetter($oneOfFields = ["contextInfo"]), + set: $util.oneOfSetter($oneOfFields) + }); + NewsletterFollowerInviteMessage.create = function create(properties) { return new NewsletterFollowerInviteMessage(properties); }; @@ -47014,33 +54958,30 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.newsletterJid = ""; - d.newsletterName = ""; - if (o.bytes === String) - d.jpegThumbnail = ""; - else { - d.jpegThumbnail = []; - if (o.bytes !== Array) - d.jpegThumbnail = $util.newBuffer(d.jpegThumbnail); - } - d.caption = ""; - d.contextInfo = null; - } if (m.newsletterJid != null && m.hasOwnProperty("newsletterJid")) { d.newsletterJid = m.newsletterJid; + if (o.oneofs) + d._newsletterJid = "newsletterJid"; } if (m.newsletterName != null && m.hasOwnProperty("newsletterName")) { d.newsletterName = m.newsletterName; + if (o.oneofs) + d._newsletterName = "newsletterName"; } if (m.jpegThumbnail != null && m.hasOwnProperty("jpegThumbnail")) { d.jpegThumbnail = o.bytes === String ? $util.base64.encode(m.jpegThumbnail, 0, m.jpegThumbnail.length) : o.bytes === Array ? Array.prototype.slice.call(m.jpegThumbnail) : m.jpegThumbnail; + if (o.oneofs) + d._jpegThumbnail = "jpegThumbnail"; } if (m.caption != null && m.hasOwnProperty("caption")) { d.caption = m.caption; + if (o.oneofs) + d._caption = "caption"; } if (m.contextInfo != null && m.hasOwnProperty("contextInfo")) { d.contextInfo = $root.proto.ContextInfo.toObject(m.contextInfo, o); + if (o.oneofs) + d._contextInfo = "contextInfo"; } return d; }; @@ -47068,21 +55009,113 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - OrderMessage.prototype.orderId = ""; - OrderMessage.prototype.thumbnail = $util.newBuffer([]); - OrderMessage.prototype.itemCount = 0; - OrderMessage.prototype.status = 1; - OrderMessage.prototype.surface = 1; - OrderMessage.prototype.message = ""; - OrderMessage.prototype.orderTitle = ""; - OrderMessage.prototype.sellerJid = ""; - OrderMessage.prototype.token = ""; - OrderMessage.prototype.totalAmount1000 = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - OrderMessage.prototype.totalCurrencyCode = ""; + OrderMessage.prototype.orderId = null; + OrderMessage.prototype.thumbnail = null; + OrderMessage.prototype.itemCount = null; + OrderMessage.prototype.status = null; + OrderMessage.prototype.surface = null; + OrderMessage.prototype.message = null; + OrderMessage.prototype.orderTitle = null; + OrderMessage.prototype.sellerJid = null; + OrderMessage.prototype.token = null; + OrderMessage.prototype.totalAmount1000 = null; + OrderMessage.prototype.totalCurrencyCode = null; OrderMessage.prototype.contextInfo = null; - OrderMessage.prototype.messageVersion = 0; + OrderMessage.prototype.messageVersion = null; OrderMessage.prototype.orderRequestMessageId = null; - OrderMessage.prototype.catalogType = ""; + OrderMessage.prototype.catalogType = null; + + let $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) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(OrderMessage.prototype, "_catalogType", { + get: $util.oneOfGetter($oneOfFields = ["catalogType"]), + set: $util.oneOfSetter($oneOfFields) + }); OrderMessage.create = function create(properties) { return new OrderMessage(properties); @@ -47297,80 +55330,83 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.orderId = ""; - if (o.bytes === String) - d.thumbnail = ""; - else { - d.thumbnail = []; - if (o.bytes !== Array) - d.thumbnail = $util.newBuffer(d.thumbnail); - } - d.itemCount = 0; - d.status = o.enums === String ? "INQUIRY" : 1; - d.surface = o.enums === String ? "CATALOG" : 1; - d.message = ""; - d.orderTitle = ""; - d.sellerJid = ""; - d.token = ""; - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.totalAmount1000 = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.totalAmount1000 = o.longs === String ? "0" : 0; - d.totalCurrencyCode = ""; - d.messageVersion = 0; - d.orderRequestMessageId = null; - d.catalogType = ""; - d.contextInfo = null; - } if (m.orderId != null && m.hasOwnProperty("orderId")) { d.orderId = m.orderId; + if (o.oneofs) + d._orderId = "orderId"; } if (m.thumbnail != null && m.hasOwnProperty("thumbnail")) { d.thumbnail = o.bytes === String ? $util.base64.encode(m.thumbnail, 0, m.thumbnail.length) : o.bytes === Array ? Array.prototype.slice.call(m.thumbnail) : m.thumbnail; + if (o.oneofs) + d._thumbnail = "thumbnail"; } if (m.itemCount != null && m.hasOwnProperty("itemCount")) { d.itemCount = m.itemCount; + if (o.oneofs) + d._itemCount = "itemCount"; } if (m.status != null && m.hasOwnProperty("status")) { d.status = o.enums === String ? $root.proto.Message.OrderMessage.OrderStatus[m.status] === undefined ? m.status : $root.proto.Message.OrderMessage.OrderStatus[m.status] : m.status; + if (o.oneofs) + d._status = "status"; } if (m.surface != null && m.hasOwnProperty("surface")) { d.surface = o.enums === String ? $root.proto.Message.OrderMessage.OrderSurface[m.surface] === undefined ? m.surface : $root.proto.Message.OrderMessage.OrderSurface[m.surface] : m.surface; + if (o.oneofs) + d._surface = "surface"; } if (m.message != null && m.hasOwnProperty("message")) { d.message = m.message; + if (o.oneofs) + d._message = "message"; } if (m.orderTitle != null && m.hasOwnProperty("orderTitle")) { d.orderTitle = m.orderTitle; + if (o.oneofs) + d._orderTitle = "orderTitle"; } if (m.sellerJid != null && m.hasOwnProperty("sellerJid")) { d.sellerJid = m.sellerJid; + if (o.oneofs) + d._sellerJid = "sellerJid"; } if (m.token != null && m.hasOwnProperty("token")) { d.token = m.token; + if (o.oneofs) + d._token = "token"; } if (m.totalAmount1000 != null && m.hasOwnProperty("totalAmount1000")) { if (typeof m.totalAmount1000 === "number") d.totalAmount1000 = o.longs === String ? String(m.totalAmount1000) : m.totalAmount1000; else d.totalAmount1000 = o.longs === String ? longToString(m.totalAmount1000) : o.longs === Number ? longToNumber(m.totalAmount1000) : m.totalAmount1000; + if (o.oneofs) + d._totalAmount1000 = "totalAmount1000"; } if (m.totalCurrencyCode != null && m.hasOwnProperty("totalCurrencyCode")) { d.totalCurrencyCode = m.totalCurrencyCode; + if (o.oneofs) + d._totalCurrencyCode = "totalCurrencyCode"; } if (m.messageVersion != null && m.hasOwnProperty("messageVersion")) { d.messageVersion = m.messageVersion; + if (o.oneofs) + d._messageVersion = "messageVersion"; } if (m.orderRequestMessageId != null && m.hasOwnProperty("orderRequestMessageId")) { d.orderRequestMessageId = $root.proto.MessageKey.toObject(m.orderRequestMessageId, o); + if (o.oneofs) + d._orderRequestMessageId = "orderRequestMessageId"; } if (m.catalogType != null && m.hasOwnProperty("catalogType")) { d.catalogType = m.catalogType; + if (o.oneofs) + d._catalogType = "catalogType"; } if (m.contextInfo != null && m.hasOwnProperty("contextInfo")) { d.contextInfo = $root.proto.ContextInfo.toObject(m.contextInfo, o); + if (o.oneofs) + d._contextInfo = "contextInfo"; } return d; }; @@ -47412,8 +55448,22 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - PaymentExtendedMetadata.prototype.type = 0; - PaymentExtendedMetadata.prototype.platform = ""; + PaymentExtendedMetadata.prototype.type = null; + PaymentExtendedMetadata.prototype.platform = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PaymentExtendedMetadata.prototype, "_type", { + get: $util.oneOfGetter($oneOfFields = ["type"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PaymentExtendedMetadata.prototype, "_platform", { + get: $util.oneOfGetter($oneOfFields = ["platform"]), + set: $util.oneOfSetter($oneOfFields) + }); PaymentExtendedMetadata.create = function create(properties) { return new PaymentExtendedMetadata(properties); @@ -47471,15 +55521,15 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.type = 0; - d.platform = ""; - } if (m.type != null && m.hasOwnProperty("type")) { d.type = m.type; + if (o.oneofs) + d._type = "type"; } if (m.platform != null && m.hasOwnProperty("platform")) { d.platform = m.platform; + if (o.oneofs) + d._platform = "platform"; } return d; }; @@ -47507,10 +55557,36 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - PaymentInviteMessage.prototype.serviceType = 0; - PaymentInviteMessage.prototype.expiryTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - PaymentInviteMessage.prototype.incentiveEligible = false; - PaymentInviteMessage.prototype.referralId = ""; + PaymentInviteMessage.prototype.serviceType = null; + PaymentInviteMessage.prototype.expiryTimestamp = null; + PaymentInviteMessage.prototype.incentiveEligible = null; + PaymentInviteMessage.prototype.referralId = null; + + let $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) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PaymentInviteMessage.prototype, "_incentiveEligible", { + get: $util.oneOfGetter($oneOfFields = ["incentiveEligible"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PaymentInviteMessage.prototype, "_referralId", { + get: $util.oneOfGetter($oneOfFields = ["referralId"]), + set: $util.oneOfSetter($oneOfFields) + }); PaymentInviteMessage.create = function create(properties) { return new PaymentInviteMessage(properties); @@ -47614,30 +55690,28 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.serviceType = o.enums === String ? "UNKNOWN" : 0; - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.expiryTimestamp = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.expiryTimestamp = o.longs === String ? "0" : 0; - d.incentiveEligible = false; - d.referralId = ""; - } if (m.serviceType != null && m.hasOwnProperty("serviceType")) { d.serviceType = o.enums === String ? $root.proto.Message.PaymentInviteMessage.ServiceType[m.serviceType] === undefined ? m.serviceType : $root.proto.Message.PaymentInviteMessage.ServiceType[m.serviceType] : m.serviceType; + if (o.oneofs) + d._serviceType = "serviceType"; } if (m.expiryTimestamp != null && m.hasOwnProperty("expiryTimestamp")) { if (typeof m.expiryTimestamp === "number") d.expiryTimestamp = o.longs === String ? String(m.expiryTimestamp) : m.expiryTimestamp; else d.expiryTimestamp = o.longs === String ? longToString(m.expiryTimestamp) : o.longs === Number ? longToNumber(m.expiryTimestamp) : m.expiryTimestamp; + if (o.oneofs) + d._expiryTimestamp = "expiryTimestamp"; } if (m.incentiveEligible != null && m.hasOwnProperty("incentiveEligible")) { d.incentiveEligible = m.incentiveEligible; + if (o.oneofs) + d._incentiveEligible = "incentiveEligible"; } if (m.referralId != null && m.hasOwnProperty("referralId")) { d.referralId = m.referralId; + if (o.oneofs) + d._referralId = "referralId"; } return d; }; @@ -47678,6 +55752,26 @@ export const proto = $root.proto = (() => { PaymentLinkMetadata.prototype.header = null; PaymentLinkMetadata.prototype.provider = null; + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PaymentLinkMetadata.prototype, "_button", { + get: $util.oneOfGetter($oneOfFields = ["button"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PaymentLinkMetadata.prototype, "_header", { + get: $util.oneOfGetter($oneOfFields = ["header"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PaymentLinkMetadata.prototype, "_provider", { + get: $util.oneOfGetter($oneOfFields = ["provider"]), + set: $util.oneOfSetter($oneOfFields) + }); + PaymentLinkMetadata.create = function create(properties) { return new PaymentLinkMetadata(properties); }; @@ -47749,19 +55843,20 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.button = null; - d.header = null; - d.provider = null; - } if (m.button != null && m.hasOwnProperty("button")) { d.button = $root.proto.Message.PaymentLinkMetadata.PaymentLinkButton.toObject(m.button, o); + if (o.oneofs) + d._button = "button"; } if (m.header != null && m.hasOwnProperty("header")) { d.header = $root.proto.Message.PaymentLinkMetadata.PaymentLinkHeader.toObject(m.header, o); + if (o.oneofs) + d._header = "header"; } if (m.provider != null && m.hasOwnProperty("provider")) { d.provider = $root.proto.Message.PaymentLinkMetadata.PaymentLinkProvider.toObject(m.provider, o); + if (o.oneofs) + d._provider = "provider"; } return d; }; @@ -47786,7 +55881,15 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - PaymentLinkButton.prototype.displayText = ""; + PaymentLinkButton.prototype.displayText = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PaymentLinkButton.prototype, "_displayText", { + get: $util.oneOfGetter($oneOfFields = ["displayText"]), + set: $util.oneOfSetter($oneOfFields) + }); PaymentLinkButton.create = function create(properties) { return new PaymentLinkButton(properties); @@ -47835,11 +55938,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.displayText = ""; - } if (m.displayText != null && m.hasOwnProperty("displayText")) { d.displayText = m.displayText; + if (o.oneofs) + d._displayText = "displayText"; } return d; }; @@ -47867,7 +55969,15 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - PaymentLinkHeader.prototype.headerType = 0; + PaymentLinkHeader.prototype.headerType = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PaymentLinkHeader.prototype, "_headerType", { + get: $util.oneOfGetter($oneOfFields = ["headerType"]), + set: $util.oneOfSetter($oneOfFields) + }); PaymentLinkHeader.create = function create(properties) { return new PaymentLinkHeader(properties); @@ -47929,11 +56039,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.headerType = o.enums === String ? "LINK_PREVIEW" : 0; - } if (m.headerType != null && m.hasOwnProperty("headerType")) { d.headerType = o.enums === String ? $root.proto.Message.PaymentLinkMetadata.PaymentLinkHeader.PaymentLinkHeaderType[m.headerType] === undefined ? m.headerType : $root.proto.Message.PaymentLinkMetadata.PaymentLinkHeader.PaymentLinkHeaderType[m.headerType] : m.headerType; + if (o.oneofs) + d._headerType = "headerType"; } return d; }; @@ -47968,7 +56077,15 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - PaymentLinkProvider.prototype.paramsJson = ""; + PaymentLinkProvider.prototype.paramsJson = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PaymentLinkProvider.prototype, "_paramsJson", { + get: $util.oneOfGetter($oneOfFields = ["paramsJson"]), + set: $util.oneOfSetter($oneOfFields) + }); PaymentLinkProvider.create = function create(properties) { return new PaymentLinkProvider(properties); @@ -48017,11 +56134,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.paramsJson = ""; - } if (m.paramsJson != null && m.hasOwnProperty("paramsJson")) { d.paramsJson = m.paramsJson; + if (o.oneofs) + d._paramsJson = "paramsJson"; } return d; }; @@ -48055,7 +56171,7 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - PeerDataOperationRequestMessage.prototype.peerDataOperationRequestType = 0; + PeerDataOperationRequestMessage.prototype.peerDataOperationRequestType = null; PeerDataOperationRequestMessage.prototype.requestStickerReupload = $util.emptyArray; PeerDataOperationRequestMessage.prototype.requestUrlPreview = $util.emptyArray; PeerDataOperationRequestMessage.prototype.historySyncOnDemandRequest = null; @@ -48066,6 +56182,50 @@ export const proto = $root.proto = (() => { PeerDataOperationRequestMessage.prototype.galaxyFlowAction = null; PeerDataOperationRequestMessage.prototype.companionCanonicalUserNonceFetchRequest = null; + let $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) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PeerDataOperationRequestMessage.prototype, "_syncdCollectionFatalRecoveryRequest", { + get: $util.oneOfGetter($oneOfFields = ["syncdCollectionFatalRecoveryRequest"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PeerDataOperationRequestMessage.prototype, "_historySyncChunkRetryRequest", { + get: $util.oneOfGetter($oneOfFields = ["historySyncChunkRetryRequest"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PeerDataOperationRequestMessage.prototype, "_galaxyFlowAction", { + get: $util.oneOfGetter($oneOfFields = ["galaxyFlowAction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PeerDataOperationRequestMessage.prototype, "_companionCanonicalUserNonceFetchRequest", { + get: $util.oneOfGetter($oneOfFields = ["companionCanonicalUserNonceFetchRequest"]), + set: $util.oneOfSetter($oneOfFields) + }); + PeerDataOperationRequestMessage.create = function create(properties) { return new PeerDataOperationRequestMessage(properties); }; @@ -48297,17 +56457,10 @@ export const proto = $root.proto = (() => { d.requestUrlPreview = []; d.placeholderMessageResendRequest = []; } - if (o.defaults) { - d.peerDataOperationRequestType = o.enums === String ? "UPLOAD_STICKER" : 0; - d.historySyncOnDemandRequest = null; - d.fullHistorySyncOnDemandRequest = null; - d.syncdCollectionFatalRecoveryRequest = null; - d.historySyncChunkRetryRequest = null; - d.galaxyFlowAction = null; - d.companionCanonicalUserNonceFetchRequest = null; - } if (m.peerDataOperationRequestType != null && m.hasOwnProperty("peerDataOperationRequestType")) { d.peerDataOperationRequestType = o.enums === String ? $root.proto.Message.PeerDataOperationRequestType[m.peerDataOperationRequestType] === undefined ? m.peerDataOperationRequestType : $root.proto.Message.PeerDataOperationRequestType[m.peerDataOperationRequestType] : m.peerDataOperationRequestType; + if (o.oneofs) + d._peerDataOperationRequestType = "peerDataOperationRequestType"; } if (m.requestStickerReupload && m.requestStickerReupload.length) { d.requestStickerReupload = []; @@ -48323,6 +56476,8 @@ export const proto = $root.proto = (() => { } if (m.historySyncOnDemandRequest != null && m.hasOwnProperty("historySyncOnDemandRequest")) { d.historySyncOnDemandRequest = $root.proto.Message.PeerDataOperationRequestMessage.HistorySyncOnDemandRequest.toObject(m.historySyncOnDemandRequest, o); + if (o.oneofs) + d._historySyncOnDemandRequest = "historySyncOnDemandRequest"; } if (m.placeholderMessageResendRequest && m.placeholderMessageResendRequest.length) { d.placeholderMessageResendRequest = []; @@ -48332,18 +56487,28 @@ export const proto = $root.proto = (() => { } if (m.fullHistorySyncOnDemandRequest != null && m.hasOwnProperty("fullHistorySyncOnDemandRequest")) { d.fullHistorySyncOnDemandRequest = $root.proto.Message.PeerDataOperationRequestMessage.FullHistorySyncOnDemandRequest.toObject(m.fullHistorySyncOnDemandRequest, o); + if (o.oneofs) + d._fullHistorySyncOnDemandRequest = "fullHistorySyncOnDemandRequest"; } if (m.syncdCollectionFatalRecoveryRequest != null && m.hasOwnProperty("syncdCollectionFatalRecoveryRequest")) { d.syncdCollectionFatalRecoveryRequest = $root.proto.Message.PeerDataOperationRequestMessage.SyncDCollectionFatalRecoveryRequest.toObject(m.syncdCollectionFatalRecoveryRequest, o); + if (o.oneofs) + d._syncdCollectionFatalRecoveryRequest = "syncdCollectionFatalRecoveryRequest"; } if (m.historySyncChunkRetryRequest != null && m.hasOwnProperty("historySyncChunkRetryRequest")) { d.historySyncChunkRetryRequest = $root.proto.Message.PeerDataOperationRequestMessage.HistorySyncChunkRetryRequest.toObject(m.historySyncChunkRetryRequest, o); + if (o.oneofs) + d._historySyncChunkRetryRequest = "historySyncChunkRetryRequest"; } if (m.galaxyFlowAction != null && m.hasOwnProperty("galaxyFlowAction")) { d.galaxyFlowAction = $root.proto.Message.PeerDataOperationRequestMessage.GalaxyFlowAction.toObject(m.galaxyFlowAction, o); + if (o.oneofs) + d._galaxyFlowAction = "galaxyFlowAction"; } if (m.companionCanonicalUserNonceFetchRequest != null && m.hasOwnProperty("companionCanonicalUserNonceFetchRequest")) { d.companionCanonicalUserNonceFetchRequest = $root.proto.Message.PeerDataOperationRequestMessage.CompanionCanonicalUserNonceFetchRequest.toObject(m.companionCanonicalUserNonceFetchRequest, o); + if (o.oneofs) + d._companionCanonicalUserNonceFetchRequest = "companionCanonicalUserNonceFetchRequest"; } return d; }; @@ -48368,7 +56533,15 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - CompanionCanonicalUserNonceFetchRequest.prototype.registrationTraceId = ""; + CompanionCanonicalUserNonceFetchRequest.prototype.registrationTraceId = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CompanionCanonicalUserNonceFetchRequest.prototype, "_registrationTraceId", { + get: $util.oneOfGetter($oneOfFields = ["registrationTraceId"]), + set: $util.oneOfSetter($oneOfFields) + }); CompanionCanonicalUserNonceFetchRequest.create = function create(properties) { return new CompanionCanonicalUserNonceFetchRequest(properties); @@ -48417,11 +56590,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.registrationTraceId = ""; - } if (m.registrationTraceId != null && m.hasOwnProperty("registrationTraceId")) { d.registrationTraceId = m.registrationTraceId; + if (o.oneofs) + d._registrationTraceId = "registrationTraceId"; } return d; }; @@ -48452,6 +56624,20 @@ export const proto = $root.proto = (() => { FullHistorySyncOnDemandRequest.prototype.requestMetadata = null; FullHistorySyncOnDemandRequest.prototype.historySyncConfig = null; + let $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) + }); + FullHistorySyncOnDemandRequest.create = function create(properties) { return new FullHistorySyncOnDemandRequest(properties); }; @@ -48512,15 +56698,15 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.requestMetadata = null; - d.historySyncConfig = null; - } if (m.requestMetadata != null && m.hasOwnProperty("requestMetadata")) { d.requestMetadata = $root.proto.Message.FullHistorySyncOnDemandRequestMetadata.toObject(m.requestMetadata, o); + if (o.oneofs) + d._requestMetadata = "requestMetadata"; } if (m.historySyncConfig != null && m.hasOwnProperty("historySyncConfig")) { d.historySyncConfig = $root.proto.DeviceProps.HistorySyncConfig.toObject(m.historySyncConfig, o); + if (o.oneofs) + d._historySyncConfig = "historySyncConfig"; } return d; }; @@ -48548,9 +56734,29 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - GalaxyFlowAction.prototype.type = 1; - GalaxyFlowAction.prototype.flowId = ""; - GalaxyFlowAction.prototype.stanzaId = ""; + GalaxyFlowAction.prototype.type = null; + GalaxyFlowAction.prototype.flowId = null; + GalaxyFlowAction.prototype.stanzaId = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(GalaxyFlowAction.prototype, "_type", { + get: $util.oneOfGetter($oneOfFields = ["type"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(GalaxyFlowAction.prototype, "_flowId", { + get: $util.oneOfGetter($oneOfFields = ["flowId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(GalaxyFlowAction.prototype, "_stanzaId", { + get: $util.oneOfGetter($oneOfFields = ["stanzaId"]), + set: $util.oneOfSetter($oneOfFields) + }); GalaxyFlowAction.create = function create(properties) { return new GalaxyFlowAction(properties); @@ -48626,19 +56832,20 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.type = o.enums === String ? "NOTIFY_LAUNCH" : 1; - d.flowId = ""; - d.stanzaId = ""; - } if (m.type != null && m.hasOwnProperty("type")) { d.type = o.enums === String ? $root.proto.Message.PeerDataOperationRequestMessage.GalaxyFlowAction.GalaxyFlowActionType[m.type] === undefined ? m.type : $root.proto.Message.PeerDataOperationRequestMessage.GalaxyFlowAction.GalaxyFlowActionType[m.type] : m.type; + if (o.oneofs) + d._type = "type"; } if (m.flowId != null && m.hasOwnProperty("flowId")) { d.flowId = m.flowId; + if (o.oneofs) + d._flowId = "flowId"; } if (m.stanzaId != null && m.hasOwnProperty("stanzaId")) { d.stanzaId = m.stanzaId; + if (o.oneofs) + d._stanzaId = "stanzaId"; } return d; }; @@ -48672,10 +56879,36 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - HistorySyncChunkRetryRequest.prototype.syncType = 0; - HistorySyncChunkRetryRequest.prototype.chunkOrder = 0; - HistorySyncChunkRetryRequest.prototype.chunkNotificationId = ""; - HistorySyncChunkRetryRequest.prototype.regenerateChunk = false; + HistorySyncChunkRetryRequest.prototype.syncType = null; + HistorySyncChunkRetryRequest.prototype.chunkOrder = null; + HistorySyncChunkRetryRequest.prototype.chunkNotificationId = null; + HistorySyncChunkRetryRequest.prototype.regenerateChunk = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HistorySyncChunkRetryRequest.prototype, "_syncType", { + get: $util.oneOfGetter($oneOfFields = ["syncType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HistorySyncChunkRetryRequest.prototype, "_chunkOrder", { + get: $util.oneOfGetter($oneOfFields = ["chunkOrder"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HistorySyncChunkRetryRequest.prototype, "_chunkNotificationId", { + get: $util.oneOfGetter($oneOfFields = ["chunkNotificationId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HistorySyncChunkRetryRequest.prototype, "_regenerateChunk", { + get: $util.oneOfGetter($oneOfFields = ["regenerateChunk"]), + set: $util.oneOfSetter($oneOfFields) + }); HistorySyncChunkRetryRequest.create = function create(properties) { return new HistorySyncChunkRetryRequest(properties); @@ -48792,23 +57025,25 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.syncType = o.enums === String ? "INITIAL_BOOTSTRAP" : 0; - d.chunkOrder = 0; - d.chunkNotificationId = ""; - d.regenerateChunk = false; - } if (m.syncType != null && m.hasOwnProperty("syncType")) { d.syncType = o.enums === String ? $root.proto.Message.HistorySyncType[m.syncType] === undefined ? m.syncType : $root.proto.Message.HistorySyncType[m.syncType] : m.syncType; + if (o.oneofs) + d._syncType = "syncType"; } if (m.chunkOrder != null && m.hasOwnProperty("chunkOrder")) { d.chunkOrder = m.chunkOrder; + if (o.oneofs) + d._chunkOrder = "chunkOrder"; } if (m.chunkNotificationId != null && m.hasOwnProperty("chunkNotificationId")) { d.chunkNotificationId = m.chunkNotificationId; + if (o.oneofs) + d._chunkNotificationId = "chunkNotificationId"; } if (m.regenerateChunk != null && m.hasOwnProperty("regenerateChunk")) { d.regenerateChunk = m.regenerateChunk; + if (o.oneofs) + d._regenerateChunk = "regenerateChunk"; } return d; }; @@ -48836,12 +57071,50 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - HistorySyncOnDemandRequest.prototype.chatJid = ""; - HistorySyncOnDemandRequest.prototype.oldestMsgId = ""; - HistorySyncOnDemandRequest.prototype.oldestMsgFromMe = false; - HistorySyncOnDemandRequest.prototype.onDemandMsgCount = 0; - HistorySyncOnDemandRequest.prototype.oldestMsgTimestampMs = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - HistorySyncOnDemandRequest.prototype.accountLid = ""; + HistorySyncOnDemandRequest.prototype.chatJid = null; + HistorySyncOnDemandRequest.prototype.oldestMsgId = null; + HistorySyncOnDemandRequest.prototype.oldestMsgFromMe = null; + HistorySyncOnDemandRequest.prototype.onDemandMsgCount = null; + HistorySyncOnDemandRequest.prototype.oldestMsgTimestampMs = null; + HistorySyncOnDemandRequest.prototype.accountLid = null; + + let $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) + }); HistorySyncOnDemandRequest.create = function create(properties) { return new HistorySyncOnDemandRequest(properties); @@ -48942,38 +57215,38 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.chatJid = ""; - d.oldestMsgId = ""; - d.oldestMsgFromMe = false; - d.onDemandMsgCount = 0; - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.oldestMsgTimestampMs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.oldestMsgTimestampMs = o.longs === String ? "0" : 0; - d.accountLid = ""; - } if (m.chatJid != null && m.hasOwnProperty("chatJid")) { d.chatJid = m.chatJid; + if (o.oneofs) + d._chatJid = "chatJid"; } if (m.oldestMsgId != null && m.hasOwnProperty("oldestMsgId")) { d.oldestMsgId = m.oldestMsgId; + if (o.oneofs) + d._oldestMsgId = "oldestMsgId"; } if (m.oldestMsgFromMe != null && m.hasOwnProperty("oldestMsgFromMe")) { d.oldestMsgFromMe = m.oldestMsgFromMe; + if (o.oneofs) + d._oldestMsgFromMe = "oldestMsgFromMe"; } if (m.onDemandMsgCount != null && m.hasOwnProperty("onDemandMsgCount")) { d.onDemandMsgCount = m.onDemandMsgCount; + if (o.oneofs) + d._onDemandMsgCount = "onDemandMsgCount"; } if (m.oldestMsgTimestampMs != null && m.hasOwnProperty("oldestMsgTimestampMs")) { if (typeof m.oldestMsgTimestampMs === "number") d.oldestMsgTimestampMs = o.longs === String ? String(m.oldestMsgTimestampMs) : m.oldestMsgTimestampMs; else d.oldestMsgTimestampMs = o.longs === String ? longToString(m.oldestMsgTimestampMs) : o.longs === Number ? longToNumber(m.oldestMsgTimestampMs) : m.oldestMsgTimestampMs; + if (o.oneofs) + d._oldestMsgTimestampMs = "oldestMsgTimestampMs"; } if (m.accountLid != null && m.hasOwnProperty("accountLid")) { d.accountLid = m.accountLid; + if (o.oneofs) + d._accountLid = "accountLid"; } return d; }; @@ -49003,6 +57276,14 @@ export const proto = $root.proto = (() => { PlaceholderMessageResendRequest.prototype.messageKey = null; + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PlaceholderMessageResendRequest.prototype, "_messageKey", { + get: $util.oneOfGetter($oneOfFields = ["messageKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + PlaceholderMessageResendRequest.create = function create(properties) { return new PlaceholderMessageResendRequest(properties); }; @@ -49052,11 +57333,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.messageKey = null; - } if (m.messageKey != null && m.hasOwnProperty("messageKey")) { d.messageKey = $root.proto.MessageKey.toObject(m.messageKey, o); + if (o.oneofs) + d._messageKey = "messageKey"; } return d; }; @@ -49084,7 +57364,15 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - RequestStickerReupload.prototype.fileSha256 = ""; + RequestStickerReupload.prototype.fileSha256 = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(RequestStickerReupload.prototype, "_fileSha256", { + get: $util.oneOfGetter($oneOfFields = ["fileSha256"]), + set: $util.oneOfSetter($oneOfFields) + }); RequestStickerReupload.create = function create(properties) { return new RequestStickerReupload(properties); @@ -49133,11 +57421,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.fileSha256 = ""; - } if (m.fileSha256 != null && m.hasOwnProperty("fileSha256")) { d.fileSha256 = m.fileSha256; + if (o.oneofs) + d._fileSha256 = "fileSha256"; } return d; }; @@ -49165,8 +57452,22 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - RequestUrlPreview.prototype.url = ""; - RequestUrlPreview.prototype.includeHqThumbnail = false; + RequestUrlPreview.prototype.url = null; + RequestUrlPreview.prototype.includeHqThumbnail = null; + + let $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) + }); RequestUrlPreview.create = function create(properties) { return new RequestUrlPreview(properties); @@ -49224,15 +57525,15 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.url = ""; - d.includeHqThumbnail = false; - } if (m.url != null && m.hasOwnProperty("url")) { d.url = m.url; + if (o.oneofs) + d._url = "url"; } if (m.includeHqThumbnail != null && m.hasOwnProperty("includeHqThumbnail")) { d.includeHqThumbnail = m.includeHqThumbnail; + if (o.oneofs) + d._includeHqThumbnail = "includeHqThumbnail"; } return d; }; @@ -49260,8 +57561,22 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - SyncDCollectionFatalRecoveryRequest.prototype.collectionName = ""; - SyncDCollectionFatalRecoveryRequest.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + SyncDCollectionFatalRecoveryRequest.prototype.collectionName = null; + SyncDCollectionFatalRecoveryRequest.prototype.timestamp = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncDCollectionFatalRecoveryRequest.prototype, "_collectionName", { + get: $util.oneOfGetter($oneOfFields = ["collectionName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncDCollectionFatalRecoveryRequest.prototype, "_timestamp", { + get: $util.oneOfGetter($oneOfFields = ["timestamp"]), + set: $util.oneOfSetter($oneOfFields) + }); SyncDCollectionFatalRecoveryRequest.create = function create(properties) { return new SyncDCollectionFatalRecoveryRequest(properties); @@ -49326,22 +57641,18 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.collectionName = ""; - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.timestamp = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.timestamp = o.longs === String ? "0" : 0; - } if (m.collectionName != null && m.hasOwnProperty("collectionName")) { d.collectionName = m.collectionName; + if (o.oneofs) + d._collectionName = "collectionName"; } if (m.timestamp != null && m.hasOwnProperty("timestamp")) { if (typeof m.timestamp === "number") d.timestamp = o.longs === String ? String(m.timestamp) : m.timestamp; else d.timestamp = o.longs === String ? longToString(m.timestamp) : o.longs === Number ? longToNumber(m.timestamp) : m.timestamp; + if (o.oneofs) + d._timestamp = "timestamp"; } return d; }; @@ -49373,10 +57684,24 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - PeerDataOperationRequestResponseMessage.prototype.peerDataOperationRequestType = 0; - PeerDataOperationRequestResponseMessage.prototype.stanzaId = ""; + PeerDataOperationRequestResponseMessage.prototype.peerDataOperationRequestType = null; + PeerDataOperationRequestResponseMessage.prototype.stanzaId = null; PeerDataOperationRequestResponseMessage.prototype.peerDataOperationResult = $util.emptyArray; + let $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) + }); + PeerDataOperationRequestResponseMessage.create = function create(properties) { return new PeerDataOperationRequestResponseMessage(properties); }; @@ -49509,15 +57834,15 @@ export const proto = $root.proto = (() => { if (o.arrays || o.defaults) { d.peerDataOperationResult = []; } - if (o.defaults) { - d.peerDataOperationRequestType = o.enums === String ? "UPLOAD_STICKER" : 0; - d.stanzaId = ""; - } if (m.peerDataOperationRequestType != null && m.hasOwnProperty("peerDataOperationRequestType")) { d.peerDataOperationRequestType = o.enums === String ? $root.proto.Message.PeerDataOperationRequestType[m.peerDataOperationRequestType] === undefined ? m.peerDataOperationRequestType : $root.proto.Message.PeerDataOperationRequestType[m.peerDataOperationRequestType] : m.peerDataOperationRequestType; + if (o.oneofs) + d._peerDataOperationRequestType = "peerDataOperationRequestType"; } if (m.stanzaId != null && m.hasOwnProperty("stanzaId")) { d.stanzaId = m.stanzaId; + if (o.oneofs) + d._stanzaId = "stanzaId"; } if (m.peerDataOperationResult && m.peerDataOperationResult.length) { d.peerDataOperationResult = []; @@ -49548,7 +57873,7 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - PeerDataOperationResult.prototype.mediaUploadResult = 0; + PeerDataOperationResult.prototype.mediaUploadResult = null; PeerDataOperationResult.prototype.stickerMessage = null; PeerDataOperationResult.prototype.linkPreviewResponse = null; PeerDataOperationResult.prototype.placeholderMessageResendResponse = null; @@ -49559,6 +57884,68 @@ export const proto = $root.proto = (() => { PeerDataOperationResult.prototype.companionCanonicalUserNonceFetchRequestResponse = null; PeerDataOperationResult.prototype.historySyncChunkRetryResponse = null; + let $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) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PeerDataOperationResult.prototype, "_syncdSnapshotFatalRecoveryResponse", { + get: $util.oneOfGetter($oneOfFields = ["syncdSnapshotFatalRecoveryResponse"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PeerDataOperationResult.prototype, "_companionCanonicalUserNonceFetchRequestResponse", { + get: $util.oneOfGetter($oneOfFields = ["companionCanonicalUserNonceFetchRequestResponse"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PeerDataOperationResult.prototype, "_historySyncChunkRetryResponse", { + get: $util.oneOfGetter($oneOfFields = ["historySyncChunkRetryResponse"]), + set: $util.oneOfSetter($oneOfFields) + }); + PeerDataOperationResult.create = function create(properties) { return new PeerDataOperationResult(properties); }; @@ -49726,47 +58113,55 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.mediaUploadResult = o.enums === String ? "GENERAL_ERROR" : 0; - d.stickerMessage = null; - d.linkPreviewResponse = null; - d.placeholderMessageResendResponse = null; - d.waffleNonceFetchRequestResponse = null; - d.fullHistorySyncOnDemandRequestResponse = null; - d.companionMetaNonceFetchRequestResponse = null; - d.syncdSnapshotFatalRecoveryResponse = null; - d.companionCanonicalUserNonceFetchRequestResponse = null; - d.historySyncChunkRetryResponse = null; - } if (m.mediaUploadResult != null && m.hasOwnProperty("mediaUploadResult")) { d.mediaUploadResult = o.enums === String ? $root.proto.MediaRetryNotification.ResultType[m.mediaUploadResult] === undefined ? m.mediaUploadResult : $root.proto.MediaRetryNotification.ResultType[m.mediaUploadResult] : m.mediaUploadResult; + if (o.oneofs) + d._mediaUploadResult = "mediaUploadResult"; } if (m.stickerMessage != null && m.hasOwnProperty("stickerMessage")) { d.stickerMessage = $root.proto.Message.StickerMessage.toObject(m.stickerMessage, o); + if (o.oneofs) + d._stickerMessage = "stickerMessage"; } if (m.linkPreviewResponse != null && m.hasOwnProperty("linkPreviewResponse")) { d.linkPreviewResponse = $root.proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.toObject(m.linkPreviewResponse, o); + if (o.oneofs) + d._linkPreviewResponse = "linkPreviewResponse"; } if (m.placeholderMessageResendResponse != null && m.hasOwnProperty("placeholderMessageResendResponse")) { d.placeholderMessageResendResponse = $root.proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.PlaceholderMessageResendResponse.toObject(m.placeholderMessageResendResponse, o); + if (o.oneofs) + d._placeholderMessageResendResponse = "placeholderMessageResendResponse"; } if (m.waffleNonceFetchRequestResponse != null && m.hasOwnProperty("waffleNonceFetchRequestResponse")) { d.waffleNonceFetchRequestResponse = $root.proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.WaffleNonceFetchResponse.toObject(m.waffleNonceFetchRequestResponse, o); + if (o.oneofs) + d._waffleNonceFetchRequestResponse = "waffleNonceFetchRequestResponse"; } if (m.fullHistorySyncOnDemandRequestResponse != null && m.hasOwnProperty("fullHistorySyncOnDemandRequestResponse")) { d.fullHistorySyncOnDemandRequestResponse = $root.proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.FullHistorySyncOnDemandRequestResponse.toObject(m.fullHistorySyncOnDemandRequestResponse, o); + if (o.oneofs) + d._fullHistorySyncOnDemandRequestResponse = "fullHistorySyncOnDemandRequestResponse"; } if (m.companionMetaNonceFetchRequestResponse != null && m.hasOwnProperty("companionMetaNonceFetchRequestResponse")) { d.companionMetaNonceFetchRequestResponse = $root.proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionMetaNonceFetchResponse.toObject(m.companionMetaNonceFetchRequestResponse, o); + if (o.oneofs) + d._companionMetaNonceFetchRequestResponse = "companionMetaNonceFetchRequestResponse"; } if (m.syncdSnapshotFatalRecoveryResponse != null && m.hasOwnProperty("syncdSnapshotFatalRecoveryResponse")) { d.syncdSnapshotFatalRecoveryResponse = $root.proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.SyncDSnapshotFatalRecoveryResponse.toObject(m.syncdSnapshotFatalRecoveryResponse, o); + if (o.oneofs) + d._syncdSnapshotFatalRecoveryResponse = "syncdSnapshotFatalRecoveryResponse"; } if (m.companionCanonicalUserNonceFetchRequestResponse != null && m.hasOwnProperty("companionCanonicalUserNonceFetchRequestResponse")) { d.companionCanonicalUserNonceFetchRequestResponse = $root.proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.CompanionCanonicalUserNonceFetchResponse.toObject(m.companionCanonicalUserNonceFetchRequestResponse, o); + if (o.oneofs) + d._companionCanonicalUserNonceFetchRequestResponse = "companionCanonicalUserNonceFetchRequestResponse"; } if (m.historySyncChunkRetryResponse != null && m.hasOwnProperty("historySyncChunkRetryResponse")) { d.historySyncChunkRetryResponse = $root.proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.HistorySyncChunkRetryResponse.toObject(m.historySyncChunkRetryResponse, o); + if (o.oneofs) + d._historySyncChunkRetryResponse = "historySyncChunkRetryResponse"; } return d; }; @@ -49791,9 +58186,29 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - CompanionCanonicalUserNonceFetchResponse.prototype.nonce = ""; - CompanionCanonicalUserNonceFetchResponse.prototype.waFbid = ""; - CompanionCanonicalUserNonceFetchResponse.prototype.forceRefresh = false; + CompanionCanonicalUserNonceFetchResponse.prototype.nonce = null; + CompanionCanonicalUserNonceFetchResponse.prototype.waFbid = null; + CompanionCanonicalUserNonceFetchResponse.prototype.forceRefresh = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CompanionCanonicalUserNonceFetchResponse.prototype, "_nonce", { + get: $util.oneOfGetter($oneOfFields = ["nonce"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CompanionCanonicalUserNonceFetchResponse.prototype, "_waFbid", { + get: $util.oneOfGetter($oneOfFields = ["waFbid"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CompanionCanonicalUserNonceFetchResponse.prototype, "_forceRefresh", { + get: $util.oneOfGetter($oneOfFields = ["forceRefresh"]), + set: $util.oneOfSetter($oneOfFields) + }); CompanionCanonicalUserNonceFetchResponse.create = function create(properties) { return new CompanionCanonicalUserNonceFetchResponse(properties); @@ -49860,19 +58275,20 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.nonce = ""; - d.waFbid = ""; - d.forceRefresh = false; - } if (m.nonce != null && m.hasOwnProperty("nonce")) { d.nonce = m.nonce; + if (o.oneofs) + d._nonce = "nonce"; } if (m.waFbid != null && m.hasOwnProperty("waFbid")) { d.waFbid = m.waFbid; + if (o.oneofs) + d._waFbid = "waFbid"; } if (m.forceRefresh != null && m.hasOwnProperty("forceRefresh")) { d.forceRefresh = m.forceRefresh; + if (o.oneofs) + d._forceRefresh = "forceRefresh"; } return d; }; @@ -49900,7 +58316,15 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - CompanionMetaNonceFetchResponse.prototype.nonce = ""; + CompanionMetaNonceFetchResponse.prototype.nonce = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CompanionMetaNonceFetchResponse.prototype, "_nonce", { + get: $util.oneOfGetter($oneOfFields = ["nonce"]), + set: $util.oneOfSetter($oneOfFields) + }); CompanionMetaNonceFetchResponse.create = function create(properties) { return new CompanionMetaNonceFetchResponse(properties); @@ -49949,11 +58373,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.nonce = ""; - } if (m.nonce != null && m.hasOwnProperty("nonce")) { d.nonce = m.nonce; + if (o.oneofs) + d._nonce = "nonce"; } return d; }; @@ -49982,7 +58405,21 @@ export const proto = $root.proto = (() => { } FullHistorySyncOnDemandRequestResponse.prototype.requestMetadata = null; - FullHistorySyncOnDemandRequestResponse.prototype.responseCode = 0; + FullHistorySyncOnDemandRequestResponse.prototype.responseCode = null; + + let $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) + }); FullHistorySyncOnDemandRequestResponse.create = function create(properties) { return new FullHistorySyncOnDemandRequestResponse(properties); @@ -50075,15 +58512,15 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.requestMetadata = null; - d.responseCode = o.enums === String ? "REQUEST_SUCCESS" : 0; - } if (m.requestMetadata != null && m.hasOwnProperty("requestMetadata")) { d.requestMetadata = $root.proto.Message.FullHistorySyncOnDemandRequestMetadata.toObject(m.requestMetadata, o); + if (o.oneofs) + d._requestMetadata = "requestMetadata"; } if (m.responseCode != null && m.hasOwnProperty("responseCode")) { d.responseCode = o.enums === String ? $root.proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.FullHistorySyncOnDemandResponseCode[m.responseCode] === undefined ? m.responseCode : $root.proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.FullHistorySyncOnDemandResponseCode[m.responseCode] : m.responseCode; + if (o.oneofs) + d._responseCode = "responseCode"; } return d; }; @@ -50123,11 +58560,43 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - HistorySyncChunkRetryResponse.prototype.syncType = 0; - HistorySyncChunkRetryResponse.prototype.chunkOrder = 0; - HistorySyncChunkRetryResponse.prototype.requestId = ""; - HistorySyncChunkRetryResponse.prototype.responseCode = 1; - HistorySyncChunkRetryResponse.prototype.canRecover = false; + HistorySyncChunkRetryResponse.prototype.syncType = null; + HistorySyncChunkRetryResponse.prototype.chunkOrder = null; + HistorySyncChunkRetryResponse.prototype.requestId = null; + HistorySyncChunkRetryResponse.prototype.responseCode = null; + HistorySyncChunkRetryResponse.prototype.canRecover = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HistorySyncChunkRetryResponse.prototype, "_syncType", { + get: $util.oneOfGetter($oneOfFields = ["syncType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HistorySyncChunkRetryResponse.prototype, "_chunkOrder", { + get: $util.oneOfGetter($oneOfFields = ["chunkOrder"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HistorySyncChunkRetryResponse.prototype, "_requestId", { + get: $util.oneOfGetter($oneOfFields = ["requestId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HistorySyncChunkRetryResponse.prototype, "_responseCode", { + get: $util.oneOfGetter($oneOfFields = ["responseCode"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(HistorySyncChunkRetryResponse.prototype, "_canRecover", { + get: $util.oneOfGetter($oneOfFields = ["canRecover"]), + set: $util.oneOfSetter($oneOfFields) + }); HistorySyncChunkRetryResponse.create = function create(properties) { return new HistorySyncChunkRetryResponse(properties); @@ -50282,27 +58751,30 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.syncType = o.enums === String ? "INITIAL_BOOTSTRAP" : 0; - d.chunkOrder = 0; - d.requestId = ""; - d.responseCode = o.enums === String ? "GENERATION_ERROR" : 1; - d.canRecover = false; - } if (m.syncType != null && m.hasOwnProperty("syncType")) { d.syncType = o.enums === String ? $root.proto.Message.HistorySyncType[m.syncType] === undefined ? m.syncType : $root.proto.Message.HistorySyncType[m.syncType] : m.syncType; + if (o.oneofs) + d._syncType = "syncType"; } if (m.chunkOrder != null && m.hasOwnProperty("chunkOrder")) { d.chunkOrder = m.chunkOrder; + if (o.oneofs) + d._chunkOrder = "chunkOrder"; } if (m.requestId != null && m.hasOwnProperty("requestId")) { d.requestId = m.requestId; + if (o.oneofs) + d._requestId = "requestId"; } if (m.responseCode != null && m.hasOwnProperty("responseCode")) { d.responseCode = o.enums === String ? $root.proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.HistorySyncChunkRetryResponseCode[m.responseCode] === undefined ? m.responseCode : $root.proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.HistorySyncChunkRetryResponseCode[m.responseCode] : m.responseCode; + if (o.oneofs) + d._responseCode = "responseCode"; } if (m.canRecover != null && m.hasOwnProperty("canRecover")) { d.canRecover = m.canRecover; + if (o.oneofs) + d._canRecover = "canRecover"; } return d; }; @@ -50341,15 +58813,65 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - LinkPreviewResponse.prototype.url = ""; - LinkPreviewResponse.prototype.title = ""; - LinkPreviewResponse.prototype.description = ""; - LinkPreviewResponse.prototype.thumbData = $util.newBuffer([]); - LinkPreviewResponse.prototype.matchText = ""; - LinkPreviewResponse.prototype.previewType = ""; + LinkPreviewResponse.prototype.url = null; + LinkPreviewResponse.prototype.title = null; + LinkPreviewResponse.prototype.description = null; + LinkPreviewResponse.prototype.thumbData = null; + LinkPreviewResponse.prototype.matchText = null; + LinkPreviewResponse.prototype.previewType = null; LinkPreviewResponse.prototype.hqThumbnail = null; LinkPreviewResponse.prototype.previewMetadata = null; + let $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) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(LinkPreviewResponse.prototype, "_previewMetadata", { + get: $util.oneOfGetter($oneOfFields = ["previewMetadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + LinkPreviewResponse.create = function create(properties) { return new LinkPreviewResponse(properties); }; @@ -50467,45 +58989,45 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.url = ""; - d.title = ""; - d.description = ""; - if (o.bytes === String) - d.thumbData = ""; - else { - d.thumbData = []; - if (o.bytes !== Array) - d.thumbData = $util.newBuffer(d.thumbData); - } - d.matchText = ""; - d.previewType = ""; - d.hqThumbnail = null; - d.previewMetadata = null; - } if (m.url != null && m.hasOwnProperty("url")) { d.url = m.url; + if (o.oneofs) + d._url = "url"; } if (m.title != null && m.hasOwnProperty("title")) { d.title = m.title; + if (o.oneofs) + d._title = "title"; } if (m.description != null && m.hasOwnProperty("description")) { d.description = m.description; + if (o.oneofs) + d._description = "description"; } if (m.thumbData != null && m.hasOwnProperty("thumbData")) { d.thumbData = o.bytes === String ? $util.base64.encode(m.thumbData, 0, m.thumbData.length) : o.bytes === Array ? Array.prototype.slice.call(m.thumbData) : m.thumbData; + if (o.oneofs) + d._thumbData = "thumbData"; } if (m.matchText != null && m.hasOwnProperty("matchText")) { d.matchText = m.matchText; + if (o.oneofs) + d._matchText = "matchText"; } if (m.previewType != null && m.hasOwnProperty("previewType")) { d.previewType = m.previewType; + if (o.oneofs) + d._previewType = "previewType"; } if (m.hqThumbnail != null && m.hasOwnProperty("hqThumbnail")) { d.hqThumbnail = $root.proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.LinkPreviewHighQualityThumbnail.toObject(m.hqThumbnail, o); + if (o.oneofs) + d._hqThumbnail = "hqThumbnail"; } if (m.previewMetadata != null && m.hasOwnProperty("previewMetadata")) { d.previewMetadata = $root.proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult.LinkPreviewResponse.PaymentLinkPreviewMetadata.toObject(m.previewMetadata, o); + if (o.oneofs) + d._previewMetadata = "previewMetadata"; } return d; }; @@ -50530,13 +59052,57 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - LinkPreviewHighQualityThumbnail.prototype.directPath = ""; - LinkPreviewHighQualityThumbnail.prototype.thumbHash = ""; - LinkPreviewHighQualityThumbnail.prototype.encThumbHash = ""; - LinkPreviewHighQualityThumbnail.prototype.mediaKey = $util.newBuffer([]); - LinkPreviewHighQualityThumbnail.prototype.mediaKeyTimestampMs = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - LinkPreviewHighQualityThumbnail.prototype.thumbWidth = 0; - LinkPreviewHighQualityThumbnail.prototype.thumbHeight = 0; + LinkPreviewHighQualityThumbnail.prototype.directPath = null; + LinkPreviewHighQualityThumbnail.prototype.thumbHash = null; + LinkPreviewHighQualityThumbnail.prototype.encThumbHash = null; + LinkPreviewHighQualityThumbnail.prototype.mediaKey = null; + LinkPreviewHighQualityThumbnail.prototype.mediaKeyTimestampMs = null; + LinkPreviewHighQualityThumbnail.prototype.thumbWidth = null; + LinkPreviewHighQualityThumbnail.prototype.thumbHeight = null; + + let $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) + }); LinkPreviewHighQualityThumbnail.create = function create(properties) { return new LinkPreviewHighQualityThumbnail(properties); @@ -50649,48 +59215,43 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.directPath = ""; - d.thumbHash = ""; - d.encThumbHash = ""; - if (o.bytes === String) - d.mediaKey = ""; - else { - d.mediaKey = []; - if (o.bytes !== Array) - d.mediaKey = $util.newBuffer(d.mediaKey); - } - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.mediaKeyTimestampMs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.mediaKeyTimestampMs = o.longs === String ? "0" : 0; - d.thumbWidth = 0; - d.thumbHeight = 0; - } if (m.directPath != null && m.hasOwnProperty("directPath")) { d.directPath = m.directPath; + if (o.oneofs) + d._directPath = "directPath"; } if (m.thumbHash != null && m.hasOwnProperty("thumbHash")) { d.thumbHash = m.thumbHash; + if (o.oneofs) + d._thumbHash = "thumbHash"; } if (m.encThumbHash != null && m.hasOwnProperty("encThumbHash")) { d.encThumbHash = m.encThumbHash; + if (o.oneofs) + d._encThumbHash = "encThumbHash"; } if (m.mediaKey != null && m.hasOwnProperty("mediaKey")) { d.mediaKey = o.bytes === String ? $util.base64.encode(m.mediaKey, 0, m.mediaKey.length) : o.bytes === Array ? Array.prototype.slice.call(m.mediaKey) : m.mediaKey; + if (o.oneofs) + d._mediaKey = "mediaKey"; } if (m.mediaKeyTimestampMs != null && m.hasOwnProperty("mediaKeyTimestampMs")) { if (typeof m.mediaKeyTimestampMs === "number") d.mediaKeyTimestampMs = o.longs === String ? String(m.mediaKeyTimestampMs) : m.mediaKeyTimestampMs; else d.mediaKeyTimestampMs = o.longs === String ? longToString(m.mediaKeyTimestampMs) : o.longs === Number ? longToNumber(m.mediaKeyTimestampMs) : m.mediaKeyTimestampMs; + if (o.oneofs) + d._mediaKeyTimestampMs = "mediaKeyTimestampMs"; } if (m.thumbWidth != null && m.hasOwnProperty("thumbWidth")) { d.thumbWidth = m.thumbWidth; + if (o.oneofs) + d._thumbWidth = "thumbWidth"; } if (m.thumbHeight != null && m.hasOwnProperty("thumbHeight")) { d.thumbHeight = m.thumbHeight; + if (o.oneofs) + d._thumbHeight = "thumbHeight"; } return d; }; @@ -50718,11 +59279,43 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - PaymentLinkPreviewMetadata.prototype.isBusinessVerified = false; - PaymentLinkPreviewMetadata.prototype.providerName = ""; - PaymentLinkPreviewMetadata.prototype.amount = ""; - PaymentLinkPreviewMetadata.prototype.offset = ""; - PaymentLinkPreviewMetadata.prototype.currency = ""; + PaymentLinkPreviewMetadata.prototype.isBusinessVerified = null; + PaymentLinkPreviewMetadata.prototype.providerName = null; + PaymentLinkPreviewMetadata.prototype.amount = null; + PaymentLinkPreviewMetadata.prototype.offset = null; + PaymentLinkPreviewMetadata.prototype.currency = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PaymentLinkPreviewMetadata.prototype, "_isBusinessVerified", { + get: $util.oneOfGetter($oneOfFields = ["isBusinessVerified"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PaymentLinkPreviewMetadata.prototype, "_providerName", { + get: $util.oneOfGetter($oneOfFields = ["providerName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PaymentLinkPreviewMetadata.prototype, "_amount", { + get: $util.oneOfGetter($oneOfFields = ["amount"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PaymentLinkPreviewMetadata.prototype, "_offset", { + get: $util.oneOfGetter($oneOfFields = ["offset"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PaymentLinkPreviewMetadata.prototype, "_currency", { + get: $util.oneOfGetter($oneOfFields = ["currency"]), + set: $util.oneOfSetter($oneOfFields) + }); PaymentLinkPreviewMetadata.create = function create(properties) { return new PaymentLinkPreviewMetadata(properties); @@ -50807,27 +59400,30 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.isBusinessVerified = false; - d.providerName = ""; - d.amount = ""; - d.offset = ""; - d.currency = ""; - } if (m.isBusinessVerified != null && m.hasOwnProperty("isBusinessVerified")) { d.isBusinessVerified = m.isBusinessVerified; + if (o.oneofs) + d._isBusinessVerified = "isBusinessVerified"; } if (m.providerName != null && m.hasOwnProperty("providerName")) { d.providerName = m.providerName; + if (o.oneofs) + d._providerName = "providerName"; } if (m.amount != null && m.hasOwnProperty("amount")) { d.amount = m.amount; + if (o.oneofs) + d._amount = "amount"; } if (m.offset != null && m.hasOwnProperty("offset")) { d.offset = m.offset; + if (o.oneofs) + d._offset = "offset"; } if (m.currency != null && m.hasOwnProperty("currency")) { d.currency = m.currency; + if (o.oneofs) + d._currency = "currency"; } return d; }; @@ -50858,7 +59454,15 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - PlaceholderMessageResendResponse.prototype.webMessageInfoBytes = $util.newBuffer([]); + PlaceholderMessageResendResponse.prototype.webMessageInfoBytes = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PlaceholderMessageResendResponse.prototype, "_webMessageInfoBytes", { + get: $util.oneOfGetter($oneOfFields = ["webMessageInfoBytes"]), + set: $util.oneOfSetter($oneOfFields) + }); PlaceholderMessageResendResponse.create = function create(properties) { return new PlaceholderMessageResendResponse(properties); @@ -50910,17 +59514,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - if (o.bytes === String) - d.webMessageInfoBytes = ""; - else { - d.webMessageInfoBytes = []; - if (o.bytes !== Array) - d.webMessageInfoBytes = $util.newBuffer(d.webMessageInfoBytes); - } - } if (m.webMessageInfoBytes != null && m.hasOwnProperty("webMessageInfoBytes")) { d.webMessageInfoBytes = o.bytes === String ? $util.base64.encode(m.webMessageInfoBytes, 0, m.webMessageInfoBytes.length) : o.bytes === Array ? Array.prototype.slice.call(m.webMessageInfoBytes) : m.webMessageInfoBytes; + if (o.oneofs) + d._webMessageInfoBytes = "webMessageInfoBytes"; } return d; }; @@ -50948,8 +59545,22 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - SyncDSnapshotFatalRecoveryResponse.prototype.collectionSnapshot = $util.newBuffer([]); - SyncDSnapshotFatalRecoveryResponse.prototype.isCompressed = false; + SyncDSnapshotFatalRecoveryResponse.prototype.collectionSnapshot = null; + SyncDSnapshotFatalRecoveryResponse.prototype.isCompressed = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncDSnapshotFatalRecoveryResponse.prototype, "_collectionSnapshot", { + get: $util.oneOfGetter($oneOfFields = ["collectionSnapshot"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncDSnapshotFatalRecoveryResponse.prototype, "_isCompressed", { + get: $util.oneOfGetter($oneOfFields = ["isCompressed"]), + set: $util.oneOfSetter($oneOfFields) + }); SyncDSnapshotFatalRecoveryResponse.create = function create(properties) { return new SyncDSnapshotFatalRecoveryResponse(properties); @@ -51010,21 +59621,15 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - if (o.bytes === String) - d.collectionSnapshot = ""; - else { - d.collectionSnapshot = []; - if (o.bytes !== Array) - d.collectionSnapshot = $util.newBuffer(d.collectionSnapshot); - } - d.isCompressed = false; - } if (m.collectionSnapshot != null && m.hasOwnProperty("collectionSnapshot")) { d.collectionSnapshot = o.bytes === String ? $util.base64.encode(m.collectionSnapshot, 0, m.collectionSnapshot.length) : o.bytes === Array ? Array.prototype.slice.call(m.collectionSnapshot) : m.collectionSnapshot; + if (o.oneofs) + d._collectionSnapshot = "collectionSnapshot"; } if (m.isCompressed != null && m.hasOwnProperty("isCompressed")) { d.isCompressed = m.isCompressed; + if (o.oneofs) + d._isCompressed = "isCompressed"; } return d; }; @@ -51052,8 +59657,22 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - WaffleNonceFetchResponse.prototype.nonce = ""; - WaffleNonceFetchResponse.prototype.waEntFbid = ""; + WaffleNonceFetchResponse.prototype.nonce = null; + WaffleNonceFetchResponse.prototype.waEntFbid = null; + + let $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) + }); WaffleNonceFetchResponse.create = function create(properties) { return new WaffleNonceFetchResponse(properties); @@ -51111,15 +59730,15 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.nonce = ""; - d.waEntFbid = ""; - } if (m.nonce != null && m.hasOwnProperty("nonce")) { d.nonce = m.nonce; + if (o.oneofs) + d._nonce = "nonce"; } if (m.waEntFbid != null && m.hasOwnProperty("waEntFbid")) { d.waEntFbid = m.waEntFbid; + if (o.oneofs) + d._waEntFbid = "waEntFbid"; } return d; }; @@ -51171,8 +59790,28 @@ export const proto = $root.proto = (() => { } PinInChatMessage.prototype.key = null; - PinInChatMessage.prototype.type = 0; - PinInChatMessage.prototype.senderTimestampMs = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + PinInChatMessage.prototype.type = null; + PinInChatMessage.prototype.senderTimestampMs = null; + + let $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) + }); PinInChatMessage.create = function create(properties) { return new PinInChatMessage(properties); @@ -51265,26 +59904,23 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.key = null; - d.type = o.enums === String ? "UNKNOWN_TYPE" : 0; - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.senderTimestampMs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.senderTimestampMs = o.longs === String ? "0" : 0; - } if (m.key != null && m.hasOwnProperty("key")) { d.key = $root.proto.MessageKey.toObject(m.key, o); + if (o.oneofs) + d._key = "key"; } if (m.type != null && m.hasOwnProperty("type")) { d.type = o.enums === String ? $root.proto.Message.PinInChatMessage.Type[m.type] === undefined ? m.type : $root.proto.Message.PinInChatMessage.Type[m.type] : m.type; + if (o.oneofs) + d._type = "type"; } if (m.senderTimestampMs != null && m.hasOwnProperty("senderTimestampMs")) { if (typeof m.senderTimestampMs === "number") d.senderTimestampMs = o.longs === String ? String(m.senderTimestampMs) : m.senderTimestampMs; else d.senderTimestampMs = o.longs === String ? longToString(m.senderTimestampMs) : o.longs === Number ? longToNumber(m.senderTimestampMs) : m.senderTimestampMs; + if (o.oneofs) + d._senderTimestampMs = "senderTimestampMs"; } return d; }; @@ -51320,7 +59956,15 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - PlaceholderMessage.prototype.type = 0; + PlaceholderMessage.prototype.type = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PlaceholderMessage.prototype, "_type", { + get: $util.oneOfGetter($oneOfFields = ["type"]), + set: $util.oneOfSetter($oneOfFields) + }); PlaceholderMessage.create = function create(properties) { return new PlaceholderMessage(properties); @@ -51378,11 +60022,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.type = o.enums === String ? "MASK_LINKED_DEVICES" : 0; - } if (m.type != null && m.hasOwnProperty("type")) { d.type = o.enums === String ? $root.proto.Message.PlaceholderMessage.PlaceholderType[m.type] === undefined ? m.type : $root.proto.Message.PlaceholderMessage.PlaceholderType[m.type] : m.type; + if (o.oneofs) + d._type = "type"; } return d; }; @@ -51425,16 +60068,72 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - PollCreationMessage.prototype.encKey = $util.newBuffer([]); - PollCreationMessage.prototype.name = ""; + PollCreationMessage.prototype.encKey = null; + PollCreationMessage.prototype.name = null; PollCreationMessage.prototype.options = $util.emptyArray; - PollCreationMessage.prototype.selectableOptionsCount = 0; + PollCreationMessage.prototype.selectableOptionsCount = null; PollCreationMessage.prototype.contextInfo = null; - PollCreationMessage.prototype.pollContentType = 0; - PollCreationMessage.prototype.pollType = 0; + PollCreationMessage.prototype.pollContentType = null; + PollCreationMessage.prototype.pollType = null; PollCreationMessage.prototype.correctAnswer = null; - PollCreationMessage.prototype.endTime = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - PollCreationMessage.prototype.hideParticipantName = false; + PollCreationMessage.prototype.endTime = null; + PollCreationMessage.prototype.hideParticipantName = null; + + let $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) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PollCreationMessage.prototype, "_endTime", { + get: $util.oneOfGetter($oneOfFields = ["endTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PollCreationMessage.prototype, "_hideParticipantName", { + get: $util.oneOfGetter($oneOfFields = ["hideParticipantName"]), + set: $util.oneOfSetter($oneOfFields) + }); PollCreationMessage.create = function create(properties) { return new PollCreationMessage(properties); @@ -51622,32 +60321,15 @@ export const proto = $root.proto = (() => { if (o.arrays || o.defaults) { d.options = []; } - if (o.defaults) { - if (o.bytes === String) - d.encKey = ""; - else { - d.encKey = []; - if (o.bytes !== Array) - d.encKey = $util.newBuffer(d.encKey); - } - d.name = ""; - d.selectableOptionsCount = 0; - d.contextInfo = null; - d.pollContentType = o.enums === String ? "UNKNOWN" : 0; - d.pollType = o.enums === String ? "POLL" : 0; - d.correctAnswer = null; - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.endTime = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.endTime = o.longs === String ? "0" : 0; - d.hideParticipantName = false; - } if (m.encKey != null && m.hasOwnProperty("encKey")) { d.encKey = o.bytes === String ? $util.base64.encode(m.encKey, 0, m.encKey.length) : o.bytes === Array ? Array.prototype.slice.call(m.encKey) : m.encKey; + if (o.oneofs) + d._encKey = "encKey"; } if (m.name != null && m.hasOwnProperty("name")) { d.name = m.name; + if (o.oneofs) + d._name = "name"; } if (m.options && m.options.length) { d.options = []; @@ -51657,27 +60339,41 @@ export const proto = $root.proto = (() => { } if (m.selectableOptionsCount != null && m.hasOwnProperty("selectableOptionsCount")) { d.selectableOptionsCount = m.selectableOptionsCount; + if (o.oneofs) + d._selectableOptionsCount = "selectableOptionsCount"; } if (m.contextInfo != null && m.hasOwnProperty("contextInfo")) { d.contextInfo = $root.proto.ContextInfo.toObject(m.contextInfo, o); + if (o.oneofs) + d._contextInfo = "contextInfo"; } if (m.pollContentType != null && m.hasOwnProperty("pollContentType")) { d.pollContentType = o.enums === String ? $root.proto.Message.PollContentType[m.pollContentType] === undefined ? m.pollContentType : $root.proto.Message.PollContentType[m.pollContentType] : m.pollContentType; + if (o.oneofs) + d._pollContentType = "pollContentType"; } if (m.pollType != null && m.hasOwnProperty("pollType")) { d.pollType = o.enums === String ? $root.proto.Message.PollType[m.pollType] === undefined ? m.pollType : $root.proto.Message.PollType[m.pollType] : m.pollType; + if (o.oneofs) + d._pollType = "pollType"; } if (m.correctAnswer != null && m.hasOwnProperty("correctAnswer")) { d.correctAnswer = $root.proto.Message.PollCreationMessage.Option.toObject(m.correctAnswer, o); + if (o.oneofs) + d._correctAnswer = "correctAnswer"; } if (m.endTime != null && m.hasOwnProperty("endTime")) { if (typeof m.endTime === "number") d.endTime = o.longs === String ? String(m.endTime) : m.endTime; else d.endTime = o.longs === String ? longToString(m.endTime) : o.longs === Number ? longToNumber(m.endTime) : m.endTime; + if (o.oneofs) + d._endTime = "endTime"; } if (m.hideParticipantName != null && m.hasOwnProperty("hideParticipantName")) { d.hideParticipantName = m.hideParticipantName; + if (o.oneofs) + d._hideParticipantName = "hideParticipantName"; } return d; }; @@ -51702,8 +60398,22 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - Option.prototype.optionName = ""; - Option.prototype.optionHash = ""; + Option.prototype.optionName = null; + Option.prototype.optionHash = null; + + let $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) + }); Option.create = function create(properties) { return new Option(properties); @@ -51761,15 +60471,15 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.optionName = ""; - d.optionHash = ""; - } if (m.optionName != null && m.hasOwnProperty("optionName")) { d.optionName = m.optionName; + if (o.oneofs) + d._optionName = "optionName"; } if (m.optionHash != null && m.hasOwnProperty("optionHash")) { d.optionHash = m.optionHash; + if (o.oneofs) + d._optionHash = "optionHash"; } return d; }; @@ -51800,8 +60510,22 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - PollEncValue.prototype.encPayload = $util.newBuffer([]); - PollEncValue.prototype.encIv = $util.newBuffer([]); + PollEncValue.prototype.encPayload = null; + PollEncValue.prototype.encIv = null; + + let $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) + }); PollEncValue.create = function create(properties) { return new PollEncValue(properties); @@ -51865,27 +60589,15 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - if (o.bytes === String) - d.encPayload = ""; - else { - d.encPayload = []; - if (o.bytes !== Array) - d.encPayload = $util.newBuffer(d.encPayload); - } - if (o.bytes === String) - d.encIv = ""; - else { - d.encIv = []; - if (o.bytes !== Array) - d.encIv = $util.newBuffer(d.encIv); - } - } if (m.encPayload != null && m.hasOwnProperty("encPayload")) { d.encPayload = o.bytes === String ? $util.base64.encode(m.encPayload, 0, m.encPayload.length) : o.bytes === Array ? Array.prototype.slice.call(m.encPayload) : m.encPayload; + if (o.oneofs) + d._encPayload = "encPayload"; } if (m.encIv != null && m.hasOwnProperty("encIv")) { d.encIv = o.bytes === String ? $util.base64.encode(m.encIv, 0, m.encIv.length) : o.bytes === Array ? Array.prototype.slice.call(m.encIv) : m.encIv; + if (o.oneofs) + d._encIv = "encIv"; } return d; }; @@ -51914,10 +60626,30 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - PollResultSnapshotMessage.prototype.name = ""; + PollResultSnapshotMessage.prototype.name = null; PollResultSnapshotMessage.prototype.pollVotes = $util.emptyArray; PollResultSnapshotMessage.prototype.contextInfo = null; - PollResultSnapshotMessage.prototype.pollType = 0; + PollResultSnapshotMessage.prototype.pollType = null; + + let $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) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PollResultSnapshotMessage.prototype, "_pollType", { + get: $util.oneOfGetter($oneOfFields = ["pollType"]), + set: $util.oneOfSetter($oneOfFields) + }); PollResultSnapshotMessage.create = function create(properties) { return new PollResultSnapshotMessage(properties); @@ -52022,13 +60754,10 @@ export const proto = $root.proto = (() => { if (o.arrays || o.defaults) { d.pollVotes = []; } - if (o.defaults) { - d.name = ""; - d.contextInfo = null; - d.pollType = o.enums === String ? "POLL" : 0; - } if (m.name != null && m.hasOwnProperty("name")) { d.name = m.name; + if (o.oneofs) + d._name = "name"; } if (m.pollVotes && m.pollVotes.length) { d.pollVotes = []; @@ -52038,9 +60767,13 @@ export const proto = $root.proto = (() => { } if (m.contextInfo != null && m.hasOwnProperty("contextInfo")) { d.contextInfo = $root.proto.ContextInfo.toObject(m.contextInfo, o); + if (o.oneofs) + d._contextInfo = "contextInfo"; } if (m.pollType != null && m.hasOwnProperty("pollType")) { d.pollType = o.enums === String ? $root.proto.Message.PollType[m.pollType] === undefined ? m.pollType : $root.proto.Message.PollType[m.pollType] : m.pollType; + if (o.oneofs) + d._pollType = "pollType"; } return d; }; @@ -52065,8 +60798,22 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - PollVote.prototype.optionName = ""; - PollVote.prototype.optionVoteCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + PollVote.prototype.optionName = null; + PollVote.prototype.optionVoteCount = null; + + let $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) + }); PollVote.create = function create(properties) { return new PollVote(properties); @@ -52131,22 +60878,18 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.optionName = ""; - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.optionVoteCount = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.optionVoteCount = o.longs === String ? "0" : 0; - } if (m.optionName != null && m.hasOwnProperty("optionName")) { d.optionName = m.optionName; + if (o.oneofs) + d._optionName = "optionName"; } if (m.optionVoteCount != null && m.hasOwnProperty("optionVoteCount")) { if (typeof m.optionVoteCount === "number") d.optionVoteCount = o.longs === String ? String(m.optionVoteCount) : m.optionVoteCount; else d.optionVoteCount = o.longs === String ? longToString(m.optionVoteCount) : o.longs === Number ? longToNumber(m.optionVoteCount) : m.optionVoteCount; + if (o.oneofs) + d._optionVoteCount = "optionVoteCount"; } return d; }; @@ -52187,7 +60930,33 @@ export const proto = $root.proto = (() => { PollUpdateMessage.prototype.pollCreationMessageKey = null; PollUpdateMessage.prototype.vote = null; PollUpdateMessage.prototype.metadata = null; - PollUpdateMessage.prototype.senderTimestampMs = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + PollUpdateMessage.prototype.senderTimestampMs = null; + + let $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) + }); PollUpdateMessage.create = function create(properties) { return new PollUpdateMessage(properties); @@ -52276,30 +61045,28 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.pollCreationMessageKey = null; - d.vote = null; - d.metadata = null; - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.senderTimestampMs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.senderTimestampMs = o.longs === String ? "0" : 0; - } if (m.pollCreationMessageKey != null && m.hasOwnProperty("pollCreationMessageKey")) { d.pollCreationMessageKey = $root.proto.MessageKey.toObject(m.pollCreationMessageKey, o); + if (o.oneofs) + d._pollCreationMessageKey = "pollCreationMessageKey"; } if (m.vote != null && m.hasOwnProperty("vote")) { d.vote = $root.proto.Message.PollEncValue.toObject(m.vote, o); + if (o.oneofs) + d._vote = "vote"; } if (m.metadata != null && m.hasOwnProperty("metadata")) { d.metadata = $root.proto.Message.PollUpdateMessageMetadata.toObject(m.metadata, o); + if (o.oneofs) + d._metadata = "metadata"; } if (m.senderTimestampMs != null && m.hasOwnProperty("senderTimestampMs")) { if (typeof m.senderTimestampMs === "number") d.senderTimestampMs = o.longs === String ? String(m.senderTimestampMs) : m.senderTimestampMs; else d.senderTimestampMs = o.longs === String ? longToString(m.senderTimestampMs) : o.longs === Number ? longToNumber(m.senderTimestampMs) : m.senderTimestampMs; + if (o.oneofs) + d._senderTimestampMs = "senderTimestampMs"; } return d; }; @@ -52485,12 +61252,50 @@ export const proto = $root.proto = (() => { } ProductMessage.prototype.product = null; - ProductMessage.prototype.businessOwnerJid = ""; + ProductMessage.prototype.businessOwnerJid = null; ProductMessage.prototype.catalog = null; - ProductMessage.prototype.body = ""; - ProductMessage.prototype.footer = ""; + ProductMessage.prototype.body = null; + ProductMessage.prototype.footer = null; ProductMessage.prototype.contextInfo = null; + let $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) + }); + ProductMessage.create = function create(properties) { return new ProductMessage(properties); }; @@ -52589,31 +61394,35 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.product = null; - d.businessOwnerJid = ""; - d.catalog = null; - d.body = ""; - d.footer = ""; - d.contextInfo = null; - } if (m.product != null && m.hasOwnProperty("product")) { d.product = $root.proto.Message.ProductMessage.ProductSnapshot.toObject(m.product, o); + if (o.oneofs) + d._product = "product"; } if (m.businessOwnerJid != null && m.hasOwnProperty("businessOwnerJid")) { d.businessOwnerJid = m.businessOwnerJid; + if (o.oneofs) + d._businessOwnerJid = "businessOwnerJid"; } if (m.catalog != null && m.hasOwnProperty("catalog")) { d.catalog = $root.proto.Message.ProductMessage.CatalogSnapshot.toObject(m.catalog, o); + if (o.oneofs) + d._catalog = "catalog"; } if (m.body != null && m.hasOwnProperty("body")) { d.body = m.body; + if (o.oneofs) + d._body = "body"; } if (m.footer != null && m.hasOwnProperty("footer")) { d.footer = m.footer; + if (o.oneofs) + d._footer = "footer"; } if (m.contextInfo != null && m.hasOwnProperty("contextInfo")) { d.contextInfo = $root.proto.ContextInfo.toObject(m.contextInfo, o); + if (o.oneofs) + d._contextInfo = "contextInfo"; } return d; }; @@ -52639,8 +61448,28 @@ export const proto = $root.proto = (() => { } CatalogSnapshot.prototype.catalogImage = null; - CatalogSnapshot.prototype.title = ""; - CatalogSnapshot.prototype.description = ""; + CatalogSnapshot.prototype.title = null; + CatalogSnapshot.prototype.description = null; + + let $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) + }); CatalogSnapshot.create = function create(properties) { return new CatalogSnapshot(properties); @@ -52709,19 +61538,20 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.catalogImage = null; - d.title = ""; - d.description = ""; - } if (m.catalogImage != null && m.hasOwnProperty("catalogImage")) { d.catalogImage = $root.proto.Message.ImageMessage.toObject(m.catalogImage, o); + if (o.oneofs) + d._catalogImage = "catalogImage"; } if (m.title != null && m.hasOwnProperty("title")) { d.title = m.title; + if (o.oneofs) + d._title = "title"; } if (m.description != null && m.hasOwnProperty("description")) { d.description = m.description; + if (o.oneofs) + d._description = "description"; } return d; }; @@ -52750,17 +61580,91 @@ export const proto = $root.proto = (() => { } ProductSnapshot.prototype.productImage = null; - ProductSnapshot.prototype.productId = ""; - ProductSnapshot.prototype.title = ""; - ProductSnapshot.prototype.description = ""; - ProductSnapshot.prototype.currencyCode = ""; - ProductSnapshot.prototype.priceAmount1000 = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - ProductSnapshot.prototype.retailerId = ""; - ProductSnapshot.prototype.url = ""; - ProductSnapshot.prototype.productImageCount = 0; - ProductSnapshot.prototype.firstImageId = ""; - ProductSnapshot.prototype.salePriceAmount1000 = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - ProductSnapshot.prototype.signedUrl = ""; + ProductSnapshot.prototype.productId = null; + ProductSnapshot.prototype.title = null; + ProductSnapshot.prototype.description = null; + ProductSnapshot.prototype.currencyCode = null; + ProductSnapshot.prototype.priceAmount1000 = null; + ProductSnapshot.prototype.retailerId = null; + ProductSnapshot.prototype.url = null; + ProductSnapshot.prototype.productImageCount = null; + ProductSnapshot.prototype.firstImageId = null; + ProductSnapshot.prototype.salePriceAmount1000 = null; + ProductSnapshot.prototype.signedUrl = null; + + let $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) + }); ProductSnapshot.create = function create(properties) { return new ProductSnapshot(properties); @@ -52924,69 +61828,71 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.productImage = null; - d.productId = ""; - d.title = ""; - d.description = ""; - d.currencyCode = ""; - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.priceAmount1000 = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.priceAmount1000 = o.longs === String ? "0" : 0; - d.retailerId = ""; - d.url = ""; - d.productImageCount = 0; - d.firstImageId = ""; - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.salePriceAmount1000 = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.salePriceAmount1000 = o.longs === String ? "0" : 0; - d.signedUrl = ""; - } if (m.productImage != null && m.hasOwnProperty("productImage")) { d.productImage = $root.proto.Message.ImageMessage.toObject(m.productImage, o); + if (o.oneofs) + d._productImage = "productImage"; } if (m.productId != null && m.hasOwnProperty("productId")) { d.productId = m.productId; + if (o.oneofs) + d._productId = "productId"; } if (m.title != null && m.hasOwnProperty("title")) { d.title = m.title; + if (o.oneofs) + d._title = "title"; } if (m.description != null && m.hasOwnProperty("description")) { d.description = m.description; + if (o.oneofs) + d._description = "description"; } if (m.currencyCode != null && m.hasOwnProperty("currencyCode")) { d.currencyCode = m.currencyCode; + if (o.oneofs) + d._currencyCode = "currencyCode"; } if (m.priceAmount1000 != null && m.hasOwnProperty("priceAmount1000")) { if (typeof m.priceAmount1000 === "number") d.priceAmount1000 = o.longs === String ? String(m.priceAmount1000) : m.priceAmount1000; else d.priceAmount1000 = o.longs === String ? longToString(m.priceAmount1000) : o.longs === Number ? longToNumber(m.priceAmount1000) : m.priceAmount1000; + if (o.oneofs) + d._priceAmount1000 = "priceAmount1000"; } if (m.retailerId != null && m.hasOwnProperty("retailerId")) { d.retailerId = m.retailerId; + if (o.oneofs) + d._retailerId = "retailerId"; } if (m.url != null && m.hasOwnProperty("url")) { d.url = m.url; + if (o.oneofs) + d._url = "url"; } if (m.productImageCount != null && m.hasOwnProperty("productImageCount")) { d.productImageCount = m.productImageCount; + if (o.oneofs) + d._productImageCount = "productImageCount"; } if (m.firstImageId != null && m.hasOwnProperty("firstImageId")) { d.firstImageId = m.firstImageId; + if (o.oneofs) + d._firstImageId = "firstImageId"; } if (m.salePriceAmount1000 != null && m.hasOwnProperty("salePriceAmount1000")) { if (typeof m.salePriceAmount1000 === "number") d.salePriceAmount1000 = o.longs === String ? String(m.salePriceAmount1000) : m.salePriceAmount1000; else d.salePriceAmount1000 = o.longs === String ? longToString(m.salePriceAmount1000) : o.longs === Number ? longToNumber(m.salePriceAmount1000) : m.salePriceAmount1000; + if (o.oneofs) + d._salePriceAmount1000 = "salePriceAmount1000"; } if (m.signedUrl != null && m.hasOwnProperty("signedUrl")) { d.signedUrl = m.signedUrl; + if (o.oneofs) + d._signedUrl = "signedUrl"; } return d; }; @@ -53018,9 +61924,9 @@ export const proto = $root.proto = (() => { } ProtocolMessage.prototype.key = null; - ProtocolMessage.prototype.type = 0; - ProtocolMessage.prototype.ephemeralExpiration = 0; - ProtocolMessage.prototype.ephemeralSettingTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + ProtocolMessage.prototype.type = null; + ProtocolMessage.prototype.ephemeralExpiration = null; + ProtocolMessage.prototype.ephemeralSettingTimestamp = null; ProtocolMessage.prototype.historySyncNotification = null; ProtocolMessage.prototype.appStateSyncKeyShare = null; ProtocolMessage.prototype.appStateSyncKeyRequest = null; @@ -53028,21 +61934,173 @@ export const proto = $root.proto = (() => { ProtocolMessage.prototype.appStateFatalExceptionNotification = null; ProtocolMessage.prototype.disappearingMode = null; ProtocolMessage.prototype.editedMessage = null; - ProtocolMessage.prototype.timestampMs = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + ProtocolMessage.prototype.timestampMs = null; ProtocolMessage.prototype.peerDataOperationRequestMessage = null; ProtocolMessage.prototype.peerDataOperationRequestResponseMessage = null; ProtocolMessage.prototype.botFeedbackMessage = null; - ProtocolMessage.prototype.invokerJid = ""; + ProtocolMessage.prototype.invokerJid = null; ProtocolMessage.prototype.requestWelcomeMessageMetadata = null; ProtocolMessage.prototype.mediaNotifyMessage = null; ProtocolMessage.prototype.cloudApiThreadControlNotification = null; ProtocolMessage.prototype.lidMigrationMappingSyncMessage = null; ProtocolMessage.prototype.limitSharing = null; - ProtocolMessage.prototype.aiPsiMetadata = $util.newBuffer([]); + ProtocolMessage.prototype.aiPsiMetadata = null; ProtocolMessage.prototype.aiQueryFanout = null; ProtocolMessage.prototype.memberLabel = null; ProtocolMessage.prototype.aiMediaCollectionMessage = null; + let $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) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ProtocolMessage.prototype, "_aiPsiMetadata", { + get: $util.oneOfGetter($oneOfFields = ["aiPsiMetadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ProtocolMessage.prototype, "_aiQueryFanout", { + get: $util.oneOfGetter($oneOfFields = ["aiQueryFanout"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ProtocolMessage.prototype, "_memberLabel", { + get: $util.oneOfGetter($oneOfFields = ["memberLabel"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ProtocolMessage.prototype, "_aiMediaCollectionMessage", { + get: $util.oneOfGetter($oneOfFields = ["aiMediaCollectionMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + ProtocolMessage.create = function create(properties) { return new ProtocolMessage(properties); }; @@ -53478,127 +62536,136 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.key = null; - d.type = o.enums === String ? "REVOKE" : 0; - d.ephemeralExpiration = 0; - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.ephemeralSettingTimestamp = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.ephemeralSettingTimestamp = o.longs === String ? "0" : 0; - d.historySyncNotification = null; - d.appStateSyncKeyShare = null; - d.appStateSyncKeyRequest = null; - d.initialSecurityNotificationSettingSync = null; - d.appStateFatalExceptionNotification = null; - d.disappearingMode = null; - d.editedMessage = null; - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.timestampMs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.timestampMs = o.longs === String ? "0" : 0; - d.peerDataOperationRequestMessage = null; - d.peerDataOperationRequestResponseMessage = null; - d.botFeedbackMessage = null; - d.invokerJid = ""; - d.requestWelcomeMessageMetadata = null; - d.mediaNotifyMessage = null; - d.cloudApiThreadControlNotification = null; - d.lidMigrationMappingSyncMessage = null; - d.limitSharing = null; - if (o.bytes === String) - d.aiPsiMetadata = ""; - else { - d.aiPsiMetadata = []; - if (o.bytes !== Array) - d.aiPsiMetadata = $util.newBuffer(d.aiPsiMetadata); - } - d.aiQueryFanout = null; - d.memberLabel = null; - d.aiMediaCollectionMessage = null; - } if (m.key != null && m.hasOwnProperty("key")) { d.key = $root.proto.MessageKey.toObject(m.key, o); + if (o.oneofs) + d._key = "key"; } if (m.type != null && m.hasOwnProperty("type")) { d.type = o.enums === String ? $root.proto.Message.ProtocolMessage.Type[m.type] === undefined ? m.type : $root.proto.Message.ProtocolMessage.Type[m.type] : m.type; + if (o.oneofs) + d._type = "type"; } if (m.ephemeralExpiration != null && m.hasOwnProperty("ephemeralExpiration")) { d.ephemeralExpiration = m.ephemeralExpiration; + if (o.oneofs) + d._ephemeralExpiration = "ephemeralExpiration"; } if (m.ephemeralSettingTimestamp != null && m.hasOwnProperty("ephemeralSettingTimestamp")) { if (typeof m.ephemeralSettingTimestamp === "number") d.ephemeralSettingTimestamp = o.longs === String ? String(m.ephemeralSettingTimestamp) : m.ephemeralSettingTimestamp; else d.ephemeralSettingTimestamp = o.longs === String ? longToString(m.ephemeralSettingTimestamp) : o.longs === Number ? longToNumber(m.ephemeralSettingTimestamp) : m.ephemeralSettingTimestamp; + if (o.oneofs) + d._ephemeralSettingTimestamp = "ephemeralSettingTimestamp"; } if (m.historySyncNotification != null && m.hasOwnProperty("historySyncNotification")) { d.historySyncNotification = $root.proto.Message.HistorySyncNotification.toObject(m.historySyncNotification, o); + if (o.oneofs) + d._historySyncNotification = "historySyncNotification"; } if (m.appStateSyncKeyShare != null && m.hasOwnProperty("appStateSyncKeyShare")) { d.appStateSyncKeyShare = $root.proto.Message.AppStateSyncKeyShare.toObject(m.appStateSyncKeyShare, o); + if (o.oneofs) + d._appStateSyncKeyShare = "appStateSyncKeyShare"; } if (m.appStateSyncKeyRequest != null && m.hasOwnProperty("appStateSyncKeyRequest")) { d.appStateSyncKeyRequest = $root.proto.Message.AppStateSyncKeyRequest.toObject(m.appStateSyncKeyRequest, o); + if (o.oneofs) + d._appStateSyncKeyRequest = "appStateSyncKeyRequest"; } if (m.initialSecurityNotificationSettingSync != null && m.hasOwnProperty("initialSecurityNotificationSettingSync")) { d.initialSecurityNotificationSettingSync = $root.proto.Message.InitialSecurityNotificationSettingSync.toObject(m.initialSecurityNotificationSettingSync, o); + if (o.oneofs) + d._initialSecurityNotificationSettingSync = "initialSecurityNotificationSettingSync"; } if (m.appStateFatalExceptionNotification != null && m.hasOwnProperty("appStateFatalExceptionNotification")) { d.appStateFatalExceptionNotification = $root.proto.Message.AppStateFatalExceptionNotification.toObject(m.appStateFatalExceptionNotification, o); + if (o.oneofs) + d._appStateFatalExceptionNotification = "appStateFatalExceptionNotification"; } if (m.disappearingMode != null && m.hasOwnProperty("disappearingMode")) { d.disappearingMode = $root.proto.DisappearingMode.toObject(m.disappearingMode, o); + if (o.oneofs) + d._disappearingMode = "disappearingMode"; } if (m.editedMessage != null && m.hasOwnProperty("editedMessage")) { d.editedMessage = $root.proto.Message.toObject(m.editedMessage, o); + if (o.oneofs) + d._editedMessage = "editedMessage"; } if (m.timestampMs != null && m.hasOwnProperty("timestampMs")) { if (typeof m.timestampMs === "number") d.timestampMs = o.longs === String ? String(m.timestampMs) : m.timestampMs; else d.timestampMs = o.longs === String ? longToString(m.timestampMs) : o.longs === Number ? longToNumber(m.timestampMs) : m.timestampMs; + if (o.oneofs) + d._timestampMs = "timestampMs"; } if (m.peerDataOperationRequestMessage != null && m.hasOwnProperty("peerDataOperationRequestMessage")) { d.peerDataOperationRequestMessage = $root.proto.Message.PeerDataOperationRequestMessage.toObject(m.peerDataOperationRequestMessage, o); + if (o.oneofs) + d._peerDataOperationRequestMessage = "peerDataOperationRequestMessage"; } if (m.peerDataOperationRequestResponseMessage != null && m.hasOwnProperty("peerDataOperationRequestResponseMessage")) { d.peerDataOperationRequestResponseMessage = $root.proto.Message.PeerDataOperationRequestResponseMessage.toObject(m.peerDataOperationRequestResponseMessage, o); + if (o.oneofs) + d._peerDataOperationRequestResponseMessage = "peerDataOperationRequestResponseMessage"; } if (m.botFeedbackMessage != null && m.hasOwnProperty("botFeedbackMessage")) { d.botFeedbackMessage = $root.proto.BotFeedbackMessage.toObject(m.botFeedbackMessage, o); + if (o.oneofs) + d._botFeedbackMessage = "botFeedbackMessage"; } if (m.invokerJid != null && m.hasOwnProperty("invokerJid")) { d.invokerJid = m.invokerJid; + if (o.oneofs) + d._invokerJid = "invokerJid"; } if (m.requestWelcomeMessageMetadata != null && m.hasOwnProperty("requestWelcomeMessageMetadata")) { d.requestWelcomeMessageMetadata = $root.proto.Message.RequestWelcomeMessageMetadata.toObject(m.requestWelcomeMessageMetadata, o); + if (o.oneofs) + d._requestWelcomeMessageMetadata = "requestWelcomeMessageMetadata"; } if (m.mediaNotifyMessage != null && m.hasOwnProperty("mediaNotifyMessage")) { d.mediaNotifyMessage = $root.proto.MediaNotifyMessage.toObject(m.mediaNotifyMessage, o); + if (o.oneofs) + d._mediaNotifyMessage = "mediaNotifyMessage"; } if (m.cloudApiThreadControlNotification != null && m.hasOwnProperty("cloudApiThreadControlNotification")) { d.cloudApiThreadControlNotification = $root.proto.Message.CloudAPIThreadControlNotification.toObject(m.cloudApiThreadControlNotification, o); + if (o.oneofs) + d._cloudApiThreadControlNotification = "cloudApiThreadControlNotification"; } if (m.lidMigrationMappingSyncMessage != null && m.hasOwnProperty("lidMigrationMappingSyncMessage")) { d.lidMigrationMappingSyncMessage = $root.proto.LIDMigrationMappingSyncMessage.toObject(m.lidMigrationMappingSyncMessage, o); + if (o.oneofs) + d._lidMigrationMappingSyncMessage = "lidMigrationMappingSyncMessage"; } if (m.limitSharing != null && m.hasOwnProperty("limitSharing")) { d.limitSharing = $root.proto.LimitSharing.toObject(m.limitSharing, o); + if (o.oneofs) + d._limitSharing = "limitSharing"; } if (m.aiPsiMetadata != null && m.hasOwnProperty("aiPsiMetadata")) { d.aiPsiMetadata = o.bytes === String ? $util.base64.encode(m.aiPsiMetadata, 0, m.aiPsiMetadata.length) : o.bytes === Array ? Array.prototype.slice.call(m.aiPsiMetadata) : m.aiPsiMetadata; + if (o.oneofs) + d._aiPsiMetadata = "aiPsiMetadata"; } if (m.aiQueryFanout != null && m.hasOwnProperty("aiQueryFanout")) { d.aiQueryFanout = $root.proto.AIQueryFanout.toObject(m.aiQueryFanout, o); + if (o.oneofs) + d._aiQueryFanout = "aiQueryFanout"; } if (m.memberLabel != null && m.hasOwnProperty("memberLabel")) { d.memberLabel = $root.proto.MemberLabel.toObject(m.memberLabel, o); + if (o.oneofs) + d._memberLabel = "memberLabel"; } if (m.aiMediaCollectionMessage != null && m.hasOwnProperty("aiMediaCollectionMessage")) { d.aiMediaCollectionMessage = $root.proto.AIMediaCollectionMessage.toObject(m.aiMediaCollectionMessage, o); + if (o.oneofs) + d._aiMediaCollectionMessage = "aiMediaCollectionMessage"; } return d; }; @@ -53660,7 +62727,21 @@ export const proto = $root.proto = (() => { } QuestionResponseMessage.prototype.key = null; - QuestionResponseMessage.prototype.text = ""; + QuestionResponseMessage.prototype.text = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(QuestionResponseMessage.prototype, "_key", { + get: $util.oneOfGetter($oneOfFields = ["key"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(QuestionResponseMessage.prototype, "_text", { + get: $util.oneOfGetter($oneOfFields = ["text"]), + set: $util.oneOfSetter($oneOfFields) + }); QuestionResponseMessage.create = function create(properties) { return new QuestionResponseMessage(properties); @@ -53720,15 +62801,15 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.key = null; - d.text = ""; - } if (m.key != null && m.hasOwnProperty("key")) { d.key = $root.proto.MessageKey.toObject(m.key, o); + if (o.oneofs) + d._key = "key"; } if (m.text != null && m.hasOwnProperty("text")) { d.text = m.text; + if (o.oneofs) + d._text = "text"; } return d; }; @@ -53757,9 +62838,35 @@ export const proto = $root.proto = (() => { } ReactionMessage.prototype.key = null; - ReactionMessage.prototype.text = ""; - ReactionMessage.prototype.groupingKey = ""; - ReactionMessage.prototype.senderTimestampMs = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + ReactionMessage.prototype.text = null; + ReactionMessage.prototype.groupingKey = null; + ReactionMessage.prototype.senderTimestampMs = null; + + let $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) + }); ReactionMessage.create = function create(properties) { return new ReactionMessage(properties); @@ -53844,30 +62951,28 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.key = null; - d.text = ""; - d.groupingKey = ""; - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.senderTimestampMs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.senderTimestampMs = o.longs === String ? "0" : 0; - } if (m.key != null && m.hasOwnProperty("key")) { d.key = $root.proto.MessageKey.toObject(m.key, o); + if (o.oneofs) + d._key = "key"; } if (m.text != null && m.hasOwnProperty("text")) { d.text = m.text; + if (o.oneofs) + d._text = "text"; } if (m.groupingKey != null && m.hasOwnProperty("groupingKey")) { d.groupingKey = m.groupingKey; + if (o.oneofs) + d._groupingKey = "groupingKey"; } if (m.senderTimestampMs != null && m.hasOwnProperty("senderTimestampMs")) { if (typeof m.senderTimestampMs === "number") d.senderTimestampMs = o.longs === String ? String(m.senderTimestampMs) : m.senderTimestampMs; else d.senderTimestampMs = o.longs === String ? longToString(m.senderTimestampMs) : o.longs === Number ? longToNumber(m.senderTimestampMs) : m.senderTimestampMs; + if (o.oneofs) + d._senderTimestampMs = "senderTimestampMs"; } return d; }; @@ -53896,13 +63001,57 @@ export const proto = $root.proto = (() => { } RequestPaymentMessage.prototype.noteMessage = null; - RequestPaymentMessage.prototype.currencyCodeIso4217 = ""; - RequestPaymentMessage.prototype.amount1000 = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - RequestPaymentMessage.prototype.requestFrom = ""; - RequestPaymentMessage.prototype.expiryTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + RequestPaymentMessage.prototype.currencyCodeIso4217 = null; + RequestPaymentMessage.prototype.amount1000 = null; + RequestPaymentMessage.prototype.requestFrom = null; + RequestPaymentMessage.prototype.expiryTimestamp = null; RequestPaymentMessage.prototype.amount = null; RequestPaymentMessage.prototype.background = null; + let $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) + }); + RequestPaymentMessage.create = function create(properties) { return new RequestPaymentMessage(properties); }; @@ -54024,49 +63173,46 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.currencyCodeIso4217 = ""; - if ($util.Long) { - var n = new $util.Long(0, 0, true); - d.amount1000 = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.amount1000 = o.longs === String ? "0" : 0; - d.requestFrom = ""; - d.noteMessage = null; - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.expiryTimestamp = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.expiryTimestamp = o.longs === String ? "0" : 0; - d.amount = null; - d.background = null; - } if (m.currencyCodeIso4217 != null && m.hasOwnProperty("currencyCodeIso4217")) { d.currencyCodeIso4217 = m.currencyCodeIso4217; + if (o.oneofs) + d._currencyCodeIso4217 = "currencyCodeIso4217"; } if (m.amount1000 != null && m.hasOwnProperty("amount1000")) { if (typeof m.amount1000 === "number") d.amount1000 = o.longs === String ? String(m.amount1000) : m.amount1000; else d.amount1000 = o.longs === String ? longToString(m.amount1000, true) : o.longs === Number ? longToNumber(m.amount1000, true) : m.amount1000; + if (o.oneofs) + d._amount1000 = "amount1000"; } if (m.requestFrom != null && m.hasOwnProperty("requestFrom")) { d.requestFrom = m.requestFrom; + if (o.oneofs) + d._requestFrom = "requestFrom"; } if (m.noteMessage != null && m.hasOwnProperty("noteMessage")) { d.noteMessage = $root.proto.Message.toObject(m.noteMessage, o); + if (o.oneofs) + d._noteMessage = "noteMessage"; } if (m.expiryTimestamp != null && m.hasOwnProperty("expiryTimestamp")) { if (typeof m.expiryTimestamp === "number") d.expiryTimestamp = o.longs === String ? String(m.expiryTimestamp) : m.expiryTimestamp; else d.expiryTimestamp = o.longs === String ? longToString(m.expiryTimestamp) : o.longs === Number ? longToNumber(m.expiryTimestamp) : m.expiryTimestamp; + if (o.oneofs) + d._expiryTimestamp = "expiryTimestamp"; } if (m.amount != null && m.hasOwnProperty("amount")) { d.amount = $root.proto.Money.toObject(m.amount, o); + if (o.oneofs) + d._amount = "amount"; } if (m.background != null && m.hasOwnProperty("background")) { d.background = $root.proto.PaymentBackground.toObject(m.background, o); + if (o.oneofs) + d._background = "background"; } return d; }; @@ -54096,6 +63242,14 @@ export const proto = $root.proto = (() => { RequestPhoneNumberMessage.prototype.contextInfo = null; + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(RequestPhoneNumberMessage.prototype, "_contextInfo", { + get: $util.oneOfGetter($oneOfFields = ["contextInfo"]), + set: $util.oneOfSetter($oneOfFields) + }); + RequestPhoneNumberMessage.create = function create(properties) { return new RequestPhoneNumberMessage(properties); }; @@ -54145,11 +63299,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.contextInfo = null; - } if (m.contextInfo != null && m.hasOwnProperty("contextInfo")) { d.contextInfo = $root.proto.ContextInfo.toObject(m.contextInfo, o); + if (o.oneofs) + d._contextInfo = "contextInfo"; } return d; }; @@ -54177,7 +63330,15 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - RequestWelcomeMessageMetadata.prototype.localChatState = 0; + RequestWelcomeMessageMetadata.prototype.localChatState = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(RequestWelcomeMessageMetadata.prototype, "_localChatState", { + get: $util.oneOfGetter($oneOfFields = ["localChatState"]), + set: $util.oneOfSetter($oneOfFields) + }); RequestWelcomeMessageMetadata.create = function create(properties) { return new RequestWelcomeMessageMetadata(properties); @@ -54239,11 +63400,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.localChatState = o.enums === String ? "EMPTY" : 0; - } if (m.localChatState != null && m.hasOwnProperty("localChatState")) { d.localChatState = o.enums === String ? $root.proto.Message.RequestWelcomeMessageMetadata.LocalChatState[m.localChatState] === undefined ? m.localChatState : $root.proto.Message.RequestWelcomeMessageMetadata.LocalChatState[m.localChatState] : m.localChatState; + if (o.oneofs) + d._localChatState = "localChatState"; } return d; }; @@ -54278,9 +63438,29 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - ScheduledCallCreationMessage.prototype.scheduledTimestampMs = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - ScheduledCallCreationMessage.prototype.callType = 0; - ScheduledCallCreationMessage.prototype.title = ""; + ScheduledCallCreationMessage.prototype.scheduledTimestampMs = null; + ScheduledCallCreationMessage.prototype.callType = null; + ScheduledCallCreationMessage.prototype.title = null; + + let $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) + }); ScheduledCallCreationMessage.create = function create(properties) { return new ScheduledCallCreationMessage(properties); @@ -54371,26 +63551,23 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.scheduledTimestampMs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.scheduledTimestampMs = o.longs === String ? "0" : 0; - d.callType = o.enums === String ? "UNKNOWN" : 0; - d.title = ""; - } if (m.scheduledTimestampMs != null && m.hasOwnProperty("scheduledTimestampMs")) { if (typeof m.scheduledTimestampMs === "number") d.scheduledTimestampMs = o.longs === String ? String(m.scheduledTimestampMs) : m.scheduledTimestampMs; else d.scheduledTimestampMs = o.longs === String ? longToString(m.scheduledTimestampMs) : o.longs === Number ? longToNumber(m.scheduledTimestampMs) : m.scheduledTimestampMs; + if (o.oneofs) + d._scheduledTimestampMs = "scheduledTimestampMs"; } if (m.callType != null && m.hasOwnProperty("callType")) { d.callType = o.enums === String ? $root.proto.Message.ScheduledCallCreationMessage.CallType[m.callType] === undefined ? m.callType : $root.proto.Message.ScheduledCallCreationMessage.CallType[m.callType] : m.callType; + if (o.oneofs) + d._callType = "callType"; } if (m.title != null && m.hasOwnProperty("title")) { d.title = m.title; + if (o.oneofs) + d._title = "title"; } return d; }; @@ -54427,7 +63604,21 @@ export const proto = $root.proto = (() => { } ScheduledCallEditMessage.prototype.key = null; - ScheduledCallEditMessage.prototype.editType = 0; + ScheduledCallEditMessage.prototype.editType = null; + + let $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) + }); ScheduledCallEditMessage.create = function create(properties) { return new ScheduledCallEditMessage(properties); @@ -54500,15 +63691,15 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.key = null; - d.editType = o.enums === String ? "UNKNOWN" : 0; - } if (m.key != null && m.hasOwnProperty("key")) { d.key = $root.proto.MessageKey.toObject(m.key, o); + if (o.oneofs) + d._key = "key"; } if (m.editType != null && m.hasOwnProperty("editType")) { d.editType = o.enums === String ? $root.proto.Message.ScheduledCallEditMessage.EditType[m.editType] === undefined ? m.editType : $root.proto.Message.ScheduledCallEditMessage.EditType[m.editType] : m.editType; + if (o.oneofs) + d._editType = "editType"; } return d; }; @@ -54544,10 +63735,42 @@ export const proto = $root.proto = (() => { } SecretEncryptedMessage.prototype.targetMessageKey = null; - SecretEncryptedMessage.prototype.encPayload = $util.newBuffer([]); - SecretEncryptedMessage.prototype.encIv = $util.newBuffer([]); - SecretEncryptedMessage.prototype.secretEncType = 0; - SecretEncryptedMessage.prototype.remoteKeyId = ""; + SecretEncryptedMessage.prototype.encPayload = null; + SecretEncryptedMessage.prototype.encIv = null; + SecretEncryptedMessage.prototype.secretEncType = null; + SecretEncryptedMessage.prototype.remoteKeyId = null; + + let $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) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SecretEncryptedMessage.prototype, "_remoteKeyId", { + get: $util.oneOfGetter($oneOfFields = ["remoteKeyId"]), + set: $util.oneOfSetter($oneOfFields) + }); SecretEncryptedMessage.create = function create(properties) { return new SecretEncryptedMessage(properties); @@ -54665,39 +63888,30 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.targetMessageKey = null; - if (o.bytes === String) - d.encPayload = ""; - else { - d.encPayload = []; - if (o.bytes !== Array) - d.encPayload = $util.newBuffer(d.encPayload); - } - if (o.bytes === String) - d.encIv = ""; - else { - d.encIv = []; - if (o.bytes !== Array) - d.encIv = $util.newBuffer(d.encIv); - } - d.secretEncType = o.enums === String ? "UNKNOWN" : 0; - d.remoteKeyId = ""; - } if (m.targetMessageKey != null && m.hasOwnProperty("targetMessageKey")) { d.targetMessageKey = $root.proto.MessageKey.toObject(m.targetMessageKey, o); + if (o.oneofs) + d._targetMessageKey = "targetMessageKey"; } if (m.encPayload != null && m.hasOwnProperty("encPayload")) { d.encPayload = o.bytes === String ? $util.base64.encode(m.encPayload, 0, m.encPayload.length) : o.bytes === Array ? Array.prototype.slice.call(m.encPayload) : m.encPayload; + if (o.oneofs) + d._encPayload = "encPayload"; } if (m.encIv != null && m.hasOwnProperty("encIv")) { d.encIv = o.bytes === String ? $util.base64.encode(m.encIv, 0, m.encIv.length) : o.bytes === Array ? Array.prototype.slice.call(m.encIv) : m.encIv; + if (o.oneofs) + d._encIv = "encIv"; } if (m.secretEncType != null && m.hasOwnProperty("secretEncType")) { d.secretEncType = o.enums === String ? $root.proto.Message.SecretEncryptedMessage.SecretEncType[m.secretEncType] === undefined ? m.secretEncType : $root.proto.Message.SecretEncryptedMessage.SecretEncType[m.secretEncType] : m.secretEncType; + if (o.oneofs) + d._secretEncType = "secretEncType"; } if (m.remoteKeyId != null && m.hasOwnProperty("remoteKeyId")) { d.remoteKeyId = m.remoteKeyId; + if (o.oneofs) + d._remoteKeyId = "remoteKeyId"; } return d; }; @@ -54738,7 +63952,33 @@ export const proto = $root.proto = (() => { SendPaymentMessage.prototype.noteMessage = null; SendPaymentMessage.prototype.requestMessageKey = null; SendPaymentMessage.prototype.background = null; - SendPaymentMessage.prototype.transactionData = ""; + SendPaymentMessage.prototype.transactionData = null; + + let $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) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SendPaymentMessage.prototype, "_transactionData", { + get: $util.oneOfGetter($oneOfFields = ["transactionData"]), + set: $util.oneOfSetter($oneOfFields) + }); SendPaymentMessage.create = function create(properties) { return new SendPaymentMessage(properties); @@ -54820,23 +64060,25 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.noteMessage = null; - d.requestMessageKey = null; - d.background = null; - d.transactionData = ""; - } if (m.noteMessage != null && m.hasOwnProperty("noteMessage")) { d.noteMessage = $root.proto.Message.toObject(m.noteMessage, o); + if (o.oneofs) + d._noteMessage = "noteMessage"; } if (m.requestMessageKey != null && m.hasOwnProperty("requestMessageKey")) { d.requestMessageKey = $root.proto.MessageKey.toObject(m.requestMessageKey, o); + if (o.oneofs) + d._requestMessageKey = "requestMessageKey"; } if (m.background != null && m.hasOwnProperty("background")) { d.background = $root.proto.PaymentBackground.toObject(m.background, o); + if (o.oneofs) + d._background = "background"; } if (m.transactionData != null && m.hasOwnProperty("transactionData")) { d.transactionData = m.transactionData; + if (o.oneofs) + d._transactionData = "transactionData"; } return d; }; @@ -54864,8 +64106,22 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - SenderKeyDistributionMessage.prototype.groupId = ""; - SenderKeyDistributionMessage.prototype.axolotlSenderKeyDistributionMessage = $util.newBuffer([]); + SenderKeyDistributionMessage.prototype.groupId = null; + SenderKeyDistributionMessage.prototype.axolotlSenderKeyDistributionMessage = null; + + let $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) + }); SenderKeyDistributionMessage.create = function create(properties) { return new SenderKeyDistributionMessage(properties); @@ -54926,21 +64182,15 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.groupId = ""; - if (o.bytes === String) - d.axolotlSenderKeyDistributionMessage = ""; - else { - d.axolotlSenderKeyDistributionMessage = []; - if (o.bytes !== Array) - d.axolotlSenderKeyDistributionMessage = $util.newBuffer(d.axolotlSenderKeyDistributionMessage); - } - } if (m.groupId != null && m.hasOwnProperty("groupId")) { d.groupId = m.groupId; + if (o.oneofs) + d._groupId = "groupId"; } if (m.axolotlSenderKeyDistributionMessage != null && m.hasOwnProperty("axolotlSenderKeyDistributionMessage")) { d.axolotlSenderKeyDistributionMessage = o.bytes === String ? $util.base64.encode(m.axolotlSenderKeyDistributionMessage, 0, m.axolotlSenderKeyDistributionMessage.length) : o.bytes === Array ? Array.prototype.slice.call(m.axolotlSenderKeyDistributionMessage) : m.axolotlSenderKeyDistributionMessage; + if (o.oneofs) + d._axolotlSenderKeyDistributionMessage = "axolotlSenderKeyDistributionMessage"; } return d; }; @@ -54970,7 +64220,27 @@ export const proto = $root.proto = (() => { StatusNotificationMessage.prototype.responseMessageKey = null; StatusNotificationMessage.prototype.originalMessageKey = null; - StatusNotificationMessage.prototype.type = 0; + StatusNotificationMessage.prototype.type = null; + + let $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) + }); StatusNotificationMessage.create = function create(properties) { return new StatusNotificationMessage(properties); @@ -55062,19 +64332,20 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.responseMessageKey = null; - d.originalMessageKey = null; - d.type = o.enums === String ? "UNKNOWN" : 0; - } if (m.responseMessageKey != null && m.hasOwnProperty("responseMessageKey")) { d.responseMessageKey = $root.proto.MessageKey.toObject(m.responseMessageKey, o); + if (o.oneofs) + d._responseMessageKey = "responseMessageKey"; } if (m.originalMessageKey != null && m.hasOwnProperty("originalMessageKey")) { d.originalMessageKey = $root.proto.MessageKey.toObject(m.originalMessageKey, o); + if (o.oneofs) + d._originalMessageKey = "originalMessageKey"; } if (m.type != null && m.hasOwnProperty("type")) { d.type = o.enums === String ? $root.proto.Message.StatusNotificationMessage.StatusNotificationType[m.type] === undefined ? m.type : $root.proto.Message.StatusNotificationMessage.StatusNotificationType[m.type] : m.type; + if (o.oneofs) + d._type = "type"; } return d; }; @@ -55112,7 +64383,21 @@ export const proto = $root.proto = (() => { } StatusQuestionAnswerMessage.prototype.key = null; - StatusQuestionAnswerMessage.prototype.text = ""; + StatusQuestionAnswerMessage.prototype.text = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StatusQuestionAnswerMessage.prototype, "_key", { + get: $util.oneOfGetter($oneOfFields = ["key"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StatusQuestionAnswerMessage.prototype, "_text", { + get: $util.oneOfGetter($oneOfFields = ["text"]), + set: $util.oneOfSetter($oneOfFields) + }); StatusQuestionAnswerMessage.create = function create(properties) { return new StatusQuestionAnswerMessage(properties); @@ -55172,15 +64457,15 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.key = null; - d.text = ""; - } if (m.key != null && m.hasOwnProperty("key")) { d.key = $root.proto.MessageKey.toObject(m.key, o); + if (o.oneofs) + d._key = "key"; } if (m.text != null && m.hasOwnProperty("text")) { d.text = m.text; + if (o.oneofs) + d._text = "text"; } return d; }; @@ -55208,11 +64493,37 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - StatusQuotedMessage.prototype.type = 1; - StatusQuotedMessage.prototype.text = ""; - StatusQuotedMessage.prototype.thumbnail = $util.newBuffer([]); + StatusQuotedMessage.prototype.type = null; + StatusQuotedMessage.prototype.text = null; + StatusQuotedMessage.prototype.thumbnail = null; StatusQuotedMessage.prototype.originalStatusId = null; + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StatusQuotedMessage.prototype, "_type", { + get: $util.oneOfGetter($oneOfFields = ["type"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StatusQuotedMessage.prototype, "_text", { + get: $util.oneOfGetter($oneOfFields = ["text"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StatusQuotedMessage.prototype, "_thumbnail", { + get: $util.oneOfGetter($oneOfFields = ["thumbnail"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StatusQuotedMessage.prototype, "_originalStatusId", { + get: $util.oneOfGetter($oneOfFields = ["originalStatusId"]), + set: $util.oneOfSetter($oneOfFields) + }); + StatusQuotedMessage.create = function create(properties) { return new StatusQuotedMessage(properties); }; @@ -55301,29 +64612,25 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.type = o.enums === String ? "QUESTION_ANSWER" : 1; - d.text = ""; - if (o.bytes === String) - d.thumbnail = ""; - else { - d.thumbnail = []; - if (o.bytes !== Array) - d.thumbnail = $util.newBuffer(d.thumbnail); - } - d.originalStatusId = null; - } if (m.type != null && m.hasOwnProperty("type")) { d.type = o.enums === String ? $root.proto.Message.StatusQuotedMessage.StatusQuotedMessageType[m.type] === undefined ? m.type : $root.proto.Message.StatusQuotedMessage.StatusQuotedMessageType[m.type] : m.type; + if (o.oneofs) + d._type = "type"; } if (m.text != null && m.hasOwnProperty("text")) { d.text = m.text; + if (o.oneofs) + d._text = "text"; } if (m.thumbnail != null && m.hasOwnProperty("thumbnail")) { d.thumbnail = o.bytes === String ? $util.base64.encode(m.thumbnail, 0, m.thumbnail.length) : o.bytes === Array ? Array.prototype.slice.call(m.thumbnail) : m.thumbnail; + if (o.oneofs) + d._thumbnail = "thumbnail"; } if (m.originalStatusId != null && m.hasOwnProperty("originalStatusId")) { d.originalStatusId = $root.proto.MessageKey.toObject(m.originalStatusId, o); + if (o.oneofs) + d._originalStatusId = "originalStatusId"; } return d; }; @@ -55358,8 +64665,28 @@ export const proto = $root.proto = (() => { } StatusStickerInteractionMessage.prototype.key = null; - StatusStickerInteractionMessage.prototype.stickerKey = ""; - StatusStickerInteractionMessage.prototype.type = 0; + StatusStickerInteractionMessage.prototype.stickerKey = null; + StatusStickerInteractionMessage.prototype.type = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StatusStickerInteractionMessage.prototype, "_key", { + get: $util.oneOfGetter($oneOfFields = ["key"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StatusStickerInteractionMessage.prototype, "_stickerKey", { + get: $util.oneOfGetter($oneOfFields = ["stickerKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StatusStickerInteractionMessage.prototype, "_type", { + get: $util.oneOfGetter($oneOfFields = ["type"]), + set: $util.oneOfSetter($oneOfFields) + }); StatusStickerInteractionMessage.create = function create(properties) { return new StatusStickerInteractionMessage(properties); @@ -55441,19 +64768,20 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.key = null; - d.stickerKey = ""; - d.type = o.enums === String ? "UNKNOWN" : 0; - } if (m.key != null && m.hasOwnProperty("key")) { d.key = $root.proto.MessageKey.toObject(m.key, o); + if (o.oneofs) + d._key = "key"; } if (m.stickerKey != null && m.hasOwnProperty("stickerKey")) { d.stickerKey = m.stickerKey; + if (o.oneofs) + d._stickerKey = "stickerKey"; } if (m.type != null && m.hasOwnProperty("type")) { d.type = o.enums === String ? $root.proto.Message.StatusStickerInteractionMessage.StatusStickerType[m.type] === undefined ? m.type : $root.proto.Message.StatusStickerInteractionMessage.StatusStickerType[m.type] : m.type; + if (o.oneofs) + d._type = "type"; } return d; }; @@ -55488,27 +64816,155 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - StickerMessage.prototype.url = ""; - StickerMessage.prototype.fileSha256 = $util.newBuffer([]); - StickerMessage.prototype.fileEncSha256 = $util.newBuffer([]); - StickerMessage.prototype.mediaKey = $util.newBuffer([]); - StickerMessage.prototype.mimetype = ""; - StickerMessage.prototype.height = 0; - StickerMessage.prototype.width = 0; - StickerMessage.prototype.directPath = ""; - StickerMessage.prototype.fileLength = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - StickerMessage.prototype.mediaKeyTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - StickerMessage.prototype.firstFrameLength = 0; - StickerMessage.prototype.firstFrameSidecar = $util.newBuffer([]); - StickerMessage.prototype.isAnimated = false; - StickerMessage.prototype.pngThumbnail = $util.newBuffer([]); + StickerMessage.prototype.url = null; + StickerMessage.prototype.fileSha256 = null; + StickerMessage.prototype.fileEncSha256 = null; + StickerMessage.prototype.mediaKey = null; + StickerMessage.prototype.mimetype = null; + StickerMessage.prototype.height = null; + StickerMessage.prototype.width = null; + StickerMessage.prototype.directPath = null; + StickerMessage.prototype.fileLength = null; + StickerMessage.prototype.mediaKeyTimestamp = null; + StickerMessage.prototype.firstFrameLength = null; + StickerMessage.prototype.firstFrameSidecar = null; + StickerMessage.prototype.isAnimated = null; + StickerMessage.prototype.pngThumbnail = null; StickerMessage.prototype.contextInfo = null; - StickerMessage.prototype.stickerSentTs = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - StickerMessage.prototype.isAvatar = false; - StickerMessage.prototype.isAiSticker = false; - StickerMessage.prototype.isLottie = false; - StickerMessage.prototype.accessibilityLabel = ""; - StickerMessage.prototype.premium = 0; + StickerMessage.prototype.stickerSentTs = null; + StickerMessage.prototype.isAvatar = null; + StickerMessage.prototype.isAiSticker = null; + StickerMessage.prototype.isLottie = null; + StickerMessage.prototype.accessibilityLabel = null; + StickerMessage.prototype.premium = null; + + let $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) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StickerMessage.prototype, "_premium", { + get: $util.oneOfGetter($oneOfFields = ["premium"]), + set: $util.oneOfSetter($oneOfFields) + }); StickerMessage.create = function create(properties) { return new StickerMessage(properties); @@ -55775,142 +65231,119 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.url = ""; - if (o.bytes === String) - d.fileSha256 = ""; - else { - d.fileSha256 = []; - if (o.bytes !== Array) - d.fileSha256 = $util.newBuffer(d.fileSha256); - } - if (o.bytes === String) - d.fileEncSha256 = ""; - else { - d.fileEncSha256 = []; - if (o.bytes !== Array) - d.fileEncSha256 = $util.newBuffer(d.fileEncSha256); - } - if (o.bytes === String) - d.mediaKey = ""; - else { - d.mediaKey = []; - if (o.bytes !== Array) - d.mediaKey = $util.newBuffer(d.mediaKey); - } - d.mimetype = ""; - d.height = 0; - d.width = 0; - d.directPath = ""; - if ($util.Long) { - var n = new $util.Long(0, 0, true); - d.fileLength = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.fileLength = o.longs === String ? "0" : 0; - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.mediaKeyTimestamp = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.mediaKeyTimestamp = o.longs === String ? "0" : 0; - d.firstFrameLength = 0; - if (o.bytes === String) - d.firstFrameSidecar = ""; - else { - d.firstFrameSidecar = []; - if (o.bytes !== Array) - d.firstFrameSidecar = $util.newBuffer(d.firstFrameSidecar); - } - d.isAnimated = false; - if (o.bytes === String) - d.pngThumbnail = ""; - else { - d.pngThumbnail = []; - if (o.bytes !== Array) - d.pngThumbnail = $util.newBuffer(d.pngThumbnail); - } - d.contextInfo = null; - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.stickerSentTs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.stickerSentTs = o.longs === String ? "0" : 0; - d.isAvatar = false; - d.isAiSticker = false; - d.isLottie = false; - d.accessibilityLabel = ""; - d.premium = 0; - } if (m.url != null && m.hasOwnProperty("url")) { d.url = m.url; + if (o.oneofs) + d._url = "url"; } if (m.fileSha256 != null && m.hasOwnProperty("fileSha256")) { d.fileSha256 = o.bytes === String ? $util.base64.encode(m.fileSha256, 0, m.fileSha256.length) : o.bytes === Array ? Array.prototype.slice.call(m.fileSha256) : m.fileSha256; + if (o.oneofs) + d._fileSha256 = "fileSha256"; } if (m.fileEncSha256 != null && m.hasOwnProperty("fileEncSha256")) { d.fileEncSha256 = o.bytes === String ? $util.base64.encode(m.fileEncSha256, 0, m.fileEncSha256.length) : o.bytes === Array ? Array.prototype.slice.call(m.fileEncSha256) : m.fileEncSha256; + if (o.oneofs) + d._fileEncSha256 = "fileEncSha256"; } if (m.mediaKey != null && m.hasOwnProperty("mediaKey")) { d.mediaKey = o.bytes === String ? $util.base64.encode(m.mediaKey, 0, m.mediaKey.length) : o.bytes === Array ? Array.prototype.slice.call(m.mediaKey) : m.mediaKey; + if (o.oneofs) + d._mediaKey = "mediaKey"; } if (m.mimetype != null && m.hasOwnProperty("mimetype")) { d.mimetype = m.mimetype; + if (o.oneofs) + d._mimetype = "mimetype"; } if (m.height != null && m.hasOwnProperty("height")) { d.height = m.height; + if (o.oneofs) + d._height = "height"; } if (m.width != null && m.hasOwnProperty("width")) { d.width = m.width; + if (o.oneofs) + d._width = "width"; } if (m.directPath != null && m.hasOwnProperty("directPath")) { d.directPath = m.directPath; + if (o.oneofs) + d._directPath = "directPath"; } if (m.fileLength != null && m.hasOwnProperty("fileLength")) { if (typeof m.fileLength === "number") d.fileLength = o.longs === String ? String(m.fileLength) : m.fileLength; else d.fileLength = o.longs === String ? longToString(m.fileLength, true) : o.longs === Number ? longToNumber(m.fileLength, true) : m.fileLength; + if (o.oneofs) + d._fileLength = "fileLength"; } if (m.mediaKeyTimestamp != null && m.hasOwnProperty("mediaKeyTimestamp")) { if (typeof m.mediaKeyTimestamp === "number") d.mediaKeyTimestamp = o.longs === String ? String(m.mediaKeyTimestamp) : m.mediaKeyTimestamp; else d.mediaKeyTimestamp = o.longs === String ? longToString(m.mediaKeyTimestamp) : o.longs === Number ? longToNumber(m.mediaKeyTimestamp) : m.mediaKeyTimestamp; + if (o.oneofs) + d._mediaKeyTimestamp = "mediaKeyTimestamp"; } if (m.firstFrameLength != null && m.hasOwnProperty("firstFrameLength")) { d.firstFrameLength = m.firstFrameLength; + if (o.oneofs) + d._firstFrameLength = "firstFrameLength"; } if (m.firstFrameSidecar != null && m.hasOwnProperty("firstFrameSidecar")) { d.firstFrameSidecar = o.bytes === String ? $util.base64.encode(m.firstFrameSidecar, 0, m.firstFrameSidecar.length) : o.bytes === Array ? Array.prototype.slice.call(m.firstFrameSidecar) : m.firstFrameSidecar; + if (o.oneofs) + d._firstFrameSidecar = "firstFrameSidecar"; } if (m.isAnimated != null && m.hasOwnProperty("isAnimated")) { d.isAnimated = m.isAnimated; + if (o.oneofs) + d._isAnimated = "isAnimated"; } if (m.pngThumbnail != null && m.hasOwnProperty("pngThumbnail")) { d.pngThumbnail = o.bytes === String ? $util.base64.encode(m.pngThumbnail, 0, m.pngThumbnail.length) : o.bytes === Array ? Array.prototype.slice.call(m.pngThumbnail) : m.pngThumbnail; + if (o.oneofs) + d._pngThumbnail = "pngThumbnail"; } if (m.contextInfo != null && m.hasOwnProperty("contextInfo")) { d.contextInfo = $root.proto.ContextInfo.toObject(m.contextInfo, o); + if (o.oneofs) + d._contextInfo = "contextInfo"; } if (m.stickerSentTs != null && m.hasOwnProperty("stickerSentTs")) { if (typeof m.stickerSentTs === "number") d.stickerSentTs = o.longs === String ? String(m.stickerSentTs) : m.stickerSentTs; else d.stickerSentTs = o.longs === String ? longToString(m.stickerSentTs) : o.longs === Number ? longToNumber(m.stickerSentTs) : m.stickerSentTs; + if (o.oneofs) + d._stickerSentTs = "stickerSentTs"; } if (m.isAvatar != null && m.hasOwnProperty("isAvatar")) { d.isAvatar = m.isAvatar; + if (o.oneofs) + d._isAvatar = "isAvatar"; } if (m.isAiSticker != null && m.hasOwnProperty("isAiSticker")) { d.isAiSticker = m.isAiSticker; + if (o.oneofs) + d._isAiSticker = "isAiSticker"; } if (m.isLottie != null && m.hasOwnProperty("isLottie")) { d.isLottie = m.isLottie; + if (o.oneofs) + d._isLottie = "isLottie"; } if (m.accessibilityLabel != null && m.hasOwnProperty("accessibilityLabel")) { d.accessibilityLabel = m.accessibilityLabel; + if (o.oneofs) + d._accessibilityLabel = "accessibilityLabel"; } if (m.premium != null && m.hasOwnProperty("premium")) { d.premium = m.premium; + if (o.oneofs) + d._premium = "premium"; } return d; }; @@ -55939,28 +65372,156 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - StickerPackMessage.prototype.stickerPackId = ""; - StickerPackMessage.prototype.name = ""; - StickerPackMessage.prototype.publisher = ""; + StickerPackMessage.prototype.stickerPackId = null; + StickerPackMessage.prototype.name = null; + StickerPackMessage.prototype.publisher = null; StickerPackMessage.prototype.stickers = $util.emptyArray; - StickerPackMessage.prototype.fileLength = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - StickerPackMessage.prototype.fileSha256 = $util.newBuffer([]); - StickerPackMessage.prototype.fileEncSha256 = $util.newBuffer([]); - StickerPackMessage.prototype.mediaKey = $util.newBuffer([]); - StickerPackMessage.prototype.directPath = ""; - StickerPackMessage.prototype.caption = ""; + StickerPackMessage.prototype.fileLength = null; + StickerPackMessage.prototype.fileSha256 = null; + StickerPackMessage.prototype.fileEncSha256 = null; + StickerPackMessage.prototype.mediaKey = null; + StickerPackMessage.prototype.directPath = null; + StickerPackMessage.prototype.caption = null; StickerPackMessage.prototype.contextInfo = null; - StickerPackMessage.prototype.packDescription = ""; - StickerPackMessage.prototype.mediaKeyTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - StickerPackMessage.prototype.trayIconFileName = ""; - StickerPackMessage.prototype.thumbnailDirectPath = ""; - StickerPackMessage.prototype.thumbnailSha256 = $util.newBuffer([]); - StickerPackMessage.prototype.thumbnailEncSha256 = $util.newBuffer([]); - StickerPackMessage.prototype.thumbnailHeight = 0; - StickerPackMessage.prototype.thumbnailWidth = 0; - StickerPackMessage.prototype.imageDataHash = ""; - StickerPackMessage.prototype.stickerPackSize = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - StickerPackMessage.prototype.stickerPackOrigin = 0; + StickerPackMessage.prototype.packDescription = null; + StickerPackMessage.prototype.mediaKeyTimestamp = null; + StickerPackMessage.prototype.trayIconFileName = null; + StickerPackMessage.prototype.thumbnailDirectPath = null; + StickerPackMessage.prototype.thumbnailSha256 = null; + StickerPackMessage.prototype.thumbnailEncSha256 = null; + StickerPackMessage.prototype.thumbnailHeight = null; + StickerPackMessage.prototype.thumbnailWidth = null; + StickerPackMessage.prototype.imageDataHash = null; + StickerPackMessage.prototype.stickerPackSize = null; + StickerPackMessage.prototype.stickerPackOrigin = null; + + let $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) + }); StickerPackMessage.create = function create(properties) { return new StickerPackMessage(properties); @@ -56267,79 +65828,20 @@ export const proto = $root.proto = (() => { if (o.arrays || o.defaults) { d.stickers = []; } - if (o.defaults) { - d.stickerPackId = ""; - d.name = ""; - d.publisher = ""; - if ($util.Long) { - var n = new $util.Long(0, 0, true); - d.fileLength = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.fileLength = o.longs === String ? "0" : 0; - if (o.bytes === String) - d.fileSha256 = ""; - else { - d.fileSha256 = []; - if (o.bytes !== Array) - d.fileSha256 = $util.newBuffer(d.fileSha256); - } - if (o.bytes === String) - d.fileEncSha256 = ""; - else { - d.fileEncSha256 = []; - if (o.bytes !== Array) - d.fileEncSha256 = $util.newBuffer(d.fileEncSha256); - } - if (o.bytes === String) - d.mediaKey = ""; - else { - d.mediaKey = []; - if (o.bytes !== Array) - d.mediaKey = $util.newBuffer(d.mediaKey); - } - d.directPath = ""; - d.caption = ""; - d.contextInfo = null; - d.packDescription = ""; - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.mediaKeyTimestamp = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.mediaKeyTimestamp = o.longs === String ? "0" : 0; - d.trayIconFileName = ""; - d.thumbnailDirectPath = ""; - if (o.bytes === String) - d.thumbnailSha256 = ""; - else { - d.thumbnailSha256 = []; - if (o.bytes !== Array) - d.thumbnailSha256 = $util.newBuffer(d.thumbnailSha256); - } - if (o.bytes === String) - d.thumbnailEncSha256 = ""; - else { - d.thumbnailEncSha256 = []; - if (o.bytes !== Array) - d.thumbnailEncSha256 = $util.newBuffer(d.thumbnailEncSha256); - } - d.thumbnailHeight = 0; - d.thumbnailWidth = 0; - d.imageDataHash = ""; - if ($util.Long) { - var n = new $util.Long(0, 0, true); - d.stickerPackSize = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.stickerPackSize = o.longs === String ? "0" : 0; - d.stickerPackOrigin = o.enums === String ? "FIRST_PARTY" : 0; - } if (m.stickerPackId != null && m.hasOwnProperty("stickerPackId")) { d.stickerPackId = m.stickerPackId; + if (o.oneofs) + d._stickerPackId = "stickerPackId"; } if (m.name != null && m.hasOwnProperty("name")) { d.name = m.name; + if (o.oneofs) + d._name = "name"; } if (m.publisher != null && m.hasOwnProperty("publisher")) { d.publisher = m.publisher; + if (o.oneofs) + d._publisher = "publisher"; } if (m.stickers && m.stickers.length) { d.stickers = []; @@ -56352,63 +65854,99 @@ export const proto = $root.proto = (() => { d.fileLength = o.longs === String ? String(m.fileLength) : m.fileLength; else d.fileLength = o.longs === String ? longToString(m.fileLength, true) : o.longs === Number ? longToNumber(m.fileLength, true) : m.fileLength; + if (o.oneofs) + d._fileLength = "fileLength"; } if (m.fileSha256 != null && m.hasOwnProperty("fileSha256")) { d.fileSha256 = o.bytes === String ? $util.base64.encode(m.fileSha256, 0, m.fileSha256.length) : o.bytes === Array ? Array.prototype.slice.call(m.fileSha256) : m.fileSha256; + if (o.oneofs) + d._fileSha256 = "fileSha256"; } if (m.fileEncSha256 != null && m.hasOwnProperty("fileEncSha256")) { d.fileEncSha256 = o.bytes === String ? $util.base64.encode(m.fileEncSha256, 0, m.fileEncSha256.length) : o.bytes === Array ? Array.prototype.slice.call(m.fileEncSha256) : m.fileEncSha256; + if (o.oneofs) + d._fileEncSha256 = "fileEncSha256"; } if (m.mediaKey != null && m.hasOwnProperty("mediaKey")) { d.mediaKey = o.bytes === String ? $util.base64.encode(m.mediaKey, 0, m.mediaKey.length) : o.bytes === Array ? Array.prototype.slice.call(m.mediaKey) : m.mediaKey; + if (o.oneofs) + d._mediaKey = "mediaKey"; } if (m.directPath != null && m.hasOwnProperty("directPath")) { d.directPath = m.directPath; + if (o.oneofs) + d._directPath = "directPath"; } if (m.caption != null && m.hasOwnProperty("caption")) { d.caption = m.caption; + if (o.oneofs) + d._caption = "caption"; } if (m.contextInfo != null && m.hasOwnProperty("contextInfo")) { d.contextInfo = $root.proto.ContextInfo.toObject(m.contextInfo, o); + if (o.oneofs) + d._contextInfo = "contextInfo"; } if (m.packDescription != null && m.hasOwnProperty("packDescription")) { d.packDescription = m.packDescription; + if (o.oneofs) + d._packDescription = "packDescription"; } if (m.mediaKeyTimestamp != null && m.hasOwnProperty("mediaKeyTimestamp")) { if (typeof m.mediaKeyTimestamp === "number") d.mediaKeyTimestamp = o.longs === String ? String(m.mediaKeyTimestamp) : m.mediaKeyTimestamp; else d.mediaKeyTimestamp = o.longs === String ? longToString(m.mediaKeyTimestamp) : o.longs === Number ? longToNumber(m.mediaKeyTimestamp) : m.mediaKeyTimestamp; + if (o.oneofs) + d._mediaKeyTimestamp = "mediaKeyTimestamp"; } if (m.trayIconFileName != null && m.hasOwnProperty("trayIconFileName")) { d.trayIconFileName = m.trayIconFileName; + if (o.oneofs) + d._trayIconFileName = "trayIconFileName"; } if (m.thumbnailDirectPath != null && m.hasOwnProperty("thumbnailDirectPath")) { d.thumbnailDirectPath = m.thumbnailDirectPath; + if (o.oneofs) + d._thumbnailDirectPath = "thumbnailDirectPath"; } if (m.thumbnailSha256 != null && m.hasOwnProperty("thumbnailSha256")) { d.thumbnailSha256 = o.bytes === String ? $util.base64.encode(m.thumbnailSha256, 0, m.thumbnailSha256.length) : o.bytes === Array ? Array.prototype.slice.call(m.thumbnailSha256) : m.thumbnailSha256; + if (o.oneofs) + d._thumbnailSha256 = "thumbnailSha256"; } if (m.thumbnailEncSha256 != null && m.hasOwnProperty("thumbnailEncSha256")) { d.thumbnailEncSha256 = o.bytes === String ? $util.base64.encode(m.thumbnailEncSha256, 0, m.thumbnailEncSha256.length) : o.bytes === Array ? Array.prototype.slice.call(m.thumbnailEncSha256) : m.thumbnailEncSha256; + if (o.oneofs) + d._thumbnailEncSha256 = "thumbnailEncSha256"; } if (m.thumbnailHeight != null && m.hasOwnProperty("thumbnailHeight")) { d.thumbnailHeight = m.thumbnailHeight; + if (o.oneofs) + d._thumbnailHeight = "thumbnailHeight"; } if (m.thumbnailWidth != null && m.hasOwnProperty("thumbnailWidth")) { d.thumbnailWidth = m.thumbnailWidth; + if (o.oneofs) + d._thumbnailWidth = "thumbnailWidth"; } if (m.imageDataHash != null && m.hasOwnProperty("imageDataHash")) { d.imageDataHash = m.imageDataHash; + if (o.oneofs) + d._imageDataHash = "imageDataHash"; } if (m.stickerPackSize != null && m.hasOwnProperty("stickerPackSize")) { if (typeof m.stickerPackSize === "number") d.stickerPackSize = o.longs === String ? String(m.stickerPackSize) : m.stickerPackSize; else d.stickerPackSize = o.longs === String ? longToString(m.stickerPackSize, true) : o.longs === Number ? longToNumber(m.stickerPackSize, true) : m.stickerPackSize; + if (o.oneofs) + d._stickerPackSize = "stickerPackSize"; } if (m.stickerPackOrigin != null && m.hasOwnProperty("stickerPackOrigin")) { d.stickerPackOrigin = o.enums === String ? $root.proto.Message.StickerPackMessage.StickerPackOrigin[m.stickerPackOrigin] === undefined ? m.stickerPackOrigin : $root.proto.Message.StickerPackMessage.StickerPackOrigin[m.stickerPackOrigin] : m.stickerPackOrigin; + if (o.oneofs) + d._stickerPackOrigin = "stickerPackOrigin"; } return d; }; @@ -56434,12 +65972,44 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - Sticker.prototype.fileName = ""; - Sticker.prototype.isAnimated = false; + Sticker.prototype.fileName = null; + Sticker.prototype.isAnimated = null; Sticker.prototype.emojis = $util.emptyArray; - Sticker.prototype.accessibilityLabel = ""; - Sticker.prototype.isLottie = false; - Sticker.prototype.mimetype = ""; + Sticker.prototype.accessibilityLabel = null; + Sticker.prototype.isLottie = null; + Sticker.prototype.mimetype = null; + + let $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) + }); Sticker.create = function create(properties) { return new Sticker(properties); @@ -56545,18 +66115,15 @@ export const proto = $root.proto = (() => { if (o.arrays || o.defaults) { d.emojis = []; } - if (o.defaults) { - d.fileName = ""; - d.isAnimated = false; - d.accessibilityLabel = ""; - d.isLottie = false; - d.mimetype = ""; - } if (m.fileName != null && m.hasOwnProperty("fileName")) { d.fileName = m.fileName; + if (o.oneofs) + d._fileName = "fileName"; } if (m.isAnimated != null && m.hasOwnProperty("isAnimated")) { d.isAnimated = m.isAnimated; + if (o.oneofs) + d._isAnimated = "isAnimated"; } if (m.emojis && m.emojis.length) { d.emojis = []; @@ -56566,12 +66133,18 @@ export const proto = $root.proto = (() => { } if (m.accessibilityLabel != null && m.hasOwnProperty("accessibilityLabel")) { d.accessibilityLabel = m.accessibilityLabel; + if (o.oneofs) + d._accessibilityLabel = "accessibilityLabel"; } if (m.isLottie != null && m.hasOwnProperty("isLottie")) { d.isLottie = m.isLottie; + if (o.oneofs) + d._isLottie = "isLottie"; } if (m.mimetype != null && m.hasOwnProperty("mimetype")) { d.mimetype = m.mimetype; + if (o.oneofs) + d._mimetype = "mimetype"; } return d; }; @@ -56612,8 +66185,22 @@ export const proto = $root.proto = (() => { } StickerSyncRMRMessage.prototype.filehash = $util.emptyArray; - StickerSyncRMRMessage.prototype.rmrSource = ""; - StickerSyncRMRMessage.prototype.requestTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + StickerSyncRMRMessage.prototype.rmrSource = null; + StickerSyncRMRMessage.prototype.requestTimestamp = null; + + let $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) + }); StickerSyncRMRMessage.create = function create(properties) { return new StickerSyncRMRMessage(properties); @@ -56699,14 +66286,6 @@ export const proto = $root.proto = (() => { if (o.arrays || o.defaults) { d.filehash = []; } - if (o.defaults) { - d.rmrSource = ""; - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.requestTimestamp = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.requestTimestamp = o.longs === String ? "0" : 0; - } if (m.filehash && m.filehash.length) { d.filehash = []; for (var j = 0; j < m.filehash.length; ++j) { @@ -56715,12 +66294,16 @@ export const proto = $root.proto = (() => { } if (m.rmrSource != null && m.hasOwnProperty("rmrSource")) { d.rmrSource = m.rmrSource; + if (o.oneofs) + d._rmrSource = "rmrSource"; } if (m.requestTimestamp != null && m.hasOwnProperty("requestTimestamp")) { if (typeof m.requestTimestamp === "number") d.requestTimestamp = o.longs === String ? String(m.requestTimestamp) : m.requestTimestamp; else d.requestTimestamp = o.longs === String ? longToString(m.requestTimestamp) : o.longs === Number ? longToNumber(m.requestTimestamp) : m.requestTimestamp; + if (o.oneofs) + d._requestTimestamp = "requestTimestamp"; } return d; }; @@ -56748,11 +66331,43 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - TemplateButtonReplyMessage.prototype.selectedId = ""; - TemplateButtonReplyMessage.prototype.selectedDisplayText = ""; + TemplateButtonReplyMessage.prototype.selectedId = null; + TemplateButtonReplyMessage.prototype.selectedDisplayText = null; TemplateButtonReplyMessage.prototype.contextInfo = null; - TemplateButtonReplyMessage.prototype.selectedIndex = 0; - TemplateButtonReplyMessage.prototype.selectedCarouselCardIndex = 0; + TemplateButtonReplyMessage.prototype.selectedIndex = null; + TemplateButtonReplyMessage.prototype.selectedCarouselCardIndex = null; + + let $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) + }); TemplateButtonReplyMessage.create = function create(properties) { return new TemplateButtonReplyMessage(properties); @@ -56839,27 +66454,30 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.selectedId = ""; - d.selectedDisplayText = ""; - d.contextInfo = null; - d.selectedIndex = 0; - d.selectedCarouselCardIndex = 0; - } if (m.selectedId != null && m.hasOwnProperty("selectedId")) { d.selectedId = m.selectedId; + if (o.oneofs) + d._selectedId = "selectedId"; } if (m.selectedDisplayText != null && m.hasOwnProperty("selectedDisplayText")) { d.selectedDisplayText = m.selectedDisplayText; + if (o.oneofs) + d._selectedDisplayText = "selectedDisplayText"; } if (m.contextInfo != null && m.hasOwnProperty("contextInfo")) { d.contextInfo = $root.proto.ContextInfo.toObject(m.contextInfo, o); + if (o.oneofs) + d._contextInfo = "contextInfo"; } if (m.selectedIndex != null && m.hasOwnProperty("selectedIndex")) { d.selectedIndex = m.selectedIndex; + if (o.oneofs) + d._selectedIndex = "selectedIndex"; } if (m.selectedCarouselCardIndex != null && m.hasOwnProperty("selectedCarouselCardIndex")) { d.selectedCarouselCardIndex = m.selectedCarouselCardIndex; + if (o.oneofs) + d._selectedCarouselCardIndex = "selectedCarouselCardIndex"; } return d; }; @@ -56889,13 +66507,31 @@ export const proto = $root.proto = (() => { TemplateMessage.prototype.contextInfo = null; TemplateMessage.prototype.hydratedTemplate = null; - TemplateMessage.prototype.templateId = ""; + TemplateMessage.prototype.templateId = null; TemplateMessage.prototype.fourRowTemplate = null; TemplateMessage.prototype.hydratedFourRowTemplate = null; TemplateMessage.prototype.interactiveMessageTemplate = null; let $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) + }); + Object.defineProperty(TemplateMessage.prototype, "format", { get: $util.oneOfGetter($oneOfFields = ["fourRowTemplate", "hydratedFourRowTemplate", "interactiveMessageTemplate"]), set: $util.oneOfSetter($oneOfFields) @@ -57003,11 +66639,6 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.contextInfo = null; - d.hydratedTemplate = null; - d.templateId = ""; - } if (m.fourRowTemplate != null && m.hasOwnProperty("fourRowTemplate")) { d.fourRowTemplate = $root.proto.Message.TemplateMessage.FourRowTemplate.toObject(m.fourRowTemplate, o); if (o.oneofs) @@ -57020,9 +66651,13 @@ export const proto = $root.proto = (() => { } if (m.contextInfo != null && m.hasOwnProperty("contextInfo")) { d.contextInfo = $root.proto.ContextInfo.toObject(m.contextInfo, o); + if (o.oneofs) + d._contextInfo = "contextInfo"; } if (m.hydratedTemplate != null && m.hasOwnProperty("hydratedTemplate")) { d.hydratedTemplate = $root.proto.Message.TemplateMessage.HydratedFourRowTemplate.toObject(m.hydratedTemplate, o); + if (o.oneofs) + d._hydratedTemplate = "hydratedTemplate"; } if (m.interactiveMessageTemplate != null && m.hasOwnProperty("interactiveMessageTemplate")) { d.interactiveMessageTemplate = $root.proto.Message.InteractiveMessage.toObject(m.interactiveMessageTemplate, o); @@ -57031,6 +66666,8 @@ export const proto = $root.proto = (() => { } if (m.templateId != null && m.hasOwnProperty("templateId")) { d.templateId = m.templateId; + if (o.oneofs) + d._templateId = "templateId"; } return d; }; @@ -57067,6 +66704,18 @@ export const proto = $root.proto = (() => { let $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) + }); + Object.defineProperty(FourRowTemplate.prototype, "title", { get: $util.oneOfGetter($oneOfFields = ["documentMessage", "highlyStructuredMessage", "imageMessage", "videoMessage", "locationMessage"]), set: $util.oneOfSetter($oneOfFields) @@ -57210,10 +66859,6 @@ export const proto = $root.proto = (() => { if (o.arrays || o.defaults) { d.buttons = []; } - if (o.defaults) { - d.content = null; - d.footer = null; - } if (m.documentMessage != null && m.hasOwnProperty("documentMessage")) { d.documentMessage = $root.proto.Message.DocumentMessage.toObject(m.documentMessage, o); if (o.oneofs) @@ -57241,9 +66886,13 @@ export const proto = $root.proto = (() => { } if (m.content != null && m.hasOwnProperty("content")) { d.content = $root.proto.Message.HighlyStructuredMessage.toObject(m.content, o); + if (o.oneofs) + d._content = "content"; } if (m.footer != null && m.hasOwnProperty("footer")) { d.footer = $root.proto.Message.HighlyStructuredMessage.toObject(m.footer, o); + if (o.oneofs) + d._footer = "footer"; } if (m.buttons && m.buttons.length) { d.buttons = []; @@ -57278,11 +66927,11 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - HydratedFourRowTemplate.prototype.hydratedContentText = ""; - HydratedFourRowTemplate.prototype.hydratedFooterText = ""; + HydratedFourRowTemplate.prototype.hydratedContentText = null; + HydratedFourRowTemplate.prototype.hydratedFooterText = null; HydratedFourRowTemplate.prototype.hydratedButtons = $util.emptyArray; - HydratedFourRowTemplate.prototype.templateId = ""; - HydratedFourRowTemplate.prototype.maskLinkedDevices = false; + HydratedFourRowTemplate.prototype.templateId = null; + HydratedFourRowTemplate.prototype.maskLinkedDevices = null; HydratedFourRowTemplate.prototype.documentMessage = null; HydratedFourRowTemplate.prototype.hydratedTitleText = null; HydratedFourRowTemplate.prototype.imageMessage = null; @@ -57291,6 +66940,30 @@ export const proto = $root.proto = (() => { let $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) + }); + Object.defineProperty(HydratedFourRowTemplate.prototype, "title", { get: $util.oneOfGetter($oneOfFields = ["documentMessage", "hydratedTitleText", "imageMessage", "videoMessage", "locationMessage"]), set: $util.oneOfSetter($oneOfFields) @@ -57446,12 +67119,6 @@ export const proto = $root.proto = (() => { if (o.arrays || o.defaults) { d.hydratedButtons = []; } - if (o.defaults) { - d.hydratedContentText = ""; - d.hydratedFooterText = ""; - d.templateId = ""; - d.maskLinkedDevices = false; - } if (m.documentMessage != null && m.hasOwnProperty("documentMessage")) { d.documentMessage = $root.proto.Message.DocumentMessage.toObject(m.documentMessage, o); if (o.oneofs) @@ -57479,9 +67146,13 @@ export const proto = $root.proto = (() => { } if (m.hydratedContentText != null && m.hasOwnProperty("hydratedContentText")) { d.hydratedContentText = m.hydratedContentText; + if (o.oneofs) + d._hydratedContentText = "hydratedContentText"; } if (m.hydratedFooterText != null && m.hasOwnProperty("hydratedFooterText")) { d.hydratedFooterText = m.hydratedFooterText; + if (o.oneofs) + d._hydratedFooterText = "hydratedFooterText"; } if (m.hydratedButtons && m.hydratedButtons.length) { d.hydratedButtons = []; @@ -57491,9 +67162,13 @@ export const proto = $root.proto = (() => { } if (m.templateId != null && m.hasOwnProperty("templateId")) { d.templateId = m.templateId; + if (o.oneofs) + d._templateId = "templateId"; } if (m.maskLinkedDevices != null && m.hasOwnProperty("maskLinkedDevices")) { d.maskLinkedDevices = m.maskLinkedDevices; + if (o.oneofs) + d._maskLinkedDevices = "maskLinkedDevices"; } return d; }; @@ -57524,7 +67199,15 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - URLMetadata.prototype.fbExperimentId = 0; + URLMetadata.prototype.fbExperimentId = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(URLMetadata.prototype, "_fbExperimentId", { + get: $util.oneOfGetter($oneOfFields = ["fbExperimentId"]), + set: $util.oneOfSetter($oneOfFields) + }); URLMetadata.create = function create(properties) { return new URLMetadata(properties); @@ -57573,11 +67256,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.fbExperimentId = 0; - } if (m.fbExperimentId != null && m.hasOwnProperty("fbExperimentId")) { d.fbExperimentId = m.fbExperimentId; + if (o.oneofs) + d._fbExperimentId = "fbExperimentId"; } return d; }; @@ -57605,10 +67287,36 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - VideoEndCard.prototype.username = ""; - VideoEndCard.prototype.caption = ""; - VideoEndCard.prototype.thumbnailImageUrl = ""; - VideoEndCard.prototype.profilePictureUrl = ""; + VideoEndCard.prototype.username = null; + VideoEndCard.prototype.caption = null; + VideoEndCard.prototype.thumbnailImageUrl = null; + VideoEndCard.prototype.profilePictureUrl = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(VideoEndCard.prototype, "_username", { + get: $util.oneOfGetter($oneOfFields = ["username"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(VideoEndCard.prototype, "_caption", { + get: $util.oneOfGetter($oneOfFields = ["caption"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(VideoEndCard.prototype, "_thumbnailImageUrl", { + get: $util.oneOfGetter($oneOfFields = ["thumbnailImageUrl"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(VideoEndCard.prototype, "_profilePictureUrl", { + get: $util.oneOfGetter($oneOfFields = ["profilePictureUrl"]), + set: $util.oneOfSetter($oneOfFields) + }); VideoEndCard.create = function create(properties) { return new VideoEndCard(properties); @@ -57617,10 +67325,14 @@ export const proto = $root.proto = (() => { VideoEndCard.encode = function encode(m, w) { if (!w) w = $Writer.create(); - w.uint32(10).string(m.username); - w.uint32(18).string(m.caption); - w.uint32(26).string(m.thumbnailImageUrl); - w.uint32(34).string(m.profilePictureUrl); + if (m.username != null && Object.hasOwnProperty.call(m, "username")) + w.uint32(10).string(m.username); + if (m.caption != null && Object.hasOwnProperty.call(m, "caption")) + w.uint32(18).string(m.caption); + if (m.thumbnailImageUrl != null && Object.hasOwnProperty.call(m, "thumbnailImageUrl")) + w.uint32(26).string(m.thumbnailImageUrl); + if (m.profilePictureUrl != null && Object.hasOwnProperty.call(m, "profilePictureUrl")) + w.uint32(34).string(m.profilePictureUrl); return w; }; @@ -57654,14 +67366,6 @@ export const proto = $root.proto = (() => { break; } } - if (!m.hasOwnProperty("username")) - throw $util.ProtocolError("missing required 'username'", { instance: m }); - if (!m.hasOwnProperty("caption")) - throw $util.ProtocolError("missing required 'caption'", { instance: m }); - if (!m.hasOwnProperty("thumbnailImageUrl")) - throw $util.ProtocolError("missing required 'thumbnailImageUrl'", { instance: m }); - if (!m.hasOwnProperty("profilePictureUrl")) - throw $util.ProtocolError("missing required 'profilePictureUrl'", { instance: m }); return m; }; @@ -57688,23 +67392,25 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.username = ""; - d.caption = ""; - d.thumbnailImageUrl = ""; - d.profilePictureUrl = ""; - } if (m.username != null && m.hasOwnProperty("username")) { d.username = m.username; + if (o.oneofs) + d._username = "username"; } if (m.caption != null && m.hasOwnProperty("caption")) { d.caption = m.caption; + if (o.oneofs) + d._caption = "caption"; } if (m.thumbnailImageUrl != null && m.hasOwnProperty("thumbnailImageUrl")) { d.thumbnailImageUrl = m.thumbnailImageUrl; + if (o.oneofs) + d._thumbnailImageUrl = "thumbnailImageUrl"; } if (m.profilePictureUrl != null && m.hasOwnProperty("profilePictureUrl")) { d.profilePictureUrl = m.profilePictureUrl; + if (o.oneofs) + d._profilePictureUrl = "profilePictureUrl"; } return d; }; @@ -57735,36 +67441,200 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - VideoMessage.prototype.url = ""; - VideoMessage.prototype.mimetype = ""; - VideoMessage.prototype.fileSha256 = $util.newBuffer([]); - VideoMessage.prototype.fileLength = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - VideoMessage.prototype.seconds = 0; - VideoMessage.prototype.mediaKey = $util.newBuffer([]); - VideoMessage.prototype.caption = ""; - VideoMessage.prototype.gifPlayback = false; - VideoMessage.prototype.height = 0; - VideoMessage.prototype.width = 0; - VideoMessage.prototype.fileEncSha256 = $util.newBuffer([]); + VideoMessage.prototype.url = null; + VideoMessage.prototype.mimetype = null; + VideoMessage.prototype.fileSha256 = null; + VideoMessage.prototype.fileLength = null; + VideoMessage.prototype.seconds = null; + VideoMessage.prototype.mediaKey = null; + VideoMessage.prototype.caption = null; + VideoMessage.prototype.gifPlayback = null; + VideoMessage.prototype.height = null; + VideoMessage.prototype.width = null; + VideoMessage.prototype.fileEncSha256 = null; VideoMessage.prototype.interactiveAnnotations = $util.emptyArray; - VideoMessage.prototype.directPath = ""; - VideoMessage.prototype.mediaKeyTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - VideoMessage.prototype.jpegThumbnail = $util.newBuffer([]); + VideoMessage.prototype.directPath = null; + VideoMessage.prototype.mediaKeyTimestamp = null; + VideoMessage.prototype.jpegThumbnail = null; VideoMessage.prototype.contextInfo = null; - VideoMessage.prototype.streamingSidecar = $util.newBuffer([]); - VideoMessage.prototype.gifAttribution = 0; - VideoMessage.prototype.viewOnce = false; - VideoMessage.prototype.thumbnailDirectPath = ""; - VideoMessage.prototype.thumbnailSha256 = $util.newBuffer([]); - VideoMessage.prototype.thumbnailEncSha256 = $util.newBuffer([]); - VideoMessage.prototype.staticUrl = ""; + VideoMessage.prototype.streamingSidecar = null; + VideoMessage.prototype.gifAttribution = null; + VideoMessage.prototype.viewOnce = null; + VideoMessage.prototype.thumbnailDirectPath = null; + VideoMessage.prototype.thumbnailSha256 = null; + VideoMessage.prototype.thumbnailEncSha256 = null; + VideoMessage.prototype.staticUrl = null; VideoMessage.prototype.annotations = $util.emptyArray; - VideoMessage.prototype.accessibilityLabel = ""; + VideoMessage.prototype.accessibilityLabel = null; VideoMessage.prototype.processedVideos = $util.emptyArray; - VideoMessage.prototype.externalShareFullVideoDurationInSeconds = 0; - VideoMessage.prototype.motionPhotoPresentationOffsetMs = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - VideoMessage.prototype.metadataUrl = ""; - VideoMessage.prototype.videoSourceType = 0; + VideoMessage.prototype.externalShareFullVideoDurationInSeconds = null; + VideoMessage.prototype.motionPhotoPresentationOffsetMs = null; + VideoMessage.prototype.metadataUrl = null; + VideoMessage.prototype.videoSourceType = null; + + let $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) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(VideoMessage.prototype, "_motionPhotoPresentationOffsetMs", { + get: $util.oneOfGetter($oneOfFields = ["motionPhotoPresentationOffsetMs"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(VideoMessage.prototype, "_metadataUrl", { + get: $util.oneOfGetter($oneOfFields = ["metadataUrl"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(VideoMessage.prototype, "_videoSourceType", { + get: $util.oneOfGetter($oneOfFields = ["videoSourceType"]), + set: $util.oneOfSetter($oneOfFields) + }); VideoMessage.create = function create(properties) { return new VideoMessage(properties); @@ -58190,124 +68060,63 @@ export const proto = $root.proto = (() => { d.annotations = []; d.processedVideos = []; } - if (o.defaults) { - d.url = ""; - d.mimetype = ""; - if (o.bytes === String) - d.fileSha256 = ""; - else { - d.fileSha256 = []; - if (o.bytes !== Array) - d.fileSha256 = $util.newBuffer(d.fileSha256); - } - if ($util.Long) { - var n = new $util.Long(0, 0, true); - d.fileLength = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.fileLength = o.longs === String ? "0" : 0; - d.seconds = 0; - if (o.bytes === String) - d.mediaKey = ""; - else { - d.mediaKey = []; - if (o.bytes !== Array) - d.mediaKey = $util.newBuffer(d.mediaKey); - } - d.caption = ""; - d.gifPlayback = false; - d.height = 0; - d.width = 0; - if (o.bytes === String) - d.fileEncSha256 = ""; - else { - d.fileEncSha256 = []; - if (o.bytes !== Array) - d.fileEncSha256 = $util.newBuffer(d.fileEncSha256); - } - d.directPath = ""; - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.mediaKeyTimestamp = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.mediaKeyTimestamp = o.longs === String ? "0" : 0; - if (o.bytes === String) - d.jpegThumbnail = ""; - else { - d.jpegThumbnail = []; - if (o.bytes !== Array) - d.jpegThumbnail = $util.newBuffer(d.jpegThumbnail); - } - d.contextInfo = null; - if (o.bytes === String) - d.streamingSidecar = ""; - else { - d.streamingSidecar = []; - if (o.bytes !== Array) - d.streamingSidecar = $util.newBuffer(d.streamingSidecar); - } - d.gifAttribution = o.enums === String ? "NONE" : 0; - d.viewOnce = false; - d.thumbnailDirectPath = ""; - if (o.bytes === String) - d.thumbnailSha256 = ""; - else { - d.thumbnailSha256 = []; - if (o.bytes !== Array) - d.thumbnailSha256 = $util.newBuffer(d.thumbnailSha256); - } - if (o.bytes === String) - d.thumbnailEncSha256 = ""; - else { - d.thumbnailEncSha256 = []; - if (o.bytes !== Array) - d.thumbnailEncSha256 = $util.newBuffer(d.thumbnailEncSha256); - } - d.staticUrl = ""; - d.accessibilityLabel = ""; - d.externalShareFullVideoDurationInSeconds = 0; - if ($util.Long) { - var n = new $util.Long(0, 0, true); - d.motionPhotoPresentationOffsetMs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.motionPhotoPresentationOffsetMs = o.longs === String ? "0" : 0; - d.metadataUrl = ""; - d.videoSourceType = o.enums === String ? "USER_VIDEO" : 0; - } if (m.url != null && m.hasOwnProperty("url")) { d.url = m.url; + if (o.oneofs) + d._url = "url"; } if (m.mimetype != null && m.hasOwnProperty("mimetype")) { d.mimetype = m.mimetype; + if (o.oneofs) + d._mimetype = "mimetype"; } if (m.fileSha256 != null && m.hasOwnProperty("fileSha256")) { d.fileSha256 = o.bytes === String ? $util.base64.encode(m.fileSha256, 0, m.fileSha256.length) : o.bytes === Array ? Array.prototype.slice.call(m.fileSha256) : m.fileSha256; + if (o.oneofs) + d._fileSha256 = "fileSha256"; } if (m.fileLength != null && m.hasOwnProperty("fileLength")) { if (typeof m.fileLength === "number") d.fileLength = o.longs === String ? String(m.fileLength) : m.fileLength; else d.fileLength = o.longs === String ? longToString(m.fileLength, true) : o.longs === Number ? longToNumber(m.fileLength, true) : m.fileLength; + if (o.oneofs) + d._fileLength = "fileLength"; } if (m.seconds != null && m.hasOwnProperty("seconds")) { d.seconds = m.seconds; + if (o.oneofs) + d._seconds = "seconds"; } if (m.mediaKey != null && m.hasOwnProperty("mediaKey")) { d.mediaKey = o.bytes === String ? $util.base64.encode(m.mediaKey, 0, m.mediaKey.length) : o.bytes === Array ? Array.prototype.slice.call(m.mediaKey) : m.mediaKey; + if (o.oneofs) + d._mediaKey = "mediaKey"; } if (m.caption != null && m.hasOwnProperty("caption")) { d.caption = m.caption; + if (o.oneofs) + d._caption = "caption"; } if (m.gifPlayback != null && m.hasOwnProperty("gifPlayback")) { d.gifPlayback = m.gifPlayback; + if (o.oneofs) + d._gifPlayback = "gifPlayback"; } if (m.height != null && m.hasOwnProperty("height")) { d.height = m.height; + if (o.oneofs) + d._height = "height"; } if (m.width != null && m.hasOwnProperty("width")) { d.width = m.width; + if (o.oneofs) + d._width = "width"; } if (m.fileEncSha256 != null && m.hasOwnProperty("fileEncSha256")) { d.fileEncSha256 = o.bytes === String ? $util.base64.encode(m.fileEncSha256, 0, m.fileEncSha256.length) : o.bytes === Array ? Array.prototype.slice.call(m.fileEncSha256) : m.fileEncSha256; + if (o.oneofs) + d._fileEncSha256 = "fileEncSha256"; } if (m.interactiveAnnotations && m.interactiveAnnotations.length) { d.interactiveAnnotations = []; @@ -58317,39 +68126,61 @@ export const proto = $root.proto = (() => { } if (m.directPath != null && m.hasOwnProperty("directPath")) { d.directPath = m.directPath; + if (o.oneofs) + d._directPath = "directPath"; } if (m.mediaKeyTimestamp != null && m.hasOwnProperty("mediaKeyTimestamp")) { if (typeof m.mediaKeyTimestamp === "number") d.mediaKeyTimestamp = o.longs === String ? String(m.mediaKeyTimestamp) : m.mediaKeyTimestamp; else d.mediaKeyTimestamp = o.longs === String ? longToString(m.mediaKeyTimestamp) : o.longs === Number ? longToNumber(m.mediaKeyTimestamp) : m.mediaKeyTimestamp; + if (o.oneofs) + d._mediaKeyTimestamp = "mediaKeyTimestamp"; } if (m.jpegThumbnail != null && m.hasOwnProperty("jpegThumbnail")) { d.jpegThumbnail = o.bytes === String ? $util.base64.encode(m.jpegThumbnail, 0, m.jpegThumbnail.length) : o.bytes === Array ? Array.prototype.slice.call(m.jpegThumbnail) : m.jpegThumbnail; + if (o.oneofs) + d._jpegThumbnail = "jpegThumbnail"; } if (m.contextInfo != null && m.hasOwnProperty("contextInfo")) { d.contextInfo = $root.proto.ContextInfo.toObject(m.contextInfo, o); + if (o.oneofs) + d._contextInfo = "contextInfo"; } if (m.streamingSidecar != null && m.hasOwnProperty("streamingSidecar")) { d.streamingSidecar = o.bytes === String ? $util.base64.encode(m.streamingSidecar, 0, m.streamingSidecar.length) : o.bytes === Array ? Array.prototype.slice.call(m.streamingSidecar) : m.streamingSidecar; + if (o.oneofs) + d._streamingSidecar = "streamingSidecar"; } if (m.gifAttribution != null && m.hasOwnProperty("gifAttribution")) { d.gifAttribution = o.enums === String ? $root.proto.Message.VideoMessage.Attribution[m.gifAttribution] === undefined ? m.gifAttribution : $root.proto.Message.VideoMessage.Attribution[m.gifAttribution] : m.gifAttribution; + if (o.oneofs) + d._gifAttribution = "gifAttribution"; } if (m.viewOnce != null && m.hasOwnProperty("viewOnce")) { d.viewOnce = m.viewOnce; + if (o.oneofs) + d._viewOnce = "viewOnce"; } if (m.thumbnailDirectPath != null && m.hasOwnProperty("thumbnailDirectPath")) { d.thumbnailDirectPath = m.thumbnailDirectPath; + if (o.oneofs) + d._thumbnailDirectPath = "thumbnailDirectPath"; } if (m.thumbnailSha256 != null && m.hasOwnProperty("thumbnailSha256")) { d.thumbnailSha256 = o.bytes === String ? $util.base64.encode(m.thumbnailSha256, 0, m.thumbnailSha256.length) : o.bytes === Array ? Array.prototype.slice.call(m.thumbnailSha256) : m.thumbnailSha256; + if (o.oneofs) + d._thumbnailSha256 = "thumbnailSha256"; } if (m.thumbnailEncSha256 != null && m.hasOwnProperty("thumbnailEncSha256")) { d.thumbnailEncSha256 = o.bytes === String ? $util.base64.encode(m.thumbnailEncSha256, 0, m.thumbnailEncSha256.length) : o.bytes === Array ? Array.prototype.slice.call(m.thumbnailEncSha256) : m.thumbnailEncSha256; + if (o.oneofs) + d._thumbnailEncSha256 = "thumbnailEncSha256"; } if (m.staticUrl != null && m.hasOwnProperty("staticUrl")) { d.staticUrl = m.staticUrl; + if (o.oneofs) + d._staticUrl = "staticUrl"; } if (m.annotations && m.annotations.length) { d.annotations = []; @@ -58359,6 +68190,8 @@ export const proto = $root.proto = (() => { } if (m.accessibilityLabel != null && m.hasOwnProperty("accessibilityLabel")) { d.accessibilityLabel = m.accessibilityLabel; + if (o.oneofs) + d._accessibilityLabel = "accessibilityLabel"; } if (m.processedVideos && m.processedVideos.length) { d.processedVideos = []; @@ -58368,18 +68201,26 @@ export const proto = $root.proto = (() => { } if (m.externalShareFullVideoDurationInSeconds != null && m.hasOwnProperty("externalShareFullVideoDurationInSeconds")) { d.externalShareFullVideoDurationInSeconds = m.externalShareFullVideoDurationInSeconds; + if (o.oneofs) + d._externalShareFullVideoDurationInSeconds = "externalShareFullVideoDurationInSeconds"; } if (m.motionPhotoPresentationOffsetMs != null && m.hasOwnProperty("motionPhotoPresentationOffsetMs")) { if (typeof m.motionPhotoPresentationOffsetMs === "number") d.motionPhotoPresentationOffsetMs = o.longs === String ? String(m.motionPhotoPresentationOffsetMs) : m.motionPhotoPresentationOffsetMs; else d.motionPhotoPresentationOffsetMs = o.longs === String ? longToString(m.motionPhotoPresentationOffsetMs, true) : o.longs === Number ? longToNumber(m.motionPhotoPresentationOffsetMs, true) : m.motionPhotoPresentationOffsetMs; + if (o.oneofs) + d._motionPhotoPresentationOffsetMs = "motionPhotoPresentationOffsetMs"; } if (m.metadataUrl != null && m.hasOwnProperty("metadataUrl")) { d.metadataUrl = m.metadataUrl; + if (o.oneofs) + d._metadataUrl = "metadataUrl"; } if (m.videoSourceType != null && m.hasOwnProperty("videoSourceType")) { d.videoSourceType = o.enums === String ? $root.proto.Message.VideoMessage.VideoSourceType[m.videoSourceType] === undefined ? m.videoSourceType : $root.proto.Message.VideoMessage.VideoSourceType[m.videoSourceType] : m.videoSourceType; + if (o.oneofs) + d._videoSourceType = "videoSourceType"; } return d; }; @@ -58426,15 +68267,65 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - MessageAddOn.prototype.messageAddOnType = 0; + MessageAddOn.prototype.messageAddOnType = null; MessageAddOn.prototype.messageAddOn = null; - MessageAddOn.prototype.senderTimestampMs = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - MessageAddOn.prototype.serverTimestampMs = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - MessageAddOn.prototype.status = 0; + MessageAddOn.prototype.senderTimestampMs = null; + MessageAddOn.prototype.serverTimestampMs = null; + MessageAddOn.prototype.status = null; MessageAddOn.prototype.addOnContextInfo = null; MessageAddOn.prototype.messageAddOnKey = null; MessageAddOn.prototype.legacyMessage = null; + let $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) + }); + MessageAddOn.create = function create(properties) { return new MessageAddOn(properties); }; @@ -58621,53 +68512,51 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.messageAddOnType = o.enums === String ? "UNDEFINED" : 0; - d.messageAddOn = null; - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.senderTimestampMs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.senderTimestampMs = o.longs === String ? "0" : 0; - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.serverTimestampMs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.serverTimestampMs = o.longs === String ? "0" : 0; - d.status = o.enums === String ? "ERROR" : 0; - d.addOnContextInfo = null; - d.messageAddOnKey = null; - d.legacyMessage = null; - } if (m.messageAddOnType != null && m.hasOwnProperty("messageAddOnType")) { d.messageAddOnType = o.enums === String ? $root.proto.MessageAddOn.MessageAddOnType[m.messageAddOnType] === undefined ? m.messageAddOnType : $root.proto.MessageAddOn.MessageAddOnType[m.messageAddOnType] : m.messageAddOnType; + if (o.oneofs) + d._messageAddOnType = "messageAddOnType"; } if (m.messageAddOn != null && m.hasOwnProperty("messageAddOn")) { d.messageAddOn = $root.proto.Message.toObject(m.messageAddOn, o); + if (o.oneofs) + d._messageAddOn = "messageAddOn"; } if (m.senderTimestampMs != null && m.hasOwnProperty("senderTimestampMs")) { if (typeof m.senderTimestampMs === "number") d.senderTimestampMs = o.longs === String ? String(m.senderTimestampMs) : m.senderTimestampMs; else d.senderTimestampMs = o.longs === String ? longToString(m.senderTimestampMs) : o.longs === Number ? longToNumber(m.senderTimestampMs) : m.senderTimestampMs; + if (o.oneofs) + d._senderTimestampMs = "senderTimestampMs"; } if (m.serverTimestampMs != null && m.hasOwnProperty("serverTimestampMs")) { if (typeof m.serverTimestampMs === "number") d.serverTimestampMs = o.longs === String ? String(m.serverTimestampMs) : m.serverTimestampMs; else d.serverTimestampMs = o.longs === String ? longToString(m.serverTimestampMs) : o.longs === Number ? longToNumber(m.serverTimestampMs) : m.serverTimestampMs; + if (o.oneofs) + d._serverTimestampMs = "serverTimestampMs"; } if (m.status != null && m.hasOwnProperty("status")) { d.status = o.enums === String ? $root.proto.WebMessageInfo.Status[m.status] === undefined ? m.status : $root.proto.WebMessageInfo.Status[m.status] : m.status; + if (o.oneofs) + d._status = "status"; } if (m.addOnContextInfo != null && m.hasOwnProperty("addOnContextInfo")) { d.addOnContextInfo = $root.proto.MessageAddOnContextInfo.toObject(m.addOnContextInfo, o); + if (o.oneofs) + d._addOnContextInfo = "addOnContextInfo"; } if (m.messageAddOnKey != null && m.hasOwnProperty("messageAddOnKey")) { d.messageAddOnKey = $root.proto.MessageKey.toObject(m.messageAddOnKey, o); + if (o.oneofs) + d._messageAddOnKey = "messageAddOnKey"; } if (m.legacyMessage != null && m.hasOwnProperty("legacyMessage")) { d.legacyMessage = $root.proto.LegacyMessage.toObject(m.legacyMessage, o); + if (o.oneofs) + d._legacyMessage = "legacyMessage"; } return d; }; @@ -58705,8 +68594,22 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - MessageAddOnContextInfo.prototype.messageAddOnDurationInSecs = 0; - MessageAddOnContextInfo.prototype.messageAddOnExpiryType = 1; + MessageAddOnContextInfo.prototype.messageAddOnDurationInSecs = null; + MessageAddOnContextInfo.prototype.messageAddOnExpiryType = null; + + let $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) + }); MessageAddOnContextInfo.create = function create(properties) { return new MessageAddOnContextInfo(properties); @@ -58777,15 +68680,15 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.messageAddOnDurationInSecs = 0; - d.messageAddOnExpiryType = o.enums === String ? "STATIC" : 1; - } if (m.messageAddOnDurationInSecs != null && m.hasOwnProperty("messageAddOnDurationInSecs")) { d.messageAddOnDurationInSecs = m.messageAddOnDurationInSecs; + if (o.oneofs) + d._messageAddOnDurationInSecs = "messageAddOnDurationInSecs"; } if (m.messageAddOnExpiryType != null && m.hasOwnProperty("messageAddOnExpiryType")) { d.messageAddOnExpiryType = o.enums === String ? $root.proto.MessageContextInfo.MessageAddonExpiryType[m.messageAddOnExpiryType] === undefined ? m.messageAddOnExpiryType : $root.proto.MessageContextInfo.MessageAddonExpiryType[m.messageAddOnExpiryType] : m.messageAddOnExpiryType; + if (o.oneofs) + d._messageAddOnExpiryType = "messageAddOnExpiryType"; } return d; }; @@ -58813,9 +68716,29 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - MessageAssociation.prototype.associationType = 0; + MessageAssociation.prototype.associationType = null; MessageAssociation.prototype.parentMessageKey = null; - MessageAssociation.prototype.messageIndex = 0; + MessageAssociation.prototype.messageIndex = null; + + let $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) + }); MessageAssociation.create = function create(properties) { return new MessageAssociation(properties); @@ -58969,19 +68892,20 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.associationType = o.enums === String ? "UNKNOWN" : 0; - d.parentMessageKey = null; - d.messageIndex = 0; - } if (m.associationType != null && m.hasOwnProperty("associationType")) { d.associationType = o.enums === String ? $root.proto.MessageAssociation.AssociationType[m.associationType] === undefined ? m.associationType : $root.proto.MessageAssociation.AssociationType[m.associationType] : m.associationType; + if (o.oneofs) + d._associationType = "associationType"; } if (m.parentMessageKey != null && m.hasOwnProperty("parentMessageKey")) { d.parentMessageKey = $root.proto.MessageKey.toObject(m.parentMessageKey, o); + if (o.oneofs) + d._parentMessageKey = "parentMessageKey"; } if (m.messageIndex != null && m.hasOwnProperty("messageIndex")) { d.messageIndex = m.messageIndex; + if (o.oneofs) + d._messageIndex = "messageIndex"; } return d; }; @@ -59036,21 +68960,113 @@ export const proto = $root.proto = (() => { } MessageContextInfo.prototype.deviceListMetadata = null; - MessageContextInfo.prototype.deviceListMetadataVersion = 0; - MessageContextInfo.prototype.messageSecret = $util.newBuffer([]); - MessageContextInfo.prototype.paddingBytes = $util.newBuffer([]); - MessageContextInfo.prototype.messageAddOnDurationInSecs = 0; - MessageContextInfo.prototype.botMessageSecret = $util.newBuffer([]); + MessageContextInfo.prototype.deviceListMetadataVersion = null; + MessageContextInfo.prototype.messageSecret = null; + MessageContextInfo.prototype.paddingBytes = null; + MessageContextInfo.prototype.messageAddOnDurationInSecs = null; + MessageContextInfo.prototype.botMessageSecret = null; MessageContextInfo.prototype.botMetadata = null; - MessageContextInfo.prototype.reportingTokenVersion = 0; - MessageContextInfo.prototype.messageAddOnExpiryType = 1; + MessageContextInfo.prototype.reportingTokenVersion = null; + MessageContextInfo.prototype.messageAddOnExpiryType = null; MessageContextInfo.prototype.messageAssociation = null; - MessageContextInfo.prototype.capiCreatedGroup = false; - MessageContextInfo.prototype.supportPayload = ""; + MessageContextInfo.prototype.capiCreatedGroup = null; + MessageContextInfo.prototype.supportPayload = null; MessageContextInfo.prototype.limitSharing = null; MessageContextInfo.prototype.limitSharingV2 = null; MessageContextInfo.prototype.threadId = $util.emptyArray; - MessageContextInfo.prototype.weblinkRenderConfig = 0; + MessageContextInfo.prototype.weblinkRenderConfig = null; + + let $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) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MessageContextInfo.prototype, "_limitSharing", { + get: $util.oneOfGetter($oneOfFields = ["limitSharing"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MessageContextInfo.prototype, "_limitSharingV2", { + get: $util.oneOfGetter($oneOfFields = ["limitSharingV2"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MessageContextInfo.prototype, "_weblinkRenderConfig", { + get: $util.oneOfGetter($oneOfFields = ["weblinkRenderConfig"]), + set: $util.oneOfSetter($oneOfFields) + }); MessageContextInfo.create = function create(properties) { return new MessageContextInfo(properties); @@ -59293,82 +69309,75 @@ export const proto = $root.proto = (() => { if (o.arrays || o.defaults) { d.threadId = []; } - if (o.defaults) { - d.deviceListMetadata = null; - d.deviceListMetadataVersion = 0; - if (o.bytes === String) - d.messageSecret = ""; - else { - d.messageSecret = []; - if (o.bytes !== Array) - d.messageSecret = $util.newBuffer(d.messageSecret); - } - if (o.bytes === String) - d.paddingBytes = ""; - else { - d.paddingBytes = []; - if (o.bytes !== Array) - d.paddingBytes = $util.newBuffer(d.paddingBytes); - } - d.messageAddOnDurationInSecs = 0; - if (o.bytes === String) - d.botMessageSecret = ""; - else { - d.botMessageSecret = []; - if (o.bytes !== Array) - d.botMessageSecret = $util.newBuffer(d.botMessageSecret); - } - d.botMetadata = null; - d.reportingTokenVersion = 0; - d.messageAddOnExpiryType = o.enums === String ? "STATIC" : 1; - d.messageAssociation = null; - d.capiCreatedGroup = false; - d.supportPayload = ""; - d.limitSharing = null; - d.limitSharingV2 = null; - d.weblinkRenderConfig = o.enums === String ? "WEBVIEW" : 0; - } if (m.deviceListMetadata != null && m.hasOwnProperty("deviceListMetadata")) { d.deviceListMetadata = $root.proto.DeviceListMetadata.toObject(m.deviceListMetadata, o); + if (o.oneofs) + d._deviceListMetadata = "deviceListMetadata"; } if (m.deviceListMetadataVersion != null && m.hasOwnProperty("deviceListMetadataVersion")) { d.deviceListMetadataVersion = m.deviceListMetadataVersion; + if (o.oneofs) + d._deviceListMetadataVersion = "deviceListMetadataVersion"; } if (m.messageSecret != null && m.hasOwnProperty("messageSecret")) { d.messageSecret = o.bytes === String ? $util.base64.encode(m.messageSecret, 0, m.messageSecret.length) : o.bytes === Array ? Array.prototype.slice.call(m.messageSecret) : m.messageSecret; + if (o.oneofs) + d._messageSecret = "messageSecret"; } if (m.paddingBytes != null && m.hasOwnProperty("paddingBytes")) { d.paddingBytes = o.bytes === String ? $util.base64.encode(m.paddingBytes, 0, m.paddingBytes.length) : o.bytes === Array ? Array.prototype.slice.call(m.paddingBytes) : m.paddingBytes; + if (o.oneofs) + d._paddingBytes = "paddingBytes"; } if (m.messageAddOnDurationInSecs != null && m.hasOwnProperty("messageAddOnDurationInSecs")) { d.messageAddOnDurationInSecs = m.messageAddOnDurationInSecs; + if (o.oneofs) + d._messageAddOnDurationInSecs = "messageAddOnDurationInSecs"; } if (m.botMessageSecret != null && m.hasOwnProperty("botMessageSecret")) { d.botMessageSecret = o.bytes === String ? $util.base64.encode(m.botMessageSecret, 0, m.botMessageSecret.length) : o.bytes === Array ? Array.prototype.slice.call(m.botMessageSecret) : m.botMessageSecret; + if (o.oneofs) + d._botMessageSecret = "botMessageSecret"; } if (m.botMetadata != null && m.hasOwnProperty("botMetadata")) { d.botMetadata = $root.proto.BotMetadata.toObject(m.botMetadata, o); + if (o.oneofs) + d._botMetadata = "botMetadata"; } if (m.reportingTokenVersion != null && m.hasOwnProperty("reportingTokenVersion")) { d.reportingTokenVersion = m.reportingTokenVersion; + if (o.oneofs) + d._reportingTokenVersion = "reportingTokenVersion"; } if (m.messageAddOnExpiryType != null && m.hasOwnProperty("messageAddOnExpiryType")) { d.messageAddOnExpiryType = o.enums === String ? $root.proto.MessageContextInfo.MessageAddonExpiryType[m.messageAddOnExpiryType] === undefined ? m.messageAddOnExpiryType : $root.proto.MessageContextInfo.MessageAddonExpiryType[m.messageAddOnExpiryType] : m.messageAddOnExpiryType; + if (o.oneofs) + d._messageAddOnExpiryType = "messageAddOnExpiryType"; } if (m.messageAssociation != null && m.hasOwnProperty("messageAssociation")) { d.messageAssociation = $root.proto.MessageAssociation.toObject(m.messageAssociation, o); + if (o.oneofs) + d._messageAssociation = "messageAssociation"; } if (m.capiCreatedGroup != null && m.hasOwnProperty("capiCreatedGroup")) { d.capiCreatedGroup = m.capiCreatedGroup; + if (o.oneofs) + d._capiCreatedGroup = "capiCreatedGroup"; } if (m.supportPayload != null && m.hasOwnProperty("supportPayload")) { d.supportPayload = m.supportPayload; + if (o.oneofs) + d._supportPayload = "supportPayload"; } if (m.limitSharing != null && m.hasOwnProperty("limitSharing")) { d.limitSharing = $root.proto.LimitSharing.toObject(m.limitSharing, o); + if (o.oneofs) + d._limitSharing = "limitSharing"; } if (m.limitSharingV2 != null && m.hasOwnProperty("limitSharingV2")) { d.limitSharingV2 = $root.proto.LimitSharing.toObject(m.limitSharingV2, o); + if (o.oneofs) + d._limitSharingV2 = "limitSharingV2"; } if (m.threadId && m.threadId.length) { d.threadId = []; @@ -59378,6 +69387,8 @@ export const proto = $root.proto = (() => { } if (m.weblinkRenderConfig != null && m.hasOwnProperty("weblinkRenderConfig")) { d.weblinkRenderConfig = o.enums === String ? $root.proto.WebLinkRenderConfig[m.weblinkRenderConfig] === undefined ? m.weblinkRenderConfig : $root.proto.WebLinkRenderConfig[m.weblinkRenderConfig] : m.weblinkRenderConfig; + if (o.oneofs) + d._weblinkRenderConfig = "weblinkRenderConfig"; } return d; }; @@ -59412,10 +69423,36 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - MessageKey.prototype.remoteJid = ""; - MessageKey.prototype.fromMe = false; - MessageKey.prototype.id = ""; - MessageKey.prototype.participant = ""; + MessageKey.prototype.remoteJid = null; + MessageKey.prototype.fromMe = null; + MessageKey.prototype.id = null; + MessageKey.prototype.participant = null; + + let $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) + }); MessageKey.create = function create(properties) { return new MessageKey(properties); @@ -59491,23 +69528,25 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.remoteJid = ""; - d.fromMe = false; - d.id = ""; - d.participant = ""; - } if (m.remoteJid != null && m.hasOwnProperty("remoteJid")) { d.remoteJid = m.remoteJid; + if (o.oneofs) + d._remoteJid = "remoteJid"; } if (m.fromMe != null && m.hasOwnProperty("fromMe")) { d.fromMe = m.fromMe; + if (o.oneofs) + d._fromMe = "fromMe"; } if (m.id != null && m.hasOwnProperty("id")) { d.id = m.id; + if (o.oneofs) + d._id = "id"; } if (m.participant != null && m.hasOwnProperty("participant")) { d.participant = m.participant; + if (o.oneofs) + d._participant = "participant"; } return d; }; @@ -59535,9 +69574,29 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - MessageSecretMessage.prototype.version = 0; - MessageSecretMessage.prototype.encIv = $util.newBuffer([]); - MessageSecretMessage.prototype.encPayload = $util.newBuffer([]); + MessageSecretMessage.prototype.version = null; + MessageSecretMessage.prototype.encIv = null; + MessageSecretMessage.prototype.encPayload = null; + + let $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) + }); MessageSecretMessage.create = function create(properties) { return new MessageSecretMessage(properties); @@ -59610,31 +69669,20 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.version = 0; - if (o.bytes === String) - d.encIv = ""; - else { - d.encIv = []; - if (o.bytes !== Array) - d.encIv = $util.newBuffer(d.encIv); - } - if (o.bytes === String) - d.encPayload = ""; - else { - d.encPayload = []; - if (o.bytes !== Array) - d.encPayload = $util.newBuffer(d.encPayload); - } - } if (m.version != null && m.hasOwnProperty("version")) { d.version = m.version; + if (o.oneofs) + d._version = "version"; } if (m.encIv != null && m.hasOwnProperty("encIv")) { d.encIv = o.bytes === String ? $util.base64.encode(m.encIv, 0, m.encIv.length) : o.bytes === Array ? Array.prototype.slice.call(m.encIv) : m.encIv; + if (o.oneofs) + d._encIv = "encIv"; } if (m.encPayload != null && m.hasOwnProperty("encPayload")) { d.encPayload = o.bytes === String ? $util.base64.encode(m.encPayload, 0, m.encPayload.length) : o.bytes === Array ? Array.prototype.slice.call(m.encPayload) : m.encPayload; + if (o.oneofs) + d._encPayload = "encPayload"; } return d; }; @@ -59662,9 +69710,29 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - Money.prototype.value = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - Money.prototype.offset = 0; - Money.prototype.currencyCode = ""; + Money.prototype.value = null; + Money.prototype.offset = null; + Money.prototype.currencyCode = null; + + let $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) + }); Money.create = function create(properties) { return new Money(properties); @@ -59738,26 +69806,23 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.value = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.value = o.longs === String ? "0" : 0; - d.offset = 0; - d.currencyCode = ""; - } if (m.value != null && m.hasOwnProperty("value")) { if (typeof m.value === "number") d.value = o.longs === String ? String(m.value) : m.value; else d.value = o.longs === String ? longToString(m.value) : o.longs === Number ? longToNumber(m.value) : m.value; + if (o.oneofs) + d._value = "value"; } if (m.offset != null && m.hasOwnProperty("offset")) { d.offset = m.offset; + if (o.oneofs) + d._offset = "offset"; } if (m.currencyCode != null && m.hasOwnProperty("currencyCode")) { d.currencyCode = m.currencyCode; + if (o.oneofs) + d._currencyCode = "currencyCode"; } return d; }; @@ -59786,50 +69851,310 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - MsgOpaqueData.prototype.body = ""; - MsgOpaqueData.prototype.caption = ""; - MsgOpaqueData.prototype.lng = 0; - MsgOpaqueData.prototype.isLive = false; - MsgOpaqueData.prototype.lat = 0; - MsgOpaqueData.prototype.paymentAmount1000 = 0; - MsgOpaqueData.prototype.paymentNoteMsgBody = ""; - MsgOpaqueData.prototype.matchedText = ""; - MsgOpaqueData.prototype.title = ""; - MsgOpaqueData.prototype.description = ""; - MsgOpaqueData.prototype.futureproofBuffer = $util.newBuffer([]); - MsgOpaqueData.prototype.clientUrl = ""; - MsgOpaqueData.prototype.loc = ""; - MsgOpaqueData.prototype.pollName = ""; + MsgOpaqueData.prototype.body = null; + MsgOpaqueData.prototype.caption = null; + MsgOpaqueData.prototype.lng = null; + MsgOpaqueData.prototype.isLive = null; + MsgOpaqueData.prototype.lat = null; + MsgOpaqueData.prototype.paymentAmount1000 = null; + MsgOpaqueData.prototype.paymentNoteMsgBody = null; + MsgOpaqueData.prototype.matchedText = null; + MsgOpaqueData.prototype.title = null; + MsgOpaqueData.prototype.description = null; + MsgOpaqueData.prototype.futureproofBuffer = null; + MsgOpaqueData.prototype.clientUrl = null; + MsgOpaqueData.prototype.loc = null; + MsgOpaqueData.prototype.pollName = null; MsgOpaqueData.prototype.pollOptions = $util.emptyArray; - MsgOpaqueData.prototype.pollSelectableOptionsCount = 0; - MsgOpaqueData.prototype.messageSecret = $util.newBuffer([]); - MsgOpaqueData.prototype.originalSelfAuthor = ""; - MsgOpaqueData.prototype.senderTimestampMs = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - MsgOpaqueData.prototype.pollUpdateParentKey = ""; + MsgOpaqueData.prototype.pollSelectableOptionsCount = null; + MsgOpaqueData.prototype.messageSecret = null; + MsgOpaqueData.prototype.originalSelfAuthor = null; + MsgOpaqueData.prototype.senderTimestampMs = null; + MsgOpaqueData.prototype.pollUpdateParentKey = null; MsgOpaqueData.prototype.encPollVote = null; - MsgOpaqueData.prototype.isSentCagPollCreation = false; - MsgOpaqueData.prototype.pollContentType = 0; - MsgOpaqueData.prototype.pollType = 0; - MsgOpaqueData.prototype.correctOptionIndex = 0; + MsgOpaqueData.prototype.isSentCagPollCreation = null; + MsgOpaqueData.prototype.pollContentType = null; + MsgOpaqueData.prototype.pollType = null; + MsgOpaqueData.prototype.correctOptionIndex = null; MsgOpaqueData.prototype.pollVotesSnapshot = null; - MsgOpaqueData.prototype.encReactionTargetMessageKey = ""; - MsgOpaqueData.prototype.encReactionEncPayload = $util.newBuffer([]); - MsgOpaqueData.prototype.encReactionEncIv = $util.newBuffer([]); - MsgOpaqueData.prototype.botMessageSecret = $util.newBuffer([]); - MsgOpaqueData.prototype.targetMessageKey = ""; - MsgOpaqueData.prototype.encPayload = $util.newBuffer([]); - MsgOpaqueData.prototype.encIv = $util.newBuffer([]); - MsgOpaqueData.prototype.eventName = ""; - MsgOpaqueData.prototype.isEventCanceled = false; - MsgOpaqueData.prototype.eventDescription = ""; - MsgOpaqueData.prototype.eventJoinLink = ""; - MsgOpaqueData.prototype.eventStartTime = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + MsgOpaqueData.prototype.encReactionTargetMessageKey = null; + MsgOpaqueData.prototype.encReactionEncPayload = null; + MsgOpaqueData.prototype.encReactionEncIv = null; + MsgOpaqueData.prototype.botMessageSecret = null; + MsgOpaqueData.prototype.targetMessageKey = null; + MsgOpaqueData.prototype.encPayload = null; + MsgOpaqueData.prototype.encIv = null; + MsgOpaqueData.prototype.eventName = null; + MsgOpaqueData.prototype.isEventCanceled = null; + MsgOpaqueData.prototype.eventDescription = null; + MsgOpaqueData.prototype.eventJoinLink = null; + MsgOpaqueData.prototype.eventStartTime = null; MsgOpaqueData.prototype.eventLocation = null; - MsgOpaqueData.prototype.eventEndTime = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - MsgOpaqueData.prototype.eventIsScheduledCall = false; - MsgOpaqueData.prototype.eventExtraGuestsAllowed = false; - MsgOpaqueData.prototype.plainProtobufBytes = $util.newBuffer([]); - MsgOpaqueData.prototype.quarantineExtractedText = ""; + MsgOpaqueData.prototype.eventEndTime = null; + MsgOpaqueData.prototype.eventIsScheduledCall = null; + MsgOpaqueData.prototype.eventExtraGuestsAllowed = null; + MsgOpaqueData.prototype.plainProtobufBytes = null; + MsgOpaqueData.prototype.quarantineExtractedText = null; + + let $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, "_pollType", { + get: $util.oneOfGetter($oneOfFields = ["pollType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MsgOpaqueData.prototype, "_correctOptionIndex", { + get: $util.oneOfGetter($oneOfFields = ["correctOptionIndex"]), + 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) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MsgOpaqueData.prototype, "_eventIsScheduledCall", { + get: $util.oneOfGetter($oneOfFields = ["eventIsScheduledCall"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MsgOpaqueData.prototype, "_eventExtraGuestsAllowed", { + get: $util.oneOfGetter($oneOfFields = ["eventExtraGuestsAllowed"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MsgOpaqueData.prototype, "_plainProtobufBytes", { + get: $util.oneOfGetter($oneOfFields = ["plainProtobufBytes"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MsgOpaqueData.prototype, "_quarantineExtractedText", { + get: $util.oneOfGetter($oneOfFields = ["quarantineExtractedText"]), + set: $util.oneOfSetter($oneOfFields) + }); MsgOpaqueData.create = function create(properties) { return new MsgOpaqueData(properties); @@ -60360,152 +70685,75 @@ export const proto = $root.proto = (() => { if (o.arrays || o.defaults) { d.pollOptions = []; } - if (o.defaults) { - d.body = ""; - d.caption = ""; - d.lng = 0; - d.isLive = false; - d.lat = 0; - d.paymentAmount1000 = 0; - d.paymentNoteMsgBody = ""; - d.matchedText = ""; - d.title = ""; - d.description = ""; - if (o.bytes === String) - d.futureproofBuffer = ""; - else { - d.futureproofBuffer = []; - if (o.bytes !== Array) - d.futureproofBuffer = $util.newBuffer(d.futureproofBuffer); - } - d.clientUrl = ""; - d.loc = ""; - d.pollName = ""; - d.pollSelectableOptionsCount = 0; - if (o.bytes === String) - d.messageSecret = ""; - else { - d.messageSecret = []; - if (o.bytes !== Array) - d.messageSecret = $util.newBuffer(d.messageSecret); - } - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.senderTimestampMs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.senderTimestampMs = o.longs === String ? "0" : 0; - d.pollUpdateParentKey = ""; - d.encPollVote = null; - d.encReactionTargetMessageKey = ""; - if (o.bytes === String) - d.encReactionEncPayload = ""; - else { - d.encReactionEncPayload = []; - if (o.bytes !== Array) - d.encReactionEncPayload = $util.newBuffer(d.encReactionEncPayload); - } - if (o.bytes === String) - d.encReactionEncIv = ""; - else { - d.encReactionEncIv = []; - if (o.bytes !== Array) - d.encReactionEncIv = $util.newBuffer(d.encReactionEncIv); - } - d.isSentCagPollCreation = false; - if (o.bytes === String) - d.botMessageSecret = ""; - else { - d.botMessageSecret = []; - if (o.bytes !== Array) - d.botMessageSecret = $util.newBuffer(d.botMessageSecret); - } - d.targetMessageKey = ""; - if (o.bytes === String) - d.encPayload = ""; - else { - d.encPayload = []; - if (o.bytes !== Array) - d.encPayload = $util.newBuffer(d.encPayload); - } - if (o.bytes === String) - d.encIv = ""; - else { - d.encIv = []; - if (o.bytes !== Array) - d.encIv = $util.newBuffer(d.encIv); - } - d.eventName = ""; - d.isEventCanceled = false; - d.eventDescription = ""; - d.eventJoinLink = ""; - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.eventStartTime = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.eventStartTime = o.longs === String ? "0" : 0; - d.eventLocation = null; - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.eventEndTime = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.eventEndTime = o.longs === String ? "0" : 0; - d.pollVotesSnapshot = null; - d.pollContentType = o.enums === String ? "UNKNOWN" : 0; - if (o.bytes === String) - d.plainProtobufBytes = ""; - else { - d.plainProtobufBytes = []; - if (o.bytes !== Array) - d.plainProtobufBytes = $util.newBuffer(d.plainProtobufBytes); - } - d.eventIsScheduledCall = false; - d.eventExtraGuestsAllowed = false; - d.pollType = o.enums === String ? "POLL" : 0; - d.correctOptionIndex = 0; - d.quarantineExtractedText = ""; - d.originalSelfAuthor = ""; - } if (m.body != null && m.hasOwnProperty("body")) { d.body = m.body; + if (o.oneofs) + d._body = "body"; } if (m.caption != null && m.hasOwnProperty("caption")) { d.caption = m.caption; + if (o.oneofs) + d._caption = "caption"; } if (m.lng != null && m.hasOwnProperty("lng")) { d.lng = o.json && !isFinite(m.lng) ? String(m.lng) : m.lng; + if (o.oneofs) + d._lng = "lng"; } if (m.isLive != null && m.hasOwnProperty("isLive")) { d.isLive = m.isLive; + if (o.oneofs) + d._isLive = "isLive"; } if (m.lat != null && m.hasOwnProperty("lat")) { d.lat = o.json && !isFinite(m.lat) ? String(m.lat) : m.lat; + if (o.oneofs) + d._lat = "lat"; } if (m.paymentAmount1000 != null && m.hasOwnProperty("paymentAmount1000")) { d.paymentAmount1000 = m.paymentAmount1000; + if (o.oneofs) + d._paymentAmount1000 = "paymentAmount1000"; } if (m.paymentNoteMsgBody != null && m.hasOwnProperty("paymentNoteMsgBody")) { d.paymentNoteMsgBody = m.paymentNoteMsgBody; + if (o.oneofs) + d._paymentNoteMsgBody = "paymentNoteMsgBody"; } if (m.matchedText != null && m.hasOwnProperty("matchedText")) { d.matchedText = m.matchedText; + if (o.oneofs) + d._matchedText = "matchedText"; } if (m.title != null && m.hasOwnProperty("title")) { d.title = m.title; + if (o.oneofs) + d._title = "title"; } if (m.description != null && m.hasOwnProperty("description")) { d.description = m.description; + if (o.oneofs) + d._description = "description"; } if (m.futureproofBuffer != null && m.hasOwnProperty("futureproofBuffer")) { d.futureproofBuffer = o.bytes === String ? $util.base64.encode(m.futureproofBuffer, 0, m.futureproofBuffer.length) : o.bytes === Array ? Array.prototype.slice.call(m.futureproofBuffer) : m.futureproofBuffer; + if (o.oneofs) + d._futureproofBuffer = "futureproofBuffer"; } if (m.clientUrl != null && m.hasOwnProperty("clientUrl")) { d.clientUrl = m.clientUrl; + if (o.oneofs) + d._clientUrl = "clientUrl"; } if (m.loc != null && m.hasOwnProperty("loc")) { d.loc = m.loc; + if (o.oneofs) + d._loc = "loc"; } if (m.pollName != null && m.hasOwnProperty("pollName")) { d.pollName = m.pollName; + if (o.oneofs) + d._pollName = "pollName"; } if (m.pollOptions && m.pollOptions.length) { d.pollOptions = []; @@ -60515,99 +70763,157 @@ export const proto = $root.proto = (() => { } if (m.pollSelectableOptionsCount != null && m.hasOwnProperty("pollSelectableOptionsCount")) { d.pollSelectableOptionsCount = m.pollSelectableOptionsCount; + if (o.oneofs) + d._pollSelectableOptionsCount = "pollSelectableOptionsCount"; } if (m.messageSecret != null && m.hasOwnProperty("messageSecret")) { d.messageSecret = o.bytes === String ? $util.base64.encode(m.messageSecret, 0, m.messageSecret.length) : o.bytes === Array ? Array.prototype.slice.call(m.messageSecret) : m.messageSecret; + if (o.oneofs) + d._messageSecret = "messageSecret"; } if (m.senderTimestampMs != null && m.hasOwnProperty("senderTimestampMs")) { if (typeof m.senderTimestampMs === "number") d.senderTimestampMs = o.longs === String ? String(m.senderTimestampMs) : m.senderTimestampMs; else d.senderTimestampMs = o.longs === String ? longToString(m.senderTimestampMs) : o.longs === Number ? longToNumber(m.senderTimestampMs) : m.senderTimestampMs; + if (o.oneofs) + d._senderTimestampMs = "senderTimestampMs"; } if (m.pollUpdateParentKey != null && m.hasOwnProperty("pollUpdateParentKey")) { d.pollUpdateParentKey = m.pollUpdateParentKey; + if (o.oneofs) + d._pollUpdateParentKey = "pollUpdateParentKey"; } if (m.encPollVote != null && m.hasOwnProperty("encPollVote")) { d.encPollVote = $root.proto.PollEncValue.toObject(m.encPollVote, o); + if (o.oneofs) + d._encPollVote = "encPollVote"; } if (m.encReactionTargetMessageKey != null && m.hasOwnProperty("encReactionTargetMessageKey")) { d.encReactionTargetMessageKey = m.encReactionTargetMessageKey; + if (o.oneofs) + d._encReactionTargetMessageKey = "encReactionTargetMessageKey"; } if (m.encReactionEncPayload != null && m.hasOwnProperty("encReactionEncPayload")) { d.encReactionEncPayload = o.bytes === String ? $util.base64.encode(m.encReactionEncPayload, 0, m.encReactionEncPayload.length) : o.bytes === Array ? Array.prototype.slice.call(m.encReactionEncPayload) : m.encReactionEncPayload; + if (o.oneofs) + d._encReactionEncPayload = "encReactionEncPayload"; } if (m.encReactionEncIv != null && m.hasOwnProperty("encReactionEncIv")) { d.encReactionEncIv = o.bytes === String ? $util.base64.encode(m.encReactionEncIv, 0, m.encReactionEncIv.length) : o.bytes === Array ? Array.prototype.slice.call(m.encReactionEncIv) : m.encReactionEncIv; + if (o.oneofs) + d._encReactionEncIv = "encReactionEncIv"; } if (m.isSentCagPollCreation != null && m.hasOwnProperty("isSentCagPollCreation")) { d.isSentCagPollCreation = m.isSentCagPollCreation; + if (o.oneofs) + d._isSentCagPollCreation = "isSentCagPollCreation"; } if (m.botMessageSecret != null && m.hasOwnProperty("botMessageSecret")) { d.botMessageSecret = o.bytes === String ? $util.base64.encode(m.botMessageSecret, 0, m.botMessageSecret.length) : o.bytes === Array ? Array.prototype.slice.call(m.botMessageSecret) : m.botMessageSecret; + if (o.oneofs) + d._botMessageSecret = "botMessageSecret"; } if (m.targetMessageKey != null && m.hasOwnProperty("targetMessageKey")) { d.targetMessageKey = m.targetMessageKey; + if (o.oneofs) + d._targetMessageKey = "targetMessageKey"; } if (m.encPayload != null && m.hasOwnProperty("encPayload")) { d.encPayload = o.bytes === String ? $util.base64.encode(m.encPayload, 0, m.encPayload.length) : o.bytes === Array ? Array.prototype.slice.call(m.encPayload) : m.encPayload; + if (o.oneofs) + d._encPayload = "encPayload"; } if (m.encIv != null && m.hasOwnProperty("encIv")) { d.encIv = o.bytes === String ? $util.base64.encode(m.encIv, 0, m.encIv.length) : o.bytes === Array ? Array.prototype.slice.call(m.encIv) : m.encIv; + if (o.oneofs) + d._encIv = "encIv"; } if (m.eventName != null && m.hasOwnProperty("eventName")) { d.eventName = m.eventName; + if (o.oneofs) + d._eventName = "eventName"; } if (m.isEventCanceled != null && m.hasOwnProperty("isEventCanceled")) { d.isEventCanceled = m.isEventCanceled; + if (o.oneofs) + d._isEventCanceled = "isEventCanceled"; } if (m.eventDescription != null && m.hasOwnProperty("eventDescription")) { d.eventDescription = m.eventDescription; + if (o.oneofs) + d._eventDescription = "eventDescription"; } if (m.eventJoinLink != null && m.hasOwnProperty("eventJoinLink")) { d.eventJoinLink = m.eventJoinLink; + if (o.oneofs) + d._eventJoinLink = "eventJoinLink"; } if (m.eventStartTime != null && m.hasOwnProperty("eventStartTime")) { if (typeof m.eventStartTime === "number") d.eventStartTime = o.longs === String ? String(m.eventStartTime) : m.eventStartTime; else d.eventStartTime = o.longs === String ? longToString(m.eventStartTime) : o.longs === Number ? longToNumber(m.eventStartTime) : m.eventStartTime; + if (o.oneofs) + d._eventStartTime = "eventStartTime"; } if (m.eventLocation != null && m.hasOwnProperty("eventLocation")) { d.eventLocation = $root.proto.MsgOpaqueData.EventLocation.toObject(m.eventLocation, o); + if (o.oneofs) + d._eventLocation = "eventLocation"; } if (m.eventEndTime != null && m.hasOwnProperty("eventEndTime")) { if (typeof m.eventEndTime === "number") d.eventEndTime = o.longs === String ? String(m.eventEndTime) : m.eventEndTime; else d.eventEndTime = o.longs === String ? longToString(m.eventEndTime) : o.longs === Number ? longToNumber(m.eventEndTime) : m.eventEndTime; + if (o.oneofs) + d._eventEndTime = "eventEndTime"; } if (m.pollVotesSnapshot != null && m.hasOwnProperty("pollVotesSnapshot")) { d.pollVotesSnapshot = $root.proto.MsgOpaqueData.PollVotesSnapshot.toObject(m.pollVotesSnapshot, o); + if (o.oneofs) + d._pollVotesSnapshot = "pollVotesSnapshot"; } if (m.pollContentType != null && m.hasOwnProperty("pollContentType")) { d.pollContentType = o.enums === String ? $root.proto.MsgOpaqueData.PollContentType[m.pollContentType] === undefined ? m.pollContentType : $root.proto.MsgOpaqueData.PollContentType[m.pollContentType] : m.pollContentType; + if (o.oneofs) + d._pollContentType = "pollContentType"; } if (m.plainProtobufBytes != null && m.hasOwnProperty("plainProtobufBytes")) { d.plainProtobufBytes = o.bytes === String ? $util.base64.encode(m.plainProtobufBytes, 0, m.plainProtobufBytes.length) : o.bytes === Array ? Array.prototype.slice.call(m.plainProtobufBytes) : m.plainProtobufBytes; + if (o.oneofs) + d._plainProtobufBytes = "plainProtobufBytes"; } if (m.eventIsScheduledCall != null && m.hasOwnProperty("eventIsScheduledCall")) { d.eventIsScheduledCall = m.eventIsScheduledCall; + if (o.oneofs) + d._eventIsScheduledCall = "eventIsScheduledCall"; } if (m.eventExtraGuestsAllowed != null && m.hasOwnProperty("eventExtraGuestsAllowed")) { d.eventExtraGuestsAllowed = m.eventExtraGuestsAllowed; + if (o.oneofs) + d._eventExtraGuestsAllowed = "eventExtraGuestsAllowed"; } if (m.pollType != null && m.hasOwnProperty("pollType")) { d.pollType = o.enums === String ? $root.proto.MsgOpaqueData.PollType[m.pollType] === undefined ? m.pollType : $root.proto.MsgOpaqueData.PollType[m.pollType] : m.pollType; + if (o.oneofs) + d._pollType = "pollType"; } if (m.correctOptionIndex != null && m.hasOwnProperty("correctOptionIndex")) { d.correctOptionIndex = m.correctOptionIndex; + if (o.oneofs) + d._correctOptionIndex = "correctOptionIndex"; } if (m.quarantineExtractedText != null && m.hasOwnProperty("quarantineExtractedText")) { d.quarantineExtractedText = m.quarantineExtractedText; + if (o.oneofs) + d._quarantineExtractedText = "quarantineExtractedText"; } if (m.originalSelfAuthor != null && m.hasOwnProperty("originalSelfAuthor")) { d.originalSelfAuthor = m.originalSelfAuthor; + if (o.oneofs) + d._originalSelfAuthor = "originalSelfAuthor"; } return d; }; @@ -60632,12 +70938,50 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - EventLocation.prototype.degreesLatitude = 0; - EventLocation.prototype.degreesLongitude = 0; - EventLocation.prototype.name = ""; - EventLocation.prototype.address = ""; - EventLocation.prototype.url = ""; - EventLocation.prototype.jpegThumbnail = $util.newBuffer([]); + EventLocation.prototype.degreesLatitude = null; + EventLocation.prototype.degreesLongitude = null; + EventLocation.prototype.name = null; + EventLocation.prototype.address = null; + EventLocation.prototype.url = null; + EventLocation.prototype.jpegThumbnail = null; + + let $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) + }); EventLocation.create = function create(properties) { return new EventLocation(properties); @@ -60734,37 +71078,35 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.degreesLatitude = 0; - d.degreesLongitude = 0; - d.name = ""; - d.address = ""; - d.url = ""; - if (o.bytes === String) - d.jpegThumbnail = ""; - else { - d.jpegThumbnail = []; - if (o.bytes !== Array) - d.jpegThumbnail = $util.newBuffer(d.jpegThumbnail); - } - } if (m.degreesLatitude != null && m.hasOwnProperty("degreesLatitude")) { d.degreesLatitude = o.json && !isFinite(m.degreesLatitude) ? String(m.degreesLatitude) : m.degreesLatitude; + if (o.oneofs) + d._degreesLatitude = "degreesLatitude"; } if (m.degreesLongitude != null && m.hasOwnProperty("degreesLongitude")) { d.degreesLongitude = o.json && !isFinite(m.degreesLongitude) ? String(m.degreesLongitude) : m.degreesLongitude; + if (o.oneofs) + d._degreesLongitude = "degreesLongitude"; } if (m.name != null && m.hasOwnProperty("name")) { d.name = m.name; + if (o.oneofs) + d._name = "name"; } if (m.address != null && m.hasOwnProperty("address")) { d.address = m.address; + if (o.oneofs) + d._address = "address"; } if (m.url != null && m.hasOwnProperty("url")) { d.url = m.url; + if (o.oneofs) + d._url = "url"; } if (m.jpegThumbnail != null && m.hasOwnProperty("jpegThumbnail")) { d.jpegThumbnail = o.bytes === String ? $util.base64.encode(m.jpegThumbnail, 0, m.jpegThumbnail.length) : o.bytes === Array ? Array.prototype.slice.call(m.jpegThumbnail) : m.jpegThumbnail; + if (o.oneofs) + d._jpegThumbnail = "jpegThumbnail"; } return d; }; @@ -60800,8 +71142,22 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - PollOption.prototype.name = ""; - PollOption.prototype.hash = ""; + PollOption.prototype.name = null; + PollOption.prototype.hash = null; + + let $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) + }); PollOption.create = function create(properties) { return new PollOption(properties); @@ -60859,15 +71215,15 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.name = ""; - d.hash = ""; - } if (m.name != null && m.hasOwnProperty("name")) { d.name = m.name; + if (o.oneofs) + d._name = "name"; } if (m.hash != null && m.hasOwnProperty("hash")) { d.hash = m.hash; + if (o.oneofs) + d._hash = "hash"; } return d; }; @@ -60903,7 +71259,21 @@ export const proto = $root.proto = (() => { } PollVoteSnapshot.prototype.option = null; - PollVoteSnapshot.prototype.optionVoteCount = 0; + PollVoteSnapshot.prototype.optionVoteCount = null; + + let $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) + }); PollVoteSnapshot.create = function create(properties) { return new PollVoteSnapshot(properties); @@ -60963,15 +71333,15 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.option = null; - d.optionVoteCount = 0; - } if (m.option != null && m.hasOwnProperty("option")) { d.option = $root.proto.MsgOpaqueData.PollOption.toObject(m.option, o); + if (o.oneofs) + d._option = "option"; } if (m.optionVoteCount != null && m.hasOwnProperty("optionVoteCount")) { d.optionVoteCount = m.optionVoteCount; + if (o.oneofs) + d._optionVoteCount = "optionVoteCount"; } return d; }; @@ -61101,6 +71471,20 @@ export const proto = $root.proto = (() => { MsgRowOpaqueData.prototype.currentMsg = null; MsgRowOpaqueData.prototype.quotedMsg = null; + let $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) + }); + MsgRowOpaqueData.create = function create(properties) { return new MsgRowOpaqueData(properties); }; @@ -61161,15 +71545,15 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.currentMsg = null; - d.quotedMsg = null; - } if (m.currentMsg != null && m.hasOwnProperty("currentMsg")) { d.currentMsg = $root.proto.MsgOpaqueData.toObject(m.currentMsg, o); + if (o.oneofs) + d._currentMsg = "currentMsg"; } if (m.quotedMsg != null && m.hasOwnProperty("quotedMsg")) { d.quotedMsg = $root.proto.MsgOpaqueData.toObject(m.quotedMsg, o); + if (o.oneofs) + d._quotedMsg = "quotedMsg"; } return d; }; @@ -61277,8 +71661,22 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - NoiseCertificate.prototype.details = $util.newBuffer([]); - NoiseCertificate.prototype.signature = $util.newBuffer([]); + NoiseCertificate.prototype.details = null; + NoiseCertificate.prototype.signature = null; + + let $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) + }); NoiseCertificate.create = function create(properties) { return new NoiseCertificate(properties); @@ -61342,27 +71740,15 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - if (o.bytes === String) - d.details = ""; - else { - d.details = []; - if (o.bytes !== Array) - d.details = $util.newBuffer(d.details); - } - if (o.bytes === String) - d.signature = ""; - else { - d.signature = []; - if (o.bytes !== Array) - d.signature = $util.newBuffer(d.signature); - } - } if (m.details != null && m.hasOwnProperty("details")) { d.details = o.bytes === String ? $util.base64.encode(m.details, 0, m.details.length) : o.bytes === Array ? Array.prototype.slice.call(m.details) : m.details; + if (o.oneofs) + d._details = "details"; } if (m.signature != null && m.hasOwnProperty("signature")) { d.signature = o.bytes === String ? $util.base64.encode(m.signature, 0, m.signature.length) : o.bytes === Array ? Array.prototype.slice.call(m.signature) : m.signature; + if (o.oneofs) + d._signature = "signature"; } return d; }; @@ -61387,11 +71773,43 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - Details.prototype.serial = 0; - Details.prototype.issuer = ""; - Details.prototype.expires = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - Details.prototype.subject = ""; - Details.prototype.key = $util.newBuffer([]); + Details.prototype.serial = null; + Details.prototype.issuer = null; + Details.prototype.expires = null; + Details.prototype.subject = null; + Details.prototype.key = null; + + let $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) + }); Details.create = function create(properties) { return new Details(properties); @@ -61486,40 +71904,33 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.serial = 0; - d.issuer = ""; - if ($util.Long) { - var n = new $util.Long(0, 0, true); - d.expires = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.expires = o.longs === String ? "0" : 0; - d.subject = ""; - if (o.bytes === String) - d.key = ""; - else { - d.key = []; - if (o.bytes !== Array) - d.key = $util.newBuffer(d.key); - } - } if (m.serial != null && m.hasOwnProperty("serial")) { d.serial = m.serial; + if (o.oneofs) + d._serial = "serial"; } if (m.issuer != null && m.hasOwnProperty("issuer")) { d.issuer = m.issuer; + if (o.oneofs) + d._issuer = "issuer"; } if (m.expires != null && m.hasOwnProperty("expires")) { if (typeof m.expires === "number") d.expires = o.longs === String ? String(m.expires) : m.expires; else d.expires = o.longs === String ? longToString(m.expires, true) : o.longs === Number ? longToNumber(m.expires, true) : m.expires; + if (o.oneofs) + d._expires = "expires"; } if (m.subject != null && m.hasOwnProperty("subject")) { d.subject = m.subject; + if (o.oneofs) + d._subject = "subject"; } if (m.key != null && m.hasOwnProperty("key")) { d.key = o.bytes === String ? $util.base64.encode(m.key, 0, m.key.length) : o.bytes === Array ? Array.prototype.slice.call(m.key) : m.key; + if (o.oneofs) + d._key = "key"; } return d; }; @@ -61552,8 +71963,34 @@ export const proto = $root.proto = (() => { NotificationMessageInfo.prototype.key = null; NotificationMessageInfo.prototype.message = null; - NotificationMessageInfo.prototype.messageTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - NotificationMessageInfo.prototype.participant = ""; + NotificationMessageInfo.prototype.messageTimestamp = null; + NotificationMessageInfo.prototype.participant = null; + + let $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) + }); NotificationMessageInfo.create = function create(properties) { return new NotificationMessageInfo(properties); @@ -61640,30 +72077,28 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.key = null; - d.message = null; - if ($util.Long) { - var n = new $util.Long(0, 0, true); - d.messageTimestamp = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.messageTimestamp = o.longs === String ? "0" : 0; - d.participant = ""; - } if (m.key != null && m.hasOwnProperty("key")) { d.key = $root.proto.MessageKey.toObject(m.key, o); + if (o.oneofs) + d._key = "key"; } if (m.message != null && m.hasOwnProperty("message")) { d.message = $root.proto.Message.toObject(m.message, o); + if (o.oneofs) + d._message = "message"; } if (m.messageTimestamp != null && m.hasOwnProperty("messageTimestamp")) { if (typeof m.messageTimestamp === "number") d.messageTimestamp = o.longs === String ? String(m.messageTimestamp) : m.messageTimestamp; else d.messageTimestamp = o.longs === String ? longToString(m.messageTimestamp, true) : o.longs === Number ? longToNumber(m.messageTimestamp, true) : m.messageTimestamp; + if (o.oneofs) + d._messageTimestamp = "messageTimestamp"; } if (m.participant != null && m.hasOwnProperty("participant")) { d.participant = m.participant; + if (o.oneofs) + d._participant = "participant"; } return d; }; @@ -61691,12 +72126,50 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - NotificationSettings.prototype.messageVibrate = ""; - NotificationSettings.prototype.messagePopup = ""; - NotificationSettings.prototype.messageLight = ""; - NotificationSettings.prototype.lowPriorityNotifications = false; - NotificationSettings.prototype.reactionsMuted = false; - NotificationSettings.prototype.callVibrate = ""; + NotificationSettings.prototype.messageVibrate = null; + NotificationSettings.prototype.messagePopup = null; + NotificationSettings.prototype.messageLight = null; + NotificationSettings.prototype.lowPriorityNotifications = null; + NotificationSettings.prototype.reactionsMuted = null; + NotificationSettings.prototype.callVibrate = null; + + let $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) + }); NotificationSettings.create = function create(properties) { return new NotificationSettings(properties); @@ -61790,31 +72263,35 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.messageVibrate = ""; - d.messagePopup = ""; - d.messageLight = ""; - d.lowPriorityNotifications = false; - d.reactionsMuted = false; - d.callVibrate = ""; - } if (m.messageVibrate != null && m.hasOwnProperty("messageVibrate")) { d.messageVibrate = m.messageVibrate; + if (o.oneofs) + d._messageVibrate = "messageVibrate"; } if (m.messagePopup != null && m.hasOwnProperty("messagePopup")) { d.messagePopup = m.messagePopup; + if (o.oneofs) + d._messagePopup = "messagePopup"; } if (m.messageLight != null && m.hasOwnProperty("messageLight")) { d.messageLight = m.messageLight; + if (o.oneofs) + d._messageLight = "messageLight"; } if (m.lowPriorityNotifications != null && m.hasOwnProperty("lowPriorityNotifications")) { d.lowPriorityNotifications = m.lowPriorityNotifications; + if (o.oneofs) + d._lowPriorityNotifications = "lowPriorityNotifications"; } if (m.reactionsMuted != null && m.hasOwnProperty("reactionsMuted")) { d.reactionsMuted = m.reactionsMuted; + if (o.oneofs) + d._reactionsMuted = "reactionsMuted"; } if (m.callVibrate != null && m.hasOwnProperty("callVibrate")) { d.callVibrate = m.callVibrate; + if (o.oneofs) + d._callVibrate = "callVibrate"; } return d; }; @@ -61842,9 +72319,29 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - PairingRequest.prototype.companionPublicKey = $util.newBuffer([]); - PairingRequest.prototype.companionIdentityKey = $util.newBuffer([]); - PairingRequest.prototype.advSecret = $util.newBuffer([]); + PairingRequest.prototype.companionPublicKey = null; + PairingRequest.prototype.companionIdentityKey = null; + PairingRequest.prototype.advSecret = null; + + let $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) + }); PairingRequest.create = function create(properties) { return new PairingRequest(properties); @@ -61920,37 +72417,20 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - if (o.bytes === String) - d.companionPublicKey = ""; - else { - d.companionPublicKey = []; - if (o.bytes !== Array) - d.companionPublicKey = $util.newBuffer(d.companionPublicKey); - } - if (o.bytes === String) - d.companionIdentityKey = ""; - else { - d.companionIdentityKey = []; - if (o.bytes !== Array) - d.companionIdentityKey = $util.newBuffer(d.companionIdentityKey); - } - if (o.bytes === String) - d.advSecret = ""; - else { - d.advSecret = []; - if (o.bytes !== Array) - d.advSecret = $util.newBuffer(d.advSecret); - } - } if (m.companionPublicKey != null && m.hasOwnProperty("companionPublicKey")) { d.companionPublicKey = o.bytes === String ? $util.base64.encode(m.companionPublicKey, 0, m.companionPublicKey.length) : o.bytes === Array ? Array.prototype.slice.call(m.companionPublicKey) : m.companionPublicKey; + if (o.oneofs) + d._companionPublicKey = "companionPublicKey"; } if (m.companionIdentityKey != null && m.hasOwnProperty("companionIdentityKey")) { d.companionIdentityKey = o.bytes === String ? $util.base64.encode(m.companionIdentityKey, 0, m.companionIdentityKey.length) : o.bytes === Array ? Array.prototype.slice.call(m.companionIdentityKey) : m.companionIdentityKey; + if (o.oneofs) + d._companionIdentityKey = "companionIdentityKey"; } if (m.advSecret != null && m.hasOwnProperty("advSecret")) { d.advSecret = o.bytes === String ? $util.base64.encode(m.advSecret, 0, m.advSecret.length) : o.bytes === Array ? Array.prototype.slice.call(m.advSecret) : m.advSecret; + if (o.oneofs) + d._advSecret = "advSecret"; } return d; }; @@ -61978,9 +72458,29 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - PastParticipant.prototype.userJid = ""; - PastParticipant.prototype.leaveReason = 0; - PastParticipant.prototype.leaveTs = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + PastParticipant.prototype.userJid = null; + PastParticipant.prototype.leaveReason = null; + PastParticipant.prototype.leaveTs = null; + + let $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) + }); PastParticipant.create = function create(properties) { return new PastParticipant(properties); @@ -62067,26 +72567,23 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.userJid = ""; - d.leaveReason = o.enums === String ? "LEFT" : 0; - if ($util.Long) { - var n = new $util.Long(0, 0, true); - d.leaveTs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.leaveTs = o.longs === String ? "0" : 0; - } if (m.userJid != null && m.hasOwnProperty("userJid")) { d.userJid = m.userJid; + if (o.oneofs) + d._userJid = "userJid"; } if (m.leaveReason != null && m.hasOwnProperty("leaveReason")) { d.leaveReason = o.enums === String ? $root.proto.PastParticipant.LeaveReason[m.leaveReason] === undefined ? m.leaveReason : $root.proto.PastParticipant.LeaveReason[m.leaveReason] : m.leaveReason; + if (o.oneofs) + d._leaveReason = "leaveReason"; } if (m.leaveTs != null && m.hasOwnProperty("leaveTs")) { if (typeof m.leaveTs === "number") d.leaveTs = o.longs === String ? String(m.leaveTs) : m.leaveTs; else d.leaveTs = o.longs === String ? longToString(m.leaveTs, true) : o.longs === Number ? longToNumber(m.leaveTs, true) : m.leaveTs; + if (o.oneofs) + d._leaveTs = "leaveTs"; } return d; }; @@ -62122,9 +72619,17 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - PastParticipants.prototype.groupJid = ""; + PastParticipants.prototype.groupJid = null; PastParticipants.prototype.pastParticipants = $util.emptyArray; + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PastParticipants.prototype, "_groupJid", { + get: $util.oneOfGetter($oneOfFields = ["groupJid"]), + set: $util.oneOfSetter($oneOfFields) + }); + PastParticipants.create = function create(properties) { return new PastParticipants(properties); }; @@ -62195,11 +72700,10 @@ export const proto = $root.proto = (() => { if (o.arrays || o.defaults) { d.pastParticipants = []; } - if (o.defaults) { - d.groupJid = ""; - } if (m.groupJid != null && m.hasOwnProperty("groupJid")) { d.groupJid = m.groupJid; + if (o.oneofs) + d._groupJid = "groupJid"; } if (m.pastParticipants && m.pastParticipants.length) { d.pastParticipants = []; @@ -62233,17 +72737,85 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - PatchDebugData.prototype.currentLthash = $util.newBuffer([]); - PatchDebugData.prototype.newLthash = $util.newBuffer([]); - PatchDebugData.prototype.patchVersion = $util.newBuffer([]); - PatchDebugData.prototype.collectionName = $util.newBuffer([]); - PatchDebugData.prototype.firstFourBytesFromAHashOfSnapshotMacKey = $util.newBuffer([]); - PatchDebugData.prototype.newLthashSubtract = $util.newBuffer([]); - PatchDebugData.prototype.numberAdd = 0; - PatchDebugData.prototype.numberRemove = 0; - PatchDebugData.prototype.numberOverride = 0; - PatchDebugData.prototype.senderPlatform = 0; - PatchDebugData.prototype.isSenderPrimary = false; + PatchDebugData.prototype.currentLthash = null; + PatchDebugData.prototype.newLthash = null; + PatchDebugData.prototype.patchVersion = null; + PatchDebugData.prototype.collectionName = null; + PatchDebugData.prototype.firstFourBytesFromAHashOfSnapshotMacKey = null; + PatchDebugData.prototype.newLthashSubtract = null; + PatchDebugData.prototype.numberAdd = null; + PatchDebugData.prototype.numberRemove = null; + PatchDebugData.prototype.numberOverride = null; + PatchDebugData.prototype.senderPlatform = null; + PatchDebugData.prototype.isSenderPrimary = null; + + let $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) + }); PatchDebugData.create = function create(properties) { return new PatchDebugData(properties); @@ -62453,87 +73025,60 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - if (o.bytes === String) - d.currentLthash = ""; - else { - d.currentLthash = []; - if (o.bytes !== Array) - d.currentLthash = $util.newBuffer(d.currentLthash); - } - if (o.bytes === String) - d.newLthash = ""; - else { - d.newLthash = []; - if (o.bytes !== Array) - d.newLthash = $util.newBuffer(d.newLthash); - } - if (o.bytes === String) - d.patchVersion = ""; - else { - d.patchVersion = []; - if (o.bytes !== Array) - d.patchVersion = $util.newBuffer(d.patchVersion); - } - if (o.bytes === String) - d.collectionName = ""; - else { - d.collectionName = []; - if (o.bytes !== Array) - d.collectionName = $util.newBuffer(d.collectionName); - } - if (o.bytes === String) - d.firstFourBytesFromAHashOfSnapshotMacKey = ""; - else { - d.firstFourBytesFromAHashOfSnapshotMacKey = []; - if (o.bytes !== Array) - d.firstFourBytesFromAHashOfSnapshotMacKey = $util.newBuffer(d.firstFourBytesFromAHashOfSnapshotMacKey); - } - if (o.bytes === String) - d.newLthashSubtract = ""; - else { - d.newLthashSubtract = []; - if (o.bytes !== Array) - d.newLthashSubtract = $util.newBuffer(d.newLthashSubtract); - } - d.numberAdd = 0; - d.numberRemove = 0; - d.numberOverride = 0; - d.senderPlatform = o.enums === String ? "ANDROID" : 0; - d.isSenderPrimary = false; - } if (m.currentLthash != null && m.hasOwnProperty("currentLthash")) { d.currentLthash = o.bytes === String ? $util.base64.encode(m.currentLthash, 0, m.currentLthash.length) : o.bytes === Array ? Array.prototype.slice.call(m.currentLthash) : m.currentLthash; + if (o.oneofs) + d._currentLthash = "currentLthash"; } if (m.newLthash != null && m.hasOwnProperty("newLthash")) { d.newLthash = o.bytes === String ? $util.base64.encode(m.newLthash, 0, m.newLthash.length) : o.bytes === Array ? Array.prototype.slice.call(m.newLthash) : m.newLthash; + if (o.oneofs) + d._newLthash = "newLthash"; } if (m.patchVersion != null && m.hasOwnProperty("patchVersion")) { d.patchVersion = o.bytes === String ? $util.base64.encode(m.patchVersion, 0, m.patchVersion.length) : o.bytes === Array ? Array.prototype.slice.call(m.patchVersion) : m.patchVersion; + if (o.oneofs) + d._patchVersion = "patchVersion"; } if (m.collectionName != null && m.hasOwnProperty("collectionName")) { d.collectionName = o.bytes === String ? $util.base64.encode(m.collectionName, 0, m.collectionName.length) : o.bytes === Array ? Array.prototype.slice.call(m.collectionName) : m.collectionName; + if (o.oneofs) + d._collectionName = "collectionName"; } if (m.firstFourBytesFromAHashOfSnapshotMacKey != null && m.hasOwnProperty("firstFourBytesFromAHashOfSnapshotMacKey")) { d.firstFourBytesFromAHashOfSnapshotMacKey = o.bytes === String ? $util.base64.encode(m.firstFourBytesFromAHashOfSnapshotMacKey, 0, m.firstFourBytesFromAHashOfSnapshotMacKey.length) : o.bytes === Array ? Array.prototype.slice.call(m.firstFourBytesFromAHashOfSnapshotMacKey) : m.firstFourBytesFromAHashOfSnapshotMacKey; + if (o.oneofs) + d._firstFourBytesFromAHashOfSnapshotMacKey = "firstFourBytesFromAHashOfSnapshotMacKey"; } if (m.newLthashSubtract != null && m.hasOwnProperty("newLthashSubtract")) { d.newLthashSubtract = o.bytes === String ? $util.base64.encode(m.newLthashSubtract, 0, m.newLthashSubtract.length) : o.bytes === Array ? Array.prototype.slice.call(m.newLthashSubtract) : m.newLthashSubtract; + if (o.oneofs) + d._newLthashSubtract = "newLthashSubtract"; } if (m.numberAdd != null && m.hasOwnProperty("numberAdd")) { d.numberAdd = m.numberAdd; + if (o.oneofs) + d._numberAdd = "numberAdd"; } if (m.numberRemove != null && m.hasOwnProperty("numberRemove")) { d.numberRemove = m.numberRemove; + if (o.oneofs) + d._numberRemove = "numberRemove"; } if (m.numberOverride != null && m.hasOwnProperty("numberOverride")) { d.numberOverride = m.numberOverride; + if (o.oneofs) + d._numberOverride = "numberOverride"; } if (m.senderPlatform != null && m.hasOwnProperty("senderPlatform")) { d.senderPlatform = o.enums === String ? $root.proto.PatchDebugData.Platform[m.senderPlatform] === undefined ? m.senderPlatform : $root.proto.PatchDebugData.Platform[m.senderPlatform] : m.senderPlatform; + if (o.oneofs) + d._senderPlatform = "senderPlatform"; } if (m.isSenderPrimary != null && m.hasOwnProperty("isSenderPrimary")) { d.isSenderPrimary = m.isSenderPrimary; + if (o.oneofs) + d._isSenderPrimary = "isSenderPrimary"; } return d; }; @@ -62578,16 +73123,78 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - PaymentBackground.prototype.id = ""; - PaymentBackground.prototype.fileLength = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - PaymentBackground.prototype.width = 0; - PaymentBackground.prototype.height = 0; - PaymentBackground.prototype.mimetype = ""; - PaymentBackground.prototype.placeholderArgb = 0; - PaymentBackground.prototype.textArgb = 0; - PaymentBackground.prototype.subtextArgb = 0; + PaymentBackground.prototype.id = null; + PaymentBackground.prototype.fileLength = null; + PaymentBackground.prototype.width = null; + PaymentBackground.prototype.height = null; + PaymentBackground.prototype.mimetype = null; + PaymentBackground.prototype.placeholderArgb = null; + PaymentBackground.prototype.textArgb = null; + PaymentBackground.prototype.subtextArgb = null; PaymentBackground.prototype.mediaData = null; - PaymentBackground.prototype.type = 0; + PaymentBackground.prototype.type = null; + + let $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) + }); PaymentBackground.create = function create(properties) { return new PaymentBackground(properties); @@ -62739,54 +73346,58 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.id = ""; - if ($util.Long) { - var n = new $util.Long(0, 0, true); - d.fileLength = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.fileLength = o.longs === String ? "0" : 0; - d.width = 0; - d.height = 0; - d.mimetype = ""; - d.placeholderArgb = 0; - d.textArgb = 0; - d.subtextArgb = 0; - d.mediaData = null; - d.type = o.enums === String ? "UNKNOWN" : 0; - } if (m.id != null && m.hasOwnProperty("id")) { d.id = m.id; + if (o.oneofs) + d._id = "id"; } if (m.fileLength != null && m.hasOwnProperty("fileLength")) { if (typeof m.fileLength === "number") d.fileLength = o.longs === String ? String(m.fileLength) : m.fileLength; else d.fileLength = o.longs === String ? longToString(m.fileLength, true) : o.longs === Number ? longToNumber(m.fileLength, true) : m.fileLength; + if (o.oneofs) + d._fileLength = "fileLength"; } if (m.width != null && m.hasOwnProperty("width")) { d.width = m.width; + if (o.oneofs) + d._width = "width"; } if (m.height != null && m.hasOwnProperty("height")) { d.height = m.height; + if (o.oneofs) + d._height = "height"; } if (m.mimetype != null && m.hasOwnProperty("mimetype")) { d.mimetype = m.mimetype; + if (o.oneofs) + d._mimetype = "mimetype"; } if (m.placeholderArgb != null && m.hasOwnProperty("placeholderArgb")) { d.placeholderArgb = m.placeholderArgb; + if (o.oneofs) + d._placeholderArgb = "placeholderArgb"; } if (m.textArgb != null && m.hasOwnProperty("textArgb")) { d.textArgb = m.textArgb; + if (o.oneofs) + d._textArgb = "textArgb"; } if (m.subtextArgb != null && m.hasOwnProperty("subtextArgb")) { d.subtextArgb = m.subtextArgb; + if (o.oneofs) + d._subtextArgb = "subtextArgb"; } if (m.mediaData != null && m.hasOwnProperty("mediaData")) { d.mediaData = $root.proto.PaymentBackground.MediaData.toObject(m.mediaData, o); + if (o.oneofs) + d._mediaData = "mediaData"; } if (m.type != null && m.hasOwnProperty("type")) { d.type = o.enums === String ? $root.proto.PaymentBackground.Type[m.type] === undefined ? m.type : $root.proto.PaymentBackground.Type[m.type] : m.type; + if (o.oneofs) + d._type = "type"; } return d; }; @@ -62811,11 +73422,43 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - MediaData.prototype.mediaKey = $util.newBuffer([]); - MediaData.prototype.mediaKeyTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - MediaData.prototype.fileSha256 = $util.newBuffer([]); - MediaData.prototype.fileEncSha256 = $util.newBuffer([]); - MediaData.prototype.directPath = ""; + MediaData.prototype.mediaKey = null; + MediaData.prototype.mediaKeyTimestamp = null; + MediaData.prototype.fileSha256 = null; + MediaData.prototype.fileEncSha256 = null; + MediaData.prototype.directPath = null; + + let $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) + }); MediaData.create = function create(properties) { return new MediaData(properties); @@ -62916,52 +73559,33 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - if (o.bytes === String) - d.mediaKey = ""; - else { - d.mediaKey = []; - if (o.bytes !== Array) - d.mediaKey = $util.newBuffer(d.mediaKey); - } - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.mediaKeyTimestamp = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.mediaKeyTimestamp = o.longs === String ? "0" : 0; - if (o.bytes === String) - d.fileSha256 = ""; - else { - d.fileSha256 = []; - if (o.bytes !== Array) - d.fileSha256 = $util.newBuffer(d.fileSha256); - } - if (o.bytes === String) - d.fileEncSha256 = ""; - else { - d.fileEncSha256 = []; - if (o.bytes !== Array) - d.fileEncSha256 = $util.newBuffer(d.fileEncSha256); - } - d.directPath = ""; - } if (m.mediaKey != null && m.hasOwnProperty("mediaKey")) { d.mediaKey = o.bytes === String ? $util.base64.encode(m.mediaKey, 0, m.mediaKey.length) : o.bytes === Array ? Array.prototype.slice.call(m.mediaKey) : m.mediaKey; + if (o.oneofs) + d._mediaKey = "mediaKey"; } if (m.mediaKeyTimestamp != null && m.hasOwnProperty("mediaKeyTimestamp")) { if (typeof m.mediaKeyTimestamp === "number") d.mediaKeyTimestamp = o.longs === String ? String(m.mediaKeyTimestamp) : m.mediaKeyTimestamp; else d.mediaKeyTimestamp = o.longs === String ? longToString(m.mediaKeyTimestamp) : o.longs === Number ? longToNumber(m.mediaKeyTimestamp) : m.mediaKeyTimestamp; + if (o.oneofs) + d._mediaKeyTimestamp = "mediaKeyTimestamp"; } if (m.fileSha256 != null && m.hasOwnProperty("fileSha256")) { d.fileSha256 = o.bytes === String ? $util.base64.encode(m.fileSha256, 0, m.fileSha256.length) : o.bytes === Array ? Array.prototype.slice.call(m.fileSha256) : m.fileSha256; + if (o.oneofs) + d._fileSha256 = "fileSha256"; } if (m.fileEncSha256 != null && m.hasOwnProperty("fileEncSha256")) { d.fileEncSha256 = o.bytes === String ? $util.base64.encode(m.fileEncSha256, 0, m.fileEncSha256.length) : o.bytes === Array ? Array.prototype.slice.call(m.fileEncSha256) : m.fileEncSha256; + if (o.oneofs) + d._fileEncSha256 = "fileEncSha256"; } if (m.directPath != null && m.hasOwnProperty("directPath")) { d.directPath = m.directPath; + if (o.oneofs) + d._directPath = "directPath"; } return d; }; @@ -62999,20 +73623,100 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - PaymentInfo.prototype.currencyDeprecated = 0; - PaymentInfo.prototype.amount1000 = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - PaymentInfo.prototype.receiverJid = ""; - PaymentInfo.prototype.status = 0; - PaymentInfo.prototype.transactionTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + PaymentInfo.prototype.currencyDeprecated = null; + PaymentInfo.prototype.amount1000 = null; + PaymentInfo.prototype.receiverJid = null; + PaymentInfo.prototype.status = null; + PaymentInfo.prototype.transactionTimestamp = null; PaymentInfo.prototype.requestMessageKey = null; - PaymentInfo.prototype.expiryTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - PaymentInfo.prototype.futureproofed = false; - PaymentInfo.prototype.currency = ""; - PaymentInfo.prototype.txnStatus = 0; - PaymentInfo.prototype.useNoviFiatFormat = false; + PaymentInfo.prototype.expiryTimestamp = null; + PaymentInfo.prototype.futureproofed = null; + PaymentInfo.prototype.currency = null; + PaymentInfo.prototype.txnStatus = null; + PaymentInfo.prototype.useNoviFiatFormat = null; PaymentInfo.prototype.primaryAmount = null; PaymentInfo.prototype.exchangeAmount = null; + let $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) + }); + PaymentInfo.create = function create(properties) { return new PaymentInfo(properties); }; @@ -63394,80 +74098,79 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.currencyDeprecated = o.enums === String ? "UNKNOWN_CURRENCY" : 0; - if ($util.Long) { - var n = new $util.Long(0, 0, true); - d.amount1000 = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.amount1000 = o.longs === String ? "0" : 0; - d.receiverJid = ""; - d.status = o.enums === String ? "UNKNOWN_STATUS" : 0; - if ($util.Long) { - var n = new $util.Long(0, 0, true); - d.transactionTimestamp = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.transactionTimestamp = o.longs === String ? "0" : 0; - d.requestMessageKey = null; - if ($util.Long) { - var n = new $util.Long(0, 0, true); - d.expiryTimestamp = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.expiryTimestamp = o.longs === String ? "0" : 0; - d.futureproofed = false; - d.currency = ""; - d.txnStatus = o.enums === String ? "UNKNOWN" : 0; - d.useNoviFiatFormat = false; - d.primaryAmount = null; - d.exchangeAmount = null; - } if (m.currencyDeprecated != null && m.hasOwnProperty("currencyDeprecated")) { d.currencyDeprecated = o.enums === String ? $root.proto.PaymentInfo.Currency[m.currencyDeprecated] === undefined ? m.currencyDeprecated : $root.proto.PaymentInfo.Currency[m.currencyDeprecated] : m.currencyDeprecated; + if (o.oneofs) + d._currencyDeprecated = "currencyDeprecated"; } if (m.amount1000 != null && m.hasOwnProperty("amount1000")) { if (typeof m.amount1000 === "number") d.amount1000 = o.longs === String ? String(m.amount1000) : m.amount1000; else d.amount1000 = o.longs === String ? longToString(m.amount1000, true) : o.longs === Number ? longToNumber(m.amount1000, true) : m.amount1000; + if (o.oneofs) + d._amount1000 = "amount1000"; } if (m.receiverJid != null && m.hasOwnProperty("receiverJid")) { d.receiverJid = m.receiverJid; + if (o.oneofs) + d._receiverJid = "receiverJid"; } if (m.status != null && m.hasOwnProperty("status")) { d.status = o.enums === String ? $root.proto.PaymentInfo.Status[m.status] === undefined ? m.status : $root.proto.PaymentInfo.Status[m.status] : m.status; + if (o.oneofs) + d._status = "status"; } if (m.transactionTimestamp != null && m.hasOwnProperty("transactionTimestamp")) { if (typeof m.transactionTimestamp === "number") d.transactionTimestamp = o.longs === String ? String(m.transactionTimestamp) : m.transactionTimestamp; else d.transactionTimestamp = o.longs === String ? longToString(m.transactionTimestamp, true) : o.longs === Number ? longToNumber(m.transactionTimestamp, true) : m.transactionTimestamp; + if (o.oneofs) + d._transactionTimestamp = "transactionTimestamp"; } if (m.requestMessageKey != null && m.hasOwnProperty("requestMessageKey")) { d.requestMessageKey = $root.proto.MessageKey.toObject(m.requestMessageKey, o); + if (o.oneofs) + d._requestMessageKey = "requestMessageKey"; } if (m.expiryTimestamp != null && m.hasOwnProperty("expiryTimestamp")) { if (typeof m.expiryTimestamp === "number") d.expiryTimestamp = o.longs === String ? String(m.expiryTimestamp) : m.expiryTimestamp; else d.expiryTimestamp = o.longs === String ? longToString(m.expiryTimestamp, true) : o.longs === Number ? longToNumber(m.expiryTimestamp, true) : m.expiryTimestamp; + if (o.oneofs) + d._expiryTimestamp = "expiryTimestamp"; } if (m.futureproofed != null && m.hasOwnProperty("futureproofed")) { d.futureproofed = m.futureproofed; + if (o.oneofs) + d._futureproofed = "futureproofed"; } if (m.currency != null && m.hasOwnProperty("currency")) { d.currency = m.currency; + if (o.oneofs) + d._currency = "currency"; } if (m.txnStatus != null && m.hasOwnProperty("txnStatus")) { d.txnStatus = o.enums === String ? $root.proto.PaymentInfo.TxnStatus[m.txnStatus] === undefined ? m.txnStatus : $root.proto.PaymentInfo.TxnStatus[m.txnStatus] : m.txnStatus; + if (o.oneofs) + d._txnStatus = "txnStatus"; } if (m.useNoviFiatFormat != null && m.hasOwnProperty("useNoviFiatFormat")) { d.useNoviFiatFormat = m.useNoviFiatFormat; + if (o.oneofs) + d._useNoviFiatFormat = "useNoviFiatFormat"; } if (m.primaryAmount != null && m.hasOwnProperty("primaryAmount")) { d.primaryAmount = $root.proto.Money.toObject(m.primaryAmount, o); + if (o.oneofs) + d._primaryAmount = "primaryAmount"; } if (m.exchangeAmount != null && m.hasOwnProperty("exchangeAmount")) { d.exchangeAmount = $root.proto.Money.toObject(m.exchangeAmount, o); + if (o.oneofs) + d._exchangeAmount = "exchangeAmount"; } return d; }; @@ -63556,8 +74259,22 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - PhoneNumberToLIDMapping.prototype.pnJid = ""; - PhoneNumberToLIDMapping.prototype.lidJid = ""; + PhoneNumberToLIDMapping.prototype.pnJid = null; + PhoneNumberToLIDMapping.prototype.lidJid = null; + + let $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) + }); PhoneNumberToLIDMapping.create = function create(properties) { return new PhoneNumberToLIDMapping(properties); @@ -63615,15 +74332,15 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.pnJid = ""; - d.lidJid = ""; - } if (m.pnJid != null && m.hasOwnProperty("pnJid")) { d.pnJid = m.pnJid; + if (o.oneofs) + d._pnJid = "pnJid"; } if (m.lidJid != null && m.hasOwnProperty("lidJid")) { d.lidJid = m.lidJid; + if (o.oneofs) + d._lidJid = "lidJid"; } return d; }; @@ -63651,9 +74368,29 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - PhotoChange.prototype.oldPhoto = $util.newBuffer([]); - PhotoChange.prototype.newPhoto = $util.newBuffer([]); - PhotoChange.prototype.newPhotoId = 0; + PhotoChange.prototype.oldPhoto = null; + PhotoChange.prototype.newPhoto = null; + PhotoChange.prototype.newPhotoId = null; + + let $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) + }); PhotoChange.create = function create(properties) { return new PhotoChange(properties); @@ -63726,31 +74463,20 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - if (o.bytes === String) - d.oldPhoto = ""; - else { - d.oldPhoto = []; - if (o.bytes !== Array) - d.oldPhoto = $util.newBuffer(d.oldPhoto); - } - if (o.bytes === String) - d.newPhoto = ""; - else { - d.newPhoto = []; - if (o.bytes !== Array) - d.newPhoto = $util.newBuffer(d.newPhoto); - } - d.newPhotoId = 0; - } if (m.oldPhoto != null && m.hasOwnProperty("oldPhoto")) { d.oldPhoto = o.bytes === String ? $util.base64.encode(m.oldPhoto, 0, m.oldPhoto.length) : o.bytes === Array ? Array.prototype.slice.call(m.oldPhoto) : m.oldPhoto; + if (o.oneofs) + d._oldPhoto = "oldPhoto"; } if (m.newPhoto != null && m.hasOwnProperty("newPhoto")) { d.newPhoto = o.bytes === String ? $util.base64.encode(m.newPhoto, 0, m.newPhoto.length) : o.bytes === Array ? Array.prototype.slice.call(m.newPhoto) : m.newPhoto; + if (o.oneofs) + d._newPhoto = "newPhoto"; } if (m.newPhotoId != null && m.hasOwnProperty("newPhotoId")) { d.newPhotoId = m.newPhotoId; + if (o.oneofs) + d._newPhotoId = "newPhotoId"; } return d; }; @@ -63778,12 +74504,44 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - PinInChat.prototype.type = 0; + PinInChat.prototype.type = null; PinInChat.prototype.key = null; - PinInChat.prototype.senderTimestampMs = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - PinInChat.prototype.serverTimestampMs = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + PinInChat.prototype.senderTimestampMs = null; + PinInChat.prototype.serverTimestampMs = null; PinInChat.prototype.messageAddOnContextInfo = null; + let $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) + }); + PinInChat.create = function create(properties) { return new PinInChat(properties); }; @@ -63902,41 +74660,36 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.type = o.enums === String ? "UNKNOWN_TYPE" : 0; - d.key = null; - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.senderTimestampMs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.senderTimestampMs = o.longs === String ? "0" : 0; - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.serverTimestampMs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.serverTimestampMs = o.longs === String ? "0" : 0; - d.messageAddOnContextInfo = null; - } if (m.type != null && m.hasOwnProperty("type")) { d.type = o.enums === String ? $root.proto.PinInChat.Type[m.type] === undefined ? m.type : $root.proto.PinInChat.Type[m.type] : m.type; + if (o.oneofs) + d._type = "type"; } if (m.key != null && m.hasOwnProperty("key")) { d.key = $root.proto.MessageKey.toObject(m.key, o); + if (o.oneofs) + d._key = "key"; } if (m.senderTimestampMs != null && m.hasOwnProperty("senderTimestampMs")) { if (typeof m.senderTimestampMs === "number") d.senderTimestampMs = o.longs === String ? String(m.senderTimestampMs) : m.senderTimestampMs; else d.senderTimestampMs = o.longs === String ? longToString(m.senderTimestampMs) : o.longs === Number ? longToNumber(m.senderTimestampMs) : m.senderTimestampMs; + if (o.oneofs) + d._senderTimestampMs = "senderTimestampMs"; } if (m.serverTimestampMs != null && m.hasOwnProperty("serverTimestampMs")) { if (typeof m.serverTimestampMs === "number") d.serverTimestampMs = o.longs === String ? String(m.serverTimestampMs) : m.serverTimestampMs; else d.serverTimestampMs = o.longs === String ? longToString(m.serverTimestampMs) : o.longs === Number ? longToNumber(m.serverTimestampMs) : m.serverTimestampMs; + if (o.oneofs) + d._serverTimestampMs = "serverTimestampMs"; } if (m.messageAddOnContextInfo != null && m.hasOwnProperty("messageAddOnContextInfo")) { d.messageAddOnContextInfo = $root.proto.MessageAddOnContextInfo.toObject(m.messageAddOnContextInfo, o); + if (o.oneofs) + d._messageAddOnContextInfo = "messageAddOnContextInfo"; } return d; }; @@ -63972,10 +74725,36 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - Point.prototype.xDeprecated = 0; - Point.prototype.yDeprecated = 0; - Point.prototype.x = 0; - Point.prototype.y = 0; + Point.prototype.xDeprecated = null; + Point.prototype.yDeprecated = null; + Point.prototype.x = null; + Point.prototype.y = null; + + let $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) + }); Point.create = function create(properties) { return new Point(properties); @@ -64051,23 +74830,25 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.xDeprecated = 0; - d.yDeprecated = 0; - d.x = 0; - d.y = 0; - } if (m.xDeprecated != null && m.hasOwnProperty("xDeprecated")) { d.xDeprecated = m.xDeprecated; + if (o.oneofs) + d._xDeprecated = "xDeprecated"; } if (m.yDeprecated != null && m.hasOwnProperty("yDeprecated")) { d.yDeprecated = m.yDeprecated; + if (o.oneofs) + d._yDeprecated = "yDeprecated"; } if (m.x != null && m.hasOwnProperty("x")) { d.x = o.json && !isFinite(m.x) ? String(m.x) : m.x; + if (o.oneofs) + d._x = "x"; } if (m.y != null && m.hasOwnProperty("y")) { d.y = o.json && !isFinite(m.y) ? String(m.y) : m.y; + if (o.oneofs) + d._y = "y"; } return d; }; @@ -64095,7 +74876,15 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - PollAdditionalMetadata.prototype.pollInvalidated = false; + PollAdditionalMetadata.prototype.pollInvalidated = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PollAdditionalMetadata.prototype, "_pollInvalidated", { + get: $util.oneOfGetter($oneOfFields = ["pollInvalidated"]), + set: $util.oneOfSetter($oneOfFields) + }); PollAdditionalMetadata.create = function create(properties) { return new PollAdditionalMetadata(properties); @@ -64144,11 +74933,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.pollInvalidated = false; - } if (m.pollInvalidated != null && m.hasOwnProperty("pollInvalidated")) { d.pollInvalidated = m.pollInvalidated; + if (o.oneofs) + d._pollInvalidated = "pollInvalidated"; } return d; }; @@ -64176,8 +74964,22 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - PollEncValue.prototype.encPayload = $util.newBuffer([]); - PollEncValue.prototype.encIv = $util.newBuffer([]); + PollEncValue.prototype.encPayload = null; + PollEncValue.prototype.encIv = null; + + let $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) + }); PollEncValue.create = function create(properties) { return new PollEncValue(properties); @@ -64241,27 +75043,15 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - if (o.bytes === String) - d.encPayload = ""; - else { - d.encPayload = []; - if (o.bytes !== Array) - d.encPayload = $util.newBuffer(d.encPayload); - } - if (o.bytes === String) - d.encIv = ""; - else { - d.encIv = []; - if (o.bytes !== Array) - d.encIv = $util.newBuffer(d.encIv); - } - } if (m.encPayload != null && m.hasOwnProperty("encPayload")) { d.encPayload = o.bytes === String ? $util.base64.encode(m.encPayload, 0, m.encPayload.length) : o.bytes === Array ? Array.prototype.slice.call(m.encPayload) : m.encPayload; + if (o.oneofs) + d._encPayload = "encPayload"; } if (m.encIv != null && m.hasOwnProperty("encIv")) { d.encIv = o.bytes === String ? $util.base64.encode(m.encIv, 0, m.encIv.length) : o.bytes === Array ? Array.prototype.slice.call(m.encIv) : m.encIv; + if (o.oneofs) + d._encIv = "encIv"; } return d; }; @@ -64291,9 +75081,41 @@ export const proto = $root.proto = (() => { PollUpdate.prototype.pollUpdateMessageKey = null; PollUpdate.prototype.vote = null; - PollUpdate.prototype.senderTimestampMs = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - PollUpdate.prototype.serverTimestampMs = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - PollUpdate.prototype.unread = false; + PollUpdate.prototype.senderTimestampMs = null; + PollUpdate.prototype.serverTimestampMs = null; + PollUpdate.prototype.unread = null; + + let $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) + }); PollUpdate.create = function create(properties) { return new PollUpdate(properties); @@ -64396,41 +75218,36 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.pollUpdateMessageKey = null; - d.vote = null; - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.senderTimestampMs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.senderTimestampMs = o.longs === String ? "0" : 0; - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.serverTimestampMs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.serverTimestampMs = o.longs === String ? "0" : 0; - d.unread = false; - } if (m.pollUpdateMessageKey != null && m.hasOwnProperty("pollUpdateMessageKey")) { d.pollUpdateMessageKey = $root.proto.MessageKey.toObject(m.pollUpdateMessageKey, o); + if (o.oneofs) + d._pollUpdateMessageKey = "pollUpdateMessageKey"; } if (m.vote != null && m.hasOwnProperty("vote")) { d.vote = $root.proto.Message.PollVoteMessage.toObject(m.vote, o); + if (o.oneofs) + d._vote = "vote"; } if (m.senderTimestampMs != null && m.hasOwnProperty("senderTimestampMs")) { if (typeof m.senderTimestampMs === "number") d.senderTimestampMs = o.longs === String ? String(m.senderTimestampMs) : m.senderTimestampMs; else d.senderTimestampMs = o.longs === String ? longToString(m.senderTimestampMs) : o.longs === Number ? longToNumber(m.senderTimestampMs) : m.senderTimestampMs; + if (o.oneofs) + d._senderTimestampMs = "senderTimestampMs"; } if (m.serverTimestampMs != null && m.hasOwnProperty("serverTimestampMs")) { if (typeof m.serverTimestampMs === "number") d.serverTimestampMs = o.longs === String ? String(m.serverTimestampMs) : m.serverTimestampMs; else d.serverTimestampMs = o.longs === String ? longToString(m.serverTimestampMs) : o.longs === Number ? longToNumber(m.serverTimestampMs) : m.serverTimestampMs; + if (o.oneofs) + d._serverTimestampMs = "serverTimestampMs"; } if (m.unread != null && m.hasOwnProperty("unread")) { d.unread = m.unread; + if (o.oneofs) + d._unread = "unread"; } return d; }; @@ -64458,9 +75275,29 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - PreKeyRecordStructure.prototype.id = 0; - PreKeyRecordStructure.prototype.publicKey = $util.newBuffer([]); - PreKeyRecordStructure.prototype.privateKey = $util.newBuffer([]); + PreKeyRecordStructure.prototype.id = null; + PreKeyRecordStructure.prototype.publicKey = null; + PreKeyRecordStructure.prototype.privateKey = null; + + let $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) + }); PreKeyRecordStructure.create = function create(properties) { return new PreKeyRecordStructure(properties); @@ -64533,31 +75370,20 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.id = 0; - if (o.bytes === String) - d.publicKey = ""; - else { - d.publicKey = []; - if (o.bytes !== Array) - d.publicKey = $util.newBuffer(d.publicKey); - } - if (o.bytes === String) - d.privateKey = ""; - else { - d.privateKey = []; - if (o.bytes !== Array) - d.privateKey = $util.newBuffer(d.privateKey); - } - } if (m.id != null && m.hasOwnProperty("id")) { d.id = m.id; + if (o.oneofs) + d._id = "id"; } if (m.publicKey != null && m.hasOwnProperty("publicKey")) { d.publicKey = o.bytes === String ? $util.base64.encode(m.publicKey, 0, m.publicKey.length) : o.bytes === Array ? Array.prototype.slice.call(m.publicKey) : m.publicKey; + if (o.oneofs) + d._publicKey = "publicKey"; } if (m.privateKey != null && m.hasOwnProperty("privateKey")) { d.privateKey = o.bytes === String ? $util.base64.encode(m.privateKey, 0, m.privateKey.length) : o.bytes === Array ? Array.prototype.slice.call(m.privateKey) : m.privateKey; + if (o.oneofs) + d._privateKey = "privateKey"; } return d; }; @@ -64585,12 +75411,50 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - PreKeySignalMessage.prototype.registrationId = 0; - PreKeySignalMessage.prototype.preKeyId = 0; - PreKeySignalMessage.prototype.signedPreKeyId = 0; - PreKeySignalMessage.prototype.baseKey = $util.newBuffer([]); - PreKeySignalMessage.prototype.identityKey = $util.newBuffer([]); - PreKeySignalMessage.prototype.message = $util.newBuffer([]); + PreKeySignalMessage.prototype.registrationId = null; + PreKeySignalMessage.prototype.preKeyId = null; + PreKeySignalMessage.prototype.signedPreKeyId = null; + PreKeySignalMessage.prototype.baseKey = null; + PreKeySignalMessage.prototype.identityKey = null; + PreKeySignalMessage.prototype.message = null; + + let $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) + }); PreKeySignalMessage.create = function create(properties) { return new PreKeySignalMessage(properties); @@ -64693,49 +75557,35 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.preKeyId = 0; - if (o.bytes === String) - d.baseKey = ""; - else { - d.baseKey = []; - if (o.bytes !== Array) - d.baseKey = $util.newBuffer(d.baseKey); - } - if (o.bytes === String) - d.identityKey = ""; - else { - d.identityKey = []; - if (o.bytes !== Array) - d.identityKey = $util.newBuffer(d.identityKey); - } - if (o.bytes === String) - d.message = ""; - else { - d.message = []; - if (o.bytes !== Array) - d.message = $util.newBuffer(d.message); - } - d.registrationId = 0; - d.signedPreKeyId = 0; - } if (m.preKeyId != null && m.hasOwnProperty("preKeyId")) { d.preKeyId = m.preKeyId; + if (o.oneofs) + d._preKeyId = "preKeyId"; } if (m.baseKey != null && m.hasOwnProperty("baseKey")) { d.baseKey = o.bytes === String ? $util.base64.encode(m.baseKey, 0, m.baseKey.length) : o.bytes === Array ? Array.prototype.slice.call(m.baseKey) : m.baseKey; + if (o.oneofs) + d._baseKey = "baseKey"; } if (m.identityKey != null && m.hasOwnProperty("identityKey")) { d.identityKey = o.bytes === String ? $util.base64.encode(m.identityKey, 0, m.identityKey.length) : o.bytes === Array ? Array.prototype.slice.call(m.identityKey) : m.identityKey; + if (o.oneofs) + d._identityKey = "identityKey"; } if (m.message != null && m.hasOwnProperty("message")) { d.message = o.bytes === String ? $util.base64.encode(m.message, 0, m.message.length) : o.bytes === Array ? Array.prototype.slice.call(m.message) : m.message; + if (o.oneofs) + d._message = "message"; } if (m.registrationId != null && m.hasOwnProperty("registrationId")) { d.registrationId = m.registrationId; + if (o.oneofs) + d._registrationId = "registrationId"; } if (m.signedPreKeyId != null && m.hasOwnProperty("signedPreKeyId")) { d.signedPreKeyId = m.signedPreKeyId; + if (o.oneofs) + d._signedPreKeyId = "signedPreKeyId"; } return d; }; @@ -64763,7 +75613,15 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - PremiumMessageInfo.prototype.serverCampaignId = ""; + PremiumMessageInfo.prototype.serverCampaignId = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PremiumMessageInfo.prototype, "_serverCampaignId", { + get: $util.oneOfGetter($oneOfFields = ["serverCampaignId"]), + set: $util.oneOfSetter($oneOfFields) + }); PremiumMessageInfo.create = function create(properties) { return new PremiumMessageInfo(properties); @@ -64812,11 +75670,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.serverCampaignId = ""; - } if (m.serverCampaignId != null && m.hasOwnProperty("serverCampaignId")) { d.serverCampaignId = m.serverCampaignId; + if (o.oneofs) + d._serverCampaignId = "serverCampaignId"; } return d; }; @@ -64844,8 +75701,22 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - PrimaryEphemeralIdentity.prototype.publicKey = $util.newBuffer([]); - PrimaryEphemeralIdentity.prototype.nonce = $util.newBuffer([]); + PrimaryEphemeralIdentity.prototype.publicKey = null; + PrimaryEphemeralIdentity.prototype.nonce = null; + + let $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) + }); PrimaryEphemeralIdentity.create = function create(properties) { return new PrimaryEphemeralIdentity(properties); @@ -64909,27 +75780,15 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - if (o.bytes === String) - d.publicKey = ""; - else { - d.publicKey = []; - if (o.bytes !== Array) - d.publicKey = $util.newBuffer(d.publicKey); - } - if (o.bytes === String) - d.nonce = ""; - else { - d.nonce = []; - if (o.bytes !== Array) - d.nonce = $util.newBuffer(d.nonce); - } - } if (m.publicKey != null && m.hasOwnProperty("publicKey")) { d.publicKey = o.bytes === String ? $util.base64.encode(m.publicKey, 0, m.publicKey.length) : o.bytes === Array ? Array.prototype.slice.call(m.publicKey) : m.publicKey; + if (o.oneofs) + d._publicKey = "publicKey"; } if (m.nonce != null && m.hasOwnProperty("nonce")) { d.nonce = o.bytes === String ? $util.base64.encode(m.nonce, 0, m.nonce.length) : o.bytes === Array ? Array.prototype.slice.call(m.nonce) : m.nonce; + if (o.oneofs) + d._nonce = "nonce"; } return d; }; @@ -64966,15 +75825,59 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - ProcessedVideo.prototype.directPath = ""; - ProcessedVideo.prototype.fileSha256 = $util.newBuffer([]); - ProcessedVideo.prototype.height = 0; - ProcessedVideo.prototype.width = 0; - ProcessedVideo.prototype.fileLength = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - ProcessedVideo.prototype.bitrate = 0; - ProcessedVideo.prototype.quality = 0; + ProcessedVideo.prototype.directPath = null; + ProcessedVideo.prototype.fileSha256 = null; + ProcessedVideo.prototype.height = null; + ProcessedVideo.prototype.width = null; + ProcessedVideo.prototype.fileLength = null; + ProcessedVideo.prototype.bitrate = null; + ProcessedVideo.prototype.quality = null; ProcessedVideo.prototype.capabilities = $util.emptyArray; + let $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) + }); + ProcessedVideo.create = function create(properties) { return new ProcessedVideo(properties); }; @@ -65128,48 +76031,43 @@ export const proto = $root.proto = (() => { if (o.arrays || o.defaults) { d.capabilities = []; } - if (o.defaults) { - d.directPath = ""; - if (o.bytes === String) - d.fileSha256 = ""; - else { - d.fileSha256 = []; - if (o.bytes !== Array) - d.fileSha256 = $util.newBuffer(d.fileSha256); - } - d.height = 0; - d.width = 0; - if ($util.Long) { - var n = new $util.Long(0, 0, true); - d.fileLength = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.fileLength = o.longs === String ? "0" : 0; - d.bitrate = 0; - d.quality = o.enums === String ? "UNDEFINED" : 0; - } if (m.directPath != null && m.hasOwnProperty("directPath")) { d.directPath = m.directPath; + if (o.oneofs) + d._directPath = "directPath"; } if (m.fileSha256 != null && m.hasOwnProperty("fileSha256")) { d.fileSha256 = o.bytes === String ? $util.base64.encode(m.fileSha256, 0, m.fileSha256.length) : o.bytes === Array ? Array.prototype.slice.call(m.fileSha256) : m.fileSha256; + if (o.oneofs) + d._fileSha256 = "fileSha256"; } if (m.height != null && m.hasOwnProperty("height")) { d.height = m.height; + if (o.oneofs) + d._height = "height"; } if (m.width != null && m.hasOwnProperty("width")) { d.width = m.width; + if (o.oneofs) + d._width = "width"; } if (m.fileLength != null && m.hasOwnProperty("fileLength")) { if (typeof m.fileLength === "number") d.fileLength = o.longs === String ? String(m.fileLength) : m.fileLength; else d.fileLength = o.longs === String ? longToString(m.fileLength, true) : o.longs === Number ? longToNumber(m.fileLength, true) : m.fileLength; + if (o.oneofs) + d._fileLength = "fileLength"; } if (m.bitrate != null && m.hasOwnProperty("bitrate")) { d.bitrate = m.bitrate; + if (o.oneofs) + d._bitrate = "bitrate"; } if (m.quality != null && m.hasOwnProperty("quality")) { d.quality = o.enums === String ? $root.proto.ProcessedVideo.VideoQuality[m.quality] === undefined ? m.quality : $root.proto.ProcessedVideo.VideoQuality[m.quality] : m.quality; + if (o.oneofs) + d._quality = "quality"; } if (m.capabilities && m.capabilities.length) { d.capabilities = []; @@ -65212,9 +76110,23 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - ProloguePayload.prototype.companionEphemeralIdentity = $util.newBuffer([]); + ProloguePayload.prototype.companionEphemeralIdentity = null; ProloguePayload.prototype.commitment = null; + let $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) + }); + ProloguePayload.create = function create(properties) { return new ProloguePayload(properties); }; @@ -65276,21 +76188,15 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - if (o.bytes === String) - d.companionEphemeralIdentity = ""; - else { - d.companionEphemeralIdentity = []; - if (o.bytes !== Array) - d.companionEphemeralIdentity = $util.newBuffer(d.companionEphemeralIdentity); - } - d.commitment = null; - } if (m.companionEphemeralIdentity != null && m.hasOwnProperty("companionEphemeralIdentity")) { d.companionEphemeralIdentity = o.bytes === String ? $util.base64.encode(m.companionEphemeralIdentity, 0, m.companionEphemeralIdentity.length) : o.bytes === Array ? Array.prototype.slice.call(m.companionEphemeralIdentity) : m.companionEphemeralIdentity; + if (o.oneofs) + d._companionEphemeralIdentity = "companionEphemeralIdentity"; } if (m.commitment != null && m.hasOwnProperty("commitment")) { d.commitment = $root.proto.CompanionCommitment.toObject(m.commitment, o); + if (o.oneofs) + d._commitment = "commitment"; } return d; }; @@ -65318,8 +76224,22 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - Pushname.prototype.id = ""; - Pushname.prototype.pushname = ""; + Pushname.prototype.id = null; + Pushname.prototype.pushname = null; + + let $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) + }); Pushname.create = function create(properties) { return new Pushname(properties); @@ -65377,15 +76297,15 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.id = ""; - d.pushname = ""; - } if (m.id != null && m.hasOwnProperty("id")) { d.id = m.id; + if (o.oneofs) + d._id = "id"; } if (m.pushname != null && m.hasOwnProperty("pushname")) { d.pushname = m.pushname; + if (o.oneofs) + d._pushname = "pushname"; } return d; }; @@ -65413,8 +76333,22 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - QuarantinedMessage.prototype.originalData = $util.newBuffer([]); - QuarantinedMessage.prototype.extractedText = ""; + QuarantinedMessage.prototype.originalData = null; + QuarantinedMessage.prototype.extractedText = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(QuarantinedMessage.prototype, "_originalData", { + get: $util.oneOfGetter($oneOfFields = ["originalData"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(QuarantinedMessage.prototype, "_extractedText", { + get: $util.oneOfGetter($oneOfFields = ["extractedText"]), + set: $util.oneOfSetter($oneOfFields) + }); QuarantinedMessage.create = function create(properties) { return new QuarantinedMessage(properties); @@ -65475,21 +76409,15 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - if (o.bytes === String) - d.originalData = ""; - else { - d.originalData = []; - if (o.bytes !== Array) - d.originalData = $util.newBuffer(d.originalData); - } - d.extractedText = ""; - } if (m.originalData != null && m.hasOwnProperty("originalData")) { d.originalData = o.bytes === String ? $util.base64.encode(m.originalData, 0, m.originalData.length) : o.bytes === Array ? Array.prototype.slice.call(m.originalData) : m.originalData; + if (o.oneofs) + d._originalData = "originalData"; } if (m.extractedText != null && m.hasOwnProperty("extractedText")) { d.extractedText = m.extractedText; + if (o.oneofs) + d._extractedText = "extractedText"; } return d; }; @@ -65518,10 +76446,42 @@ export const proto = $root.proto = (() => { } Reaction.prototype.key = null; - Reaction.prototype.text = ""; - Reaction.prototype.groupingKey = ""; - Reaction.prototype.senderTimestampMs = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - Reaction.prototype.unread = false; + Reaction.prototype.text = null; + Reaction.prototype.groupingKey = null; + Reaction.prototype.senderTimestampMs = null; + Reaction.prototype.unread = null; + + let $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) + }); Reaction.create = function create(properties) { return new Reaction(properties); @@ -65615,34 +76575,33 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.key = null; - d.text = ""; - d.groupingKey = ""; - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.senderTimestampMs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.senderTimestampMs = o.longs === String ? "0" : 0; - d.unread = false; - } if (m.key != null && m.hasOwnProperty("key")) { d.key = $root.proto.MessageKey.toObject(m.key, o); + if (o.oneofs) + d._key = "key"; } if (m.text != null && m.hasOwnProperty("text")) { d.text = m.text; + if (o.oneofs) + d._text = "text"; } if (m.groupingKey != null && m.hasOwnProperty("groupingKey")) { d.groupingKey = m.groupingKey; + if (o.oneofs) + d._groupingKey = "groupingKey"; } if (m.senderTimestampMs != null && m.hasOwnProperty("senderTimestampMs")) { if (typeof m.senderTimestampMs === "number") d.senderTimestampMs = o.longs === String ? String(m.senderTimestampMs) : m.senderTimestampMs; else d.senderTimestampMs = o.longs === String ? longToString(m.senderTimestampMs) : o.longs === Number ? longToNumber(m.senderTimestampMs) : m.senderTimestampMs; + if (o.oneofs) + d._senderTimestampMs = "senderTimestampMs"; } if (m.unread != null && m.hasOwnProperty("unread")) { d.unread = m.unread; + if (o.oneofs) + d._unread = "unread"; } return d; }; @@ -65670,8 +76629,22 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - RecentEmojiWeight.prototype.emoji = ""; - RecentEmojiWeight.prototype.weight = 0; + RecentEmojiWeight.prototype.emoji = null; + RecentEmojiWeight.prototype.weight = null; + + let $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) + }); RecentEmojiWeight.create = function create(properties) { return new RecentEmojiWeight(properties); @@ -65729,15 +76702,15 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.emoji = ""; - d.weight = 0; - } if (m.emoji != null && m.hasOwnProperty("emoji")) { d.emoji = m.emoji; + if (o.oneofs) + d._emoji = "emoji"; } if (m.weight != null && m.hasOwnProperty("weight")) { d.weight = o.json && !isFinite(m.weight) ? String(m.weight) : m.weight; + if (o.oneofs) + d._weight = "weight"; } return d; }; @@ -65769,6 +76742,14 @@ export const proto = $root.proto = (() => { RecordStructure.prototype.currentSession = null; RecordStructure.prototype.previousSessions = $util.emptyArray; + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(RecordStructure.prototype, "_currentSession", { + get: $util.oneOfGetter($oneOfFields = ["currentSession"]), + set: $util.oneOfSetter($oneOfFields) + }); + RecordStructure.create = function create(properties) { return new RecordStructure(properties); }; @@ -65841,11 +76822,10 @@ export const proto = $root.proto = (() => { if (o.arrays || o.defaults) { d.previousSessions = []; } - if (o.defaults) { - d.currentSession = null; - } if (m.currentSession != null && m.hasOwnProperty("currentSession")) { d.currentSession = $root.proto.SessionStructure.toObject(m.currentSession, o); + if (o.oneofs) + d._currentSession = "currentSession"; } if (m.previousSessions && m.previousSessions.length) { d.previousSessions = []; @@ -65879,10 +76859,36 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - Reportable.prototype.minVersion = 0; - Reportable.prototype.maxVersion = 0; - Reportable.prototype.notReportableMinVersion = 0; - Reportable.prototype.never = false; + Reportable.prototype.minVersion = null; + Reportable.prototype.maxVersion = null; + Reportable.prototype.notReportableMinVersion = null; + Reportable.prototype.never = null; + + let $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) + }); Reportable.create = function create(properties) { return new Reportable(properties); @@ -65958,23 +76964,25 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.minVersion = 0; - d.maxVersion = 0; - d.notReportableMinVersion = 0; - d.never = false; - } if (m.minVersion != null && m.hasOwnProperty("minVersion")) { d.minVersion = m.minVersion; + if (o.oneofs) + d._minVersion = "minVersion"; } if (m.maxVersion != null && m.hasOwnProperty("maxVersion")) { d.maxVersion = m.maxVersion; + if (o.oneofs) + d._maxVersion = "maxVersion"; } if (m.notReportableMinVersion != null && m.hasOwnProperty("notReportableMinVersion")) { d.notReportableMinVersion = m.notReportableMinVersion; + if (o.oneofs) + d._notReportableMinVersion = "notReportableMinVersion"; } if (m.never != null && m.hasOwnProperty("never")) { d.never = m.never; + if (o.oneofs) + d._never = "never"; } return d; }; @@ -66002,7 +77010,15 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - ReportingTokenInfo.prototype.reportingTag = $util.newBuffer([]); + ReportingTokenInfo.prototype.reportingTag = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ReportingTokenInfo.prototype, "_reportingTag", { + get: $util.oneOfGetter($oneOfFields = ["reportingTag"]), + set: $util.oneOfSetter($oneOfFields) + }); ReportingTokenInfo.create = function create(properties) { return new ReportingTokenInfo(properties); @@ -66054,17 +77070,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - if (o.bytes === String) - d.reportingTag = ""; - else { - d.reportingTag = []; - if (o.bytes !== Array) - d.reportingTag = $util.newBuffer(d.reportingTag); - } - } if (m.reportingTag != null && m.hasOwnProperty("reportingTag")) { d.reportingTag = o.bytes === String ? $util.base64.encode(m.reportingTag, 0, m.reportingTag.length) : o.bytes === Array ? Array.prototype.slice.call(m.reportingTag) : m.reportingTag; + if (o.oneofs) + d._reportingTag = "reportingTag"; } return d; }; @@ -66092,10 +77101,36 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - SenderKeyDistributionMessage.prototype.id = 0; - SenderKeyDistributionMessage.prototype.iteration = 0; - SenderKeyDistributionMessage.prototype.chainKey = $util.newBuffer([]); - SenderKeyDistributionMessage.prototype.signingKey = $util.newBuffer([]); + SenderKeyDistributionMessage.prototype.id = null; + SenderKeyDistributionMessage.prototype.iteration = null; + SenderKeyDistributionMessage.prototype.chainKey = null; + SenderKeyDistributionMessage.prototype.signingKey = null; + + let $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) + }); SenderKeyDistributionMessage.create = function create(properties) { return new SenderKeyDistributionMessage(properties); @@ -66177,35 +77212,25 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.id = 0; - d.iteration = 0; - if (o.bytes === String) - d.chainKey = ""; - else { - d.chainKey = []; - if (o.bytes !== Array) - d.chainKey = $util.newBuffer(d.chainKey); - } - if (o.bytes === String) - d.signingKey = ""; - else { - d.signingKey = []; - if (o.bytes !== Array) - d.signingKey = $util.newBuffer(d.signingKey); - } - } if (m.id != null && m.hasOwnProperty("id")) { d.id = m.id; + if (o.oneofs) + d._id = "id"; } if (m.iteration != null && m.hasOwnProperty("iteration")) { d.iteration = m.iteration; + if (o.oneofs) + d._iteration = "iteration"; } if (m.chainKey != null && m.hasOwnProperty("chainKey")) { d.chainKey = o.bytes === String ? $util.base64.encode(m.chainKey, 0, m.chainKey.length) : o.bytes === Array ? Array.prototype.slice.call(m.chainKey) : m.chainKey; + if (o.oneofs) + d._chainKey = "chainKey"; } if (m.signingKey != null && m.hasOwnProperty("signingKey")) { d.signingKey = o.bytes === String ? $util.base64.encode(m.signingKey, 0, m.signingKey.length) : o.bytes === Array ? Array.prototype.slice.call(m.signingKey) : m.signingKey; + if (o.oneofs) + d._signingKey = "signingKey"; } return d; }; @@ -66233,9 +77258,29 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - SenderKeyMessage.prototype.id = 0; - SenderKeyMessage.prototype.iteration = 0; - SenderKeyMessage.prototype.ciphertext = $util.newBuffer([]); + SenderKeyMessage.prototype.id = null; + SenderKeyMessage.prototype.iteration = null; + SenderKeyMessage.prototype.ciphertext = null; + + let $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) + }); SenderKeyMessage.create = function create(properties) { return new SenderKeyMessage(properties); @@ -66305,25 +77350,20 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.id = 0; - d.iteration = 0; - if (o.bytes === String) - d.ciphertext = ""; - else { - d.ciphertext = []; - if (o.bytes !== Array) - d.ciphertext = $util.newBuffer(d.ciphertext); - } - } if (m.id != null && m.hasOwnProperty("id")) { d.id = m.id; + if (o.oneofs) + d._id = "id"; } if (m.iteration != null && m.hasOwnProperty("iteration")) { d.iteration = m.iteration; + if (o.oneofs) + d._iteration = "iteration"; } if (m.ciphertext != null && m.hasOwnProperty("ciphertext")) { d.ciphertext = o.bytes === String ? $util.base64.encode(m.ciphertext, 0, m.ciphertext.length) : o.bytes === Array ? Array.prototype.slice.call(m.ciphertext) : m.ciphertext; + if (o.oneofs) + d._ciphertext = "ciphertext"; } return d; }; @@ -66448,11 +77488,31 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - SenderKeyStateStructure.prototype.senderKeyId = 0; + SenderKeyStateStructure.prototype.senderKeyId = null; SenderKeyStateStructure.prototype.senderChainKey = null; SenderKeyStateStructure.prototype.senderSigningKey = null; SenderKeyStateStructure.prototype.senderMessageKeys = $util.emptyArray; + let $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) + }); + SenderKeyStateStructure.create = function create(properties) { return new SenderKeyStateStructure(properties); }; @@ -66545,19 +77605,20 @@ export const proto = $root.proto = (() => { if (o.arrays || o.defaults) { d.senderMessageKeys = []; } - if (o.defaults) { - d.senderKeyId = 0; - d.senderChainKey = null; - d.senderSigningKey = null; - } if (m.senderKeyId != null && m.hasOwnProperty("senderKeyId")) { d.senderKeyId = m.senderKeyId; + if (o.oneofs) + d._senderKeyId = "senderKeyId"; } if (m.senderChainKey != null && m.hasOwnProperty("senderChainKey")) { d.senderChainKey = $root.proto.SenderKeyStateStructure.SenderChainKey.toObject(m.senderChainKey, o); + if (o.oneofs) + d._senderChainKey = "senderChainKey"; } if (m.senderSigningKey != null && m.hasOwnProperty("senderSigningKey")) { d.senderSigningKey = $root.proto.SenderKeyStateStructure.SenderSigningKey.toObject(m.senderSigningKey, o); + if (o.oneofs) + d._senderSigningKey = "senderSigningKey"; } if (m.senderMessageKeys && m.senderMessageKeys.length) { d.senderMessageKeys = []; @@ -66588,8 +77649,22 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - SenderChainKey.prototype.iteration = 0; - SenderChainKey.prototype.seed = $util.newBuffer([]); + SenderChainKey.prototype.iteration = null; + SenderChainKey.prototype.seed = null; + + let $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) + }); SenderChainKey.create = function create(properties) { return new SenderChainKey(properties); @@ -66650,21 +77725,15 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.iteration = 0; - if (o.bytes === String) - d.seed = ""; - else { - d.seed = []; - if (o.bytes !== Array) - d.seed = $util.newBuffer(d.seed); - } - } if (m.iteration != null && m.hasOwnProperty("iteration")) { d.iteration = m.iteration; + if (o.oneofs) + d._iteration = "iteration"; } if (m.seed != null && m.hasOwnProperty("seed")) { d.seed = o.bytes === String ? $util.base64.encode(m.seed, 0, m.seed.length) : o.bytes === Array ? Array.prototype.slice.call(m.seed) : m.seed; + if (o.oneofs) + d._seed = "seed"; } return d; }; @@ -66692,8 +77761,22 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - SenderMessageKey.prototype.iteration = 0; - SenderMessageKey.prototype.seed = $util.newBuffer([]); + SenderMessageKey.prototype.iteration = null; + SenderMessageKey.prototype.seed = null; + + let $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) + }); SenderMessageKey.create = function create(properties) { return new SenderMessageKey(properties); @@ -66754,21 +77837,15 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.iteration = 0; - if (o.bytes === String) - d.seed = ""; - else { - d.seed = []; - if (o.bytes !== Array) - d.seed = $util.newBuffer(d.seed); - } - } if (m.iteration != null && m.hasOwnProperty("iteration")) { d.iteration = m.iteration; + if (o.oneofs) + d._iteration = "iteration"; } if (m.seed != null && m.hasOwnProperty("seed")) { d.seed = o.bytes === String ? $util.base64.encode(m.seed, 0, m.seed.length) : o.bytes === Array ? Array.prototype.slice.call(m.seed) : m.seed; + if (o.oneofs) + d._seed = "seed"; } return d; }; @@ -66796,8 +77873,22 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - SenderSigningKey.prototype["public"] = $util.newBuffer([]); - SenderSigningKey.prototype["private"] = $util.newBuffer([]); + SenderSigningKey.prototype["public"] = null; + SenderSigningKey.prototype["private"] = null; + + let $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) + }); SenderSigningKey.create = function create(properties) { return new SenderSigningKey(properties); @@ -66861,27 +77952,15 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - if (o.bytes === String) - d["public"] = ""; - else { - d["public"] = []; - if (o.bytes !== Array) - d["public"] = $util.newBuffer(d["public"]); - } - if (o.bytes === String) - d["private"] = ""; - else { - d["private"] = []; - if (o.bytes !== Array) - d["private"] = $util.newBuffer(d["private"]); - } - } if (m["public"] != null && m.hasOwnProperty("public")) { d["public"] = o.bytes === String ? $util.base64.encode(m["public"], 0, m["public"].length) : o.bytes === Array ? Array.prototype.slice.call(m["public"]) : m["public"]; + if (o.oneofs) + d._public = "public"; } if (m["private"] != null && m.hasOwnProperty("private")) { d["private"] = o.bytes === String ? $util.base64.encode(m["private"], 0, m["private"].length) : o.bytes === Array ? Array.prototype.slice.call(m["private"]) : m["private"]; + if (o.oneofs) + d._private = "private"; } return d; }; @@ -66912,7 +77991,15 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - ServerErrorReceipt.prototype.stanzaId = ""; + ServerErrorReceipt.prototype.stanzaId = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ServerErrorReceipt.prototype, "_stanzaId", { + get: $util.oneOfGetter($oneOfFields = ["stanzaId"]), + set: $util.oneOfSetter($oneOfFields) + }); ServerErrorReceipt.create = function create(properties) { return new ServerErrorReceipt(properties); @@ -66961,11 +78048,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.stanzaId = ""; - } if (m.stanzaId != null && m.hasOwnProperty("stanzaId")) { d.stanzaId = m.stanzaId; + if (o.oneofs) + d._stanzaId = "stanzaId"; } return d; }; @@ -66994,19 +78080,93 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - SessionStructure.prototype.sessionVersion = 0; - SessionStructure.prototype.localIdentityPublic = $util.newBuffer([]); - SessionStructure.prototype.remoteIdentityPublic = $util.newBuffer([]); - SessionStructure.prototype.rootKey = $util.newBuffer([]); - SessionStructure.prototype.previousCounter = 0; + SessionStructure.prototype.sessionVersion = null; + SessionStructure.prototype.localIdentityPublic = null; + SessionStructure.prototype.remoteIdentityPublic = null; + SessionStructure.prototype.rootKey = null; + SessionStructure.prototype.previousCounter = null; SessionStructure.prototype.senderChain = null; SessionStructure.prototype.receiverChains = $util.emptyArray; SessionStructure.prototype.pendingKeyExchange = null; SessionStructure.prototype.pendingPreKey = null; - SessionStructure.prototype.remoteRegistrationId = 0; - SessionStructure.prototype.localRegistrationId = 0; - SessionStructure.prototype.needsRefresh = false; - SessionStructure.prototype.aliceBaseKey = $util.newBuffer([]); + SessionStructure.prototype.remoteRegistrationId = null; + SessionStructure.prototype.localRegistrationId = null; + SessionStructure.prototype.needsRefresh = null; + SessionStructure.prototype.aliceBaseKey = null; + + let $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) + }); SessionStructure.create = function create(properties) { return new SessionStructure(properties); @@ -67195,61 +78355,35 @@ export const proto = $root.proto = (() => { if (o.arrays || o.defaults) { d.receiverChains = []; } - if (o.defaults) { - d.sessionVersion = 0; - if (o.bytes === String) - d.localIdentityPublic = ""; - else { - d.localIdentityPublic = []; - if (o.bytes !== Array) - d.localIdentityPublic = $util.newBuffer(d.localIdentityPublic); - } - if (o.bytes === String) - d.remoteIdentityPublic = ""; - else { - d.remoteIdentityPublic = []; - if (o.bytes !== Array) - d.remoteIdentityPublic = $util.newBuffer(d.remoteIdentityPublic); - } - if (o.bytes === String) - d.rootKey = ""; - else { - d.rootKey = []; - if (o.bytes !== Array) - d.rootKey = $util.newBuffer(d.rootKey); - } - d.previousCounter = 0; - d.senderChain = null; - d.pendingKeyExchange = null; - d.pendingPreKey = null; - d.remoteRegistrationId = 0; - d.localRegistrationId = 0; - d.needsRefresh = false; - if (o.bytes === String) - d.aliceBaseKey = ""; - else { - d.aliceBaseKey = []; - if (o.bytes !== Array) - d.aliceBaseKey = $util.newBuffer(d.aliceBaseKey); - } - } if (m.sessionVersion != null && m.hasOwnProperty("sessionVersion")) { d.sessionVersion = m.sessionVersion; + if (o.oneofs) + d._sessionVersion = "sessionVersion"; } if (m.localIdentityPublic != null && m.hasOwnProperty("localIdentityPublic")) { d.localIdentityPublic = o.bytes === String ? $util.base64.encode(m.localIdentityPublic, 0, m.localIdentityPublic.length) : o.bytes === Array ? Array.prototype.slice.call(m.localIdentityPublic) : m.localIdentityPublic; + if (o.oneofs) + d._localIdentityPublic = "localIdentityPublic"; } if (m.remoteIdentityPublic != null && m.hasOwnProperty("remoteIdentityPublic")) { d.remoteIdentityPublic = o.bytes === String ? $util.base64.encode(m.remoteIdentityPublic, 0, m.remoteIdentityPublic.length) : o.bytes === Array ? Array.prototype.slice.call(m.remoteIdentityPublic) : m.remoteIdentityPublic; + if (o.oneofs) + d._remoteIdentityPublic = "remoteIdentityPublic"; } if (m.rootKey != null && m.hasOwnProperty("rootKey")) { d.rootKey = o.bytes === String ? $util.base64.encode(m.rootKey, 0, m.rootKey.length) : o.bytes === Array ? Array.prototype.slice.call(m.rootKey) : m.rootKey; + if (o.oneofs) + d._rootKey = "rootKey"; } if (m.previousCounter != null && m.hasOwnProperty("previousCounter")) { d.previousCounter = m.previousCounter; + if (o.oneofs) + d._previousCounter = "previousCounter"; } if (m.senderChain != null && m.hasOwnProperty("senderChain")) { d.senderChain = $root.proto.SessionStructure.Chain.toObject(m.senderChain, o); + if (o.oneofs) + d._senderChain = "senderChain"; } if (m.receiverChains && m.receiverChains.length) { d.receiverChains = []; @@ -67259,21 +78393,33 @@ export const proto = $root.proto = (() => { } if (m.pendingKeyExchange != null && m.hasOwnProperty("pendingKeyExchange")) { d.pendingKeyExchange = $root.proto.SessionStructure.PendingKeyExchange.toObject(m.pendingKeyExchange, o); + if (o.oneofs) + d._pendingKeyExchange = "pendingKeyExchange"; } if (m.pendingPreKey != null && m.hasOwnProperty("pendingPreKey")) { d.pendingPreKey = $root.proto.SessionStructure.PendingPreKey.toObject(m.pendingPreKey, o); + if (o.oneofs) + d._pendingPreKey = "pendingPreKey"; } if (m.remoteRegistrationId != null && m.hasOwnProperty("remoteRegistrationId")) { d.remoteRegistrationId = m.remoteRegistrationId; + if (o.oneofs) + d._remoteRegistrationId = "remoteRegistrationId"; } if (m.localRegistrationId != null && m.hasOwnProperty("localRegistrationId")) { d.localRegistrationId = m.localRegistrationId; + if (o.oneofs) + d._localRegistrationId = "localRegistrationId"; } if (m.needsRefresh != null && m.hasOwnProperty("needsRefresh")) { d.needsRefresh = m.needsRefresh; + if (o.oneofs) + d._needsRefresh = "needsRefresh"; } if (m.aliceBaseKey != null && m.hasOwnProperty("aliceBaseKey")) { d.aliceBaseKey = o.bytes === String ? $util.base64.encode(m.aliceBaseKey, 0, m.aliceBaseKey.length) : o.bytes === Array ? Array.prototype.slice.call(m.aliceBaseKey) : m.aliceBaseKey; + if (o.oneofs) + d._aliceBaseKey = "aliceBaseKey"; } return d; }; @@ -67299,11 +78445,31 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - Chain.prototype.senderRatchetKey = $util.newBuffer([]); - Chain.prototype.senderRatchetKeyPrivate = $util.newBuffer([]); + Chain.prototype.senderRatchetKey = null; + Chain.prototype.senderRatchetKeyPrivate = null; Chain.prototype.chainKey = null; Chain.prototype.messageKeys = $util.emptyArray; + let $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) + }); + Chain.create = function create(properties) { return new Chain(properties); }; @@ -67400,31 +78566,20 @@ export const proto = $root.proto = (() => { if (o.arrays || o.defaults) { d.messageKeys = []; } - if (o.defaults) { - if (o.bytes === String) - d.senderRatchetKey = ""; - else { - d.senderRatchetKey = []; - if (o.bytes !== Array) - d.senderRatchetKey = $util.newBuffer(d.senderRatchetKey); - } - if (o.bytes === String) - d.senderRatchetKeyPrivate = ""; - else { - d.senderRatchetKeyPrivate = []; - if (o.bytes !== Array) - d.senderRatchetKeyPrivate = $util.newBuffer(d.senderRatchetKeyPrivate); - } - d.chainKey = null; - } if (m.senderRatchetKey != null && m.hasOwnProperty("senderRatchetKey")) { d.senderRatchetKey = o.bytes === String ? $util.base64.encode(m.senderRatchetKey, 0, m.senderRatchetKey.length) : o.bytes === Array ? Array.prototype.slice.call(m.senderRatchetKey) : m.senderRatchetKey; + if (o.oneofs) + d._senderRatchetKey = "senderRatchetKey"; } if (m.senderRatchetKeyPrivate != null && m.hasOwnProperty("senderRatchetKeyPrivate")) { d.senderRatchetKeyPrivate = o.bytes === String ? $util.base64.encode(m.senderRatchetKeyPrivate, 0, m.senderRatchetKeyPrivate.length) : o.bytes === Array ? Array.prototype.slice.call(m.senderRatchetKeyPrivate) : m.senderRatchetKeyPrivate; + if (o.oneofs) + d._senderRatchetKeyPrivate = "senderRatchetKeyPrivate"; } if (m.chainKey != null && m.hasOwnProperty("chainKey")) { d.chainKey = $root.proto.SessionStructure.Chain.ChainKey.toObject(m.chainKey, o); + if (o.oneofs) + d._chainKey = "chainKey"; } if (m.messageKeys && m.messageKeys.length) { d.messageKeys = []; @@ -67455,8 +78610,22 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - ChainKey.prototype.index = 0; - ChainKey.prototype.key = $util.newBuffer([]); + ChainKey.prototype.index = null; + ChainKey.prototype.key = null; + + let $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) + }); ChainKey.create = function create(properties) { return new ChainKey(properties); @@ -67517,21 +78686,15 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.index = 0; - if (o.bytes === String) - d.key = ""; - else { - d.key = []; - if (o.bytes !== Array) - d.key = $util.newBuffer(d.key); - } - } if (m.index != null && m.hasOwnProperty("index")) { d.index = m.index; + if (o.oneofs) + d._index = "index"; } if (m.key != null && m.hasOwnProperty("key")) { d.key = o.bytes === String ? $util.base64.encode(m.key, 0, m.key.length) : o.bytes === Array ? Array.prototype.slice.call(m.key) : m.key; + if (o.oneofs) + d._key = "key"; } return d; }; @@ -67559,10 +78722,36 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - MessageKey.prototype.index = 0; - MessageKey.prototype.cipherKey = $util.newBuffer([]); - MessageKey.prototype.macKey = $util.newBuffer([]); - MessageKey.prototype.iv = $util.newBuffer([]); + MessageKey.prototype.index = null; + MessageKey.prototype.cipherKey = null; + MessageKey.prototype.macKey = null; + MessageKey.prototype.iv = null; + + let $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) + }); MessageKey.create = function create(properties) { return new MessageKey(properties); @@ -67647,41 +78836,25 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.index = 0; - if (o.bytes === String) - d.cipherKey = ""; - else { - d.cipherKey = []; - if (o.bytes !== Array) - d.cipherKey = $util.newBuffer(d.cipherKey); - } - if (o.bytes === String) - d.macKey = ""; - else { - d.macKey = []; - if (o.bytes !== Array) - d.macKey = $util.newBuffer(d.macKey); - } - if (o.bytes === String) - d.iv = ""; - else { - d.iv = []; - if (o.bytes !== Array) - d.iv = $util.newBuffer(d.iv); - } - } if (m.index != null && m.hasOwnProperty("index")) { d.index = m.index; + if (o.oneofs) + d._index = "index"; } if (m.cipherKey != null && m.hasOwnProperty("cipherKey")) { d.cipherKey = o.bytes === String ? $util.base64.encode(m.cipherKey, 0, m.cipherKey.length) : o.bytes === Array ? Array.prototype.slice.call(m.cipherKey) : m.cipherKey; + if (o.oneofs) + d._cipherKey = "cipherKey"; } if (m.macKey != null && m.hasOwnProperty("macKey")) { d.macKey = o.bytes === String ? $util.base64.encode(m.macKey, 0, m.macKey.length) : o.bytes === Array ? Array.prototype.slice.call(m.macKey) : m.macKey; + if (o.oneofs) + d._macKey = "macKey"; } if (m.iv != null && m.hasOwnProperty("iv")) { d.iv = o.bytes === String ? $util.base64.encode(m.iv, 0, m.iv.length) : o.bytes === Array ? Array.prototype.slice.call(m.iv) : m.iv; + if (o.oneofs) + d._iv = "iv"; } return d; }; @@ -67712,13 +78885,57 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - PendingKeyExchange.prototype.sequence = 0; - PendingKeyExchange.prototype.localBaseKey = $util.newBuffer([]); - PendingKeyExchange.prototype.localBaseKeyPrivate = $util.newBuffer([]); - PendingKeyExchange.prototype.localRatchetKey = $util.newBuffer([]); - PendingKeyExchange.prototype.localRatchetKeyPrivate = $util.newBuffer([]); - PendingKeyExchange.prototype.localIdentityKey = $util.newBuffer([]); - PendingKeyExchange.prototype.localIdentityKeyPrivate = $util.newBuffer([]); + PendingKeyExchange.prototype.sequence = null; + PendingKeyExchange.prototype.localBaseKey = null; + PendingKeyExchange.prototype.localBaseKeyPrivate = null; + PendingKeyExchange.prototype.localRatchetKey = null; + PendingKeyExchange.prototype.localRatchetKeyPrivate = null; + PendingKeyExchange.prototype.localIdentityKey = null; + PendingKeyExchange.prototype.localIdentityKeyPrivate = null; + + let $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) + }); PendingKeyExchange.create = function create(properties) { return new PendingKeyExchange(properties); @@ -67839,71 +79056,40 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.sequence = 0; - if (o.bytes === String) - d.localBaseKey = ""; - else { - d.localBaseKey = []; - if (o.bytes !== Array) - d.localBaseKey = $util.newBuffer(d.localBaseKey); - } - if (o.bytes === String) - d.localBaseKeyPrivate = ""; - else { - d.localBaseKeyPrivate = []; - if (o.bytes !== Array) - d.localBaseKeyPrivate = $util.newBuffer(d.localBaseKeyPrivate); - } - if (o.bytes === String) - d.localRatchetKey = ""; - else { - d.localRatchetKey = []; - if (o.bytes !== Array) - d.localRatchetKey = $util.newBuffer(d.localRatchetKey); - } - if (o.bytes === String) - d.localRatchetKeyPrivate = ""; - else { - d.localRatchetKeyPrivate = []; - if (o.bytes !== Array) - d.localRatchetKeyPrivate = $util.newBuffer(d.localRatchetKeyPrivate); - } - if (o.bytes === String) - d.localIdentityKey = ""; - else { - d.localIdentityKey = []; - if (o.bytes !== Array) - d.localIdentityKey = $util.newBuffer(d.localIdentityKey); - } - if (o.bytes === String) - d.localIdentityKeyPrivate = ""; - else { - d.localIdentityKeyPrivate = []; - if (o.bytes !== Array) - d.localIdentityKeyPrivate = $util.newBuffer(d.localIdentityKeyPrivate); - } - } if (m.sequence != null && m.hasOwnProperty("sequence")) { d.sequence = m.sequence; + if (o.oneofs) + d._sequence = "sequence"; } if (m.localBaseKey != null && m.hasOwnProperty("localBaseKey")) { d.localBaseKey = o.bytes === String ? $util.base64.encode(m.localBaseKey, 0, m.localBaseKey.length) : o.bytes === Array ? Array.prototype.slice.call(m.localBaseKey) : m.localBaseKey; + if (o.oneofs) + d._localBaseKey = "localBaseKey"; } if (m.localBaseKeyPrivate != null && m.hasOwnProperty("localBaseKeyPrivate")) { d.localBaseKeyPrivate = o.bytes === String ? $util.base64.encode(m.localBaseKeyPrivate, 0, m.localBaseKeyPrivate.length) : o.bytes === Array ? Array.prototype.slice.call(m.localBaseKeyPrivate) : m.localBaseKeyPrivate; + if (o.oneofs) + d._localBaseKeyPrivate = "localBaseKeyPrivate"; } if (m.localRatchetKey != null && m.hasOwnProperty("localRatchetKey")) { d.localRatchetKey = o.bytes === String ? $util.base64.encode(m.localRatchetKey, 0, m.localRatchetKey.length) : o.bytes === Array ? Array.prototype.slice.call(m.localRatchetKey) : m.localRatchetKey; + if (o.oneofs) + d._localRatchetKey = "localRatchetKey"; } if (m.localRatchetKeyPrivate != null && m.hasOwnProperty("localRatchetKeyPrivate")) { d.localRatchetKeyPrivate = o.bytes === String ? $util.base64.encode(m.localRatchetKeyPrivate, 0, m.localRatchetKeyPrivate.length) : o.bytes === Array ? Array.prototype.slice.call(m.localRatchetKeyPrivate) : m.localRatchetKeyPrivate; + if (o.oneofs) + d._localRatchetKeyPrivate = "localRatchetKeyPrivate"; } if (m.localIdentityKey != null && m.hasOwnProperty("localIdentityKey")) { d.localIdentityKey = o.bytes === String ? $util.base64.encode(m.localIdentityKey, 0, m.localIdentityKey.length) : o.bytes === Array ? Array.prototype.slice.call(m.localIdentityKey) : m.localIdentityKey; + if (o.oneofs) + d._localIdentityKey = "localIdentityKey"; } if (m.localIdentityKeyPrivate != null && m.hasOwnProperty("localIdentityKeyPrivate")) { d.localIdentityKeyPrivate = o.bytes === String ? $util.base64.encode(m.localIdentityKeyPrivate, 0, m.localIdentityKeyPrivate.length) : o.bytes === Array ? Array.prototype.slice.call(m.localIdentityKeyPrivate) : m.localIdentityKeyPrivate; + if (o.oneofs) + d._localIdentityKeyPrivate = "localIdentityKeyPrivate"; } return d; }; @@ -67931,9 +79117,29 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - PendingPreKey.prototype.preKeyId = 0; - PendingPreKey.prototype.signedPreKeyId = 0; - PendingPreKey.prototype.baseKey = $util.newBuffer([]); + PendingPreKey.prototype.preKeyId = null; + PendingPreKey.prototype.signedPreKeyId = null; + PendingPreKey.prototype.baseKey = null; + + let $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) + }); PendingPreKey.create = function create(properties) { return new PendingPreKey(properties); @@ -68003,25 +79209,20 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.preKeyId = 0; - if (o.bytes === String) - d.baseKey = ""; - else { - d.baseKey = []; - if (o.bytes !== Array) - d.baseKey = $util.newBuffer(d.baseKey); - } - d.signedPreKeyId = 0; - } if (m.preKeyId != null && m.hasOwnProperty("preKeyId")) { d.preKeyId = m.preKeyId; + if (o.oneofs) + d._preKeyId = "preKeyId"; } if (m.baseKey != null && m.hasOwnProperty("baseKey")) { d.baseKey = o.bytes === String ? $util.base64.encode(m.baseKey, 0, m.baseKey.length) : o.bytes === Array ? Array.prototype.slice.call(m.baseKey) : m.baseKey; + if (o.oneofs) + d._baseKey = "baseKey"; } if (m.signedPreKeyId != null && m.hasOwnProperty("signedPreKeyId")) { d.signedPreKeyId = m.signedPreKeyId; + if (o.oneofs) + d._signedPreKeyId = "signedPreKeyId"; } return d; }; @@ -68052,9 +79253,29 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - SessionTransparencyMetadata.prototype.disclaimerText = ""; - SessionTransparencyMetadata.prototype.hcaId = ""; - SessionTransparencyMetadata.prototype.sessionTransparencyType = 0; + SessionTransparencyMetadata.prototype.disclaimerText = null; + SessionTransparencyMetadata.prototype.hcaId = null; + SessionTransparencyMetadata.prototype.sessionTransparencyType = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SessionTransparencyMetadata.prototype, "_disclaimerText", { + get: $util.oneOfGetter($oneOfFields = ["disclaimerText"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SessionTransparencyMetadata.prototype, "_hcaId", { + get: $util.oneOfGetter($oneOfFields = ["hcaId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SessionTransparencyMetadata.prototype, "_sessionTransparencyType", { + get: $util.oneOfGetter($oneOfFields = ["sessionTransparencyType"]), + set: $util.oneOfSetter($oneOfFields) + }); SessionTransparencyMetadata.create = function create(properties) { return new SessionTransparencyMetadata(properties); @@ -68134,19 +79355,20 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.disclaimerText = ""; - d.hcaId = ""; - d.sessionTransparencyType = o.enums === String ? "UNKNOWN_TYPE" : 0; - } if (m.disclaimerText != null && m.hasOwnProperty("disclaimerText")) { d.disclaimerText = m.disclaimerText; + if (o.oneofs) + d._disclaimerText = "disclaimerText"; } if (m.hcaId != null && m.hasOwnProperty("hcaId")) { d.hcaId = m.hcaId; + if (o.oneofs) + d._hcaId = "hcaId"; } if (m.sessionTransparencyType != null && m.hasOwnProperty("sessionTransparencyType")) { d.sessionTransparencyType = o.enums === String ? $root.proto.SessionTransparencyType[m.sessionTransparencyType] === undefined ? m.sessionTransparencyType : $root.proto.SessionTransparencyType[m.sessionTransparencyType] : m.sessionTransparencyType; + if (o.oneofs) + d._sessionTransparencyType = "sessionTransparencyType"; } return d; }; @@ -68181,10 +79403,36 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - SignalMessage.prototype.ratchetKey = $util.newBuffer([]); - SignalMessage.prototype.counter = 0; - SignalMessage.prototype.previousCounter = 0; - SignalMessage.prototype.ciphertext = $util.newBuffer([]); + SignalMessage.prototype.ratchetKey = null; + SignalMessage.prototype.counter = null; + SignalMessage.prototype.previousCounter = null; + SignalMessage.prototype.ciphertext = null; + + let $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) + }); SignalMessage.create = function create(properties) { return new SignalMessage(properties); @@ -68266,35 +79514,25 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - if (o.bytes === String) - d.ratchetKey = ""; - else { - d.ratchetKey = []; - if (o.bytes !== Array) - d.ratchetKey = $util.newBuffer(d.ratchetKey); - } - d.counter = 0; - d.previousCounter = 0; - if (o.bytes === String) - d.ciphertext = ""; - else { - d.ciphertext = []; - if (o.bytes !== Array) - d.ciphertext = $util.newBuffer(d.ciphertext); - } - } if (m.ratchetKey != null && m.hasOwnProperty("ratchetKey")) { d.ratchetKey = o.bytes === String ? $util.base64.encode(m.ratchetKey, 0, m.ratchetKey.length) : o.bytes === Array ? Array.prototype.slice.call(m.ratchetKey) : m.ratchetKey; + if (o.oneofs) + d._ratchetKey = "ratchetKey"; } if (m.counter != null && m.hasOwnProperty("counter")) { d.counter = m.counter; + if (o.oneofs) + d._counter = "counter"; } if (m.previousCounter != null && m.hasOwnProperty("previousCounter")) { d.previousCounter = m.previousCounter; + if (o.oneofs) + d._previousCounter = "previousCounter"; } if (m.ciphertext != null && m.hasOwnProperty("ciphertext")) { d.ciphertext = o.bytes === String ? $util.base64.encode(m.ciphertext, 0, m.ciphertext.length) : o.bytes === Array ? Array.prototype.slice.call(m.ciphertext) : m.ciphertext; + if (o.oneofs) + d._ciphertext = "ciphertext"; } return d; }; @@ -68322,11 +79560,43 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - SignedPreKeyRecordStructure.prototype.id = 0; - SignedPreKeyRecordStructure.prototype.publicKey = $util.newBuffer([]); - SignedPreKeyRecordStructure.prototype.privateKey = $util.newBuffer([]); - SignedPreKeyRecordStructure.prototype.signature = $util.newBuffer([]); - SignedPreKeyRecordStructure.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + SignedPreKeyRecordStructure.prototype.id = null; + SignedPreKeyRecordStructure.prototype.publicKey = null; + SignedPreKeyRecordStructure.prototype.privateKey = null; + SignedPreKeyRecordStructure.prototype.signature = null; + SignedPreKeyRecordStructure.prototype.timestamp = null; + + let $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) + }); SignedPreKeyRecordStructure.create = function create(properties) { return new SignedPreKeyRecordStructure(properties); @@ -68427,52 +79697,33 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.id = 0; - if (o.bytes === String) - d.publicKey = ""; - else { - d.publicKey = []; - if (o.bytes !== Array) - d.publicKey = $util.newBuffer(d.publicKey); - } - if (o.bytes === String) - d.privateKey = ""; - else { - d.privateKey = []; - if (o.bytes !== Array) - d.privateKey = $util.newBuffer(d.privateKey); - } - if (o.bytes === String) - d.signature = ""; - else { - d.signature = []; - if (o.bytes !== Array) - d.signature = $util.newBuffer(d.signature); - } - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.timestamp = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.timestamp = o.longs === String ? "0" : 0; - } if (m.id != null && m.hasOwnProperty("id")) { d.id = m.id; + if (o.oneofs) + d._id = "id"; } if (m.publicKey != null && m.hasOwnProperty("publicKey")) { d.publicKey = o.bytes === String ? $util.base64.encode(m.publicKey, 0, m.publicKey.length) : o.bytes === Array ? Array.prototype.slice.call(m.publicKey) : m.publicKey; + if (o.oneofs) + d._publicKey = "publicKey"; } if (m.privateKey != null && m.hasOwnProperty("privateKey")) { d.privateKey = o.bytes === String ? $util.base64.encode(m.privateKey, 0, m.privateKey.length) : o.bytes === Array ? Array.prototype.slice.call(m.privateKey) : m.privateKey; + if (o.oneofs) + d._privateKey = "privateKey"; } if (m.signature != null && m.hasOwnProperty("signature")) { d.signature = o.bytes === String ? $util.base64.encode(m.signature, 0, m.signature.length) : o.bytes === Array ? Array.prototype.slice.call(m.signature) : m.signature; + if (o.oneofs) + d._signature = "signature"; } if (m.timestamp != null && m.hasOwnProperty("timestamp")) { if (typeof m.timestamp === "number") d.timestamp = o.longs === String ? String(m.timestamp) : m.timestamp; else d.timestamp = o.longs === String ? longToString(m.timestamp) : o.longs === Number ? longToNumber(m.timestamp) : m.timestamp; + if (o.oneofs) + d._timestamp = "timestamp"; } return d; }; @@ -68500,8 +79751,8 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - StatusAttribution.prototype.type = 0; - StatusAttribution.prototype.actionUrl = ""; + StatusAttribution.prototype.type = null; + StatusAttribution.prototype.actionUrl = null; StatusAttribution.prototype.statusReshare = null; StatusAttribution.prototype.externalShare = null; StatusAttribution.prototype.music = null; @@ -68511,6 +79762,18 @@ export const proto = $root.proto = (() => { let $oneOfFields; + // Virtual OneOf for proto3 optional field + Object.defineProperty(StatusAttribution.prototype, "_type", { + get: $util.oneOfGetter($oneOfFields = ["type"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StatusAttribution.prototype, "_actionUrl", { + get: $util.oneOfGetter($oneOfFields = ["actionUrl"]), + set: $util.oneOfSetter($oneOfFields) + }); + Object.defineProperty(StatusAttribution.prototype, "attributionData", { get: $util.oneOfGetter($oneOfFields = ["statusReshare", "externalShare", "music", "groupStatus", "rlAttribution", "aiCreatedAttribution"]), set: $util.oneOfSetter($oneOfFields) @@ -68683,15 +79946,15 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.type = o.enums === String ? "UNKNOWN" : 0; - d.actionUrl = ""; - } if (m.type != null && m.hasOwnProperty("type")) { d.type = o.enums === String ? $root.proto.StatusAttribution.Type[m.type] === undefined ? m.type : $root.proto.StatusAttribution.Type[m.type] : m.type; + if (o.oneofs) + d._type = "type"; } if (m.actionUrl != null && m.hasOwnProperty("actionUrl")) { d.actionUrl = m.actionUrl; + if (o.oneofs) + d._actionUrl = "actionUrl"; } if (m.statusReshare != null && m.hasOwnProperty("statusReshare")) { d.statusReshare = $root.proto.StatusAttribution.StatusReshare.toObject(m.statusReshare, o); @@ -68746,7 +80009,15 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - AiCreatedAttribution.prototype.source = 0; + AiCreatedAttribution.prototype.source = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AiCreatedAttribution.prototype, "_source", { + get: $util.oneOfGetter($oneOfFields = ["source"]), + set: $util.oneOfSetter($oneOfFields) + }); AiCreatedAttribution.create = function create(properties) { return new AiCreatedAttribution(properties); @@ -68808,11 +80079,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.source = o.enums === String ? "UNKNOWN" : 0; - } if (m.source != null && m.hasOwnProperty("source")) { d.source = o.enums === String ? $root.proto.StatusAttribution.AiCreatedAttribution.Source[m.source] === undefined ? m.source : $root.proto.StatusAttribution.AiCreatedAttribution.Source[m.source] : m.source; + if (o.oneofs) + d._source = "source"; } return d; }; @@ -68847,10 +80117,36 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - ExternalShare.prototype.actionUrl = ""; - ExternalShare.prototype.source = 0; - ExternalShare.prototype.duration = 0; - ExternalShare.prototype.actionFallbackUrl = ""; + ExternalShare.prototype.actionUrl = null; + ExternalShare.prototype.source = null; + ExternalShare.prototype.duration = null; + ExternalShare.prototype.actionFallbackUrl = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ExternalShare.prototype, "_actionUrl", { + get: $util.oneOfGetter($oneOfFields = ["actionUrl"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ExternalShare.prototype, "_source", { + get: $util.oneOfGetter($oneOfFields = ["source"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ExternalShare.prototype, "_duration", { + get: $util.oneOfGetter($oneOfFields = ["duration"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ExternalShare.prototype, "_actionFallbackUrl", { + get: $util.oneOfGetter($oneOfFields = ["actionFallbackUrl"]), + set: $util.oneOfSetter($oneOfFields) + }); ExternalShare.create = function create(properties) { return new ExternalShare(properties); @@ -68975,23 +80271,25 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.actionUrl = ""; - d.source = o.enums === String ? "UNKNOWN" : 0; - d.duration = 0; - d.actionFallbackUrl = ""; - } if (m.actionUrl != null && m.hasOwnProperty("actionUrl")) { d.actionUrl = m.actionUrl; + if (o.oneofs) + d._actionUrl = "actionUrl"; } if (m.source != null && m.hasOwnProperty("source")) { d.source = o.enums === String ? $root.proto.StatusAttribution.ExternalShare.Source[m.source] === undefined ? m.source : $root.proto.StatusAttribution.ExternalShare.Source[m.source] : m.source; + if (o.oneofs) + d._source = "source"; } if (m.duration != null && m.hasOwnProperty("duration")) { d.duration = m.duration; + if (o.oneofs) + d._duration = "duration"; } if (m.actionFallbackUrl != null && m.hasOwnProperty("actionFallbackUrl")) { d.actionFallbackUrl = m.actionFallbackUrl; + if (o.oneofs) + d._actionFallbackUrl = "actionFallbackUrl"; } return d; }; @@ -69035,7 +80333,15 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - GroupStatus.prototype.authorJid = ""; + GroupStatus.prototype.authorJid = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(GroupStatus.prototype, "_authorJid", { + get: $util.oneOfGetter($oneOfFields = ["authorJid"]), + set: $util.oneOfSetter($oneOfFields) + }); GroupStatus.create = function create(properties) { return new GroupStatus(properties); @@ -69084,11 +80390,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.authorJid = ""; - } if (m.authorJid != null && m.hasOwnProperty("authorJid")) { d.authorJid = m.authorJid; + if (o.oneofs) + d._authorJid = "authorJid"; } return d; }; @@ -69116,12 +80421,50 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - Music.prototype.authorName = ""; - Music.prototype.songId = ""; - Music.prototype.title = ""; - Music.prototype.author = ""; - Music.prototype.artistAttribution = ""; - Music.prototype.isExplicit = false; + Music.prototype.authorName = null; + Music.prototype.songId = null; + Music.prototype.title = null; + Music.prototype.author = null; + Music.prototype.artistAttribution = null; + Music.prototype.isExplicit = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Music.prototype, "_authorName", { + get: $util.oneOfGetter($oneOfFields = ["authorName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Music.prototype, "_songId", { + get: $util.oneOfGetter($oneOfFields = ["songId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Music.prototype, "_title", { + get: $util.oneOfGetter($oneOfFields = ["title"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Music.prototype, "_author", { + get: $util.oneOfGetter($oneOfFields = ["author"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Music.prototype, "_artistAttribution", { + get: $util.oneOfGetter($oneOfFields = ["artistAttribution"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Music.prototype, "_isExplicit", { + get: $util.oneOfGetter($oneOfFields = ["isExplicit"]), + set: $util.oneOfSetter($oneOfFields) + }); Music.create = function create(properties) { return new Music(properties); @@ -69215,31 +80558,35 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.authorName = ""; - d.songId = ""; - d.title = ""; - d.author = ""; - d.artistAttribution = ""; - d.isExplicit = false; - } if (m.authorName != null && m.hasOwnProperty("authorName")) { d.authorName = m.authorName; + if (o.oneofs) + d._authorName = "authorName"; } if (m.songId != null && m.hasOwnProperty("songId")) { d.songId = m.songId; + if (o.oneofs) + d._songId = "songId"; } if (m.title != null && m.hasOwnProperty("title")) { d.title = m.title; + if (o.oneofs) + d._title = "title"; } if (m.author != null && m.hasOwnProperty("author")) { d.author = m.author; + if (o.oneofs) + d._author = "author"; } if (m.artistAttribution != null && m.hasOwnProperty("artistAttribution")) { d.artistAttribution = m.artistAttribution; + if (o.oneofs) + d._artistAttribution = "artistAttribution"; } if (m.isExplicit != null && m.hasOwnProperty("isExplicit")) { d.isExplicit = m.isExplicit; + if (o.oneofs) + d._isExplicit = "isExplicit"; } return d; }; @@ -69267,7 +80614,15 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - RLAttribution.prototype.source = 0; + RLAttribution.prototype.source = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(RLAttribution.prototype, "_source", { + get: $util.oneOfGetter($oneOfFields = ["source"]), + set: $util.oneOfSetter($oneOfFields) + }); RLAttribution.create = function create(properties) { return new RLAttribution(properties); @@ -69337,11 +80692,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.source = o.enums === String ? "UNKNOWN" : 0; - } if (m.source != null && m.hasOwnProperty("source")) { d.source = o.enums === String ? $root.proto.StatusAttribution.RLAttribution.Source[m.source] === undefined ? m.source : $root.proto.StatusAttribution.RLAttribution.Source[m.source] : m.source; + if (o.oneofs) + d._source = "source"; } return d; }; @@ -69378,9 +80732,23 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - StatusReshare.prototype.source = 0; + StatusReshare.prototype.source = null; StatusReshare.prototype.metadata = null; + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StatusReshare.prototype, "_source", { + get: $util.oneOfGetter($oneOfFields = ["source"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StatusReshare.prototype, "_metadata", { + get: $util.oneOfGetter($oneOfFields = ["metadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + StatusReshare.create = function create(properties) { return new StatusReshare(properties); }; @@ -69464,15 +80832,15 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.source = o.enums === String ? "UNKNOWN" : 0; - d.metadata = null; - } if (m.source != null && m.hasOwnProperty("source")) { d.source = o.enums === String ? $root.proto.StatusAttribution.StatusReshare.Source[m.source] === undefined ? m.source : $root.proto.StatusAttribution.StatusReshare.Source[m.source] : m.source; + if (o.oneofs) + d._source = "source"; } if (m.metadata != null && m.hasOwnProperty("metadata")) { d.metadata = $root.proto.StatusAttribution.StatusReshare.Metadata.toObject(m.metadata, o); + if (o.oneofs) + d._metadata = "metadata"; } return d; }; @@ -69497,10 +80865,36 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - Metadata.prototype.duration = 0; - Metadata.prototype.channelJid = ""; - Metadata.prototype.channelMessageId = 0; - Metadata.prototype.hasMultipleReshares = false; + Metadata.prototype.duration = null; + Metadata.prototype.channelJid = null; + Metadata.prototype.channelMessageId = null; + Metadata.prototype.hasMultipleReshares = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Metadata.prototype, "_duration", { + get: $util.oneOfGetter($oneOfFields = ["duration"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Metadata.prototype, "_channelJid", { + get: $util.oneOfGetter($oneOfFields = ["channelJid"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Metadata.prototype, "_channelMessageId", { + get: $util.oneOfGetter($oneOfFields = ["channelMessageId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Metadata.prototype, "_hasMultipleReshares", { + get: $util.oneOfGetter($oneOfFields = ["hasMultipleReshares"]), + set: $util.oneOfSetter($oneOfFields) + }); Metadata.create = function create(properties) { return new Metadata(properties); @@ -69576,23 +80970,25 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.duration = 0; - d.channelJid = ""; - d.channelMessageId = 0; - d.hasMultipleReshares = false; - } if (m.duration != null && m.hasOwnProperty("duration")) { d.duration = m.duration; + if (o.oneofs) + d._duration = "duration"; } if (m.channelJid != null && m.hasOwnProperty("channelJid")) { d.channelJid = m.channelJid; + if (o.oneofs) + d._channelJid = "channelJid"; } if (m.channelMessageId != null && m.hasOwnProperty("channelMessageId")) { d.channelMessageId = m.channelMessageId; + if (o.oneofs) + d._channelMessageId = "channelMessageId"; } if (m.hasMultipleReshares != null && m.hasOwnProperty("hasMultipleReshares")) { d.hasMultipleReshares = m.hasMultipleReshares; + if (o.oneofs) + d._hasMultipleReshares = "hasMultipleReshares"; } return d; }; @@ -69653,6 +81049,14 @@ export const proto = $root.proto = (() => { StatusMentionMessage.prototype.quotedStatus = null; + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StatusMentionMessage.prototype, "_quotedStatus", { + get: $util.oneOfGetter($oneOfFields = ["quotedStatus"]), + set: $util.oneOfSetter($oneOfFields) + }); + StatusMentionMessage.create = function create(properties) { return new StatusMentionMessage(properties); }; @@ -69702,11 +81106,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.quotedStatus = null; - } if (m.quotedStatus != null && m.hasOwnProperty("quotedStatus")) { d.quotedStatus = $root.proto.Message.toObject(m.quotedStatus, o); + if (o.oneofs) + d._quotedStatus = "quotedStatus"; } return d; }; @@ -69734,8 +81137,22 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - StatusPSA.prototype.campaignId = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - StatusPSA.prototype.campaignExpirationTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + StatusPSA.prototype.campaignId = null; + StatusPSA.prototype.campaignExpirationTimestamp = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StatusPSA.prototype, "_campaignId", { + get: $util.oneOfGetter($oneOfFields = ["campaignId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StatusPSA.prototype, "_campaignExpirationTimestamp", { + get: $util.oneOfGetter($oneOfFields = ["campaignExpirationTimestamp"]), + set: $util.oneOfSetter($oneOfFields) + }); StatusPSA.create = function create(properties) { return new StatusPSA(properties); @@ -69744,7 +81161,8 @@ export const proto = $root.proto = (() => { StatusPSA.encode = function encode(m, w) { if (!w) w = $Writer.create(); - w.uint32(352).uint64(m.campaignId); + if (m.campaignId != null && Object.hasOwnProperty.call(m, "campaignId")) + w.uint32(352).uint64(m.campaignId); if (m.campaignExpirationTimestamp != null && Object.hasOwnProperty.call(m, "campaignExpirationTimestamp")) w.uint32(360).uint64(m.campaignExpirationTimestamp); return w; @@ -69772,8 +81190,6 @@ export const proto = $root.proto = (() => { break; } } - if (!m.hasOwnProperty("campaignId")) - throw $util.ProtocolError("missing required 'campaignId'", { instance: m }); return m; }; @@ -69808,29 +81224,21 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - if ($util.Long) { - var n = new $util.Long(0, 0, true); - d.campaignId = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.campaignId = o.longs === String ? "0" : 0; - if ($util.Long) { - var n = new $util.Long(0, 0, true); - d.campaignExpirationTimestamp = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.campaignExpirationTimestamp = o.longs === String ? "0" : 0; - } if (m.campaignId != null && m.hasOwnProperty("campaignId")) { if (typeof m.campaignId === "number") d.campaignId = o.longs === String ? String(m.campaignId) : m.campaignId; else d.campaignId = o.longs === String ? longToString(m.campaignId, true) : o.longs === Number ? longToNumber(m.campaignId, true) : m.campaignId; + if (o.oneofs) + d._campaignId = "campaignId"; } if (m.campaignExpirationTimestamp != null && m.hasOwnProperty("campaignExpirationTimestamp")) { if (typeof m.campaignExpirationTimestamp === "number") d.campaignExpirationTimestamp = o.longs === String ? String(m.campaignExpirationTimestamp) : m.campaignExpirationTimestamp; else d.campaignExpirationTimestamp = o.longs === String ? longToString(m.campaignExpirationTimestamp, true) : o.longs === Number ? longToNumber(m.campaignExpirationTimestamp, true) : m.campaignExpirationTimestamp; + if (o.oneofs) + d._campaignExpirationTimestamp = "campaignExpirationTimestamp"; } return d; }; @@ -69858,20 +81266,106 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - StickerMetadata.prototype.url = ""; - StickerMetadata.prototype.fileSha256 = $util.newBuffer([]); - StickerMetadata.prototype.fileEncSha256 = $util.newBuffer([]); - StickerMetadata.prototype.mediaKey = $util.newBuffer([]); - StickerMetadata.prototype.mimetype = ""; - StickerMetadata.prototype.height = 0; - StickerMetadata.prototype.width = 0; - StickerMetadata.prototype.directPath = ""; - StickerMetadata.prototype.fileLength = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - StickerMetadata.prototype.weight = 0; - StickerMetadata.prototype.lastStickerSentTs = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - StickerMetadata.prototype.isLottie = false; - StickerMetadata.prototype.imageHash = ""; - StickerMetadata.prototype.isAvatarSticker = false; + StickerMetadata.prototype.url = null; + StickerMetadata.prototype.fileSha256 = null; + StickerMetadata.prototype.fileEncSha256 = null; + StickerMetadata.prototype.mediaKey = null; + StickerMetadata.prototype.mimetype = null; + StickerMetadata.prototype.height = null; + StickerMetadata.prototype.width = null; + StickerMetadata.prototype.directPath = null; + StickerMetadata.prototype.fileLength = null; + StickerMetadata.prototype.weight = null; + StickerMetadata.prototype.lastStickerSentTs = null; + StickerMetadata.prototype.isLottie = null; + StickerMetadata.prototype.imageHash = null; + StickerMetadata.prototype.isAvatarSticker = null; + + let $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) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StickerMetadata.prototype, "_imageHash", { + get: $util.oneOfGetter($oneOfFields = ["imageHash"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StickerMetadata.prototype, "_isAvatarSticker", { + get: $util.oneOfGetter($oneOfFields = ["isAvatarSticker"]), + set: $util.oneOfSetter($oneOfFields) + }); StickerMetadata.create = function create(properties) { return new StickerMetadata(properties); @@ -70060,95 +81554,81 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.url = ""; - if (o.bytes === String) - d.fileSha256 = ""; - else { - d.fileSha256 = []; - if (o.bytes !== Array) - d.fileSha256 = $util.newBuffer(d.fileSha256); - } - if (o.bytes === String) - d.fileEncSha256 = ""; - else { - d.fileEncSha256 = []; - if (o.bytes !== Array) - d.fileEncSha256 = $util.newBuffer(d.fileEncSha256); - } - if (o.bytes === String) - d.mediaKey = ""; - else { - d.mediaKey = []; - if (o.bytes !== Array) - d.mediaKey = $util.newBuffer(d.mediaKey); - } - d.mimetype = ""; - d.height = 0; - d.width = 0; - d.directPath = ""; - if ($util.Long) { - var n = new $util.Long(0, 0, true); - d.fileLength = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.fileLength = o.longs === String ? "0" : 0; - d.weight = 0; - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.lastStickerSentTs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.lastStickerSentTs = o.longs === String ? "0" : 0; - d.isLottie = false; - d.imageHash = ""; - d.isAvatarSticker = false; - } if (m.url != null && m.hasOwnProperty("url")) { d.url = m.url; + if (o.oneofs) + d._url = "url"; } if (m.fileSha256 != null && m.hasOwnProperty("fileSha256")) { d.fileSha256 = o.bytes === String ? $util.base64.encode(m.fileSha256, 0, m.fileSha256.length) : o.bytes === Array ? Array.prototype.slice.call(m.fileSha256) : m.fileSha256; + if (o.oneofs) + d._fileSha256 = "fileSha256"; } if (m.fileEncSha256 != null && m.hasOwnProperty("fileEncSha256")) { d.fileEncSha256 = o.bytes === String ? $util.base64.encode(m.fileEncSha256, 0, m.fileEncSha256.length) : o.bytes === Array ? Array.prototype.slice.call(m.fileEncSha256) : m.fileEncSha256; + if (o.oneofs) + d._fileEncSha256 = "fileEncSha256"; } if (m.mediaKey != null && m.hasOwnProperty("mediaKey")) { d.mediaKey = o.bytes === String ? $util.base64.encode(m.mediaKey, 0, m.mediaKey.length) : o.bytes === Array ? Array.prototype.slice.call(m.mediaKey) : m.mediaKey; + if (o.oneofs) + d._mediaKey = "mediaKey"; } if (m.mimetype != null && m.hasOwnProperty("mimetype")) { d.mimetype = m.mimetype; + if (o.oneofs) + d._mimetype = "mimetype"; } if (m.height != null && m.hasOwnProperty("height")) { d.height = m.height; + if (o.oneofs) + d._height = "height"; } if (m.width != null && m.hasOwnProperty("width")) { d.width = m.width; + if (o.oneofs) + d._width = "width"; } if (m.directPath != null && m.hasOwnProperty("directPath")) { d.directPath = m.directPath; + if (o.oneofs) + d._directPath = "directPath"; } if (m.fileLength != null && m.hasOwnProperty("fileLength")) { if (typeof m.fileLength === "number") d.fileLength = o.longs === String ? String(m.fileLength) : m.fileLength; else d.fileLength = o.longs === String ? longToString(m.fileLength, true) : o.longs === Number ? longToNumber(m.fileLength, true) : m.fileLength; + if (o.oneofs) + d._fileLength = "fileLength"; } if (m.weight != null && m.hasOwnProperty("weight")) { d.weight = o.json && !isFinite(m.weight) ? String(m.weight) : m.weight; + if (o.oneofs) + d._weight = "weight"; } if (m.lastStickerSentTs != null && m.hasOwnProperty("lastStickerSentTs")) { if (typeof m.lastStickerSentTs === "number") d.lastStickerSentTs = o.longs === String ? String(m.lastStickerSentTs) : m.lastStickerSentTs; else d.lastStickerSentTs = o.longs === String ? longToString(m.lastStickerSentTs) : o.longs === Number ? longToNumber(m.lastStickerSentTs) : m.lastStickerSentTs; + if (o.oneofs) + d._lastStickerSentTs = "lastStickerSentTs"; } if (m.isLottie != null && m.hasOwnProperty("isLottie")) { d.isLottie = m.isLottie; + if (o.oneofs) + d._isLottie = "isLottie"; } if (m.imageHash != null && m.hasOwnProperty("imageHash")) { d.imageHash = m.imageHash; + if (o.oneofs) + d._imageHash = "imageHash"; } if (m.isAvatarSticker != null && m.hasOwnProperty("isAvatarSticker")) { d.isAvatarSticker = m.isAvatarSticker; + if (o.oneofs) + d._isAvatarSticker = "isAvatarSticker"; } return d; }; @@ -70176,10 +81656,36 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - SyncActionData.prototype.index = $util.newBuffer([]); + SyncActionData.prototype.index = null; SyncActionData.prototype.value = null; - SyncActionData.prototype.padding = $util.newBuffer([]); - SyncActionData.prototype.version = 0; + SyncActionData.prototype.padding = null; + SyncActionData.prototype.version = null; + + let $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) + }); SyncActionData.create = function create(properties) { return new SyncActionData(properties); @@ -70263,35 +81769,25 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - if (o.bytes === String) - d.index = ""; - else { - d.index = []; - if (o.bytes !== Array) - d.index = $util.newBuffer(d.index); - } - d.value = null; - if (o.bytes === String) - d.padding = ""; - else { - d.padding = []; - if (o.bytes !== Array) - d.padding = $util.newBuffer(d.padding); - } - d.version = 0; - } if (m.index != null && m.hasOwnProperty("index")) { d.index = o.bytes === String ? $util.base64.encode(m.index, 0, m.index.length) : o.bytes === Array ? Array.prototype.slice.call(m.index) : m.index; + if (o.oneofs) + d._index = "index"; } if (m.value != null && m.hasOwnProperty("value")) { d.value = $root.proto.SyncActionValue.toObject(m.value, o); + if (o.oneofs) + d._value = "value"; } if (m.padding != null && m.hasOwnProperty("padding")) { d.padding = o.bytes === String ? $util.base64.encode(m.padding, 0, m.padding.length) : o.bytes === Array ? Array.prototype.slice.call(m.padding) : m.padding; + if (o.oneofs) + d._padding = "padding"; } if (m.version != null && m.hasOwnProperty("version")) { d.version = m.version; + if (o.oneofs) + d._version = "version"; } return d; }; @@ -70319,7 +81815,7 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - SyncActionValue.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + SyncActionValue.prototype.timestamp = null; SyncActionValue.prototype.starAction = null; SyncActionValue.prototype.contactAction = null; SyncActionValue.prototype.muteAction = null; @@ -70389,6 +81885,422 @@ export const proto = $root.proto = (() => { SyncActionValue.prototype.interactiveMessageAction = null; SyncActionValue.prototype.settingsSyncAction = null; + let $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, "_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, "_ugcBot", { + get: $util.oneOfGetter($oneOfFields = ["ugcBot"]), + 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) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncActionValue.prototype, "_lidContactAction", { + get: $util.oneOfGetter($oneOfFields = ["lidContactAction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncActionValue.prototype, "_ctwaPerCustomerDataSharingAction", { + get: $util.oneOfGetter($oneOfFields = ["ctwaPerCustomerDataSharingAction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncActionValue.prototype, "_paymentTosAction", { + get: $util.oneOfGetter($oneOfFields = ["paymentTosAction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncActionValue.prototype, "_privacySettingChannelsPersonalisedRecommendationAction", { + get: $util.oneOfGetter($oneOfFields = ["privacySettingChannelsPersonalisedRecommendationAction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncActionValue.prototype, "_detectedOutcomesStatusAction", { + get: $util.oneOfGetter($oneOfFields = ["detectedOutcomesStatusAction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncActionValue.prototype, "_maibaAiFeaturesControlAction", { + get: $util.oneOfGetter($oneOfFields = ["maibaAiFeaturesControlAction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncActionValue.prototype, "_businessBroadcastListAction", { + get: $util.oneOfGetter($oneOfFields = ["businessBroadcastListAction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncActionValue.prototype, "_musicUserIdAction", { + get: $util.oneOfGetter($oneOfFields = ["musicUserIdAction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncActionValue.prototype, "_statusPostOptInNotificationPreferencesAction", { + get: $util.oneOfGetter($oneOfFields = ["statusPostOptInNotificationPreferencesAction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncActionValue.prototype, "_avatarUpdatedAction", { + get: $util.oneOfGetter($oneOfFields = ["avatarUpdatedAction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncActionValue.prototype, "_privateProcessingSettingAction", { + get: $util.oneOfGetter($oneOfFields = ["privateProcessingSettingAction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncActionValue.prototype, "_newsletterSavedInterestsAction", { + get: $util.oneOfGetter($oneOfFields = ["newsletterSavedInterestsAction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncActionValue.prototype, "_aiThreadRenameAction", { + get: $util.oneOfGetter($oneOfFields = ["aiThreadRenameAction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncActionValue.prototype, "_interactiveMessageAction", { + get: $util.oneOfGetter($oneOfFields = ["interactiveMessageAction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncActionValue.prototype, "_settingsSyncAction", { + get: $util.oneOfGetter($oneOfFields = ["settingsSyncAction"]), + set: $util.oneOfSetter($oneOfFields) + }); + SyncActionValue.create = function create(properties) { return new SyncActionValue(properties); }; @@ -71191,290 +83103,353 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.timestamp = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.timestamp = o.longs === String ? "0" : 0; - d.starAction = null; - d.contactAction = null; - d.muteAction = null; - d.pinAction = null; - d.pushNameSetting = null; - d.quickReplyAction = null; - d.recentEmojiWeightsAction = null; - d.labelEditAction = null; - d.labelAssociationAction = null; - d.localeSetting = null; - d.archiveChatAction = null; - d.deleteMessageForMeAction = null; - d.keyExpiration = null; - d.markChatAsReadAction = null; - d.clearChatAction = null; - d.deleteChatAction = null; - d.unarchiveChatsSetting = null; - d.primaryFeature = null; - d.androidUnsupportedActions = null; - d.agentAction = null; - d.subscriptionAction = null; - d.userStatusMuteAction = null; - d.timeFormatAction = null; - d.nuxAction = null; - d.primaryVersionAction = null; - d.stickerAction = null; - d.removeRecentStickerAction = null; - d.chatAssignment = null; - d.chatAssignmentOpenedStatus = null; - d.pnForLidChatAction = null; - d.marketingMessageAction = null; - d.marketingMessageBroadcastAction = null; - d.externalWebBetaAction = null; - d.privacySettingRelayAllCalls = null; - d.callLogAction = null; - d.ugcBot = null; - d.statusPrivacy = null; - d.botWelcomeRequestAction = null; - d.deleteIndividualCallLog = null; - d.labelReorderingAction = null; - d.paymentInfoAction = null; - d.customPaymentMethodsAction = null; - d.lockChatAction = null; - d.chatLockSettings = null; - d.wamoUserIdentifierAction = null; - d.privacySettingDisableLinkPreviewsAction = null; - d.deviceCapabilities = null; - d.noteEditAction = null; - d.favoritesAction = null; - d.merchantPaymentPartnerAction = null; - d.waffleAccountLinkStateAction = null; - d.usernameChatStartMode = null; - d.notificationActivitySettingAction = null; - d.lidContactAction = null; - d.ctwaPerCustomerDataSharingAction = null; - d.paymentTosAction = null; - d.privacySettingChannelsPersonalisedRecommendationAction = null; - d.detectedOutcomesStatusAction = null; - d.maibaAiFeaturesControlAction = null; - d.businessBroadcastListAction = null; - d.musicUserIdAction = null; - d.statusPostOptInNotificationPreferencesAction = null; - d.avatarUpdatedAction = null; - d.privateProcessingSettingAction = null; - d.newsletterSavedInterestsAction = null; - d.aiThreadRenameAction = null; - d.interactiveMessageAction = null; - d.settingsSyncAction = null; - } if (m.timestamp != null && m.hasOwnProperty("timestamp")) { if (typeof m.timestamp === "number") d.timestamp = o.longs === String ? String(m.timestamp) : m.timestamp; else d.timestamp = o.longs === String ? longToString(m.timestamp) : o.longs === Number ? longToNumber(m.timestamp) : m.timestamp; + if (o.oneofs) + d._timestamp = "timestamp"; } if (m.starAction != null && m.hasOwnProperty("starAction")) { d.starAction = $root.proto.SyncActionValue.StarAction.toObject(m.starAction, o); + if (o.oneofs) + d._starAction = "starAction"; } if (m.contactAction != null && m.hasOwnProperty("contactAction")) { d.contactAction = $root.proto.SyncActionValue.ContactAction.toObject(m.contactAction, o); + if (o.oneofs) + d._contactAction = "contactAction"; } if (m.muteAction != null && m.hasOwnProperty("muteAction")) { d.muteAction = $root.proto.SyncActionValue.MuteAction.toObject(m.muteAction, o); + if (o.oneofs) + d._muteAction = "muteAction"; } if (m.pinAction != null && m.hasOwnProperty("pinAction")) { d.pinAction = $root.proto.SyncActionValue.PinAction.toObject(m.pinAction, o); + if (o.oneofs) + d._pinAction = "pinAction"; } if (m.pushNameSetting != null && m.hasOwnProperty("pushNameSetting")) { d.pushNameSetting = $root.proto.SyncActionValue.PushNameSetting.toObject(m.pushNameSetting, o); + if (o.oneofs) + d._pushNameSetting = "pushNameSetting"; } if (m.quickReplyAction != null && m.hasOwnProperty("quickReplyAction")) { d.quickReplyAction = $root.proto.SyncActionValue.QuickReplyAction.toObject(m.quickReplyAction, o); + if (o.oneofs) + d._quickReplyAction = "quickReplyAction"; } if (m.recentEmojiWeightsAction != null && m.hasOwnProperty("recentEmojiWeightsAction")) { d.recentEmojiWeightsAction = $root.proto.SyncActionValue.RecentEmojiWeightsAction.toObject(m.recentEmojiWeightsAction, o); + if (o.oneofs) + d._recentEmojiWeightsAction = "recentEmojiWeightsAction"; } if (m.labelEditAction != null && m.hasOwnProperty("labelEditAction")) { d.labelEditAction = $root.proto.SyncActionValue.LabelEditAction.toObject(m.labelEditAction, o); + if (o.oneofs) + d._labelEditAction = "labelEditAction"; } if (m.labelAssociationAction != null && m.hasOwnProperty("labelAssociationAction")) { d.labelAssociationAction = $root.proto.SyncActionValue.LabelAssociationAction.toObject(m.labelAssociationAction, o); + if (o.oneofs) + d._labelAssociationAction = "labelAssociationAction"; } if (m.localeSetting != null && m.hasOwnProperty("localeSetting")) { d.localeSetting = $root.proto.SyncActionValue.LocaleSetting.toObject(m.localeSetting, o); + if (o.oneofs) + d._localeSetting = "localeSetting"; } if (m.archiveChatAction != null && m.hasOwnProperty("archiveChatAction")) { d.archiveChatAction = $root.proto.SyncActionValue.ArchiveChatAction.toObject(m.archiveChatAction, o); + if (o.oneofs) + d._archiveChatAction = "archiveChatAction"; } if (m.deleteMessageForMeAction != null && m.hasOwnProperty("deleteMessageForMeAction")) { d.deleteMessageForMeAction = $root.proto.SyncActionValue.DeleteMessageForMeAction.toObject(m.deleteMessageForMeAction, o); + if (o.oneofs) + d._deleteMessageForMeAction = "deleteMessageForMeAction"; } if (m.keyExpiration != null && m.hasOwnProperty("keyExpiration")) { d.keyExpiration = $root.proto.SyncActionValue.KeyExpiration.toObject(m.keyExpiration, o); + if (o.oneofs) + d._keyExpiration = "keyExpiration"; } if (m.markChatAsReadAction != null && m.hasOwnProperty("markChatAsReadAction")) { d.markChatAsReadAction = $root.proto.SyncActionValue.MarkChatAsReadAction.toObject(m.markChatAsReadAction, o); + if (o.oneofs) + d._markChatAsReadAction = "markChatAsReadAction"; } if (m.clearChatAction != null && m.hasOwnProperty("clearChatAction")) { d.clearChatAction = $root.proto.SyncActionValue.ClearChatAction.toObject(m.clearChatAction, o); + if (o.oneofs) + d._clearChatAction = "clearChatAction"; } if (m.deleteChatAction != null && m.hasOwnProperty("deleteChatAction")) { d.deleteChatAction = $root.proto.SyncActionValue.DeleteChatAction.toObject(m.deleteChatAction, o); + if (o.oneofs) + d._deleteChatAction = "deleteChatAction"; } if (m.unarchiveChatsSetting != null && m.hasOwnProperty("unarchiveChatsSetting")) { d.unarchiveChatsSetting = $root.proto.SyncActionValue.UnarchiveChatsSetting.toObject(m.unarchiveChatsSetting, o); + if (o.oneofs) + d._unarchiveChatsSetting = "unarchiveChatsSetting"; } if (m.primaryFeature != null && m.hasOwnProperty("primaryFeature")) { d.primaryFeature = $root.proto.SyncActionValue.PrimaryFeature.toObject(m.primaryFeature, o); + if (o.oneofs) + d._primaryFeature = "primaryFeature"; } if (m.androidUnsupportedActions != null && m.hasOwnProperty("androidUnsupportedActions")) { d.androidUnsupportedActions = $root.proto.SyncActionValue.AndroidUnsupportedActions.toObject(m.androidUnsupportedActions, o); + if (o.oneofs) + d._androidUnsupportedActions = "androidUnsupportedActions"; } if (m.agentAction != null && m.hasOwnProperty("agentAction")) { d.agentAction = $root.proto.SyncActionValue.AgentAction.toObject(m.agentAction, o); + if (o.oneofs) + d._agentAction = "agentAction"; } if (m.subscriptionAction != null && m.hasOwnProperty("subscriptionAction")) { d.subscriptionAction = $root.proto.SyncActionValue.SubscriptionAction.toObject(m.subscriptionAction, o); + if (o.oneofs) + d._subscriptionAction = "subscriptionAction"; } if (m.userStatusMuteAction != null && m.hasOwnProperty("userStatusMuteAction")) { d.userStatusMuteAction = $root.proto.SyncActionValue.UserStatusMuteAction.toObject(m.userStatusMuteAction, o); + if (o.oneofs) + d._userStatusMuteAction = "userStatusMuteAction"; } if (m.timeFormatAction != null && m.hasOwnProperty("timeFormatAction")) { d.timeFormatAction = $root.proto.SyncActionValue.TimeFormatAction.toObject(m.timeFormatAction, o); + if (o.oneofs) + d._timeFormatAction = "timeFormatAction"; } if (m.nuxAction != null && m.hasOwnProperty("nuxAction")) { d.nuxAction = $root.proto.SyncActionValue.NuxAction.toObject(m.nuxAction, o); + if (o.oneofs) + d._nuxAction = "nuxAction"; } if (m.primaryVersionAction != null && m.hasOwnProperty("primaryVersionAction")) { d.primaryVersionAction = $root.proto.SyncActionValue.PrimaryVersionAction.toObject(m.primaryVersionAction, o); + if (o.oneofs) + d._primaryVersionAction = "primaryVersionAction"; } if (m.stickerAction != null && m.hasOwnProperty("stickerAction")) { d.stickerAction = $root.proto.SyncActionValue.StickerAction.toObject(m.stickerAction, o); + if (o.oneofs) + d._stickerAction = "stickerAction"; } if (m.removeRecentStickerAction != null && m.hasOwnProperty("removeRecentStickerAction")) { d.removeRecentStickerAction = $root.proto.SyncActionValue.RemoveRecentStickerAction.toObject(m.removeRecentStickerAction, o); + if (o.oneofs) + d._removeRecentStickerAction = "removeRecentStickerAction"; } if (m.chatAssignment != null && m.hasOwnProperty("chatAssignment")) { d.chatAssignment = $root.proto.SyncActionValue.ChatAssignmentAction.toObject(m.chatAssignment, o); + if (o.oneofs) + d._chatAssignment = "chatAssignment"; } if (m.chatAssignmentOpenedStatus != null && m.hasOwnProperty("chatAssignmentOpenedStatus")) { d.chatAssignmentOpenedStatus = $root.proto.SyncActionValue.ChatAssignmentOpenedStatusAction.toObject(m.chatAssignmentOpenedStatus, o); + if (o.oneofs) + d._chatAssignmentOpenedStatus = "chatAssignmentOpenedStatus"; } if (m.pnForLidChatAction != null && m.hasOwnProperty("pnForLidChatAction")) { d.pnForLidChatAction = $root.proto.SyncActionValue.PnForLidChatAction.toObject(m.pnForLidChatAction, o); + if (o.oneofs) + d._pnForLidChatAction = "pnForLidChatAction"; } if (m.marketingMessageAction != null && m.hasOwnProperty("marketingMessageAction")) { d.marketingMessageAction = $root.proto.SyncActionValue.MarketingMessageAction.toObject(m.marketingMessageAction, o); + if (o.oneofs) + d._marketingMessageAction = "marketingMessageAction"; } if (m.marketingMessageBroadcastAction != null && m.hasOwnProperty("marketingMessageBroadcastAction")) { d.marketingMessageBroadcastAction = $root.proto.SyncActionValue.MarketingMessageBroadcastAction.toObject(m.marketingMessageBroadcastAction, o); + if (o.oneofs) + d._marketingMessageBroadcastAction = "marketingMessageBroadcastAction"; } if (m.externalWebBetaAction != null && m.hasOwnProperty("externalWebBetaAction")) { d.externalWebBetaAction = $root.proto.SyncActionValue.ExternalWebBetaAction.toObject(m.externalWebBetaAction, o); + if (o.oneofs) + d._externalWebBetaAction = "externalWebBetaAction"; } if (m.privacySettingRelayAllCalls != null && m.hasOwnProperty("privacySettingRelayAllCalls")) { d.privacySettingRelayAllCalls = $root.proto.SyncActionValue.PrivacySettingRelayAllCalls.toObject(m.privacySettingRelayAllCalls, o); + if (o.oneofs) + d._privacySettingRelayAllCalls = "privacySettingRelayAllCalls"; } if (m.callLogAction != null && m.hasOwnProperty("callLogAction")) { d.callLogAction = $root.proto.SyncActionValue.CallLogAction.toObject(m.callLogAction, o); + if (o.oneofs) + d._callLogAction = "callLogAction"; } if (m.ugcBot != null && m.hasOwnProperty("ugcBot")) { d.ugcBot = $root.proto.SyncActionValue.UGCBot.toObject(m.ugcBot, o); + if (o.oneofs) + d._ugcBot = "ugcBot"; } if (m.statusPrivacy != null && m.hasOwnProperty("statusPrivacy")) { d.statusPrivacy = $root.proto.SyncActionValue.StatusPrivacyAction.toObject(m.statusPrivacy, o); + if (o.oneofs) + d._statusPrivacy = "statusPrivacy"; } if (m.botWelcomeRequestAction != null && m.hasOwnProperty("botWelcomeRequestAction")) { d.botWelcomeRequestAction = $root.proto.SyncActionValue.BotWelcomeRequestAction.toObject(m.botWelcomeRequestAction, o); + if (o.oneofs) + d._botWelcomeRequestAction = "botWelcomeRequestAction"; } if (m.deleteIndividualCallLog != null && m.hasOwnProperty("deleteIndividualCallLog")) { d.deleteIndividualCallLog = $root.proto.SyncActionValue.DeleteIndividualCallLogAction.toObject(m.deleteIndividualCallLog, o); + if (o.oneofs) + d._deleteIndividualCallLog = "deleteIndividualCallLog"; } if (m.labelReorderingAction != null && m.hasOwnProperty("labelReorderingAction")) { d.labelReorderingAction = $root.proto.SyncActionValue.LabelReorderingAction.toObject(m.labelReorderingAction, o); + if (o.oneofs) + d._labelReorderingAction = "labelReorderingAction"; } if (m.paymentInfoAction != null && m.hasOwnProperty("paymentInfoAction")) { d.paymentInfoAction = $root.proto.SyncActionValue.PaymentInfoAction.toObject(m.paymentInfoAction, o); + if (o.oneofs) + d._paymentInfoAction = "paymentInfoAction"; } if (m.customPaymentMethodsAction != null && m.hasOwnProperty("customPaymentMethodsAction")) { d.customPaymentMethodsAction = $root.proto.SyncActionValue.CustomPaymentMethodsAction.toObject(m.customPaymentMethodsAction, o); + if (o.oneofs) + d._customPaymentMethodsAction = "customPaymentMethodsAction"; } if (m.lockChatAction != null && m.hasOwnProperty("lockChatAction")) { d.lockChatAction = $root.proto.SyncActionValue.LockChatAction.toObject(m.lockChatAction, o); + if (o.oneofs) + d._lockChatAction = "lockChatAction"; } if (m.chatLockSettings != null && m.hasOwnProperty("chatLockSettings")) { d.chatLockSettings = $root.proto.ChatLockSettings.toObject(m.chatLockSettings, o); + if (o.oneofs) + d._chatLockSettings = "chatLockSettings"; } if (m.wamoUserIdentifierAction != null && m.hasOwnProperty("wamoUserIdentifierAction")) { d.wamoUserIdentifierAction = $root.proto.SyncActionValue.WamoUserIdentifierAction.toObject(m.wamoUserIdentifierAction, o); + if (o.oneofs) + d._wamoUserIdentifierAction = "wamoUserIdentifierAction"; } if (m.privacySettingDisableLinkPreviewsAction != null && m.hasOwnProperty("privacySettingDisableLinkPreviewsAction")) { d.privacySettingDisableLinkPreviewsAction = $root.proto.SyncActionValue.PrivacySettingDisableLinkPreviewsAction.toObject(m.privacySettingDisableLinkPreviewsAction, o); + if (o.oneofs) + d._privacySettingDisableLinkPreviewsAction = "privacySettingDisableLinkPreviewsAction"; } if (m.deviceCapabilities != null && m.hasOwnProperty("deviceCapabilities")) { d.deviceCapabilities = $root.proto.DeviceCapabilities.toObject(m.deviceCapabilities, o); + if (o.oneofs) + d._deviceCapabilities = "deviceCapabilities"; } if (m.noteEditAction != null && m.hasOwnProperty("noteEditAction")) { d.noteEditAction = $root.proto.SyncActionValue.NoteEditAction.toObject(m.noteEditAction, o); + if (o.oneofs) + d._noteEditAction = "noteEditAction"; } if (m.favoritesAction != null && m.hasOwnProperty("favoritesAction")) { d.favoritesAction = $root.proto.SyncActionValue.FavoritesAction.toObject(m.favoritesAction, o); + if (o.oneofs) + d._favoritesAction = "favoritesAction"; } if (m.merchantPaymentPartnerAction != null && m.hasOwnProperty("merchantPaymentPartnerAction")) { d.merchantPaymentPartnerAction = $root.proto.SyncActionValue.MerchantPaymentPartnerAction.toObject(m.merchantPaymentPartnerAction, o); + if (o.oneofs) + d._merchantPaymentPartnerAction = "merchantPaymentPartnerAction"; } if (m.waffleAccountLinkStateAction != null && m.hasOwnProperty("waffleAccountLinkStateAction")) { d.waffleAccountLinkStateAction = $root.proto.SyncActionValue.WaffleAccountLinkStateAction.toObject(m.waffleAccountLinkStateAction, o); + if (o.oneofs) + d._waffleAccountLinkStateAction = "waffleAccountLinkStateAction"; } if (m.usernameChatStartMode != null && m.hasOwnProperty("usernameChatStartMode")) { d.usernameChatStartMode = $root.proto.SyncActionValue.UsernameChatStartModeAction.toObject(m.usernameChatStartMode, o); + if (o.oneofs) + d._usernameChatStartMode = "usernameChatStartMode"; } if (m.notificationActivitySettingAction != null && m.hasOwnProperty("notificationActivitySettingAction")) { d.notificationActivitySettingAction = $root.proto.SyncActionValue.NotificationActivitySettingAction.toObject(m.notificationActivitySettingAction, o); + if (o.oneofs) + d._notificationActivitySettingAction = "notificationActivitySettingAction"; } if (m.lidContactAction != null && m.hasOwnProperty("lidContactAction")) { d.lidContactAction = $root.proto.SyncActionValue.LidContactAction.toObject(m.lidContactAction, o); + if (o.oneofs) + d._lidContactAction = "lidContactAction"; } if (m.ctwaPerCustomerDataSharingAction != null && m.hasOwnProperty("ctwaPerCustomerDataSharingAction")) { d.ctwaPerCustomerDataSharingAction = $root.proto.SyncActionValue.CtwaPerCustomerDataSharingAction.toObject(m.ctwaPerCustomerDataSharingAction, o); + if (o.oneofs) + d._ctwaPerCustomerDataSharingAction = "ctwaPerCustomerDataSharingAction"; } if (m.paymentTosAction != null && m.hasOwnProperty("paymentTosAction")) { d.paymentTosAction = $root.proto.SyncActionValue.PaymentTosAction.toObject(m.paymentTosAction, o); + if (o.oneofs) + d._paymentTosAction = "paymentTosAction"; } if (m.privacySettingChannelsPersonalisedRecommendationAction != null && m.hasOwnProperty("privacySettingChannelsPersonalisedRecommendationAction")) { d.privacySettingChannelsPersonalisedRecommendationAction = $root.proto.SyncActionValue.PrivacySettingChannelsPersonalisedRecommendationAction.toObject(m.privacySettingChannelsPersonalisedRecommendationAction, o); + if (o.oneofs) + d._privacySettingChannelsPersonalisedRecommendationAction = "privacySettingChannelsPersonalisedRecommendationAction"; } if (m.detectedOutcomesStatusAction != null && m.hasOwnProperty("detectedOutcomesStatusAction")) { d.detectedOutcomesStatusAction = $root.proto.SyncActionValue.DetectedOutcomesStatusAction.toObject(m.detectedOutcomesStatusAction, o); + if (o.oneofs) + d._detectedOutcomesStatusAction = "detectedOutcomesStatusAction"; } if (m.maibaAiFeaturesControlAction != null && m.hasOwnProperty("maibaAiFeaturesControlAction")) { d.maibaAiFeaturesControlAction = $root.proto.SyncActionValue.MaibaAIFeaturesControlAction.toObject(m.maibaAiFeaturesControlAction, o); + if (o.oneofs) + d._maibaAiFeaturesControlAction = "maibaAiFeaturesControlAction"; } if (m.businessBroadcastListAction != null && m.hasOwnProperty("businessBroadcastListAction")) { d.businessBroadcastListAction = $root.proto.SyncActionValue.BusinessBroadcastListAction.toObject(m.businessBroadcastListAction, o); + if (o.oneofs) + d._businessBroadcastListAction = "businessBroadcastListAction"; } if (m.musicUserIdAction != null && m.hasOwnProperty("musicUserIdAction")) { d.musicUserIdAction = $root.proto.SyncActionValue.MusicUserIdAction.toObject(m.musicUserIdAction, o); + if (o.oneofs) + d._musicUserIdAction = "musicUserIdAction"; } if (m.statusPostOptInNotificationPreferencesAction != null && m.hasOwnProperty("statusPostOptInNotificationPreferencesAction")) { d.statusPostOptInNotificationPreferencesAction = $root.proto.SyncActionValue.StatusPostOptInNotificationPreferencesAction.toObject(m.statusPostOptInNotificationPreferencesAction, o); + if (o.oneofs) + d._statusPostOptInNotificationPreferencesAction = "statusPostOptInNotificationPreferencesAction"; } if (m.avatarUpdatedAction != null && m.hasOwnProperty("avatarUpdatedAction")) { d.avatarUpdatedAction = $root.proto.SyncActionValue.AvatarUpdatedAction.toObject(m.avatarUpdatedAction, o); + if (o.oneofs) + d._avatarUpdatedAction = "avatarUpdatedAction"; } if (m.privateProcessingSettingAction != null && m.hasOwnProperty("privateProcessingSettingAction")) { d.privateProcessingSettingAction = $root.proto.SyncActionValue.PrivateProcessingSettingAction.toObject(m.privateProcessingSettingAction, o); + if (o.oneofs) + d._privateProcessingSettingAction = "privateProcessingSettingAction"; } if (m.newsletterSavedInterestsAction != null && m.hasOwnProperty("newsletterSavedInterestsAction")) { d.newsletterSavedInterestsAction = $root.proto.SyncActionValue.NewsletterSavedInterestsAction.toObject(m.newsletterSavedInterestsAction, o); + if (o.oneofs) + d._newsletterSavedInterestsAction = "newsletterSavedInterestsAction"; } if (m.aiThreadRenameAction != null && m.hasOwnProperty("aiThreadRenameAction")) { d.aiThreadRenameAction = $root.proto.SyncActionValue.AiThreadRenameAction.toObject(m.aiThreadRenameAction, o); + if (o.oneofs) + d._aiThreadRenameAction = "aiThreadRenameAction"; } if (m.interactiveMessageAction != null && m.hasOwnProperty("interactiveMessageAction")) { d.interactiveMessageAction = $root.proto.SyncActionValue.InteractiveMessageAction.toObject(m.interactiveMessageAction, o); + if (o.oneofs) + d._interactiveMessageAction = "interactiveMessageAction"; } if (m.settingsSyncAction != null && m.hasOwnProperty("settingsSyncAction")) { d.settingsSyncAction = $root.proto.SyncActionValue.SettingsSyncAction.toObject(m.settingsSyncAction, o); + if (o.oneofs) + d._settingsSyncAction = "settingsSyncAction"; } return d; }; @@ -71499,9 +83474,29 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - AgentAction.prototype.name = ""; - AgentAction.prototype.deviceID = 0; - AgentAction.prototype.isDeleted = false; + AgentAction.prototype.name = null; + AgentAction.prototype.deviceID = null; + AgentAction.prototype.isDeleted = null; + + let $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) + }); AgentAction.create = function create(properties) { return new AgentAction(properties); @@ -71568,19 +83563,20 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.name = ""; - d.deviceID = 0; - d.isDeleted = false; - } if (m.name != null && m.hasOwnProperty("name")) { d.name = m.name; + if (o.oneofs) + d._name = "name"; } if (m.deviceID != null && m.hasOwnProperty("deviceID")) { d.deviceID = m.deviceID; + if (o.oneofs) + d._deviceID = "deviceID"; } if (m.isDeleted != null && m.hasOwnProperty("isDeleted")) { d.isDeleted = m.isDeleted; + if (o.oneofs) + d._isDeleted = "isDeleted"; } return d; }; @@ -71608,7 +83604,15 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - AiThreadRenameAction.prototype.newTitle = ""; + AiThreadRenameAction.prototype.newTitle = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AiThreadRenameAction.prototype, "_newTitle", { + get: $util.oneOfGetter($oneOfFields = ["newTitle"]), + set: $util.oneOfSetter($oneOfFields) + }); AiThreadRenameAction.create = function create(properties) { return new AiThreadRenameAction(properties); @@ -71657,11 +83661,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.newTitle = ""; - } if (m.newTitle != null && m.hasOwnProperty("newTitle")) { d.newTitle = m.newTitle; + if (o.oneofs) + d._newTitle = "newTitle"; } return d; }; @@ -71689,7 +83692,15 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - AndroidUnsupportedActions.prototype.allowed = false; + AndroidUnsupportedActions.prototype.allowed = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AndroidUnsupportedActions.prototype, "_allowed", { + get: $util.oneOfGetter($oneOfFields = ["allowed"]), + set: $util.oneOfSetter($oneOfFields) + }); AndroidUnsupportedActions.create = function create(properties) { return new AndroidUnsupportedActions(properties); @@ -71738,11 +83749,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.allowed = false; - } if (m.allowed != null && m.hasOwnProperty("allowed")) { d.allowed = m.allowed; + if (o.oneofs) + d._allowed = "allowed"; } return d; }; @@ -71770,9 +83780,23 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - ArchiveChatAction.prototype.archived = false; + ArchiveChatAction.prototype.archived = null; ArchiveChatAction.prototype.messageRange = null; + let $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) + }); + ArchiveChatAction.create = function create(properties) { return new ArchiveChatAction(properties); }; @@ -71831,15 +83855,15 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.archived = false; - d.messageRange = null; - } if (m.archived != null && m.hasOwnProperty("archived")) { d.archived = m.archived; + if (o.oneofs) + d._archived = "archived"; } if (m.messageRange != null && m.hasOwnProperty("messageRange")) { d.messageRange = $root.proto.SyncActionValue.SyncActionMessageRange.toObject(m.messageRange, o); + if (o.oneofs) + d._messageRange = "messageRange"; } return d; }; @@ -71868,9 +83892,17 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - AvatarUpdatedAction.prototype.eventType = 0; + AvatarUpdatedAction.prototype.eventType = null; AvatarUpdatedAction.prototype.recentAvatarStickers = $util.emptyArray; + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AvatarUpdatedAction.prototype, "_eventType", { + get: $util.oneOfGetter($oneOfFields = ["eventType"]), + set: $util.oneOfSetter($oneOfFields) + }); + AvatarUpdatedAction.create = function create(properties) { return new AvatarUpdatedAction(properties); }; @@ -71958,11 +83990,10 @@ export const proto = $root.proto = (() => { if (o.arrays || o.defaults) { d.recentAvatarStickers = []; } - if (o.defaults) { - d.eventType = o.enums === String ? "UPDATED" : 0; - } if (m.eventType != null && m.hasOwnProperty("eventType")) { d.eventType = o.enums === String ? $root.proto.SyncActionValue.AvatarUpdatedAction.AvatarEventType[m.eventType] === undefined ? m.eventType : $root.proto.SyncActionValue.AvatarUpdatedAction.AvatarEventType[m.eventType] : m.eventType; + if (o.oneofs) + d._eventType = "eventType"; } if (m.recentAvatarStickers && m.recentAvatarStickers.length) { d.recentAvatarStickers = []; @@ -72004,7 +84035,15 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - BotWelcomeRequestAction.prototype.isSent = false; + BotWelcomeRequestAction.prototype.isSent = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BotWelcomeRequestAction.prototype, "_isSent", { + get: $util.oneOfGetter($oneOfFields = ["isSent"]), + set: $util.oneOfSetter($oneOfFields) + }); BotWelcomeRequestAction.create = function create(properties) { return new BotWelcomeRequestAction(properties); @@ -72053,11 +84092,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.isSent = false; - } if (m.isSent != null && m.hasOwnProperty("isSent")) { d.isSent = m.isSent; + if (o.oneofs) + d._isSent = "isSent"; } return d; }; @@ -72085,8 +84123,22 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - BroadcastListParticipant.prototype.lidJid = ""; - BroadcastListParticipant.prototype.pnJid = ""; + BroadcastListParticipant.prototype.lidJid = null; + BroadcastListParticipant.prototype.pnJid = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BroadcastListParticipant.prototype, "_lidJid", { + get: $util.oneOfGetter($oneOfFields = ["lidJid"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BroadcastListParticipant.prototype, "_pnJid", { + get: $util.oneOfGetter($oneOfFields = ["pnJid"]), + set: $util.oneOfSetter($oneOfFields) + }); BroadcastListParticipant.create = function create(properties) { return new BroadcastListParticipant(properties); @@ -72095,7 +84147,8 @@ export const proto = $root.proto = (() => { BroadcastListParticipant.encode = function encode(m, w) { if (!w) w = $Writer.create(); - w.uint32(10).string(m.lidJid); + if (m.lidJid != null && Object.hasOwnProperty.call(m, "lidJid")) + w.uint32(10).string(m.lidJid); if (m.pnJid != null && Object.hasOwnProperty.call(m, "pnJid")) w.uint32(18).string(m.pnJid); return w; @@ -72123,8 +84176,6 @@ export const proto = $root.proto = (() => { break; } } - if (!m.hasOwnProperty("lidJid")) - throw $util.ProtocolError("missing required 'lidJid'", { instance: m }); return m; }; @@ -72145,15 +84196,15 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.lidJid = ""; - d.pnJid = ""; - } if (m.lidJid != null && m.hasOwnProperty("lidJid")) { d.lidJid = m.lidJid; + if (o.oneofs) + d._lidJid = "lidJid"; } if (m.pnJid != null && m.hasOwnProperty("pnJid")) { d.pnJid = m.pnJid; + if (o.oneofs) + d._pnJid = "pnJid"; } return d; }; @@ -72181,7 +84232,15 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - BusinessBroadcastAssociationAction.prototype.deleted = false; + BusinessBroadcastAssociationAction.prototype.deleted = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BusinessBroadcastAssociationAction.prototype, "_deleted", { + get: $util.oneOfGetter($oneOfFields = ["deleted"]), + set: $util.oneOfSetter($oneOfFields) + }); BusinessBroadcastAssociationAction.create = function create(properties) { return new BusinessBroadcastAssociationAction(properties); @@ -72230,11 +84289,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.deleted = false; - } if (m.deleted != null && m.hasOwnProperty("deleted")) { d.deleted = m.deleted; + if (o.oneofs) + d._deleted = "deleted"; } return d; }; @@ -72264,11 +84322,25 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - BusinessBroadcastListAction.prototype.deleted = false; + BusinessBroadcastListAction.prototype.deleted = null; BusinessBroadcastListAction.prototype.participants = $util.emptyArray; - BusinessBroadcastListAction.prototype.listName = ""; + BusinessBroadcastListAction.prototype.listName = null; BusinessBroadcastListAction.prototype.labelIds = $util.emptyArray; + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BusinessBroadcastListAction.prototype, "_deleted", { + get: $util.oneOfGetter($oneOfFields = ["deleted"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(BusinessBroadcastListAction.prototype, "_listName", { + get: $util.oneOfGetter($oneOfFields = ["listName"]), + set: $util.oneOfSetter($oneOfFields) + }); + BusinessBroadcastListAction.create = function create(properties) { return new BusinessBroadcastListAction(properties); }; @@ -72367,12 +84439,10 @@ export const proto = $root.proto = (() => { d.participants = []; d.labelIds = []; } - if (o.defaults) { - d.deleted = false; - d.listName = ""; - } if (m.deleted != null && m.hasOwnProperty("deleted")) { d.deleted = m.deleted; + if (o.oneofs) + d._deleted = "deleted"; } if (m.participants && m.participants.length) { d.participants = []; @@ -72382,6 +84452,8 @@ export const proto = $root.proto = (() => { } if (m.listName != null && m.hasOwnProperty("listName")) { d.listName = m.listName; + if (o.oneofs) + d._listName = "listName"; } if (m.labelIds && m.labelIds.length) { d.labelIds = []; @@ -72417,6 +84489,14 @@ export const proto = $root.proto = (() => { CallLogAction.prototype.callLogRecord = null; + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CallLogAction.prototype, "_callLogRecord", { + get: $util.oneOfGetter($oneOfFields = ["callLogRecord"]), + set: $util.oneOfSetter($oneOfFields) + }); + CallLogAction.create = function create(properties) { return new CallLogAction(properties); }; @@ -72466,11 +84546,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.callLogRecord = null; - } if (m.callLogRecord != null && m.hasOwnProperty("callLogRecord")) { d.callLogRecord = $root.proto.CallLogRecord.toObject(m.callLogRecord, o); + if (o.oneofs) + d._callLogRecord = "callLogRecord"; } return d; }; @@ -72498,7 +84577,15 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - ChatAssignmentAction.prototype.deviceAgentID = ""; + ChatAssignmentAction.prototype.deviceAgentID = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ChatAssignmentAction.prototype, "_deviceAgentID", { + get: $util.oneOfGetter($oneOfFields = ["deviceAgentID"]), + set: $util.oneOfSetter($oneOfFields) + }); ChatAssignmentAction.create = function create(properties) { return new ChatAssignmentAction(properties); @@ -72547,11 +84634,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.deviceAgentID = ""; - } if (m.deviceAgentID != null && m.hasOwnProperty("deviceAgentID")) { d.deviceAgentID = m.deviceAgentID; + if (o.oneofs) + d._deviceAgentID = "deviceAgentID"; } return d; }; @@ -72579,7 +84665,15 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - ChatAssignmentOpenedStatusAction.prototype.chatOpened = false; + ChatAssignmentOpenedStatusAction.prototype.chatOpened = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ChatAssignmentOpenedStatusAction.prototype, "_chatOpened", { + get: $util.oneOfGetter($oneOfFields = ["chatOpened"]), + set: $util.oneOfSetter($oneOfFields) + }); ChatAssignmentOpenedStatusAction.create = function create(properties) { return new ChatAssignmentOpenedStatusAction(properties); @@ -72628,11 +84722,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.chatOpened = false; - } if (m.chatOpened != null && m.hasOwnProperty("chatOpened")) { d.chatOpened = m.chatOpened; + if (o.oneofs) + d._chatOpened = "chatOpened"; } return d; }; @@ -72662,6 +84755,14 @@ export const proto = $root.proto = (() => { ClearChatAction.prototype.messageRange = null; + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ClearChatAction.prototype, "_messageRange", { + get: $util.oneOfGetter($oneOfFields = ["messageRange"]), + set: $util.oneOfSetter($oneOfFields) + }); + ClearChatAction.create = function create(properties) { return new ClearChatAction(properties); }; @@ -72711,11 +84812,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.messageRange = null; - } if (m.messageRange != null && m.hasOwnProperty("messageRange")) { d.messageRange = $root.proto.SyncActionValue.SyncActionMessageRange.toObject(m.messageRange, o); + if (o.oneofs) + d._messageRange = "messageRange"; } return d; }; @@ -72743,12 +84843,50 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - ContactAction.prototype.fullName = ""; - ContactAction.prototype.firstName = ""; - ContactAction.prototype.lidJid = ""; - ContactAction.prototype.saveOnPrimaryAddressbook = false; - ContactAction.prototype.pnJid = ""; - ContactAction.prototype.username = ""; + ContactAction.prototype.fullName = null; + ContactAction.prototype.firstName = null; + ContactAction.prototype.lidJid = null; + ContactAction.prototype.saveOnPrimaryAddressbook = null; + ContactAction.prototype.pnJid = null; + ContactAction.prototype.username = null; + + let $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) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ContactAction.prototype, "_pnJid", { + get: $util.oneOfGetter($oneOfFields = ["pnJid"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ContactAction.prototype, "_username", { + get: $util.oneOfGetter($oneOfFields = ["username"]), + set: $util.oneOfSetter($oneOfFields) + }); ContactAction.create = function create(properties) { return new ContactAction(properties); @@ -72842,31 +84980,35 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.fullName = ""; - d.firstName = ""; - d.lidJid = ""; - d.saveOnPrimaryAddressbook = false; - d.pnJid = ""; - d.username = ""; - } if (m.fullName != null && m.hasOwnProperty("fullName")) { d.fullName = m.fullName; + if (o.oneofs) + d._fullName = "fullName"; } if (m.firstName != null && m.hasOwnProperty("firstName")) { d.firstName = m.firstName; + if (o.oneofs) + d._firstName = "firstName"; } if (m.lidJid != null && m.hasOwnProperty("lidJid")) { d.lidJid = m.lidJid; + if (o.oneofs) + d._lidJid = "lidJid"; } if (m.saveOnPrimaryAddressbook != null && m.hasOwnProperty("saveOnPrimaryAddressbook")) { d.saveOnPrimaryAddressbook = m.saveOnPrimaryAddressbook; + if (o.oneofs) + d._saveOnPrimaryAddressbook = "saveOnPrimaryAddressbook"; } if (m.pnJid != null && m.hasOwnProperty("pnJid")) { d.pnJid = m.pnJid; + if (o.oneofs) + d._pnJid = "pnJid"; } if (m.username != null && m.hasOwnProperty("username")) { d.username = m.username; + if (o.oneofs) + d._username = "username"; } return d; }; @@ -72894,7 +85036,15 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - CtwaPerCustomerDataSharingAction.prototype.isCtwaPerCustomerDataSharingEnabled = false; + CtwaPerCustomerDataSharingAction.prototype.isCtwaPerCustomerDataSharingEnabled = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CtwaPerCustomerDataSharingAction.prototype, "_isCtwaPerCustomerDataSharingEnabled", { + get: $util.oneOfGetter($oneOfFields = ["isCtwaPerCustomerDataSharingEnabled"]), + set: $util.oneOfSetter($oneOfFields) + }); CtwaPerCustomerDataSharingAction.create = function create(properties) { return new CtwaPerCustomerDataSharingAction(properties); @@ -72943,11 +85093,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.isCtwaPerCustomerDataSharingEnabled = false; - } if (m.isCtwaPerCustomerDataSharingEnabled != null && m.hasOwnProperty("isCtwaPerCustomerDataSharingEnabled")) { d.isCtwaPerCustomerDataSharingEnabled = m.isCtwaPerCustomerDataSharingEnabled; + if (o.oneofs) + d._isCtwaPerCustomerDataSharingEnabled = "isCtwaPerCustomerDataSharingEnabled"; } return d; }; @@ -72976,11 +85125,31 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - CustomPaymentMethod.prototype.credentialId = ""; - CustomPaymentMethod.prototype.country = ""; - CustomPaymentMethod.prototype.type = ""; + CustomPaymentMethod.prototype.credentialId = null; + CustomPaymentMethod.prototype.country = null; + CustomPaymentMethod.prototype.type = null; CustomPaymentMethod.prototype.metadata = $util.emptyArray; + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CustomPaymentMethod.prototype, "_credentialId", { + get: $util.oneOfGetter($oneOfFields = ["credentialId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CustomPaymentMethod.prototype, "_country", { + get: $util.oneOfGetter($oneOfFields = ["country"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CustomPaymentMethod.prototype, "_type", { + get: $util.oneOfGetter($oneOfFields = ["type"]), + set: $util.oneOfSetter($oneOfFields) + }); + CustomPaymentMethod.create = function create(properties) { return new CustomPaymentMethod(properties); }; @@ -72988,9 +85157,12 @@ export const proto = $root.proto = (() => { CustomPaymentMethod.encode = function encode(m, w) { if (!w) w = $Writer.create(); - w.uint32(10).string(m.credentialId); - w.uint32(18).string(m.country); - w.uint32(26).string(m.type); + if (m.credentialId != null && Object.hasOwnProperty.call(m, "credentialId")) + w.uint32(10).string(m.credentialId); + if (m.country != null && Object.hasOwnProperty.call(m, "country")) + w.uint32(18).string(m.country); + if (m.type != null && Object.hasOwnProperty.call(m, "type")) + w.uint32(26).string(m.type); if (m.metadata != null && m.metadata.length) { for (var i = 0; i < m.metadata.length; ++i) $root.proto.SyncActionValue.CustomPaymentMethodMetadata.encode(m.metadata[i], w.uint32(34).fork()).ldelim(); @@ -73030,12 +85202,6 @@ export const proto = $root.proto = (() => { break; } } - if (!m.hasOwnProperty("credentialId")) - throw $util.ProtocolError("missing required 'credentialId'", { instance: m }); - if (!m.hasOwnProperty("country")) - throw $util.ProtocolError("missing required 'country'", { instance: m }); - if (!m.hasOwnProperty("type")) - throw $util.ProtocolError("missing required 'type'", { instance: m }); return m; }; @@ -73072,19 +85238,20 @@ export const proto = $root.proto = (() => { if (o.arrays || o.defaults) { d.metadata = []; } - if (o.defaults) { - d.credentialId = ""; - d.country = ""; - d.type = ""; - } if (m.credentialId != null && m.hasOwnProperty("credentialId")) { d.credentialId = m.credentialId; + if (o.oneofs) + d._credentialId = "credentialId"; } if (m.country != null && m.hasOwnProperty("country")) { d.country = m.country; + if (o.oneofs) + d._country = "country"; } if (m.type != null && m.hasOwnProperty("type")) { d.type = m.type; + if (o.oneofs) + d._type = "type"; } if (m.metadata && m.metadata.length) { d.metadata = []; @@ -73118,8 +85285,22 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - CustomPaymentMethodMetadata.prototype.key = ""; - CustomPaymentMethodMetadata.prototype.value = ""; + CustomPaymentMethodMetadata.prototype.key = null; + CustomPaymentMethodMetadata.prototype.value = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CustomPaymentMethodMetadata.prototype, "_key", { + get: $util.oneOfGetter($oneOfFields = ["key"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CustomPaymentMethodMetadata.prototype, "_value", { + get: $util.oneOfGetter($oneOfFields = ["value"]), + set: $util.oneOfSetter($oneOfFields) + }); CustomPaymentMethodMetadata.create = function create(properties) { return new CustomPaymentMethodMetadata(properties); @@ -73128,8 +85309,10 @@ export const proto = $root.proto = (() => { CustomPaymentMethodMetadata.encode = function encode(m, w) { if (!w) w = $Writer.create(); - w.uint32(10).string(m.key); - w.uint32(18).string(m.value); + if (m.key != null && Object.hasOwnProperty.call(m, "key")) + w.uint32(10).string(m.key); + if (m.value != null && Object.hasOwnProperty.call(m, "value")) + w.uint32(18).string(m.value); return w; }; @@ -73155,10 +85338,6 @@ export const proto = $root.proto = (() => { break; } } - if (!m.hasOwnProperty("key")) - throw $util.ProtocolError("missing required 'key'", { instance: m }); - if (!m.hasOwnProperty("value")) - throw $util.ProtocolError("missing required 'value'", { instance: m }); return m; }; @@ -73179,15 +85358,15 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.key = ""; - d.value = ""; - } if (m.key != null && m.hasOwnProperty("key")) { d.key = m.key; + if (o.oneofs) + d._key = "key"; } if (m.value != null && m.hasOwnProperty("value")) { d.value = m.value; + if (o.oneofs) + d._value = "value"; } return d; }; @@ -73313,6 +85492,14 @@ export const proto = $root.proto = (() => { DeleteChatAction.prototype.messageRange = null; + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DeleteChatAction.prototype, "_messageRange", { + get: $util.oneOfGetter($oneOfFields = ["messageRange"]), + set: $util.oneOfSetter($oneOfFields) + }); + DeleteChatAction.create = function create(properties) { return new DeleteChatAction(properties); }; @@ -73362,11 +85549,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.messageRange = null; - } if (m.messageRange != null && m.hasOwnProperty("messageRange")) { d.messageRange = $root.proto.SyncActionValue.SyncActionMessageRange.toObject(m.messageRange, o); + if (o.oneofs) + d._messageRange = "messageRange"; } return d; }; @@ -73394,8 +85580,22 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - DeleteIndividualCallLogAction.prototype.peerJid = ""; - DeleteIndividualCallLogAction.prototype.isIncoming = false; + DeleteIndividualCallLogAction.prototype.peerJid = null; + DeleteIndividualCallLogAction.prototype.isIncoming = null; + + let $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) + }); DeleteIndividualCallLogAction.create = function create(properties) { return new DeleteIndividualCallLogAction(properties); @@ -73453,15 +85653,15 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.peerJid = ""; - d.isIncoming = false; - } if (m.peerJid != null && m.hasOwnProperty("peerJid")) { d.peerJid = m.peerJid; + if (o.oneofs) + d._peerJid = "peerJid"; } if (m.isIncoming != null && m.hasOwnProperty("isIncoming")) { d.isIncoming = m.isIncoming; + if (o.oneofs) + d._isIncoming = "isIncoming"; } return d; }; @@ -73489,8 +85689,22 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - DeleteMessageForMeAction.prototype.deleteMedia = false; - DeleteMessageForMeAction.prototype.messageTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + DeleteMessageForMeAction.prototype.deleteMedia = null; + DeleteMessageForMeAction.prototype.messageTimestamp = null; + + let $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) + }); DeleteMessageForMeAction.create = function create(properties) { return new DeleteMessageForMeAction(properties); @@ -73555,22 +85769,18 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.deleteMedia = false; - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.messageTimestamp = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.messageTimestamp = o.longs === String ? "0" : 0; - } if (m.deleteMedia != null && m.hasOwnProperty("deleteMedia")) { d.deleteMedia = m.deleteMedia; + if (o.oneofs) + d._deleteMedia = "deleteMedia"; } if (m.messageTimestamp != null && m.hasOwnProperty("messageTimestamp")) { if (typeof m.messageTimestamp === "number") d.messageTimestamp = o.longs === String ? String(m.messageTimestamp) : m.messageTimestamp; else d.messageTimestamp = o.longs === String ? longToString(m.messageTimestamp) : o.longs === Number ? longToNumber(m.messageTimestamp) : m.messageTimestamp; + if (o.oneofs) + d._messageTimestamp = "messageTimestamp"; } return d; }; @@ -73598,7 +85808,15 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - DetectedOutcomesStatusAction.prototype.isEnabled = false; + DetectedOutcomesStatusAction.prototype.isEnabled = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DetectedOutcomesStatusAction.prototype, "_isEnabled", { + get: $util.oneOfGetter($oneOfFields = ["isEnabled"]), + set: $util.oneOfSetter($oneOfFields) + }); DetectedOutcomesStatusAction.create = function create(properties) { return new DetectedOutcomesStatusAction(properties); @@ -73647,11 +85865,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.isEnabled = false; - } if (m.isEnabled != null && m.hasOwnProperty("isEnabled")) { d.isEnabled = m.isEnabled; + if (o.oneofs) + d._isEnabled = "isEnabled"; } return d; }; @@ -73679,7 +85896,15 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - ExternalWebBetaAction.prototype.isOptIn = false; + ExternalWebBetaAction.prototype.isOptIn = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ExternalWebBetaAction.prototype, "_isOptIn", { + get: $util.oneOfGetter($oneOfFields = ["isOptIn"]), + set: $util.oneOfSetter($oneOfFields) + }); ExternalWebBetaAction.create = function create(properties) { return new ExternalWebBetaAction(properties); @@ -73728,11 +85953,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.isOptIn = false; - } if (m.isOptIn != null && m.hasOwnProperty("isOptIn")) { d.isOptIn = m.isOptIn; + if (o.oneofs) + d._isOptIn = "isOptIn"; } return d; }; @@ -73853,7 +86077,15 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - Favorite.prototype.id = ""; + Favorite.prototype.id = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Favorite.prototype, "_id", { + get: $util.oneOfGetter($oneOfFields = ["id"]), + set: $util.oneOfSetter($oneOfFields) + }); Favorite.create = function create(properties) { return new Favorite(properties); @@ -73902,11 +86134,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.id = ""; - } if (m.id != null && m.hasOwnProperty("id")) { d.id = m.id; + if (o.oneofs) + d._id = "id"; } return d; }; @@ -73937,7 +86168,15 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - InteractiveMessageAction.prototype.type = 1; + InteractiveMessageAction.prototype.type = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(InteractiveMessageAction.prototype, "_type", { + get: $util.oneOfGetter($oneOfFields = ["type"]), + set: $util.oneOfSetter($oneOfFields) + }); InteractiveMessageAction.create = function create(properties) { return new InteractiveMessageAction(properties); @@ -73946,7 +86185,8 @@ export const proto = $root.proto = (() => { InteractiveMessageAction.encode = function encode(m, w) { if (!w) w = $Writer.create(); - w.uint32(8).int32(m.type); + if (m.type != null && Object.hasOwnProperty.call(m, "type")) + w.uint32(8).int32(m.type); return w; }; @@ -73968,8 +86208,6 @@ export const proto = $root.proto = (() => { break; } } - if (!m.hasOwnProperty("type")) - throw $util.ProtocolError("missing required 'type'", { instance: m }); return m; }; @@ -73996,11 +86234,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.type = o.enums === String ? "DISABLE_CTA" : 1; - } if (m.type != null && m.hasOwnProperty("type")) { d.type = o.enums === String ? $root.proto.SyncActionValue.InteractiveMessageAction.InteractiveMessageActionMode[m.type] === undefined ? m.type : $root.proto.SyncActionValue.InteractiveMessageAction.InteractiveMessageActionMode[m.type] : m.type; + if (o.oneofs) + d._type = "type"; } return d; }; @@ -74034,7 +86271,15 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - KeyExpiration.prototype.expiredKeyEpoch = 0; + KeyExpiration.prototype.expiredKeyEpoch = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(KeyExpiration.prototype, "_expiredKeyEpoch", { + get: $util.oneOfGetter($oneOfFields = ["expiredKeyEpoch"]), + set: $util.oneOfSetter($oneOfFields) + }); KeyExpiration.create = function create(properties) { return new KeyExpiration(properties); @@ -74083,11 +86328,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.expiredKeyEpoch = 0; - } if (m.expiredKeyEpoch != null && m.hasOwnProperty("expiredKeyEpoch")) { d.expiredKeyEpoch = m.expiredKeyEpoch; + if (o.oneofs) + d._expiredKeyEpoch = "expiredKeyEpoch"; } return d; }; @@ -74115,7 +86359,15 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - LabelAssociationAction.prototype.labeled = false; + LabelAssociationAction.prototype.labeled = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(LabelAssociationAction.prototype, "_labeled", { + get: $util.oneOfGetter($oneOfFields = ["labeled"]), + set: $util.oneOfSetter($oneOfFields) + }); LabelAssociationAction.create = function create(properties) { return new LabelAssociationAction(properties); @@ -74164,11 +86416,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.labeled = false; - } if (m.labeled != null && m.hasOwnProperty("labeled")) { d.labeled = m.labeled; + if (o.oneofs) + d._labeled = "labeled"; } return d; }; @@ -74196,15 +86447,71 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - LabelEditAction.prototype.name = ""; - LabelEditAction.prototype.color = 0; - LabelEditAction.prototype.predefinedId = 0; - LabelEditAction.prototype.deleted = false; - LabelEditAction.prototype.orderIndex = 0; - LabelEditAction.prototype.isActive = false; - LabelEditAction.prototype.type = 0; - LabelEditAction.prototype.isImmutable = false; - LabelEditAction.prototype.muteEndTimeMs = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + LabelEditAction.prototype.name = null; + LabelEditAction.prototype.color = null; + LabelEditAction.prototype.predefinedId = null; + LabelEditAction.prototype.deleted = null; + LabelEditAction.prototype.orderIndex = null; + LabelEditAction.prototype.isActive = null; + LabelEditAction.prototype.type = null; + LabelEditAction.prototype.isImmutable = null; + LabelEditAction.prototype.muteEndTimeMs = null; + + let $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) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(LabelEditAction.prototype, "_isImmutable", { + get: $util.oneOfGetter($oneOfFields = ["isImmutable"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(LabelEditAction.prototype, "_muteEndTimeMs", { + get: $util.oneOfGetter($oneOfFields = ["muteEndTimeMs"]), + set: $util.oneOfSetter($oneOfFields) + }); LabelEditAction.create = function create(properties) { return new LabelEditAction(properties); @@ -74377,50 +86684,53 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.name = ""; - d.color = 0; - d.predefinedId = 0; - d.deleted = false; - d.orderIndex = 0; - d.isActive = false; - d.type = o.enums === String ? "NONE" : 0; - d.isImmutable = false; - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.muteEndTimeMs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.muteEndTimeMs = o.longs === String ? "0" : 0; - } if (m.name != null && m.hasOwnProperty("name")) { d.name = m.name; + if (o.oneofs) + d._name = "name"; } if (m.color != null && m.hasOwnProperty("color")) { d.color = m.color; + if (o.oneofs) + d._color = "color"; } if (m.predefinedId != null && m.hasOwnProperty("predefinedId")) { d.predefinedId = m.predefinedId; + if (o.oneofs) + d._predefinedId = "predefinedId"; } if (m.deleted != null && m.hasOwnProperty("deleted")) { d.deleted = m.deleted; + if (o.oneofs) + d._deleted = "deleted"; } if (m.orderIndex != null && m.hasOwnProperty("orderIndex")) { d.orderIndex = m.orderIndex; + if (o.oneofs) + d._orderIndex = "orderIndex"; } if (m.isActive != null && m.hasOwnProperty("isActive")) { d.isActive = m.isActive; + if (o.oneofs) + d._isActive = "isActive"; } if (m.type != null && m.hasOwnProperty("type")) { d.type = o.enums === String ? $root.proto.SyncActionValue.LabelEditAction.ListType[m.type] === undefined ? m.type : $root.proto.SyncActionValue.LabelEditAction.ListType[m.type] : m.type; + if (o.oneofs) + d._type = "type"; } if (m.isImmutable != null && m.hasOwnProperty("isImmutable")) { d.isImmutable = m.isImmutable; + if (o.oneofs) + d._isImmutable = "isImmutable"; } if (m.muteEndTimeMs != null && m.hasOwnProperty("muteEndTimeMs")) { if (typeof m.muteEndTimeMs === "number") d.muteEndTimeMs = o.longs === String ? String(m.muteEndTimeMs) : m.muteEndTimeMs; else d.muteEndTimeMs = o.longs === String ? longToString(m.muteEndTimeMs) : o.longs === Number ? longToNumber(m.muteEndTimeMs) : m.muteEndTimeMs; + if (o.oneofs) + d._muteEndTimeMs = "muteEndTimeMs"; } return d; }; @@ -74474,8 +86784,10 @@ export const proto = $root.proto = (() => { if (!w) w = $Writer.create(); if (m.sortedLabelIds != null && m.sortedLabelIds.length) { + w.uint32(10).fork(); for (var i = 0; i < m.sortedLabelIds.length; ++i) - w.uint32(8).int32(m.sortedLabelIds[i]); + w.int32(m.sortedLabelIds[i]); + w.ldelim(); } return w; }; @@ -74562,9 +86874,29 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - LidContactAction.prototype.fullName = ""; - LidContactAction.prototype.firstName = ""; - LidContactAction.prototype.username = ""; + LidContactAction.prototype.fullName = null; + LidContactAction.prototype.firstName = null; + LidContactAction.prototype.username = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(LidContactAction.prototype, "_fullName", { + get: $util.oneOfGetter($oneOfFields = ["fullName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(LidContactAction.prototype, "_firstName", { + get: $util.oneOfGetter($oneOfFields = ["firstName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(LidContactAction.prototype, "_username", { + get: $util.oneOfGetter($oneOfFields = ["username"]), + set: $util.oneOfSetter($oneOfFields) + }); LidContactAction.create = function create(properties) { return new LidContactAction(properties); @@ -74631,19 +86963,20 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.fullName = ""; - d.firstName = ""; - d.username = ""; - } if (m.fullName != null && m.hasOwnProperty("fullName")) { d.fullName = m.fullName; + if (o.oneofs) + d._fullName = "fullName"; } if (m.firstName != null && m.hasOwnProperty("firstName")) { d.firstName = m.firstName; + if (o.oneofs) + d._firstName = "firstName"; } if (m.username != null && m.hasOwnProperty("username")) { d.username = m.username; + if (o.oneofs) + d._username = "username"; } return d; }; @@ -74671,7 +87004,15 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - LocaleSetting.prototype.locale = ""; + LocaleSetting.prototype.locale = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(LocaleSetting.prototype, "_locale", { + get: $util.oneOfGetter($oneOfFields = ["locale"]), + set: $util.oneOfSetter($oneOfFields) + }); LocaleSetting.create = function create(properties) { return new LocaleSetting(properties); @@ -74720,11 +87061,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.locale = ""; - } if (m.locale != null && m.hasOwnProperty("locale")) { d.locale = m.locale; + if (o.oneofs) + d._locale = "locale"; } return d; }; @@ -74752,7 +87092,15 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - LockChatAction.prototype.locked = false; + LockChatAction.prototype.locked = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(LockChatAction.prototype, "_locked", { + get: $util.oneOfGetter($oneOfFields = ["locked"]), + set: $util.oneOfSetter($oneOfFields) + }); LockChatAction.create = function create(properties) { return new LockChatAction(properties); @@ -74801,11 +87149,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.locked = false; - } if (m.locked != null && m.hasOwnProperty("locked")) { d.locked = m.locked; + if (o.oneofs) + d._locked = "locked"; } return d; }; @@ -74833,7 +87180,15 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - MaibaAIFeaturesControlAction.prototype.aiFeatureStatus = 0; + MaibaAIFeaturesControlAction.prototype.aiFeatureStatus = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MaibaAIFeaturesControlAction.prototype, "_aiFeatureStatus", { + get: $util.oneOfGetter($oneOfFields = ["aiFeatureStatus"]), + set: $util.oneOfSetter($oneOfFields) + }); MaibaAIFeaturesControlAction.create = function create(properties) { return new MaibaAIFeaturesControlAction(properties); @@ -74899,11 +87254,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.aiFeatureStatus = o.enums === String ? "ENABLED" : 0; - } if (m.aiFeatureStatus != null && m.hasOwnProperty("aiFeatureStatus")) { d.aiFeatureStatus = o.enums === String ? $root.proto.SyncActionValue.MaibaAIFeaturesControlAction.MaibaAIFeatureStatus[m.aiFeatureStatus] === undefined ? m.aiFeatureStatus : $root.proto.SyncActionValue.MaibaAIFeaturesControlAction.MaibaAIFeatureStatus[m.aiFeatureStatus] : m.aiFeatureStatus; + if (o.oneofs) + d._aiFeatureStatus = "aiFeatureStatus"; } return d; }; @@ -74939,9 +87293,23 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - MarkChatAsReadAction.prototype.read = false; + MarkChatAsReadAction.prototype.read = null; MarkChatAsReadAction.prototype.messageRange = null; + let $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) + }); + MarkChatAsReadAction.create = function create(properties) { return new MarkChatAsReadAction(properties); }; @@ -75000,15 +87368,15 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.read = false; - d.messageRange = null; - } if (m.read != null && m.hasOwnProperty("read")) { d.read = m.read; + if (o.oneofs) + d._read = "read"; } if (m.messageRange != null && m.hasOwnProperty("messageRange")) { d.messageRange = $root.proto.SyncActionValue.SyncActionMessageRange.toObject(m.messageRange, o); + if (o.oneofs) + d._messageRange = "messageRange"; } return d; }; @@ -75036,13 +87404,57 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - MarketingMessageAction.prototype.name = ""; - MarketingMessageAction.prototype.message = ""; - MarketingMessageAction.prototype.type = 0; - MarketingMessageAction.prototype.createdAt = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - MarketingMessageAction.prototype.lastSentAt = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - MarketingMessageAction.prototype.isDeleted = false; - MarketingMessageAction.prototype.mediaId = ""; + MarketingMessageAction.prototype.name = null; + MarketingMessageAction.prototype.message = null; + MarketingMessageAction.prototype.type = null; + MarketingMessageAction.prototype.createdAt = null; + MarketingMessageAction.prototype.lastSentAt = null; + MarketingMessageAction.prototype.isDeleted = null; + MarketingMessageAction.prototype.mediaId = null; + + let $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) + }); MarketingMessageAction.create = function create(properties) { return new MarketingMessageAction(properties); @@ -75168,49 +87580,46 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.name = ""; - d.message = ""; - d.type = o.enums === String ? "PERSONALIZED" : 0; - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.createdAt = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.createdAt = o.longs === String ? "0" : 0; - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.lastSentAt = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.lastSentAt = o.longs === String ? "0" : 0; - d.isDeleted = false; - d.mediaId = ""; - } if (m.name != null && m.hasOwnProperty("name")) { d.name = m.name; + if (o.oneofs) + d._name = "name"; } if (m.message != null && m.hasOwnProperty("message")) { d.message = m.message; + if (o.oneofs) + d._message = "message"; } if (m.type != null && m.hasOwnProperty("type")) { d.type = o.enums === String ? $root.proto.SyncActionValue.MarketingMessageAction.MarketingMessagePrototypeType[m.type] === undefined ? m.type : $root.proto.SyncActionValue.MarketingMessageAction.MarketingMessagePrototypeType[m.type] : m.type; + if (o.oneofs) + d._type = "type"; } if (m.createdAt != null && m.hasOwnProperty("createdAt")) { if (typeof m.createdAt === "number") d.createdAt = o.longs === String ? String(m.createdAt) : m.createdAt; else d.createdAt = o.longs === String ? longToString(m.createdAt) : o.longs === Number ? longToNumber(m.createdAt) : m.createdAt; + if (o.oneofs) + d._createdAt = "createdAt"; } if (m.lastSentAt != null && m.hasOwnProperty("lastSentAt")) { if (typeof m.lastSentAt === "number") d.lastSentAt = o.longs === String ? String(m.lastSentAt) : m.lastSentAt; else d.lastSentAt = o.longs === String ? longToString(m.lastSentAt) : o.longs === Number ? longToNumber(m.lastSentAt) : m.lastSentAt; + if (o.oneofs) + d._lastSentAt = "lastSentAt"; } if (m.isDeleted != null && m.hasOwnProperty("isDeleted")) { d.isDeleted = m.isDeleted; + if (o.oneofs) + d._isDeleted = "isDeleted"; } if (m.mediaId != null && m.hasOwnProperty("mediaId")) { d.mediaId = m.mediaId; + if (o.oneofs) + d._mediaId = "mediaId"; } return d; }; @@ -75244,7 +87653,15 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - MarketingMessageBroadcastAction.prototype.repliedCount = 0; + MarketingMessageBroadcastAction.prototype.repliedCount = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MarketingMessageBroadcastAction.prototype, "_repliedCount", { + get: $util.oneOfGetter($oneOfFields = ["repliedCount"]), + set: $util.oneOfSetter($oneOfFields) + }); MarketingMessageBroadcastAction.create = function create(properties) { return new MarketingMessageBroadcastAction(properties); @@ -75293,11 +87710,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.repliedCount = 0; - } if (m.repliedCount != null && m.hasOwnProperty("repliedCount")) { d.repliedCount = m.repliedCount; + if (o.oneofs) + d._repliedCount = "repliedCount"; } return d; }; @@ -75325,10 +87741,36 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - MerchantPaymentPartnerAction.prototype.status = 0; - MerchantPaymentPartnerAction.prototype.country = ""; - MerchantPaymentPartnerAction.prototype.gatewayName = ""; - MerchantPaymentPartnerAction.prototype.credentialId = ""; + MerchantPaymentPartnerAction.prototype.status = null; + MerchantPaymentPartnerAction.prototype.country = null; + MerchantPaymentPartnerAction.prototype.gatewayName = null; + MerchantPaymentPartnerAction.prototype.credentialId = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MerchantPaymentPartnerAction.prototype, "_status", { + get: $util.oneOfGetter($oneOfFields = ["status"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MerchantPaymentPartnerAction.prototype, "_country", { + get: $util.oneOfGetter($oneOfFields = ["country"]), + set: $util.oneOfSetter($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) + }); MerchantPaymentPartnerAction.create = function create(properties) { return new MerchantPaymentPartnerAction(properties); @@ -75337,8 +87779,10 @@ export const proto = $root.proto = (() => { MerchantPaymentPartnerAction.encode = function encode(m, w) { if (!w) w = $Writer.create(); - w.uint32(8).int32(m.status); - w.uint32(18).string(m.country); + if (m.status != null && Object.hasOwnProperty.call(m, "status")) + w.uint32(8).int32(m.status); + if (m.country != null && Object.hasOwnProperty.call(m, "country")) + w.uint32(18).string(m.country); if (m.gatewayName != null && Object.hasOwnProperty.call(m, "gatewayName")) w.uint32(26).string(m.gatewayName); if (m.credentialId != null && Object.hasOwnProperty.call(m, "credentialId")) @@ -75376,10 +87820,6 @@ export const proto = $root.proto = (() => { break; } } - if (!m.hasOwnProperty("status")) - throw $util.ProtocolError("missing required 'status'", { instance: m }); - if (!m.hasOwnProperty("country")) - throw $util.ProtocolError("missing required 'country'", { instance: m }); return m; }; @@ -75419,23 +87859,25 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.status = o.enums === String ? "ACTIVE" : 0; - d.country = ""; - d.gatewayName = ""; - d.credentialId = ""; - } if (m.status != null && m.hasOwnProperty("status")) { d.status = o.enums === String ? $root.proto.SyncActionValue.MerchantPaymentPartnerAction.Status[m.status] === undefined ? m.status : $root.proto.SyncActionValue.MerchantPaymentPartnerAction.Status[m.status] : m.status; + if (o.oneofs) + d._status = "status"; } if (m.country != null && m.hasOwnProperty("country")) { d.country = m.country; + if (o.oneofs) + d._country = "country"; } if (m.gatewayName != null && m.hasOwnProperty("gatewayName")) { d.gatewayName = m.gatewayName; + if (o.oneofs) + d._gatewayName = "gatewayName"; } if (m.credentialId != null && m.hasOwnProperty("credentialId")) { d.credentialId = m.credentialId; + if (o.oneofs) + d._credentialId = "credentialId"; } return d; }; @@ -75471,9 +87913,17 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - MusicUserIdAction.prototype.musicUserId = ""; + MusicUserIdAction.prototype.musicUserId = null; MusicUserIdAction.prototype.musicUserIdMap = $util.emptyObject; + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MusicUserIdAction.prototype, "_musicUserId", { + get: $util.oneOfGetter($oneOfFields = ["musicUserId"]), + set: $util.oneOfSetter($oneOfFields) + }); + MusicUserIdAction.create = function create(properties) { return new MusicUserIdAction(properties); }; @@ -75560,11 +88010,10 @@ export const proto = $root.proto = (() => { if (o.objects || o.defaults) { d.musicUserIdMap = {}; } - if (o.defaults) { - d.musicUserId = ""; - } if (m.musicUserId != null && m.hasOwnProperty("musicUserId")) { d.musicUserId = m.musicUserId; + if (o.oneofs) + d._musicUserId = "musicUserId"; } var ks2; if (m.musicUserIdMap && (ks2 = Object.keys(m.musicUserIdMap)).length) { @@ -75599,10 +88048,36 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - MuteAction.prototype.muted = false; - MuteAction.prototype.muteEndTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - MuteAction.prototype.autoMuted = false; - MuteAction.prototype.muteEveryoneMentionEndTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + MuteAction.prototype.muted = null; + MuteAction.prototype.muteEndTimestamp = null; + MuteAction.prototype.autoMuted = null; + MuteAction.prototype.muteEveryoneMentionEndTimestamp = null; + + let $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) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(MuteAction.prototype, "_muteEveryoneMentionEndTimestamp", { + get: $util.oneOfGetter($oneOfFields = ["muteEveryoneMentionEndTimestamp"]), + set: $util.oneOfSetter($oneOfFields) + }); MuteAction.create = function create(properties) { return new MuteAction(properties); @@ -75692,37 +88167,31 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.muted = false; - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.muteEndTimestamp = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.muteEndTimestamp = o.longs === String ? "0" : 0; - d.autoMuted = false; - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.muteEveryoneMentionEndTimestamp = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.muteEveryoneMentionEndTimestamp = o.longs === String ? "0" : 0; - } if (m.muted != null && m.hasOwnProperty("muted")) { d.muted = m.muted; + if (o.oneofs) + d._muted = "muted"; } if (m.muteEndTimestamp != null && m.hasOwnProperty("muteEndTimestamp")) { if (typeof m.muteEndTimestamp === "number") d.muteEndTimestamp = o.longs === String ? String(m.muteEndTimestamp) : m.muteEndTimestamp; else d.muteEndTimestamp = o.longs === String ? longToString(m.muteEndTimestamp) : o.longs === Number ? longToNumber(m.muteEndTimestamp) : m.muteEndTimestamp; + if (o.oneofs) + d._muteEndTimestamp = "muteEndTimestamp"; } if (m.autoMuted != null && m.hasOwnProperty("autoMuted")) { d.autoMuted = m.autoMuted; + if (o.oneofs) + d._autoMuted = "autoMuted"; } if (m.muteEveryoneMentionEndTimestamp != null && m.hasOwnProperty("muteEveryoneMentionEndTimestamp")) { if (typeof m.muteEveryoneMentionEndTimestamp === "number") d.muteEveryoneMentionEndTimestamp = o.longs === String ? String(m.muteEveryoneMentionEndTimestamp) : m.muteEveryoneMentionEndTimestamp; else d.muteEveryoneMentionEndTimestamp = o.longs === String ? longToString(m.muteEveryoneMentionEndTimestamp) : o.longs === Number ? longToNumber(m.muteEveryoneMentionEndTimestamp) : m.muteEveryoneMentionEndTimestamp; + if (o.oneofs) + d._muteEveryoneMentionEndTimestamp = "muteEveryoneMentionEndTimestamp"; } return d; }; @@ -75750,7 +88219,15 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - NewsletterSavedInterestsAction.prototype.newsletterSavedInterests = ""; + NewsletterSavedInterestsAction.prototype.newsletterSavedInterests = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(NewsletterSavedInterestsAction.prototype, "_newsletterSavedInterests", { + get: $util.oneOfGetter($oneOfFields = ["newsletterSavedInterests"]), + set: $util.oneOfSetter($oneOfFields) + }); NewsletterSavedInterestsAction.create = function create(properties) { return new NewsletterSavedInterestsAction(properties); @@ -75799,11 +88276,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.newsletterSavedInterests = ""; - } if (m.newsletterSavedInterests != null && m.hasOwnProperty("newsletterSavedInterests")) { d.newsletterSavedInterests = m.newsletterSavedInterests; + if (o.oneofs) + d._newsletterSavedInterests = "newsletterSavedInterests"; } return d; }; @@ -75831,11 +88307,43 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - NoteEditAction.prototype.type = 1; - NoteEditAction.prototype.chatJid = ""; - NoteEditAction.prototype.createdAt = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - NoteEditAction.prototype.deleted = false; - NoteEditAction.prototype.unstructuredContent = ""; + NoteEditAction.prototype.type = null; + NoteEditAction.prototype.chatJid = null; + NoteEditAction.prototype.createdAt = null; + NoteEditAction.prototype.deleted = null; + NoteEditAction.prototype.unstructuredContent = null; + + let $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) + }); NoteEditAction.create = function create(properties) { return new NoteEditAction(properties); @@ -75940,34 +88448,33 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.type = o.enums === String ? "UNSTRUCTURED" : 1; - d.chatJid = ""; - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.createdAt = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.createdAt = o.longs === String ? "0" : 0; - d.deleted = false; - d.unstructuredContent = ""; - } if (m.type != null && m.hasOwnProperty("type")) { d.type = o.enums === String ? $root.proto.SyncActionValue.NoteEditAction.NoteType[m.type] === undefined ? m.type : $root.proto.SyncActionValue.NoteEditAction.NoteType[m.type] : m.type; + if (o.oneofs) + d._type = "type"; } if (m.chatJid != null && m.hasOwnProperty("chatJid")) { d.chatJid = m.chatJid; + if (o.oneofs) + d._chatJid = "chatJid"; } if (m.createdAt != null && m.hasOwnProperty("createdAt")) { if (typeof m.createdAt === "number") d.createdAt = o.longs === String ? String(m.createdAt) : m.createdAt; else d.createdAt = o.longs === String ? longToString(m.createdAt) : o.longs === Number ? longToNumber(m.createdAt) : m.createdAt; + if (o.oneofs) + d._createdAt = "createdAt"; } if (m.deleted != null && m.hasOwnProperty("deleted")) { d.deleted = m.deleted; + if (o.oneofs) + d._deleted = "deleted"; } if (m.unstructuredContent != null && m.hasOwnProperty("unstructuredContent")) { d.unstructuredContent = m.unstructuredContent; + if (o.oneofs) + d._unstructuredContent = "unstructuredContent"; } return d; }; @@ -76002,7 +88509,15 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - NotificationActivitySettingAction.prototype.notificationActivitySetting = 0; + NotificationActivitySettingAction.prototype.notificationActivitySetting = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(NotificationActivitySettingAction.prototype, "_notificationActivitySetting", { + get: $util.oneOfGetter($oneOfFields = ["notificationActivitySetting"]), + set: $util.oneOfSetter($oneOfFields) + }); NotificationActivitySettingAction.create = function create(properties) { return new NotificationActivitySettingAction(properties); @@ -76072,11 +88587,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.notificationActivitySetting = o.enums === String ? "DEFAULT_ALL_MESSAGES" : 0; - } if (m.notificationActivitySetting != null && m.hasOwnProperty("notificationActivitySetting")) { d.notificationActivitySetting = o.enums === String ? $root.proto.SyncActionValue.NotificationActivitySettingAction.NotificationActivitySetting[m.notificationActivitySetting] === undefined ? m.notificationActivitySetting : $root.proto.SyncActionValue.NotificationActivitySettingAction.NotificationActivitySetting[m.notificationActivitySetting] : m.notificationActivitySetting; + if (o.oneofs) + d._notificationActivitySetting = "notificationActivitySetting"; } return d; }; @@ -76113,7 +88627,15 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - NuxAction.prototype.acknowledged = false; + NuxAction.prototype.acknowledged = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(NuxAction.prototype, "_acknowledged", { + get: $util.oneOfGetter($oneOfFields = ["acknowledged"]), + set: $util.oneOfSetter($oneOfFields) + }); NuxAction.create = function create(properties) { return new NuxAction(properties); @@ -76162,11 +88684,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.acknowledged = false; - } if (m.acknowledged != null && m.hasOwnProperty("acknowledged")) { d.acknowledged = m.acknowledged; + if (o.oneofs) + d._acknowledged = "acknowledged"; } return d; }; @@ -76194,7 +88715,15 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - PaymentInfoAction.prototype.cpi = ""; + PaymentInfoAction.prototype.cpi = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PaymentInfoAction.prototype, "_cpi", { + get: $util.oneOfGetter($oneOfFields = ["cpi"]), + set: $util.oneOfSetter($oneOfFields) + }); PaymentInfoAction.create = function create(properties) { return new PaymentInfoAction(properties); @@ -76243,11 +88772,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.cpi = ""; - } if (m.cpi != null && m.hasOwnProperty("cpi")) { d.cpi = m.cpi; + if (o.oneofs) + d._cpi = "cpi"; } return d; }; @@ -76275,8 +88803,22 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - PaymentTosAction.prototype.paymentNotice = 0; - PaymentTosAction.prototype.accepted = false; + PaymentTosAction.prototype.paymentNotice = null; + PaymentTosAction.prototype.accepted = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PaymentTosAction.prototype, "_paymentNotice", { + get: $util.oneOfGetter($oneOfFields = ["paymentNotice"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PaymentTosAction.prototype, "_accepted", { + get: $util.oneOfGetter($oneOfFields = ["accepted"]), + set: $util.oneOfSetter($oneOfFields) + }); PaymentTosAction.create = function create(properties) { return new PaymentTosAction(properties); @@ -76285,8 +88827,10 @@ export const proto = $root.proto = (() => { PaymentTosAction.encode = function encode(m, w) { if (!w) w = $Writer.create(); - w.uint32(8).int32(m.paymentNotice); - w.uint32(16).bool(m.accepted); + if (m.paymentNotice != null && Object.hasOwnProperty.call(m, "paymentNotice")) + w.uint32(8).int32(m.paymentNotice); + if (m.accepted != null && Object.hasOwnProperty.call(m, "accepted")) + w.uint32(16).bool(m.accepted); return w; }; @@ -76312,10 +88856,6 @@ export const proto = $root.proto = (() => { break; } } - if (!m.hasOwnProperty("paymentNotice")) - throw $util.ProtocolError("missing required 'paymentNotice'", { instance: m }); - if (!m.hasOwnProperty("accepted")) - throw $util.ProtocolError("missing required 'accepted'", { instance: m }); return m; }; @@ -76345,15 +88885,15 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.paymentNotice = o.enums === String ? "BR_PAY_PRIVACY_POLICY" : 0; - d.accepted = false; - } if (m.paymentNotice != null && m.hasOwnProperty("paymentNotice")) { d.paymentNotice = o.enums === String ? $root.proto.SyncActionValue.PaymentTosAction.PaymentNotice[m.paymentNotice] === undefined ? m.paymentNotice : $root.proto.SyncActionValue.PaymentTosAction.PaymentNotice[m.paymentNotice] : m.paymentNotice; + if (o.oneofs) + d._paymentNotice = "paymentNotice"; } if (m.accepted != null && m.hasOwnProperty("accepted")) { d.accepted = m.accepted; + if (o.oneofs) + d._accepted = "accepted"; } return d; }; @@ -76387,7 +88927,15 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - PinAction.prototype.pinned = false; + PinAction.prototype.pinned = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PinAction.prototype, "_pinned", { + get: $util.oneOfGetter($oneOfFields = ["pinned"]), + set: $util.oneOfSetter($oneOfFields) + }); PinAction.create = function create(properties) { return new PinAction(properties); @@ -76436,11 +88984,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.pinned = false; - } if (m.pinned != null && m.hasOwnProperty("pinned")) { d.pinned = m.pinned; + if (o.oneofs) + d._pinned = "pinned"; } return d; }; @@ -76468,7 +89015,15 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - PnForLidChatAction.prototype.pnJid = ""; + PnForLidChatAction.prototype.pnJid = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PnForLidChatAction.prototype, "_pnJid", { + get: $util.oneOfGetter($oneOfFields = ["pnJid"]), + set: $util.oneOfSetter($oneOfFields) + }); PnForLidChatAction.create = function create(properties) { return new PnForLidChatAction(properties); @@ -76517,11 +89072,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.pnJid = ""; - } if (m.pnJid != null && m.hasOwnProperty("pnJid")) { d.pnJid = m.pnJid; + if (o.oneofs) + d._pnJid = "pnJid"; } return d; }; @@ -76643,7 +89197,15 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - PrimaryVersionAction.prototype.version = ""; + PrimaryVersionAction.prototype.version = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PrimaryVersionAction.prototype, "_version", { + get: $util.oneOfGetter($oneOfFields = ["version"]), + set: $util.oneOfSetter($oneOfFields) + }); PrimaryVersionAction.create = function create(properties) { return new PrimaryVersionAction(properties); @@ -76692,11 +89254,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.version = ""; - } if (m.version != null && m.hasOwnProperty("version")) { d.version = m.version; + if (o.oneofs) + d._version = "version"; } return d; }; @@ -76724,7 +89285,15 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - PrivacySettingChannelsPersonalisedRecommendationAction.prototype.isUserOptedOut = false; + PrivacySettingChannelsPersonalisedRecommendationAction.prototype.isUserOptedOut = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PrivacySettingChannelsPersonalisedRecommendationAction.prototype, "_isUserOptedOut", { + get: $util.oneOfGetter($oneOfFields = ["isUserOptedOut"]), + set: $util.oneOfSetter($oneOfFields) + }); PrivacySettingChannelsPersonalisedRecommendationAction.create = function create(properties) { return new PrivacySettingChannelsPersonalisedRecommendationAction(properties); @@ -76773,11 +89342,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.isUserOptedOut = false; - } if (m.isUserOptedOut != null && m.hasOwnProperty("isUserOptedOut")) { d.isUserOptedOut = m.isUserOptedOut; + if (o.oneofs) + d._isUserOptedOut = "isUserOptedOut"; } return d; }; @@ -76805,7 +89373,15 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - PrivacySettingDisableLinkPreviewsAction.prototype.isPreviewsDisabled = false; + PrivacySettingDisableLinkPreviewsAction.prototype.isPreviewsDisabled = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PrivacySettingDisableLinkPreviewsAction.prototype, "_isPreviewsDisabled", { + get: $util.oneOfGetter($oneOfFields = ["isPreviewsDisabled"]), + set: $util.oneOfSetter($oneOfFields) + }); PrivacySettingDisableLinkPreviewsAction.create = function create(properties) { return new PrivacySettingDisableLinkPreviewsAction(properties); @@ -76854,11 +89430,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.isPreviewsDisabled = false; - } if (m.isPreviewsDisabled != null && m.hasOwnProperty("isPreviewsDisabled")) { d.isPreviewsDisabled = m.isPreviewsDisabled; + if (o.oneofs) + d._isPreviewsDisabled = "isPreviewsDisabled"; } return d; }; @@ -76886,7 +89461,15 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - PrivacySettingRelayAllCalls.prototype.isEnabled = false; + PrivacySettingRelayAllCalls.prototype.isEnabled = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PrivacySettingRelayAllCalls.prototype, "_isEnabled", { + get: $util.oneOfGetter($oneOfFields = ["isEnabled"]), + set: $util.oneOfSetter($oneOfFields) + }); PrivacySettingRelayAllCalls.create = function create(properties) { return new PrivacySettingRelayAllCalls(properties); @@ -76935,11 +89518,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.isEnabled = false; - } if (m.isEnabled != null && m.hasOwnProperty("isEnabled")) { d.isEnabled = m.isEnabled; + if (o.oneofs) + d._isEnabled = "isEnabled"; } return d; }; @@ -76967,7 +89549,15 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - PrivateProcessingSettingAction.prototype.privateProcessingStatus = 0; + PrivateProcessingSettingAction.prototype.privateProcessingStatus = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PrivateProcessingSettingAction.prototype, "_privateProcessingStatus", { + get: $util.oneOfGetter($oneOfFields = ["privateProcessingStatus"]), + set: $util.oneOfSetter($oneOfFields) + }); PrivateProcessingSettingAction.create = function create(properties) { return new PrivateProcessingSettingAction(properties); @@ -77033,11 +89623,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.privateProcessingStatus = o.enums === String ? "UNDEFINED" : 0; - } if (m.privateProcessingStatus != null && m.hasOwnProperty("privateProcessingStatus")) { d.privateProcessingStatus = o.enums === String ? $root.proto.SyncActionValue.PrivateProcessingSettingAction.PrivateProcessingStatus[m.privateProcessingStatus] === undefined ? m.privateProcessingStatus : $root.proto.SyncActionValue.PrivateProcessingSettingAction.PrivateProcessingStatus[m.privateProcessingStatus] : m.privateProcessingStatus; + if (o.oneofs) + d._privateProcessingStatus = "privateProcessingStatus"; } return d; }; @@ -77073,7 +89662,15 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - PushNameSetting.prototype.name = ""; + PushNameSetting.prototype.name = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(PushNameSetting.prototype, "_name", { + get: $util.oneOfGetter($oneOfFields = ["name"]), + set: $util.oneOfSetter($oneOfFields) + }); PushNameSetting.create = function create(properties) { return new PushNameSetting(properties); @@ -77122,11 +89719,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.name = ""; - } if (m.name != null && m.hasOwnProperty("name")) { d.name = m.name; + if (o.oneofs) + d._name = "name"; } return d; }; @@ -77155,11 +89751,37 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - QuickReplyAction.prototype.shortcut = ""; - QuickReplyAction.prototype.message = ""; + QuickReplyAction.prototype.shortcut = null; + QuickReplyAction.prototype.message = null; QuickReplyAction.prototype.keywords = $util.emptyArray; - QuickReplyAction.prototype.count = 0; - QuickReplyAction.prototype.deleted = false; + QuickReplyAction.prototype.count = null; + QuickReplyAction.prototype.deleted = null; + + let $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) + }); QuickReplyAction.create = function create(properties) { return new QuickReplyAction(properties); @@ -77256,17 +89878,15 @@ export const proto = $root.proto = (() => { if (o.arrays || o.defaults) { d.keywords = []; } - if (o.defaults) { - d.shortcut = ""; - d.message = ""; - d.count = 0; - d.deleted = false; - } if (m.shortcut != null && m.hasOwnProperty("shortcut")) { d.shortcut = m.shortcut; + if (o.oneofs) + d._shortcut = "shortcut"; } if (m.message != null && m.hasOwnProperty("message")) { d.message = m.message; + if (o.oneofs) + d._message = "message"; } if (m.keywords && m.keywords.length) { d.keywords = []; @@ -77276,9 +89896,13 @@ export const proto = $root.proto = (() => { } if (m.count != null && m.hasOwnProperty("count")) { d.count = m.count; + if (o.oneofs) + d._count = "count"; } if (m.deleted != null && m.hasOwnProperty("deleted")) { d.deleted = m.deleted; + if (o.oneofs) + d._deleted = "deleted"; } return d; }; @@ -77402,7 +90026,15 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - RemoveRecentStickerAction.prototype.lastStickerSentTs = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + RemoveRecentStickerAction.prototype.lastStickerSentTs = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(RemoveRecentStickerAction.prototype, "_lastStickerSentTs", { + get: $util.oneOfGetter($oneOfFields = ["lastStickerSentTs"]), + set: $util.oneOfSetter($oneOfFields) + }); RemoveRecentStickerAction.create = function create(properties) { return new RemoveRecentStickerAction(properties); @@ -77458,18 +90090,13 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.lastStickerSentTs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.lastStickerSentTs = o.longs === String ? "0" : 0; - } if (m.lastStickerSentTs != null && m.hasOwnProperty("lastStickerSentTs")) { if (typeof m.lastStickerSentTs === "number") d.lastStickerSentTs = o.longs === String ? String(m.lastStickerSentTs) : m.lastStickerSentTs; else d.lastStickerSentTs = o.longs === String ? longToString(m.lastStickerSentTs) : o.longs === Number ? longToNumber(m.lastStickerSentTs) : m.lastStickerSentTs; + if (o.oneofs) + d._lastStickerSentTs = "lastStickerSentTs"; } return d; }; @@ -77497,37 +90124,225 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - SettingsSyncAction.prototype.startAtLogin = false; - SettingsSyncAction.prototype.minimizeToTray = false; - SettingsSyncAction.prototype.language = ""; - SettingsSyncAction.prototype.replaceTextWithEmoji = false; - SettingsSyncAction.prototype.bannerNotificationDisplayMode = 0; - SettingsSyncAction.prototype.unreadCounterBadgeDisplayMode = 0; - SettingsSyncAction.prototype.isMessagesNotificationEnabled = false; - SettingsSyncAction.prototype.isCallsNotificationEnabled = false; - SettingsSyncAction.prototype.isReactionsNotificationEnabled = false; - SettingsSyncAction.prototype.isStatusReactionsNotificationEnabled = false; - SettingsSyncAction.prototype.isTextPreviewForNotificationEnabled = false; - SettingsSyncAction.prototype.defaultNotificationToneId = 0; - SettingsSyncAction.prototype.groupDefaultNotificationToneId = 0; - SettingsSyncAction.prototype.appTheme = 0; - SettingsSyncAction.prototype.wallpaperId = 0; - SettingsSyncAction.prototype.isDoodleWallpaperEnabled = false; - SettingsSyncAction.prototype.fontSize = 0; - SettingsSyncAction.prototype.isPhotosAutodownloadEnabled = false; - SettingsSyncAction.prototype.isAudiosAutodownloadEnabled = false; - SettingsSyncAction.prototype.isVideosAutodownloadEnabled = false; - SettingsSyncAction.prototype.isDocumentsAutodownloadEnabled = false; - SettingsSyncAction.prototype.disableLinkPreviews = false; - SettingsSyncAction.prototype.notificationToneId = 0; - SettingsSyncAction.prototype.mediaUploadQuality = 0; - SettingsSyncAction.prototype.isSpellCheckEnabled = false; - SettingsSyncAction.prototype.isEnterToSendEnabled = false; - SettingsSyncAction.prototype.isGroupMessageNotificationEnabled = false; - SettingsSyncAction.prototype.isGroupReactionsNotificationEnabled = false; - SettingsSyncAction.prototype.isStatusNotificationEnabled = false; - SettingsSyncAction.prototype.statusNotificationToneId = 0; - SettingsSyncAction.prototype.shouldPlaySoundForCallNotification = false; + SettingsSyncAction.prototype.startAtLogin = null; + SettingsSyncAction.prototype.minimizeToTray = null; + SettingsSyncAction.prototype.language = null; + SettingsSyncAction.prototype.replaceTextWithEmoji = null; + SettingsSyncAction.prototype.bannerNotificationDisplayMode = null; + SettingsSyncAction.prototype.unreadCounterBadgeDisplayMode = null; + SettingsSyncAction.prototype.isMessagesNotificationEnabled = null; + SettingsSyncAction.prototype.isCallsNotificationEnabled = null; + SettingsSyncAction.prototype.isReactionsNotificationEnabled = null; + SettingsSyncAction.prototype.isStatusReactionsNotificationEnabled = null; + SettingsSyncAction.prototype.isTextPreviewForNotificationEnabled = null; + SettingsSyncAction.prototype.defaultNotificationToneId = null; + SettingsSyncAction.prototype.groupDefaultNotificationToneId = null; + SettingsSyncAction.prototype.appTheme = null; + SettingsSyncAction.prototype.wallpaperId = null; + SettingsSyncAction.prototype.isDoodleWallpaperEnabled = null; + SettingsSyncAction.prototype.fontSize = null; + SettingsSyncAction.prototype.isPhotosAutodownloadEnabled = null; + SettingsSyncAction.prototype.isAudiosAutodownloadEnabled = null; + SettingsSyncAction.prototype.isVideosAutodownloadEnabled = null; + SettingsSyncAction.prototype.isDocumentsAutodownloadEnabled = null; + SettingsSyncAction.prototype.disableLinkPreviews = null; + SettingsSyncAction.prototype.notificationToneId = null; + SettingsSyncAction.prototype.mediaUploadQuality = null; + SettingsSyncAction.prototype.isSpellCheckEnabled = null; + SettingsSyncAction.prototype.isEnterToSendEnabled = null; + SettingsSyncAction.prototype.isGroupMessageNotificationEnabled = null; + SettingsSyncAction.prototype.isGroupReactionsNotificationEnabled = null; + SettingsSyncAction.prototype.isStatusNotificationEnabled = null; + SettingsSyncAction.prototype.statusNotificationToneId = null; + SettingsSyncAction.prototype.shouldPlaySoundForCallNotification = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SettingsSyncAction.prototype, "_startAtLogin", { + get: $util.oneOfGetter($oneOfFields = ["startAtLogin"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SettingsSyncAction.prototype, "_minimizeToTray", { + get: $util.oneOfGetter($oneOfFields = ["minimizeToTray"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SettingsSyncAction.prototype, "_language", { + get: $util.oneOfGetter($oneOfFields = ["language"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SettingsSyncAction.prototype, "_replaceTextWithEmoji", { + get: $util.oneOfGetter($oneOfFields = ["replaceTextWithEmoji"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SettingsSyncAction.prototype, "_bannerNotificationDisplayMode", { + get: $util.oneOfGetter($oneOfFields = ["bannerNotificationDisplayMode"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SettingsSyncAction.prototype, "_unreadCounterBadgeDisplayMode", { + get: $util.oneOfGetter($oneOfFields = ["unreadCounterBadgeDisplayMode"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SettingsSyncAction.prototype, "_isMessagesNotificationEnabled", { + get: $util.oneOfGetter($oneOfFields = ["isMessagesNotificationEnabled"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SettingsSyncAction.prototype, "_isCallsNotificationEnabled", { + get: $util.oneOfGetter($oneOfFields = ["isCallsNotificationEnabled"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SettingsSyncAction.prototype, "_isReactionsNotificationEnabled", { + get: $util.oneOfGetter($oneOfFields = ["isReactionsNotificationEnabled"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SettingsSyncAction.prototype, "_isStatusReactionsNotificationEnabled", { + get: $util.oneOfGetter($oneOfFields = ["isStatusReactionsNotificationEnabled"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SettingsSyncAction.prototype, "_isTextPreviewForNotificationEnabled", { + get: $util.oneOfGetter($oneOfFields = ["isTextPreviewForNotificationEnabled"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SettingsSyncAction.prototype, "_defaultNotificationToneId", { + get: $util.oneOfGetter($oneOfFields = ["defaultNotificationToneId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SettingsSyncAction.prototype, "_groupDefaultNotificationToneId", { + get: $util.oneOfGetter($oneOfFields = ["groupDefaultNotificationToneId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SettingsSyncAction.prototype, "_appTheme", { + get: $util.oneOfGetter($oneOfFields = ["appTheme"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SettingsSyncAction.prototype, "_wallpaperId", { + get: $util.oneOfGetter($oneOfFields = ["wallpaperId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SettingsSyncAction.prototype, "_isDoodleWallpaperEnabled", { + get: $util.oneOfGetter($oneOfFields = ["isDoodleWallpaperEnabled"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SettingsSyncAction.prototype, "_fontSize", { + get: $util.oneOfGetter($oneOfFields = ["fontSize"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SettingsSyncAction.prototype, "_isPhotosAutodownloadEnabled", { + get: $util.oneOfGetter($oneOfFields = ["isPhotosAutodownloadEnabled"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SettingsSyncAction.prototype, "_isAudiosAutodownloadEnabled", { + get: $util.oneOfGetter($oneOfFields = ["isAudiosAutodownloadEnabled"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SettingsSyncAction.prototype, "_isVideosAutodownloadEnabled", { + get: $util.oneOfGetter($oneOfFields = ["isVideosAutodownloadEnabled"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SettingsSyncAction.prototype, "_isDocumentsAutodownloadEnabled", { + get: $util.oneOfGetter($oneOfFields = ["isDocumentsAutodownloadEnabled"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SettingsSyncAction.prototype, "_disableLinkPreviews", { + get: $util.oneOfGetter($oneOfFields = ["disableLinkPreviews"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SettingsSyncAction.prototype, "_notificationToneId", { + get: $util.oneOfGetter($oneOfFields = ["notificationToneId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SettingsSyncAction.prototype, "_mediaUploadQuality", { + get: $util.oneOfGetter($oneOfFields = ["mediaUploadQuality"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SettingsSyncAction.prototype, "_isSpellCheckEnabled", { + get: $util.oneOfGetter($oneOfFields = ["isSpellCheckEnabled"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SettingsSyncAction.prototype, "_isEnterToSendEnabled", { + get: $util.oneOfGetter($oneOfFields = ["isEnterToSendEnabled"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SettingsSyncAction.prototype, "_isGroupMessageNotificationEnabled", { + get: $util.oneOfGetter($oneOfFields = ["isGroupMessageNotificationEnabled"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SettingsSyncAction.prototype, "_isGroupReactionsNotificationEnabled", { + get: $util.oneOfGetter($oneOfFields = ["isGroupReactionsNotificationEnabled"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SettingsSyncAction.prototype, "_isStatusNotificationEnabled", { + get: $util.oneOfGetter($oneOfFields = ["isStatusNotificationEnabled"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SettingsSyncAction.prototype, "_statusNotificationToneId", { + get: $util.oneOfGetter($oneOfFields = ["statusNotificationToneId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SettingsSyncAction.prototype, "_shouldPlaySoundForCallNotification", { + get: $util.oneOfGetter($oneOfFields = ["shouldPlaySoundForCallNotification"]), + set: $util.oneOfSetter($oneOfFields) + }); SettingsSyncAction.create = function create(properties) { return new SettingsSyncAction(properties); @@ -77905,131 +90720,160 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.startAtLogin = false; - d.minimizeToTray = false; - d.language = ""; - d.replaceTextWithEmoji = false; - d.bannerNotificationDisplayMode = o.enums === String ? "DISPLAY_MODE_UNKNOWN" : 0; - d.unreadCounterBadgeDisplayMode = o.enums === String ? "DISPLAY_MODE_UNKNOWN" : 0; - d.isMessagesNotificationEnabled = false; - d.isCallsNotificationEnabled = false; - d.isReactionsNotificationEnabled = false; - d.isStatusReactionsNotificationEnabled = false; - d.isTextPreviewForNotificationEnabled = false; - d.defaultNotificationToneId = 0; - d.groupDefaultNotificationToneId = 0; - d.appTheme = 0; - d.wallpaperId = 0; - d.isDoodleWallpaperEnabled = false; - d.fontSize = 0; - d.isPhotosAutodownloadEnabled = false; - d.isAudiosAutodownloadEnabled = false; - d.isVideosAutodownloadEnabled = false; - d.isDocumentsAutodownloadEnabled = false; - d.disableLinkPreviews = false; - d.notificationToneId = 0; - d.mediaUploadQuality = o.enums === String ? "MEDIA_QUALITY_UNKNOWN" : 0; - d.isSpellCheckEnabled = false; - d.isEnterToSendEnabled = false; - d.isGroupMessageNotificationEnabled = false; - d.isGroupReactionsNotificationEnabled = false; - d.isStatusNotificationEnabled = false; - d.statusNotificationToneId = 0; - d.shouldPlaySoundForCallNotification = false; - } if (m.startAtLogin != null && m.hasOwnProperty("startAtLogin")) { d.startAtLogin = m.startAtLogin; + if (o.oneofs) + d._startAtLogin = "startAtLogin"; } if (m.minimizeToTray != null && m.hasOwnProperty("minimizeToTray")) { d.minimizeToTray = m.minimizeToTray; + if (o.oneofs) + d._minimizeToTray = "minimizeToTray"; } if (m.language != null && m.hasOwnProperty("language")) { d.language = m.language; + if (o.oneofs) + d._language = "language"; } if (m.replaceTextWithEmoji != null && m.hasOwnProperty("replaceTextWithEmoji")) { d.replaceTextWithEmoji = m.replaceTextWithEmoji; + if (o.oneofs) + d._replaceTextWithEmoji = "replaceTextWithEmoji"; } if (m.bannerNotificationDisplayMode != null && m.hasOwnProperty("bannerNotificationDisplayMode")) { d.bannerNotificationDisplayMode = o.enums === String ? $root.proto.SyncActionValue.SettingsSyncAction.DisplayMode[m.bannerNotificationDisplayMode] === undefined ? m.bannerNotificationDisplayMode : $root.proto.SyncActionValue.SettingsSyncAction.DisplayMode[m.bannerNotificationDisplayMode] : m.bannerNotificationDisplayMode; + if (o.oneofs) + d._bannerNotificationDisplayMode = "bannerNotificationDisplayMode"; } if (m.unreadCounterBadgeDisplayMode != null && m.hasOwnProperty("unreadCounterBadgeDisplayMode")) { d.unreadCounterBadgeDisplayMode = o.enums === String ? $root.proto.SyncActionValue.SettingsSyncAction.DisplayMode[m.unreadCounterBadgeDisplayMode] === undefined ? m.unreadCounterBadgeDisplayMode : $root.proto.SyncActionValue.SettingsSyncAction.DisplayMode[m.unreadCounterBadgeDisplayMode] : m.unreadCounterBadgeDisplayMode; + if (o.oneofs) + d._unreadCounterBadgeDisplayMode = "unreadCounterBadgeDisplayMode"; } if (m.isMessagesNotificationEnabled != null && m.hasOwnProperty("isMessagesNotificationEnabled")) { d.isMessagesNotificationEnabled = m.isMessagesNotificationEnabled; + if (o.oneofs) + d._isMessagesNotificationEnabled = "isMessagesNotificationEnabled"; } if (m.isCallsNotificationEnabled != null && m.hasOwnProperty("isCallsNotificationEnabled")) { d.isCallsNotificationEnabled = m.isCallsNotificationEnabled; + if (o.oneofs) + d._isCallsNotificationEnabled = "isCallsNotificationEnabled"; } if (m.isReactionsNotificationEnabled != null && m.hasOwnProperty("isReactionsNotificationEnabled")) { d.isReactionsNotificationEnabled = m.isReactionsNotificationEnabled; + if (o.oneofs) + d._isReactionsNotificationEnabled = "isReactionsNotificationEnabled"; } if (m.isStatusReactionsNotificationEnabled != null && m.hasOwnProperty("isStatusReactionsNotificationEnabled")) { d.isStatusReactionsNotificationEnabled = m.isStatusReactionsNotificationEnabled; + if (o.oneofs) + d._isStatusReactionsNotificationEnabled = "isStatusReactionsNotificationEnabled"; } if (m.isTextPreviewForNotificationEnabled != null && m.hasOwnProperty("isTextPreviewForNotificationEnabled")) { d.isTextPreviewForNotificationEnabled = m.isTextPreviewForNotificationEnabled; + if (o.oneofs) + d._isTextPreviewForNotificationEnabled = "isTextPreviewForNotificationEnabled"; } if (m.defaultNotificationToneId != null && m.hasOwnProperty("defaultNotificationToneId")) { d.defaultNotificationToneId = m.defaultNotificationToneId; + if (o.oneofs) + d._defaultNotificationToneId = "defaultNotificationToneId"; } if (m.groupDefaultNotificationToneId != null && m.hasOwnProperty("groupDefaultNotificationToneId")) { d.groupDefaultNotificationToneId = m.groupDefaultNotificationToneId; + if (o.oneofs) + d._groupDefaultNotificationToneId = "groupDefaultNotificationToneId"; } if (m.appTheme != null && m.hasOwnProperty("appTheme")) { d.appTheme = m.appTheme; + if (o.oneofs) + d._appTheme = "appTheme"; } if (m.wallpaperId != null && m.hasOwnProperty("wallpaperId")) { d.wallpaperId = m.wallpaperId; + if (o.oneofs) + d._wallpaperId = "wallpaperId"; } if (m.isDoodleWallpaperEnabled != null && m.hasOwnProperty("isDoodleWallpaperEnabled")) { d.isDoodleWallpaperEnabled = m.isDoodleWallpaperEnabled; + if (o.oneofs) + d._isDoodleWallpaperEnabled = "isDoodleWallpaperEnabled"; } if (m.fontSize != null && m.hasOwnProperty("fontSize")) { d.fontSize = m.fontSize; + if (o.oneofs) + d._fontSize = "fontSize"; } if (m.isPhotosAutodownloadEnabled != null && m.hasOwnProperty("isPhotosAutodownloadEnabled")) { d.isPhotosAutodownloadEnabled = m.isPhotosAutodownloadEnabled; + if (o.oneofs) + d._isPhotosAutodownloadEnabled = "isPhotosAutodownloadEnabled"; } if (m.isAudiosAutodownloadEnabled != null && m.hasOwnProperty("isAudiosAutodownloadEnabled")) { d.isAudiosAutodownloadEnabled = m.isAudiosAutodownloadEnabled; + if (o.oneofs) + d._isAudiosAutodownloadEnabled = "isAudiosAutodownloadEnabled"; } if (m.isVideosAutodownloadEnabled != null && m.hasOwnProperty("isVideosAutodownloadEnabled")) { d.isVideosAutodownloadEnabled = m.isVideosAutodownloadEnabled; + if (o.oneofs) + d._isVideosAutodownloadEnabled = "isVideosAutodownloadEnabled"; } if (m.isDocumentsAutodownloadEnabled != null && m.hasOwnProperty("isDocumentsAutodownloadEnabled")) { d.isDocumentsAutodownloadEnabled = m.isDocumentsAutodownloadEnabled; + if (o.oneofs) + d._isDocumentsAutodownloadEnabled = "isDocumentsAutodownloadEnabled"; } if (m.disableLinkPreviews != null && m.hasOwnProperty("disableLinkPreviews")) { d.disableLinkPreviews = m.disableLinkPreviews; + if (o.oneofs) + d._disableLinkPreviews = "disableLinkPreviews"; } if (m.notificationToneId != null && m.hasOwnProperty("notificationToneId")) { d.notificationToneId = m.notificationToneId; + if (o.oneofs) + d._notificationToneId = "notificationToneId"; } if (m.mediaUploadQuality != null && m.hasOwnProperty("mediaUploadQuality")) { d.mediaUploadQuality = o.enums === String ? $root.proto.SyncActionValue.SettingsSyncAction.MediaQualitySetting[m.mediaUploadQuality] === undefined ? m.mediaUploadQuality : $root.proto.SyncActionValue.SettingsSyncAction.MediaQualitySetting[m.mediaUploadQuality] : m.mediaUploadQuality; + if (o.oneofs) + d._mediaUploadQuality = "mediaUploadQuality"; } if (m.isSpellCheckEnabled != null && m.hasOwnProperty("isSpellCheckEnabled")) { d.isSpellCheckEnabled = m.isSpellCheckEnabled; + if (o.oneofs) + d._isSpellCheckEnabled = "isSpellCheckEnabled"; } if (m.isEnterToSendEnabled != null && m.hasOwnProperty("isEnterToSendEnabled")) { d.isEnterToSendEnabled = m.isEnterToSendEnabled; + if (o.oneofs) + d._isEnterToSendEnabled = "isEnterToSendEnabled"; } if (m.isGroupMessageNotificationEnabled != null && m.hasOwnProperty("isGroupMessageNotificationEnabled")) { d.isGroupMessageNotificationEnabled = m.isGroupMessageNotificationEnabled; + if (o.oneofs) + d._isGroupMessageNotificationEnabled = "isGroupMessageNotificationEnabled"; } if (m.isGroupReactionsNotificationEnabled != null && m.hasOwnProperty("isGroupReactionsNotificationEnabled")) { d.isGroupReactionsNotificationEnabled = m.isGroupReactionsNotificationEnabled; + if (o.oneofs) + d._isGroupReactionsNotificationEnabled = "isGroupReactionsNotificationEnabled"; } if (m.isStatusNotificationEnabled != null && m.hasOwnProperty("isStatusNotificationEnabled")) { d.isStatusNotificationEnabled = m.isStatusNotificationEnabled; + if (o.oneofs) + d._isStatusNotificationEnabled = "isStatusNotificationEnabled"; } if (m.statusNotificationToneId != null && m.hasOwnProperty("statusNotificationToneId")) { d.statusNotificationToneId = m.statusNotificationToneId; + if (o.oneofs) + d._statusNotificationToneId = "statusNotificationToneId"; } if (m.shouldPlaySoundForCallNotification != null && m.hasOwnProperty("shouldPlaySoundForCallNotification")) { d.shouldPlaySoundForCallNotification = m.shouldPlaySoundForCallNotification; + if (o.oneofs) + d._shouldPlaySoundForCallNotification = "shouldPlaySoundForCallNotification"; } return d; }; @@ -78121,7 +90965,15 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - StarAction.prototype.starred = false; + StarAction.prototype.starred = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StarAction.prototype, "_starred", { + get: $util.oneOfGetter($oneOfFields = ["starred"]), + set: $util.oneOfSetter($oneOfFields) + }); StarAction.create = function create(properties) { return new StarAction(properties); @@ -78170,11 +91022,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.starred = false; - } if (m.starred != null && m.hasOwnProperty("starred")) { d.starred = m.starred; + if (o.oneofs) + d._starred = "starred"; } return d; }; @@ -78202,7 +91053,15 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - StatusPostOptInNotificationPreferencesAction.prototype.enabled = false; + StatusPostOptInNotificationPreferencesAction.prototype.enabled = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StatusPostOptInNotificationPreferencesAction.prototype, "_enabled", { + get: $util.oneOfGetter($oneOfFields = ["enabled"]), + set: $util.oneOfSetter($oneOfFields) + }); StatusPostOptInNotificationPreferencesAction.create = function create(properties) { return new StatusPostOptInNotificationPreferencesAction(properties); @@ -78251,11 +91110,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.enabled = false; - } if (m.enabled != null && m.hasOwnProperty("enabled")) { d.enabled = m.enabled; + if (o.oneofs) + d._enabled = "enabled"; } return d; }; @@ -78284,9 +91142,17 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - StatusPrivacyAction.prototype.mode = 0; + StatusPrivacyAction.prototype.mode = null; StatusPrivacyAction.prototype.userJid = $util.emptyArray; + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StatusPrivacyAction.prototype, "_mode", { + get: $util.oneOfGetter($oneOfFields = ["mode"]), + set: $util.oneOfSetter($oneOfFields) + }); + StatusPrivacyAction.create = function create(properties) { return new StatusPrivacyAction(properties); }; @@ -78376,11 +91242,10 @@ export const proto = $root.proto = (() => { if (o.arrays || o.defaults) { d.userJid = []; } - if (o.defaults) { - d.mode = o.enums === String ? "ALLOW_LIST" : 0; - } if (m.mode != null && m.hasOwnProperty("mode")) { d.mode = o.enums === String ? $root.proto.SyncActionValue.StatusPrivacyAction.StatusDistributionMode[m.mode] === undefined ? m.mode : $root.proto.SyncActionValue.StatusPrivacyAction.StatusDistributionMode[m.mode] : m.mode; + if (o.oneofs) + d._mode = "mode"; } if (m.userJid && m.userJid.length) { d.userJid = []; @@ -78423,19 +91288,99 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - StickerAction.prototype.url = ""; - StickerAction.prototype.fileEncSha256 = $util.newBuffer([]); - StickerAction.prototype.mediaKey = $util.newBuffer([]); - StickerAction.prototype.mimetype = ""; - StickerAction.prototype.height = 0; - StickerAction.prototype.width = 0; - StickerAction.prototype.directPath = ""; - StickerAction.prototype.fileLength = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - StickerAction.prototype.isFavorite = false; - StickerAction.prototype.deviceIdHint = 0; - StickerAction.prototype.isLottie = false; - StickerAction.prototype.imageHash = ""; - StickerAction.prototype.isAvatarSticker = false; + StickerAction.prototype.url = null; + StickerAction.prototype.fileEncSha256 = null; + StickerAction.prototype.mediaKey = null; + StickerAction.prototype.mimetype = null; + StickerAction.prototype.height = null; + StickerAction.prototype.width = null; + StickerAction.prototype.directPath = null; + StickerAction.prototype.fileLength = null; + StickerAction.prototype.isFavorite = null; + StickerAction.prototype.deviceIdHint = null; + StickerAction.prototype.isLottie = null; + StickerAction.prototype.imageHash = null; + StickerAction.prototype.isAvatarSticker = null; + + let $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) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StickerAction.prototype, "_imageHash", { + get: $util.oneOfGetter($oneOfFields = ["imageHash"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(StickerAction.prototype, "_isAvatarSticker", { + get: $util.oneOfGetter($oneOfFields = ["isAvatarSticker"]), + set: $util.oneOfSetter($oneOfFields) + }); StickerAction.create = function create(properties) { return new StickerAction(properties); @@ -78605,78 +91550,73 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.url = ""; - if (o.bytes === String) - d.fileEncSha256 = ""; - else { - d.fileEncSha256 = []; - if (o.bytes !== Array) - d.fileEncSha256 = $util.newBuffer(d.fileEncSha256); - } - if (o.bytes === String) - d.mediaKey = ""; - else { - d.mediaKey = []; - if (o.bytes !== Array) - d.mediaKey = $util.newBuffer(d.mediaKey); - } - d.mimetype = ""; - d.height = 0; - d.width = 0; - d.directPath = ""; - if ($util.Long) { - var n = new $util.Long(0, 0, true); - d.fileLength = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.fileLength = o.longs === String ? "0" : 0; - d.isFavorite = false; - d.deviceIdHint = 0; - d.isLottie = false; - d.imageHash = ""; - d.isAvatarSticker = false; - } if (m.url != null && m.hasOwnProperty("url")) { d.url = m.url; + if (o.oneofs) + d._url = "url"; } if (m.fileEncSha256 != null && m.hasOwnProperty("fileEncSha256")) { d.fileEncSha256 = o.bytes === String ? $util.base64.encode(m.fileEncSha256, 0, m.fileEncSha256.length) : o.bytes === Array ? Array.prototype.slice.call(m.fileEncSha256) : m.fileEncSha256; + if (o.oneofs) + d._fileEncSha256 = "fileEncSha256"; } if (m.mediaKey != null && m.hasOwnProperty("mediaKey")) { d.mediaKey = o.bytes === String ? $util.base64.encode(m.mediaKey, 0, m.mediaKey.length) : o.bytes === Array ? Array.prototype.slice.call(m.mediaKey) : m.mediaKey; + if (o.oneofs) + d._mediaKey = "mediaKey"; } if (m.mimetype != null && m.hasOwnProperty("mimetype")) { d.mimetype = m.mimetype; + if (o.oneofs) + d._mimetype = "mimetype"; } if (m.height != null && m.hasOwnProperty("height")) { d.height = m.height; + if (o.oneofs) + d._height = "height"; } if (m.width != null && m.hasOwnProperty("width")) { d.width = m.width; + if (o.oneofs) + d._width = "width"; } if (m.directPath != null && m.hasOwnProperty("directPath")) { d.directPath = m.directPath; + if (o.oneofs) + d._directPath = "directPath"; } if (m.fileLength != null && m.hasOwnProperty("fileLength")) { if (typeof m.fileLength === "number") d.fileLength = o.longs === String ? String(m.fileLength) : m.fileLength; else d.fileLength = o.longs === String ? longToString(m.fileLength, true) : o.longs === Number ? longToNumber(m.fileLength, true) : m.fileLength; + if (o.oneofs) + d._fileLength = "fileLength"; } if (m.isFavorite != null && m.hasOwnProperty("isFavorite")) { d.isFavorite = m.isFavorite; + if (o.oneofs) + d._isFavorite = "isFavorite"; } if (m.deviceIdHint != null && m.hasOwnProperty("deviceIdHint")) { d.deviceIdHint = m.deviceIdHint; + if (o.oneofs) + d._deviceIdHint = "deviceIdHint"; } if (m.isLottie != null && m.hasOwnProperty("isLottie")) { d.isLottie = m.isLottie; + if (o.oneofs) + d._isLottie = "isLottie"; } if (m.imageHash != null && m.hasOwnProperty("imageHash")) { d.imageHash = m.imageHash; + if (o.oneofs) + d._imageHash = "imageHash"; } if (m.isAvatarSticker != null && m.hasOwnProperty("isAvatarSticker")) { d.isAvatarSticker = m.isAvatarSticker; + if (o.oneofs) + d._isAvatarSticker = "isAvatarSticker"; } return d; }; @@ -78704,9 +91644,29 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - SubscriptionAction.prototype.isDeactivated = false; - SubscriptionAction.prototype.isAutoRenewing = false; - SubscriptionAction.prototype.expirationDate = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + SubscriptionAction.prototype.isDeactivated = null; + SubscriptionAction.prototype.isAutoRenewing = null; + SubscriptionAction.prototype.expirationDate = null; + + let $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) + }); SubscriptionAction.create = function create(properties) { return new SubscriptionAction(properties); @@ -78780,26 +91740,23 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.isDeactivated = false; - d.isAutoRenewing = false; - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.expirationDate = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.expirationDate = o.longs === String ? "0" : 0; - } if (m.isDeactivated != null && m.hasOwnProperty("isDeactivated")) { d.isDeactivated = m.isDeactivated; + if (o.oneofs) + d._isDeactivated = "isDeactivated"; } if (m.isAutoRenewing != null && m.hasOwnProperty("isAutoRenewing")) { d.isAutoRenewing = m.isAutoRenewing; + if (o.oneofs) + d._isAutoRenewing = "isAutoRenewing"; } if (m.expirationDate != null && m.hasOwnProperty("expirationDate")) { if (typeof m.expirationDate === "number") d.expirationDate = o.longs === String ? String(m.expirationDate) : m.expirationDate; else d.expirationDate = o.longs === String ? longToString(m.expirationDate) : o.longs === Number ? longToNumber(m.expirationDate) : m.expirationDate; + if (o.oneofs) + d._expirationDate = "expirationDate"; } return d; }; @@ -78828,7 +91785,21 @@ export const proto = $root.proto = (() => { } SyncActionMessage.prototype.key = null; - SyncActionMessage.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + SyncActionMessage.prototype.timestamp = null; + + let $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) + }); SyncActionMessage.create = function create(properties) { return new SyncActionMessage(properties); @@ -78895,22 +91866,18 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.key = null; - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.timestamp = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.timestamp = o.longs === String ? "0" : 0; - } if (m.key != null && m.hasOwnProperty("key")) { d.key = $root.proto.MessageKey.toObject(m.key, o); + if (o.oneofs) + d._key = "key"; } if (m.timestamp != null && m.hasOwnProperty("timestamp")) { if (typeof m.timestamp === "number") d.timestamp = o.longs === String ? String(m.timestamp) : m.timestamp; else d.timestamp = o.longs === String ? longToString(m.timestamp) : o.longs === Number ? longToNumber(m.timestamp) : m.timestamp; + if (o.oneofs) + d._timestamp = "timestamp"; } return d; }; @@ -78939,10 +91906,24 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - SyncActionMessageRange.prototype.lastMessageTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - SyncActionMessageRange.prototype.lastSystemMessageTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + SyncActionMessageRange.prototype.lastMessageTimestamp = null; + SyncActionMessageRange.prototype.lastSystemMessageTimestamp = null; SyncActionMessageRange.prototype.messages = $util.emptyArray; + let $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) + }); + SyncActionMessageRange.create = function create(properties) { return new SyncActionMessageRange(properties); }; @@ -79036,29 +92017,21 @@ export const proto = $root.proto = (() => { if (o.arrays || o.defaults) { d.messages = []; } - if (o.defaults) { - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.lastMessageTimestamp = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.lastMessageTimestamp = o.longs === String ? "0" : 0; - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.lastSystemMessageTimestamp = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.lastSystemMessageTimestamp = o.longs === String ? "0" : 0; - } if (m.lastMessageTimestamp != null && m.hasOwnProperty("lastMessageTimestamp")) { if (typeof m.lastMessageTimestamp === "number") d.lastMessageTimestamp = o.longs === String ? String(m.lastMessageTimestamp) : m.lastMessageTimestamp; else d.lastMessageTimestamp = o.longs === String ? longToString(m.lastMessageTimestamp) : o.longs === Number ? longToNumber(m.lastMessageTimestamp) : m.lastMessageTimestamp; + if (o.oneofs) + d._lastMessageTimestamp = "lastMessageTimestamp"; } if (m.lastSystemMessageTimestamp != null && m.hasOwnProperty("lastSystemMessageTimestamp")) { if (typeof m.lastSystemMessageTimestamp === "number") d.lastSystemMessageTimestamp = o.longs === String ? String(m.lastSystemMessageTimestamp) : m.lastSystemMessageTimestamp; else d.lastSystemMessageTimestamp = o.longs === String ? longToString(m.lastSystemMessageTimestamp) : o.longs === Number ? longToNumber(m.lastSystemMessageTimestamp) : m.lastSystemMessageTimestamp; + if (o.oneofs) + d._lastSystemMessageTimestamp = "lastSystemMessageTimestamp"; } if (m.messages && m.messages.length) { d.messages = []; @@ -79092,7 +92065,15 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - TimeFormatAction.prototype.isTwentyFourHourFormatEnabled = false; + TimeFormatAction.prototype.isTwentyFourHourFormatEnabled = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(TimeFormatAction.prototype, "_isTwentyFourHourFormatEnabled", { + get: $util.oneOfGetter($oneOfFields = ["isTwentyFourHourFormatEnabled"]), + set: $util.oneOfSetter($oneOfFields) + }); TimeFormatAction.create = function create(properties) { return new TimeFormatAction(properties); @@ -79141,11 +92122,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.isTwentyFourHourFormatEnabled = false; - } if (m.isTwentyFourHourFormatEnabled != null && m.hasOwnProperty("isTwentyFourHourFormatEnabled")) { d.isTwentyFourHourFormatEnabled = m.isTwentyFourHourFormatEnabled; + if (o.oneofs) + d._isTwentyFourHourFormatEnabled = "isTwentyFourHourFormatEnabled"; } return d; }; @@ -79173,7 +92153,15 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - UGCBot.prototype.definition = $util.newBuffer([]); + UGCBot.prototype.definition = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(UGCBot.prototype, "_definition", { + get: $util.oneOfGetter($oneOfFields = ["definition"]), + set: $util.oneOfSetter($oneOfFields) + }); UGCBot.create = function create(properties) { return new UGCBot(properties); @@ -79225,17 +92213,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - if (o.bytes === String) - d.definition = ""; - else { - d.definition = []; - if (o.bytes !== Array) - d.definition = $util.newBuffer(d.definition); - } - } if (m.definition != null && m.hasOwnProperty("definition")) { d.definition = o.bytes === String ? $util.base64.encode(m.definition, 0, m.definition.length) : o.bytes === Array ? Array.prototype.slice.call(m.definition) : m.definition; + if (o.oneofs) + d._definition = "definition"; } return d; }; @@ -79263,7 +92244,15 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - UnarchiveChatsSetting.prototype.unarchiveChats = false; + UnarchiveChatsSetting.prototype.unarchiveChats = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(UnarchiveChatsSetting.prototype, "_unarchiveChats", { + get: $util.oneOfGetter($oneOfFields = ["unarchiveChats"]), + set: $util.oneOfSetter($oneOfFields) + }); UnarchiveChatsSetting.create = function create(properties) { return new UnarchiveChatsSetting(properties); @@ -79312,11 +92301,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.unarchiveChats = false; - } if (m.unarchiveChats != null && m.hasOwnProperty("unarchiveChats")) { d.unarchiveChats = m.unarchiveChats; + if (o.oneofs) + d._unarchiveChats = "unarchiveChats"; } return d; }; @@ -79344,7 +92332,15 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - UserStatusMuteAction.prototype.muted = false; + UserStatusMuteAction.prototype.muted = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(UserStatusMuteAction.prototype, "_muted", { + get: $util.oneOfGetter($oneOfFields = ["muted"]), + set: $util.oneOfSetter($oneOfFields) + }); UserStatusMuteAction.create = function create(properties) { return new UserStatusMuteAction(properties); @@ -79393,11 +92389,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.muted = false; - } if (m.muted != null && m.hasOwnProperty("muted")) { d.muted = m.muted; + if (o.oneofs) + d._muted = "muted"; } return d; }; @@ -79425,7 +92420,15 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - UsernameChatStartModeAction.prototype.chatStartMode = 1; + UsernameChatStartModeAction.prototype.chatStartMode = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(UsernameChatStartModeAction.prototype, "_chatStartMode", { + get: $util.oneOfGetter($oneOfFields = ["chatStartMode"]), + set: $util.oneOfSetter($oneOfFields) + }); UsernameChatStartModeAction.create = function create(properties) { return new UsernameChatStartModeAction(properties); @@ -79487,11 +92490,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.chatStartMode = o.enums === String ? "LID" : 1; - } if (m.chatStartMode != null && m.hasOwnProperty("chatStartMode")) { d.chatStartMode = o.enums === String ? $root.proto.SyncActionValue.UsernameChatStartModeAction.ChatStartMode[m.chatStartMode] === undefined ? m.chatStartMode : $root.proto.SyncActionValue.UsernameChatStartModeAction.ChatStartMode[m.chatStartMode] : m.chatStartMode; + if (o.oneofs) + d._chatStartMode = "chatStartMode"; } return d; }; @@ -79526,7 +92528,15 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - WaffleAccountLinkStateAction.prototype.linkState = 0; + WaffleAccountLinkStateAction.prototype.linkState = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WaffleAccountLinkStateAction.prototype, "_linkState", { + get: $util.oneOfGetter($oneOfFields = ["linkState"]), + set: $util.oneOfSetter($oneOfFields) + }); WaffleAccountLinkStateAction.create = function create(properties) { return new WaffleAccountLinkStateAction(properties); @@ -79592,11 +92602,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.linkState = o.enums === String ? "ACTIVE" : 0; - } if (m.linkState != null && m.hasOwnProperty("linkState")) { d.linkState = o.enums === String ? $root.proto.SyncActionValue.WaffleAccountLinkStateAction.AccountLinkState[m.linkState] === undefined ? m.linkState : $root.proto.SyncActionValue.WaffleAccountLinkStateAction.AccountLinkState[m.linkState] : m.linkState; + if (o.oneofs) + d._linkState = "linkState"; } return d; }; @@ -79632,7 +92641,15 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - WamoUserIdentifierAction.prototype.identifier = ""; + WamoUserIdentifierAction.prototype.identifier = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WamoUserIdentifierAction.prototype, "_identifier", { + get: $util.oneOfGetter($oneOfFields = ["identifier"]), + set: $util.oneOfSetter($oneOfFields) + }); WamoUserIdentifierAction.create = function create(properties) { return new WamoUserIdentifierAction(properties); @@ -79681,11 +92698,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.identifier = ""; - } if (m.identifier != null && m.hasOwnProperty("identifier")) { d.identifier = m.identifier; + if (o.oneofs) + d._identifier = "identifier"; } return d; }; @@ -79716,7 +92732,15 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - SyncdIndex.prototype.blob = $util.newBuffer([]); + SyncdIndex.prototype.blob = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncdIndex.prototype, "_blob", { + get: $util.oneOfGetter($oneOfFields = ["blob"]), + set: $util.oneOfSetter($oneOfFields) + }); SyncdIndex.create = function create(properties) { return new SyncdIndex(properties); @@ -79768,17 +92792,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - if (o.bytes === String) - d.blob = ""; - else { - d.blob = []; - if (o.bytes !== Array) - d.blob = $util.newBuffer(d.blob); - } - } if (m.blob != null && m.hasOwnProperty("blob")) { d.blob = o.bytes === String ? $util.base64.encode(m.blob, 0, m.blob.length) : o.bytes === Array ? Array.prototype.slice.call(m.blob) : m.blob; + if (o.oneofs) + d._blob = "blob"; } return d; }; @@ -79806,9 +92823,23 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - SyncdMutation.prototype.operation = 0; + SyncdMutation.prototype.operation = null; SyncdMutation.prototype.record = null; + let $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) + }); + SyncdMutation.create = function create(properties) { return new SyncdMutation(properties); }; @@ -79880,15 +92911,15 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.operation = o.enums === String ? "SET" : 0; - d.record = null; - } if (m.operation != null && m.hasOwnProperty("operation")) { d.operation = o.enums === String ? $root.proto.SyncdMutation.SyncdOperation[m.operation] === undefined ? m.operation : $root.proto.SyncdMutation.SyncdOperation[m.operation] : m.operation; + if (o.oneofs) + d._operation = "operation"; } if (m.record != null && m.hasOwnProperty("record")) { d.record = $root.proto.SyncdRecord.toObject(m.record, o); + if (o.oneofs) + d._record = "record"; } return d; }; @@ -80023,12 +93054,62 @@ export const proto = $root.proto = (() => { SyncdPatch.prototype.version = null; SyncdPatch.prototype.mutations = $util.emptyArray; SyncdPatch.prototype.externalMutations = null; - SyncdPatch.prototype.snapshotMac = $util.newBuffer([]); - SyncdPatch.prototype.patchMac = $util.newBuffer([]); + SyncdPatch.prototype.snapshotMac = null; + SyncdPatch.prototype.patchMac = null; SyncdPatch.prototype.keyId = null; SyncdPatch.prototype.exitCode = null; - SyncdPatch.prototype.deviceIndex = 0; - SyncdPatch.prototype.clientDebugData = $util.newBuffer([]); + SyncdPatch.prototype.deviceIndex = null; + SyncdPatch.prototype.clientDebugData = null; + + let $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) + }); SyncdPatch.create = function create(properties) { return new SyncdPatch(properties); @@ -80180,36 +93261,10 @@ export const proto = $root.proto = (() => { if (o.arrays || o.defaults) { d.mutations = []; } - if (o.defaults) { - d.version = null; - d.externalMutations = null; - if (o.bytes === String) - d.snapshotMac = ""; - else { - d.snapshotMac = []; - if (o.bytes !== Array) - d.snapshotMac = $util.newBuffer(d.snapshotMac); - } - if (o.bytes === String) - d.patchMac = ""; - else { - d.patchMac = []; - if (o.bytes !== Array) - d.patchMac = $util.newBuffer(d.patchMac); - } - d.keyId = null; - d.exitCode = null; - d.deviceIndex = 0; - if (o.bytes === String) - d.clientDebugData = ""; - else { - d.clientDebugData = []; - if (o.bytes !== Array) - d.clientDebugData = $util.newBuffer(d.clientDebugData); - } - } if (m.version != null && m.hasOwnProperty("version")) { d.version = $root.proto.SyncdVersion.toObject(m.version, o); + if (o.oneofs) + d._version = "version"; } if (m.mutations && m.mutations.length) { d.mutations = []; @@ -80219,24 +93274,38 @@ export const proto = $root.proto = (() => { } if (m.externalMutations != null && m.hasOwnProperty("externalMutations")) { d.externalMutations = $root.proto.ExternalBlobReference.toObject(m.externalMutations, o); + if (o.oneofs) + d._externalMutations = "externalMutations"; } if (m.snapshotMac != null && m.hasOwnProperty("snapshotMac")) { d.snapshotMac = o.bytes === String ? $util.base64.encode(m.snapshotMac, 0, m.snapshotMac.length) : o.bytes === Array ? Array.prototype.slice.call(m.snapshotMac) : m.snapshotMac; + if (o.oneofs) + d._snapshotMac = "snapshotMac"; } if (m.patchMac != null && m.hasOwnProperty("patchMac")) { d.patchMac = o.bytes === String ? $util.base64.encode(m.patchMac, 0, m.patchMac.length) : o.bytes === Array ? Array.prototype.slice.call(m.patchMac) : m.patchMac; + if (o.oneofs) + d._patchMac = "patchMac"; } if (m.keyId != null && m.hasOwnProperty("keyId")) { d.keyId = $root.proto.KeyId.toObject(m.keyId, o); + if (o.oneofs) + d._keyId = "keyId"; } if (m.exitCode != null && m.hasOwnProperty("exitCode")) { d.exitCode = $root.proto.ExitCode.toObject(m.exitCode, o); + if (o.oneofs) + d._exitCode = "exitCode"; } if (m.deviceIndex != null && m.hasOwnProperty("deviceIndex")) { d.deviceIndex = m.deviceIndex; + if (o.oneofs) + d._deviceIndex = "deviceIndex"; } if (m.clientDebugData != null && m.hasOwnProperty("clientDebugData")) { d.clientDebugData = o.bytes === String ? $util.base64.encode(m.clientDebugData, 0, m.clientDebugData.length) : o.bytes === Array ? Array.prototype.slice.call(m.clientDebugData) : m.clientDebugData; + if (o.oneofs) + d._clientDebugData = "clientDebugData"; } return d; }; @@ -80268,6 +93337,26 @@ export const proto = $root.proto = (() => { SyncdRecord.prototype.value = null; SyncdRecord.prototype.keyId = null; + let $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) + }); + SyncdRecord.create = function create(properties) { return new SyncdRecord(properties); }; @@ -80339,19 +93428,20 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.index = null; - d.value = null; - d.keyId = null; - } if (m.index != null && m.hasOwnProperty("index")) { d.index = $root.proto.SyncdIndex.toObject(m.index, o); + if (o.oneofs) + d._index = "index"; } if (m.value != null && m.hasOwnProperty("value")) { d.value = $root.proto.SyncdValue.toObject(m.value, o); + if (o.oneofs) + d._value = "value"; } if (m.keyId != null && m.hasOwnProperty("keyId")) { d.keyId = $root.proto.KeyId.toObject(m.keyId, o); + if (o.oneofs) + d._keyId = "keyId"; } return d; }; @@ -80382,9 +93472,29 @@ export const proto = $root.proto = (() => { SyncdSnapshot.prototype.version = null; SyncdSnapshot.prototype.records = $util.emptyArray; - SyncdSnapshot.prototype.mac = $util.newBuffer([]); + SyncdSnapshot.prototype.mac = null; SyncdSnapshot.prototype.keyId = null; + let $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) + }); + SyncdSnapshot.create = function create(properties) { return new SyncdSnapshot(properties); }; @@ -80480,19 +93590,10 @@ export const proto = $root.proto = (() => { if (o.arrays || o.defaults) { d.records = []; } - if (o.defaults) { - d.version = null; - if (o.bytes === String) - d.mac = ""; - else { - d.mac = []; - if (o.bytes !== Array) - d.mac = $util.newBuffer(d.mac); - } - d.keyId = null; - } if (m.version != null && m.hasOwnProperty("version")) { d.version = $root.proto.SyncdVersion.toObject(m.version, o); + if (o.oneofs) + d._version = "version"; } if (m.records && m.records.length) { d.records = []; @@ -80502,9 +93603,13 @@ export const proto = $root.proto = (() => { } if (m.mac != null && m.hasOwnProperty("mac")) { d.mac = o.bytes === String ? $util.base64.encode(m.mac, 0, m.mac.length) : o.bytes === Array ? Array.prototype.slice.call(m.mac) : m.mac; + if (o.oneofs) + d._mac = "mac"; } if (m.keyId != null && m.hasOwnProperty("keyId")) { d.keyId = $root.proto.KeyId.toObject(m.keyId, o); + if (o.oneofs) + d._keyId = "keyId"; } return d; }; @@ -80532,7 +93637,15 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - SyncdValue.prototype.blob = $util.newBuffer([]); + SyncdValue.prototype.blob = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncdValue.prototype, "_blob", { + get: $util.oneOfGetter($oneOfFields = ["blob"]), + set: $util.oneOfSetter($oneOfFields) + }); SyncdValue.create = function create(properties) { return new SyncdValue(properties); @@ -80584,17 +93697,10 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - if (o.bytes === String) - d.blob = ""; - else { - d.blob = []; - if (o.bytes !== Array) - d.blob = $util.newBuffer(d.blob); - } - } if (m.blob != null && m.hasOwnProperty("blob")) { d.blob = o.bytes === String ? $util.base64.encode(m.blob, 0, m.blob.length) : o.bytes === Array ? Array.prototype.slice.call(m.blob) : m.blob; + if (o.oneofs) + d._blob = "blob"; } return d; }; @@ -80622,7 +93728,15 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - SyncdVersion.prototype.version = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + SyncdVersion.prototype.version = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SyncdVersion.prototype, "_version", { + get: $util.oneOfGetter($oneOfFields = ["version"]), + set: $util.oneOfSetter($oneOfFields) + }); SyncdVersion.create = function create(properties) { return new SyncdVersion(properties); @@ -80678,18 +93792,13 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - if ($util.Long) { - var n = new $util.Long(0, 0, true); - d.version = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.version = o.longs === String ? "0" : 0; - } if (m.version != null && m.hasOwnProperty("version")) { if (typeof m.version === "number") d.version = o.longs === String ? String(m.version) : m.version; else d.version = o.longs === String ? longToString(m.version, true) : o.longs === Number ? longToNumber(m.version, true) : m.version; + if (o.oneofs) + d._version = "version"; } return d; }; @@ -80717,8 +93826,22 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - TapLinkAction.prototype.title = ""; - TapLinkAction.prototype.tapUrl = ""; + TapLinkAction.prototype.title = null; + TapLinkAction.prototype.tapUrl = null; + + let $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) + }); TapLinkAction.create = function create(properties) { return new TapLinkAction(properties); @@ -80776,15 +93899,15 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.title = ""; - d.tapUrl = ""; - } if (m.title != null && m.hasOwnProperty("title")) { d.title = m.title; + if (o.oneofs) + d._title = "title"; } if (m.tapUrl != null && m.hasOwnProperty("tapUrl")) { d.tapUrl = m.tapUrl; + if (o.oneofs) + d._tapUrl = "tapUrl"; } return d; }; @@ -80812,13 +93935,19 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - TemplateButton.prototype.index = 0; + TemplateButton.prototype.index = null; TemplateButton.prototype.quickReplyButton = null; TemplateButton.prototype.urlButton = null; TemplateButton.prototype.callButton = null; let $oneOfFields; + // Virtual OneOf for proto3 optional field + Object.defineProperty(TemplateButton.prototype, "_index", { + get: $util.oneOfGetter($oneOfFields = ["index"]), + set: $util.oneOfSetter($oneOfFields) + }); + Object.defineProperty(TemplateButton.prototype, "button", { get: $util.oneOfGetter($oneOfFields = ["quickReplyButton", "urlButton", "callButton"]), set: $util.oneOfSetter($oneOfFields) @@ -80904,9 +94033,6 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.index = 0; - } if (m.quickReplyButton != null && m.hasOwnProperty("quickReplyButton")) { d.quickReplyButton = $root.proto.TemplateButton.QuickReplyButton.toObject(m.quickReplyButton, o); if (o.oneofs) @@ -80924,6 +94050,8 @@ export const proto = $root.proto = (() => { } if (m.index != null && m.hasOwnProperty("index")) { d.index = m.index; + if (o.oneofs) + d._index = "index"; } return d; }; @@ -80951,6 +94079,20 @@ export const proto = $root.proto = (() => { CallButton.prototype.displayText = null; CallButton.prototype.phoneNumber = null; + let $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) + }); + CallButton.create = function create(properties) { return new CallButton(properties); }; @@ -81011,15 +94153,15 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.displayText = null; - d.phoneNumber = null; - } if (m.displayText != null && m.hasOwnProperty("displayText")) { d.displayText = $root.proto.Message.HighlyStructuredMessage.toObject(m.displayText, o); + if (o.oneofs) + d._displayText = "displayText"; } if (m.phoneNumber != null && m.hasOwnProperty("phoneNumber")) { d.phoneNumber = $root.proto.Message.HighlyStructuredMessage.toObject(m.phoneNumber, o); + if (o.oneofs) + d._phoneNumber = "phoneNumber"; } return d; }; @@ -81048,7 +94190,21 @@ export const proto = $root.proto = (() => { } QuickReplyButton.prototype.displayText = null; - QuickReplyButton.prototype.id = ""; + QuickReplyButton.prototype.id = null; + + let $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) + }); QuickReplyButton.create = function create(properties) { return new QuickReplyButton(properties); @@ -81108,15 +94264,15 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.displayText = null; - d.id = ""; - } if (m.displayText != null && m.hasOwnProperty("displayText")) { d.displayText = $root.proto.Message.HighlyStructuredMessage.toObject(m.displayText, o); + if (o.oneofs) + d._displayText = "displayText"; } if (m.id != null && m.hasOwnProperty("id")) { d.id = m.id; + if (o.oneofs) + d._id = "id"; } return d; }; @@ -81147,6 +94303,20 @@ export const proto = $root.proto = (() => { URLButton.prototype.displayText = null; URLButton.prototype.url = null; + let $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) + }); + URLButton.create = function create(properties) { return new URLButton(properties); }; @@ -81207,15 +94377,15 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.displayText = null; - d.url = null; - } if (m.displayText != null && m.hasOwnProperty("displayText")) { d.displayText = $root.proto.Message.HighlyStructuredMessage.toObject(m.displayText, o); + if (o.oneofs) + d._displayText = "displayText"; } if (m.url != null && m.hasOwnProperty("url")) { d.url = $root.proto.Message.HighlyStructuredMessage.toObject(m.url, o); + if (o.oneofs) + d._url = "url"; } return d; }; @@ -81246,9 +94416,23 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - ThreadID.prototype.threadType = 0; + ThreadID.prototype.threadType = null; ThreadID.prototype.threadKey = null; + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ThreadID.prototype, "_threadType", { + get: $util.oneOfGetter($oneOfFields = ["threadType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ThreadID.prototype, "_threadKey", { + get: $util.oneOfGetter($oneOfFields = ["threadKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + ThreadID.create = function create(properties) { return new ThreadID(properties); }; @@ -81324,15 +94508,15 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.threadType = o.enums === String ? "UNKNOWN" : 0; - d.threadKey = null; - } if (m.threadType != null && m.hasOwnProperty("threadType")) { d.threadType = o.enums === String ? $root.proto.ThreadID.ThreadType[m.threadType] === undefined ? m.threadType : $root.proto.ThreadID.ThreadType[m.threadType] : m.threadType; + if (o.oneofs) + d._threadType = "threadType"; } if (m.threadKey != null && m.hasOwnProperty("threadKey")) { d.threadKey = $root.proto.MessageKey.toObject(m.threadKey, o); + if (o.oneofs) + d._threadKey = "threadKey"; } return d; }; @@ -81461,10 +94645,36 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - UrlTrackingMapElement.prototype.originalUrl = ""; - UrlTrackingMapElement.prototype.unconsentedUsersUrl = ""; - UrlTrackingMapElement.prototype.consentedUsersUrl = ""; - UrlTrackingMapElement.prototype.cardIndex = 0; + UrlTrackingMapElement.prototype.originalUrl = null; + UrlTrackingMapElement.prototype.unconsentedUsersUrl = null; + UrlTrackingMapElement.prototype.consentedUsersUrl = null; + UrlTrackingMapElement.prototype.cardIndex = null; + + let $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) + }); UrlTrackingMapElement.create = function create(properties) { return new UrlTrackingMapElement(properties); @@ -81540,23 +94750,25 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.originalUrl = ""; - d.unconsentedUsersUrl = ""; - d.consentedUsersUrl = ""; - d.cardIndex = 0; - } if (m.originalUrl != null && m.hasOwnProperty("originalUrl")) { d.originalUrl = m.originalUrl; + if (o.oneofs) + d._originalUrl = "originalUrl"; } if (m.unconsentedUsersUrl != null && m.hasOwnProperty("unconsentedUsersUrl")) { d.unconsentedUsersUrl = m.unconsentedUsersUrl; + if (o.oneofs) + d._unconsentedUsersUrl = "unconsentedUsersUrl"; } if (m.consentedUsersUrl != null && m.hasOwnProperty("consentedUsersUrl")) { d.consentedUsersUrl = m.consentedUsersUrl; + if (o.oneofs) + d._consentedUsersUrl = "consentedUsersUrl"; } if (m.cardIndex != null && m.hasOwnProperty("cardIndex")) { d.cardIndex = m.cardIndex; + if (o.oneofs) + d._cardIndex = "cardIndex"; } return d; }; @@ -81588,10 +94800,30 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - UserPassword.prototype.encoding = 0; - UserPassword.prototype.transformer = 0; + UserPassword.prototype.encoding = null; + UserPassword.prototype.transformer = null; UserPassword.prototype.transformerArg = $util.emptyArray; - UserPassword.prototype.transformedData = $util.newBuffer([]); + UserPassword.prototype.transformedData = null; + + let $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) + }); UserPassword.create = function create(properties) { return new UserPassword(properties); @@ -81714,22 +94946,15 @@ export const proto = $root.proto = (() => { if (o.arrays || o.defaults) { d.transformerArg = []; } - if (o.defaults) { - d.encoding = o.enums === String ? "UTF8" : 0; - d.transformer = o.enums === String ? "NONE" : 0; - if (o.bytes === String) - d.transformedData = ""; - else { - d.transformedData = []; - if (o.bytes !== Array) - d.transformedData = $util.newBuffer(d.transformedData); - } - } if (m.encoding != null && m.hasOwnProperty("encoding")) { d.encoding = o.enums === String ? $root.proto.UserPassword.Encoding[m.encoding] === undefined ? m.encoding : $root.proto.UserPassword.Encoding[m.encoding] : m.encoding; + if (o.oneofs) + d._encoding = "encoding"; } if (m.transformer != null && m.hasOwnProperty("transformer")) { d.transformer = o.enums === String ? $root.proto.UserPassword.Transformer[m.transformer] === undefined ? m.transformer : $root.proto.UserPassword.Transformer[m.transformer] : m.transformer; + if (o.oneofs) + d._transformer = "transformer"; } if (m.transformerArg && m.transformerArg.length) { d.transformerArg = []; @@ -81739,6 +94964,8 @@ export const proto = $root.proto = (() => { } if (m.transformedData != null && m.hasOwnProperty("transformedData")) { d.transformedData = o.bytes === String ? $util.base64.encode(m.transformedData, 0, m.transformedData.length) : o.bytes === Array ? Array.prototype.slice.call(m.transformedData) : m.transformedData; + if (o.oneofs) + d._transformedData = "transformedData"; } return d; }; @@ -81778,9 +95005,23 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - TransformerArg.prototype.key = ""; + TransformerArg.prototype.key = null; TransformerArg.prototype.value = null; + let $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) + }); + TransformerArg.create = function create(properties) { return new TransformerArg(properties); }; @@ -81839,15 +95080,15 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.key = ""; - d.value = null; - } if (m.key != null && m.hasOwnProperty("key")) { d.key = m.key; + if (o.oneofs) + d._key = "key"; } if (m.value != null && m.hasOwnProperty("value")) { d.value = $root.proto.UserPassword.TransformerArg.Value.toObject(m.value, o); + if (o.oneofs) + d._value = "value"; } return d; }; @@ -81985,13 +95226,39 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - UserReceipt.prototype.userJid = ""; - UserReceipt.prototype.receiptTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - UserReceipt.prototype.readTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - UserReceipt.prototype.playedTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + UserReceipt.prototype.userJid = null; + UserReceipt.prototype.receiptTimestamp = null; + UserReceipt.prototype.readTimestamp = null; + UserReceipt.prototype.playedTimestamp = null; UserReceipt.prototype.pendingDeviceJid = $util.emptyArray; UserReceipt.prototype.deliveredDeviceJid = $util.emptyArray; + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(UserReceipt.prototype, "_userJid", { + get: $util.oneOfGetter($oneOfFields = ["userJid"]), + set: $util.oneOfSetter($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) + }); + UserReceipt.create = function create(properties) { return new UserReceipt(properties); }; @@ -81999,7 +95266,8 @@ export const proto = $root.proto = (() => { UserReceipt.encode = function encode(m, w) { if (!w) w = $Writer.create(); - w.uint32(10).string(m.userJid); + if (m.userJid != null && Object.hasOwnProperty.call(m, "userJid")) + w.uint32(10).string(m.userJid); if (m.receiptTimestamp != null && Object.hasOwnProperty.call(m, "receiptTimestamp")) w.uint32(16).int64(m.receiptTimestamp); if (m.readTimestamp != null && Object.hasOwnProperty.call(m, "readTimestamp")) @@ -82059,8 +95327,6 @@ export const proto = $root.proto = (() => { break; } } - if (!m.hasOwnProperty("userJid")) - throw $util.ProtocolError("missing required 'userJid'", { instance: m }); return m; }; @@ -82128,44 +95394,34 @@ export const proto = $root.proto = (() => { d.pendingDeviceJid = []; d.deliveredDeviceJid = []; } - if (o.defaults) { - d.userJid = ""; - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.receiptTimestamp = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.receiptTimestamp = o.longs === String ? "0" : 0; - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.readTimestamp = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.readTimestamp = o.longs === String ? "0" : 0; - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.playedTimestamp = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.playedTimestamp = o.longs === String ? "0" : 0; - } if (m.userJid != null && m.hasOwnProperty("userJid")) { d.userJid = m.userJid; + if (o.oneofs) + d._userJid = "userJid"; } if (m.receiptTimestamp != null && m.hasOwnProperty("receiptTimestamp")) { if (typeof m.receiptTimestamp === "number") d.receiptTimestamp = o.longs === String ? String(m.receiptTimestamp) : m.receiptTimestamp; else d.receiptTimestamp = o.longs === String ? longToString(m.receiptTimestamp) : o.longs === Number ? longToNumber(m.receiptTimestamp) : m.receiptTimestamp; + if (o.oneofs) + d._receiptTimestamp = "receiptTimestamp"; } if (m.readTimestamp != null && m.hasOwnProperty("readTimestamp")) { if (typeof m.readTimestamp === "number") d.readTimestamp = o.longs === String ? String(m.readTimestamp) : m.readTimestamp; else d.readTimestamp = o.longs === String ? longToString(m.readTimestamp) : o.longs === Number ? longToNumber(m.readTimestamp) : m.readTimestamp; + if (o.oneofs) + d._readTimestamp = "readTimestamp"; } if (m.playedTimestamp != null && m.hasOwnProperty("playedTimestamp")) { if (typeof m.playedTimestamp === "number") d.playedTimestamp = o.longs === String ? String(m.playedTimestamp) : m.playedTimestamp; else d.playedTimestamp = o.longs === String ? longToString(m.playedTimestamp) : o.longs === Number ? longToNumber(m.playedTimestamp) : m.playedTimestamp; + if (o.oneofs) + d._playedTimestamp = "playedTimestamp"; } if (m.pendingDeviceJid && m.pendingDeviceJid.length) { d.pendingDeviceJid = []; @@ -82205,9 +95461,29 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - VerifiedNameCertificate.prototype.details = $util.newBuffer([]); - VerifiedNameCertificate.prototype.signature = $util.newBuffer([]); - VerifiedNameCertificate.prototype.serverSignature = $util.newBuffer([]); + VerifiedNameCertificate.prototype.details = null; + VerifiedNameCertificate.prototype.signature = null; + VerifiedNameCertificate.prototype.serverSignature = null; + + let $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) + }); VerifiedNameCertificate.create = function create(properties) { return new VerifiedNameCertificate(properties); @@ -82283,37 +95559,20 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - if (o.bytes === String) - d.details = ""; - else { - d.details = []; - if (o.bytes !== Array) - d.details = $util.newBuffer(d.details); - } - if (o.bytes === String) - d.signature = ""; - else { - d.signature = []; - if (o.bytes !== Array) - d.signature = $util.newBuffer(d.signature); - } - if (o.bytes === String) - d.serverSignature = ""; - else { - d.serverSignature = []; - if (o.bytes !== Array) - d.serverSignature = $util.newBuffer(d.serverSignature); - } - } if (m.details != null && m.hasOwnProperty("details")) { d.details = o.bytes === String ? $util.base64.encode(m.details, 0, m.details.length) : o.bytes === Array ? Array.prototype.slice.call(m.details) : m.details; + if (o.oneofs) + d._details = "details"; } if (m.signature != null && m.hasOwnProperty("signature")) { d.signature = o.bytes === String ? $util.base64.encode(m.signature, 0, m.signature.length) : o.bytes === Array ? Array.prototype.slice.call(m.signature) : m.signature; + if (o.oneofs) + d._signature = "signature"; } if (m.serverSignature != null && m.hasOwnProperty("serverSignature")) { d.serverSignature = o.bytes === String ? $util.base64.encode(m.serverSignature, 0, m.serverSignature.length) : o.bytes === Array ? Array.prototype.slice.call(m.serverSignature) : m.serverSignature; + if (o.oneofs) + d._serverSignature = "serverSignature"; } return d; }; @@ -82339,11 +95598,37 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - Details.prototype.serial = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - Details.prototype.issuer = ""; - Details.prototype.verifiedName = ""; + Details.prototype.serial = null; + Details.prototype.issuer = null; + Details.prototype.verifiedName = null; Details.prototype.localizedNames = $util.emptyArray; - Details.prototype.issueTime = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + Details.prototype.issueTime = null; + + let $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) + }); Details.create = function create(properties) { return new Details(properties); @@ -82456,31 +95741,23 @@ export const proto = $root.proto = (() => { if (o.arrays || o.defaults) { d.localizedNames = []; } - if (o.defaults) { - if ($util.Long) { - var n = new $util.Long(0, 0, true); - d.serial = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.serial = o.longs === String ? "0" : 0; - d.issuer = ""; - d.verifiedName = ""; - if ($util.Long) { - var n = new $util.Long(0, 0, true); - d.issueTime = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.issueTime = o.longs === String ? "0" : 0; - } if (m.serial != null && m.hasOwnProperty("serial")) { if (typeof m.serial === "number") d.serial = o.longs === String ? String(m.serial) : m.serial; else d.serial = o.longs === String ? longToString(m.serial, true) : o.longs === Number ? longToNumber(m.serial, true) : m.serial; + if (o.oneofs) + d._serial = "serial"; } if (m.issuer != null && m.hasOwnProperty("issuer")) { d.issuer = m.issuer; + if (o.oneofs) + d._issuer = "issuer"; } if (m.verifiedName != null && m.hasOwnProperty("verifiedName")) { d.verifiedName = m.verifiedName; + if (o.oneofs) + d._verifiedName = "verifiedName"; } if (m.localizedNames && m.localizedNames.length) { d.localizedNames = []; @@ -82493,6 +95770,8 @@ export const proto = $root.proto = (() => { d.issueTime = o.longs === String ? String(m.issueTime) : m.issueTime; else d.issueTime = o.longs === String ? longToString(m.issueTime, true) : o.longs === Number ? longToNumber(m.issueTime, true) : m.issueTime; + if (o.oneofs) + d._issueTime = "issueTime"; } return d; }; @@ -82523,8 +95802,22 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - WallpaperSettings.prototype.filename = ""; - WallpaperSettings.prototype.opacity = 0; + WallpaperSettings.prototype.filename = null; + WallpaperSettings.prototype.opacity = null; + + let $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) + }); WallpaperSettings.create = function create(properties) { return new WallpaperSettings(properties); @@ -82582,15 +95875,15 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.filename = ""; - d.opacity = 0; - } if (m.filename != null && m.hasOwnProperty("filename")) { d.filename = m.filename; + if (o.oneofs) + d._filename = "filename"; } if (m.opacity != null && m.hasOwnProperty("opacity")) { d.opacity = m.opacity; + if (o.oneofs) + d._opacity = "opacity"; } return d; }; @@ -82618,51 +95911,323 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - WebFeatures.prototype.labelsDisplay = 0; - WebFeatures.prototype.voipIndividualOutgoing = 0; - WebFeatures.prototype.groupsV3 = 0; - WebFeatures.prototype.groupsV3Create = 0; - WebFeatures.prototype.changeNumberV2 = 0; - WebFeatures.prototype.queryStatusV3Thumbnail = 0; - WebFeatures.prototype.liveLocations = 0; - WebFeatures.prototype.queryVname = 0; - WebFeatures.prototype.voipIndividualIncoming = 0; - WebFeatures.prototype.quickRepliesQuery = 0; - WebFeatures.prototype.payments = 0; - WebFeatures.prototype.stickerPackQuery = 0; - WebFeatures.prototype.liveLocationsFinal = 0; - WebFeatures.prototype.labelsEdit = 0; - WebFeatures.prototype.mediaUpload = 0; - WebFeatures.prototype.mediaUploadRichQuickReplies = 0; - WebFeatures.prototype.vnameV2 = 0; - WebFeatures.prototype.videoPlaybackUrl = 0; - WebFeatures.prototype.statusRanking = 0; - WebFeatures.prototype.voipIndividualVideo = 0; - WebFeatures.prototype.thirdPartyStickers = 0; - WebFeatures.prototype.frequentlyForwardedSetting = 0; - WebFeatures.prototype.groupsV4JoinPermission = 0; - WebFeatures.prototype.recentStickers = 0; - WebFeatures.prototype.catalog = 0; - WebFeatures.prototype.starredStickers = 0; - WebFeatures.prototype.voipGroupCall = 0; - WebFeatures.prototype.templateMessage = 0; - WebFeatures.prototype.templateMessageInteractivity = 0; - WebFeatures.prototype.ephemeralMessages = 0; - WebFeatures.prototype.e2ENotificationSync = 0; - WebFeatures.prototype.recentStickersV2 = 0; - WebFeatures.prototype.recentStickersV3 = 0; - WebFeatures.prototype.userNotice = 0; - WebFeatures.prototype.support = 0; - WebFeatures.prototype.groupUiiCleanup = 0; - WebFeatures.prototype.groupDogfoodingInternalOnly = 0; - WebFeatures.prototype.settingsSync = 0; - WebFeatures.prototype.archiveV2 = 0; - WebFeatures.prototype.ephemeralAllowGroupMembers = 0; - WebFeatures.prototype.ephemeral24HDuration = 0; - WebFeatures.prototype.mdForceUpgrade = 0; - WebFeatures.prototype.disappearingMode = 0; - WebFeatures.prototype.externalMdOptInAvailable = 0; - WebFeatures.prototype.noDeleteMessageTimeLimit = 0; + WebFeatures.prototype.labelsDisplay = null; + WebFeatures.prototype.voipIndividualOutgoing = null; + WebFeatures.prototype.groupsV3 = null; + WebFeatures.prototype.groupsV3Create = null; + WebFeatures.prototype.changeNumberV2 = null; + WebFeatures.prototype.queryStatusV3Thumbnail = null; + WebFeatures.prototype.liveLocations = null; + WebFeatures.prototype.queryVname = null; + WebFeatures.prototype.voipIndividualIncoming = null; + WebFeatures.prototype.quickRepliesQuery = null; + WebFeatures.prototype.payments = null; + WebFeatures.prototype.stickerPackQuery = null; + WebFeatures.prototype.liveLocationsFinal = null; + WebFeatures.prototype.labelsEdit = null; + WebFeatures.prototype.mediaUpload = null; + WebFeatures.prototype.mediaUploadRichQuickReplies = null; + WebFeatures.prototype.vnameV2 = null; + WebFeatures.prototype.videoPlaybackUrl = null; + WebFeatures.prototype.statusRanking = null; + WebFeatures.prototype.voipIndividualVideo = null; + WebFeatures.prototype.thirdPartyStickers = null; + WebFeatures.prototype.frequentlyForwardedSetting = null; + WebFeatures.prototype.groupsV4JoinPermission = null; + WebFeatures.prototype.recentStickers = null; + WebFeatures.prototype.catalog = null; + WebFeatures.prototype.starredStickers = null; + WebFeatures.prototype.voipGroupCall = null; + WebFeatures.prototype.templateMessage = null; + WebFeatures.prototype.templateMessageInteractivity = null; + WebFeatures.prototype.ephemeralMessages = null; + WebFeatures.prototype.e2ENotificationSync = null; + WebFeatures.prototype.recentStickersV2 = null; + WebFeatures.prototype.recentStickersV3 = null; + WebFeatures.prototype.userNotice = null; + WebFeatures.prototype.support = null; + WebFeatures.prototype.groupUiiCleanup = null; + WebFeatures.prototype.groupDogfoodingInternalOnly = null; + WebFeatures.prototype.settingsSync = null; + WebFeatures.prototype.archiveV2 = null; + WebFeatures.prototype.ephemeralAllowGroupMembers = null; + WebFeatures.prototype.ephemeral24HDuration = null; + WebFeatures.prototype.mdForceUpgrade = null; + WebFeatures.prototype.disappearingMode = null; + WebFeatures.prototype.externalMdOptInAvailable = null; + WebFeatures.prototype.noDeleteMessageTimeLimit = null; + + let $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) + }); WebFeatures.create = function create(properties) { return new WebFeatures(properties); @@ -84052,187 +97617,230 @@ export const proto = $root.proto = (() => { if (!o) o = {}; var d = {}; - if (o.defaults) { - d.labelsDisplay = o.enums === String ? "NOT_STARTED" : 0; - d.voipIndividualOutgoing = o.enums === String ? "NOT_STARTED" : 0; - d.groupsV3 = o.enums === String ? "NOT_STARTED" : 0; - d.groupsV3Create = o.enums === String ? "NOT_STARTED" : 0; - d.changeNumberV2 = o.enums === String ? "NOT_STARTED" : 0; - d.queryStatusV3Thumbnail = o.enums === String ? "NOT_STARTED" : 0; - d.liveLocations = o.enums === String ? "NOT_STARTED" : 0; - d.queryVname = o.enums === String ? "NOT_STARTED" : 0; - d.voipIndividualIncoming = o.enums === String ? "NOT_STARTED" : 0; - d.quickRepliesQuery = o.enums === String ? "NOT_STARTED" : 0; - d.payments = o.enums === String ? "NOT_STARTED" : 0; - d.stickerPackQuery = o.enums === String ? "NOT_STARTED" : 0; - d.liveLocationsFinal = o.enums === String ? "NOT_STARTED" : 0; - d.labelsEdit = o.enums === String ? "NOT_STARTED" : 0; - d.mediaUpload = o.enums === String ? "NOT_STARTED" : 0; - d.mediaUploadRichQuickReplies = o.enums === String ? "NOT_STARTED" : 0; - d.vnameV2 = o.enums === String ? "NOT_STARTED" : 0; - d.videoPlaybackUrl = o.enums === String ? "NOT_STARTED" : 0; - d.statusRanking = o.enums === String ? "NOT_STARTED" : 0; - d.voipIndividualVideo = o.enums === String ? "NOT_STARTED" : 0; - d.thirdPartyStickers = o.enums === String ? "NOT_STARTED" : 0; - d.frequentlyForwardedSetting = o.enums === String ? "NOT_STARTED" : 0; - d.groupsV4JoinPermission = o.enums === String ? "NOT_STARTED" : 0; - d.recentStickers = o.enums === String ? "NOT_STARTED" : 0; - d.catalog = o.enums === String ? "NOT_STARTED" : 0; - d.starredStickers = o.enums === String ? "NOT_STARTED" : 0; - d.voipGroupCall = o.enums === String ? "NOT_STARTED" : 0; - d.templateMessage = o.enums === String ? "NOT_STARTED" : 0; - d.templateMessageInteractivity = o.enums === String ? "NOT_STARTED" : 0; - d.ephemeralMessages = o.enums === String ? "NOT_STARTED" : 0; - d.e2ENotificationSync = o.enums === String ? "NOT_STARTED" : 0; - d.recentStickersV2 = o.enums === String ? "NOT_STARTED" : 0; - d.recentStickersV3 = o.enums === String ? "NOT_STARTED" : 0; - d.userNotice = o.enums === String ? "NOT_STARTED" : 0; - d.support = o.enums === String ? "NOT_STARTED" : 0; - d.groupUiiCleanup = o.enums === String ? "NOT_STARTED" : 0; - d.groupDogfoodingInternalOnly = o.enums === String ? "NOT_STARTED" : 0; - d.settingsSync = o.enums === String ? "NOT_STARTED" : 0; - d.archiveV2 = o.enums === String ? "NOT_STARTED" : 0; - d.ephemeralAllowGroupMembers = o.enums === String ? "NOT_STARTED" : 0; - d.ephemeral24HDuration = o.enums === String ? "NOT_STARTED" : 0; - d.mdForceUpgrade = o.enums === String ? "NOT_STARTED" : 0; - d.disappearingMode = o.enums === String ? "NOT_STARTED" : 0; - d.externalMdOptInAvailable = o.enums === String ? "NOT_STARTED" : 0; - d.noDeleteMessageTimeLimit = o.enums === String ? "NOT_STARTED" : 0; - } if (m.labelsDisplay != null && m.hasOwnProperty("labelsDisplay")) { d.labelsDisplay = o.enums === String ? $root.proto.WebFeatures.Flag[m.labelsDisplay] === undefined ? m.labelsDisplay : $root.proto.WebFeatures.Flag[m.labelsDisplay] : m.labelsDisplay; + if (o.oneofs) + d._labelsDisplay = "labelsDisplay"; } if (m.voipIndividualOutgoing != null && m.hasOwnProperty("voipIndividualOutgoing")) { d.voipIndividualOutgoing = o.enums === String ? $root.proto.WebFeatures.Flag[m.voipIndividualOutgoing] === undefined ? m.voipIndividualOutgoing : $root.proto.WebFeatures.Flag[m.voipIndividualOutgoing] : m.voipIndividualOutgoing; + if (o.oneofs) + d._voipIndividualOutgoing = "voipIndividualOutgoing"; } if (m.groupsV3 != null && m.hasOwnProperty("groupsV3")) { d.groupsV3 = o.enums === String ? $root.proto.WebFeatures.Flag[m.groupsV3] === undefined ? m.groupsV3 : $root.proto.WebFeatures.Flag[m.groupsV3] : m.groupsV3; + if (o.oneofs) + d._groupsV3 = "groupsV3"; } if (m.groupsV3Create != null && m.hasOwnProperty("groupsV3Create")) { d.groupsV3Create = o.enums === String ? $root.proto.WebFeatures.Flag[m.groupsV3Create] === undefined ? m.groupsV3Create : $root.proto.WebFeatures.Flag[m.groupsV3Create] : m.groupsV3Create; + if (o.oneofs) + d._groupsV3Create = "groupsV3Create"; } if (m.changeNumberV2 != null && m.hasOwnProperty("changeNumberV2")) { d.changeNumberV2 = o.enums === String ? $root.proto.WebFeatures.Flag[m.changeNumberV2] === undefined ? m.changeNumberV2 : $root.proto.WebFeatures.Flag[m.changeNumberV2] : m.changeNumberV2; + if (o.oneofs) + d._changeNumberV2 = "changeNumberV2"; } if (m.queryStatusV3Thumbnail != null && m.hasOwnProperty("queryStatusV3Thumbnail")) { d.queryStatusV3Thumbnail = o.enums === String ? $root.proto.WebFeatures.Flag[m.queryStatusV3Thumbnail] === undefined ? m.queryStatusV3Thumbnail : $root.proto.WebFeatures.Flag[m.queryStatusV3Thumbnail] : m.queryStatusV3Thumbnail; + if (o.oneofs) + d._queryStatusV3Thumbnail = "queryStatusV3Thumbnail"; } if (m.liveLocations != null && m.hasOwnProperty("liveLocations")) { d.liveLocations = o.enums === String ? $root.proto.WebFeatures.Flag[m.liveLocations] === undefined ? m.liveLocations : $root.proto.WebFeatures.Flag[m.liveLocations] : m.liveLocations; + if (o.oneofs) + d._liveLocations = "liveLocations"; } if (m.queryVname != null && m.hasOwnProperty("queryVname")) { d.queryVname = o.enums === String ? $root.proto.WebFeatures.Flag[m.queryVname] === undefined ? m.queryVname : $root.proto.WebFeatures.Flag[m.queryVname] : m.queryVname; + if (o.oneofs) + d._queryVname = "queryVname"; } if (m.voipIndividualIncoming != null && m.hasOwnProperty("voipIndividualIncoming")) { d.voipIndividualIncoming = o.enums === String ? $root.proto.WebFeatures.Flag[m.voipIndividualIncoming] === undefined ? m.voipIndividualIncoming : $root.proto.WebFeatures.Flag[m.voipIndividualIncoming] : m.voipIndividualIncoming; + if (o.oneofs) + d._voipIndividualIncoming = "voipIndividualIncoming"; } if (m.quickRepliesQuery != null && m.hasOwnProperty("quickRepliesQuery")) { d.quickRepliesQuery = o.enums === String ? $root.proto.WebFeatures.Flag[m.quickRepliesQuery] === undefined ? m.quickRepliesQuery : $root.proto.WebFeatures.Flag[m.quickRepliesQuery] : m.quickRepliesQuery; + if (o.oneofs) + d._quickRepliesQuery = "quickRepliesQuery"; } if (m.payments != null && m.hasOwnProperty("payments")) { d.payments = o.enums === String ? $root.proto.WebFeatures.Flag[m.payments] === undefined ? m.payments : $root.proto.WebFeatures.Flag[m.payments] : m.payments; + if (o.oneofs) + d._payments = "payments"; } if (m.stickerPackQuery != null && m.hasOwnProperty("stickerPackQuery")) { d.stickerPackQuery = o.enums === String ? $root.proto.WebFeatures.Flag[m.stickerPackQuery] === undefined ? m.stickerPackQuery : $root.proto.WebFeatures.Flag[m.stickerPackQuery] : m.stickerPackQuery; + if (o.oneofs) + d._stickerPackQuery = "stickerPackQuery"; } if (m.liveLocationsFinal != null && m.hasOwnProperty("liveLocationsFinal")) { d.liveLocationsFinal = o.enums === String ? $root.proto.WebFeatures.Flag[m.liveLocationsFinal] === undefined ? m.liveLocationsFinal : $root.proto.WebFeatures.Flag[m.liveLocationsFinal] : m.liveLocationsFinal; + if (o.oneofs) + d._liveLocationsFinal = "liveLocationsFinal"; } if (m.labelsEdit != null && m.hasOwnProperty("labelsEdit")) { d.labelsEdit = o.enums === String ? $root.proto.WebFeatures.Flag[m.labelsEdit] === undefined ? m.labelsEdit : $root.proto.WebFeatures.Flag[m.labelsEdit] : m.labelsEdit; + if (o.oneofs) + d._labelsEdit = "labelsEdit"; } if (m.mediaUpload != null && m.hasOwnProperty("mediaUpload")) { d.mediaUpload = o.enums === String ? $root.proto.WebFeatures.Flag[m.mediaUpload] === undefined ? m.mediaUpload : $root.proto.WebFeatures.Flag[m.mediaUpload] : m.mediaUpload; + if (o.oneofs) + d._mediaUpload = "mediaUpload"; } if (m.mediaUploadRichQuickReplies != null && m.hasOwnProperty("mediaUploadRichQuickReplies")) { d.mediaUploadRichQuickReplies = o.enums === String ? $root.proto.WebFeatures.Flag[m.mediaUploadRichQuickReplies] === undefined ? m.mediaUploadRichQuickReplies : $root.proto.WebFeatures.Flag[m.mediaUploadRichQuickReplies] : m.mediaUploadRichQuickReplies; + if (o.oneofs) + d._mediaUploadRichQuickReplies = "mediaUploadRichQuickReplies"; } if (m.vnameV2 != null && m.hasOwnProperty("vnameV2")) { d.vnameV2 = o.enums === String ? $root.proto.WebFeatures.Flag[m.vnameV2] === undefined ? m.vnameV2 : $root.proto.WebFeatures.Flag[m.vnameV2] : m.vnameV2; + if (o.oneofs) + d._vnameV2 = "vnameV2"; } if (m.videoPlaybackUrl != null && m.hasOwnProperty("videoPlaybackUrl")) { d.videoPlaybackUrl = o.enums === String ? $root.proto.WebFeatures.Flag[m.videoPlaybackUrl] === undefined ? m.videoPlaybackUrl : $root.proto.WebFeatures.Flag[m.videoPlaybackUrl] : m.videoPlaybackUrl; + if (o.oneofs) + d._videoPlaybackUrl = "videoPlaybackUrl"; } if (m.statusRanking != null && m.hasOwnProperty("statusRanking")) { d.statusRanking = o.enums === String ? $root.proto.WebFeatures.Flag[m.statusRanking] === undefined ? m.statusRanking : $root.proto.WebFeatures.Flag[m.statusRanking] : m.statusRanking; + if (o.oneofs) + d._statusRanking = "statusRanking"; } if (m.voipIndividualVideo != null && m.hasOwnProperty("voipIndividualVideo")) { d.voipIndividualVideo = o.enums === String ? $root.proto.WebFeatures.Flag[m.voipIndividualVideo] === undefined ? m.voipIndividualVideo : $root.proto.WebFeatures.Flag[m.voipIndividualVideo] : m.voipIndividualVideo; + if (o.oneofs) + d._voipIndividualVideo = "voipIndividualVideo"; } if (m.thirdPartyStickers != null && m.hasOwnProperty("thirdPartyStickers")) { d.thirdPartyStickers = o.enums === String ? $root.proto.WebFeatures.Flag[m.thirdPartyStickers] === undefined ? m.thirdPartyStickers : $root.proto.WebFeatures.Flag[m.thirdPartyStickers] : m.thirdPartyStickers; + if (o.oneofs) + d._thirdPartyStickers = "thirdPartyStickers"; } if (m.frequentlyForwardedSetting != null && m.hasOwnProperty("frequentlyForwardedSetting")) { d.frequentlyForwardedSetting = o.enums === String ? $root.proto.WebFeatures.Flag[m.frequentlyForwardedSetting] === undefined ? m.frequentlyForwardedSetting : $root.proto.WebFeatures.Flag[m.frequentlyForwardedSetting] : m.frequentlyForwardedSetting; + if (o.oneofs) + d._frequentlyForwardedSetting = "frequentlyForwardedSetting"; } if (m.groupsV4JoinPermission != null && m.hasOwnProperty("groupsV4JoinPermission")) { d.groupsV4JoinPermission = o.enums === String ? $root.proto.WebFeatures.Flag[m.groupsV4JoinPermission] === undefined ? m.groupsV4JoinPermission : $root.proto.WebFeatures.Flag[m.groupsV4JoinPermission] : m.groupsV4JoinPermission; + if (o.oneofs) + d._groupsV4JoinPermission = "groupsV4JoinPermission"; } if (m.recentStickers != null && m.hasOwnProperty("recentStickers")) { d.recentStickers = o.enums === String ? $root.proto.WebFeatures.Flag[m.recentStickers] === undefined ? m.recentStickers : $root.proto.WebFeatures.Flag[m.recentStickers] : m.recentStickers; + if (o.oneofs) + d._recentStickers = "recentStickers"; } if (m.catalog != null && m.hasOwnProperty("catalog")) { d.catalog = o.enums === String ? $root.proto.WebFeatures.Flag[m.catalog] === undefined ? m.catalog : $root.proto.WebFeatures.Flag[m.catalog] : m.catalog; + if (o.oneofs) + d._catalog = "catalog"; } if (m.starredStickers != null && m.hasOwnProperty("starredStickers")) { d.starredStickers = o.enums === String ? $root.proto.WebFeatures.Flag[m.starredStickers] === undefined ? m.starredStickers : $root.proto.WebFeatures.Flag[m.starredStickers] : m.starredStickers; + if (o.oneofs) + d._starredStickers = "starredStickers"; } if (m.voipGroupCall != null && m.hasOwnProperty("voipGroupCall")) { d.voipGroupCall = o.enums === String ? $root.proto.WebFeatures.Flag[m.voipGroupCall] === undefined ? m.voipGroupCall : $root.proto.WebFeatures.Flag[m.voipGroupCall] : m.voipGroupCall; + if (o.oneofs) + d._voipGroupCall = "voipGroupCall"; } if (m.templateMessage != null && m.hasOwnProperty("templateMessage")) { d.templateMessage = o.enums === String ? $root.proto.WebFeatures.Flag[m.templateMessage] === undefined ? m.templateMessage : $root.proto.WebFeatures.Flag[m.templateMessage] : m.templateMessage; + if (o.oneofs) + d._templateMessage = "templateMessage"; } if (m.templateMessageInteractivity != null && m.hasOwnProperty("templateMessageInteractivity")) { d.templateMessageInteractivity = o.enums === String ? $root.proto.WebFeatures.Flag[m.templateMessageInteractivity] === undefined ? m.templateMessageInteractivity : $root.proto.WebFeatures.Flag[m.templateMessageInteractivity] : m.templateMessageInteractivity; + if (o.oneofs) + d._templateMessageInteractivity = "templateMessageInteractivity"; } if (m.ephemeralMessages != null && m.hasOwnProperty("ephemeralMessages")) { d.ephemeralMessages = o.enums === String ? $root.proto.WebFeatures.Flag[m.ephemeralMessages] === undefined ? m.ephemeralMessages : $root.proto.WebFeatures.Flag[m.ephemeralMessages] : m.ephemeralMessages; + if (o.oneofs) + d._ephemeralMessages = "ephemeralMessages"; } if (m.e2ENotificationSync != null && m.hasOwnProperty("e2ENotificationSync")) { d.e2ENotificationSync = o.enums === String ? $root.proto.WebFeatures.Flag[m.e2ENotificationSync] === undefined ? m.e2ENotificationSync : $root.proto.WebFeatures.Flag[m.e2ENotificationSync] : m.e2ENotificationSync; + if (o.oneofs) + d._e2ENotificationSync = "e2ENotificationSync"; } if (m.recentStickersV2 != null && m.hasOwnProperty("recentStickersV2")) { d.recentStickersV2 = o.enums === String ? $root.proto.WebFeatures.Flag[m.recentStickersV2] === undefined ? m.recentStickersV2 : $root.proto.WebFeatures.Flag[m.recentStickersV2] : m.recentStickersV2; + if (o.oneofs) + d._recentStickersV2 = "recentStickersV2"; } if (m.recentStickersV3 != null && m.hasOwnProperty("recentStickersV3")) { d.recentStickersV3 = o.enums === String ? $root.proto.WebFeatures.Flag[m.recentStickersV3] === undefined ? m.recentStickersV3 : $root.proto.WebFeatures.Flag[m.recentStickersV3] : m.recentStickersV3; + if (o.oneofs) + d._recentStickersV3 = "recentStickersV3"; } if (m.userNotice != null && m.hasOwnProperty("userNotice")) { d.userNotice = o.enums === String ? $root.proto.WebFeatures.Flag[m.userNotice] === undefined ? m.userNotice : $root.proto.WebFeatures.Flag[m.userNotice] : m.userNotice; + if (o.oneofs) + d._userNotice = "userNotice"; } if (m.support != null && m.hasOwnProperty("support")) { d.support = o.enums === String ? $root.proto.WebFeatures.Flag[m.support] === undefined ? m.support : $root.proto.WebFeatures.Flag[m.support] : m.support; + if (o.oneofs) + d._support = "support"; } if (m.groupUiiCleanup != null && m.hasOwnProperty("groupUiiCleanup")) { d.groupUiiCleanup = o.enums === String ? $root.proto.WebFeatures.Flag[m.groupUiiCleanup] === undefined ? m.groupUiiCleanup : $root.proto.WebFeatures.Flag[m.groupUiiCleanup] : m.groupUiiCleanup; + if (o.oneofs) + d._groupUiiCleanup = "groupUiiCleanup"; } if (m.groupDogfoodingInternalOnly != null && m.hasOwnProperty("groupDogfoodingInternalOnly")) { d.groupDogfoodingInternalOnly = o.enums === String ? $root.proto.WebFeatures.Flag[m.groupDogfoodingInternalOnly] === undefined ? m.groupDogfoodingInternalOnly : $root.proto.WebFeatures.Flag[m.groupDogfoodingInternalOnly] : m.groupDogfoodingInternalOnly; + if (o.oneofs) + d._groupDogfoodingInternalOnly = "groupDogfoodingInternalOnly"; } if (m.settingsSync != null && m.hasOwnProperty("settingsSync")) { d.settingsSync = o.enums === String ? $root.proto.WebFeatures.Flag[m.settingsSync] === undefined ? m.settingsSync : $root.proto.WebFeatures.Flag[m.settingsSync] : m.settingsSync; + if (o.oneofs) + d._settingsSync = "settingsSync"; } if (m.archiveV2 != null && m.hasOwnProperty("archiveV2")) { d.archiveV2 = o.enums === String ? $root.proto.WebFeatures.Flag[m.archiveV2] === undefined ? m.archiveV2 : $root.proto.WebFeatures.Flag[m.archiveV2] : m.archiveV2; + if (o.oneofs) + d._archiveV2 = "archiveV2"; } if (m.ephemeralAllowGroupMembers != null && m.hasOwnProperty("ephemeralAllowGroupMembers")) { d.ephemeralAllowGroupMembers = o.enums === String ? $root.proto.WebFeatures.Flag[m.ephemeralAllowGroupMembers] === undefined ? m.ephemeralAllowGroupMembers : $root.proto.WebFeatures.Flag[m.ephemeralAllowGroupMembers] : m.ephemeralAllowGroupMembers; + if (o.oneofs) + d._ephemeralAllowGroupMembers = "ephemeralAllowGroupMembers"; } if (m.ephemeral24HDuration != null && m.hasOwnProperty("ephemeral24HDuration")) { d.ephemeral24HDuration = o.enums === String ? $root.proto.WebFeatures.Flag[m.ephemeral24HDuration] === undefined ? m.ephemeral24HDuration : $root.proto.WebFeatures.Flag[m.ephemeral24HDuration] : m.ephemeral24HDuration; + if (o.oneofs) + d._ephemeral24HDuration = "ephemeral24HDuration"; } if (m.mdForceUpgrade != null && m.hasOwnProperty("mdForceUpgrade")) { d.mdForceUpgrade = o.enums === String ? $root.proto.WebFeatures.Flag[m.mdForceUpgrade] === undefined ? m.mdForceUpgrade : $root.proto.WebFeatures.Flag[m.mdForceUpgrade] : m.mdForceUpgrade; + if (o.oneofs) + d._mdForceUpgrade = "mdForceUpgrade"; } if (m.disappearingMode != null && m.hasOwnProperty("disappearingMode")) { d.disappearingMode = o.enums === String ? $root.proto.WebFeatures.Flag[m.disappearingMode] === undefined ? m.disappearingMode : $root.proto.WebFeatures.Flag[m.disappearingMode] : m.disappearingMode; + if (o.oneofs) + d._disappearingMode = "disappearingMode"; } if (m.externalMdOptInAvailable != null && m.hasOwnProperty("externalMdOptInAvailable")) { d.externalMdOptInAvailable = o.enums === String ? $root.proto.WebFeatures.Flag[m.externalMdOptInAvailable] === undefined ? m.externalMdOptInAvailable : $root.proto.WebFeatures.Flag[m.externalMdOptInAvailable] : m.externalMdOptInAvailable; + if (o.oneofs) + d._externalMdOptInAvailable = "externalMdOptInAvailable"; } if (m.noDeleteMessageTimeLimit != null && m.hasOwnProperty("noDeleteMessageTimeLimit")) { d.noDeleteMessageTimeLimit = o.enums === String ? $root.proto.WebFeatures.Flag[m.noDeleteMessageTimeLimit] === undefined ? m.noDeleteMessageTimeLimit : $root.proto.WebFeatures.Flag[m.noDeleteMessageTimeLimit] : m.noDeleteMessageTimeLimit; + if (o.oneofs) + d._noDeleteMessageTimeLimit = "noDeleteMessageTimeLimit"; } return d; }; @@ -84288,71 +97896,415 @@ export const proto = $root.proto = (() => { WebMessageInfo.prototype.key = null; WebMessageInfo.prototype.message = null; - WebMessageInfo.prototype.messageTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - WebMessageInfo.prototype.status = 0; - WebMessageInfo.prototype.participant = ""; - WebMessageInfo.prototype.messageC2STimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - WebMessageInfo.prototype.ignore = false; - WebMessageInfo.prototype.starred = false; - WebMessageInfo.prototype.broadcast = false; - WebMessageInfo.prototype.pushName = ""; - WebMessageInfo.prototype.mediaCiphertextSha256 = $util.newBuffer([]); - WebMessageInfo.prototype.multicast = false; - WebMessageInfo.prototype.urlText = false; - WebMessageInfo.prototype.urlNumber = false; - WebMessageInfo.prototype.messageStubType = 0; - WebMessageInfo.prototype.clearMedia = false; + WebMessageInfo.prototype.messageTimestamp = null; + WebMessageInfo.prototype.status = null; + WebMessageInfo.prototype.participant = null; + WebMessageInfo.prototype.messageC2STimestamp = null; + WebMessageInfo.prototype.ignore = null; + WebMessageInfo.prototype.starred = null; + WebMessageInfo.prototype.broadcast = null; + WebMessageInfo.prototype.pushName = null; + WebMessageInfo.prototype.mediaCiphertextSha256 = null; + WebMessageInfo.prototype.multicast = null; + WebMessageInfo.prototype.urlText = null; + WebMessageInfo.prototype.urlNumber = null; + WebMessageInfo.prototype.messageStubType = null; + WebMessageInfo.prototype.clearMedia = null; WebMessageInfo.prototype.messageStubParameters = $util.emptyArray; - WebMessageInfo.prototype.duration = 0; + WebMessageInfo.prototype.duration = null; WebMessageInfo.prototype.labels = $util.emptyArray; WebMessageInfo.prototype.paymentInfo = null; WebMessageInfo.prototype.finalLiveLocation = null; WebMessageInfo.prototype.quotedPaymentInfo = null; - WebMessageInfo.prototype.ephemeralStartTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - WebMessageInfo.prototype.ephemeralDuration = 0; - WebMessageInfo.prototype.ephemeralOffToOn = false; - WebMessageInfo.prototype.ephemeralOutOfSync = false; - WebMessageInfo.prototype.bizPrivacyStatus = 0; - WebMessageInfo.prototype.verifiedBizName = ""; + WebMessageInfo.prototype.ephemeralStartTimestamp = null; + WebMessageInfo.prototype.ephemeralDuration = null; + WebMessageInfo.prototype.ephemeralOffToOn = null; + WebMessageInfo.prototype.ephemeralOutOfSync = null; + WebMessageInfo.prototype.bizPrivacyStatus = null; + WebMessageInfo.prototype.verifiedBizName = null; WebMessageInfo.prototype.mediaData = null; WebMessageInfo.prototype.photoChange = null; WebMessageInfo.prototype.userReceipt = $util.emptyArray; WebMessageInfo.prototype.reactions = $util.emptyArray; WebMessageInfo.prototype.quotedStickerData = null; - WebMessageInfo.prototype.futureproofData = $util.newBuffer([]); + WebMessageInfo.prototype.futureproofData = null; WebMessageInfo.prototype.statusPsa = null; WebMessageInfo.prototype.pollUpdates = $util.emptyArray; WebMessageInfo.prototype.pollAdditionalMetadata = null; - WebMessageInfo.prototype.agentId = ""; - WebMessageInfo.prototype.statusAlreadyViewed = false; - WebMessageInfo.prototype.messageSecret = $util.newBuffer([]); + WebMessageInfo.prototype.agentId = null; + WebMessageInfo.prototype.statusAlreadyViewed = null; + WebMessageInfo.prototype.messageSecret = null; WebMessageInfo.prototype.keepInChat = null; - WebMessageInfo.prototype.originalSelfAuthorUserJidString = ""; - WebMessageInfo.prototype.revokeMessageTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + WebMessageInfo.prototype.originalSelfAuthorUserJidString = null; + WebMessageInfo.prototype.revokeMessageTimestamp = null; WebMessageInfo.prototype.pinInChat = null; WebMessageInfo.prototype.premiumMessageInfo = null; - WebMessageInfo.prototype.is1PBizBotMessage = false; - WebMessageInfo.prototype.isGroupHistoryMessage = false; - WebMessageInfo.prototype.botMessageInvokerJid = ""; + WebMessageInfo.prototype.is1PBizBotMessage = null; + WebMessageInfo.prototype.isGroupHistoryMessage = null; + WebMessageInfo.prototype.botMessageInvokerJid = null; WebMessageInfo.prototype.commentMetadata = null; WebMessageInfo.prototype.eventResponses = $util.emptyArray; WebMessageInfo.prototype.reportingTokenInfo = null; - WebMessageInfo.prototype.newsletterServerId = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + WebMessageInfo.prototype.newsletterServerId = null; WebMessageInfo.prototype.eventAdditionalMetadata = null; - WebMessageInfo.prototype.isMentionedInStatus = false; + WebMessageInfo.prototype.isMentionedInStatus = null; WebMessageInfo.prototype.statusMentions = $util.emptyArray; WebMessageInfo.prototype.targetMessageId = null; WebMessageInfo.prototype.messageAddOns = $util.emptyArray; WebMessageInfo.prototype.statusMentionMessageInfo = null; - WebMessageInfo.prototype.isSupportAiMessage = false; + WebMessageInfo.prototype.isSupportAiMessage = null; WebMessageInfo.prototype.statusMentionSources = $util.emptyArray; WebMessageInfo.prototype.supportAiCitations = $util.emptyArray; - WebMessageInfo.prototype.botTargetId = ""; + WebMessageInfo.prototype.botTargetId = null; WebMessageInfo.prototype.groupHistoryIndividualMessageInfo = null; WebMessageInfo.prototype.groupHistoryBundleInfo = null; WebMessageInfo.prototype.interactiveMessageAdditionalMetadata = null; WebMessageInfo.prototype.quarantinedMessage = null; - WebMessageInfo.prototype.nonJidMentions = 0; + WebMessageInfo.prototype.nonJidMentions = null; + + let $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebMessageInfo.prototype, "_key", { + get: $util.oneOfGetter($oneOfFields = ["key"]), + set: $util.oneOfSetter($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) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebMessageInfo.prototype, "_groupHistoryIndividualMessageInfo", { + get: $util.oneOfGetter($oneOfFields = ["groupHistoryIndividualMessageInfo"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebMessageInfo.prototype, "_groupHistoryBundleInfo", { + get: $util.oneOfGetter($oneOfFields = ["groupHistoryBundleInfo"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebMessageInfo.prototype, "_interactiveMessageAdditionalMetadata", { + get: $util.oneOfGetter($oneOfFields = ["interactiveMessageAdditionalMetadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebMessageInfo.prototype, "_quarantinedMessage", { + get: $util.oneOfGetter($oneOfFields = ["quarantinedMessage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(WebMessageInfo.prototype, "_nonJidMentions", { + get: $util.oneOfGetter($oneOfFields = ["nonJidMentions"]), + set: $util.oneOfSetter($oneOfFields) + }); WebMessageInfo.create = function create(properties) { return new WebMessageInfo(properties); @@ -84361,7 +98313,8 @@ export const proto = $root.proto = (() => { WebMessageInfo.encode = function encode(m, w) { if (!w) w = $Writer.create(); - $root.proto.MessageKey.encode(m.key, w.uint32(10).fork()).ldelim(); + if (m.key != null && Object.hasOwnProperty.call(m, "key")) + $root.proto.MessageKey.encode(m.key, w.uint32(10).fork()).ldelim(); if (m.message != null && Object.hasOwnProperty.call(m, "message")) $root.proto.Message.encode(m.message, w.uint32(18).fork()).ldelim(); if (m.messageTimestamp != null && Object.hasOwnProperty.call(m, "messageTimestamp")) @@ -84819,8 +98772,6 @@ export const proto = $root.proto = (() => { break; } } - if (!m.hasOwnProperty("key")) - throw $util.ProtocolError("missing required 'key'", { instance: m }); return m; }; @@ -86149,156 +100100,91 @@ export const proto = $root.proto = (() => { d.statusMentionSources = []; d.supportAiCitations = []; } - if (o.defaults) { - d.key = null; - d.message = null; - if ($util.Long) { - var n = new $util.Long(0, 0, true); - d.messageTimestamp = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.messageTimestamp = o.longs === String ? "0" : 0; - d.status = o.enums === String ? "ERROR" : 0; - d.participant = ""; - if ($util.Long) { - var n = new $util.Long(0, 0, true); - d.messageC2STimestamp = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.messageC2STimestamp = o.longs === String ? "0" : 0; - d.ignore = false; - d.starred = false; - d.broadcast = false; - d.pushName = ""; - if (o.bytes === String) - d.mediaCiphertextSha256 = ""; - else { - d.mediaCiphertextSha256 = []; - if (o.bytes !== Array) - d.mediaCiphertextSha256 = $util.newBuffer(d.mediaCiphertextSha256); - } - d.multicast = false; - d.urlText = false; - d.urlNumber = false; - d.messageStubType = o.enums === String ? "UNKNOWN" : 0; - d.clearMedia = false; - d.duration = 0; - d.paymentInfo = null; - d.finalLiveLocation = null; - d.quotedPaymentInfo = null; - if ($util.Long) { - var n = new $util.Long(0, 0, true); - d.ephemeralStartTimestamp = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.ephemeralStartTimestamp = o.longs === String ? "0" : 0; - d.ephemeralDuration = 0; - d.ephemeralOffToOn = false; - d.ephemeralOutOfSync = false; - d.bizPrivacyStatus = o.enums === String ? "E2EE" : 0; - d.verifiedBizName = ""; - d.mediaData = null; - d.photoChange = null; - d.quotedStickerData = null; - if (o.bytes === String) - d.futureproofData = ""; - else { - d.futureproofData = []; - if (o.bytes !== Array) - d.futureproofData = $util.newBuffer(d.futureproofData); - } - d.statusPsa = null; - d.pollAdditionalMetadata = null; - d.agentId = ""; - d.statusAlreadyViewed = false; - if (o.bytes === String) - d.messageSecret = ""; - else { - d.messageSecret = []; - if (o.bytes !== Array) - d.messageSecret = $util.newBuffer(d.messageSecret); - } - d.keepInChat = null; - d.originalSelfAuthorUserJidString = ""; - if ($util.Long) { - var n = new $util.Long(0, 0, true); - d.revokeMessageTimestamp = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.revokeMessageTimestamp = o.longs === String ? "0" : 0; - d.pinInChat = null; - d.premiumMessageInfo = null; - d.is1PBizBotMessage = false; - d.isGroupHistoryMessage = false; - d.botMessageInvokerJid = ""; - d.commentMetadata = null; - d.reportingTokenInfo = null; - if ($util.Long) { - var n = new $util.Long(0, 0, true); - d.newsletterServerId = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.newsletterServerId = o.longs === String ? "0" : 0; - d.eventAdditionalMetadata = null; - d.isMentionedInStatus = false; - d.targetMessageId = null; - d.statusMentionMessageInfo = null; - d.isSupportAiMessage = false; - d.botTargetId = ""; - d.groupHistoryIndividualMessageInfo = null; - d.groupHistoryBundleInfo = null; - d.interactiveMessageAdditionalMetadata = null; - d.quarantinedMessage = null; - d.nonJidMentions = 0; - } if (m.key != null && m.hasOwnProperty("key")) { d.key = $root.proto.MessageKey.toObject(m.key, o); + if (o.oneofs) + d._key = "key"; } if (m.message != null && m.hasOwnProperty("message")) { d.message = $root.proto.Message.toObject(m.message, o); + if (o.oneofs) + d._message = "message"; } if (m.messageTimestamp != null && m.hasOwnProperty("messageTimestamp")) { if (typeof m.messageTimestamp === "number") d.messageTimestamp = o.longs === String ? String(m.messageTimestamp) : m.messageTimestamp; else d.messageTimestamp = o.longs === String ? longToString(m.messageTimestamp, true) : o.longs === Number ? longToNumber(m.messageTimestamp, true) : m.messageTimestamp; + if (o.oneofs) + d._messageTimestamp = "messageTimestamp"; } if (m.status != null && m.hasOwnProperty("status")) { d.status = o.enums === String ? $root.proto.WebMessageInfo.Status[m.status] === undefined ? m.status : $root.proto.WebMessageInfo.Status[m.status] : m.status; + if (o.oneofs) + d._status = "status"; } if (m.participant != null && m.hasOwnProperty("participant")) { d.participant = m.participant; + if (o.oneofs) + d._participant = "participant"; } if (m.messageC2STimestamp != null && m.hasOwnProperty("messageC2STimestamp")) { if (typeof m.messageC2STimestamp === "number") d.messageC2STimestamp = o.longs === String ? String(m.messageC2STimestamp) : m.messageC2STimestamp; else d.messageC2STimestamp = o.longs === String ? longToString(m.messageC2STimestamp, true) : o.longs === Number ? longToNumber(m.messageC2STimestamp, true) : m.messageC2STimestamp; + if (o.oneofs) + d._messageC2STimestamp = "messageC2STimestamp"; } if (m.ignore != null && m.hasOwnProperty("ignore")) { d.ignore = m.ignore; + if (o.oneofs) + d._ignore = "ignore"; } if (m.starred != null && m.hasOwnProperty("starred")) { d.starred = m.starred; + if (o.oneofs) + d._starred = "starred"; } if (m.broadcast != null && m.hasOwnProperty("broadcast")) { d.broadcast = m.broadcast; + if (o.oneofs) + d._broadcast = "broadcast"; } if (m.pushName != null && m.hasOwnProperty("pushName")) { d.pushName = m.pushName; + if (o.oneofs) + d._pushName = "pushName"; } if (m.mediaCiphertextSha256 != null && m.hasOwnProperty("mediaCiphertextSha256")) { d.mediaCiphertextSha256 = o.bytes === String ? $util.base64.encode(m.mediaCiphertextSha256, 0, m.mediaCiphertextSha256.length) : o.bytes === Array ? Array.prototype.slice.call(m.mediaCiphertextSha256) : m.mediaCiphertextSha256; + if (o.oneofs) + d._mediaCiphertextSha256 = "mediaCiphertextSha256"; } if (m.multicast != null && m.hasOwnProperty("multicast")) { d.multicast = m.multicast; + if (o.oneofs) + d._multicast = "multicast"; } if (m.urlText != null && m.hasOwnProperty("urlText")) { d.urlText = m.urlText; + if (o.oneofs) + d._urlText = "urlText"; } if (m.urlNumber != null && m.hasOwnProperty("urlNumber")) { d.urlNumber = m.urlNumber; + if (o.oneofs) + d._urlNumber = "urlNumber"; } if (m.messageStubType != null && m.hasOwnProperty("messageStubType")) { d.messageStubType = o.enums === String ? $root.proto.WebMessageInfo.StubType[m.messageStubType] === undefined ? m.messageStubType : $root.proto.WebMessageInfo.StubType[m.messageStubType] : m.messageStubType; + if (o.oneofs) + d._messageStubType = "messageStubType"; } if (m.clearMedia != null && m.hasOwnProperty("clearMedia")) { d.clearMedia = m.clearMedia; + if (o.oneofs) + d._clearMedia = "clearMedia"; } if (m.messageStubParameters && m.messageStubParameters.length) { d.messageStubParameters = []; @@ -86308,6 +100194,8 @@ export const proto = $root.proto = (() => { } if (m.duration != null && m.hasOwnProperty("duration")) { d.duration = m.duration; + if (o.oneofs) + d._duration = "duration"; } if (m.labels && m.labels.length) { d.labels = []; @@ -86317,39 +100205,61 @@ export const proto = $root.proto = (() => { } if (m.paymentInfo != null && m.hasOwnProperty("paymentInfo")) { d.paymentInfo = $root.proto.PaymentInfo.toObject(m.paymentInfo, o); + if (o.oneofs) + d._paymentInfo = "paymentInfo"; } if (m.finalLiveLocation != null && m.hasOwnProperty("finalLiveLocation")) { d.finalLiveLocation = $root.proto.Message.LiveLocationMessage.toObject(m.finalLiveLocation, o); + if (o.oneofs) + d._finalLiveLocation = "finalLiveLocation"; } if (m.quotedPaymentInfo != null && m.hasOwnProperty("quotedPaymentInfo")) { d.quotedPaymentInfo = $root.proto.PaymentInfo.toObject(m.quotedPaymentInfo, o); + if (o.oneofs) + d._quotedPaymentInfo = "quotedPaymentInfo"; } if (m.ephemeralStartTimestamp != null && m.hasOwnProperty("ephemeralStartTimestamp")) { if (typeof m.ephemeralStartTimestamp === "number") d.ephemeralStartTimestamp = o.longs === String ? String(m.ephemeralStartTimestamp) : m.ephemeralStartTimestamp; else d.ephemeralStartTimestamp = o.longs === String ? longToString(m.ephemeralStartTimestamp, true) : o.longs === Number ? longToNumber(m.ephemeralStartTimestamp, true) : m.ephemeralStartTimestamp; + if (o.oneofs) + d._ephemeralStartTimestamp = "ephemeralStartTimestamp"; } if (m.ephemeralDuration != null && m.hasOwnProperty("ephemeralDuration")) { d.ephemeralDuration = m.ephemeralDuration; + if (o.oneofs) + d._ephemeralDuration = "ephemeralDuration"; } if (m.ephemeralOffToOn != null && m.hasOwnProperty("ephemeralOffToOn")) { d.ephemeralOffToOn = m.ephemeralOffToOn; + if (o.oneofs) + d._ephemeralOffToOn = "ephemeralOffToOn"; } if (m.ephemeralOutOfSync != null && m.hasOwnProperty("ephemeralOutOfSync")) { d.ephemeralOutOfSync = m.ephemeralOutOfSync; + if (o.oneofs) + d._ephemeralOutOfSync = "ephemeralOutOfSync"; } if (m.bizPrivacyStatus != null && m.hasOwnProperty("bizPrivacyStatus")) { d.bizPrivacyStatus = o.enums === String ? $root.proto.WebMessageInfo.BizPrivacyStatus[m.bizPrivacyStatus] === undefined ? m.bizPrivacyStatus : $root.proto.WebMessageInfo.BizPrivacyStatus[m.bizPrivacyStatus] : m.bizPrivacyStatus; + if (o.oneofs) + d._bizPrivacyStatus = "bizPrivacyStatus"; } if (m.verifiedBizName != null && m.hasOwnProperty("verifiedBizName")) { d.verifiedBizName = m.verifiedBizName; + if (o.oneofs) + d._verifiedBizName = "verifiedBizName"; } if (m.mediaData != null && m.hasOwnProperty("mediaData")) { d.mediaData = $root.proto.MediaData.toObject(m.mediaData, o); + if (o.oneofs) + d._mediaData = "mediaData"; } if (m.photoChange != null && m.hasOwnProperty("photoChange")) { d.photoChange = $root.proto.PhotoChange.toObject(m.photoChange, o); + if (o.oneofs) + d._photoChange = "photoChange"; } if (m.userReceipt && m.userReceipt.length) { d.userReceipt = []; @@ -86365,12 +100275,18 @@ export const proto = $root.proto = (() => { } if (m.quotedStickerData != null && m.hasOwnProperty("quotedStickerData")) { d.quotedStickerData = $root.proto.MediaData.toObject(m.quotedStickerData, o); + if (o.oneofs) + d._quotedStickerData = "quotedStickerData"; } if (m.futureproofData != null && m.hasOwnProperty("futureproofData")) { d.futureproofData = o.bytes === String ? $util.base64.encode(m.futureproofData, 0, m.futureproofData.length) : o.bytes === Array ? Array.prototype.slice.call(m.futureproofData) : m.futureproofData; + if (o.oneofs) + d._futureproofData = "futureproofData"; } if (m.statusPsa != null && m.hasOwnProperty("statusPsa")) { d.statusPsa = $root.proto.StatusPSA.toObject(m.statusPsa, o); + if (o.oneofs) + d._statusPsa = "statusPsa"; } if (m.pollUpdates && m.pollUpdates.length) { d.pollUpdates = []; @@ -86380,45 +100296,71 @@ export const proto = $root.proto = (() => { } if (m.pollAdditionalMetadata != null && m.hasOwnProperty("pollAdditionalMetadata")) { d.pollAdditionalMetadata = $root.proto.PollAdditionalMetadata.toObject(m.pollAdditionalMetadata, o); + if (o.oneofs) + d._pollAdditionalMetadata = "pollAdditionalMetadata"; } if (m.agentId != null && m.hasOwnProperty("agentId")) { d.agentId = m.agentId; + if (o.oneofs) + d._agentId = "agentId"; } if (m.statusAlreadyViewed != null && m.hasOwnProperty("statusAlreadyViewed")) { d.statusAlreadyViewed = m.statusAlreadyViewed; + if (o.oneofs) + d._statusAlreadyViewed = "statusAlreadyViewed"; } if (m.messageSecret != null && m.hasOwnProperty("messageSecret")) { d.messageSecret = o.bytes === String ? $util.base64.encode(m.messageSecret, 0, m.messageSecret.length) : o.bytes === Array ? Array.prototype.slice.call(m.messageSecret) : m.messageSecret; + if (o.oneofs) + d._messageSecret = "messageSecret"; } if (m.keepInChat != null && m.hasOwnProperty("keepInChat")) { d.keepInChat = $root.proto.KeepInChat.toObject(m.keepInChat, o); + if (o.oneofs) + d._keepInChat = "keepInChat"; } if (m.originalSelfAuthorUserJidString != null && m.hasOwnProperty("originalSelfAuthorUserJidString")) { d.originalSelfAuthorUserJidString = m.originalSelfAuthorUserJidString; + if (o.oneofs) + d._originalSelfAuthorUserJidString = "originalSelfAuthorUserJidString"; } if (m.revokeMessageTimestamp != null && m.hasOwnProperty("revokeMessageTimestamp")) { if (typeof m.revokeMessageTimestamp === "number") d.revokeMessageTimestamp = o.longs === String ? String(m.revokeMessageTimestamp) : m.revokeMessageTimestamp; else d.revokeMessageTimestamp = o.longs === String ? longToString(m.revokeMessageTimestamp, true) : o.longs === Number ? longToNumber(m.revokeMessageTimestamp, true) : m.revokeMessageTimestamp; + if (o.oneofs) + d._revokeMessageTimestamp = "revokeMessageTimestamp"; } if (m.pinInChat != null && m.hasOwnProperty("pinInChat")) { d.pinInChat = $root.proto.PinInChat.toObject(m.pinInChat, o); + if (o.oneofs) + d._pinInChat = "pinInChat"; } if (m.premiumMessageInfo != null && m.hasOwnProperty("premiumMessageInfo")) { d.premiumMessageInfo = $root.proto.PremiumMessageInfo.toObject(m.premiumMessageInfo, o); + if (o.oneofs) + d._premiumMessageInfo = "premiumMessageInfo"; } if (m.is1PBizBotMessage != null && m.hasOwnProperty("is1PBizBotMessage")) { d.is1PBizBotMessage = m.is1PBizBotMessage; + if (o.oneofs) + d._is1PBizBotMessage = "is1PBizBotMessage"; } if (m.isGroupHistoryMessage != null && m.hasOwnProperty("isGroupHistoryMessage")) { d.isGroupHistoryMessage = m.isGroupHistoryMessage; + if (o.oneofs) + d._isGroupHistoryMessage = "isGroupHistoryMessage"; } if (m.botMessageInvokerJid != null && m.hasOwnProperty("botMessageInvokerJid")) { d.botMessageInvokerJid = m.botMessageInvokerJid; + if (o.oneofs) + d._botMessageInvokerJid = "botMessageInvokerJid"; } if (m.commentMetadata != null && m.hasOwnProperty("commentMetadata")) { d.commentMetadata = $root.proto.CommentMetadata.toObject(m.commentMetadata, o); + if (o.oneofs) + d._commentMetadata = "commentMetadata"; } if (m.eventResponses && m.eventResponses.length) { d.eventResponses = []; @@ -86428,18 +100370,26 @@ export const proto = $root.proto = (() => { } if (m.reportingTokenInfo != null && m.hasOwnProperty("reportingTokenInfo")) { d.reportingTokenInfo = $root.proto.ReportingTokenInfo.toObject(m.reportingTokenInfo, o); + if (o.oneofs) + d._reportingTokenInfo = "reportingTokenInfo"; } if (m.newsletterServerId != null && m.hasOwnProperty("newsletterServerId")) { if (typeof m.newsletterServerId === "number") d.newsletterServerId = o.longs === String ? String(m.newsletterServerId) : m.newsletterServerId; else d.newsletterServerId = o.longs === String ? longToString(m.newsletterServerId, true) : o.longs === Number ? longToNumber(m.newsletterServerId, true) : m.newsletterServerId; + if (o.oneofs) + d._newsletterServerId = "newsletterServerId"; } if (m.eventAdditionalMetadata != null && m.hasOwnProperty("eventAdditionalMetadata")) { d.eventAdditionalMetadata = $root.proto.EventAdditionalMetadata.toObject(m.eventAdditionalMetadata, o); + if (o.oneofs) + d._eventAdditionalMetadata = "eventAdditionalMetadata"; } if (m.isMentionedInStatus != null && m.hasOwnProperty("isMentionedInStatus")) { d.isMentionedInStatus = m.isMentionedInStatus; + if (o.oneofs) + d._isMentionedInStatus = "isMentionedInStatus"; } if (m.statusMentions && m.statusMentions.length) { d.statusMentions = []; @@ -86449,6 +100399,8 @@ export const proto = $root.proto = (() => { } if (m.targetMessageId != null && m.hasOwnProperty("targetMessageId")) { d.targetMessageId = $root.proto.MessageKey.toObject(m.targetMessageId, o); + if (o.oneofs) + d._targetMessageId = "targetMessageId"; } if (m.messageAddOns && m.messageAddOns.length) { d.messageAddOns = []; @@ -86458,9 +100410,13 @@ export const proto = $root.proto = (() => { } if (m.statusMentionMessageInfo != null && m.hasOwnProperty("statusMentionMessageInfo")) { d.statusMentionMessageInfo = $root.proto.StatusMentionMessage.toObject(m.statusMentionMessageInfo, o); + if (o.oneofs) + d._statusMentionMessageInfo = "statusMentionMessageInfo"; } if (m.isSupportAiMessage != null && m.hasOwnProperty("isSupportAiMessage")) { d.isSupportAiMessage = m.isSupportAiMessage; + if (o.oneofs) + d._isSupportAiMessage = "isSupportAiMessage"; } if (m.statusMentionSources && m.statusMentionSources.length) { d.statusMentionSources = []; @@ -86476,21 +100432,33 @@ export const proto = $root.proto = (() => { } if (m.botTargetId != null && m.hasOwnProperty("botTargetId")) { d.botTargetId = m.botTargetId; + if (o.oneofs) + d._botTargetId = "botTargetId"; } if (m.groupHistoryIndividualMessageInfo != null && m.hasOwnProperty("groupHistoryIndividualMessageInfo")) { d.groupHistoryIndividualMessageInfo = $root.proto.GroupHistoryIndividualMessageInfo.toObject(m.groupHistoryIndividualMessageInfo, o); + if (o.oneofs) + d._groupHistoryIndividualMessageInfo = "groupHistoryIndividualMessageInfo"; } if (m.groupHistoryBundleInfo != null && m.hasOwnProperty("groupHistoryBundleInfo")) { d.groupHistoryBundleInfo = $root.proto.GroupHistoryBundleInfo.toObject(m.groupHistoryBundleInfo, o); + if (o.oneofs) + d._groupHistoryBundleInfo = "groupHistoryBundleInfo"; } if (m.interactiveMessageAdditionalMetadata != null && m.hasOwnProperty("interactiveMessageAdditionalMetadata")) { d.interactiveMessageAdditionalMetadata = $root.proto.InteractiveMessageAdditionalMetadata.toObject(m.interactiveMessageAdditionalMetadata, o); + if (o.oneofs) + d._interactiveMessageAdditionalMetadata = "interactiveMessageAdditionalMetadata"; } if (m.quarantinedMessage != null && m.hasOwnProperty("quarantinedMessage")) { d.quarantinedMessage = $root.proto.QuarantinedMessage.toObject(m.quarantinedMessage, o); + if (o.oneofs) + d._quarantinedMessage = "quarantinedMessage"; } if (m.nonJidMentions != null && m.hasOwnProperty("nonJidMentions")) { d.nonJidMentions = m.nonJidMentions; + if (o.oneofs) + d._nonJidMentions = "nonJidMentions"; } return d; }; @@ -86768,11 +100736,31 @@ export const proto = $root.proto = (() => { this[ks[i]] = p[ks[i]]; } - WebNotificationsInfo.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - WebNotificationsInfo.prototype.unreadChats = 0; - WebNotificationsInfo.prototype.notifyMessageCount = 0; + WebNotificationsInfo.prototype.timestamp = null; + WebNotificationsInfo.prototype.unreadChats = null; + WebNotificationsInfo.prototype.notifyMessageCount = null; WebNotificationsInfo.prototype.notifyMessages = $util.emptyArray; + let $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) + }); + WebNotificationsInfo.create = function create(properties) { return new WebNotificationsInfo(properties); }; @@ -86868,26 +100856,23 @@ export const proto = $root.proto = (() => { if (o.arrays || o.defaults) { d.notifyMessages = []; } - if (o.defaults) { - if ($util.Long) { - var n = new $util.Long(0, 0, true); - d.timestamp = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.timestamp = o.longs === String ? "0" : 0; - d.unreadChats = 0; - d.notifyMessageCount = 0; - } if (m.timestamp != null && m.hasOwnProperty("timestamp")) { if (typeof m.timestamp === "number") d.timestamp = o.longs === String ? String(m.timestamp) : m.timestamp; else d.timestamp = o.longs === String ? longToString(m.timestamp, true) : o.longs === Number ? longToNumber(m.timestamp, true) : m.timestamp; + if (o.oneofs) + d._timestamp = "timestamp"; } if (m.unreadChats != null && m.hasOwnProperty("unreadChats")) { d.unreadChats = m.unreadChats; + if (o.oneofs) + d._unreadChats = "unreadChats"; } if (m.notifyMessageCount != null && m.hasOwnProperty("notifyMessageCount")) { d.notifyMessageCount = m.notifyMessageCount; + if (o.oneofs) + d._notifyMessageCount = "notifyMessageCount"; } if (m.notifyMessages && m.notifyMessages.length) { d.notifyMessages = [];