syntax = "proto2";
package WAAICommon;
option go_package = "git.bobomao.top/joey/whatsmeow/proto/waAICommon";

import "waCommon/WACommon.proto";

enum BotMetricsEntryPoint {
	UNDEFINED_ENTRY_POINT = 0;
	FAVICON = 1;
	CHATLIST = 2;
	AISEARCH_NULL_STATE_PAPER_PLANE = 3;
	AISEARCH_NULL_STATE_SUGGESTION = 4;
	AISEARCH_TYPE_AHEAD_SUGGESTION = 5;
	AISEARCH_TYPE_AHEAD_PAPER_PLANE = 6;
	AISEARCH_TYPE_AHEAD_RESULT_CHATLIST = 7;
	AISEARCH_TYPE_AHEAD_RESULT_MESSAGES = 8;
	AIVOICE_SEARCH_BAR = 9;
	AIVOICE_FAVICON = 10;
	AISTUDIO = 11;
	DEEPLINK = 12;
	NOTIFICATION = 13;
	PROFILE_MESSAGE_BUTTON = 14;
	FORWARD = 15;
	APP_SHORTCUT = 16;
	FF_FAMILY = 17;
	AI_TAB = 18;
	AI_HOME = 19;
	AI_DEEPLINK_IMMERSIVE = 20;
	AI_DEEPLINK = 21;
	META_AI_CHAT_SHORTCUT_AI_STUDIO = 22;
	UGC_CHAT_SHORTCUT_AI_STUDIO = 23;
	NEW_CHAT_AI_STUDIO = 24;
	AIVOICE_FAVICON_CALL_HISTORY = 25;
	ASK_META_AI_CONTEXT_MENU = 26;
	ASK_META_AI_CONTEXT_MENU_1ON1 = 27;
	ASK_META_AI_CONTEXT_MENU_GROUP = 28;
	INVOKE_META_AI_1ON1 = 29;
	INVOKE_META_AI_GROUP = 30;
	META_AI_FORWARD = 31;
	NEW_CHAT_AI_CONTACT = 32;
	MESSAGE_QUICK_ACTION_1_ON_1_CHAT = 33;
	MESSAGE_QUICK_ACTION_GROUP_CHAT = 34;
	ATTACHMENT_TRAY_1_ON_1_CHAT = 35;
	ATTACHMENT_TRAY_GROUP_CHAT = 36;
}

enum BotMetricsThreadEntryPoint {
	AI_TAB_THREAD = 1;
	AI_HOME_THREAD = 2;
	AI_DEEPLINK_IMMERSIVE_THREAD = 3;
	AI_DEEPLINK_THREAD = 4;
	ASK_META_AI_CONTEXT_MENU_THREAD = 5;
}

enum BotSessionSource {
	NONE = 0;
	NULL_STATE = 1;
	TYPEAHEAD = 2;
	USER_INPUT = 3;
	EMU_FLASH = 4;
	EMU_FLASH_FOLLOWUP = 5;
	VOICE = 6;
}

enum AIRichResponseMessageType {
	AI_RICH_RESPONSE_TYPE_UNKNOWN = 0;
	AI_RICH_RESPONSE_TYPE_STANDARD = 1;
}

enum AIRichResponseSubMessageType {
	AI_RICH_RESPONSE_UNKNOWN = 0;
	AI_RICH_RESPONSE_GRID_IMAGE = 1;
	AI_RICH_RESPONSE_TEXT = 2;
	AI_RICH_RESPONSE_INLINE_IMAGE = 3;
	AI_RICH_RESPONSE_TABLE = 4;
	AI_RICH_RESPONSE_CODE = 5;
	AI_RICH_RESPONSE_DYNAMIC = 6;
	AI_RICH_RESPONSE_MAP = 7;
	AI_RICH_RESPONSE_LATEX = 8;
	AI_RICH_RESPONSE_CONTENT_ITEMS = 9;
}

