UNPKG

rapida-react

Version:

An easy to use react client for building generative ai application using Rapida platform.

1 lines 753 kB
{"version":3,"sources":["../src/clients/protos/common_pb.js","../src/clients/protos/talk-api_pb.js","../src/utils/rapida_source.ts","../src/agents/message.ts","../src/channels/index.ts","../src/connections/connection-state.ts","../src/agents/feedback.ts","../src/constants/index.ts","../src/utils/rapida_client.ts","../src/utils/index.ts","../src/devices/device-manager.ts","../src/agents/voice-agent.ts","../src/utils/rapida_content.ts","../src/wavtools/lib/wav_packer.js","../src/wavtools/lib/analysis/constants.js","../src/wavtools/lib/analysis/audio_analysis.js","../src/wavtools/lib/worklets/stream_processor.js","../src/wavtools/lib/wav_stream_player.js","../src/wavtools/lib/worklets/audio_processor.js","../src/wavtools/lib/wav_recorder.js","../src/utils/rapida_metadata.ts","../src/agents/index.ts","../src/clients/talk.ts","../src/utils/rapida_header.ts","../src/clients/index.ts","../src/utils/rapida_region.ts","../src/hooks/use-voice-agent.ts","../src/hooks/observables/voice-agent.ts"],"sourcesContent":["// source: common.proto\n/**\n * @fileoverview\n * @enhanceable\n * @suppress {missingRequire} reports error on implicit type usages.\n * @suppress {messageConventions} JS Compiler reports an error if a variable or\n * field starts with 'MSG_' and isn't a translatable message.\n * @public\n */\n// GENERATED CODE -- DO NOT EDIT!\n/* eslint-disable */\n// @ts-nocheck\n\nvar jspb = require('google-protobuf');\nvar goog = jspb;\nvar global = (function() { return this || window || global || self || Function('return this')(); }).call(null);\n\nvar google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js');\ngoog.object.extend(proto, google_protobuf_timestamp_pb);\nvar google_protobuf_struct_pb = require('google-protobuf/google/protobuf/struct_pb.js');\ngoog.object.extend(proto, google_protobuf_struct_pb);\ngoog.exportSymbol('proto.AgentPromptTemplate', null, global);\ngoog.exportSymbol('proto.AssistantConversation', null, global);\ngoog.exportSymbol('proto.AssistantConversationContext', null, global);\ngoog.exportSymbol('proto.AssistantConversationMessage', null, global);\ngoog.exportSymbol('proto.AssistantMessageStage', null, global);\ngoog.exportSymbol('proto.BaseResponse', null, global);\ngoog.exportSymbol('proto.Content', null, global);\ngoog.exportSymbol('proto.Criteria', null, global);\ngoog.exportSymbol('proto.Error', null, global);\ngoog.exportSymbol('proto.Event', null, global);\ngoog.exportSymbol('proto.FilePrompt', null, global);\ngoog.exportSymbol('proto.FunctionCall', null, global);\ngoog.exportSymbol('proto.GetAllAssistantConversationRequest', null, global);\ngoog.exportSymbol('proto.GetAllAssistantConversationResponse', null, global);\ngoog.exportSymbol('proto.GetAllConversationMessageRequest', null, global);\ngoog.exportSymbol('proto.GetAllConversationMessageResponse', null, global);\ngoog.exportSymbol('proto.Knowledge', null, global);\ngoog.exportSymbol('proto.Message', null, global);\ngoog.exportSymbol('proto.Metadata', null, global);\ngoog.exportSymbol('proto.Metric', null, global);\ngoog.exportSymbol('proto.Ordering', null, global);\ngoog.exportSymbol('proto.Organization', null, global);\ngoog.exportSymbol('proto.Paginate', null, global);\ngoog.exportSymbol('proto.Paginated', null, global);\ngoog.exportSymbol('proto.Provider', null, global);\ngoog.exportSymbol('proto.ProviderModel', null, global);\ngoog.exportSymbol('proto.ProviderModelParameter', null, global);\ngoog.exportSymbol('proto.ProviderModelVariable', null, global);\ngoog.exportSymbol('proto.Source', null, global);\ngoog.exportSymbol('proto.SpeechToTextPrompt', null, global);\ngoog.exportSymbol('proto.Tag', null, global);\ngoog.exportSymbol('proto.TextChatCompletePrompt', null, global);\ngoog.exportSymbol('proto.TextCompletePrompt', null, global);\ngoog.exportSymbol('proto.TextPrompt', null, global);\ngoog.exportSymbol('proto.TextToImagePrompt', null, global);\ngoog.exportSymbol('proto.TextToSpeechPrompt', null, global);\ngoog.exportSymbol('proto.ToolCall', null, global);\ngoog.exportSymbol('proto.User', null, global);\ngoog.exportSymbol('proto.Variable', null, global);\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.Criteria = function(opt_data) {\n jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.Criteria, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n /**\n * @public\n * @override\n */\n proto.Criteria.displayName = 'proto.Criteria';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.Error = function(opt_data) {\n jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.Error, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n /**\n * @public\n * @override\n */\n proto.Error.displayName = 'proto.Error';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.Paginate = function(opt_data) {\n jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.Paginate, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n /**\n * @public\n * @override\n */\n proto.Paginate.displayName = 'proto.Paginate';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.Paginated = function(opt_data) {\n jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.Paginated, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n /**\n * @public\n * @override\n */\n proto.Paginated.displayName = 'proto.Paginated';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.Ordering = function(opt_data) {\n jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.Ordering, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n /**\n * @public\n * @override\n */\n proto.Ordering.displayName = 'proto.Ordering';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.User = function(opt_data) {\n jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.User, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n /**\n * @public\n * @override\n */\n proto.User.displayName = 'proto.User';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.BaseResponse = function(opt_data) {\n jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.BaseResponse, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n /**\n * @public\n * @override\n */\n proto.BaseResponse.displayName = 'proto.BaseResponse';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.Metadata = function(opt_data) {\n jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.Metadata, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n /**\n * @public\n * @override\n */\n proto.Metadata.displayName = 'proto.Metadata';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.Variable = function(opt_data) {\n jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.Variable, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n /**\n * @public\n * @override\n */\n proto.Variable.displayName = 'proto.Variable';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.ProviderModelParameter = function(opt_data) {\n jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.ProviderModelParameter, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n /**\n * @public\n * @override\n */\n proto.ProviderModelParameter.displayName = 'proto.ProviderModelParameter';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.Provider = function(opt_data) {\n jspb.Message.initialize(this, opt_data, 0, -1, proto.Provider.repeatedFields_, null);\n};\ngoog.inherits(proto.Provider, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n /**\n * @public\n * @override\n */\n proto.Provider.displayName = 'proto.Provider';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.ProviderModelVariable = function(opt_data) {\n jspb.Message.initialize(this, opt_data, 0, -1, proto.ProviderModelVariable.repeatedFields_, null);\n};\ngoog.inherits(proto.ProviderModelVariable, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n /**\n * @public\n * @override\n */\n proto.ProviderModelVariable.displayName = 'proto.ProviderModelVariable';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.ProviderModel = function(opt_data) {\n jspb.Message.initialize(this, opt_data, 0, -1, proto.ProviderModel.repeatedFields_, null);\n};\ngoog.inherits(proto.ProviderModel, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n /**\n * @public\n * @override\n */\n proto.ProviderModel.displayName = 'proto.ProviderModel';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.Tag = function(opt_data) {\n jspb.Message.initialize(this, opt_data, 0, -1, proto.Tag.repeatedFields_, null);\n};\ngoog.inherits(proto.Tag, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n /**\n * @public\n * @override\n */\n proto.Tag.displayName = 'proto.Tag';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.Organization = function(opt_data) {\n jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.Organization, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n /**\n * @public\n * @override\n */\n proto.Organization.displayName = 'proto.Organization';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.Metric = function(opt_data) {\n jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.Metric, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n /**\n * @public\n * @override\n */\n proto.Metric.displayName = 'proto.Metric';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.Content = function(opt_data) {\n jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.Content, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n /**\n * @public\n * @override\n */\n proto.Content.displayName = 'proto.Content';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.Message = function(opt_data) {\n jspb.Message.initialize(this, opt_data, 0, -1, proto.Message.repeatedFields_, null);\n};\ngoog.inherits(proto.Message, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n /**\n * @public\n * @override\n */\n proto.Message.displayName = 'proto.Message';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.Event = function(opt_data) {\n jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.Event, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n /**\n * @public\n * @override\n */\n proto.Event.displayName = 'proto.Event';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.ToolCall = function(opt_data) {\n jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.ToolCall, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n /**\n * @public\n * @override\n */\n proto.ToolCall.displayName = 'proto.ToolCall';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.FunctionCall = function(opt_data) {\n jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.FunctionCall, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n /**\n * @public\n * @override\n */\n proto.FunctionCall.displayName = 'proto.FunctionCall';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.Knowledge = function(opt_data) {\n jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.Knowledge, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n /**\n * @public\n * @override\n */\n proto.Knowledge.displayName = 'proto.Knowledge';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.AgentPromptTemplate = function(opt_data) {\n jspb.Message.initialize(this, opt_data, 0, -1, proto.AgentPromptTemplate.repeatedFields_, null);\n};\ngoog.inherits(proto.AgentPromptTemplate, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n /**\n * @public\n * @override\n */\n proto.AgentPromptTemplate.displayName = 'proto.AgentPromptTemplate';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.TextPrompt = function(opt_data) {\n jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.TextPrompt, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n /**\n * @public\n * @override\n */\n proto.TextPrompt.displayName = 'proto.TextPrompt';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.FilePrompt = function(opt_data) {\n jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.FilePrompt, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n /**\n * @public\n * @override\n */\n proto.FilePrompt.displayName = 'proto.FilePrompt';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.TextChatCompletePrompt = function(opt_data) {\n jspb.Message.initialize(this, opt_data, 0, -1, proto.TextChatCompletePrompt.repeatedFields_, null);\n};\ngoog.inherits(proto.TextChatCompletePrompt, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n /**\n * @public\n * @override\n */\n proto.TextChatCompletePrompt.displayName = 'proto.TextChatCompletePrompt';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.TextCompletePrompt = function(opt_data) {\n jspb.Message.initialize(this, opt_data, 0, -1, proto.TextCompletePrompt.repeatedFields_, null);\n};\ngoog.inherits(proto.TextCompletePrompt, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n /**\n * @public\n * @override\n */\n proto.TextCompletePrompt.displayName = 'proto.TextCompletePrompt';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.TextToImagePrompt = function(opt_data) {\n jspb.Message.initialize(this, opt_data, 0, -1, proto.TextToImagePrompt.repeatedFields_, null);\n};\ngoog.inherits(proto.TextToImagePrompt, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n /**\n * @public\n * @override\n */\n proto.TextToImagePrompt.displayName = 'proto.TextToImagePrompt';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.TextToSpeechPrompt = function(opt_data) {\n jspb.Message.initialize(this, opt_data, 0, -1, proto.TextToSpeechPrompt.repeatedFields_, null);\n};\ngoog.inherits(proto.TextToSpeechPrompt, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n /**\n * @public\n * @override\n */\n proto.TextToSpeechPrompt.displayName = 'proto.TextToSpeechPrompt';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.SpeechToTextPrompt = function(opt_data) {\n jspb.Message.initialize(this, opt_data, 0, -1, proto.SpeechToTextPrompt.repeatedFields_, null);\n};\ngoog.inherits(proto.SpeechToTextPrompt, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n /**\n * @public\n * @override\n */\n proto.SpeechToTextPrompt.displayName = 'proto.SpeechToTextPrompt';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.AssistantMessageStage = function(opt_data) {\n jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.AssistantMessageStage, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n /**\n * @public\n * @override\n */\n proto.AssistantMessageStage.displayName = 'proto.AssistantMessageStage';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.AssistantConversationMessage = function(opt_data) {\n jspb.Message.initialize(this, opt_data, 0, -1, proto.AssistantConversationMessage.repeatedFields_, null);\n};\ngoog.inherits(proto.AssistantConversationMessage, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n /**\n * @public\n * @override\n */\n proto.AssistantConversationMessage.displayName = 'proto.AssistantConversationMessage';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.AssistantConversationContext = function(opt_data) {\n jspb.Message.initialize(this, opt_data, 0, -1, null, null);\n};\ngoog.inherits(proto.AssistantConversationContext, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n /**\n * @public\n * @override\n */\n proto.AssistantConversationContext.displayName = 'proto.AssistantConversationContext';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.AssistantConversation = function(opt_data) {\n jspb.Message.initialize(this, opt_data, 0, -1, proto.AssistantConversation.repeatedFields_, null);\n};\ngoog.inherits(proto.AssistantConversation, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n /**\n * @public\n * @override\n */\n proto.AssistantConversation.displayName = 'proto.AssistantConversation';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.GetAllAssistantConversationRequest = function(opt_data) {\n jspb.Message.initialize(this, opt_data, 0, -1, proto.GetAllAssistantConversationRequest.repeatedFields_, null);\n};\ngoog.inherits(proto.GetAllAssistantConversationRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n /**\n * @public\n * @override\n */\n proto.GetAllAssistantConversationRequest.displayName = 'proto.GetAllAssistantConversationRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.GetAllAssistantConversationResponse = function(opt_data) {\n jspb.Message.initialize(this, opt_data, 0, -1, proto.GetAllAssistantConversationResponse.repeatedFields_, null);\n};\ngoog.inherits(proto.GetAllAssistantConversationResponse, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n /**\n * @public\n * @override\n */\n proto.GetAllAssistantConversationResponse.displayName = 'proto.GetAllAssistantConversationResponse';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.GetAllConversationMessageRequest = function(opt_data) {\n jspb.Message.initialize(this, opt_data, 0, -1, proto.GetAllConversationMessageRequest.repeatedFields_, null);\n};\ngoog.inherits(proto.GetAllConversationMessageRequest, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n /**\n * @public\n * @override\n */\n proto.GetAllConversationMessageRequest.displayName = 'proto.GetAllConversationMessageRequest';\n}\n/**\n * Generated by JsPbCodeGenerator.\n * @param {Array=} opt_data Optional initial data array, typically from a\n * server response, or constructed directly in Javascript. The array is used\n * in place and becomes part of the constructed object. It is not cloned.\n * If no data is provided, the constructed object will be empty, but still\n * valid.\n * @extends {jspb.Message}\n * @constructor\n */\nproto.GetAllConversationMessageResponse = function(opt_data) {\n jspb.Message.initialize(this, opt_data, 0, -1, proto.GetAllConversationMessageResponse.repeatedFields_, null);\n};\ngoog.inherits(proto.GetAllConversationMessageResponse, jspb.Message);\nif (goog.DEBUG && !COMPILED) {\n /**\n * @public\n * @override\n */\n proto.GetAllConversationMessageResponse.displayName = 'proto.GetAllConversationMessageResponse';\n}\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n * net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n * JSPB instance for transitional soy proto support:\n * http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.Criteria.prototype.toObject = function(opt_includeInstance) {\n return proto.Criteria.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n * the JSPB instance for transitional soy proto support:\n * http://goto/soy-param-migration\n * @param {!proto.Criteria} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.Criteria.toObject = function(includeInstance, msg) {\n var f, obj = {\n key: jspb.Message.getFieldWithDefault(msg, 1, \"\"),\n value: jspb.Message.getFieldWithDefault(msg, 2, \"\"),\n logic: jspb.Message.getFieldWithDefault(msg, 3, \"\")\n };\n\n if (includeInstance) {\n obj.$jspbMessageInstance = msg;\n }\n return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.Criteria}\n */\nproto.Criteria.deserializeBinary = function(bytes) {\n var reader = new jspb.BinaryReader(bytes);\n var msg = new proto.Criteria;\n return proto.Criteria.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.Criteria} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.Criteria}\n */\nproto.Criteria.deserializeBinaryFromReader = function(msg, reader) {\n while (reader.nextField()) {\n if (reader.isEndGroup()) {\n break;\n }\n var field = reader.getFieldNumber();\n switch (field) {\n case 1:\n var value = /** @type {string} */ (reader.readString());\n msg.setKey(value);\n break;\n case 2:\n var value = /** @type {string} */ (reader.readString());\n msg.setValue(value);\n break;\n case 3:\n var value = /** @type {string} */ (reader.readString());\n msg.setLogic(value);\n break;\n default:\n reader.skipField();\n break;\n }\n }\n return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.Criteria.prototype.serializeBinary = function() {\n var writer = new jspb.BinaryWriter();\n proto.Criteria.serializeBinaryToWriter(this, writer);\n return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.Criteria} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.Criteria.serializeBinaryToWriter = function(message, writer) {\n var f = undefined;\n f = message.getKey();\n if (f.length > 0) {\n writer.writeString(\n 1,\n f\n );\n }\n f = message.getValue();\n if (f.length > 0) {\n writer.writeString(\n 2,\n f\n );\n }\n f = message.getLogic();\n if (f.length > 0) {\n writer.writeString(\n 3,\n f\n );\n }\n};\n\n\n/**\n * optional string key = 1;\n * @return {string}\n */\nproto.Criteria.prototype.getKey = function() {\n return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.Criteria} returns this\n */\nproto.Criteria.prototype.setKey = function(value) {\n return jspb.Message.setProto3StringField(this, 1, value);\n};\n\n\n/**\n * optional string value = 2;\n * @return {string}\n */\nproto.Criteria.prototype.getValue = function() {\n return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.Criteria} returns this\n */\nproto.Criteria.prototype.setValue = function(value) {\n return jspb.Message.setProto3StringField(this, 2, value);\n};\n\n\n/**\n * optional string logic = 3;\n * @return {string}\n */\nproto.Criteria.prototype.getLogic = function() {\n return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.Criteria} returns this\n */\nproto.Criteria.prototype.setLogic = function(value) {\n return jspb.Message.setProto3StringField(this, 3, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n * net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n * JSPB instance for transitional soy proto support:\n * http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.Error.prototype.toObject = function(opt_includeInstance) {\n return proto.Error.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n * the JSPB instance for transitional soy proto support:\n * http://goto/soy-param-migration\n * @param {!proto.Error} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.Error.toObject = function(includeInstance, msg) {\n var f, obj = {\n errorcode: jspb.Message.getFieldWithDefault(msg, 1, \"0\"),\n errormessage: jspb.Message.getFieldWithDefault(msg, 2, \"\"),\n humanmessage: jspb.Message.getFieldWithDefault(msg, 3, \"\")\n };\n\n if (includeInstance) {\n obj.$jspbMessageInstance = msg;\n }\n return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.Error}\n */\nproto.Error.deserializeBinary = function(bytes) {\n var reader = new jspb.BinaryReader(bytes);\n var msg = new proto.Error;\n return proto.Error.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.Error} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.Error}\n */\nproto.Error.deserializeBinaryFromReader = function(msg, reader) {\n while (reader.nextField()) {\n if (reader.isEndGroup()) {\n break;\n }\n var field = reader.getFieldNumber();\n switch (field) {\n case 1:\n var value = /** @type {string} */ (reader.readUint64String());\n msg.setErrorcode(value);\n break;\n case 2:\n var value = /** @type {string} */ (reader.readString());\n msg.setErrormessage(value);\n break;\n case 3:\n var value = /** @type {string} */ (reader.readString());\n msg.setHumanmessage(value);\n break;\n default:\n reader.skipField();\n break;\n }\n }\n return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.Error.prototype.serializeBinary = function() {\n var writer = new jspb.BinaryWriter();\n proto.Error.serializeBinaryToWriter(this, writer);\n return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.Error} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.Error.serializeBinaryToWriter = function(message, writer) {\n var f = undefined;\n f = message.getErrorcode();\n if (parseInt(f, 10) !== 0) {\n writer.writeUint64String(\n 1,\n f\n );\n }\n f = message.getErrormessage();\n if (f.length > 0) {\n writer.writeString(\n 2,\n f\n );\n }\n f = message.getHumanmessage();\n if (f.length > 0) {\n writer.writeString(\n 3,\n f\n );\n }\n};\n\n\n/**\n * optional uint64 errorCode = 1;\n * @return {string}\n */\nproto.Error.prototype.getErrorcode = function() {\n return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, \"0\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.Error} returns this\n */\nproto.Error.prototype.setErrorcode = function(value) {\n return jspb.Message.setProto3StringIntField(this, 1, value);\n};\n\n\n/**\n * optional string errorMessage = 2;\n * @return {string}\n */\nproto.Error.prototype.getErrormessage = function() {\n return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.Error} returns this\n */\nproto.Error.prototype.setErrormessage = function(value) {\n return jspb.Message.setProto3StringField(this, 2, value);\n};\n\n\n/**\n * optional string humanMessage = 3;\n * @return {string}\n */\nproto.Error.prototype.getHumanmessage = function() {\n return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, \"\"));\n};\n\n\n/**\n * @param {string} value\n * @return {!proto.Error} returns this\n */\nproto.Error.prototype.setHumanmessage = function(value) {\n return jspb.Message.setProto3StringField(this, 3, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n * net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n * JSPB instance for transitional soy proto support:\n * http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.Paginate.prototype.toObject = function(opt_includeInstance) {\n return proto.Paginate.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n * the JSPB instance for transitional soy proto support:\n * http://goto/soy-param-migration\n * @param {!proto.Paginate} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.Paginate.toObject = function(includeInstance, msg) {\n var f, obj = {\n page: jspb.Message.getFieldWithDefault(msg, 1, 0),\n pagesize: jspb.Message.getFieldWithDefault(msg, 2, 0)\n };\n\n if (includeInstance) {\n obj.$jspbMessageInstance = msg;\n }\n return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.Paginate}\n */\nproto.Paginate.deserializeBinary = function(bytes) {\n var reader = new jspb.BinaryReader(bytes);\n var msg = new proto.Paginate;\n return proto.Paginate.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.Paginate} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.Paginate}\n */\nproto.Paginate.deserializeBinaryFromReader = function(msg, reader) {\n while (reader.nextField()) {\n if (reader.isEndGroup()) {\n break;\n }\n var field = reader.getFieldNumber();\n switch (field) {\n case 1:\n var value = /** @type {number} */ (reader.readUint32());\n msg.setPage(value);\n break;\n case 2:\n var value = /** @type {number} */ (reader.readUint32());\n msg.setPagesize(value);\n break;\n default:\n reader.skipField();\n break;\n }\n }\n return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.Paginate.prototype.serializeBinary = function() {\n var writer = new jspb.BinaryWriter();\n proto.Paginate.serializeBinaryToWriter(this, writer);\n return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.Paginate} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.Paginate.serializeBinaryToWriter = function(message, writer) {\n var f = undefined;\n f = message.getPage();\n if (f !== 0) {\n writer.writeUint32(\n 1,\n f\n );\n }\n f = message.getPagesize();\n if (f !== 0) {\n writer.writeUint32(\n 2,\n f\n );\n }\n};\n\n\n/**\n * optional uint32 page = 1;\n * @return {number}\n */\nproto.Paginate.prototype.getPage = function() {\n return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.Paginate} returns this\n */\nproto.Paginate.prototype.setPage = function(value) {\n return jspb.Message.setProto3IntField(this, 1, value);\n};\n\n\n/**\n * optional uint32 pageSize = 2;\n * @return {number}\n */\nproto.Paginate.prototype.getPagesize = function() {\n return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));\n};\n\n\n/**\n * @param {number} value\n * @return {!proto.Paginate} returns this\n */\nproto.Paginate.prototype.setPagesize = function(value) {\n return jspb.Message.setProto3IntField(this, 2, value);\n};\n\n\n\n\n\nif (jspb.Message.GENERATE_TO_OBJECT) {\n/**\n * Creates an object representation of this proto.\n * Field names that are reserved in JavaScript and will be renamed to pb_name.\n * Optional fields that are not set will be set to undefined.\n * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.\n * For the list of reserved names please see:\n * net/proto2/compiler/js/internal/generator.cc#kKeyword.\n * @param {boolean=} opt_includeInstance Deprecated. whether to include the\n * JSPB instance for transitional soy proto support:\n * http://goto/soy-param-migration\n * @return {!Object}\n */\nproto.Paginated.prototype.toObject = function(opt_includeInstance) {\n return proto.Paginated.toObject(opt_includeInstance, this);\n};\n\n\n/**\n * Static version of the {@see toObject} method.\n * @param {boolean|undefined} includeInstance Deprecated. Whether to include\n * the JSPB instance for transitional soy proto support:\n * http://goto/soy-param-migration\n * @param {!proto.Paginated} msg The msg instance to transform.\n * @return {!Object}\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.Paginated.toObject = function(includeInstance, msg) {\n var f, obj = {\n currentpage: jspb.Message.getFieldWithDefault(msg, 1, 0),\n totalitem: jspb.Message.getFieldWithDefault(msg, 2, 0)\n };\n\n if (includeInstance) {\n obj.$jspbMessageInstance = msg;\n }\n return obj;\n};\n}\n\n\n/**\n * Deserializes binary data (in protobuf wire format).\n * @param {jspb.ByteSource} bytes The bytes to deserialize.\n * @return {!proto.Paginated}\n */\nproto.Paginated.deserializeBinary = function(bytes) {\n var reader = new jspb.BinaryReader(bytes);\n var msg = new proto.Paginated;\n return proto.Paginated.deserializeBinaryFromReader(msg, reader);\n};\n\n\n/**\n * Deserializes binary data (in protobuf wire format) from the\n * given reader into the given message object.\n * @param {!proto.Paginated} msg The message object to deserialize into.\n * @param {!jspb.BinaryReader} reader The BinaryReader to use.\n * @return {!proto.Paginated}\n */\nproto.Paginated.deserializeBinaryFromReader = function(msg, reader) {\n while (reader.nextField()) {\n if (reader.isEndGroup()) {\n break;\n }\n var field = reader.getFieldNumber();\n switch (field) {\n case 1:\n var value = /** @type {number} */ (reader.readUint32());\n msg.setCurrentpage(value);\n break;\n case 2:\n var value = /** @type {number} */ (reader.readUint32());\n msg.setTotalitem(value);\n break;\n default:\n reader.skipField();\n break;\n }\n }\n return msg;\n};\n\n\n/**\n * Serializes the message to binary data (in protobuf wire format).\n * @return {!Uint8Array}\n */\nproto.Paginated.prototype.serializeBinary = function() {\n var writer = new jspb.BinaryWriter();\n proto.Paginated.serializeBinaryToWriter(this, writer);\n return writer.getResultBuffer();\n};\n\n\n/**\n * Serializes the given message to binary data (in protobuf wire\n * format), writing to the given BinaryWriter.\n * @param {!proto.Paginated} message\n * @param {!jspb.BinaryWriter} writer\n * @suppress {unusedLocalVariables} f is only used for nested messages\n */\nproto.Paginated.serializeBinaryToWriter = function(message, writer) {\n var f = undefined;\n f = message.getCurrentpage();\n if (f !== 0) {\n writer.writeUint32(\n 1,\n f\n );\n }\n f = message.getTotalitem();\n if (f !=