message BotPluginMetadata {
	enum PluginType {
		UNKNOWN_PLUGIN = 0;
		REELS = 1;
		SEARCH = 2;
	}

	enum SearchProvider {
		UNKNOWN = 0;
		BING = 1;
		GOOGLE = 2;
		SUPPORT = 3;
	}

	optional SearchProvider provider = 1;
	optional PluginType pluginType = 2;
	optional string thumbnailCDNURL = 3;
	optional string profilePhotoCDNURL = 4;
	optional string searchProviderURL = 5;
	optional uint32 referenceIndex = 6;
	optional uint32 expectedLinksCount = 7;
	optional string searchQuery = 9;
	optional WACommon.MessageKey parentPluginMessageKey = 10;
	optional PluginType deprecatedField = 11;
	optional PluginType parentPluginType = 12;
	optional string faviconCDNURL = 13;
}

message BotLinkedAccount {
	enum BotLinkedAccountType {
		BOT_LINKED_ACCOUNT_TYPE_1P = 0;
	}

	optional BotLinkedAccountType type = 1;
}

message BotSignatureVerificationUseCaseProof {
	enum BotSignatureUseCase {
		UNSPECIFIED = 0;
		WA_BOT_MSG = 1;
	}

	optional int32 version = 1;
	optional BotSignatureUseCase useCase = 2;
	optional bytes signature = 3;
	repeated bytes certificateChain = 4;
}

message BotPromotionMessageMetadata {
	enum BotPromotionType {
		UNKNOWN_TYPE = 0;
		C50 = 1;
		SURVEY_PLATFORM = 2;
	}

	optional BotPromotionType promotionType = 1;
	optional string buttonTitle = 2;
}

message BotMediaMetadata {
	enum OrientationType {
		CENTER = 1;
		LEFT = 2;
		RIGHT = 3;
	}

	optional string fileSHA256 = 1;
	optional string mediaKey = 2;
	optional string fileEncSHA256 = 3;
	optional string directPath = 4;
	optional int64 mediaKeyTimestamp = 5;
	optional string mimetype = 6;
	optional OrientationType orientationType = 7;
}

message BotReminderMetadata {
	enum ReminderFrequency {
		ONCE = 1;
		DAILY = 2;
		WEEKLY = 3;
		BIWEEKLY = 4;
		MONTHLY = 5;
	}

	enum ReminderAction {
		NOTIFY = 1;
		CREATE = 2;
		DELETE = 3;
		UPDATE = 4;
	}

	optional WACommon.MessageKey requestMessageKey = 1;
	optional ReminderAction action = 2;
	optional string name = 3;
	optional uint64 nextTriggerTimestamp = 4;
	optional ReminderFrequency frequency = 5;
}

message BotModelMetadata {
	enum PremiumModelStatus {
		UNKNOWN_STATUS = 0;
		AVAILABLE = 1;
		QUOTA_EXCEED_LIMIT = 2;
	}

	enum ModelType {
		UNKNOWN_TYPE = 0;
		LLAMA_PROD = 1;
		LLAMA_PROD_PREMIUM = 2;
	}

	optional ModelType modelType = 1;
	optional PremiumModelStatus premiumModelStatus = 2;
}

message BotProgressIndicatorMetadata {
	message BotPlanningStepMetadata {
		enum BotSearchSourceProvider {
			UNKNOWN_PROVIDER = 0;
			OTHER = 1;
			GOOGLE = 2;
			BING = 3;
		}

		enum PlanningStepStatus {
			UNKNOWN = 0;
			PLANNED = 1;
			EXECUTING = 2;
			FINISHED = 3;
		}

		message BotPlanningSearchSourcesMetadata {
			enum BotPlanningSearchSourceProvider {
				UNKNOWN = 0;
				OTHER = 1;
				GOOGLE = 2;
				BING = 3;
			}

			optional string sourceTitle = 1;
			optional BotPlanningSearchSourceProvider provider = 2;
			optional string sourceURL = 3;
		}

		message BotPlanningStepSectionMetadata {
			optional string sectionTitle = 1;
			optional string sectionBody = 2;
			repeated BotPlanningSearchSourceMetadata sourcesMetadata = 3;
		}

		message BotPlanningSearchSourceMetadata {
			optional string title = 1;
			optional BotSearchSourceProvider provider = 2;
			optional string sourceURL = 3;
			optional string favIconURL = 4;
		}

		optional string statusTitle = 1;
		optional string statusBody = 2;
		repeated BotPlanningSearchSourcesMetadata sourcesMetadata = 3;
		optional PlanningStepStatus status = 4;
		optional bool isReasoning = 5;
		optional bool isEnhancedSearch = 6;
		repeated BotPlanningStepSectionMetadata sections = 7;
	}

	optional string progressDescription = 1;
	repeated BotPlanningStepMetadata stepsMetadata = 2;
}

message BotCapabilityMetadata {
	enum BotCapabilityType {
		UNKNOWN = 0;
		PROGRESS_INDICATOR = 1;
		RICH_RESPONSE_HEADING = 2;
		RICH_RESPONSE_NESTED_LIST = 3;
		AI_MEMORY = 4;
		RICH_RESPONSE_THREAD_SURFING = 5;
		RICH_RESPONSE_TABLE = 6;
		RICH_RESPONSE_CODE = 7;
		RICH_RESPONSE_STRUCTURED_RESPONSE = 8;
		RICH_RESPONSE_INLINE_IMAGE = 9;
		WA_IG_1P_PLUGIN_RANKING_CONTROL = 10;
		WA_IG_1P_PLUGIN_RANKING_UPDATE_1 = 11;
		WA_IG_1P_PLUGIN_RANKING_UPDATE_2 = 12;
		WA_IG_1P_PLUGIN_RANKING_UPDATE_3 = 13;
		WA_IG_1P_PLUGIN_RANKING_UPDATE_4 = 14;
		WA_IG_1P_PLUGIN_RANKING_UPDATE_5 = 15;
		WA_IG_1P_PLUGIN_RANKING_UPDATE_6 = 16;
		WA_IG_1P_PLUGIN_RANKING_UPDATE_7 = 17;
		WA_IG_1P_PLUGIN_RANKING_UPDATE_8 = 18;
		WA_IG_1P_PLUGIN_RANKING_UPDATE_9 = 19;
		WA_IG_1P_PLUGIN_RANKING_UPDATE_10 = 20;
		RICH_RESPONSE_SUB_HEADING = 21;
		RICH_RESPONSE_GRID_IMAGE = 22;
		AI_STUDIO_UGC_MEMORY = 23;
		RICH_RESPONSE_LATEX = 24;
		RICH_RESPONSE_MAPS = 25;
		RICH_RESPONSE_INLINE_REELS = 26;
		AGENTIC_PLANNING = 27;
		ACCOUNT_LINKING = 28;
		STREAMING_DISAGGREGATION = 29;
		RICH_RESPONSE_GRID_IMAGE_3P = 30;
		RICH_RESPONSE_LATEX_INLINE = 31;
		QUERY_PLAN = 32;
		PROACTIVE_MESSAGE = 33;
		RICH_RESPONSE_UNIFIED_RESPONSE = 34;
		PROMOTION_MESSAGE = 35;
		SIMPLIFIED_PROFILE_PAGE = 36;
		RICH_RESPONSE_SOURCES_IN_MESSAGE = 37;
		RICH_RESPONSE_SIDE_BY_SIDE_SURVEY = 38;
		RICH_RESPONSE_UNIFIED_TEXT_COMPONENT = 39;
		AI_SHARED_MEMORY = 40;
		RICH_RESPONSE_UNIFIED_SOURCES = 41;
		RICH_RESPONSE_UNIFIED_DOMAIN_CITATIONS = 42;
		RICH_RESPONSE_UR_INLINE_REELS_ENABLED = 43;
		RICH_RESPONSE_UR_MEDIA_GRID_ENABLED = 44;
		RICH_RESPONSE_UR_TIMESTAMP_PLACEHOLDER = 45;
	}

	repeated BotCapabilityType capabilities = 1;
}

message BotModeSelectionMetadata {
	enum BotUserSelectionMode {
		UNKNOWN_MODE = 0;
		REASONING_MODE = 1;
	}

	repeated BotUserSelectionMode mode = 1;
}

message BotQuotaMetadata {
	message BotFeatureQuotaMetadata {
		enum BotFeatureType {
			UNKNOWN_FEATURE = 0;
			REASONING_FEATURE = 1;
		}

		optional BotFeatureType featureType = 1;
		optional uint32 remainingQuota = 2;
		optional uint64 expirationTimestamp = 3;
	}

	repeated BotFeatureQuotaMetadata botFeatureQuotaMetadata = 1;
}

message BotImagineMetadata {
	enum ImagineType {
		UNKNOWN = 0;
		IMAGINE = 1;
		MEMU = 2;
		FLASH = 3;
		EDIT = 4;
	}

	optional ImagineType imagineType = 1;
}

message BotAgeCollectionMetadata {
	enum AgeCollectionType {
		O18_BINARY = 0;
		WAFFLE = 1;
	}

	optional bool ageCollectionEligible = 1;
	optional bool shouldTriggerAgeCollectionOnClient = 2;
	optional AgeCollectionType ageCollectionType = 3;
}

message BotSourcesMetadata {
	message BotSourceItem {
		enum SourceProvider {
			UNKNOWN = 0;
			BING = 1;
			GOOGLE = 2;
			SUPPORT = 3;
			OTHER = 4;
		}

		optional SourceProvider provider = 1;
		optional string thumbnailCDNURL = 2;
		optional string sourceProviderURL = 3;
		optional string sourceQuery = 4;
		optional string faviconCDNURL = 5;
		optional uint32 citationNumber = 6;
		optional string sourceTitle = 7;
	}

	repeated BotSourceItem sources = 1;
}

message BotMessageOrigin {
	enum BotMessageOriginType {
		BOT_MESSAGE_ORIGIN_TYPE_AI_INITIATED = 0;
	}

	optional BotMessageOriginType type = 1;
}

message AIThreadInfo {
	message AIThreadClientInfo {
		enum AIThreadType {
			UNKNOWN = 0;
			DEFAULT = 1;
			INCOGNITO = 2;
		}

		optional AIThreadType type = 1;
	}

	message AIThreadServerInfo {
		optional string title = 1;
	}

	optional AIThreadServerInfo serverInfo = 1;
	optional AIThreadClientInfo clientInfo = 2;
}

message BotFeedbackMessage {
	enum ReportKind {
		NONE = 0;
		GENERIC = 1;
	}

	enum BotFeedbackKindMultiplePositive {
		BOT_FEEDBACK_MULTIPLE_POSITIVE_GENERIC = 1;
	}

	enum BotFeedbackKindMultipleNegative {
		BOT_FEEDBACK_MULTIPLE_NEGATIVE_GENERIC = 1;
		BOT_FEEDBACK_MULTIPLE_NEGATIVE_HELPFUL = 2;
		BOT_FEEDBACK_MULTIPLE_NEGATIVE_INTERESTING = 4;
		BOT_FEEDBACK_MULTIPLE_NEGATIVE_ACCURATE = 8;
		BOT_FEEDBACK_MULTIPLE_NEGATIVE_SAFE = 16;
		BOT_FEEDBACK_MULTIPLE_NEGATIVE_OTHER = 32;
		BOT_FEEDBACK_MULTIPLE_NEGATIVE_REFUSED = 64;
		BOT_FEEDBACK_MULTIPLE_NEGATIVE_NOT_VISUALLY_APPEALING = 128;
		BOT_FEEDBACK_MULTIPLE_NEGATIVE_NOT_RELEVANT_TO_TEXT = 256;
	}

	enum BotFeedbackKind {
		BOT_FEEDBACK_POSITIVE = 0;
		BOT_FEEDBACK_NEGATIVE_GENERIC = 1;
		BOT_FEEDBACK_NEGATIVE_HELPFUL = 2;
		BOT_FEEDBACK_NEGATIVE_INTERESTING = 3;
		BOT_FEEDBACK_NEGATIVE_ACCURATE = 4;
		BOT_FEEDBACK_NEGATIVE_SAFE = 5;
		BOT_FEEDBACK_NEGATIVE_OTHER = 6;
		BOT_FEEDBACK_NEGATIVE_REFUSED = 7;
		BOT_FEEDBACK_NEGATIVE_NOT_VISUALLY_APPEALING = 8;
		BOT_FEEDBACK_NEGATIVE_NOT_RELEVANT_TO_TEXT = 9;
		BOT_FEEDBACK_NEGATIVE_PERSONALIZED = 10;
		BOT_FEEDBACK_NEGATIVE_CLARITY = 11;
		BOT_FEEDBACK_NEGATIVE_DOESNT_LOOK_LIKE_THE_PERSON = 12;
		BOT_FEEDBACK_NEGATIVE_HALLUCINATION_INTERNAL_ONLY = 13;
		BOT_FEEDBACK_NEGATIVE = 14;
	}

	message SideBySideSurveyMetadata {
		message SideBySideSurveyAnalyticsData {
			optional string tessaEvent = 1;
			optional string tessaSessionFbid = 2;
		}

		optional string selectedRequestID = 1;
		optional uint32 surveyID = 2;
		optional string simonSessionFbid = 3;
		optional string responseOtid = 4;
		optional string responseTimestampMSString = 5;
		optional bool isSelectedResponsePrimary = 6;
		optional string messageIDToEdit = 7;
		optional SideBySideSurveyAnalyticsData analyticsData = 8;
	}

	optional WACommon.MessageKey messageKey = 1;
	optional BotFeedbackKind kind = 2;
	optional string text = 3;
	optional uint64 kindNegative = 4;
	optional uint64 kindPositive = 5;
	optional ReportKind kindReport = 6;
	optional SideBySideSurveyMetadata sideBySideSurveyMetadata = 7;
}

message AIRichResponseInlineImageMetadata {
	enum AIRichResponseImageAlignment {
		AI_RICH_RESPONSE_IMAGE_LAYOUT_LEADING_ALIGNED = 0;
		AI_RICH_RESPONSE_IMAGE_LAYOUT_TRAILING_ALIGNED = 1;
		AI_RICH_RESPONSE_IMAGE_LAYOUT_CENTER_ALIGNED = 2;
	}

	optional AIRichResponseImageURL imageURL = 1;
	optional string imageText = 2;
	optional AIRichResponseImageAlignment alignment = 3;
	optional string tapLinkURL = 4;
}

message AIRichResponseCodeMetadata {
	enum AIRichResponseCodeHighlightType {
		AI_RICH_RESPONSE_CODE_HIGHLIGHT_DEFAULT = 0;
		AI_RICH_RESPONSE_CODE_HIGHLIGHT_KEYWORD = 1;
		AI_RICH_RESPONSE_CODE_HIGHLIGHT_METHOD = 2;
		AI_RICH_RESPONSE_CODE_HIGHLIGHT_STRING = 3;
		AI_RICH_RESPONSE_CODE_HIGHLIGHT_NUMBER = 4;
		AI_RICH_RESPONSE_CODE_HIGHLIGHT_COMMENT = 5;
	}

	message AIRichResponseCodeBlock {
		optional AIRichResponseCodeHighlightType highlightType = 1;
		optional string codeContent = 2;
	}

	optional string codeLanguage = 1;
	repeated AIRichResponseCodeBlock codeBlocks = 2;
}

message AIRichResponseDynamicMetadata {
	enum AIRichResponseDynamicMetadataType {
		AI_RICH_RESPONSE_DYNAMIC_METADATA_TYPE_UNKNOWN = 0;
		AI_RICH_RESPONSE_DYNAMIC_METADATA_TYPE_IMAGE = 1;
		AI_RICH_RESPONSE_DYNAMIC_METADATA_TYPE_GIF = 2;
	}

	optional AIRichResponseDynamicMetadataType type = 1;
	optional uint64 version = 2;
	optional string URL = 3;
	optional uint32 loopCount = 4;
}

message AIRichResponseContentItemsMetadata {
	enum ContentType {
		DEFAULT = 0;
		CAROUSEL = 1;
	}

	message AIRichResponseContentItemMetadata {
		oneof aIRichResponseContentItem {
			AIRichResponseReelItem reelItem = 1;
		}
	}

	message AIRichResponseReelItem {
		optional string title = 1;
		optional string profileIconURL = 2;
		optional string thumbnailURL = 3;
		optional string videoURL = 4;
	}

	repeated AIRichResponseContentItemMetadata itemsMetadata = 1;
	optional ContentType contentType = 2;
}

message BotAvatarMetadata {
	optional uint32 sentiment = 1;
	optional string behaviorGraph = 2;
	optional uint32 action = 3;
	optional uint32 intensity = 4;
	optional uint32 wordCount = 5;
}

message BotSuggestedPromptMetadata {
	repeated string suggestedPrompts = 1;
	optional uint32 selectedPromptIndex = 2;
	optional BotPromptSuggestions promptSuggestions = 3;
	optional string selectedPromptID = 4;
}

message BotPromptSuggestions {
	repeated BotPromptSuggestion suggestions = 1;
}

message BotPromptSuggestion {
	optional string prompt = 1;
	optional string promptID = 2;
}

message BotLinkedAccountsMetadata {
	repeated BotLinkedAccount accounts = 1;
	optional bytes acAuthTokens = 2;
	optional int32 acErrorCode = 3;
}

message BotMemoryMetadata {
	repeated BotMemoryFact addedFacts = 1;
	repeated BotMemoryFact removedFacts = 2;
	optional string disclaimer = 3;
}

message BotMemoryFact {
	optional string fact = 1;
	optional string factID = 2;
}

message BotSignatureVerificationMetadata {
	repeated BotSignatureVerificationUseCaseProof proofs = 1;
}

message BotRenderingMetadata {
	message Keyword {
		optional string value = 1;
		repeated string associatedPrompts = 2;
	}

	repeated Keyword keywords = 1;
}

message BotMetricsMetadata {
	optional string destinationID = 1;
	optional BotMetricsEntryPoint destinationEntryPoint = 2;
	optional BotMetricsThreadEntryPoint threadOrigin = 3;
}

message BotSessionMetadata {
	optional string sessionID = 1;
	optional BotSessionSource sessionSource = 2;
}

message BotMemuMetadata {
	repeated BotMediaMetadata faceImages = 1;
}

message InThreadSurveyMetadata {
	message InThreadSurveyPrivacyStatementPart {
		optional string text = 1;
		optional string URL = 2;
	}

	message InThreadSurveyOption {
		optional string stringValue = 1;
		optional uint32 numericValue = 2;
		optional string textTranslated = 3;
	}

	message InThreadSurveyQuestion {
		optional string questionText = 1;
		optional string questionID = 2;
		repeated InThreadSurveyOption questionOptions = 3;
	}

	optional string tessaSessionID = 1;
	optional string simonSessionID = 2;
	optional string simonSurveyID = 3;
	optional string tessaRootID = 4;
	optional string requestID = 5;
	optional string tessaEvent = 6;
	optional string invitationHeaderText = 7;
	optional string invitationBodyText = 8;
	optional string invitationCtaText = 9;
	optional string invitationCtaURL = 10;
	optional string surveyTitle = 11;
	repeated InThreadSurveyQuestion questions = 12;
	optional string surveyContinueButtonText = 13;
	optional string surveySubmitButtonText = 14;
	optional string privacyStatementFull = 15;
	repeated InThreadSurveyPrivacyStatementPart privacyStatementParts = 16;
	optional string feedbackToastText = 17;
}

message BotMessageOriginMetadata {
	repeated BotMessageOrigin origins = 1;
}

message BotUnifiedResponseMutation {
	message MediaDetailsMetadata {
		optional string ID = 1;
		optional BotMediaMetadata highResMedia = 2;
		optional BotMediaMetadata previewMedia = 3;
	}

	message SideBySideMetadata {
		optional string primaryResponseID = 1;
	}

	optional SideBySideMetadata sbsMetadata = 1;
	repeated MediaDetailsMetadata mediaDetailsMetadataList = 2;
}

message BotMetadata {
	optional BotAvatarMetadata avatarMetadata = 1;
	optional string personaID = 2;
	optional BotPluginMetadata pluginMetadata = 3;
	optional BotSuggestedPromptMetadata suggestedPromptMetadata = 4;
	optional string invokerJID = 5;
	optional BotSessionMetadata sessionMetadata = 6;
	optional BotMemuMetadata memuMetadata = 7;
	optional string timezone = 8;
	optional BotReminderMetadata reminderMetadata = 9;
	optional BotModelMetadata modelMetadata = 10;
	optional string messageDisclaimerText = 11;
	optional BotProgressIndicatorMetadata progressIndicatorMetadata = 12;
	optional BotCapabilityMetadata capabilityMetadata = 13;
	optional BotImagineMetadata imagineMetadata = 14;
	optional BotMemoryMetadata memoryMetadata = 15;
	optional BotRenderingMetadata renderingMetadata = 16;
	optional BotMetricsMetadata botMetricsMetadata = 17;
	optional BotLinkedAccountsMetadata botLinkedAccountsMetadata = 18;
	optional BotSourcesMetadata richResponseSourcesMetadata = 19;
	optional bytes aiConversationContext = 20;
	optional BotPromotionMessageMetadata botPromotionMessageMetadata = 21;
	optional BotModeSelectionMetadata botModeSelectionMetadata = 22;
	optional BotQuotaMetadata botQuotaMetadata = 23;
	optional BotAgeCollectionMetadata botAgeCollectionMetadata = 24;
	optional string conversationStarterPromptID = 25;
	optional string botResponseID = 26;
	optional BotSignatureVerificationMetadata verificationMetadata = 27;
	optional BotUnifiedResponseMutation unifiedResponseMutation = 28;
	optional BotMessageOriginMetadata botMessageOriginMetadata = 29;
	optional InThreadSurveyMetadata inThreadSurveyMetadata = 30;
	optional AIThreadInfo botThreadInfo = 31;
	optional bytes internalMetadata = 999;
}

message ForwardedAIBotMessageInfo {
	optional string botName = 1;
	optional string botJID = 2;
	optional string creatorName = 3;
}

message BotMessageSharingInfo {
	optional BotMetricsEntryPoint botEntryPointOrigin = 1;
	optional uint32 forwardScore = 2;
}

message AIRichResponseImageURL {
	optional string imagePreviewURL = 1;
	optional string imageHighResURL = 2;
	optional string sourceURL = 3;
}

message AIRichResponseGridImageMetadata {
	optional AIRichResponseImageURL gridImageURL = 1;
	repeated AIRichResponseImageURL imageURLs = 2;
}

message AIRichResponseTableMetadata {
	message AIRichResponseTableRow {
		repeated string items = 1;
		optional bool isHeading = 2;
	}

	repeated AIRichResponseTableRow rows = 1;
	optional string title = 2;
}

message AIRichResponseUnifiedResponse {
	optional bytes data = 1;
}

message AIRichResponseLatexMetadata {
	message AIRichResponseLatexExpression {
		optional string latexExpression = 1;
		optional string URL = 2;
		optional double width = 3;
		optional double height = 4;
		optional double fontHeight = 5;
		optional double imageTopPadding = 6;
		optional double imageLeadingPadding = 7;
		optional double imageBottomPadding = 8;
		optional double imageTrailingPadding = 9;
	}

	optional string text = 1;
	repeated AIRichResponseLatexExpression expressions = 2;
}

message AIRichResponseMapMetadata {
	message AIRichResponseMapAnnotation {
		optional uint32 annotationNumber = 1;
		optional double latitude = 2;
		optional double longitude = 3;
		optional string title = 4;
		optional string body = 5;
	}

	optional double centerLatitude = 1;
	optional double centerLongitude = 2;
	optional double latitudeDelta = 3;
	optional double longitudeDelta = 4;
	repeated AIRichResponseMapAnnotation annotations = 5;
	optional bool showInfoList = 6;
}

message AIRichResponseSubMessage {
	optional AIRichResponseSubMessageType messageType = 1;
	optional AIRichResponseGridImageMetadata gridImageMetadata = 2;
	optional string messageText = 3;
	optional AIRichResponseInlineImageMetadata imageMetadata = 4;
	optional AIRichResponseCodeMetadata codeMetadata = 5;
	optional AIRichResponseTableMetadata tableMetadata = 6;
	optional AIRichResponseDynamicMetadata dynamicMetadata = 7;
	optional AIRichResponseLatexMetadata latexMetadata = 8;
	optional AIRichResponseMapMetadata mapMetadata = 9;
	optional AIRichResponseContentItemsMetadata contentItemsMetadata = 10;
}
