From 78c198948a6a4b56fd2f4b14eb0fa3f10ec274ea Mon Sep 17 00:00:00 2001 From: Prashant Srivastav Date: Wed, 28 Jan 2026 21:16:39 +0800 Subject: [PATCH 1/2] feat: added change --- package.json | 2 +- src/agents/index.ts | 46 +- src/agents/voice-agent.ts | 82 +- src/clients/knowledge.ts | 9 +- src/clients/protos/artifacts | 2 +- src/clients/protos/common_pb.d.ts | 556 +- src/clients/protos/common_pb.js | 8401 +++++++------------ src/clients/protos/integration-api_pb.d.ts | 20 +- src/clients/protos/integration-api_pb.js | 102 +- src/clients/protos/invoker-api_pb.d.ts | 8 +- src/clients/protos/invoker-api_pb.js | 32 +- src/clients/protos/knowledge-api_pb.d.ts | 48 +- src/clients/protos/knowledge-api_pb.js | 341 +- src/clients/protos/talk-api_pb.d.ts | 606 +- src/clients/protos/talk-api_pb.js | 5998 ++++++++++--- src/clients/protos/talk-api_pb_service.d.ts | 12 +- src/clients/protos/talk-api_pb_service.js | 8 +- src/clients/talk.ts | 6 +- src/hooks/observables/voice-agent.ts | 21 +- src/index.ts | 30 +- src/types/agent-callback.ts | 47 +- src/types/agent-config.ts | 3 +- src/types/agent-deployment.ts | 60 +- src/types/agent-event-callback.ts | 23 +- src/utils/rapida_content.ts | 152 +- tests/types/agent-config.test.ts | 2 +- 26 files changed, 9476 insertions(+), 7141 deletions(-) diff --git a/package.json b/package.json index 4ad27c7..9ea9a13 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@rapidaai/react", - "version": "1.1.52", + "version": "1.1.53", "description": "An easy to use react client for building generative ai application using Rapida platform.", "repository": { "type": "git", diff --git a/src/agents/index.ts b/src/agents/index.ts index 26b656e..ca3c7e2 100644 --- a/src/agents/index.ts +++ b/src/agents/index.ts @@ -26,8 +26,10 @@ import { AgentConfig } from "@/rapida/types/agent-config"; import { AgentCallback } from "@/rapida/types/agent-callback"; import { - AssistantMessagingRequest, - AssistantMessagingResponse, + AssistantTalkInput, + AssistantTalkOutput, + AudioConfig, + StreamConfig, CreateConversationMetricRequest, CreateMessageMetricRequest, } from "@/rapida/clients/protos/talk-api_pb"; @@ -36,7 +38,9 @@ import { ConnectionState } from "@/rapida/types/connection-state"; import { AgentEventCallback } from "@/rapida/types/agent-event-callback"; import { EventEmitter } from "events"; import type TypedEmitter from "typed-emitter"; -import { AssistantDefinition, AudioConfig, Metric, StreamConfig } from "@/rapida/clients/protos/common_pb"; +import { + AssistantDefinition, Metric, +} from "@/rapida/clients/protos/common_pb"; import { Message as LocalMessage, MessageRole } from "@/rapida/types/message"; import { AgentEvent } from "@/rapida/types/agent-event"; import { @@ -53,11 +57,9 @@ import { GetAssistant } from "@/rapida/clients/assistant"; import * as google_protobuf_any_pb from "google-protobuf/google/protobuf/any_pb"; import { - AssistantConversationConfiguration, - AssistantConversationMessageTextContent, - AssistantConversationUserMessage, - AssistantConversationMessageAudioContent, -} from "@/rapida/clients/protos/common_pb"; + ConversationConfiguration, + ConversationUserMessage, +} from '../clients/protos/talk-api_pb'; /** * Rapida Agent SDK * @@ -380,12 +382,10 @@ export class Agent extends (EventEmitter as new () => TypedEmitter TypedEmitter TypedEmitter { + protected onRecieve = async (_: AssistantTalkOutput) => { console.warn( "No receive method implemented. Override onReceive() in your Agent subclass." ); @@ -446,9 +444,9 @@ export class Agent extends (EventEmitter as new () => TypedEmitter, metadatas?: Map, options?: Map, - ): AssistantMessagingRequest { - const request = new AssistantMessagingRequest(); - const assistantConfiguration = new AssistantConversationConfiguration(); + ): AssistantTalkInput { + const request = new AssistantTalkInput(); + const assistantConfiguration = new ConversationConfiguration(); if (this._conversationId) { assistantConfiguration.setAssistantconversationid(this._conversationId); diff --git a/src/agents/voice-agent.ts b/src/agents/voice-agent.ts index 54cf823..f806994 100644 --- a/src/agents/voice-agent.ts +++ b/src/agents/voice-agent.ts @@ -23,14 +23,15 @@ * */ import { DeviceManager } from "@/rapida/devices/device-manager"; -import { AssistantMessagingResponse } from "@/rapida/clients/protos/talk-api_pb"; +import { AssistantTalkOutput } from "@/rapida/clients/protos/talk-api_pb"; import { AgentEvent } from "@/rapida/types/agent-event"; + import { - AssistantConversationAction, - AssistantConversationAssistantMessage, - AssistantConversationInterruption, - AssistantConversationUserMessage, -} from "@/rapida/clients/protos/common_pb"; + ConversationDirective, + ConversationAssistantMessage as CAMessage, + ConversationInterruption, + ConversationUserMessage as CUMessage, +} from "@/rapida/clients/protos/talk-api_pb"; import { toDate, isChrome } from "@/rapida/utils"; import { MessageRole, MessageStatus } from "@/rapida/types/message"; import { Channel } from "@/rapida/types/channel"; @@ -375,19 +376,19 @@ export class VoiceAgent extends Agent { * @param interruptionData */ private onHandleInterruption = ( - interruptionData: AssistantConversationInterruption | undefined + interruptionData: ConversationInterruption | undefined ) => { if (interruptionData) { switch (interruptionData.getType()) { - case AssistantConversationInterruption.InterruptionType + case ConversationInterruption.InterruptionType .INTERRUPTION_TYPE_UNSPECIFIED: console.log("Unspecified interruption type"); break; - case AssistantConversationInterruption.InterruptionType + case ConversationInterruption.InterruptionType .INTERRUPTION_TYPE_VAD: this.fadeOutAudio(); break; - case AssistantConversationInterruption.InterruptionType + case ConversationInterruption.InterruptionType .INTERRUPTION_TYPE_WORD: // when interrupt then mark last message completed if (this.agentMessages.length > 0) { @@ -404,7 +405,7 @@ export class VoiceAgent extends Agent { } this.emit( AgentEvent.ConversationEvent, - AssistantMessagingResponse.DataCase.INTERRUPTION, + AssistantTalkOutput.DataCase.INTERRUPTION, interruptionData ); } @@ -416,14 +417,14 @@ export class VoiceAgent extends Agent { * @param userContent */ private onHandleUser = ( - userContent: AssistantConversationUserMessage | undefined + userContent: CUMessage | undefined ) => { if (userContent) { switch (userContent.getMessageCase()) { - case AssistantConversationUserMessage.MessageCase.MESSAGE_NOT_SET: - case AssistantConversationUserMessage.MessageCase.AUDIO: - case AssistantConversationUserMessage.MessageCase.TEXT: - const agentTranscript = userContent.getText()?.getContent(); + case CUMessage.MessageCase.MESSAGE_NOT_SET: + case CUMessage.MessageCase.AUDIO: + case CUMessage.MessageCase.TEXT: + const agentTranscript = userContent.getText(); if (agentTranscript) { if (this.agentMessages.length > 0) { const lastMessage = @@ -449,7 +450,7 @@ export class VoiceAgent extends Agent { this.emit( AgentEvent.ConversationEvent, - AssistantMessagingResponse.DataCase.USER, + AssistantTalkOutput.DataCase.USER, userContent ); } @@ -461,21 +462,20 @@ export class VoiceAgent extends Agent { * @param systemContent */ private onHandleAssistant = ( - systemContent: AssistantConversationAssistantMessage | undefined + systemContent: CAMessage | undefined ) => { if (systemContent) { // switch (systemContent.getMessageCase()) { - case AssistantConversationAssistantMessage.MessageCase.MESSAGE_NOT_SET: - case AssistantConversationAssistantMessage.MessageCase.AUDIO: - const content = systemContent.getAudio(); + case CAMessage.MessageCase.MESSAGE_NOT_SET: + case CAMessage.MessageCase.AUDIO: + const content = systemContent.getAudio_asU8(); if (content) { - const audioData = content.getContent_asU8(); - this.addAudioChunk(new Uint8Array(audioData).buffer); + this.addAudioChunk(new Uint8Array(content).buffer); } break; - case AssistantConversationAssistantMessage.MessageCase.TEXT: - const systemTranscript = systemContent.getText()?.getContent(); + case CAMessage.MessageCase.TEXT: + const systemTranscript = systemContent.getText(); if (systemTranscript) { if (systemContent.getCompleted()) { // Complete message @@ -546,7 +546,7 @@ export class VoiceAgent extends Agent { } this.emit( AgentEvent.ConversationEvent, - AssistantMessagingResponse.DataCase.ASSISTANT, + AssistantTalkOutput.DataCase.ASSISTANT, systemContent ); } @@ -557,20 +557,20 @@ export class VoiceAgent extends Agent { * @param response * @returns */ - override onRecieve = async (response: AssistantMessagingResponse) => { + override onRecieve = async (response: AssistantTalkOutput) => { switch (response.getDataCase()) { - case AssistantMessagingResponse.DataCase.DATA_NOT_SET: + case AssistantTalkOutput.DataCase.DATA_NOT_SET: break; - case AssistantMessagingResponse.DataCase.INTERRUPTION: + case AssistantTalkOutput.DataCase.INTERRUPTION: this.onHandleInterruption(response.getInterruption()); break; - case AssistantMessagingResponse.DataCase.USER: + case AssistantTalkOutput.DataCase.USER: this.onHandleUser(response.getUser()); break; - case AssistantMessagingResponse.DataCase.ASSISTANT: + case AssistantTalkOutput.DataCase.ASSISTANT: this.onHandleAssistant(response.getAssistant()); break; - case AssistantMessagingResponse.DataCase.CONFIGURATION: + case AssistantTalkOutput.DataCase.CONFIGURATION: const conversation = response.getConfiguration(); if (!conversation?.getAssistantconversationid()) return; break; @@ -583,40 +583,40 @@ export class VoiceAgent extends Agent { // Adding a check to filter out audio chunks // Implementing a debounce mechanism // These suggestions can guide the team in finding an appropriate solution to optimize the onMessage callback handling. - onCallback = async (response: AssistantMessagingResponse) => { + onCallback = async (response: AssistantTalkOutput) => { // check if callback is register then call it off for (const agentCallback of this.agentCallbacks) { switch (response.getDataCase()) { - case AssistantMessagingResponse.DataCase.DATA_NOT_SET: + case AssistantTalkOutput.DataCase.DATA_NOT_SET: break; - case AssistantMessagingResponse.DataCase.ACTION: - if (response.getAction()?.getAction() === AssistantConversationAction.ActionType.END_CONVERSATION) { + case AssistantTalkOutput.DataCase.DIRECTIVE: + if (response.getDirective()?.getType() === ConversationDirective.DirectiveType.END_CONVERSATION) { await this.disconnect(); } if (agentCallback && agentCallback?.onAction) { - agentCallback.onAction(response.getAction()?.toObject()); + agentCallback.onAction(response.getDirective()?.toObject()); } break; - case AssistantMessagingResponse.DataCase.INTERRUPTION: + case AssistantTalkOutput.DataCase.INTERRUPTION: if (agentCallback && agentCallback?.onInterrupt) { agentCallback.onInterrupt(response.getInterruption()?.toObject()); } break; - case AssistantMessagingResponse.DataCase.USER: + case AssistantTalkOutput.DataCase.USER: if (agentCallback && agentCallback?.onUserMessage) { agentCallback.onUserMessage( new ConversationUserMessage(response.getUser()) ); } break; - case AssistantMessagingResponse.DataCase.ASSISTANT: + case AssistantTalkOutput.DataCase.ASSISTANT: if (agentCallback && agentCallback?.onAssistantMessage) { agentCallback.onAssistantMessage( new ConversationAssistantMessage(response.getAssistant()) ); } break; - case AssistantMessagingResponse.DataCase.CONFIGURATION: + case AssistantTalkOutput.DataCase.CONFIGURATION: if (agentCallback && agentCallback?.onConfiguration) { agentCallback.onConfiguration( response.getConfiguration()?.toObject() diff --git a/src/clients/knowledge.ts b/src/clients/knowledge.ts index c8e7200..01a1e21 100644 --- a/src/clients/knowledge.ts +++ b/src/clients/knowledge.ts @@ -28,7 +28,6 @@ import { BaseResponse, - Content, Criteria, Paginate, } from "@/rapida/clients/protos/common_pb"; @@ -59,7 +58,7 @@ import { UpdateKnowledgeDetailRequest, UpdateKnowledgeDocumentSegmentRequest, } from "@/rapida/clients/protos/knowledge-api_pb"; -import { DeleteKnowledgeDocumentSegmentRequest } from "./protos/knowledge-api_pb"; +import { DeleteKnowledgeDocumentSegmentRequest, DocumentContent } from './protos/knowledge-api_pb'; import { RapidaDocumentPreProcessing, RapidaDocumentSource, @@ -170,7 +169,7 @@ export function GetAllKnowledgeBases( * @param documentSource - The source of the document. * @param datasource - The data source for the document. * @param preProcessor - The pre-processing method to use. - * @param contents - An array of content to include in the document. + * @param DocumentContents - An array of DocumentContent to include in the document. * @param separator - The separator used in custom processing. * @param maxchunksize - The maximum chunk size for document processing. * @param chunkoverlap - The overlap between chunks. @@ -185,7 +184,7 @@ export function CreateKnowledgeDocument( datasource: string, documentType: RapidaDocumentType, preProcessor: RapidaDocumentPreProcessing, - contents: Array, + DocumentContents: Array, separator: string, maxchunksize: number, chunkoverlap: number, @@ -208,7 +207,7 @@ export function CreateKnowledgeDocument( req.setKnowledgeid(knowledgeId); req.setDatasource(datasource); req.setPreprocess(CreateKnowledgeDocumentRequest.PRE_PROCESS[preProcessor]); - req.setContentsList(contents); + req.setContentsList(DocumentContents); if (preProcessor === RapidaDocumentPreProcessing.CUSTOM) { req.setSeparator(separator); diff --git a/src/clients/protos/artifacts b/src/clients/protos/artifacts index b10c8bb..69d2cb8 160000 --- a/src/clients/protos/artifacts +++ b/src/clients/protos/artifacts @@ -1 +1 @@ -Subproject commit b10c8bbeb7d60e294e46de74842245b2df53c86a +Subproject commit 69d2cb8714660dd1b8cb6004575def2c07dcbc34 diff --git a/src/clients/protos/common_pb.d.ts b/src/clients/protos/common_pb.d.ts index e4ebfe0..6758670 100644 --- a/src/clients/protos/common_pb.d.ts +++ b/src/clients/protos/common_pb.d.ts @@ -2,7 +2,6 @@ // file: common.proto import * as jspb from "google-protobuf"; -import * as google_protobuf_any_pb from "google-protobuf/google/protobuf/any_pb"; import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/timestamp_pb"; import * as google_protobuf_struct_pb from "google-protobuf/google/protobuf/struct_pb"; @@ -437,43 +436,121 @@ export namespace Metric { } } -export class Content extends jspb.Message { - getName(): string; - setName(value: string): void; +export class AssistantMessage extends jspb.Message { + clearContentsList(): void; + getContentsList(): Array; + setContentsList(value: Array): void; + addContents(value: string, index?: number): string; - getContenttype(): string; - setContenttype(value: string): void; + clearToolcallsList(): void; + getToolcallsList(): Array; + setToolcallsList(value: Array): void; + addToolcalls(value?: ToolCall, index?: number): ToolCall; - getContentformat(): string; - setContentformat(value: string): void; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): AssistantMessage.AsObject; + static toObject(includeInstance: boolean, msg: AssistantMessage): AssistantMessage.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: AssistantMessage, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): AssistantMessage; + static deserializeBinaryFromReader(message: AssistantMessage, reader: jspb.BinaryReader): AssistantMessage; +} - getContent(): Uint8Array | string; - getContent_asU8(): Uint8Array; - getContent_asB64(): string; - setContent(value: Uint8Array | string): void; +export namespace AssistantMessage { + export type AsObject = { + contentsList: Array, + toolcallsList: Array, + } +} - hasMeta(): boolean; - clearMeta(): void; - getMeta(): google_protobuf_struct_pb.Struct | undefined; - setMeta(value?: google_protobuf_struct_pb.Struct): void; +export class SystemMessage extends jspb.Message { + getContent(): string; + setContent(value: string): void; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Content.AsObject; - static toObject(includeInstance: boolean, msg: Content): Content.AsObject; + toObject(includeInstance?: boolean): SystemMessage.AsObject; + static toObject(includeInstance: boolean, msg: SystemMessage): SystemMessage.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Content, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Content; - static deserializeBinaryFromReader(message: Content, reader: jspb.BinaryReader): Content; + static serializeBinaryToWriter(message: SystemMessage, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SystemMessage; + static deserializeBinaryFromReader(message: SystemMessage, reader: jspb.BinaryReader): SystemMessage; } -export namespace Content { +export namespace SystemMessage { export type AsObject = { - name: string, - contenttype: string, - contentformat: string, - content: Uint8Array | string, - meta?: google_protobuf_struct_pb.Struct.AsObject, + content: string, + } +} + +export class UserMessage extends jspb.Message { + getContent(): string; + setContent(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): UserMessage.AsObject; + static toObject(includeInstance: boolean, msg: UserMessage): UserMessage.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: UserMessage, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): UserMessage; + static deserializeBinaryFromReader(message: UserMessage, reader: jspb.BinaryReader): UserMessage; +} + +export namespace UserMessage { + export type AsObject = { + content: string, + } +} + +export class ToolMessage extends jspb.Message { + clearToolsList(): void; + getToolsList(): Array; + setToolsList(value: Array): void; + addTools(value?: ToolMessage.Tool, index?: number): ToolMessage.Tool; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ToolMessage.AsObject; + static toObject(includeInstance: boolean, msg: ToolMessage): ToolMessage.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ToolMessage, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ToolMessage; + static deserializeBinaryFromReader(message: ToolMessage, reader: jspb.BinaryReader): ToolMessage; +} + +export namespace ToolMessage { + export type AsObject = { + toolsList: Array, + } + + export class Tool extends jspb.Message { + getName(): string; + setName(value: string): void; + + getId(): string; + setId(value: string): void; + + getContent(): string; + setContent(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Tool.AsObject; + static toObject(includeInstance: boolean, msg: Tool): Tool.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Tool, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Tool; + static deserializeBinaryFromReader(message: Tool, reader: jspb.BinaryReader): Tool; + } + + export namespace Tool { + export type AsObject = { + name: string, + id: string, + content: string, + } } } @@ -481,16 +558,27 @@ export class Message extends jspb.Message { getRole(): string; setRole(value: string): void; - clearContentsList(): void; - getContentsList(): Array; - setContentsList(value: Array): void; - addContents(value?: Content, index?: number): Content; + hasAssistant(): boolean; + clearAssistant(): void; + getAssistant(): AssistantMessage | undefined; + setAssistant(value?: AssistantMessage): void; - clearToolcallsList(): void; - getToolcallsList(): Array; - setToolcallsList(value: Array): void; - addToolcalls(value?: ToolCall, index?: number): ToolCall; + hasUser(): boolean; + clearUser(): void; + getUser(): UserMessage | undefined; + setUser(value?: UserMessage): void; + + hasTool(): boolean; + clearTool(): void; + getTool(): ToolMessage | undefined; + setTool(value?: ToolMessage): void; + + hasSystem(): boolean; + clearSystem(): void; + getSystem(): SystemMessage | undefined; + setSystem(value?: SystemMessage): void; + getMessageCase(): Message.MessageCase; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): Message.AsObject; static toObject(includeInstance: boolean, msg: Message): Message.AsObject; @@ -504,8 +592,18 @@ export class Message extends jspb.Message { export namespace Message { export type AsObject = { role: string, - contentsList: Array, - toolcallsList: Array, + assistant?: AssistantMessage.AsObject, + user?: UserMessage.AsObject, + tool?: ToolMessage.AsObject, + system?: SystemMessage.AsObject, + } + + export enum MessageCase { + MESSAGE_NOT_SET = 0, + ASSISTANT = 10, + USER = 11, + TOOL = 12, + SYSTEM = 13, } } @@ -1272,390 +1370,6 @@ export namespace GetAllConversationMessageResponse { } } -export class AssistantConversationConfiguration extends jspb.Message { - getAssistantconversationid(): string; - setAssistantconversationid(value: string): void; - - hasAssistant(): boolean; - clearAssistant(): void; - getAssistant(): AssistantDefinition | undefined; - setAssistant(value?: AssistantDefinition): void; - - hasTime(): boolean; - clearTime(): void; - getTime(): google_protobuf_timestamp_pb.Timestamp | undefined; - setTime(value?: google_protobuf_timestamp_pb.Timestamp): void; - - getMetadataMap(): jspb.Map; - clearMetadataMap(): void; - getArgsMap(): jspb.Map; - clearArgsMap(): void; - getOptionsMap(): jspb.Map; - clearOptionsMap(): void; - hasInputconfig(): boolean; - clearInputconfig(): void; - getInputconfig(): StreamConfig | undefined; - setInputconfig(value?: StreamConfig): void; - - hasOutputconfig(): boolean; - clearOutputconfig(): void; - getOutputconfig(): StreamConfig | undefined; - setOutputconfig(value?: StreamConfig): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AssistantConversationConfiguration.AsObject; - static toObject(includeInstance: boolean, msg: AssistantConversationConfiguration): AssistantConversationConfiguration.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: AssistantConversationConfiguration, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): AssistantConversationConfiguration; - static deserializeBinaryFromReader(message: AssistantConversationConfiguration, reader: jspb.BinaryReader): AssistantConversationConfiguration; -} - -export namespace AssistantConversationConfiguration { - export type AsObject = { - assistantconversationid: string, - assistant?: AssistantDefinition.AsObject, - time?: google_protobuf_timestamp_pb.Timestamp.AsObject, - metadataMap: Array<[string, google_protobuf_any_pb.Any.AsObject]>, - argsMap: Array<[string, google_protobuf_any_pb.Any.AsObject]>, - optionsMap: Array<[string, google_protobuf_any_pb.Any.AsObject]>, - inputconfig?: StreamConfig.AsObject, - outputconfig?: StreamConfig.AsObject, - } -} - -export class AssistantConversationError extends jspb.Message { - hasError(): boolean; - clearError(): void; - getError(): Error | undefined; - setError(value?: Error): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AssistantConversationError.AsObject; - static toObject(includeInstance: boolean, msg: AssistantConversationError): AssistantConversationError.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: AssistantConversationError, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): AssistantConversationError; - static deserializeBinaryFromReader(message: AssistantConversationError, reader: jspb.BinaryReader): AssistantConversationError; -} - -export namespace AssistantConversationError { - export type AsObject = { - error?: Error.AsObject, - } -} - -export class StreamConfig extends jspb.Message { - hasAudio(): boolean; - clearAudio(): void; - getAudio(): AudioConfig | undefined; - setAudio(value?: AudioConfig): void; - - hasText(): boolean; - clearText(): void; - getText(): TextConfig | undefined; - setText(value?: TextConfig): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): StreamConfig.AsObject; - static toObject(includeInstance: boolean, msg: StreamConfig): StreamConfig.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: StreamConfig, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): StreamConfig; - static deserializeBinaryFromReader(message: StreamConfig, reader: jspb.BinaryReader): StreamConfig; -} - -export namespace StreamConfig { - export type AsObject = { - audio?: AudioConfig.AsObject, - text?: TextConfig.AsObject, - } -} - -export class AudioConfig extends jspb.Message { - getSamplerate(): number; - setSamplerate(value: number): void; - - getAudioformat(): AudioConfig.AudioFormatMap[keyof AudioConfig.AudioFormatMap]; - setAudioformat(value: AudioConfig.AudioFormatMap[keyof AudioConfig.AudioFormatMap]): void; - - getChannels(): number; - setChannels(value: number): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AudioConfig.AsObject; - static toObject(includeInstance: boolean, msg: AudioConfig): AudioConfig.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: AudioConfig, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): AudioConfig; - static deserializeBinaryFromReader(message: AudioConfig, reader: jspb.BinaryReader): AudioConfig; -} - -export namespace AudioConfig { - export type AsObject = { - samplerate: number, - audioformat: AudioConfig.AudioFormatMap[keyof AudioConfig.AudioFormatMap], - channels: number, - } - - export interface AudioFormatMap { - LINEAR16: 0; - MULAW8: 1; - } - - export const AudioFormat: AudioFormatMap; -} - -export class TextConfig extends jspb.Message { - getCharset(): string; - setCharset(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): TextConfig.AsObject; - static toObject(includeInstance: boolean, msg: TextConfig): TextConfig.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: TextConfig, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): TextConfig; - static deserializeBinaryFromReader(message: TextConfig, reader: jspb.BinaryReader): TextConfig; -} - -export namespace TextConfig { - export type AsObject = { - charset: string, - } -} - -export class AssistantConversationAction extends jspb.Message { - getId(): string; - setId(value: string): void; - - getName(): string; - setName(value: string): void; - - getAction(): AssistantConversationAction.ActionTypeMap[keyof AssistantConversationAction.ActionTypeMap]; - setAction(value: AssistantConversationAction.ActionTypeMap[keyof AssistantConversationAction.ActionTypeMap]): void; - - getArgsMap(): jspb.Map; - clearArgsMap(): void; - hasTime(): boolean; - clearTime(): void; - getTime(): google_protobuf_timestamp_pb.Timestamp | undefined; - setTime(value?: google_protobuf_timestamp_pb.Timestamp): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AssistantConversationAction.AsObject; - static toObject(includeInstance: boolean, msg: AssistantConversationAction): AssistantConversationAction.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: AssistantConversationAction, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): AssistantConversationAction; - static deserializeBinaryFromReader(message: AssistantConversationAction, reader: jspb.BinaryReader): AssistantConversationAction; -} - -export namespace AssistantConversationAction { - export type AsObject = { - id: string, - name: string, - action: AssistantConversationAction.ActionTypeMap[keyof AssistantConversationAction.ActionTypeMap], - argsMap: Array<[string, google_protobuf_any_pb.Any.AsObject]>, - time?: google_protobuf_timestamp_pb.Timestamp.AsObject, - } - - export interface ActionTypeMap { - ACTION_UNSPECIFIED: 0; - KNOWLEDGE_RETRIEVAL: 1; - API_REQUEST: 2; - ENDPOINT_REQUEST: 3; - END_CONVERSATION: 5; - TRANSFER_CONVERSATION: 6; - } - - export const ActionType: ActionTypeMap; -} - -export class AssistantConversationInterruption extends jspb.Message { - getId(): string; - setId(value: string): void; - - getType(): AssistantConversationInterruption.InterruptionTypeMap[keyof AssistantConversationInterruption.InterruptionTypeMap]; - setType(value: AssistantConversationInterruption.InterruptionTypeMap[keyof AssistantConversationInterruption.InterruptionTypeMap]): void; - - hasTime(): boolean; - clearTime(): void; - getTime(): google_protobuf_timestamp_pb.Timestamp | undefined; - setTime(value?: google_protobuf_timestamp_pb.Timestamp): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AssistantConversationInterruption.AsObject; - static toObject(includeInstance: boolean, msg: AssistantConversationInterruption): AssistantConversationInterruption.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: AssistantConversationInterruption, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): AssistantConversationInterruption; - static deserializeBinaryFromReader(message: AssistantConversationInterruption, reader: jspb.BinaryReader): AssistantConversationInterruption; -} - -export namespace AssistantConversationInterruption { - export type AsObject = { - id: string, - type: AssistantConversationInterruption.InterruptionTypeMap[keyof AssistantConversationInterruption.InterruptionTypeMap], - time?: google_protobuf_timestamp_pb.Timestamp.AsObject, - } - - export interface InterruptionTypeMap { - INTERRUPTION_TYPE_UNSPECIFIED: 0; - INTERRUPTION_TYPE_VAD: 1; - INTERRUPTION_TYPE_WORD: 2; - } - - export const InterruptionType: InterruptionTypeMap; -} - -export class AssistantConversationMessageTextContent extends jspb.Message { - getContent(): string; - setContent(value: string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AssistantConversationMessageTextContent.AsObject; - static toObject(includeInstance: boolean, msg: AssistantConversationMessageTextContent): AssistantConversationMessageTextContent.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: AssistantConversationMessageTextContent, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): AssistantConversationMessageTextContent; - static deserializeBinaryFromReader(message: AssistantConversationMessageTextContent, reader: jspb.BinaryReader): AssistantConversationMessageTextContent; -} - -export namespace AssistantConversationMessageTextContent { - export type AsObject = { - content: string, - } -} - -export class AssistantConversationMessageAudioContent extends jspb.Message { - getContent(): Uint8Array | string; - getContent_asU8(): Uint8Array; - getContent_asB64(): string; - setContent(value: Uint8Array | string): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AssistantConversationMessageAudioContent.AsObject; - static toObject(includeInstance: boolean, msg: AssistantConversationMessageAudioContent): AssistantConversationMessageAudioContent.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: AssistantConversationMessageAudioContent, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): AssistantConversationMessageAudioContent; - static deserializeBinaryFromReader(message: AssistantConversationMessageAudioContent, reader: jspb.BinaryReader): AssistantConversationMessageAudioContent; -} - -export namespace AssistantConversationMessageAudioContent { - export type AsObject = { - content: Uint8Array | string, - } -} - -export class AssistantConversationUserMessage extends jspb.Message { - hasAudio(): boolean; - clearAudio(): void; - getAudio(): AssistantConversationMessageAudioContent | undefined; - setAudio(value?: AssistantConversationMessageAudioContent): void; - - hasText(): boolean; - clearText(): void; - getText(): AssistantConversationMessageTextContent | undefined; - setText(value?: AssistantConversationMessageTextContent): void; - - getId(): string; - setId(value: string): void; - - getCompleted(): boolean; - setCompleted(value: boolean): void; - - hasTime(): boolean; - clearTime(): void; - getTime(): google_protobuf_timestamp_pb.Timestamp | undefined; - setTime(value?: google_protobuf_timestamp_pb.Timestamp): void; - - getMessageCase(): AssistantConversationUserMessage.MessageCase; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AssistantConversationUserMessage.AsObject; - static toObject(includeInstance: boolean, msg: AssistantConversationUserMessage): AssistantConversationUserMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: AssistantConversationUserMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): AssistantConversationUserMessage; - static deserializeBinaryFromReader(message: AssistantConversationUserMessage, reader: jspb.BinaryReader): AssistantConversationUserMessage; -} - -export namespace AssistantConversationUserMessage { - export type AsObject = { - audio?: AssistantConversationMessageAudioContent.AsObject, - text?: AssistantConversationMessageTextContent.AsObject, - id: string, - completed: boolean, - time?: google_protobuf_timestamp_pb.Timestamp.AsObject, - } - - export enum MessageCase { - MESSAGE_NOT_SET = 0, - AUDIO = 10, - TEXT = 11, - } -} - -export class AssistantConversationAssistantMessage extends jspb.Message { - hasAudio(): boolean; - clearAudio(): void; - getAudio(): AssistantConversationMessageAudioContent | undefined; - setAudio(value?: AssistantConversationMessageAudioContent): void; - - hasText(): boolean; - clearText(): void; - getText(): AssistantConversationMessageTextContent | undefined; - setText(value?: AssistantConversationMessageTextContent): void; - - getId(): string; - setId(value: string): void; - - getCompleted(): boolean; - setCompleted(value: boolean): void; - - hasTime(): boolean; - clearTime(): void; - getTime(): google_protobuf_timestamp_pb.Timestamp | undefined; - setTime(value?: google_protobuf_timestamp_pb.Timestamp): void; - - getMessageCase(): AssistantConversationAssistantMessage.MessageCase; - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AssistantConversationAssistantMessage.AsObject; - static toObject(includeInstance: boolean, msg: AssistantConversationAssistantMessage): AssistantConversationAssistantMessage.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: AssistantConversationAssistantMessage, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): AssistantConversationAssistantMessage; - static deserializeBinaryFromReader(message: AssistantConversationAssistantMessage, reader: jspb.BinaryReader): AssistantConversationAssistantMessage; -} - -export namespace AssistantConversationAssistantMessage { - export type AsObject = { - audio?: AssistantConversationMessageAudioContent.AsObject, - text?: AssistantConversationMessageTextContent.AsObject, - id: string, - completed: boolean, - time?: google_protobuf_timestamp_pb.Timestamp.AsObject, - } - - export enum MessageCase { - MESSAGE_NOT_SET = 0, - AUDIO = 10, - TEXT = 11, - } -} - export interface SourceMap { WEB_PLUGIN: 0; DEBUGGER: 1; diff --git a/src/clients/protos/common_pb.js b/src/clients/protos/common_pb.js index 64333ea..b758fa1 100644 --- a/src/clients/protos/common_pb.js +++ b/src/clients/protos/common_pb.js @@ -15,35 +15,19 @@ var jspb = require('google-protobuf'); var goog = jspb; var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); -var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js'); -goog.object.extend(proto, google_protobuf_any_pb); var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); goog.object.extend(proto, google_protobuf_timestamp_pb); var google_protobuf_struct_pb = require('google-protobuf/google/protobuf/struct_pb.js'); goog.object.extend(proto, google_protobuf_struct_pb); goog.exportSymbol('proto.Argument', null, global); goog.exportSymbol('proto.AssistantConversation', null, global); -goog.exportSymbol('proto.AssistantConversationAction', null, global); -goog.exportSymbol('proto.AssistantConversationAction.ActionType', null, global); -goog.exportSymbol('proto.AssistantConversationAssistantMessage', null, global); -goog.exportSymbol('proto.AssistantConversationAssistantMessage.MessageCase', null, global); -goog.exportSymbol('proto.AssistantConversationConfiguration', null, global); goog.exportSymbol('proto.AssistantConversationContext', null, global); -goog.exportSymbol('proto.AssistantConversationError', null, global); -goog.exportSymbol('proto.AssistantConversationInterruption', null, global); -goog.exportSymbol('proto.AssistantConversationInterruption.InterruptionType', null, global); goog.exportSymbol('proto.AssistantConversationMessage', null, global); -goog.exportSymbol('proto.AssistantConversationMessageAudioContent', null, global); -goog.exportSymbol('proto.AssistantConversationMessageTextContent', null, global); goog.exportSymbol('proto.AssistantConversationRecording', null, global); goog.exportSymbol('proto.AssistantConversationTelephonyEvent', null, global); -goog.exportSymbol('proto.AssistantConversationUserMessage', null, global); -goog.exportSymbol('proto.AssistantConversationUserMessage.MessageCase', null, global); goog.exportSymbol('proto.AssistantDefinition', null, global); -goog.exportSymbol('proto.AudioConfig', null, global); -goog.exportSymbol('proto.AudioConfig.AudioFormat', null, global); +goog.exportSymbol('proto.AssistantMessage', null, global); goog.exportSymbol('proto.BaseResponse', null, global); -goog.exportSymbol('proto.Content', null, global); goog.exportSymbol('proto.Criteria', null, global); goog.exportSymbol('proto.Error', null, global); goog.exportSymbol('proto.FieldSelector', null, global); @@ -54,6 +38,7 @@ goog.exportSymbol('proto.GetAllConversationMessageRequest', null, global); goog.exportSymbol('proto.GetAllConversationMessageResponse', null, global); goog.exportSymbol('proto.Knowledge', null, global); goog.exportSymbol('proto.Message', null, global); +goog.exportSymbol('proto.Message.MessageCase', null, global); goog.exportSymbol('proto.Metadata', null, global); goog.exportSymbol('proto.Metric', null, global); goog.exportSymbol('proto.Ordering', null, global); @@ -61,14 +46,16 @@ goog.exportSymbol('proto.Organization', null, global); goog.exportSymbol('proto.Paginate', null, global); goog.exportSymbol('proto.Paginated', null, global); goog.exportSymbol('proto.Source', null, global); -goog.exportSymbol('proto.StreamConfig', null, global); +goog.exportSymbol('proto.SystemMessage', null, global); goog.exportSymbol('proto.Tag', null, global); goog.exportSymbol('proto.Telemetry', null, global); goog.exportSymbol('proto.TextChatCompletePrompt', null, global); -goog.exportSymbol('proto.TextConfig', null, global); goog.exportSymbol('proto.TextPrompt', null, global); goog.exportSymbol('proto.ToolCall', null, global); +goog.exportSymbol('proto.ToolMessage', null, global); +goog.exportSymbol('proto.ToolMessage.Tool', null, global); goog.exportSymbol('proto.User', null, global); +goog.exportSymbol('proto.UserMessage', null, global); goog.exportSymbol('proto.Variable', null, global); /** * Generated by JsPbCodeGenerator. @@ -395,58 +382,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.Content = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.Content, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.Content.displayName = 'proto.Content'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.Message = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.Message.repeatedFields_, null); -}; -goog.inherits(proto.Message, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.Message.displayName = 'proto.Message'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.ToolCall = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.AssistantMessage = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.AssistantMessage.repeatedFields_, null); }; -goog.inherits(proto.ToolCall, jspb.Message); +goog.inherits(proto.AssistantMessage, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.ToolCall.displayName = 'proto.ToolCall'; + proto.AssistantMessage.displayName = 'proto.AssistantMessage'; } /** * Generated by JsPbCodeGenerator. @@ -458,16 +403,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.FunctionCall = function(opt_data) { +proto.SystemMessage = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.FunctionCall, jspb.Message); +goog.inherits(proto.SystemMessage, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.FunctionCall.displayName = 'proto.FunctionCall'; + proto.SystemMessage.displayName = 'proto.SystemMessage'; } /** * Generated by JsPbCodeGenerator. @@ -479,16 +424,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.Telemetry = function(opt_data) { +proto.UserMessage = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.Telemetry, jspb.Message); +goog.inherits(proto.UserMessage, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.Telemetry.displayName = 'proto.Telemetry'; + proto.UserMessage.displayName = 'proto.UserMessage'; } /** * Generated by JsPbCodeGenerator. @@ -500,16 +445,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.Knowledge = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.Knowledge.repeatedFields_, null); +proto.ToolMessage = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ToolMessage.repeatedFields_, null); }; -goog.inherits(proto.Knowledge, jspb.Message); +goog.inherits(proto.ToolMessage, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.Knowledge.displayName = 'proto.Knowledge'; + proto.ToolMessage.displayName = 'proto.ToolMessage'; } /** * Generated by JsPbCodeGenerator. @@ -521,37 +466,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.TextPrompt = function(opt_data) { +proto.ToolMessage.Tool = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.TextPrompt, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.TextPrompt.displayName = 'proto.TextPrompt'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.TextChatCompletePrompt = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.TextChatCompletePrompt.repeatedFields_, null); -}; -goog.inherits(proto.TextChatCompletePrompt, jspb.Message); +goog.inherits(proto.ToolMessage.Tool, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.TextChatCompletePrompt.displayName = 'proto.TextChatCompletePrompt'; + proto.ToolMessage.Tool.displayName = 'proto.ToolMessage.Tool'; } /** * Generated by JsPbCodeGenerator. @@ -563,16 +487,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.AssistantConversationMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.AssistantConversationMessage.repeatedFields_, null); +proto.Message = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.Message.oneofGroups_); }; -goog.inherits(proto.AssistantConversationMessage, jspb.Message); +goog.inherits(proto.Message, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.AssistantConversationMessage.displayName = 'proto.AssistantConversationMessage'; + proto.Message.displayName = 'proto.Message'; } /** * Generated by JsPbCodeGenerator. @@ -584,16 +508,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.AssistantConversationContext = function(opt_data) { +proto.ToolCall = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.AssistantConversationContext, jspb.Message); +goog.inherits(proto.ToolCall, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.AssistantConversationContext.displayName = 'proto.AssistantConversationContext'; + proto.ToolCall.displayName = 'proto.ToolCall'; } /** * Generated by JsPbCodeGenerator. @@ -605,16 +529,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.AssistantConversationRecording = function(opt_data) { +proto.FunctionCall = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.AssistantConversationRecording, jspb.Message); +goog.inherits(proto.FunctionCall, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.AssistantConversationRecording.displayName = 'proto.AssistantConversationRecording'; + proto.FunctionCall.displayName = 'proto.FunctionCall'; } /** * Generated by JsPbCodeGenerator. @@ -626,100 +550,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.AssistantConversationTelephonyEvent = function(opt_data) { +proto.Telemetry = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.AssistantConversationTelephonyEvent, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.AssistantConversationTelephonyEvent.displayName = 'proto.AssistantConversationTelephonyEvent'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.AssistantConversation = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.AssistantConversation.repeatedFields_, null); -}; -goog.inherits(proto.AssistantConversation, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.AssistantConversation.displayName = 'proto.AssistantConversation'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.GetAllAssistantConversationRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.GetAllAssistantConversationRequest.repeatedFields_, null); -}; -goog.inherits(proto.GetAllAssistantConversationRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.GetAllAssistantConversationRequest.displayName = 'proto.GetAllAssistantConversationRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.GetAllAssistantConversationResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.GetAllAssistantConversationResponse.repeatedFields_, null); -}; -goog.inherits(proto.GetAllAssistantConversationResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.GetAllAssistantConversationResponse.displayName = 'proto.GetAllAssistantConversationResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.GetAllConversationMessageRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.GetAllConversationMessageRequest.repeatedFields_, null); -}; -goog.inherits(proto.GetAllConversationMessageRequest, jspb.Message); +goog.inherits(proto.Telemetry, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.GetAllConversationMessageRequest.displayName = 'proto.GetAllConversationMessageRequest'; + proto.Telemetry.displayName = 'proto.Telemetry'; } /** * Generated by JsPbCodeGenerator. @@ -731,16 +571,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.GetAllConversationMessageResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.GetAllConversationMessageResponse.repeatedFields_, null); +proto.Knowledge = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.Knowledge.repeatedFields_, null); }; -goog.inherits(proto.GetAllConversationMessageResponse, jspb.Message); +goog.inherits(proto.Knowledge, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.GetAllConversationMessageResponse.displayName = 'proto.GetAllConversationMessageResponse'; + proto.Knowledge.displayName = 'proto.Knowledge'; } /** * Generated by JsPbCodeGenerator. @@ -752,16 +592,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.AssistantConversationConfiguration = function(opt_data) { +proto.TextPrompt = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.AssistantConversationConfiguration, jspb.Message); +goog.inherits(proto.TextPrompt, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.AssistantConversationConfiguration.displayName = 'proto.AssistantConversationConfiguration'; + proto.TextPrompt.displayName = 'proto.TextPrompt'; } /** * Generated by JsPbCodeGenerator. @@ -773,16 +613,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.AssistantConversationError = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.TextChatCompletePrompt = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.TextChatCompletePrompt.repeatedFields_, null); }; -goog.inherits(proto.AssistantConversationError, jspb.Message); +goog.inherits(proto.TextChatCompletePrompt, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.AssistantConversationError.displayName = 'proto.AssistantConversationError'; + proto.TextChatCompletePrompt.displayName = 'proto.TextChatCompletePrompt'; } /** * Generated by JsPbCodeGenerator. @@ -794,16 +634,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.StreamConfig = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.AssistantConversationMessage = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.AssistantConversationMessage.repeatedFields_, null); }; -goog.inherits(proto.StreamConfig, jspb.Message); +goog.inherits(proto.AssistantConversationMessage, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.StreamConfig.displayName = 'proto.StreamConfig'; + proto.AssistantConversationMessage.displayName = 'proto.AssistantConversationMessage'; } /** * Generated by JsPbCodeGenerator. @@ -815,16 +655,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.AudioConfig = function(opt_data) { +proto.AssistantConversationContext = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.AudioConfig, jspb.Message); +goog.inherits(proto.AssistantConversationContext, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.AudioConfig.displayName = 'proto.AudioConfig'; + proto.AssistantConversationContext.displayName = 'proto.AssistantConversationContext'; } /** * Generated by JsPbCodeGenerator. @@ -836,16 +676,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.TextConfig = function(opt_data) { +proto.AssistantConversationRecording = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.TextConfig, jspb.Message); +goog.inherits(proto.AssistantConversationRecording, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.TextConfig.displayName = 'proto.TextConfig'; + proto.AssistantConversationRecording.displayName = 'proto.AssistantConversationRecording'; } /** * Generated by JsPbCodeGenerator. @@ -857,16 +697,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.AssistantConversationAction = function(opt_data) { +proto.AssistantConversationTelephonyEvent = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.AssistantConversationAction, jspb.Message); +goog.inherits(proto.AssistantConversationTelephonyEvent, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.AssistantConversationAction.displayName = 'proto.AssistantConversationAction'; + proto.AssistantConversationTelephonyEvent.displayName = 'proto.AssistantConversationTelephonyEvent'; } /** * Generated by JsPbCodeGenerator. @@ -878,16 +718,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.AssistantConversationInterruption = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.AssistantConversation = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.AssistantConversation.repeatedFields_, null); }; -goog.inherits(proto.AssistantConversationInterruption, jspb.Message); +goog.inherits(proto.AssistantConversation, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.AssistantConversationInterruption.displayName = 'proto.AssistantConversationInterruption'; + proto.AssistantConversation.displayName = 'proto.AssistantConversation'; } /** * Generated by JsPbCodeGenerator. @@ -899,16 +739,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.AssistantConversationMessageTextContent = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.GetAllAssistantConversationRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.GetAllAssistantConversationRequest.repeatedFields_, null); }; -goog.inherits(proto.AssistantConversationMessageTextContent, jspb.Message); +goog.inherits(proto.GetAllAssistantConversationRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.AssistantConversationMessageTextContent.displayName = 'proto.AssistantConversationMessageTextContent'; + proto.GetAllAssistantConversationRequest.displayName = 'proto.GetAllAssistantConversationRequest'; } /** * Generated by JsPbCodeGenerator. @@ -920,16 +760,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.AssistantConversationMessageAudioContent = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.GetAllAssistantConversationResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.GetAllAssistantConversationResponse.repeatedFields_, null); }; -goog.inherits(proto.AssistantConversationMessageAudioContent, jspb.Message); +goog.inherits(proto.GetAllAssistantConversationResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.AssistantConversationMessageAudioContent.displayName = 'proto.AssistantConversationMessageAudioContent'; + proto.GetAllAssistantConversationResponse.displayName = 'proto.GetAllAssistantConversationResponse'; } /** * Generated by JsPbCodeGenerator. @@ -941,16 +781,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.AssistantConversationUserMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.AssistantConversationUserMessage.oneofGroups_); +proto.GetAllConversationMessageRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.GetAllConversationMessageRequest.repeatedFields_, null); }; -goog.inherits(proto.AssistantConversationUserMessage, jspb.Message); +goog.inherits(proto.GetAllConversationMessageRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.AssistantConversationUserMessage.displayName = 'proto.AssistantConversationUserMessage'; + proto.GetAllConversationMessageRequest.displayName = 'proto.GetAllConversationMessageRequest'; } /** * Generated by JsPbCodeGenerator. @@ -962,16 +802,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.AssistantConversationAssistantMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.AssistantConversationAssistantMessage.oneofGroups_); +proto.GetAllConversationMessageResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.GetAllConversationMessageResponse.repeatedFields_, null); }; -goog.inherits(proto.AssistantConversationAssistantMessage, jspb.Message); +goog.inherits(proto.GetAllConversationMessageResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.AssistantConversationAssistantMessage.displayName = 'proto.AssistantConversationAssistantMessage'; + proto.GetAllConversationMessageResponse.displayName = 'proto.GetAllConversationMessageResponse'; } @@ -3943,6 +3783,13 @@ proto.Metric.prototype.setDescription = function(value) { +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.AssistantMessage.repeatedFields_ = [2,3]; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -3958,8 +3805,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.Content.prototype.toObject = function(opt_includeInstance) { - return proto.Content.toObject(opt_includeInstance, this); +proto.AssistantMessage.prototype.toObject = function(opt_includeInstance) { + return proto.AssistantMessage.toObject(opt_includeInstance, this); }; @@ -3968,17 +3815,15 @@ proto.Content.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.Content} msg The msg instance to transform. + * @param {!proto.AssistantMessage} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.Content.toObject = function(includeInstance, msg) { +proto.AssistantMessage.toObject = function(includeInstance, msg) { var f, obj = { - name: jspb.Message.getFieldWithDefault(msg, 1, ""), - contenttype: jspb.Message.getFieldWithDefault(msg, 2, ""), - contentformat: jspb.Message.getFieldWithDefault(msg, 3, ""), - content: msg.getContent_asB64(), - meta: (f = msg.getMeta()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f) + contentsList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f, + toolcallsList: jspb.Message.toObjectList(msg.getToolcallsList(), + proto.ToolCall.toObject, includeInstance) }; if (includeInstance) { @@ -3992,49 +3837,37 @@ proto.Content.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.Content} + * @return {!proto.AssistantMessage} */ -proto.Content.deserializeBinary = function(bytes) { +proto.AssistantMessage.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.Content; - return proto.Content.deserializeBinaryFromReader(msg, reader); + var msg = new proto.AssistantMessage; + return proto.AssistantMessage.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.Content} msg The message object to deserialize into. + * @param {!proto.AssistantMessage} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.Content} + * @return {!proto.AssistantMessage} */ -proto.Content.deserializeBinaryFromReader = function(msg, reader) { +proto.AssistantMessage.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setName(value); - break; case 2: var value = /** @type {string} */ (reader.readString()); - msg.setContenttype(value); + msg.addContents(value); break; case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setContentformat(value); - break; - case 4: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setContent(value); - break; - case 5: - var value = new google_protobuf_struct_pb.Struct; - reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader); - msg.setMeta(value); + var value = new proto.ToolCall; + reader.readMessage(value,proto.ToolCall.deserializeBinaryFromReader); + msg.addToolcalls(value); break; default: reader.skipField(); @@ -4049,9 +3882,9 @@ proto.Content.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.Content.prototype.serializeBinary = function() { +proto.AssistantMessage.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.Content.serializeBinaryToWriter(this, writer); + proto.AssistantMessage.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -4059,192 +3892,106 @@ proto.Content.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.Content} message + * @param {!proto.AssistantMessage} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.Content.serializeBinaryToWriter = function(message, writer) { +proto.AssistantMessage.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getName(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getContenttype(); + f = message.getContentsList(); if (f.length > 0) { - writer.writeString( + writer.writeRepeatedString( 2, f ); } - f = message.getContentformat(); + f = message.getToolcallsList(); if (f.length > 0) { - writer.writeString( + writer.writeRepeatedMessage( 3, - f - ); - } - f = message.getContent_asU8(); - if (f.length > 0) { - writer.writeBytes( - 4, - f - ); - } - f = message.getMeta(); - if (f != null) { - writer.writeMessage( - 5, f, - google_protobuf_struct_pb.Struct.serializeBinaryToWriter + proto.ToolCall.serializeBinaryToWriter ); } }; /** - * optional string name = 1; - * @return {string} - */ -proto.Content.prototype.getName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.Content} returns this - */ -proto.Content.prototype.setName = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string contentType = 2; - * @return {string} - */ -proto.Content.prototype.getContenttype = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.Content} returns this + * repeated string contents = 2; + * @return {!Array} */ -proto.Content.prototype.setContenttype = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); +proto.AssistantMessage.prototype.getContentsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); }; /** - * optional string contentFormat = 3; - * @return {string} + * @param {!Array} value + * @return {!proto.AssistantMessage} returns this */ -proto.Content.prototype.getContentformat = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +proto.AssistantMessage.prototype.setContentsList = function(value) { + return jspb.Message.setField(this, 2, value || []); }; /** * @param {string} value - * @return {!proto.Content} returns this - */ -proto.Content.prototype.setContentformat = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional bytes content = 4; - * @return {!(string|Uint8Array)} - */ -proto.Content.prototype.getContent = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * optional bytes content = 4; - * This is a type-conversion wrapper around `getContent()` - * @return {string} - */ -proto.Content.prototype.getContent_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getContent())); -}; - - -/** - * optional bytes content = 4; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getContent()` - * @return {!Uint8Array} + * @param {number=} opt_index + * @return {!proto.AssistantMessage} returns this */ -proto.Content.prototype.getContent_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getContent())); +proto.AssistantMessage.prototype.addContents = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 2, value, opt_index); }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.Content} returns this + * Clears the list making it empty but non-null. + * @return {!proto.AssistantMessage} returns this */ -proto.Content.prototype.setContent = function(value) { - return jspb.Message.setProto3BytesField(this, 4, value); +proto.AssistantMessage.prototype.clearContentsList = function() { + return this.setContentsList([]); }; /** - * optional google.protobuf.Struct meta = 5; - * @return {?proto.google.protobuf.Struct} + * repeated ToolCall toolCalls = 3; + * @return {!Array} */ -proto.Content.prototype.getMeta = function() { - return /** @type{?proto.google.protobuf.Struct} */ ( - jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 5)); +proto.AssistantMessage.prototype.getToolcallsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.ToolCall, 3)); }; /** - * @param {?proto.google.protobuf.Struct|undefined} value - * @return {!proto.Content} returns this + * @param {!Array} value + * @return {!proto.AssistantMessage} returns this */ -proto.Content.prototype.setMeta = function(value) { - return jspb.Message.setWrapperField(this, 5, value); +proto.AssistantMessage.prototype.setToolcallsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); }; /** - * Clears the message field making it undefined. - * @return {!proto.Content} returns this + * @param {!proto.ToolCall=} opt_value + * @param {number=} opt_index + * @return {!proto.ToolCall} */ -proto.Content.prototype.clearMeta = function() { - return this.setMeta(undefined); +proto.AssistantMessage.prototype.addToolcalls = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.ToolCall, opt_index); }; /** - * Returns whether this field is set. - * @return {boolean} + * Clears the list making it empty but non-null. + * @return {!proto.AssistantMessage} returns this */ -proto.Content.prototype.hasMeta = function() { - return jspb.Message.getField(this, 5) != null; +proto.AssistantMessage.prototype.clearToolcallsList = function() { + return this.setToolcallsList([]); }; -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.Message.repeatedFields_ = [2,3]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -4260,8 +4007,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.Message.prototype.toObject = function(opt_includeInstance) { - return proto.Message.toObject(opt_includeInstance, this); +proto.SystemMessage.prototype.toObject = function(opt_includeInstance) { + return proto.SystemMessage.toObject(opt_includeInstance, this); }; @@ -4270,17 +4017,13 @@ proto.Message.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.Message} msg The msg instance to transform. + * @param {!proto.SystemMessage} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.Message.toObject = function(includeInstance, msg) { +proto.SystemMessage.toObject = function(includeInstance, msg) { var f, obj = { - role: jspb.Message.getFieldWithDefault(msg, 1, ""), - contentsList: jspb.Message.toObjectList(msg.getContentsList(), - proto.Content.toObject, includeInstance), - toolcallsList: jspb.Message.toObjectList(msg.getToolcallsList(), - proto.ToolCall.toObject, includeInstance) + content: jspb.Message.getFieldWithDefault(msg, 2, "") }; if (includeInstance) { @@ -4294,42 +4037,32 @@ proto.Message.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.Message} + * @return {!proto.SystemMessage} */ -proto.Message.deserializeBinary = function(bytes) { +proto.SystemMessage.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.Message; - return proto.Message.deserializeBinaryFromReader(msg, reader); + var msg = new proto.SystemMessage; + return proto.SystemMessage.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.Message} msg The message object to deserialize into. + * @param {!proto.SystemMessage} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.Message} + * @return {!proto.SystemMessage} */ -proto.Message.deserializeBinaryFromReader = function(msg, reader) { +proto.SystemMessage.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setRole(value); - break; case 2: - var value = new proto.Content; - reader.readMessage(value,proto.Content.deserializeBinaryFromReader); - msg.addContents(value); - break; - case 3: - var value = new proto.ToolCall; - reader.readMessage(value,proto.ToolCall.deserializeBinaryFromReader); - msg.addToolcalls(value); + var value = /** @type {string} */ (reader.readString()); + msg.setContent(value); break; default: reader.skipField(); @@ -4344,9 +4077,9 @@ proto.Message.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.Message.prototype.serializeBinary = function() { +proto.SystemMessage.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.Message.serializeBinaryToWriter(this, writer); + proto.SystemMessage.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -4354,129 +4087,37 @@ proto.Message.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.Message} message + * @param {!proto.SystemMessage} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.Message.serializeBinaryToWriter = function(message, writer) { +proto.SystemMessage.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getRole(); + f = message.getContent(); if (f.length > 0) { writer.writeString( - 1, - f - ); - } - f = message.getContentsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( 2, - f, - proto.Content.serializeBinaryToWriter - ); - } - f = message.getToolcallsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 3, - f, - proto.ToolCall.serializeBinaryToWriter + f ); } }; /** - * optional string role = 1; + * optional string content = 2; * @return {string} */ -proto.Message.prototype.getRole = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.SystemMessage.prototype.getContent = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value - * @return {!proto.Message} returns this - */ -proto.Message.prototype.setRole = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * repeated Content contents = 2; - * @return {!Array} - */ -proto.Message.prototype.getContentsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.Content, 2)); -}; - - -/** - * @param {!Array} value - * @return {!proto.Message} returns this -*/ -proto.Message.prototype.setContentsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 2, value); -}; - - -/** - * @param {!proto.Content=} opt_value - * @param {number=} opt_index - * @return {!proto.Content} - */ -proto.Message.prototype.addContents = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.Content, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.Message} returns this - */ -proto.Message.prototype.clearContentsList = function() { - return this.setContentsList([]); -}; - - -/** - * repeated ToolCall toolCalls = 3; - * @return {!Array} - */ -proto.Message.prototype.getToolcallsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.ToolCall, 3)); -}; - - -/** - * @param {!Array} value - * @return {!proto.Message} returns this -*/ -proto.Message.prototype.setToolcallsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 3, value); -}; - - -/** - * @param {!proto.ToolCall=} opt_value - * @param {number=} opt_index - * @return {!proto.ToolCall} - */ -proto.Message.prototype.addToolcalls = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.ToolCall, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.Message} returns this + * @return {!proto.SystemMessage} returns this */ -proto.Message.prototype.clearToolcallsList = function() { - return this.setToolcallsList([]); +proto.SystemMessage.prototype.setContent = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); }; @@ -4496,8 +4137,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.ToolCall.prototype.toObject = function(opt_includeInstance) { - return proto.ToolCall.toObject(opt_includeInstance, this); +proto.UserMessage.prototype.toObject = function(opt_includeInstance) { + return proto.UserMessage.toObject(opt_includeInstance, this); }; @@ -4506,15 +4147,13 @@ proto.ToolCall.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.ToolCall} msg The msg instance to transform. + * @param {!proto.UserMessage} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.ToolCall.toObject = function(includeInstance, msg) { +proto.UserMessage.toObject = function(includeInstance, msg) { var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, ""), - type: jspb.Message.getFieldWithDefault(msg, 2, ""), - pb_function: (f = msg.getFunction()) && proto.FunctionCall.toObject(includeInstance, f) + content: jspb.Message.getFieldWithDefault(msg, 2, "") }; if (includeInstance) { @@ -4528,41 +4167,32 @@ proto.ToolCall.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ToolCall} + * @return {!proto.UserMessage} */ -proto.ToolCall.deserializeBinary = function(bytes) { +proto.UserMessage.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ToolCall; - return proto.ToolCall.deserializeBinaryFromReader(msg, reader); + var msg = new proto.UserMessage; + return proto.UserMessage.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.ToolCall} msg The message object to deserialize into. + * @param {!proto.UserMessage} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ToolCall} + * @return {!proto.UserMessage} */ -proto.ToolCall.deserializeBinaryFromReader = function(msg, reader) { +proto.UserMessage.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setId(value); - break; case 2: var value = /** @type {string} */ (reader.readString()); - msg.setType(value); - break; - case 3: - var value = new proto.FunctionCall; - reader.readMessage(value,proto.FunctionCall.deserializeBinaryFromReader); - msg.setFunction(value); + msg.setContent(value); break; default: reader.skipField(); @@ -4577,9 +4207,9 @@ proto.ToolCall.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.ToolCall.prototype.serializeBinary = function() { +proto.UserMessage.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.ToolCall.serializeBinaryToWriter(this, writer); + proto.UserMessage.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -4587,110 +4217,47 @@ proto.ToolCall.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.ToolCall} message + * @param {!proto.UserMessage} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.ToolCall.serializeBinaryToWriter = function(message, writer) { +proto.UserMessage.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getType(); + f = message.getContent(); if (f.length > 0) { writer.writeString( 2, f ); } - f = message.getFunction(); - if (f != null) { - writer.writeMessage( - 3, - f, - proto.FunctionCall.serializeBinaryToWriter - ); - } -}; - - -/** - * optional string id = 1; - * @return {string} - */ -proto.ToolCall.prototype.getId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.ToolCall} returns this - */ -proto.ToolCall.prototype.setId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); }; /** - * optional string type = 2; + * optional string content = 2; * @return {string} */ -proto.ToolCall.prototype.getType = function() { +proto.UserMessage.prototype.getContent = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value - * @return {!proto.ToolCall} returns this + * @return {!proto.UserMessage} returns this */ -proto.ToolCall.prototype.setType = function(value) { +proto.UserMessage.prototype.setContent = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; -/** - * optional FunctionCall function = 3; - * @return {?proto.FunctionCall} - */ -proto.ToolCall.prototype.getFunction = function() { - return /** @type{?proto.FunctionCall} */ ( - jspb.Message.getWrapperField(this, proto.FunctionCall, 3)); -}; - - -/** - * @param {?proto.FunctionCall|undefined} value - * @return {!proto.ToolCall} returns this -*/ -proto.ToolCall.prototype.setFunction = function(value) { - return jspb.Message.setWrapperField(this, 3, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.ToolCall} returns this - */ -proto.ToolCall.prototype.clearFunction = function() { - return this.setFunction(undefined); -}; - /** - * Returns whether this field is set. - * @return {boolean} + * List of repeated fields within this message type. + * @private {!Array} + * @const */ -proto.ToolCall.prototype.hasFunction = function() { - return jspb.Message.getField(this, 3) != null; -}; - - +proto.ToolMessage.repeatedFields_ = [1]; @@ -4707,8 +4274,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.FunctionCall.prototype.toObject = function(opt_includeInstance) { - return proto.FunctionCall.toObject(opt_includeInstance, this); +proto.ToolMessage.prototype.toObject = function(opt_includeInstance) { + return proto.ToolMessage.toObject(opt_includeInstance, this); }; @@ -4717,14 +4284,14 @@ proto.FunctionCall.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.FunctionCall} msg The msg instance to transform. + * @param {!proto.ToolMessage} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.FunctionCall.toObject = function(includeInstance, msg) { +proto.ToolMessage.toObject = function(includeInstance, msg) { var f, obj = { - name: jspb.Message.getFieldWithDefault(msg, 1, ""), - arguments: jspb.Message.getFieldWithDefault(msg, 2, "") + toolsList: jspb.Message.toObjectList(msg.getToolsList(), + proto.ToolMessage.Tool.toObject, includeInstance) }; if (includeInstance) { @@ -4738,23 +4305,23 @@ proto.FunctionCall.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.FunctionCall} + * @return {!proto.ToolMessage} */ -proto.FunctionCall.deserializeBinary = function(bytes) { +proto.ToolMessage.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.FunctionCall; - return proto.FunctionCall.deserializeBinaryFromReader(msg, reader); + var msg = new proto.ToolMessage; + return proto.ToolMessage.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.FunctionCall} msg The message object to deserialize into. + * @param {!proto.ToolMessage} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.FunctionCall} + * @return {!proto.ToolMessage} */ -proto.FunctionCall.deserializeBinaryFromReader = function(msg, reader) { +proto.ToolMessage.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -4762,12 +4329,9 @@ proto.FunctionCall.deserializeBinaryFromReader = function(msg, reader) { var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setName(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setArguments(value); + var value = new proto.ToolMessage.Tool; + reader.readMessage(value,proto.ToolMessage.Tool.deserializeBinaryFromReader); + msg.addTools(value); break; default: reader.skipField(); @@ -4782,9 +4346,9 @@ proto.FunctionCall.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.FunctionCall.prototype.serializeBinary = function() { +proto.ToolMessage.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.FunctionCall.serializeBinaryToWriter(this, writer); + proto.ToolMessage.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -4792,65 +4356,23 @@ proto.FunctionCall.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.FunctionCall} message + * @param {!proto.ToolMessage} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.FunctionCall.serializeBinaryToWriter = function(message, writer) { +proto.ToolMessage.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getName(); + f = message.getToolsList(); if (f.length > 0) { - writer.writeString( + writer.writeRepeatedMessage( 1, - f - ); - } - f = message.getArguments(); - if (f.length > 0) { - writer.writeString( - 2, - f + f, + proto.ToolMessage.Tool.serializeBinaryToWriter ); } }; -/** - * optional string name = 1; - * @return {string} - */ -proto.FunctionCall.prototype.getName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.FunctionCall} returns this - */ -proto.FunctionCall.prototype.setName = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string arguments = 2; - * @return {string} - */ -proto.FunctionCall.prototype.getArguments = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.FunctionCall} returns this - */ -proto.FunctionCall.prototype.setArguments = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - @@ -4867,8 +4389,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.Telemetry.prototype.toObject = function(opt_includeInstance) { - return proto.Telemetry.toObject(opt_includeInstance, this); +proto.ToolMessage.Tool.prototype.toObject = function(opt_includeInstance) { + return proto.ToolMessage.Tool.toObject(opt_includeInstance, this); }; @@ -4877,19 +4399,15 @@ proto.Telemetry.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.Telemetry} msg The msg instance to transform. + * @param {!proto.ToolMessage.Tool} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.Telemetry.toObject = function(includeInstance, msg) { +proto.ToolMessage.Tool.toObject = function(includeInstance, msg) { var f, obj = { - stagename: jspb.Message.getFieldWithDefault(msg, 1, ""), - starttime: (f = msg.getStarttime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - endtime: (f = msg.getEndtime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - duration: jspb.Message.getFieldWithDefault(msg, 4, 0), - attributesMap: (f = msg.getAttributesMap()) ? f.toObject(includeInstance, undefined) : [], - spanid: jspb.Message.getFieldWithDefault(msg, 6, ""), - parentid: jspb.Message.getFieldWithDefault(msg, 7, "") + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + id: jspb.Message.getFieldWithDefault(msg, 2, ""), + content: jspb.Message.getFieldWithDefault(msg, 3, "") }; if (includeInstance) { @@ -4903,23 +4421,23 @@ proto.Telemetry.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.Telemetry} + * @return {!proto.ToolMessage.Tool} */ -proto.Telemetry.deserializeBinary = function(bytes) { +proto.ToolMessage.Tool.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.Telemetry; - return proto.Telemetry.deserializeBinaryFromReader(msg, reader); + var msg = new proto.ToolMessage.Tool; + return proto.ToolMessage.Tool.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.Telemetry} msg The message object to deserialize into. + * @param {!proto.ToolMessage.Tool} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.Telemetry} + * @return {!proto.ToolMessage.Tool} */ -proto.Telemetry.deserializeBinaryFromReader = function(msg, reader) { +proto.ToolMessage.Tool.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -4928,35 +4446,15 @@ proto.Telemetry.deserializeBinaryFromReader = function(msg, reader) { switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setStagename(value); + msg.setName(value); break; case 2: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setStarttime(value); - break; - case 3: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setEndtime(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint64()); - msg.setDuration(value); - break; - case 5: - var value = msg.getAttributesMap(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); - }); - break; - case 6: var value = /** @type {string} */ (reader.readString()); - msg.setSpanid(value); + msg.setId(value); break; - case 7: + case 3: var value = /** @type {string} */ (reader.readString()); - msg.setParentid(value); + msg.setContent(value); break; default: reader.skipField(); @@ -4971,9 +4469,9 @@ proto.Telemetry.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.Telemetry.prototype.serializeBinary = function() { +proto.ToolMessage.Tool.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.Telemetry.serializeBinaryToWriter(this, writer); + proto.ToolMessage.Tool.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -4981,57 +4479,30 @@ proto.Telemetry.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.Telemetry} message + * @param {!proto.ToolMessage.Tool} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.Telemetry.serializeBinaryToWriter = function(message, writer) { +proto.ToolMessage.Tool.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getStagename(); + f = message.getName(); if (f.length > 0) { writer.writeString( 1, f ); } - f = message.getStarttime(); - if (f != null) { - writer.writeMessage( - 2, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getEndtime(); - if (f != null) { - writer.writeMessage( - 3, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getDuration(); - if (f !== 0) { - writer.writeUint64( - 4, - f - ); - } - f = message.getAttributesMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(5, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); - } - f = message.getSpanid(); + f = message.getId(); if (f.length > 0) { writer.writeString( - 6, + 2, f ); } - f = message.getParentid(); + f = message.getContent(); if (f.length > 0) { writer.writeString( - 7, + 3, f ); } @@ -5039,183 +4510,128 @@ proto.Telemetry.serializeBinaryToWriter = function(message, writer) { /** - * optional string stageName = 1; + * optional string name = 1; * @return {string} */ -proto.Telemetry.prototype.getStagename = function() { +proto.ToolMessage.Tool.prototype.getName = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.Telemetry} returns this + * @return {!proto.ToolMessage.Tool} returns this */ -proto.Telemetry.prototype.setStagename = function(value) { +proto.ToolMessage.Tool.prototype.setName = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** - * optional google.protobuf.Timestamp startTime = 2; - * @return {?proto.google.protobuf.Timestamp} + * optional string id = 2; + * @return {string} */ -proto.Telemetry.prototype.getStarttime = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 2)); +proto.ToolMessage.Tool.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.Telemetry} returns this -*/ -proto.Telemetry.prototype.setStarttime = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.Telemetry} returns this - */ -proto.Telemetry.prototype.clearStarttime = function() { - return this.setStarttime(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} + * @param {string} value + * @return {!proto.ToolMessage.Tool} returns this */ -proto.Telemetry.prototype.hasStarttime = function() { - return jspb.Message.getField(this, 2) != null; +proto.ToolMessage.Tool.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); }; /** - * optional google.protobuf.Timestamp endTime = 3; - * @return {?proto.google.protobuf.Timestamp} + * optional string content = 3; + * @return {string} */ -proto.Telemetry.prototype.getEndtime = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.Telemetry} returns this -*/ -proto.Telemetry.prototype.setEndtime = function(value) { - return jspb.Message.setWrapperField(this, 3, value); +proto.ToolMessage.Tool.prototype.getContent = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** - * Clears the message field making it undefined. - * @return {!proto.Telemetry} returns this + * @param {string} value + * @return {!proto.ToolMessage.Tool} returns this */ -proto.Telemetry.prototype.clearEndtime = function() { - return this.setEndtime(undefined); +proto.ToolMessage.Tool.prototype.setContent = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); }; /** - * Returns whether this field is set. - * @return {boolean} + * repeated Tool tools = 1; + * @return {!Array} */ -proto.Telemetry.prototype.hasEndtime = function() { - return jspb.Message.getField(this, 3) != null; +proto.ToolMessage.prototype.getToolsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.ToolMessage.Tool, 1)); }; /** - * optional uint64 duration = 4; - * @return {number} - */ -proto.Telemetry.prototype.getDuration = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); + * @param {!Array} value + * @return {!proto.ToolMessage} returns this +*/ +proto.ToolMessage.prototype.setToolsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** - * @param {number} value - * @return {!proto.Telemetry} returns this + * @param {!proto.ToolMessage.Tool=} opt_value + * @param {number=} opt_index + * @return {!proto.ToolMessage.Tool} */ -proto.Telemetry.prototype.setDuration = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); +proto.ToolMessage.prototype.addTools = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.ToolMessage.Tool, opt_index); }; /** - * map attributes = 5; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} + * Clears the list making it empty but non-null. + * @return {!proto.ToolMessage} returns this */ -proto.Telemetry.prototype.getAttributesMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 5, opt_noLazyCreate, - null)); +proto.ToolMessage.prototype.clearToolsList = function() { + return this.setToolsList([]); }; -/** - * Clears values from the map. The map will be non-null. - * @return {!proto.Telemetry} returns this - */ -proto.Telemetry.prototype.clearAttributesMap = function() { - this.getAttributesMap().clear(); - return this;}; - - -/** - * optional string spanID = 6; - * @return {string} - */ -proto.Telemetry.prototype.getSpanid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); -}; - /** - * @param {string} value - * @return {!proto.Telemetry} returns this + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const */ -proto.Telemetry.prototype.setSpanid = function(value) { - return jspb.Message.setProto3StringField(this, 6, value); -}; - +proto.Message.oneofGroups_ = [[10,11,12,13]]; /** - * optional string parentID = 7; - * @return {string} + * @enum {number} */ -proto.Telemetry.prototype.getParentid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +proto.Message.MessageCase = { + MESSAGE_NOT_SET: 0, + ASSISTANT: 10, + USER: 11, + TOOL: 12, + SYSTEM: 13 }; - /** - * @param {string} value - * @return {!proto.Telemetry} returns this + * @return {proto.Message.MessageCase} */ -proto.Telemetry.prototype.setParentid = function(value) { - return jspb.Message.setProto3StringField(this, 7, value); +proto.Message.prototype.getMessageCase = function() { + return /** @type {proto.Message.MessageCase} */(jspb.Message.computeOneofCase(this, proto.Message.oneofGroups_[0])); }; -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.Knowledge.repeatedFields_ = [8]; - - - if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. @@ -5229,8 +4645,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.Knowledge.prototype.toObject = function(opt_includeInstance) { - return proto.Knowledge.toObject(opt_includeInstance, this); +proto.Message.prototype.toObject = function(opt_includeInstance) { + return proto.Message.toObject(opt_includeInstance, this); }; @@ -5239,35 +4655,17 @@ proto.Knowledge.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.Knowledge} msg The msg instance to transform. + * @param {!proto.Message} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.Knowledge.toObject = function(includeInstance, msg) { +proto.Message.toObject = function(includeInstance, msg) { var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, "0"), - name: jspb.Message.getFieldWithDefault(msg, 2, ""), - description: jspb.Message.getFieldWithDefault(msg, 3, ""), - visibility: jspb.Message.getFieldWithDefault(msg, 4, ""), - language: jspb.Message.getFieldWithDefault(msg, 5, ""), - embeddingmodelproviderid: jspb.Message.getFieldWithDefault(msg, 6, "0"), - embeddingmodelprovidername: jspb.Message.getFieldWithDefault(msg, 7, ""), - knowledgeembeddingmodeloptionsList: jspb.Message.toObjectList(msg.getKnowledgeembeddingmodeloptionsList(), - proto.Metadata.toObject, includeInstance), - status: jspb.Message.getFieldWithDefault(msg, 12, ""), - createdby: jspb.Message.getFieldWithDefault(msg, 13, "0"), - createduser: (f = msg.getCreateduser()) && proto.User.toObject(includeInstance, f), - updatedby: jspb.Message.getFieldWithDefault(msg, 15, "0"), - updateduser: (f = msg.getUpdateduser()) && proto.User.toObject(includeInstance, f), - createddate: (f = msg.getCreateddate()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - updateddate: (f = msg.getUpdateddate()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - organizationid: jspb.Message.getFieldWithDefault(msg, 19, "0"), - projectid: jspb.Message.getFieldWithDefault(msg, 20, "0"), - organization: (f = msg.getOrganization()) && proto.Organization.toObject(includeInstance, f), - knowledgetag: (f = msg.getKnowledgetag()) && proto.Tag.toObject(includeInstance, f), - documentcount: jspb.Message.getFieldWithDefault(msg, 23, 0), - tokencount: jspb.Message.getFieldWithDefault(msg, 24, 0), - wordcount: jspb.Message.getFieldWithDefault(msg, 25, 0) + role: jspb.Message.getFieldWithDefault(msg, 1, ""), + assistant: (f = msg.getAssistant()) && proto.AssistantMessage.toObject(includeInstance, f), + user: (f = msg.getUser()) && proto.UserMessage.toObject(includeInstance, f), + tool: (f = msg.getTool()) && proto.ToolMessage.toObject(includeInstance, f), + system: (f = msg.getSystem()) && proto.SystemMessage.toObject(includeInstance, f) }; if (includeInstance) { @@ -5281,23 +4679,23 @@ proto.Knowledge.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.Knowledge} + * @return {!proto.Message} */ -proto.Knowledge.deserializeBinary = function(bytes) { +proto.Message.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.Knowledge; - return proto.Knowledge.deserializeBinaryFromReader(msg, reader); + var msg = new proto.Message; + return proto.Message.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.Knowledge} msg The message object to deserialize into. + * @param {!proto.Message} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.Knowledge} + * @return {!proto.Message} */ -proto.Knowledge.deserializeBinaryFromReader = function(msg, reader) { +proto.Message.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -5305,99 +4703,28 @@ proto.Knowledge.deserializeBinaryFromReader = function(msg, reader) { var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {string} */ (reader.readUint64String()); - msg.setId(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setName(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setDescription(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setVisibility(value); - break; - case 5: var value = /** @type {string} */ (reader.readString()); - msg.setLanguage(value); - break; - case 6: - var value = /** @type {string} */ (reader.readUint64String()); - msg.setEmbeddingmodelproviderid(value); + msg.setRole(value); break; - case 7: - var value = /** @type {string} */ (reader.readString()); - msg.setEmbeddingmodelprovidername(value); + case 10: + var value = new proto.AssistantMessage; + reader.readMessage(value,proto.AssistantMessage.deserializeBinaryFromReader); + msg.setAssistant(value); break; - case 8: - var value = new proto.Metadata; - reader.readMessage(value,proto.Metadata.deserializeBinaryFromReader); - msg.addKnowledgeembeddingmodeloptions(value); + case 11: + var value = new proto.UserMessage; + reader.readMessage(value,proto.UserMessage.deserializeBinaryFromReader); + msg.setUser(value); break; case 12: - var value = /** @type {string} */ (reader.readString()); - msg.setStatus(value); + var value = new proto.ToolMessage; + reader.readMessage(value,proto.ToolMessage.deserializeBinaryFromReader); + msg.setTool(value); break; case 13: - var value = /** @type {string} */ (reader.readUint64String()); - msg.setCreatedby(value); - break; - case 14: - var value = new proto.User; - reader.readMessage(value,proto.User.deserializeBinaryFromReader); - msg.setCreateduser(value); - break; - case 15: - var value = /** @type {string} */ (reader.readUint64String()); - msg.setUpdatedby(value); - break; - case 16: - var value = new proto.User; - reader.readMessage(value,proto.User.deserializeBinaryFromReader); - msg.setUpdateduser(value); - break; - case 17: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setCreateddate(value); - break; - case 18: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setUpdateddate(value); - break; - case 19: - var value = /** @type {string} */ (reader.readUint64String()); - msg.setOrganizationid(value); - break; - case 20: - var value = /** @type {string} */ (reader.readUint64String()); - msg.setProjectid(value); - break; - case 21: - var value = new proto.Organization; - reader.readMessage(value,proto.Organization.deserializeBinaryFromReader); - msg.setOrganization(value); - break; - case 22: - var value = new proto.Tag; - reader.readMessage(value,proto.Tag.deserializeBinaryFromReader); - msg.setKnowledgetag(value); - break; - case 23: - var value = /** @type {number} */ (reader.readUint32()); - msg.setDocumentcount(value); - break; - case 24: - var value = /** @type {number} */ (reader.readUint32()); - msg.setTokencount(value); - break; - case 25: - var value = /** @type {number} */ (reader.readUint32()); - msg.setWordcount(value); + var value = new proto.SystemMessage; + reader.readMessage(value,proto.SystemMessage.deserializeBinaryFromReader); + msg.setSystem(value); break; default: reader.skipField(); @@ -5412,9 +4739,9 @@ proto.Knowledge.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.Knowledge.prototype.serializeBinary = function() { +proto.Message.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.Knowledge.serializeBinaryToWriter(this, writer); + proto.Message.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -5422,456 +4749,419 @@ proto.Knowledge.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.Knowledge} message + * @param {!proto.Message} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.Knowledge.serializeBinaryToWriter = function(message, writer) { +proto.Message.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getId(); - if (parseInt(f, 10) !== 0) { - writer.writeUint64String( - 1, - f - ); - } - f = message.getName(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getDescription(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getVisibility(); - if (f.length > 0) { - writer.writeString( - 4, - f - ); - } - f = message.getLanguage(); - if (f.length > 0) { - writer.writeString( - 5, - f - ); - } - f = message.getEmbeddingmodelproviderid(); - if (parseInt(f, 10) !== 0) { - writer.writeUint64String( - 6, - f - ); - } - f = message.getEmbeddingmodelprovidername(); - if (f.length > 0) { - writer.writeString( - 7, - f - ); - } - f = message.getKnowledgeembeddingmodeloptionsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 8, - f, - proto.Metadata.serializeBinaryToWriter - ); - } - f = message.getStatus(); + f = message.getRole(); if (f.length > 0) { writer.writeString( - 12, - f - ); - } - f = message.getCreatedby(); - if (parseInt(f, 10) !== 0) { - writer.writeUint64String( - 13, - f - ); - } - f = message.getCreateduser(); - if (f != null) { - writer.writeMessage( - 14, - f, - proto.User.serializeBinaryToWriter - ); - } - f = message.getUpdatedby(); - if (parseInt(f, 10) !== 0) { - writer.writeUint64String( - 15, + 1, f ); } - f = message.getUpdateduser(); - if (f != null) { - writer.writeMessage( - 16, - f, - proto.User.serializeBinaryToWriter - ); - } - f = message.getCreateddate(); + f = message.getAssistant(); if (f != null) { writer.writeMessage( - 17, + 10, f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + proto.AssistantMessage.serializeBinaryToWriter ); } - f = message.getUpdateddate(); + f = message.getUser(); if (f != null) { writer.writeMessage( - 18, + 11, f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getOrganizationid(); - if (parseInt(f, 10) !== 0) { - writer.writeUint64String( - 19, - f - ); - } - f = message.getProjectid(); - if (parseInt(f, 10) !== 0) { - writer.writeUint64String( - 20, - f + proto.UserMessage.serializeBinaryToWriter ); } - f = message.getOrganization(); + f = message.getTool(); if (f != null) { writer.writeMessage( - 21, + 12, f, - proto.Organization.serializeBinaryToWriter + proto.ToolMessage.serializeBinaryToWriter ); } - f = message.getKnowledgetag(); + f = message.getSystem(); if (f != null) { writer.writeMessage( - 22, + 13, f, - proto.Tag.serializeBinaryToWriter - ); - } - f = message.getDocumentcount(); - if (f !== 0) { - writer.writeUint32( - 23, - f - ); - } - f = message.getTokencount(); - if (f !== 0) { - writer.writeUint32( - 24, - f - ); - } - f = message.getWordcount(); - if (f !== 0) { - writer.writeUint32( - 25, - f + proto.SystemMessage.serializeBinaryToWriter ); } }; /** - * optional uint64 id = 1; + * optional string role = 1; * @return {string} */ -proto.Knowledge.prototype.getId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); +proto.Message.prototype.getRole = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.Knowledge} returns this + * @return {!proto.Message} returns this */ -proto.Knowledge.prototype.setId = function(value) { - return jspb.Message.setProto3StringIntField(this, 1, value); +proto.Message.prototype.setRole = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; /** - * optional string name = 2; - * @return {string} + * optional AssistantMessage assistant = 10; + * @return {?proto.AssistantMessage} */ -proto.Knowledge.prototype.getName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.Message.prototype.getAssistant = function() { + return /** @type{?proto.AssistantMessage} */ ( + jspb.Message.getWrapperField(this, proto.AssistantMessage, 10)); }; /** - * @param {string} value - * @return {!proto.Knowledge} returns this - */ -proto.Knowledge.prototype.setName = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); + * @param {?proto.AssistantMessage|undefined} value + * @return {!proto.Message} returns this +*/ +proto.Message.prototype.setAssistant = function(value) { + return jspb.Message.setOneofWrapperField(this, 10, proto.Message.oneofGroups_[0], value); }; /** - * optional string description = 3; - * @return {string} + * Clears the message field making it undefined. + * @return {!proto.Message} returns this */ -proto.Knowledge.prototype.getDescription = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +proto.Message.prototype.clearAssistant = function() { + return this.setAssistant(undefined); }; /** - * @param {string} value - * @return {!proto.Knowledge} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.Knowledge.prototype.setDescription = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); +proto.Message.prototype.hasAssistant = function() { + return jspb.Message.getField(this, 10) != null; }; /** - * optional string visibility = 4; - * @return {string} + * optional UserMessage user = 11; + * @return {?proto.UserMessage} */ -proto.Knowledge.prototype.getVisibility = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +proto.Message.prototype.getUser = function() { + return /** @type{?proto.UserMessage} */ ( + jspb.Message.getWrapperField(this, proto.UserMessage, 11)); }; /** - * @param {string} value - * @return {!proto.Knowledge} returns this - */ -proto.Knowledge.prototype.setVisibility = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); + * @param {?proto.UserMessage|undefined} value + * @return {!proto.Message} returns this +*/ +proto.Message.prototype.setUser = function(value) { + return jspb.Message.setOneofWrapperField(this, 11, proto.Message.oneofGroups_[0], value); }; /** - * optional string language = 5; - * @return {string} + * Clears the message field making it undefined. + * @return {!proto.Message} returns this */ -proto.Knowledge.prototype.getLanguage = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +proto.Message.prototype.clearUser = function() { + return this.setUser(undefined); }; /** - * @param {string} value - * @return {!proto.Knowledge} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.Knowledge.prototype.setLanguage = function(value) { - return jspb.Message.setProto3StringField(this, 5, value); +proto.Message.prototype.hasUser = function() { + return jspb.Message.getField(this, 11) != null; }; /** - * optional uint64 embeddingModelProviderId = 6; - * @return {string} + * optional ToolMessage tool = 12; + * @return {?proto.ToolMessage} */ -proto.Knowledge.prototype.getEmbeddingmodelproviderid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "0")); +proto.Message.prototype.getTool = function() { + return /** @type{?proto.ToolMessage} */ ( + jspb.Message.getWrapperField(this, proto.ToolMessage, 12)); }; /** - * @param {string} value - * @return {!proto.Knowledge} returns this - */ -proto.Knowledge.prototype.setEmbeddingmodelproviderid = function(value) { - return jspb.Message.setProto3StringIntField(this, 6, value); + * @param {?proto.ToolMessage|undefined} value + * @return {!proto.Message} returns this +*/ +proto.Message.prototype.setTool = function(value) { + return jspb.Message.setOneofWrapperField(this, 12, proto.Message.oneofGroups_[0], value); }; /** - * optional string embeddingModelProviderName = 7; - * @return {string} + * Clears the message field making it undefined. + * @return {!proto.Message} returns this */ -proto.Knowledge.prototype.getEmbeddingmodelprovidername = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +proto.Message.prototype.clearTool = function() { + return this.setTool(undefined); }; /** - * @param {string} value - * @return {!proto.Knowledge} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.Knowledge.prototype.setEmbeddingmodelprovidername = function(value) { - return jspb.Message.setProto3StringField(this, 7, value); +proto.Message.prototype.hasTool = function() { + return jspb.Message.getField(this, 12) != null; }; /** - * repeated Metadata knowledgeEmbeddingModelOptions = 8; - * @return {!Array} + * optional SystemMessage system = 13; + * @return {?proto.SystemMessage} */ -proto.Knowledge.prototype.getKnowledgeembeddingmodeloptionsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.Metadata, 8)); +proto.Message.prototype.getSystem = function() { + return /** @type{?proto.SystemMessage} */ ( + jspb.Message.getWrapperField(this, proto.SystemMessage, 13)); }; /** - * @param {!Array} value - * @return {!proto.Knowledge} returns this + * @param {?proto.SystemMessage|undefined} value + * @return {!proto.Message} returns this */ -proto.Knowledge.prototype.setKnowledgeembeddingmodeloptionsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 8, value); +proto.Message.prototype.setSystem = function(value) { + return jspb.Message.setOneofWrapperField(this, 13, proto.Message.oneofGroups_[0], value); }; /** - * @param {!proto.Metadata=} opt_value - * @param {number=} opt_index - * @return {!proto.Metadata} + * Clears the message field making it undefined. + * @return {!proto.Message} returns this */ -proto.Knowledge.prototype.addKnowledgeembeddingmodeloptions = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 8, opt_value, proto.Metadata, opt_index); +proto.Message.prototype.clearSystem = function() { + return this.setSystem(undefined); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.Knowledge} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.Knowledge.prototype.clearKnowledgeembeddingmodeloptionsList = function() { - return this.setKnowledgeembeddingmodeloptionsList([]); +proto.Message.prototype.hasSystem = function() { + return jspb.Message.getField(this, 13) != null; }; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * optional string status = 12; - * @return {string} + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} */ -proto.Knowledge.prototype.getStatus = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 12, "")); +proto.ToolCall.prototype.toObject = function(opt_includeInstance) { + return proto.ToolCall.toObject(opt_includeInstance, this); }; /** - * @param {string} value - * @return {!proto.Knowledge} returns this + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ToolCall} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.Knowledge.prototype.setStatus = function(value) { - return jspb.Message.setProto3StringField(this, 12, value); +proto.ToolCall.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + type: jspb.Message.getFieldWithDefault(msg, 2, ""), + pb_function: (f = msg.getFunction()) && proto.FunctionCall.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * optional uint64 createdBy = 13; - * @return {string} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ToolCall} */ -proto.Knowledge.prototype.getCreatedby = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 13, "0")); +proto.ToolCall.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ToolCall; + return proto.ToolCall.deserializeBinaryFromReader(msg, reader); }; /** - * @param {string} value - * @return {!proto.Knowledge} returns this + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ToolCall} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ToolCall} */ -proto.Knowledge.prototype.setCreatedby = function(value) { - return jspb.Message.setProto3StringIntField(this, 13, value); +proto.ToolCall.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setType(value); + break; + case 3: + var value = new proto.FunctionCall; + reader.readMessage(value,proto.FunctionCall.deserializeBinaryFromReader); + msg.setFunction(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * optional User createdUser = 14; - * @return {?proto.User} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.Knowledge.prototype.getCreateduser = function() { - return /** @type{?proto.User} */ ( - jspb.Message.getWrapperField(this, proto.User, 14)); +proto.ToolCall.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ToolCall.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * @param {?proto.User|undefined} value - * @return {!proto.Knowledge} returns this -*/ -proto.Knowledge.prototype.setCreateduser = function(value) { - return jspb.Message.setWrapperField(this, 14, value); + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ToolCall} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ToolCall.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getType(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getFunction(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.FunctionCall.serializeBinaryToWriter + ); + } }; /** - * Clears the message field making it undefined. - * @return {!proto.Knowledge} returns this + * optional string id = 1; + * @return {string} */ -proto.Knowledge.prototype.clearCreateduser = function() { - return this.setCreateduser(undefined); +proto.ToolCall.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {string} value + * @return {!proto.ToolCall} returns this */ -proto.Knowledge.prototype.hasCreateduser = function() { - return jspb.Message.getField(this, 14) != null; +proto.ToolCall.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; /** - * optional uint64 updatedBy = 15; + * optional string type = 2; * @return {string} */ -proto.Knowledge.prototype.getUpdatedby = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 15, "0")); +proto.ToolCall.prototype.getType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value - * @return {!proto.Knowledge} returns this + * @return {!proto.ToolCall} returns this */ -proto.Knowledge.prototype.setUpdatedby = function(value) { - return jspb.Message.setProto3StringIntField(this, 15, value); +proto.ToolCall.prototype.setType = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); }; /** - * optional User updatedUser = 16; - * @return {?proto.User} + * optional FunctionCall function = 3; + * @return {?proto.FunctionCall} */ -proto.Knowledge.prototype.getUpdateduser = function() { - return /** @type{?proto.User} */ ( - jspb.Message.getWrapperField(this, proto.User, 16)); +proto.ToolCall.prototype.getFunction = function() { + return /** @type{?proto.FunctionCall} */ ( + jspb.Message.getWrapperField(this, proto.FunctionCall, 3)); }; /** - * @param {?proto.User|undefined} value - * @return {!proto.Knowledge} returns this + * @param {?proto.FunctionCall|undefined} value + * @return {!proto.ToolCall} returns this */ -proto.Knowledge.prototype.setUpdateduser = function(value) { - return jspb.Message.setWrapperField(this, 16, value); +proto.ToolCall.prototype.setFunction = function(value) { + return jspb.Message.setWrapperField(this, 3, value); }; /** * Clears the message field making it undefined. - * @return {!proto.Knowledge} returns this + * @return {!proto.ToolCall} returns this */ -proto.Knowledge.prototype.clearUpdateduser = function() { - return this.setUpdateduser(undefined); +proto.ToolCall.prototype.clearFunction = function() { + return this.setFunction(undefined); }; @@ -5879,246 +5169,168 @@ proto.Knowledge.prototype.clearUpdateduser = function() { * Returns whether this field is set. * @return {boolean} */ -proto.Knowledge.prototype.hasUpdateduser = function() { - return jspb.Message.getField(this, 16) != null; +proto.ToolCall.prototype.hasFunction = function() { + return jspb.Message.getField(this, 3) != null; }; -/** - * optional google.protobuf.Timestamp createdDate = 17; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.Knowledge.prototype.getCreateddate = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 17)); -}; + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.Knowledge} returns this -*/ -proto.Knowledge.prototype.setCreateddate = function(value) { - return jspb.Message.setWrapperField(this, 17, value); + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.FunctionCall.prototype.toObject = function(opt_includeInstance) { + return proto.FunctionCall.toObject(opt_includeInstance, this); }; /** - * Clears the message field making it undefined. - * @return {!proto.Knowledge} returns this + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.FunctionCall} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.Knowledge.prototype.clearCreateddate = function() { - return this.setCreateddate(undefined); +proto.FunctionCall.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + arguments: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * Returns whether this field is set. - * @return {boolean} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.FunctionCall} */ -proto.Knowledge.prototype.hasCreateddate = function() { - return jspb.Message.getField(this, 17) != null; +proto.FunctionCall.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.FunctionCall; + return proto.FunctionCall.deserializeBinaryFromReader(msg, reader); }; /** - * optional google.protobuf.Timestamp updatedDate = 18; - * @return {?proto.google.protobuf.Timestamp} + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.FunctionCall} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.FunctionCall} */ -proto.Knowledge.prototype.getUpdateddate = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 18)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.Knowledge} returns this -*/ -proto.Knowledge.prototype.setUpdateddate = function(value) { - return jspb.Message.setWrapperField(this, 18, value); +proto.FunctionCall.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setArguments(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * Clears the message field making it undefined. - * @return {!proto.Knowledge} returns this + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.Knowledge.prototype.clearUpdateddate = function() { - return this.setUpdateddate(undefined); +proto.FunctionCall.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.FunctionCall.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * Returns whether this field is set. - * @return {boolean} + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.FunctionCall} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.Knowledge.prototype.hasUpdateddate = function() { - return jspb.Message.getField(this, 18) != null; +proto.FunctionCall.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getArguments(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } }; /** - * optional uint64 organizationId = 19; + * optional string name = 1; * @return {string} */ -proto.Knowledge.prototype.getOrganizationid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 19, "0")); +proto.FunctionCall.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.Knowledge} returns this + * @return {!proto.FunctionCall} returns this */ -proto.Knowledge.prototype.setOrganizationid = function(value) { - return jspb.Message.setProto3StringIntField(this, 19, value); +proto.FunctionCall.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; /** - * optional uint64 projectId = 20; + * optional string arguments = 2; * @return {string} */ -proto.Knowledge.prototype.getProjectid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 20, "0")); +proto.FunctionCall.prototype.getArguments = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value - * @return {!proto.Knowledge} returns this - */ -proto.Knowledge.prototype.setProjectid = function(value) { - return jspb.Message.setProto3StringIntField(this, 20, value); -}; - - -/** - * optional Organization organization = 21; - * @return {?proto.Organization} - */ -proto.Knowledge.prototype.getOrganization = function() { - return /** @type{?proto.Organization} */ ( - jspb.Message.getWrapperField(this, proto.Organization, 21)); -}; - - -/** - * @param {?proto.Organization|undefined} value - * @return {!proto.Knowledge} returns this -*/ -proto.Knowledge.prototype.setOrganization = function(value) { - return jspb.Message.setWrapperField(this, 21, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.Knowledge} returns this - */ -proto.Knowledge.prototype.clearOrganization = function() { - return this.setOrganization(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.Knowledge.prototype.hasOrganization = function() { - return jspb.Message.getField(this, 21) != null; -}; - - -/** - * optional Tag knowledgeTag = 22; - * @return {?proto.Tag} - */ -proto.Knowledge.prototype.getKnowledgetag = function() { - return /** @type{?proto.Tag} */ ( - jspb.Message.getWrapperField(this, proto.Tag, 22)); -}; - - -/** - * @param {?proto.Tag|undefined} value - * @return {!proto.Knowledge} returns this -*/ -proto.Knowledge.prototype.setKnowledgetag = function(value) { - return jspb.Message.setWrapperField(this, 22, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.Knowledge} returns this - */ -proto.Knowledge.prototype.clearKnowledgetag = function() { - return this.setKnowledgetag(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.Knowledge.prototype.hasKnowledgetag = function() { - return jspb.Message.getField(this, 22) != null; -}; - - -/** - * optional uint32 documentCount = 23; - * @return {number} - */ -proto.Knowledge.prototype.getDocumentcount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 23, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.Knowledge} returns this - */ -proto.Knowledge.prototype.setDocumentcount = function(value) { - return jspb.Message.setProto3IntField(this, 23, value); -}; - - -/** - * optional uint32 tokenCount = 24; - * @return {number} - */ -proto.Knowledge.prototype.getTokencount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 24, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.Knowledge} returns this - */ -proto.Knowledge.prototype.setTokencount = function(value) { - return jspb.Message.setProto3IntField(this, 24, value); -}; - - -/** - * optional uint32 wordCount = 25; - * @return {number} - */ -proto.Knowledge.prototype.getWordcount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 25, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.Knowledge} returns this + * @return {!proto.FunctionCall} returns this */ -proto.Knowledge.prototype.setWordcount = function(value) { - return jspb.Message.setProto3IntField(this, 25, value); +proto.FunctionCall.prototype.setArguments = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); }; @@ -6138,8 +5350,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.TextPrompt.prototype.toObject = function(opt_includeInstance) { - return proto.TextPrompt.toObject(opt_includeInstance, this); +proto.Telemetry.prototype.toObject = function(opt_includeInstance) { + return proto.Telemetry.toObject(opt_includeInstance, this); }; @@ -6148,14 +5360,19 @@ proto.TextPrompt.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.TextPrompt} msg The msg instance to transform. + * @param {!proto.Telemetry} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.TextPrompt.toObject = function(includeInstance, msg) { +proto.Telemetry.toObject = function(includeInstance, msg) { var f, obj = { - role: jspb.Message.getFieldWithDefault(msg, 1, ""), - content: jspb.Message.getFieldWithDefault(msg, 2, "") + stagename: jspb.Message.getFieldWithDefault(msg, 1, ""), + starttime: (f = msg.getStarttime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + endtime: (f = msg.getEndtime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + duration: jspb.Message.getFieldWithDefault(msg, 4, 0), + attributesMap: (f = msg.getAttributesMap()) ? f.toObject(includeInstance, undefined) : [], + spanid: jspb.Message.getFieldWithDefault(msg, 6, ""), + parentid: jspb.Message.getFieldWithDefault(msg, 7, "") }; if (includeInstance) { @@ -6169,23 +5386,23 @@ proto.TextPrompt.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.TextPrompt} + * @return {!proto.Telemetry} */ -proto.TextPrompt.deserializeBinary = function(bytes) { +proto.Telemetry.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.TextPrompt; - return proto.TextPrompt.deserializeBinaryFromReader(msg, reader); + var msg = new proto.Telemetry; + return proto.Telemetry.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.TextPrompt} msg The message object to deserialize into. + * @param {!proto.Telemetry} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.TextPrompt} + * @return {!proto.Telemetry} */ -proto.TextPrompt.deserializeBinaryFromReader = function(msg, reader) { +proto.Telemetry.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -6194,11 +5411,35 @@ proto.TextPrompt.deserializeBinaryFromReader = function(msg, reader) { switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setRole(value); + msg.setStagename(value); break; case 2: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setStarttime(value); + break; + case 3: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setEndtime(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setDuration(value); + break; + case 5: + var value = msg.getAttributesMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); + }); + break; + case 6: var value = /** @type {string} */ (reader.readString()); - msg.setContent(value); + msg.setSpanid(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setParentid(value); break; default: reader.skipField(); @@ -6213,9 +5454,9 @@ proto.TextPrompt.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.TextPrompt.prototype.serializeBinary = function() { +proto.Telemetry.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.TextPrompt.serializeBinaryToWriter(this, writer); + proto.Telemetry.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -6223,23 +5464,57 @@ proto.TextPrompt.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.TextPrompt} message + * @param {!proto.Telemetry} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.TextPrompt.serializeBinaryToWriter = function(message, writer) { +proto.Telemetry.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getRole(); + f = message.getStagename(); if (f.length > 0) { writer.writeString( 1, f ); } - f = message.getContent(); + f = message.getStarttime(); + if (f != null) { + writer.writeMessage( + 2, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getEndtime(); + if (f != null) { + writer.writeMessage( + 3, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getDuration(); + if (f !== 0) { + writer.writeUint64( + 4, + f + ); + } + f = message.getAttributesMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(5, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); + } + f = message.getSpanid(); if (f.length > 0) { writer.writeString( - 2, + 6, + f + ); + } + f = message.getParentid(); + if (f.length > 0) { + writer.writeString( + 7, f ); } @@ -6247,251 +5522,170 @@ proto.TextPrompt.serializeBinaryToWriter = function(message, writer) { /** - * optional string role = 1; + * optional string stageName = 1; * @return {string} */ -proto.TextPrompt.prototype.getRole = function() { +proto.Telemetry.prototype.getStagename = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.TextPrompt} returns this + * @return {!proto.Telemetry} returns this */ -proto.TextPrompt.prototype.setRole = function(value) { +proto.Telemetry.prototype.setStagename = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** - * optional string content = 2; - * @return {string} + * optional google.protobuf.Timestamp startTime = 2; + * @return {?proto.google.protobuf.Timestamp} */ -proto.TextPrompt.prototype.getContent = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.Telemetry.prototype.getStarttime = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 2)); }; /** - * @param {string} value - * @return {!proto.TextPrompt} returns this - */ -proto.TextPrompt.prototype.setContent = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.Telemetry} returns this +*/ +proto.Telemetry.prototype.setStarttime = function(value) { + return jspb.Message.setWrapperField(this, 2, value); }; - /** - * List of repeated fields within this message type. - * @private {!Array} - * @const + * Clears the message field making it undefined. + * @return {!proto.Telemetry} returns this */ -proto.TextChatCompletePrompt.repeatedFields_ = [1,2]; - +proto.Telemetry.prototype.clearStarttime = function() { + return this.setStarttime(undefined); +}; -if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} + * Returns whether this field is set. + * @return {boolean} */ -proto.TextChatCompletePrompt.prototype.toObject = function(opt_includeInstance) { - return proto.TextChatCompletePrompt.toObject(opt_includeInstance, this); +proto.Telemetry.prototype.hasStarttime = function() { + return jspb.Message.getField(this, 2) != null; }; /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.TextChatCompletePrompt} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages + * optional google.protobuf.Timestamp endTime = 3; + * @return {?proto.google.protobuf.Timestamp} */ -proto.TextChatCompletePrompt.toObject = function(includeInstance, msg) { - var f, obj = { - promptList: jspb.Message.toObjectList(msg.getPromptList(), - proto.TextPrompt.toObject, includeInstance), - promptvariablesList: jspb.Message.toObjectList(msg.getPromptvariablesList(), - proto.Variable.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; +proto.Telemetry.prototype.getEndtime = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3)); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.TextChatCompletePrompt} - */ -proto.TextChatCompletePrompt.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.TextChatCompletePrompt; - return proto.TextChatCompletePrompt.deserializeBinaryFromReader(msg, reader); + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.Telemetry} returns this +*/ +proto.Telemetry.prototype.setEndtime = function(value) { + return jspb.Message.setWrapperField(this, 3, value); }; /** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.TextChatCompletePrompt} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.TextChatCompletePrompt} + * Clears the message field making it undefined. + * @return {!proto.Telemetry} returns this */ -proto.TextChatCompletePrompt.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.TextPrompt; - reader.readMessage(value,proto.TextPrompt.deserializeBinaryFromReader); - msg.addPrompt(value); - break; - case 2: - var value = new proto.Variable; - reader.readMessage(value,proto.Variable.deserializeBinaryFromReader); - msg.addPromptvariables(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; +proto.Telemetry.prototype.clearEndtime = function() { + return this.setEndtime(undefined); }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * Returns whether this field is set. + * @return {boolean} */ -proto.TextChatCompletePrompt.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.TextChatCompletePrompt.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.Telemetry.prototype.hasEndtime = function() { + return jspb.Message.getField(this, 3) != null; }; /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.TextChatCompletePrompt} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages + * optional uint64 duration = 4; + * @return {number} */ -proto.TextChatCompletePrompt.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPromptList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.TextPrompt.serializeBinaryToWriter - ); - } - f = message.getPromptvariablesList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 2, - f, - proto.Variable.serializeBinaryToWriter - ); - } +proto.Telemetry.prototype.getDuration = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; /** - * repeated TextPrompt prompt = 1; - * @return {!Array} + * @param {number} value + * @return {!proto.Telemetry} returns this */ -proto.TextChatCompletePrompt.prototype.getPromptList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.TextPrompt, 1)); +proto.Telemetry.prototype.setDuration = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); }; /** - * @param {!Array} value - * @return {!proto.TextChatCompletePrompt} returns this -*/ -proto.TextChatCompletePrompt.prototype.setPromptList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.TextPrompt=} opt_value - * @param {number=} opt_index - * @return {!proto.TextPrompt} + * map attributes = 5; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} */ -proto.TextChatCompletePrompt.prototype.addPrompt = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.TextPrompt, opt_index); +proto.Telemetry.prototype.getAttributesMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 5, opt_noLazyCreate, + null)); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.TextChatCompletePrompt} returns this + * Clears values from the map. The map will be non-null. + * @return {!proto.Telemetry} returns this */ -proto.TextChatCompletePrompt.prototype.clearPromptList = function() { - return this.setPromptList([]); -}; +proto.Telemetry.prototype.clearAttributesMap = function() { + this.getAttributesMap().clear(); + return this;}; /** - * repeated Variable promptVariables = 2; - * @return {!Array} + * optional string spanID = 6; + * @return {string} */ -proto.TextChatCompletePrompt.prototype.getPromptvariablesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.Variable, 2)); +proto.Telemetry.prototype.getSpanid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); }; /** - * @param {!Array} value - * @return {!proto.TextChatCompletePrompt} returns this -*/ -proto.TextChatCompletePrompt.prototype.setPromptvariablesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 2, value); + * @param {string} value + * @return {!proto.Telemetry} returns this + */ +proto.Telemetry.prototype.setSpanid = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); }; /** - * @param {!proto.Variable=} opt_value - * @param {number=} opt_index - * @return {!proto.Variable} + * optional string parentID = 7; + * @return {string} */ -proto.TextChatCompletePrompt.prototype.addPromptvariables = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.Variable, opt_index); +proto.Telemetry.prototype.getParentid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.TextChatCompletePrompt} returns this + * @param {string} value + * @return {!proto.Telemetry} returns this */ -proto.TextChatCompletePrompt.prototype.clearPromptvariablesList = function() { - return this.setPromptvariablesList([]); +proto.Telemetry.prototype.setParentid = function(value) { + return jspb.Message.setProto3StringField(this, 7, value); }; @@ -6501,7 +5695,7 @@ proto.TextChatCompletePrompt.prototype.clearPromptvariablesList = function() { * @private {!Array} * @const */ -proto.AssistantConversationMessage.repeatedFields_ = [10,31]; +proto.Knowledge.repeatedFields_ = [8]; @@ -6518,8 +5712,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.AssistantConversationMessage.prototype.toObject = function(opt_includeInstance) { - return proto.AssistantConversationMessage.toObject(opt_includeInstance, this); +proto.Knowledge.prototype.toObject = function(opt_includeInstance) { + return proto.Knowledge.toObject(opt_includeInstance, this); }; @@ -6528,29 +5722,35 @@ proto.AssistantConversationMessage.prototype.toObject = function(opt_includeInst * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.AssistantConversationMessage} msg The msg instance to transform. + * @param {!proto.Knowledge} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.AssistantConversationMessage.toObject = function(includeInstance, msg) { +proto.Knowledge.toObject = function(includeInstance, msg) { var f, obj = { id: jspb.Message.getFieldWithDefault(msg, 1, "0"), - messageid: jspb.Message.getFieldWithDefault(msg, 3, ""), - assistantconversationid: jspb.Message.getFieldWithDefault(msg, 2, "0"), - role: jspb.Message.getFieldWithDefault(msg, 4, ""), - body: jspb.Message.getFieldWithDefault(msg, 5, ""), - source: jspb.Message.getFieldWithDefault(msg, 9, ""), - metricsList: jspb.Message.toObjectList(msg.getMetricsList(), - proto.Metric.toObject, includeInstance), - status: jspb.Message.getFieldWithDefault(msg, 11, ""), - createdby: jspb.Message.getFieldWithDefault(msg, 12, "0"), - updatedby: jspb.Message.getFieldWithDefault(msg, 13, "0"), + name: jspb.Message.getFieldWithDefault(msg, 2, ""), + description: jspb.Message.getFieldWithDefault(msg, 3, ""), + visibility: jspb.Message.getFieldWithDefault(msg, 4, ""), + language: jspb.Message.getFieldWithDefault(msg, 5, ""), + embeddingmodelproviderid: jspb.Message.getFieldWithDefault(msg, 6, "0"), + embeddingmodelprovidername: jspb.Message.getFieldWithDefault(msg, 7, ""), + knowledgeembeddingmodeloptionsList: jspb.Message.toObjectList(msg.getKnowledgeembeddingmodeloptionsList(), + proto.Metadata.toObject, includeInstance), + status: jspb.Message.getFieldWithDefault(msg, 12, ""), + createdby: jspb.Message.getFieldWithDefault(msg, 13, "0"), + createduser: (f = msg.getCreateduser()) && proto.User.toObject(includeInstance, f), + updatedby: jspb.Message.getFieldWithDefault(msg, 15, "0"), + updateduser: (f = msg.getUpdateduser()) && proto.User.toObject(includeInstance, f), createddate: (f = msg.getCreateddate()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), updateddate: (f = msg.getUpdateddate()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - assistantid: jspb.Message.getFieldWithDefault(msg, 28, "0"), - assistantprovidermodelid: jspb.Message.getFieldWithDefault(msg, 29, "0"), - metadataList: jspb.Message.toObjectList(msg.getMetadataList(), - proto.Metadata.toObject, includeInstance) + organizationid: jspb.Message.getFieldWithDefault(msg, 19, "0"), + projectid: jspb.Message.getFieldWithDefault(msg, 20, "0"), + organization: (f = msg.getOrganization()) && proto.Organization.toObject(includeInstance, f), + knowledgetag: (f = msg.getKnowledgetag()) && proto.Tag.toObject(includeInstance, f), + documentcount: jspb.Message.getFieldWithDefault(msg, 23, 0), + tokencount: jspb.Message.getFieldWithDefault(msg, 24, 0), + wordcount: jspb.Message.getFieldWithDefault(msg, 25, 0) }; if (includeInstance) { @@ -6564,23 +5764,23 @@ proto.AssistantConversationMessage.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.AssistantConversationMessage} + * @return {!proto.Knowledge} */ -proto.AssistantConversationMessage.deserializeBinary = function(bytes) { +proto.Knowledge.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.AssistantConversationMessage; - return proto.AssistantConversationMessage.deserializeBinaryFromReader(msg, reader); + var msg = new proto.Knowledge; + return proto.Knowledge.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.AssistantConversationMessage} msg The message object to deserialize into. + * @param {!proto.Knowledge} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.AssistantConversationMessage} + * @return {!proto.Knowledge} */ -proto.AssistantConversationMessage.deserializeBinaryFromReader = function(msg, reader) { +proto.Knowledge.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -6591,65 +5791,96 @@ proto.AssistantConversationMessage.deserializeBinaryFromReader = function(msg, r var value = /** @type {string} */ (reader.readUint64String()); msg.setId(value); break; - case 3: + case 2: var value = /** @type {string} */ (reader.readString()); - msg.setMessageid(value); + msg.setName(value); break; - case 2: - var value = /** @type {string} */ (reader.readUint64String()); - msg.setAssistantconversationid(value); + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setDescription(value); break; case 4: var value = /** @type {string} */ (reader.readString()); - msg.setRole(value); + msg.setVisibility(value); break; case 5: var value = /** @type {string} */ (reader.readString()); - msg.setBody(value); + msg.setLanguage(value); break; - case 9: + case 6: + var value = /** @type {string} */ (reader.readUint64String()); + msg.setEmbeddingmodelproviderid(value); + break; + case 7: var value = /** @type {string} */ (reader.readString()); - msg.setSource(value); + msg.setEmbeddingmodelprovidername(value); break; - case 10: - var value = new proto.Metric; - reader.readMessage(value,proto.Metric.deserializeBinaryFromReader); - msg.addMetrics(value); + case 8: + var value = new proto.Metadata; + reader.readMessage(value,proto.Metadata.deserializeBinaryFromReader); + msg.addKnowledgeembeddingmodeloptions(value); break; - case 11: + case 12: var value = /** @type {string} */ (reader.readString()); msg.setStatus(value); break; - case 12: + case 13: var value = /** @type {string} */ (reader.readUint64String()); msg.setCreatedby(value); break; - case 13: + case 14: + var value = new proto.User; + reader.readMessage(value,proto.User.deserializeBinaryFromReader); + msg.setCreateduser(value); + break; + case 15: var value = /** @type {string} */ (reader.readUint64String()); msg.setUpdatedby(value); break; - case 26: + case 16: + var value = new proto.User; + reader.readMessage(value,proto.User.deserializeBinaryFromReader); + msg.setUpdateduser(value); + break; + case 17: var value = new google_protobuf_timestamp_pb.Timestamp; reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); msg.setCreateddate(value); break; - case 27: + case 18: var value = new google_protobuf_timestamp_pb.Timestamp; reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); msg.setUpdateddate(value); break; - case 28: + case 19: var value = /** @type {string} */ (reader.readUint64String()); - msg.setAssistantid(value); + msg.setOrganizationid(value); break; - case 29: + case 20: var value = /** @type {string} */ (reader.readUint64String()); - msg.setAssistantprovidermodelid(value); + msg.setProjectid(value); break; - case 31: - var value = new proto.Metadata; - reader.readMessage(value,proto.Metadata.deserializeBinaryFromReader); - msg.addMetadata(value); + case 21: + var value = new proto.Organization; + reader.readMessage(value,proto.Organization.deserializeBinaryFromReader); + msg.setOrganization(value); + break; + case 22: + var value = new proto.Tag; + reader.readMessage(value,proto.Tag.deserializeBinaryFromReader); + msg.setKnowledgetag(value); + break; + case 23: + var value = /** @type {number} */ (reader.readUint32()); + msg.setDocumentcount(value); + break; + case 24: + var value = /** @type {number} */ (reader.readUint32()); + msg.setTokencount(value); + break; + case 25: + var value = /** @type {number} */ (reader.readUint32()); + msg.setWordcount(value); break; default: reader.skipField(); @@ -6664,9 +5895,9 @@ proto.AssistantConversationMessage.deserializeBinaryFromReader = function(msg, r * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.AssistantConversationMessage.prototype.serializeBinary = function() { +proto.Knowledge.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.AssistantConversationMessage.serializeBinaryToWriter(this, writer); + proto.Knowledge.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -6674,11 +5905,11 @@ proto.AssistantConversationMessage.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.AssistantConversationMessage} message + * @param {!proto.Knowledge} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.AssistantConversationMessage.serializeBinaryToWriter = function(message, writer) { +proto.Knowledge.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getId(); if (parseInt(f, 10) !== 0) { @@ -6687,74 +5918,97 @@ proto.AssistantConversationMessage.serializeBinaryToWriter = function(message, w f ); } - f = message.getMessageid(); + f = message.getName(); if (f.length > 0) { writer.writeString( - 3, + 2, f ); } - f = message.getAssistantconversationid(); - if (parseInt(f, 10) !== 0) { - writer.writeUint64String( - 2, + f = message.getDescription(); + if (f.length > 0) { + writer.writeString( + 3, f ); } - f = message.getRole(); + f = message.getVisibility(); if (f.length > 0) { writer.writeString( 4, f ); } - f = message.getBody(); + f = message.getLanguage(); if (f.length > 0) { writer.writeString( 5, f ); } - f = message.getSource(); + f = message.getEmbeddingmodelproviderid(); + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( + 6, + f + ); + } + f = message.getEmbeddingmodelprovidername(); if (f.length > 0) { writer.writeString( - 9, + 7, f ); } - f = message.getMetricsList(); + f = message.getKnowledgeembeddingmodeloptionsList(); if (f.length > 0) { writer.writeRepeatedMessage( - 10, + 8, f, - proto.Metric.serializeBinaryToWriter + proto.Metadata.serializeBinaryToWriter ); } f = message.getStatus(); if (f.length > 0) { writer.writeString( - 11, - f - ); - } - f = message.getCreatedby(); - if (parseInt(f, 10) !== 0) { - writer.writeUint64String( 12, f ); } - f = message.getUpdatedby(); + f = message.getCreatedby(); if (parseInt(f, 10) !== 0) { writer.writeUint64String( 13, f ); } - f = message.getCreateddate(); + f = message.getCreateduser(); if (f != null) { writer.writeMessage( - 26, + 14, + f, + proto.User.serializeBinaryToWriter + ); + } + f = message.getUpdatedby(); + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( + 15, + f + ); + } + f = message.getUpdateduser(); + if (f != null) { + writer.writeMessage( + 16, + f, + proto.User.serializeBinaryToWriter + ); + } + f = message.getCreateddate(); + if (f != null) { + writer.writeMessage( + 17, f, google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter ); @@ -6762,31 +6016,60 @@ proto.AssistantConversationMessage.serializeBinaryToWriter = function(message, w f = message.getUpdateddate(); if (f != null) { writer.writeMessage( - 27, + 18, f, google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter ); } - f = message.getAssistantid(); + f = message.getOrganizationid(); if (parseInt(f, 10) !== 0) { writer.writeUint64String( - 28, + 19, f ); } - f = message.getAssistantprovidermodelid(); + f = message.getProjectid(); if (parseInt(f, 10) !== 0) { writer.writeUint64String( - 29, + 20, f ); } - f = message.getMetadataList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 31, + f = message.getOrganization(); + if (f != null) { + writer.writeMessage( + 21, f, - proto.Metadata.serializeBinaryToWriter + proto.Organization.serializeBinaryToWriter + ); + } + f = message.getKnowledgetag(); + if (f != null) { + writer.writeMessage( + 22, + f, + proto.Tag.serializeBinaryToWriter + ); + } + f = message.getDocumentcount(); + if (f !== 0) { + writer.writeUint32( + 23, + f + ); + } + f = message.getTokencount(); + if (f !== 0) { + writer.writeUint32( + 24, + f + ); + } + f = message.getWordcount(); + if (f !== 0) { + writer.writeUint32( + 25, + f ); } }; @@ -6796,227 +6079,227 @@ proto.AssistantConversationMessage.serializeBinaryToWriter = function(message, w * optional uint64 id = 1; * @return {string} */ -proto.AssistantConversationMessage.prototype.getId = function() { +proto.Knowledge.prototype.getId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); }; /** * @param {string} value - * @return {!proto.AssistantConversationMessage} returns this + * @return {!proto.Knowledge} returns this */ -proto.AssistantConversationMessage.prototype.setId = function(value) { +proto.Knowledge.prototype.setId = function(value) { return jspb.Message.setProto3StringIntField(this, 1, value); }; /** - * optional string messageId = 3; + * optional string name = 2; * @return {string} */ -proto.AssistantConversationMessage.prototype.getMessageid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +proto.Knowledge.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value - * @return {!proto.AssistantConversationMessage} returns this + * @return {!proto.Knowledge} returns this */ -proto.AssistantConversationMessage.prototype.setMessageid = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); +proto.Knowledge.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); }; /** - * optional uint64 assistantConversationId = 2; + * optional string description = 3; * @return {string} */ -proto.AssistantConversationMessage.prototype.getAssistantconversationid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "0")); +proto.Knowledge.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** * @param {string} value - * @return {!proto.AssistantConversationMessage} returns this + * @return {!proto.Knowledge} returns this */ -proto.AssistantConversationMessage.prototype.setAssistantconversationid = function(value) { - return jspb.Message.setProto3StringIntField(this, 2, value); +proto.Knowledge.prototype.setDescription = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); }; /** - * optional string role = 4; + * optional string visibility = 4; * @return {string} */ -proto.AssistantConversationMessage.prototype.getRole = function() { +proto.Knowledge.prototype.getVisibility = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); }; /** * @param {string} value - * @return {!proto.AssistantConversationMessage} returns this + * @return {!proto.Knowledge} returns this */ -proto.AssistantConversationMessage.prototype.setRole = function(value) { +proto.Knowledge.prototype.setVisibility = function(value) { return jspb.Message.setProto3StringField(this, 4, value); }; /** - * optional string body = 5; + * optional string language = 5; * @return {string} */ -proto.AssistantConversationMessage.prototype.getBody = function() { +proto.Knowledge.prototype.getLanguage = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); }; /** * @param {string} value - * @return {!proto.AssistantConversationMessage} returns this + * @return {!proto.Knowledge} returns this */ -proto.AssistantConversationMessage.prototype.setBody = function(value) { +proto.Knowledge.prototype.setLanguage = function(value) { return jspb.Message.setProto3StringField(this, 5, value); }; /** - * optional string source = 9; + * optional uint64 embeddingModelProviderId = 6; * @return {string} */ -proto.AssistantConversationMessage.prototype.getSource = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); +proto.Knowledge.prototype.getEmbeddingmodelproviderid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "0")); }; /** * @param {string} value - * @return {!proto.AssistantConversationMessage} returns this + * @return {!proto.Knowledge} returns this */ -proto.AssistantConversationMessage.prototype.setSource = function(value) { - return jspb.Message.setProto3StringField(this, 9, value); +proto.Knowledge.prototype.setEmbeddingmodelproviderid = function(value) { + return jspb.Message.setProto3StringIntField(this, 6, value); }; /** - * repeated Metric metrics = 10; - * @return {!Array} + * optional string embeddingModelProviderName = 7; + * @return {string} */ -proto.AssistantConversationMessage.prototype.getMetricsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.Metric, 10)); +proto.Knowledge.prototype.getEmbeddingmodelprovidername = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); }; /** - * @param {!Array} value - * @return {!proto.AssistantConversationMessage} returns this -*/ -proto.AssistantConversationMessage.prototype.setMetricsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 10, value); + * @param {string} value + * @return {!proto.Knowledge} returns this + */ +proto.Knowledge.prototype.setEmbeddingmodelprovidername = function(value) { + return jspb.Message.setProto3StringField(this, 7, value); }; /** - * @param {!proto.Metric=} opt_value - * @param {number=} opt_index - * @return {!proto.Metric} + * repeated Metadata knowledgeEmbeddingModelOptions = 8; + * @return {!Array} */ -proto.AssistantConversationMessage.prototype.addMetrics = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 10, opt_value, proto.Metric, opt_index); +proto.Knowledge.prototype.getKnowledgeembeddingmodeloptionsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.Metadata, 8)); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.AssistantConversationMessage} returns this - */ -proto.AssistantConversationMessage.prototype.clearMetricsList = function() { - return this.setMetricsList([]); + * @param {!Array} value + * @return {!proto.Knowledge} returns this +*/ +proto.Knowledge.prototype.setKnowledgeembeddingmodeloptionsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 8, value); }; /** - * optional string status = 11; - * @return {string} + * @param {!proto.Metadata=} opt_value + * @param {number=} opt_index + * @return {!proto.Metadata} */ -proto.AssistantConversationMessage.prototype.getStatus = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 11, "")); +proto.Knowledge.prototype.addKnowledgeembeddingmodeloptions = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 8, opt_value, proto.Metadata, opt_index); }; /** - * @param {string} value - * @return {!proto.AssistantConversationMessage} returns this + * Clears the list making it empty but non-null. + * @return {!proto.Knowledge} returns this */ -proto.AssistantConversationMessage.prototype.setStatus = function(value) { - return jspb.Message.setProto3StringField(this, 11, value); +proto.Knowledge.prototype.clearKnowledgeembeddingmodeloptionsList = function() { + return this.setKnowledgeembeddingmodeloptionsList([]); }; /** - * optional uint64 createdBy = 12; + * optional string status = 12; * @return {string} */ -proto.AssistantConversationMessage.prototype.getCreatedby = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 12, "0")); +proto.Knowledge.prototype.getStatus = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 12, "")); }; /** * @param {string} value - * @return {!proto.AssistantConversationMessage} returns this + * @return {!proto.Knowledge} returns this */ -proto.AssistantConversationMessage.prototype.setCreatedby = function(value) { - return jspb.Message.setProto3StringIntField(this, 12, value); +proto.Knowledge.prototype.setStatus = function(value) { + return jspb.Message.setProto3StringField(this, 12, value); }; /** - * optional uint64 updatedBy = 13; + * optional uint64 createdBy = 13; * @return {string} */ -proto.AssistantConversationMessage.prototype.getUpdatedby = function() { +proto.Knowledge.prototype.getCreatedby = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 13, "0")); }; /** * @param {string} value - * @return {!proto.AssistantConversationMessage} returns this + * @return {!proto.Knowledge} returns this */ -proto.AssistantConversationMessage.prototype.setUpdatedby = function(value) { +proto.Knowledge.prototype.setCreatedby = function(value) { return jspb.Message.setProto3StringIntField(this, 13, value); }; /** - * optional google.protobuf.Timestamp createdDate = 26; - * @return {?proto.google.protobuf.Timestamp} + * optional User createdUser = 14; + * @return {?proto.User} */ -proto.AssistantConversationMessage.prototype.getCreateddate = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 26)); +proto.Knowledge.prototype.getCreateduser = function() { + return /** @type{?proto.User} */ ( + jspb.Message.getWrapperField(this, proto.User, 14)); }; /** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.AssistantConversationMessage} returns this + * @param {?proto.User|undefined} value + * @return {!proto.Knowledge} returns this */ -proto.AssistantConversationMessage.prototype.setCreateddate = function(value) { - return jspb.Message.setWrapperField(this, 26, value); +proto.Knowledge.prototype.setCreateduser = function(value) { + return jspb.Message.setWrapperField(this, 14, value); }; /** * Clears the message field making it undefined. - * @return {!proto.AssistantConversationMessage} returns this + * @return {!proto.Knowledge} returns this */ -proto.AssistantConversationMessage.prototype.clearCreateddate = function() { - return this.setCreateddate(undefined); +proto.Knowledge.prototype.clearCreateduser = function() { + return this.setCreateduser(undefined); }; @@ -7024,319 +6307,201 @@ proto.AssistantConversationMessage.prototype.clearCreateddate = function() { * Returns whether this field is set. * @return {boolean} */ -proto.AssistantConversationMessage.prototype.hasCreateddate = function() { - return jspb.Message.getField(this, 26) != null; +proto.Knowledge.prototype.hasCreateduser = function() { + return jspb.Message.getField(this, 14) != null; }; /** - * optional google.protobuf.Timestamp updatedDate = 27; - * @return {?proto.google.protobuf.Timestamp} + * optional uint64 updatedBy = 15; + * @return {string} */ -proto.AssistantConversationMessage.prototype.getUpdateddate = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 27)); +proto.Knowledge.prototype.getUpdatedby = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 15, "0")); }; /** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.AssistantConversationMessage} returns this -*/ -proto.AssistantConversationMessage.prototype.setUpdateddate = function(value) { - return jspb.Message.setWrapperField(this, 27, value); + * @param {string} value + * @return {!proto.Knowledge} returns this + */ +proto.Knowledge.prototype.setUpdatedby = function(value) { + return jspb.Message.setProto3StringIntField(this, 15, value); }; /** - * Clears the message field making it undefined. - * @return {!proto.AssistantConversationMessage} returns this - */ -proto.AssistantConversationMessage.prototype.clearUpdateddate = function() { - return this.setUpdateddate(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.AssistantConversationMessage.prototype.hasUpdateddate = function() { - return jspb.Message.getField(this, 27) != null; -}; - - -/** - * optional uint64 assistantId = 28; - * @return {string} + * optional User updatedUser = 16; + * @return {?proto.User} */ -proto.AssistantConversationMessage.prototype.getAssistantid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 28, "0")); +proto.Knowledge.prototype.getUpdateduser = function() { + return /** @type{?proto.User} */ ( + jspb.Message.getWrapperField(this, proto.User, 16)); }; /** - * @param {string} value - * @return {!proto.AssistantConversationMessage} returns this - */ -proto.AssistantConversationMessage.prototype.setAssistantid = function(value) { - return jspb.Message.setProto3StringIntField(this, 28, value); + * @param {?proto.User|undefined} value + * @return {!proto.Knowledge} returns this +*/ +proto.Knowledge.prototype.setUpdateduser = function(value) { + return jspb.Message.setWrapperField(this, 16, value); }; /** - * optional uint64 assistantProviderModelId = 29; - * @return {string} + * Clears the message field making it undefined. + * @return {!proto.Knowledge} returns this */ -proto.AssistantConversationMessage.prototype.getAssistantprovidermodelid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 29, "0")); +proto.Knowledge.prototype.clearUpdateduser = function() { + return this.setUpdateduser(undefined); }; /** - * @param {string} value - * @return {!proto.AssistantConversationMessage} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.AssistantConversationMessage.prototype.setAssistantprovidermodelid = function(value) { - return jspb.Message.setProto3StringIntField(this, 29, value); +proto.Knowledge.prototype.hasUpdateduser = function() { + return jspb.Message.getField(this, 16) != null; }; /** - * repeated Metadata metadata = 31; - * @return {!Array} + * optional google.protobuf.Timestamp createdDate = 17; + * @return {?proto.google.protobuf.Timestamp} */ -proto.AssistantConversationMessage.prototype.getMetadataList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.Metadata, 31)); +proto.Knowledge.prototype.getCreateddate = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 17)); }; /** - * @param {!Array} value - * @return {!proto.AssistantConversationMessage} returns this + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.Knowledge} returns this */ -proto.AssistantConversationMessage.prototype.setMetadataList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 31, value); +proto.Knowledge.prototype.setCreateddate = function(value) { + return jspb.Message.setWrapperField(this, 17, value); }; /** - * @param {!proto.Metadata=} opt_value - * @param {number=} opt_index - * @return {!proto.Metadata} + * Clears the message field making it undefined. + * @return {!proto.Knowledge} returns this */ -proto.AssistantConversationMessage.prototype.addMetadata = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 31, opt_value, proto.Metadata, opt_index); +proto.Knowledge.prototype.clearCreateddate = function() { + return this.setCreateddate(undefined); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.AssistantConversationMessage} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.AssistantConversationMessage.prototype.clearMetadataList = function() { - return this.setMetadataList([]); +proto.Knowledge.prototype.hasCreateddate = function() { + return jspb.Message.getField(this, 17) != null; }; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} + * optional google.protobuf.Timestamp updatedDate = 18; + * @return {?proto.google.protobuf.Timestamp} */ -proto.AssistantConversationContext.prototype.toObject = function(opt_includeInstance) { - return proto.AssistantConversationContext.toObject(opt_includeInstance, this); +proto.Knowledge.prototype.getUpdateddate = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 18)); }; /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.AssistantConversationContext} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.AssistantConversationContext.toObject = function(includeInstance, msg) { - var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, "0"), - metadata: (f = msg.getMetadata()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f), - result: (f = msg.getResult()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f), - query: (f = msg.getQuery()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.Knowledge} returns this +*/ +proto.Knowledge.prototype.setUpdateddate = function(value) { + return jspb.Message.setWrapperField(this, 18, value); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.AssistantConversationContext} + * Clears the message field making it undefined. + * @return {!proto.Knowledge} returns this */ -proto.AssistantConversationContext.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.AssistantConversationContext; - return proto.AssistantConversationContext.deserializeBinaryFromReader(msg, reader); +proto.Knowledge.prototype.clearUpdateddate = function() { + return this.setUpdateddate(undefined); }; /** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.AssistantConversationContext} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.AssistantConversationContext} + * Returns whether this field is set. + * @return {boolean} */ -proto.AssistantConversationContext.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readUint64String()); - msg.setId(value); - break; - case 3: - var value = new google_protobuf_struct_pb.Struct; - reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader); - msg.setMetadata(value); - break; - case 4: - var value = new google_protobuf_struct_pb.Struct; - reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader); - msg.setResult(value); - break; - case 5: - var value = new google_protobuf_struct_pb.Struct; - reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader); - msg.setQuery(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; +proto.Knowledge.prototype.hasUpdateddate = function() { + return jspb.Message.getField(this, 18) != null; }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * optional uint64 organizationId = 19; + * @return {string} */ -proto.AssistantConversationContext.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.AssistantConversationContext.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.Knowledge.prototype.getOrganizationid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 19, "0")); }; /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.AssistantConversationContext} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages + * @param {string} value + * @return {!proto.Knowledge} returns this */ -proto.AssistantConversationContext.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getId(); - if (parseInt(f, 10) !== 0) { - writer.writeUint64String( - 1, - f - ); - } - f = message.getMetadata(); - if (f != null) { - writer.writeMessage( - 3, - f, - google_protobuf_struct_pb.Struct.serializeBinaryToWriter - ); - } - f = message.getResult(); - if (f != null) { - writer.writeMessage( - 4, - f, - google_protobuf_struct_pb.Struct.serializeBinaryToWriter - ); - } - f = message.getQuery(); - if (f != null) { - writer.writeMessage( - 5, - f, - google_protobuf_struct_pb.Struct.serializeBinaryToWriter - ); - } +proto.Knowledge.prototype.setOrganizationid = function(value) { + return jspb.Message.setProto3StringIntField(this, 19, value); }; /** - * optional uint64 id = 1; + * optional uint64 projectId = 20; * @return {string} */ -proto.AssistantConversationContext.prototype.getId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); +proto.Knowledge.prototype.getProjectid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 20, "0")); }; /** * @param {string} value - * @return {!proto.AssistantConversationContext} returns this + * @return {!proto.Knowledge} returns this */ -proto.AssistantConversationContext.prototype.setId = function(value) { - return jspb.Message.setProto3StringIntField(this, 1, value); +proto.Knowledge.prototype.setProjectid = function(value) { + return jspb.Message.setProto3StringIntField(this, 20, value); }; /** - * optional google.protobuf.Struct metadata = 3; - * @return {?proto.google.protobuf.Struct} + * optional Organization organization = 21; + * @return {?proto.Organization} */ -proto.AssistantConversationContext.prototype.getMetadata = function() { - return /** @type{?proto.google.protobuf.Struct} */ ( - jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 3)); -}; +proto.Knowledge.prototype.getOrganization = function() { + return /** @type{?proto.Organization} */ ( + jspb.Message.getWrapperField(this, proto.Organization, 21)); +}; /** - * @param {?proto.google.protobuf.Struct|undefined} value - * @return {!proto.AssistantConversationContext} returns this + * @param {?proto.Organization|undefined} value + * @return {!proto.Knowledge} returns this */ -proto.AssistantConversationContext.prototype.setMetadata = function(value) { - return jspb.Message.setWrapperField(this, 3, value); +proto.Knowledge.prototype.setOrganization = function(value) { + return jspb.Message.setWrapperField(this, 21, value); }; /** * Clears the message field making it undefined. - * @return {!proto.AssistantConversationContext} returns this + * @return {!proto.Knowledge} returns this */ -proto.AssistantConversationContext.prototype.clearMetadata = function() { - return this.setMetadata(undefined); +proto.Knowledge.prototype.clearOrganization = function() { + return this.setOrganization(undefined); }; @@ -7344,36 +6509,36 @@ proto.AssistantConversationContext.prototype.clearMetadata = function() { * Returns whether this field is set. * @return {boolean} */ -proto.AssistantConversationContext.prototype.hasMetadata = function() { - return jspb.Message.getField(this, 3) != null; +proto.Knowledge.prototype.hasOrganization = function() { + return jspb.Message.getField(this, 21) != null; }; /** - * optional google.protobuf.Struct result = 4; - * @return {?proto.google.protobuf.Struct} + * optional Tag knowledgeTag = 22; + * @return {?proto.Tag} */ -proto.AssistantConversationContext.prototype.getResult = function() { - return /** @type{?proto.google.protobuf.Struct} */ ( - jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 4)); +proto.Knowledge.prototype.getKnowledgetag = function() { + return /** @type{?proto.Tag} */ ( + jspb.Message.getWrapperField(this, proto.Tag, 22)); }; /** - * @param {?proto.google.protobuf.Struct|undefined} value - * @return {!proto.AssistantConversationContext} returns this + * @param {?proto.Tag|undefined} value + * @return {!proto.Knowledge} returns this */ -proto.AssistantConversationContext.prototype.setResult = function(value) { - return jspb.Message.setWrapperField(this, 4, value); +proto.Knowledge.prototype.setKnowledgetag = function(value) { + return jspb.Message.setWrapperField(this, 22, value); }; /** * Clears the message field making it undefined. - * @return {!proto.AssistantConversationContext} returns this + * @return {!proto.Knowledge} returns this */ -proto.AssistantConversationContext.prototype.clearResult = function() { - return this.setResult(undefined); +proto.Knowledge.prototype.clearKnowledgetag = function() { + return this.setKnowledgetag(undefined); }; @@ -7381,45 +6546,62 @@ proto.AssistantConversationContext.prototype.clearResult = function() { * Returns whether this field is set. * @return {boolean} */ -proto.AssistantConversationContext.prototype.hasResult = function() { - return jspb.Message.getField(this, 4) != null; +proto.Knowledge.prototype.hasKnowledgetag = function() { + return jspb.Message.getField(this, 22) != null; }; /** - * optional google.protobuf.Struct query = 5; - * @return {?proto.google.protobuf.Struct} + * optional uint32 documentCount = 23; + * @return {number} */ -proto.AssistantConversationContext.prototype.getQuery = function() { - return /** @type{?proto.google.protobuf.Struct} */ ( - jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 5)); +proto.Knowledge.prototype.getDocumentcount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 23, 0)); }; /** - * @param {?proto.google.protobuf.Struct|undefined} value - * @return {!proto.AssistantConversationContext} returns this -*/ -proto.AssistantConversationContext.prototype.setQuery = function(value) { - return jspb.Message.setWrapperField(this, 5, value); + * @param {number} value + * @return {!proto.Knowledge} returns this + */ +proto.Knowledge.prototype.setDocumentcount = function(value) { + return jspb.Message.setProto3IntField(this, 23, value); }; /** - * Clears the message field making it undefined. - * @return {!proto.AssistantConversationContext} returns this + * optional uint32 tokenCount = 24; + * @return {number} */ -proto.AssistantConversationContext.prototype.clearQuery = function() { - return this.setQuery(undefined); +proto.Knowledge.prototype.getTokencount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 24, 0)); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {number} value + * @return {!proto.Knowledge} returns this */ -proto.AssistantConversationContext.prototype.hasQuery = function() { - return jspb.Message.getField(this, 5) != null; +proto.Knowledge.prototype.setTokencount = function(value) { + return jspb.Message.setProto3IntField(this, 24, value); +}; + + +/** + * optional uint32 wordCount = 25; + * @return {number} + */ +proto.Knowledge.prototype.getWordcount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 25, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.Knowledge} returns this + */ +proto.Knowledge.prototype.setWordcount = function(value) { + return jspb.Message.setProto3IntField(this, 25, value); }; @@ -7439,8 +6621,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.AssistantConversationRecording.prototype.toObject = function(opt_includeInstance) { - return proto.AssistantConversationRecording.toObject(opt_includeInstance, this); +proto.TextPrompt.prototype.toObject = function(opt_includeInstance) { + return proto.TextPrompt.toObject(opt_includeInstance, this); }; @@ -7449,13 +6631,14 @@ proto.AssistantConversationRecording.prototype.toObject = function(opt_includeIn * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.AssistantConversationRecording} msg The msg instance to transform. + * @param {!proto.TextPrompt} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.AssistantConversationRecording.toObject = function(includeInstance, msg) { +proto.TextPrompt.toObject = function(includeInstance, msg) { var f, obj = { - recordingurl: jspb.Message.getFieldWithDefault(msg, 1, "") + role: jspb.Message.getFieldWithDefault(msg, 1, ""), + content: jspb.Message.getFieldWithDefault(msg, 2, "") }; if (includeInstance) { @@ -7469,23 +6652,23 @@ proto.AssistantConversationRecording.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.AssistantConversationRecording} + * @return {!proto.TextPrompt} */ -proto.AssistantConversationRecording.deserializeBinary = function(bytes) { +proto.TextPrompt.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.AssistantConversationRecording; - return proto.AssistantConversationRecording.deserializeBinaryFromReader(msg, reader); + var msg = new proto.TextPrompt; + return proto.TextPrompt.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.AssistantConversationRecording} msg The message object to deserialize into. + * @param {!proto.TextPrompt} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.AssistantConversationRecording} + * @return {!proto.TextPrompt} */ -proto.AssistantConversationRecording.deserializeBinaryFromReader = function(msg, reader) { +proto.TextPrompt.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -7494,7 +6677,11 @@ proto.AssistantConversationRecording.deserializeBinaryFromReader = function(msg, switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setRecordingurl(value); + msg.setRole(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setContent(value); break; default: reader.skipField(); @@ -7509,9 +6696,9 @@ proto.AssistantConversationRecording.deserializeBinaryFromReader = function(msg, * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.AssistantConversationRecording.prototype.serializeBinary = function() { +proto.TextPrompt.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.AssistantConversationRecording.serializeBinaryToWriter(this, writer); + proto.TextPrompt.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -7519,40 +6706,72 @@ proto.AssistantConversationRecording.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.AssistantConversationRecording} message + * @param {!proto.TextPrompt} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.AssistantConversationRecording.serializeBinaryToWriter = function(message, writer) { +proto.TextPrompt.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getRecordingurl(); + f = message.getRole(); if (f.length > 0) { writer.writeString( 1, f ); } + f = message.getContent(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } }; /** - * optional string recordingUrl = 1; + * optional string role = 1; * @return {string} */ -proto.AssistantConversationRecording.prototype.getRecordingurl = function() { +proto.TextPrompt.prototype.getRole = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.AssistantConversationRecording} returns this + * @return {!proto.TextPrompt} returns this */ -proto.AssistantConversationRecording.prototype.setRecordingurl = function(value) { +proto.TextPrompt.prototype.setRole = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; +/** + * optional string content = 2; + * @return {string} + */ +proto.TextPrompt.prototype.getContent = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.TextPrompt} returns this + */ +proto.TextPrompt.prototype.setContent = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.TextChatCompletePrompt.repeatedFields_ = [1,2]; @@ -7569,8 +6788,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.AssistantConversationTelephonyEvent.prototype.toObject = function(opt_includeInstance) { - return proto.AssistantConversationTelephonyEvent.toObject(opt_includeInstance, this); +proto.TextChatCompletePrompt.prototype.toObject = function(opt_includeInstance) { + return proto.TextChatCompletePrompt.toObject(opt_includeInstance, this); }; @@ -7579,19 +6798,16 @@ proto.AssistantConversationTelephonyEvent.prototype.toObject = function(opt_incl * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.AssistantConversationTelephonyEvent} msg The msg instance to transform. + * @param {!proto.TextChatCompletePrompt} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.AssistantConversationTelephonyEvent.toObject = function(includeInstance, msg) { +proto.TextChatCompletePrompt.toObject = function(includeInstance, msg) { var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, "0"), - assistantconversationid: jspb.Message.getFieldWithDefault(msg, 2, "0"), - provider: jspb.Message.getFieldWithDefault(msg, 3, ""), - eventtype: jspb.Message.getFieldWithDefault(msg, 4, ""), - payload: (f = msg.getPayload()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f), - createddate: (f = msg.getCreateddate()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - updateddate: (f = msg.getUpdateddate()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) + promptList: jspb.Message.toObjectList(msg.getPromptList(), + proto.TextPrompt.toObject, includeInstance), + promptvariablesList: jspb.Message.toObjectList(msg.getPromptvariablesList(), + proto.Variable.toObject, includeInstance) }; if (includeInstance) { @@ -7605,23 +6821,23 @@ proto.AssistantConversationTelephonyEvent.toObject = function(includeInstance, m /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.AssistantConversationTelephonyEvent} + * @return {!proto.TextChatCompletePrompt} */ -proto.AssistantConversationTelephonyEvent.deserializeBinary = function(bytes) { +proto.TextChatCompletePrompt.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.AssistantConversationTelephonyEvent; - return proto.AssistantConversationTelephonyEvent.deserializeBinaryFromReader(msg, reader); + var msg = new proto.TextChatCompletePrompt; + return proto.TextChatCompletePrompt.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.AssistantConversationTelephonyEvent} msg The message object to deserialize into. + * @param {!proto.TextChatCompletePrompt} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.AssistantConversationTelephonyEvent} + * @return {!proto.TextChatCompletePrompt} */ -proto.AssistantConversationTelephonyEvent.deserializeBinaryFromReader = function(msg, reader) { +proto.TextChatCompletePrompt.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -7629,35 +6845,14 @@ proto.AssistantConversationTelephonyEvent.deserializeBinaryFromReader = function var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {string} */ (reader.readUint64String()); - msg.setId(value); + var value = new proto.TextPrompt; + reader.readMessage(value,proto.TextPrompt.deserializeBinaryFromReader); + msg.addPrompt(value); break; case 2: - var value = /** @type {string} */ (reader.readUint64String()); - msg.setAssistantconversationid(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setProvider(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setEventtype(value); - break; - case 5: - var value = new google_protobuf_struct_pb.Struct; - reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader); - msg.setPayload(value); - break; - case 6: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setCreateddate(value); - break; - case 7: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setUpdateddate(value); + var value = new proto.Variable; + reader.readMessage(value,proto.Variable.deserializeBinaryFromReader); + msg.addPromptvariables(value); break; default: reader.skipField(); @@ -7672,9 +6867,9 @@ proto.AssistantConversationTelephonyEvent.deserializeBinaryFromReader = function * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.AssistantConversationTelephonyEvent.prototype.serializeBinary = function() { +proto.TextChatCompletePrompt.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.AssistantConversationTelephonyEvent.serializeBinaryToWriter(this, writer); + proto.TextChatCompletePrompt.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -7682,247 +6877,104 @@ proto.AssistantConversationTelephonyEvent.prototype.serializeBinary = function() /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.AssistantConversationTelephonyEvent} message + * @param {!proto.TextChatCompletePrompt} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.AssistantConversationTelephonyEvent.serializeBinaryToWriter = function(message, writer) { +proto.TextChatCompletePrompt.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getId(); - if (parseInt(f, 10) !== 0) { - writer.writeUint64String( - 1, - f - ); - } - f = message.getAssistantconversationid(); - if (parseInt(f, 10) !== 0) { - writer.writeUint64String( - 2, - f - ); - } - f = message.getProvider(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getEventtype(); + f = message.getPromptList(); if (f.length > 0) { - writer.writeString( - 4, - f - ); - } - f = message.getPayload(); - if (f != null) { - writer.writeMessage( - 5, - f, - google_protobuf_struct_pb.Struct.serializeBinaryToWriter - ); - } - f = message.getCreateddate(); - if (f != null) { - writer.writeMessage( - 6, + writer.writeRepeatedMessage( + 1, f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + proto.TextPrompt.serializeBinaryToWriter ); } - f = message.getUpdateddate(); - if (f != null) { - writer.writeMessage( - 7, + f = message.getPromptvariablesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + proto.Variable.serializeBinaryToWriter ); } }; /** - * optional uint64 id = 1; - * @return {string} - */ -proto.AssistantConversationTelephonyEvent.prototype.getId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); -}; - - -/** - * @param {string} value - * @return {!proto.AssistantConversationTelephonyEvent} returns this - */ -proto.AssistantConversationTelephonyEvent.prototype.setId = function(value) { - return jspb.Message.setProto3StringIntField(this, 1, value); -}; - - -/** - * optional uint64 assistantConversationId = 2; - * @return {string} - */ -proto.AssistantConversationTelephonyEvent.prototype.getAssistantconversationid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "0")); -}; - - -/** - * @param {string} value - * @return {!proto.AssistantConversationTelephonyEvent} returns this - */ -proto.AssistantConversationTelephonyEvent.prototype.setAssistantconversationid = function(value) { - return jspb.Message.setProto3StringIntField(this, 2, value); -}; - - -/** - * optional string provider = 3; - * @return {string} - */ -proto.AssistantConversationTelephonyEvent.prototype.getProvider = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.AssistantConversationTelephonyEvent} returns this - */ -proto.AssistantConversationTelephonyEvent.prototype.setProvider = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional string eventType = 4; - * @return {string} - */ -proto.AssistantConversationTelephonyEvent.prototype.getEventtype = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * @param {string} value - * @return {!proto.AssistantConversationTelephonyEvent} returns this - */ -proto.AssistantConversationTelephonyEvent.prototype.setEventtype = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); -}; - - -/** - * optional google.protobuf.Struct payload = 5; - * @return {?proto.google.protobuf.Struct} - */ -proto.AssistantConversationTelephonyEvent.prototype.getPayload = function() { - return /** @type{?proto.google.protobuf.Struct} */ ( - jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 5)); -}; - - -/** - * @param {?proto.google.protobuf.Struct|undefined} value - * @return {!proto.AssistantConversationTelephonyEvent} returns this -*/ -proto.AssistantConversationTelephonyEvent.prototype.setPayload = function(value) { - return jspb.Message.setWrapperField(this, 5, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.AssistantConversationTelephonyEvent} returns this - */ -proto.AssistantConversationTelephonyEvent.prototype.clearPayload = function() { - return this.setPayload(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.AssistantConversationTelephonyEvent.prototype.hasPayload = function() { - return jspb.Message.getField(this, 5) != null; -}; - - -/** - * optional google.protobuf.Timestamp createdDate = 6; - * @return {?proto.google.protobuf.Timestamp} + * repeated TextPrompt prompt = 1; + * @return {!Array} */ -proto.AssistantConversationTelephonyEvent.prototype.getCreateddate = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 6)); +proto.TextChatCompletePrompt.prototype.getPromptList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.TextPrompt, 1)); }; /** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.AssistantConversationTelephonyEvent} returns this + * @param {!Array} value + * @return {!proto.TextChatCompletePrompt} returns this */ -proto.AssistantConversationTelephonyEvent.prototype.setCreateddate = function(value) { - return jspb.Message.setWrapperField(this, 6, value); +proto.TextChatCompletePrompt.prototype.setPromptList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** - * Clears the message field making it undefined. - * @return {!proto.AssistantConversationTelephonyEvent} returns this + * @param {!proto.TextPrompt=} opt_value + * @param {number=} opt_index + * @return {!proto.TextPrompt} */ -proto.AssistantConversationTelephonyEvent.prototype.clearCreateddate = function() { - return this.setCreateddate(undefined); +proto.TextChatCompletePrompt.prototype.addPrompt = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.TextPrompt, opt_index); }; /** - * Returns whether this field is set. - * @return {boolean} + * Clears the list making it empty but non-null. + * @return {!proto.TextChatCompletePrompt} returns this */ -proto.AssistantConversationTelephonyEvent.prototype.hasCreateddate = function() { - return jspb.Message.getField(this, 6) != null; +proto.TextChatCompletePrompt.prototype.clearPromptList = function() { + return this.setPromptList([]); }; /** - * optional google.protobuf.Timestamp updatedDate = 7; - * @return {?proto.google.protobuf.Timestamp} + * repeated Variable promptVariables = 2; + * @return {!Array} */ -proto.AssistantConversationTelephonyEvent.prototype.getUpdateddate = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 7)); +proto.TextChatCompletePrompt.prototype.getPromptvariablesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.Variable, 2)); }; /** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.AssistantConversationTelephonyEvent} returns this + * @param {!Array} value + * @return {!proto.TextChatCompletePrompt} returns this */ -proto.AssistantConversationTelephonyEvent.prototype.setUpdateddate = function(value) { - return jspb.Message.setWrapperField(this, 7, value); +proto.TextChatCompletePrompt.prototype.setPromptvariablesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); }; /** - * Clears the message field making it undefined. - * @return {!proto.AssistantConversationTelephonyEvent} returns this + * @param {!proto.Variable=} opt_value + * @param {number=} opt_index + * @return {!proto.Variable} */ -proto.AssistantConversationTelephonyEvent.prototype.clearUpdateddate = function() { - return this.setUpdateddate(undefined); +proto.TextChatCompletePrompt.prototype.addPromptvariables = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.Variable, opt_index); }; /** - * Returns whether this field is set. - * @return {boolean} + * Clears the list making it empty but non-null. + * @return {!proto.TextChatCompletePrompt} returns this */ -proto.AssistantConversationTelephonyEvent.prototype.hasUpdateddate = function() { - return jspb.Message.getField(this, 7) != null; +proto.TextChatCompletePrompt.prototype.clearPromptvariablesList = function() { + return this.setPromptvariablesList([]); }; @@ -7932,7 +6984,7 @@ proto.AssistantConversationTelephonyEvent.prototype.hasUpdateddate = function() * @private {!Array} * @const */ -proto.AssistantConversation.repeatedFields_ = [13,28,30,32,31,33,35,36]; +proto.AssistantConversationMessage.repeatedFields_ = [10,31]; @@ -7949,8 +7001,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.AssistantConversation.prototype.toObject = function(opt_includeInstance) { - return proto.AssistantConversation.toObject(opt_includeInstance, this); +proto.AssistantConversationMessage.prototype.toObject = function(opt_includeInstance) { + return proto.AssistantConversationMessage.toObject(opt_includeInstance, this); }; @@ -7959,44 +7011,29 @@ proto.AssistantConversation.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.AssistantConversation} msg The msg instance to transform. + * @param {!proto.AssistantConversationMessage} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.AssistantConversation.toObject = function(includeInstance, msg) { +proto.AssistantConversationMessage.toObject = function(includeInstance, msg) { var f, obj = { id: jspb.Message.getFieldWithDefault(msg, 1, "0"), - userid: jspb.Message.getFieldWithDefault(msg, 2, "0"), - assistantid: jspb.Message.getFieldWithDefault(msg, 3, "0"), - name: jspb.Message.getFieldWithDefault(msg, 4, ""), - projectid: jspb.Message.getFieldWithDefault(msg, 5, "0"), - organizationid: jspb.Message.getFieldWithDefault(msg, 6, "0"), - source: jspb.Message.getFieldWithDefault(msg, 7, ""), - createdby: jspb.Message.getFieldWithDefault(msg, 8, "0"), - updatedby: jspb.Message.getFieldWithDefault(msg, 9, "0"), - user: (f = msg.getUser()) && proto.User.toObject(includeInstance, f), - assistantprovidermodelid: jspb.Message.getFieldWithDefault(msg, 12, "0"), - assistantconversationmessageList: jspb.Message.toObjectList(msg.getAssistantconversationmessageList(), - proto.AssistantConversationMessage.toObject, includeInstance), - identifier: jspb.Message.getFieldWithDefault(msg, 14, ""), - status: jspb.Message.getFieldWithDefault(msg, 15, ""), - createddate: (f = msg.getCreateddate()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - updateddate: (f = msg.getUpdateddate()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - contextsList: jspb.Message.toObjectList(msg.getContextsList(), - proto.AssistantConversationContext.toObject, includeInstance), + messageid: jspb.Message.getFieldWithDefault(msg, 3, ""), + assistantconversationid: jspb.Message.getFieldWithDefault(msg, 2, "0"), + role: jspb.Message.getFieldWithDefault(msg, 4, ""), + body: jspb.Message.getFieldWithDefault(msg, 5, ""), + source: jspb.Message.getFieldWithDefault(msg, 9, ""), metricsList: jspb.Message.toObjectList(msg.getMetricsList(), proto.Metric.toObject, includeInstance), + status: jspb.Message.getFieldWithDefault(msg, 11, ""), + createdby: jspb.Message.getFieldWithDefault(msg, 12, "0"), + updatedby: jspb.Message.getFieldWithDefault(msg, 13, "0"), + createddate: (f = msg.getCreateddate()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + updateddate: (f = msg.getUpdateddate()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + assistantid: jspb.Message.getFieldWithDefault(msg, 28, "0"), + assistantprovidermodelid: jspb.Message.getFieldWithDefault(msg, 29, "0"), metadataList: jspb.Message.toObjectList(msg.getMetadataList(), - proto.Metadata.toObject, includeInstance), - argumentsList: jspb.Message.toObjectList(msg.getArgumentsList(), - proto.Argument.toObject, includeInstance), - optionsList: jspb.Message.toObjectList(msg.getOptionsList(), - proto.Metadata.toObject, includeInstance), - direction: jspb.Message.getFieldWithDefault(msg, 34, ""), - recordingsList: jspb.Message.toObjectList(msg.getRecordingsList(), - proto.AssistantConversationRecording.toObject, includeInstance), - telephonyeventsList: jspb.Message.toObjectList(msg.getTelephonyeventsList(), - proto.AssistantConversationTelephonyEvent.toObject, includeInstance) + proto.Metadata.toObject, includeInstance) }; if (includeInstance) { @@ -8010,23 +7047,23 @@ proto.AssistantConversation.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.AssistantConversation} + * @return {!proto.AssistantConversationMessage} */ -proto.AssistantConversation.deserializeBinary = function(bytes) { +proto.AssistantConversationMessage.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.AssistantConversation; - return proto.AssistantConversation.deserializeBinaryFromReader(msg, reader); + var msg = new proto.AssistantConversationMessage; + return proto.AssistantConversationMessage.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.AssistantConversation} msg The message object to deserialize into. + * @param {!proto.AssistantConversationMessage} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.AssistantConversation} + * @return {!proto.AssistantConversationMessage} */ -proto.AssistantConversation.deserializeBinaryFromReader = function(msg, reader) { +proto.AssistantConversationMessage.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -8037,59 +7074,42 @@ proto.AssistantConversation.deserializeBinaryFromReader = function(msg, reader) var value = /** @type {string} */ (reader.readUint64String()); msg.setId(value); break; - case 2: - var value = /** @type {string} */ (reader.readUint64String()); - msg.setUserid(value); - break; case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setMessageid(value); + break; + case 2: var value = /** @type {string} */ (reader.readUint64String()); - msg.setAssistantid(value); + msg.setAssistantconversationid(value); break; case 4: var value = /** @type {string} */ (reader.readString()); - msg.setName(value); + msg.setRole(value); break; case 5: - var value = /** @type {string} */ (reader.readUint64String()); - msg.setProjectid(value); - break; - case 6: - var value = /** @type {string} */ (reader.readUint64String()); - msg.setOrganizationid(value); - break; - case 7: var value = /** @type {string} */ (reader.readString()); - msg.setSource(value); - break; - case 8: - var value = /** @type {string} */ (reader.readUint64String()); - msg.setCreatedby(value); + msg.setBody(value); break; case 9: - var value = /** @type {string} */ (reader.readUint64String()); - msg.setUpdatedby(value); + var value = /** @type {string} */ (reader.readString()); + msg.setSource(value); break; case 10: - var value = new proto.User; - reader.readMessage(value,proto.User.deserializeBinaryFromReader); - msg.setUser(value); + var value = new proto.Metric; + reader.readMessage(value,proto.Metric.deserializeBinaryFromReader); + msg.addMetrics(value); + break; + case 11: + var value = /** @type {string} */ (reader.readString()); + msg.setStatus(value); break; case 12: var value = /** @type {string} */ (reader.readUint64String()); - msg.setAssistantprovidermodelid(value); + msg.setCreatedby(value); break; case 13: - var value = new proto.AssistantConversationMessage; - reader.readMessage(value,proto.AssistantConversationMessage.deserializeBinaryFromReader); - msg.addAssistantconversationmessage(value); - break; - case 14: - var value = /** @type {string} */ (reader.readString()); - msg.setIdentifier(value); - break; - case 15: - var value = /** @type {string} */ (reader.readString()); - msg.setStatus(value); + var value = /** @type {string} */ (reader.readUint64String()); + msg.setUpdatedby(value); break; case 26: var value = new google_protobuf_timestamp_pb.Timestamp; @@ -8102,43 +7122,17 @@ proto.AssistantConversation.deserializeBinaryFromReader = function(msg, reader) msg.setUpdateddate(value); break; case 28: - var value = new proto.AssistantConversationContext; - reader.readMessage(value,proto.AssistantConversationContext.deserializeBinaryFromReader); - msg.addContexts(value); - break; - case 30: - var value = new proto.Metric; - reader.readMessage(value,proto.Metric.deserializeBinaryFromReader); - msg.addMetrics(value); + var value = /** @type {string} */ (reader.readUint64String()); + msg.setAssistantid(value); break; - case 32: - var value = new proto.Metadata; - reader.readMessage(value,proto.Metadata.deserializeBinaryFromReader); - msg.addMetadata(value); + case 29: + var value = /** @type {string} */ (reader.readUint64String()); + msg.setAssistantprovidermodelid(value); break; case 31: - var value = new proto.Argument; - reader.readMessage(value,proto.Argument.deserializeBinaryFromReader); - msg.addArguments(value); - break; - case 33: var value = new proto.Metadata; reader.readMessage(value,proto.Metadata.deserializeBinaryFromReader); - msg.addOptions(value); - break; - case 34: - var value = /** @type {string} */ (reader.readString()); - msg.setDirection(value); - break; - case 35: - var value = new proto.AssistantConversationRecording; - reader.readMessage(value,proto.AssistantConversationRecording.deserializeBinaryFromReader); - msg.addRecordings(value); - break; - case 36: - var value = new proto.AssistantConversationTelephonyEvent; - reader.readMessage(value,proto.AssistantConversationTelephonyEvent.deserializeBinaryFromReader); - msg.addTelephonyevents(value); + msg.addMetadata(value); break; default: reader.skipField(); @@ -8153,9 +7147,9 @@ proto.AssistantConversation.deserializeBinaryFromReader = function(msg, reader) * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.AssistantConversation.prototype.serializeBinary = function() { +proto.AssistantConversationMessage.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.AssistantConversation.serializeBinaryToWriter(this, writer); + proto.AssistantConversationMessage.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -8163,11 +7157,11 @@ proto.AssistantConversation.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.AssistantConversation} message + * @param {!proto.AssistantConversationMessage} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.AssistantConversation.serializeBinaryToWriter = function(message, writer) { +proto.AssistantConversationMessage.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getId(); if (parseInt(f, 10) !== 0) { @@ -8176,96 +7170,67 @@ proto.AssistantConversation.serializeBinaryToWriter = function(message, writer) f ); } - f = message.getUserid(); - if (parseInt(f, 10) !== 0) { - writer.writeUint64String( - 2, + f = message.getMessageid(); + if (f.length > 0) { + writer.writeString( + 3, f ); } - f = message.getAssistantid(); + f = message.getAssistantconversationid(); if (parseInt(f, 10) !== 0) { writer.writeUint64String( - 3, + 2, f ); } - f = message.getName(); + f = message.getRole(); if (f.length > 0) { writer.writeString( 4, f ); } - f = message.getProjectid(); - if (parseInt(f, 10) !== 0) { - writer.writeUint64String( + f = message.getBody(); + if (f.length > 0) { + writer.writeString( 5, f ); } - f = message.getOrganizationid(); - if (parseInt(f, 10) !== 0) { - writer.writeUint64String( - 6, - f - ); - } f = message.getSource(); if (f.length > 0) { writer.writeString( - 7, - f - ); - } - f = message.getCreatedby(); - if (parseInt(f, 10) !== 0) { - writer.writeUint64String( - 8, - f - ); - } - f = message.getUpdatedby(); - if (parseInt(f, 10) !== 0) { - writer.writeUint64String( 9, f ); } - f = message.getUser(); - if (f != null) { - writer.writeMessage( + f = message.getMetricsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( 10, f, - proto.User.serializeBinaryToWriter + proto.Metric.serializeBinaryToWriter ); } - f = message.getAssistantprovidermodelid(); + f = message.getStatus(); + if (f.length > 0) { + writer.writeString( + 11, + f + ); + } + f = message.getCreatedby(); if (parseInt(f, 10) !== 0) { writer.writeUint64String( 12, f ); } - f = message.getAssistantconversationmessageList(); - if (f.length > 0) { - writer.writeRepeatedMessage( + f = message.getUpdatedby(); + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 13, - f, - proto.AssistantConversationMessage.serializeBinaryToWriter - ); - } - f = message.getIdentifier(); - if (f.length > 0) { - writer.writeString( - 14, - f - ); - } - f = message.getStatus(); - if (f.length > 0) { - writer.writeString( - 15, f ); } @@ -8285,67 +7250,26 @@ proto.AssistantConversation.serializeBinaryToWriter = function(message, writer) google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter ); } - f = message.getContextsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( + f = message.getAssistantid(); + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 28, - f, - proto.AssistantConversationContext.serializeBinaryToWriter + f ); } - f = message.getMetricsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 30, - f, - proto.Metric.serializeBinaryToWriter + f = message.getAssistantprovidermodelid(); + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( + 29, + f ); } f = message.getMetadataList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 32, - f, - proto.Metadata.serializeBinaryToWriter - ); - } - f = message.getArgumentsList(); if (f.length > 0) { writer.writeRepeatedMessage( 31, f, - proto.Argument.serializeBinaryToWriter - ); - } - f = message.getOptionsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 33, - f, - proto.Metadata.serializeBinaryToWriter - ); - } - f = message.getDirection(); - if (f.length > 0) { - writer.writeString( - 34, - f - ); - } - f = message.getRecordingsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 35, - f, - proto.AssistantConversationRecording.serializeBinaryToWriter - ); - } - f = message.getTelephonyeventsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 36, - f, - proto.AssistantConversationTelephonyEvent.serializeBinaryToWriter + proto.Metadata.serializeBinaryToWriter ); } }; @@ -8355,659 +7279,634 @@ proto.AssistantConversation.serializeBinaryToWriter = function(message, writer) * optional uint64 id = 1; * @return {string} */ -proto.AssistantConversation.prototype.getId = function() { +proto.AssistantConversationMessage.prototype.getId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); }; /** * @param {string} value - * @return {!proto.AssistantConversation} returns this + * @return {!proto.AssistantConversationMessage} returns this */ -proto.AssistantConversation.prototype.setId = function(value) { +proto.AssistantConversationMessage.prototype.setId = function(value) { return jspb.Message.setProto3StringIntField(this, 1, value); }; /** - * optional uint64 userId = 2; + * optional string messageId = 3; * @return {string} */ -proto.AssistantConversation.prototype.getUserid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "0")); +proto.AssistantConversationMessage.prototype.getMessageid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** * @param {string} value - * @return {!proto.AssistantConversation} returns this + * @return {!proto.AssistantConversationMessage} returns this */ -proto.AssistantConversation.prototype.setUserid = function(value) { - return jspb.Message.setProto3StringIntField(this, 2, value); +proto.AssistantConversationMessage.prototype.setMessageid = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); }; /** - * optional uint64 assistantId = 3; + * optional uint64 assistantConversationId = 2; * @return {string} */ -proto.AssistantConversation.prototype.getAssistantid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "0")); +proto.AssistantConversationMessage.prototype.getAssistantconversationid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "0")); }; /** * @param {string} value - * @return {!proto.AssistantConversation} returns this + * @return {!proto.AssistantConversationMessage} returns this */ -proto.AssistantConversation.prototype.setAssistantid = function(value) { - return jspb.Message.setProto3StringIntField(this, 3, value); +proto.AssistantConversationMessage.prototype.setAssistantconversationid = function(value) { + return jspb.Message.setProto3StringIntField(this, 2, value); }; /** - * optional string name = 4; + * optional string role = 4; * @return {string} */ -proto.AssistantConversation.prototype.getName = function() { +proto.AssistantConversationMessage.prototype.getRole = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); }; /** * @param {string} value - * @return {!proto.AssistantConversation} returns this + * @return {!proto.AssistantConversationMessage} returns this */ -proto.AssistantConversation.prototype.setName = function(value) { +proto.AssistantConversationMessage.prototype.setRole = function(value) { return jspb.Message.setProto3StringField(this, 4, value); }; /** - * optional uint64 projectId = 5; + * optional string body = 5; * @return {string} */ -proto.AssistantConversation.prototype.getProjectid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "0")); +proto.AssistantConversationMessage.prototype.getBody = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); }; /** * @param {string} value - * @return {!proto.AssistantConversation} returns this + * @return {!proto.AssistantConversationMessage} returns this */ -proto.AssistantConversation.prototype.setProjectid = function(value) { - return jspb.Message.setProto3StringIntField(this, 5, value); +proto.AssistantConversationMessage.prototype.setBody = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); }; /** - * optional uint64 organizationId = 6; + * optional string source = 9; * @return {string} */ -proto.AssistantConversation.prototype.getOrganizationid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "0")); +proto.AssistantConversationMessage.prototype.getSource = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); }; /** * @param {string} value - * @return {!proto.AssistantConversation} returns this + * @return {!proto.AssistantConversationMessage} returns this */ -proto.AssistantConversation.prototype.setOrganizationid = function(value) { - return jspb.Message.setProto3StringIntField(this, 6, value); +proto.AssistantConversationMessage.prototype.setSource = function(value) { + return jspb.Message.setProto3StringField(this, 9, value); }; /** - * optional string source = 7; - * @return {string} + * repeated Metric metrics = 10; + * @return {!Array} */ -proto.AssistantConversation.prototype.getSource = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +proto.AssistantConversationMessage.prototype.getMetricsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.Metric, 10)); }; /** - * @param {string} value - * @return {!proto.AssistantConversation} returns this + * @param {!Array} value + * @return {!proto.AssistantConversationMessage} returns this +*/ +proto.AssistantConversationMessage.prototype.setMetricsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 10, value); +}; + + +/** + * @param {!proto.Metric=} opt_value + * @param {number=} opt_index + * @return {!proto.Metric} */ -proto.AssistantConversation.prototype.setSource = function(value) { - return jspb.Message.setProto3StringField(this, 7, value); +proto.AssistantConversationMessage.prototype.addMetrics = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 10, opt_value, proto.Metric, opt_index); }; /** - * optional uint64 createdBy = 8; + * Clears the list making it empty but non-null. + * @return {!proto.AssistantConversationMessage} returns this + */ +proto.AssistantConversationMessage.prototype.clearMetricsList = function() { + return this.setMetricsList([]); +}; + + +/** + * optional string status = 11; * @return {string} */ -proto.AssistantConversation.prototype.getCreatedby = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "0")); +proto.AssistantConversationMessage.prototype.getStatus = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 11, "")); }; /** * @param {string} value - * @return {!proto.AssistantConversation} returns this + * @return {!proto.AssistantConversationMessage} returns this */ -proto.AssistantConversation.prototype.setCreatedby = function(value) { - return jspb.Message.setProto3StringIntField(this, 8, value); +proto.AssistantConversationMessage.prototype.setStatus = function(value) { + return jspb.Message.setProto3StringField(this, 11, value); }; /** - * optional uint64 updatedBy = 9; + * optional uint64 createdBy = 12; * @return {string} */ -proto.AssistantConversation.prototype.getUpdatedby = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "0")); +proto.AssistantConversationMessage.prototype.getCreatedby = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 12, "0")); }; /** * @param {string} value - * @return {!proto.AssistantConversation} returns this + * @return {!proto.AssistantConversationMessage} returns this */ -proto.AssistantConversation.prototype.setUpdatedby = function(value) { - return jspb.Message.setProto3StringIntField(this, 9, value); +proto.AssistantConversationMessage.prototype.setCreatedby = function(value) { + return jspb.Message.setProto3StringIntField(this, 12, value); }; /** - * optional User user = 10; - * @return {?proto.User} + * optional uint64 updatedBy = 13; + * @return {string} */ -proto.AssistantConversation.prototype.getUser = function() { - return /** @type{?proto.User} */ ( - jspb.Message.getWrapperField(this, proto.User, 10)); +proto.AssistantConversationMessage.prototype.getUpdatedby = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 13, "0")); }; /** - * @param {?proto.User|undefined} value - * @return {!proto.AssistantConversation} returns this -*/ -proto.AssistantConversation.prototype.setUser = function(value) { - return jspb.Message.setWrapperField(this, 10, value); + * @param {string} value + * @return {!proto.AssistantConversationMessage} returns this + */ +proto.AssistantConversationMessage.prototype.setUpdatedby = function(value) { + return jspb.Message.setProto3StringIntField(this, 13, value); }; /** - * Clears the message field making it undefined. - * @return {!proto.AssistantConversation} returns this + * optional google.protobuf.Timestamp createdDate = 26; + * @return {?proto.google.protobuf.Timestamp} */ -proto.AssistantConversation.prototype.clearUser = function() { - return this.setUser(undefined); +proto.AssistantConversationMessage.prototype.getCreateddate = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 26)); }; /** - * Returns whether this field is set. - * @return {boolean} - */ -proto.AssistantConversation.prototype.hasUser = function() { - return jspb.Message.getField(this, 10) != null; + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.AssistantConversationMessage} returns this +*/ +proto.AssistantConversationMessage.prototype.setCreateddate = function(value) { + return jspb.Message.setWrapperField(this, 26, value); }; /** - * optional uint64 assistantProviderModelId = 12; - * @return {string} + * Clears the message field making it undefined. + * @return {!proto.AssistantConversationMessage} returns this */ -proto.AssistantConversation.prototype.getAssistantprovidermodelid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 12, "0")); +proto.AssistantConversationMessage.prototype.clearCreateddate = function() { + return this.setCreateddate(undefined); }; /** - * @param {string} value - * @return {!proto.AssistantConversation} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.AssistantConversation.prototype.setAssistantprovidermodelid = function(value) { - return jspb.Message.setProto3StringIntField(this, 12, value); +proto.AssistantConversationMessage.prototype.hasCreateddate = function() { + return jspb.Message.getField(this, 26) != null; }; /** - * repeated AssistantConversationMessage assistantConversationMessage = 13; - * @return {!Array} + * optional google.protobuf.Timestamp updatedDate = 27; + * @return {?proto.google.protobuf.Timestamp} */ -proto.AssistantConversation.prototype.getAssistantconversationmessageList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.AssistantConversationMessage, 13)); +proto.AssistantConversationMessage.prototype.getUpdateddate = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 27)); }; /** - * @param {!Array} value - * @return {!proto.AssistantConversation} returns this + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.AssistantConversationMessage} returns this */ -proto.AssistantConversation.prototype.setAssistantconversationmessageList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 13, value); +proto.AssistantConversationMessage.prototype.setUpdateddate = function(value) { + return jspb.Message.setWrapperField(this, 27, value); }; /** - * @param {!proto.AssistantConversationMessage=} opt_value - * @param {number=} opt_index - * @return {!proto.AssistantConversationMessage} + * Clears the message field making it undefined. + * @return {!proto.AssistantConversationMessage} returns this */ -proto.AssistantConversation.prototype.addAssistantconversationmessage = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 13, opt_value, proto.AssistantConversationMessage, opt_index); +proto.AssistantConversationMessage.prototype.clearUpdateddate = function() { + return this.setUpdateddate(undefined); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.AssistantConversation} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.AssistantConversation.prototype.clearAssistantconversationmessageList = function() { - return this.setAssistantconversationmessageList([]); +proto.AssistantConversationMessage.prototype.hasUpdateddate = function() { + return jspb.Message.getField(this, 27) != null; }; /** - * optional string identifier = 14; + * optional uint64 assistantId = 28; * @return {string} */ -proto.AssistantConversation.prototype.getIdentifier = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 14, "")); +proto.AssistantConversationMessage.prototype.getAssistantid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 28, "0")); }; /** * @param {string} value - * @return {!proto.AssistantConversation} returns this + * @return {!proto.AssistantConversationMessage} returns this */ -proto.AssistantConversation.prototype.setIdentifier = function(value) { - return jspb.Message.setProto3StringField(this, 14, value); +proto.AssistantConversationMessage.prototype.setAssistantid = function(value) { + return jspb.Message.setProto3StringIntField(this, 28, value); }; /** - * optional string status = 15; + * optional uint64 assistantProviderModelId = 29; * @return {string} */ -proto.AssistantConversation.prototype.getStatus = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 15, "")); +proto.AssistantConversationMessage.prototype.getAssistantprovidermodelid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 29, "0")); }; /** * @param {string} value - * @return {!proto.AssistantConversation} returns this + * @return {!proto.AssistantConversationMessage} returns this */ -proto.AssistantConversation.prototype.setStatus = function(value) { - return jspb.Message.setProto3StringField(this, 15, value); +proto.AssistantConversationMessage.prototype.setAssistantprovidermodelid = function(value) { + return jspb.Message.setProto3StringIntField(this, 29, value); }; /** - * optional google.protobuf.Timestamp createdDate = 26; - * @return {?proto.google.protobuf.Timestamp} + * repeated Metadata metadata = 31; + * @return {!Array} */ -proto.AssistantConversation.prototype.getCreateddate = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 26)); +proto.AssistantConversationMessage.prototype.getMetadataList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.Metadata, 31)); }; /** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.AssistantConversation} returns this + * @param {!Array} value + * @return {!proto.AssistantConversationMessage} returns this */ -proto.AssistantConversation.prototype.setCreateddate = function(value) { - return jspb.Message.setWrapperField(this, 26, value); +proto.AssistantConversationMessage.prototype.setMetadataList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 31, value); }; /** - * Clears the message field making it undefined. - * @return {!proto.AssistantConversation} returns this + * @param {!proto.Metadata=} opt_value + * @param {number=} opt_index + * @return {!proto.Metadata} */ -proto.AssistantConversation.prototype.clearCreateddate = function() { - return this.setCreateddate(undefined); +proto.AssistantConversationMessage.prototype.addMetadata = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 31, opt_value, proto.Metadata, opt_index); }; /** - * Returns whether this field is set. - * @return {boolean} + * Clears the list making it empty but non-null. + * @return {!proto.AssistantConversationMessage} returns this */ -proto.AssistantConversation.prototype.hasCreateddate = function() { - return jspb.Message.getField(this, 26) != null; +proto.AssistantConversationMessage.prototype.clearMetadataList = function() { + return this.setMetadataList([]); }; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * optional google.protobuf.Timestamp updatedDate = 27; - * @return {?proto.google.protobuf.Timestamp} + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} */ -proto.AssistantConversation.prototype.getUpdateddate = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 27)); +proto.AssistantConversationContext.prototype.toObject = function(opt_includeInstance) { + return proto.AssistantConversationContext.toObject(opt_includeInstance, this); }; /** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.AssistantConversation} returns this -*/ -proto.AssistantConversation.prototype.setUpdateddate = function(value) { - return jspb.Message.setWrapperField(this, 27, value); + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.AssistantConversationContext} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.AssistantConversationContext.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, "0"), + metadata: (f = msg.getMetadata()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f), + result: (f = msg.getResult()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f), + query: (f = msg.getQuery()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * Clears the message field making it undefined. - * @return {!proto.AssistantConversation} returns this + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.AssistantConversationContext} */ -proto.AssistantConversation.prototype.clearUpdateddate = function() { - return this.setUpdateddate(undefined); +proto.AssistantConversationContext.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.AssistantConversationContext; + return proto.AssistantConversationContext.deserializeBinaryFromReader(msg, reader); }; /** - * Returns whether this field is set. - * @return {boolean} + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.AssistantConversationContext} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.AssistantConversationContext} */ -proto.AssistantConversation.prototype.hasUpdateddate = function() { - return jspb.Message.getField(this, 27) != null; +proto.AssistantConversationContext.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readUint64String()); + msg.setId(value); + break; + case 3: + var value = new google_protobuf_struct_pb.Struct; + reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader); + msg.setMetadata(value); + break; + case 4: + var value = new google_protobuf_struct_pb.Struct; + reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader); + msg.setResult(value); + break; + case 5: + var value = new google_protobuf_struct_pb.Struct; + reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader); + msg.setQuery(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * repeated AssistantConversationContext contexts = 28; - * @return {!Array} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.AssistantConversation.prototype.getContextsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.AssistantConversationContext, 28)); +proto.AssistantConversationContext.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.AssistantConversationContext.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * @param {!Array} value - * @return {!proto.AssistantConversation} returns this -*/ -proto.AssistantConversation.prototype.setContextsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 28, value); + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.AssistantConversationContext} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.AssistantConversationContext.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( + 1, + f + ); + } + f = message.getMetadata(); + if (f != null) { + writer.writeMessage( + 3, + f, + google_protobuf_struct_pb.Struct.serializeBinaryToWriter + ); + } + f = message.getResult(); + if (f != null) { + writer.writeMessage( + 4, + f, + google_protobuf_struct_pb.Struct.serializeBinaryToWriter + ); + } + f = message.getQuery(); + if (f != null) { + writer.writeMessage( + 5, + f, + google_protobuf_struct_pb.Struct.serializeBinaryToWriter + ); + } }; /** - * @param {!proto.AssistantConversationContext=} opt_value - * @param {number=} opt_index - * @return {!proto.AssistantConversationContext} + * optional uint64 id = 1; + * @return {string} */ -proto.AssistantConversation.prototype.addContexts = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 28, opt_value, proto.AssistantConversationContext, opt_index); +proto.AssistantConversationContext.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.AssistantConversation} returns this + * @param {string} value + * @return {!proto.AssistantConversationContext} returns this */ -proto.AssistantConversation.prototype.clearContextsList = function() { - return this.setContextsList([]); +proto.AssistantConversationContext.prototype.setId = function(value) { + return jspb.Message.setProto3StringIntField(this, 1, value); }; /** - * repeated Metric metrics = 30; - * @return {!Array} + * optional google.protobuf.Struct metadata = 3; + * @return {?proto.google.protobuf.Struct} */ -proto.AssistantConversation.prototype.getMetricsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.Metric, 30)); +proto.AssistantConversationContext.prototype.getMetadata = function() { + return /** @type{?proto.google.protobuf.Struct} */ ( + jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 3)); }; /** - * @param {!Array} value - * @return {!proto.AssistantConversation} returns this + * @param {?proto.google.protobuf.Struct|undefined} value + * @return {!proto.AssistantConversationContext} returns this */ -proto.AssistantConversation.prototype.setMetricsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 30, value); +proto.AssistantConversationContext.prototype.setMetadata = function(value) { + return jspb.Message.setWrapperField(this, 3, value); }; /** - * @param {!proto.Metric=} opt_value - * @param {number=} opt_index - * @return {!proto.Metric} + * Clears the message field making it undefined. + * @return {!proto.AssistantConversationContext} returns this */ -proto.AssistantConversation.prototype.addMetrics = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 30, opt_value, proto.Metric, opt_index); +proto.AssistantConversationContext.prototype.clearMetadata = function() { + return this.setMetadata(undefined); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.AssistantConversation} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.AssistantConversation.prototype.clearMetricsList = function() { - return this.setMetricsList([]); +proto.AssistantConversationContext.prototype.hasMetadata = function() { + return jspb.Message.getField(this, 3) != null; }; /** - * repeated Metadata metadata = 32; - * @return {!Array} + * optional google.protobuf.Struct result = 4; + * @return {?proto.google.protobuf.Struct} */ -proto.AssistantConversation.prototype.getMetadataList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.Metadata, 32)); -}; - - -/** - * @param {!Array} value - * @return {!proto.AssistantConversation} returns this -*/ -proto.AssistantConversation.prototype.setMetadataList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 32, value); -}; - - -/** - * @param {!proto.Metadata=} opt_value - * @param {number=} opt_index - * @return {!proto.Metadata} - */ -proto.AssistantConversation.prototype.addMetadata = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 32, opt_value, proto.Metadata, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.AssistantConversation} returns this - */ -proto.AssistantConversation.prototype.clearMetadataList = function() { - return this.setMetadataList([]); -}; - - -/** - * repeated Argument arguments = 31; - * @return {!Array} - */ -proto.AssistantConversation.prototype.getArgumentsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.Argument, 31)); -}; - - -/** - * @param {!Array} value - * @return {!proto.AssistantConversation} returns this -*/ -proto.AssistantConversation.prototype.setArgumentsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 31, value); -}; - - -/** - * @param {!proto.Argument=} opt_value - * @param {number=} opt_index - * @return {!proto.Argument} - */ -proto.AssistantConversation.prototype.addArguments = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 31, opt_value, proto.Argument, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.AssistantConversation} returns this - */ -proto.AssistantConversation.prototype.clearArgumentsList = function() { - return this.setArgumentsList([]); -}; - - -/** - * repeated Metadata options = 33; - * @return {!Array} - */ -proto.AssistantConversation.prototype.getOptionsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.Metadata, 33)); -}; - - -/** - * @param {!Array} value - * @return {!proto.AssistantConversation} returns this -*/ -proto.AssistantConversation.prototype.setOptionsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 33, value); -}; - - -/** - * @param {!proto.Metadata=} opt_value - * @param {number=} opt_index - * @return {!proto.Metadata} - */ -proto.AssistantConversation.prototype.addOptions = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 33, opt_value, proto.Metadata, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.AssistantConversation} returns this - */ -proto.AssistantConversation.prototype.clearOptionsList = function() { - return this.setOptionsList([]); -}; - - -/** - * optional string direction = 34; - * @return {string} - */ -proto.AssistantConversation.prototype.getDirection = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 34, "")); -}; - - -/** - * @param {string} value - * @return {!proto.AssistantConversation} returns this - */ -proto.AssistantConversation.prototype.setDirection = function(value) { - return jspb.Message.setProto3StringField(this, 34, value); -}; - - -/** - * repeated AssistantConversationRecording recordings = 35; - * @return {!Array} - */ -proto.AssistantConversation.prototype.getRecordingsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.AssistantConversationRecording, 35)); +proto.AssistantConversationContext.prototype.getResult = function() { + return /** @type{?proto.google.protobuf.Struct} */ ( + jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 4)); }; /** - * @param {!Array} value - * @return {!proto.AssistantConversation} returns this + * @param {?proto.google.protobuf.Struct|undefined} value + * @return {!proto.AssistantConversationContext} returns this */ -proto.AssistantConversation.prototype.setRecordingsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 35, value); +proto.AssistantConversationContext.prototype.setResult = function(value) { + return jspb.Message.setWrapperField(this, 4, value); }; /** - * @param {!proto.AssistantConversationRecording=} opt_value - * @param {number=} opt_index - * @return {!proto.AssistantConversationRecording} + * Clears the message field making it undefined. + * @return {!proto.AssistantConversationContext} returns this */ -proto.AssistantConversation.prototype.addRecordings = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 35, opt_value, proto.AssistantConversationRecording, opt_index); +proto.AssistantConversationContext.prototype.clearResult = function() { + return this.setResult(undefined); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.AssistantConversation} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.AssistantConversation.prototype.clearRecordingsList = function() { - return this.setRecordingsList([]); +proto.AssistantConversationContext.prototype.hasResult = function() { + return jspb.Message.getField(this, 4) != null; }; /** - * repeated AssistantConversationTelephonyEvent telephonyEvents = 36; - * @return {!Array} + * optional google.protobuf.Struct query = 5; + * @return {?proto.google.protobuf.Struct} */ -proto.AssistantConversation.prototype.getTelephonyeventsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.AssistantConversationTelephonyEvent, 36)); +proto.AssistantConversationContext.prototype.getQuery = function() { + return /** @type{?proto.google.protobuf.Struct} */ ( + jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 5)); }; /** - * @param {!Array} value - * @return {!proto.AssistantConversation} returns this + * @param {?proto.google.protobuf.Struct|undefined} value + * @return {!proto.AssistantConversationContext} returns this */ -proto.AssistantConversation.prototype.setTelephonyeventsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 36, value); +proto.AssistantConversationContext.prototype.setQuery = function(value) { + return jspb.Message.setWrapperField(this, 5, value); }; /** - * @param {!proto.AssistantConversationTelephonyEvent=} opt_value - * @param {number=} opt_index - * @return {!proto.AssistantConversationTelephonyEvent} + * Clears the message field making it undefined. + * @return {!proto.AssistantConversationContext} returns this */ -proto.AssistantConversation.prototype.addTelephonyevents = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 36, opt_value, proto.AssistantConversationTelephonyEvent, opt_index); +proto.AssistantConversationContext.prototype.clearQuery = function() { + return this.setQuery(undefined); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.AssistantConversation} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.AssistantConversation.prototype.clearTelephonyeventsList = function() { - return this.setTelephonyeventsList([]); +proto.AssistantConversationContext.prototype.hasQuery = function() { + return jspb.Message.getField(this, 5) != null; }; -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.GetAllAssistantConversationRequest.repeatedFields_ = [3]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -9023,8 +7922,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.GetAllAssistantConversationRequest.prototype.toObject = function(opt_includeInstance) { - return proto.GetAllAssistantConversationRequest.toObject(opt_includeInstance, this); +proto.AssistantConversationRecording.prototype.toObject = function(opt_includeInstance) { + return proto.AssistantConversationRecording.toObject(opt_includeInstance, this); }; @@ -9033,17 +7932,13 @@ proto.GetAllAssistantConversationRequest.prototype.toObject = function(opt_inclu * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.GetAllAssistantConversationRequest} msg The msg instance to transform. + * @param {!proto.AssistantConversationRecording} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.GetAllAssistantConversationRequest.toObject = function(includeInstance, msg) { +proto.AssistantConversationRecording.toObject = function(includeInstance, msg) { var f, obj = { - assistantid: jspb.Message.getFieldWithDefault(msg, 1, "0"), - paginate: (f = msg.getPaginate()) && proto.Paginate.toObject(includeInstance, f), - criteriasList: jspb.Message.toObjectList(msg.getCriteriasList(), - proto.Criteria.toObject, includeInstance), - source: jspb.Message.getFieldWithDefault(msg, 7, 0) + recordingurl: jspb.Message.getFieldWithDefault(msg, 1, "") }; if (includeInstance) { @@ -9057,23 +7952,23 @@ proto.GetAllAssistantConversationRequest.toObject = function(includeInstance, ms /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.GetAllAssistantConversationRequest} + * @return {!proto.AssistantConversationRecording} */ -proto.GetAllAssistantConversationRequest.deserializeBinary = function(bytes) { +proto.AssistantConversationRecording.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.GetAllAssistantConversationRequest; - return proto.GetAllAssistantConversationRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.AssistantConversationRecording; + return proto.AssistantConversationRecording.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.GetAllAssistantConversationRequest} msg The message object to deserialize into. + * @param {!proto.AssistantConversationRecording} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.GetAllAssistantConversationRequest} + * @return {!proto.AssistantConversationRecording} */ -proto.GetAllAssistantConversationRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.AssistantConversationRecording.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -9081,22 +7976,8 @@ proto.GetAllAssistantConversationRequest.deserializeBinaryFromReader = function( var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {string} */ (reader.readUint64String()); - msg.setAssistantid(value); - break; - case 2: - var value = new proto.Paginate; - reader.readMessage(value,proto.Paginate.deserializeBinaryFromReader); - msg.setPaginate(value); - break; - case 3: - var value = new proto.Criteria; - reader.readMessage(value,proto.Criteria.deserializeBinaryFromReader); - msg.addCriterias(value); - break; - case 7: - var value = /** @type {!proto.Source} */ (reader.readEnum()); - msg.setSource(value); + var value = /** @type {string} */ (reader.readString()); + msg.setRecordingurl(value); break; default: reader.skipField(); @@ -9111,9 +7992,9 @@ proto.GetAllAssistantConversationRequest.deserializeBinaryFromReader = function( * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.GetAllAssistantConversationRequest.prototype.serializeBinary = function() { +proto.AssistantConversationRecording.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.GetAllAssistantConversationRequest.serializeBinaryToWriter(this, writer); + proto.AssistantConversationRecording.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -9121,39 +8002,16 @@ proto.GetAllAssistantConversationRequest.prototype.serializeBinary = function() /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.GetAllAssistantConversationRequest} message + * @param {!proto.AssistantConversationRecording} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.GetAllAssistantConversationRequest.serializeBinaryToWriter = function(message, writer) { +proto.AssistantConversationRecording.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getAssistantid(); - if (parseInt(f, 10) !== 0) { - writer.writeUint64String( - 1, - f - ); - } - f = message.getPaginate(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.Paginate.serializeBinaryToWriter - ); - } - f = message.getCriteriasList(); + f = message.getRecordingurl(); if (f.length > 0) { - writer.writeRepeatedMessage( - 3, - f, - proto.Criteria.serializeBinaryToWriter - ); - } - f = message.getSource(); - if (f !== 0.0) { - writer.writeEnum( - 7, + writer.writeString( + 1, f ); } @@ -9161,124 +8019,24 @@ proto.GetAllAssistantConversationRequest.serializeBinaryToWriter = function(mess /** - * optional uint64 assistantId = 1; + * optional string recordingUrl = 1; * @return {string} */ -proto.GetAllAssistantConversationRequest.prototype.getAssistantid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); +proto.AssistantConversationRecording.prototype.getRecordingurl = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.GetAllAssistantConversationRequest} returns this - */ -proto.GetAllAssistantConversationRequest.prototype.setAssistantid = function(value) { - return jspb.Message.setProto3StringIntField(this, 1, value); -}; - - -/** - * optional Paginate paginate = 2; - * @return {?proto.Paginate} - */ -proto.GetAllAssistantConversationRequest.prototype.getPaginate = function() { - return /** @type{?proto.Paginate} */ ( - jspb.Message.getWrapperField(this, proto.Paginate, 2)); -}; - - -/** - * @param {?proto.Paginate|undefined} value - * @return {!proto.GetAllAssistantConversationRequest} returns this -*/ -proto.GetAllAssistantConversationRequest.prototype.setPaginate = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.GetAllAssistantConversationRequest} returns this - */ -proto.GetAllAssistantConversationRequest.prototype.clearPaginate = function() { - return this.setPaginate(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.GetAllAssistantConversationRequest.prototype.hasPaginate = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * repeated Criteria criterias = 3; - * @return {!Array} - */ -proto.GetAllAssistantConversationRequest.prototype.getCriteriasList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.Criteria, 3)); -}; - - -/** - * @param {!Array} value - * @return {!proto.GetAllAssistantConversationRequest} returns this -*/ -proto.GetAllAssistantConversationRequest.prototype.setCriteriasList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 3, value); -}; - - -/** - * @param {!proto.Criteria=} opt_value - * @param {number=} opt_index - * @return {!proto.Criteria} - */ -proto.GetAllAssistantConversationRequest.prototype.addCriterias = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.Criteria, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.GetAllAssistantConversationRequest} returns this - */ -proto.GetAllAssistantConversationRequest.prototype.clearCriteriasList = function() { - return this.setCriteriasList([]); -}; - - -/** - * optional Source source = 7; - * @return {!proto.Source} - */ -proto.GetAllAssistantConversationRequest.prototype.getSource = function() { - return /** @type {!proto.Source} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); -}; - - -/** - * @param {!proto.Source} value - * @return {!proto.GetAllAssistantConversationRequest} returns this + * @return {!proto.AssistantConversationRecording} returns this */ -proto.GetAllAssistantConversationRequest.prototype.setSource = function(value) { - return jspb.Message.setProto3EnumField(this, 7, value); +proto.AssistantConversationRecording.prototype.setRecordingurl = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.GetAllAssistantConversationResponse.repeatedFields_ = [3]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -9294,8 +8052,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.GetAllAssistantConversationResponse.prototype.toObject = function(opt_includeInstance) { - return proto.GetAllAssistantConversationResponse.toObject(opt_includeInstance, this); +proto.AssistantConversationTelephonyEvent.prototype.toObject = function(opt_includeInstance) { + return proto.AssistantConversationTelephonyEvent.toObject(opt_includeInstance, this); }; @@ -9304,18 +8062,19 @@ proto.GetAllAssistantConversationResponse.prototype.toObject = function(opt_incl * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.GetAllAssistantConversationResponse} msg The msg instance to transform. + * @param {!proto.AssistantConversationTelephonyEvent} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.GetAllAssistantConversationResponse.toObject = function(includeInstance, msg) { +proto.AssistantConversationTelephonyEvent.toObject = function(includeInstance, msg) { var f, obj = { - code: jspb.Message.getFieldWithDefault(msg, 1, 0), - success: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), - dataList: jspb.Message.toObjectList(msg.getDataList(), - proto.AssistantConversation.toObject, includeInstance), - error: (f = msg.getError()) && proto.Error.toObject(includeInstance, f), - paginated: (f = msg.getPaginated()) && proto.Paginated.toObject(includeInstance, f) + id: jspb.Message.getFieldWithDefault(msg, 1, "0"), + assistantconversationid: jspb.Message.getFieldWithDefault(msg, 2, "0"), + provider: jspb.Message.getFieldWithDefault(msg, 3, ""), + eventtype: jspb.Message.getFieldWithDefault(msg, 4, ""), + payload: (f = msg.getPayload()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f), + createddate: (f = msg.getCreateddate()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + updateddate: (f = msg.getUpdateddate()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) }; if (includeInstance) { @@ -9329,23 +8088,23 @@ proto.GetAllAssistantConversationResponse.toObject = function(includeInstance, m /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.GetAllAssistantConversationResponse} + * @return {!proto.AssistantConversationTelephonyEvent} */ -proto.GetAllAssistantConversationResponse.deserializeBinary = function(bytes) { +proto.AssistantConversationTelephonyEvent.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.GetAllAssistantConversationResponse; - return proto.GetAllAssistantConversationResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.AssistantConversationTelephonyEvent; + return proto.AssistantConversationTelephonyEvent.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.GetAllAssistantConversationResponse} msg The message object to deserialize into. + * @param {!proto.AssistantConversationTelephonyEvent} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.GetAllAssistantConversationResponse} + * @return {!proto.AssistantConversationTelephonyEvent} */ -proto.GetAllAssistantConversationResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.AssistantConversationTelephonyEvent.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -9353,27 +8112,35 @@ proto.GetAllAssistantConversationResponse.deserializeBinaryFromReader = function var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readInt32()); - msg.setCode(value); + var value = /** @type {string} */ (reader.readUint64String()); + msg.setId(value); break; case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setSuccess(value); + var value = /** @type {string} */ (reader.readUint64String()); + msg.setAssistantconversationid(value); break; case 3: - var value = new proto.AssistantConversation; - reader.readMessage(value,proto.AssistantConversation.deserializeBinaryFromReader); - msg.addData(value); + var value = /** @type {string} */ (reader.readString()); + msg.setProvider(value); break; case 4: - var value = new proto.Error; - reader.readMessage(value,proto.Error.deserializeBinaryFromReader); - msg.setError(value); + var value = /** @type {string} */ (reader.readString()); + msg.setEventtype(value); break; case 5: - var value = new proto.Paginated; - reader.readMessage(value,proto.Paginated.deserializeBinaryFromReader); - msg.setPaginated(value); + var value = new google_protobuf_struct_pb.Struct; + reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader); + msg.setPayload(value); + break; + case 6: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setCreateddate(value); + break; + case 7: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setUpdateddate(value); break; default: reader.skipField(); @@ -9388,9 +8155,9 @@ proto.GetAllAssistantConversationResponse.deserializeBinaryFromReader = function * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.GetAllAssistantConversationResponse.prototype.serializeBinary = function() { +proto.AssistantConversationTelephonyEvent.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.GetAllAssistantConversationResponse.serializeBinaryToWriter(this, writer); + proto.AssistantConversationTelephonyEvent.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -9398,152 +8165,201 @@ proto.GetAllAssistantConversationResponse.prototype.serializeBinary = function() /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.GetAllAssistantConversationResponse} message + * @param {!proto.AssistantConversationTelephonyEvent} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.GetAllAssistantConversationResponse.serializeBinaryToWriter = function(message, writer) { +proto.AssistantConversationTelephonyEvent.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getCode(); - if (f !== 0) { - writer.writeInt32( + f = message.getId(); + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 1, f ); } - f = message.getSuccess(); - if (f) { - writer.writeBool( + f = message.getAssistantconversationid(); + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 2, f ); } - f = message.getDataList(); + f = message.getProvider(); if (f.length > 0) { - writer.writeRepeatedMessage( + writer.writeString( 3, - f, - proto.AssistantConversation.serializeBinaryToWriter + f ); } - f = message.getError(); + f = message.getEventtype(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getPayload(); if (f != null) { writer.writeMessage( - 4, + 5, f, - proto.Error.serializeBinaryToWriter + google_protobuf_struct_pb.Struct.serializeBinaryToWriter ); } - f = message.getPaginated(); + f = message.getCreateddate(); if (f != null) { writer.writeMessage( - 5, + 6, f, - proto.Paginated.serializeBinaryToWriter + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getUpdateddate(); + if (f != null) { + writer.writeMessage( + 7, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter ); } }; /** - * optional int32 code = 1; - * @return {number} + * optional uint64 id = 1; + * @return {string} */ -proto.GetAllAssistantConversationResponse.prototype.getCode = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.AssistantConversationTelephonyEvent.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); }; /** - * @param {number} value - * @return {!proto.GetAllAssistantConversationResponse} returns this + * @param {string} value + * @return {!proto.AssistantConversationTelephonyEvent} returns this */ -proto.GetAllAssistantConversationResponse.prototype.setCode = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); +proto.AssistantConversationTelephonyEvent.prototype.setId = function(value) { + return jspb.Message.setProto3StringIntField(this, 1, value); }; /** - * optional bool success = 2; - * @return {boolean} + * optional uint64 assistantConversationId = 2; + * @return {string} */ -proto.GetAllAssistantConversationResponse.prototype.getSuccess = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +proto.AssistantConversationTelephonyEvent.prototype.getAssistantconversationid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "0")); }; /** - * @param {boolean} value - * @return {!proto.GetAllAssistantConversationResponse} returns this + * @param {string} value + * @return {!proto.AssistantConversationTelephonyEvent} returns this */ -proto.GetAllAssistantConversationResponse.prototype.setSuccess = function(value) { - return jspb.Message.setProto3BooleanField(this, 2, value); +proto.AssistantConversationTelephonyEvent.prototype.setAssistantconversationid = function(value) { + return jspb.Message.setProto3StringIntField(this, 2, value); }; /** - * repeated AssistantConversation data = 3; - * @return {!Array} + * optional string provider = 3; + * @return {string} */ -proto.GetAllAssistantConversationResponse.prototype.getDataList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.AssistantConversation, 3)); +proto.AssistantConversationTelephonyEvent.prototype.getProvider = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** - * @param {!Array} value - * @return {!proto.GetAllAssistantConversationResponse} returns this + * @param {string} value + * @return {!proto.AssistantConversationTelephonyEvent} returns this + */ +proto.AssistantConversationTelephonyEvent.prototype.setProvider = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string eventType = 4; + * @return {string} + */ +proto.AssistantConversationTelephonyEvent.prototype.getEventtype = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.AssistantConversationTelephonyEvent} returns this + */ +proto.AssistantConversationTelephonyEvent.prototype.setEventtype = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional google.protobuf.Struct payload = 5; + * @return {?proto.google.protobuf.Struct} + */ +proto.AssistantConversationTelephonyEvent.prototype.getPayload = function() { + return /** @type{?proto.google.protobuf.Struct} */ ( + jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 5)); +}; + + +/** + * @param {?proto.google.protobuf.Struct|undefined} value + * @return {!proto.AssistantConversationTelephonyEvent} returns this */ -proto.GetAllAssistantConversationResponse.prototype.setDataList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 3, value); +proto.AssistantConversationTelephonyEvent.prototype.setPayload = function(value) { + return jspb.Message.setWrapperField(this, 5, value); }; /** - * @param {!proto.AssistantConversation=} opt_value - * @param {number=} opt_index - * @return {!proto.AssistantConversation} + * Clears the message field making it undefined. + * @return {!proto.AssistantConversationTelephonyEvent} returns this */ -proto.GetAllAssistantConversationResponse.prototype.addData = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.AssistantConversation, opt_index); +proto.AssistantConversationTelephonyEvent.prototype.clearPayload = function() { + return this.setPayload(undefined); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.GetAllAssistantConversationResponse} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.GetAllAssistantConversationResponse.prototype.clearDataList = function() { - return this.setDataList([]); +proto.AssistantConversationTelephonyEvent.prototype.hasPayload = function() { + return jspb.Message.getField(this, 5) != null; }; /** - * optional Error error = 4; - * @return {?proto.Error} + * optional google.protobuf.Timestamp createdDate = 6; + * @return {?proto.google.protobuf.Timestamp} */ -proto.GetAllAssistantConversationResponse.prototype.getError = function() { - return /** @type{?proto.Error} */ ( - jspb.Message.getWrapperField(this, proto.Error, 4)); +proto.AssistantConversationTelephonyEvent.prototype.getCreateddate = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 6)); }; /** - * @param {?proto.Error|undefined} value - * @return {!proto.GetAllAssistantConversationResponse} returns this + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.AssistantConversationTelephonyEvent} returns this */ -proto.GetAllAssistantConversationResponse.prototype.setError = function(value) { - return jspb.Message.setWrapperField(this, 4, value); +proto.AssistantConversationTelephonyEvent.prototype.setCreateddate = function(value) { + return jspb.Message.setWrapperField(this, 6, value); }; /** * Clears the message field making it undefined. - * @return {!proto.GetAllAssistantConversationResponse} returns this + * @return {!proto.AssistantConversationTelephonyEvent} returns this */ -proto.GetAllAssistantConversationResponse.prototype.clearError = function() { - return this.setError(undefined); +proto.AssistantConversationTelephonyEvent.prototype.clearCreateddate = function() { + return this.setCreateddate(undefined); }; @@ -9551,36 +8367,36 @@ proto.GetAllAssistantConversationResponse.prototype.clearError = function() { * Returns whether this field is set. * @return {boolean} */ -proto.GetAllAssistantConversationResponse.prototype.hasError = function() { - return jspb.Message.getField(this, 4) != null; +proto.AssistantConversationTelephonyEvent.prototype.hasCreateddate = function() { + return jspb.Message.getField(this, 6) != null; }; /** - * optional Paginated paginated = 5; - * @return {?proto.Paginated} + * optional google.protobuf.Timestamp updatedDate = 7; + * @return {?proto.google.protobuf.Timestamp} */ -proto.GetAllAssistantConversationResponse.prototype.getPaginated = function() { - return /** @type{?proto.Paginated} */ ( - jspb.Message.getWrapperField(this, proto.Paginated, 5)); +proto.AssistantConversationTelephonyEvent.prototype.getUpdateddate = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 7)); }; /** - * @param {?proto.Paginated|undefined} value - * @return {!proto.GetAllAssistantConversationResponse} returns this + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.AssistantConversationTelephonyEvent} returns this */ -proto.GetAllAssistantConversationResponse.prototype.setPaginated = function(value) { - return jspb.Message.setWrapperField(this, 5, value); +proto.AssistantConversationTelephonyEvent.prototype.setUpdateddate = function(value) { + return jspb.Message.setWrapperField(this, 7, value); }; /** * Clears the message field making it undefined. - * @return {!proto.GetAllAssistantConversationResponse} returns this + * @return {!proto.AssistantConversationTelephonyEvent} returns this */ -proto.GetAllAssistantConversationResponse.prototype.clearPaginated = function() { - return this.setPaginated(undefined); +proto.AssistantConversationTelephonyEvent.prototype.clearUpdateddate = function() { + return this.setUpdateddate(undefined); }; @@ -9588,8 +8404,8 @@ proto.GetAllAssistantConversationResponse.prototype.clearPaginated = function() * Returns whether this field is set. * @return {boolean} */ -proto.GetAllAssistantConversationResponse.prototype.hasPaginated = function() { - return jspb.Message.getField(this, 5) != null; +proto.AssistantConversationTelephonyEvent.prototype.hasUpdateddate = function() { + return jspb.Message.getField(this, 7) != null; }; @@ -9599,7 +8415,7 @@ proto.GetAllAssistantConversationResponse.prototype.hasPaginated = function() { * @private {!Array} * @const */ -proto.GetAllConversationMessageRequest.repeatedFields_ = [4]; +proto.AssistantConversation.repeatedFields_ = [13,28,30,32,31,33,35,36]; @@ -9616,8 +8432,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.GetAllConversationMessageRequest.prototype.toObject = function(opt_includeInstance) { - return proto.GetAllConversationMessageRequest.toObject(opt_includeInstance, this); +proto.AssistantConversation.prototype.toObject = function(opt_includeInstance) { + return proto.AssistantConversation.toObject(opt_includeInstance, this); }; @@ -9626,19 +8442,44 @@ proto.GetAllConversationMessageRequest.prototype.toObject = function(opt_include * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.GetAllConversationMessageRequest} msg The msg instance to transform. + * @param {!proto.AssistantConversation} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.GetAllConversationMessageRequest.toObject = function(includeInstance, msg) { +proto.AssistantConversation.toObject = function(includeInstance, msg) { var f, obj = { - assistantid: jspb.Message.getFieldWithDefault(msg, 1, "0"), - assistantconversationid: jspb.Message.getFieldWithDefault(msg, 2, "0"), - paginate: (f = msg.getPaginate()) && proto.Paginate.toObject(includeInstance, f), - criteriasList: jspb.Message.toObjectList(msg.getCriteriasList(), - proto.Criteria.toObject, includeInstance), - order: (f = msg.getOrder()) && proto.Ordering.toObject(includeInstance, f), - source: jspb.Message.getFieldWithDefault(msg, 7, 0) + id: jspb.Message.getFieldWithDefault(msg, 1, "0"), + userid: jspb.Message.getFieldWithDefault(msg, 2, "0"), + assistantid: jspb.Message.getFieldWithDefault(msg, 3, "0"), + name: jspb.Message.getFieldWithDefault(msg, 4, ""), + projectid: jspb.Message.getFieldWithDefault(msg, 5, "0"), + organizationid: jspb.Message.getFieldWithDefault(msg, 6, "0"), + source: jspb.Message.getFieldWithDefault(msg, 7, ""), + createdby: jspb.Message.getFieldWithDefault(msg, 8, "0"), + updatedby: jspb.Message.getFieldWithDefault(msg, 9, "0"), + user: (f = msg.getUser()) && proto.User.toObject(includeInstance, f), + assistantprovidermodelid: jspb.Message.getFieldWithDefault(msg, 12, "0"), + assistantconversationmessageList: jspb.Message.toObjectList(msg.getAssistantconversationmessageList(), + proto.AssistantConversationMessage.toObject, includeInstance), + identifier: jspb.Message.getFieldWithDefault(msg, 14, ""), + status: jspb.Message.getFieldWithDefault(msg, 15, ""), + createddate: (f = msg.getCreateddate()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + updateddate: (f = msg.getUpdateddate()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + contextsList: jspb.Message.toObjectList(msg.getContextsList(), + proto.AssistantConversationContext.toObject, includeInstance), + metricsList: jspb.Message.toObjectList(msg.getMetricsList(), + proto.Metric.toObject, includeInstance), + metadataList: jspb.Message.toObjectList(msg.getMetadataList(), + proto.Metadata.toObject, includeInstance), + argumentsList: jspb.Message.toObjectList(msg.getArgumentsList(), + proto.Argument.toObject, includeInstance), + optionsList: jspb.Message.toObjectList(msg.getOptionsList(), + proto.Metadata.toObject, includeInstance), + direction: jspb.Message.getFieldWithDefault(msg, 34, ""), + recordingsList: jspb.Message.toObjectList(msg.getRecordingsList(), + proto.AssistantConversationRecording.toObject, includeInstance), + telephonyeventsList: jspb.Message.toObjectList(msg.getTelephonyeventsList(), + proto.AssistantConversationTelephonyEvent.toObject, includeInstance) }; if (includeInstance) { @@ -9652,23 +8493,23 @@ proto.GetAllConversationMessageRequest.toObject = function(includeInstance, msg) /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.GetAllConversationMessageRequest} + * @return {!proto.AssistantConversation} */ -proto.GetAllConversationMessageRequest.deserializeBinary = function(bytes) { +proto.AssistantConversation.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.GetAllConversationMessageRequest; - return proto.GetAllConversationMessageRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.AssistantConversation; + return proto.AssistantConversation.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.GetAllConversationMessageRequest} msg The message object to deserialize into. + * @param {!proto.AssistantConversation} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.GetAllConversationMessageRequest} + * @return {!proto.AssistantConversation} */ -proto.GetAllConversationMessageRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.AssistantConversation.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -9677,32 +8518,112 @@ proto.GetAllConversationMessageRequest.deserializeBinaryFromReader = function(ms switch (field) { case 1: var value = /** @type {string} */ (reader.readUint64String()); - msg.setAssistantid(value); + msg.setId(value); break; case 2: var value = /** @type {string} */ (reader.readUint64String()); - msg.setAssistantconversationid(value); + msg.setUserid(value); break; case 3: - var value = new proto.Paginate; - reader.readMessage(value,proto.Paginate.deserializeBinaryFromReader); - msg.setPaginate(value); + var value = /** @type {string} */ (reader.readUint64String()); + msg.setAssistantid(value); break; case 4: - var value = new proto.Criteria; - reader.readMessage(value,proto.Criteria.deserializeBinaryFromReader); - msg.addCriterias(value); + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); break; case 5: - var value = new proto.Ordering; - reader.readMessage(value,proto.Ordering.deserializeBinaryFromReader); - msg.setOrder(value); + var value = /** @type {string} */ (reader.readUint64String()); + msg.setProjectid(value); + break; + case 6: + var value = /** @type {string} */ (reader.readUint64String()); + msg.setOrganizationid(value); break; case 7: - var value = /** @type {!proto.Source} */ (reader.readEnum()); + var value = /** @type {string} */ (reader.readString()); msg.setSource(value); break; - default: + case 8: + var value = /** @type {string} */ (reader.readUint64String()); + msg.setCreatedby(value); + break; + case 9: + var value = /** @type {string} */ (reader.readUint64String()); + msg.setUpdatedby(value); + break; + case 10: + var value = new proto.User; + reader.readMessage(value,proto.User.deserializeBinaryFromReader); + msg.setUser(value); + break; + case 12: + var value = /** @type {string} */ (reader.readUint64String()); + msg.setAssistantprovidermodelid(value); + break; + case 13: + var value = new proto.AssistantConversationMessage; + reader.readMessage(value,proto.AssistantConversationMessage.deserializeBinaryFromReader); + msg.addAssistantconversationmessage(value); + break; + case 14: + var value = /** @type {string} */ (reader.readString()); + msg.setIdentifier(value); + break; + case 15: + var value = /** @type {string} */ (reader.readString()); + msg.setStatus(value); + break; + case 26: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setCreateddate(value); + break; + case 27: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setUpdateddate(value); + break; + case 28: + var value = new proto.AssistantConversationContext; + reader.readMessage(value,proto.AssistantConversationContext.deserializeBinaryFromReader); + msg.addContexts(value); + break; + case 30: + var value = new proto.Metric; + reader.readMessage(value,proto.Metric.deserializeBinaryFromReader); + msg.addMetrics(value); + break; + case 32: + var value = new proto.Metadata; + reader.readMessage(value,proto.Metadata.deserializeBinaryFromReader); + msg.addMetadata(value); + break; + case 31: + var value = new proto.Argument; + reader.readMessage(value,proto.Argument.deserializeBinaryFromReader); + msg.addArguments(value); + break; + case 33: + var value = new proto.Metadata; + reader.readMessage(value,proto.Metadata.deserializeBinaryFromReader); + msg.addOptions(value); + break; + case 34: + var value = /** @type {string} */ (reader.readString()); + msg.setDirection(value); + break; + case 35: + var value = new proto.AssistantConversationRecording; + reader.readMessage(value,proto.AssistantConversationRecording.deserializeBinaryFromReader); + msg.addRecordings(value); + break; + case 36: + var value = new proto.AssistantConversationTelephonyEvent; + reader.readMessage(value,proto.AssistantConversationTelephonyEvent.deserializeBinaryFromReader); + msg.addTelephonyevents(value); + break; + default: reader.skipField(); break; } @@ -9715,9 +8636,9 @@ proto.GetAllConversationMessageRequest.deserializeBinaryFromReader = function(ms * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.GetAllConversationMessageRequest.prototype.serializeBinary = function() { +proto.AssistantConversation.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.GetAllConversationMessageRequest.serializeBinaryToWriter(this, writer); + proto.AssistantConversation.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -9725,1949 +8646,851 @@ proto.GetAllConversationMessageRequest.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.GetAllConversationMessageRequest} message + * @param {!proto.AssistantConversation} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.GetAllConversationMessageRequest.serializeBinaryToWriter = function(message, writer) { +proto.AssistantConversation.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getAssistantid(); + f = message.getId(); if (parseInt(f, 10) !== 0) { writer.writeUint64String( 1, f ); } - f = message.getAssistantconversationid(); + f = message.getUserid(); if (parseInt(f, 10) !== 0) { writer.writeUint64String( 2, f ); } - f = message.getPaginate(); + f = message.getAssistantid(); + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( + 3, + f + ); + } + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getProjectid(); + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( + 5, + f + ); + } + f = message.getOrganizationid(); + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( + 6, + f + ); + } + f = message.getSource(); + if (f.length > 0) { + writer.writeString( + 7, + f + ); + } + f = message.getCreatedby(); + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( + 8, + f + ); + } + f = message.getUpdatedby(); + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( + 9, + f + ); + } + f = message.getUser(); if (f != null) { writer.writeMessage( - 3, + 10, f, - proto.Paginate.serializeBinaryToWriter + proto.User.serializeBinaryToWriter ); } - f = message.getCriteriasList(); + f = message.getAssistantprovidermodelid(); + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( + 12, + f + ); + } + f = message.getAssistantconversationmessageList(); if (f.length > 0) { writer.writeRepeatedMessage( - 4, + 13, f, - proto.Criteria.serializeBinaryToWriter + proto.AssistantConversationMessage.serializeBinaryToWriter ); } - f = message.getOrder(); + f = message.getIdentifier(); + if (f.length > 0) { + writer.writeString( + 14, + f + ); + } + f = message.getStatus(); + if (f.length > 0) { + writer.writeString( + 15, + f + ); + } + f = message.getCreateddate(); if (f != null) { writer.writeMessage( - 5, + 26, f, - proto.Ordering.serializeBinaryToWriter + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter ); } - f = message.getSource(); - if (f !== 0.0) { - writer.writeEnum( - 7, + f = message.getUpdateddate(); + if (f != null) { + writer.writeMessage( + 27, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getContextsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 28, + f, + proto.AssistantConversationContext.serializeBinaryToWriter + ); + } + f = message.getMetricsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 30, + f, + proto.Metric.serializeBinaryToWriter + ); + } + f = message.getMetadataList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 32, + f, + proto.Metadata.serializeBinaryToWriter + ); + } + f = message.getArgumentsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 31, + f, + proto.Argument.serializeBinaryToWriter + ); + } + f = message.getOptionsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 33, + f, + proto.Metadata.serializeBinaryToWriter + ); + } + f = message.getDirection(); + if (f.length > 0) { + writer.writeString( + 34, f ); } + f = message.getRecordingsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 35, + f, + proto.AssistantConversationRecording.serializeBinaryToWriter + ); + } + f = message.getTelephonyeventsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 36, + f, + proto.AssistantConversationTelephonyEvent.serializeBinaryToWriter + ); + } }; /** - * optional uint64 assistantId = 1; + * optional uint64 id = 1; * @return {string} */ -proto.GetAllConversationMessageRequest.prototype.getAssistantid = function() { +proto.AssistantConversation.prototype.getId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); }; /** * @param {string} value - * @return {!proto.GetAllConversationMessageRequest} returns this + * @return {!proto.AssistantConversation} returns this */ -proto.GetAllConversationMessageRequest.prototype.setAssistantid = function(value) { +proto.AssistantConversation.prototype.setId = function(value) { return jspb.Message.setProto3StringIntField(this, 1, value); }; /** - * optional uint64 assistantConversationId = 2; + * optional uint64 userId = 2; * @return {string} */ -proto.GetAllConversationMessageRequest.prototype.getAssistantconversationid = function() { +proto.AssistantConversation.prototype.getUserid = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "0")); }; /** * @param {string} value - * @return {!proto.GetAllConversationMessageRequest} returns this + * @return {!proto.AssistantConversation} returns this */ -proto.GetAllConversationMessageRequest.prototype.setAssistantconversationid = function(value) { +proto.AssistantConversation.prototype.setUserid = function(value) { return jspb.Message.setProto3StringIntField(this, 2, value); }; /** - * optional Paginate paginate = 3; - * @return {?proto.Paginate} - */ -proto.GetAllConversationMessageRequest.prototype.getPaginate = function() { - return /** @type{?proto.Paginate} */ ( - jspb.Message.getWrapperField(this, proto.Paginate, 3)); -}; - - -/** - * @param {?proto.Paginate|undefined} value - * @return {!proto.GetAllConversationMessageRequest} returns this -*/ -proto.GetAllConversationMessageRequest.prototype.setPaginate = function(value) { - return jspb.Message.setWrapperField(this, 3, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.GetAllConversationMessageRequest} returns this - */ -proto.GetAllConversationMessageRequest.prototype.clearPaginate = function() { - return this.setPaginate(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.GetAllConversationMessageRequest.prototype.hasPaginate = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * repeated Criteria criterias = 4; - * @return {!Array} - */ -proto.GetAllConversationMessageRequest.prototype.getCriteriasList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.Criteria, 4)); -}; - - -/** - * @param {!Array} value - * @return {!proto.GetAllConversationMessageRequest} returns this -*/ -proto.GetAllConversationMessageRequest.prototype.setCriteriasList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 4, value); -}; - - -/** - * @param {!proto.Criteria=} opt_value - * @param {number=} opt_index - * @return {!proto.Criteria} - */ -proto.GetAllConversationMessageRequest.prototype.addCriterias = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.Criteria, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.GetAllConversationMessageRequest} returns this - */ -proto.GetAllConversationMessageRequest.prototype.clearCriteriasList = function() { - return this.setCriteriasList([]); -}; - - -/** - * optional Ordering order = 5; - * @return {?proto.Ordering} - */ -proto.GetAllConversationMessageRequest.prototype.getOrder = function() { - return /** @type{?proto.Ordering} */ ( - jspb.Message.getWrapperField(this, proto.Ordering, 5)); -}; - - -/** - * @param {?proto.Ordering|undefined} value - * @return {!proto.GetAllConversationMessageRequest} returns this -*/ -proto.GetAllConversationMessageRequest.prototype.setOrder = function(value) { - return jspb.Message.setWrapperField(this, 5, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.GetAllConversationMessageRequest} returns this - */ -proto.GetAllConversationMessageRequest.prototype.clearOrder = function() { - return this.setOrder(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.GetAllConversationMessageRequest.prototype.hasOrder = function() { - return jspb.Message.getField(this, 5) != null; -}; - - -/** - * optional Source source = 7; - * @return {!proto.Source} - */ -proto.GetAllConversationMessageRequest.prototype.getSource = function() { - return /** @type {!proto.Source} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); -}; - - -/** - * @param {!proto.Source} value - * @return {!proto.GetAllConversationMessageRequest} returns this - */ -proto.GetAllConversationMessageRequest.prototype.setSource = function(value) { - return jspb.Message.setProto3EnumField(this, 7, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.GetAllConversationMessageResponse.repeatedFields_ = [3]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.GetAllConversationMessageResponse.prototype.toObject = function(opt_includeInstance) { - return proto.GetAllConversationMessageResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.GetAllConversationMessageResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.GetAllConversationMessageResponse.toObject = function(includeInstance, msg) { - var f, obj = { - code: jspb.Message.getFieldWithDefault(msg, 1, 0), - success: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), - dataList: jspb.Message.toObjectList(msg.getDataList(), - proto.AssistantConversationMessage.toObject, includeInstance), - error: (f = msg.getError()) && proto.Error.toObject(includeInstance, f), - paginated: (f = msg.getPaginated()) && proto.Paginated.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.GetAllConversationMessageResponse} - */ -proto.GetAllConversationMessageResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.GetAllConversationMessageResponse; - return proto.GetAllConversationMessageResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.GetAllConversationMessageResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.GetAllConversationMessageResponse} + * optional uint64 assistantId = 3; + * @return {string} */ -proto.GetAllConversationMessageResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readInt32()); - msg.setCode(value); - break; - case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setSuccess(value); - break; - case 3: - var value = new proto.AssistantConversationMessage; - reader.readMessage(value,proto.AssistantConversationMessage.deserializeBinaryFromReader); - msg.addData(value); - break; - case 4: - var value = new proto.Error; - reader.readMessage(value,proto.Error.deserializeBinaryFromReader); - msg.setError(value); - break; - case 5: - var value = new proto.Paginated; - reader.readMessage(value,proto.Paginated.deserializeBinaryFromReader); - msg.setPaginated(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.GetAllConversationMessageResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.GetAllConversationMessageResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.GetAllConversationMessageResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.GetAllConversationMessageResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getCode(); - if (f !== 0) { - writer.writeInt32( - 1, - f - ); - } - f = message.getSuccess(); - if (f) { - writer.writeBool( - 2, - f - ); - } - f = message.getDataList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 3, - f, - proto.AssistantConversationMessage.serializeBinaryToWriter - ); - } - f = message.getError(); - if (f != null) { - writer.writeMessage( - 4, - f, - proto.Error.serializeBinaryToWriter - ); - } - f = message.getPaginated(); - if (f != null) { - writer.writeMessage( - 5, - f, - proto.Paginated.serializeBinaryToWriter - ); - } -}; - - -/** - * optional int32 code = 1; - * @return {number} - */ -proto.GetAllConversationMessageResponse.prototype.getCode = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.GetAllConversationMessageResponse} returns this - */ -proto.GetAllConversationMessageResponse.prototype.setCode = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional bool success = 2; - * @return {boolean} - */ -proto.GetAllConversationMessageResponse.prototype.getSuccess = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.GetAllConversationMessageResponse} returns this - */ -proto.GetAllConversationMessageResponse.prototype.setSuccess = function(value) { - return jspb.Message.setProto3BooleanField(this, 2, value); -}; - - -/** - * repeated AssistantConversationMessage data = 3; - * @return {!Array} - */ -proto.GetAllConversationMessageResponse.prototype.getDataList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.AssistantConversationMessage, 3)); -}; - - -/** - * @param {!Array} value - * @return {!proto.GetAllConversationMessageResponse} returns this -*/ -proto.GetAllConversationMessageResponse.prototype.setDataList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 3, value); -}; - - -/** - * @param {!proto.AssistantConversationMessage=} opt_value - * @param {number=} opt_index - * @return {!proto.AssistantConversationMessage} - */ -proto.GetAllConversationMessageResponse.prototype.addData = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.AssistantConversationMessage, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.GetAllConversationMessageResponse} returns this - */ -proto.GetAllConversationMessageResponse.prototype.clearDataList = function() { - return this.setDataList([]); -}; - - -/** - * optional Error error = 4; - * @return {?proto.Error} - */ -proto.GetAllConversationMessageResponse.prototype.getError = function() { - return /** @type{?proto.Error} */ ( - jspb.Message.getWrapperField(this, proto.Error, 4)); -}; - - -/** - * @param {?proto.Error|undefined} value - * @return {!proto.GetAllConversationMessageResponse} returns this -*/ -proto.GetAllConversationMessageResponse.prototype.setError = function(value) { - return jspb.Message.setWrapperField(this, 4, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.GetAllConversationMessageResponse} returns this - */ -proto.GetAllConversationMessageResponse.prototype.clearError = function() { - return this.setError(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.GetAllConversationMessageResponse.prototype.hasError = function() { - return jspb.Message.getField(this, 4) != null; -}; - - -/** - * optional Paginated paginated = 5; - * @return {?proto.Paginated} - */ -proto.GetAllConversationMessageResponse.prototype.getPaginated = function() { - return /** @type{?proto.Paginated} */ ( - jspb.Message.getWrapperField(this, proto.Paginated, 5)); -}; - - -/** - * @param {?proto.Paginated|undefined} value - * @return {!proto.GetAllConversationMessageResponse} returns this -*/ -proto.GetAllConversationMessageResponse.prototype.setPaginated = function(value) { - return jspb.Message.setWrapperField(this, 5, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.GetAllConversationMessageResponse} returns this - */ -proto.GetAllConversationMessageResponse.prototype.clearPaginated = function() { - return this.setPaginated(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.GetAllConversationMessageResponse.prototype.hasPaginated = function() { - return jspb.Message.getField(this, 5) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.AssistantConversationConfiguration.prototype.toObject = function(opt_includeInstance) { - return proto.AssistantConversationConfiguration.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.AssistantConversationConfiguration} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.AssistantConversationConfiguration.toObject = function(includeInstance, msg) { - var f, obj = { - assistantconversationid: jspb.Message.getFieldWithDefault(msg, 1, "0"), - assistant: (f = msg.getAssistant()) && proto.AssistantDefinition.toObject(includeInstance, f), - time: (f = msg.getTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - metadataMap: (f = msg.getMetadataMap()) ? f.toObject(includeInstance, proto.google.protobuf.Any.toObject) : [], - argsMap: (f = msg.getArgsMap()) ? f.toObject(includeInstance, proto.google.protobuf.Any.toObject) : [], - optionsMap: (f = msg.getOptionsMap()) ? f.toObject(includeInstance, proto.google.protobuf.Any.toObject) : [], - inputconfig: (f = msg.getInputconfig()) && proto.StreamConfig.toObject(includeInstance, f), - outputconfig: (f = msg.getOutputconfig()) && proto.StreamConfig.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.AssistantConversationConfiguration} - */ -proto.AssistantConversationConfiguration.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.AssistantConversationConfiguration; - return proto.AssistantConversationConfiguration.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.AssistantConversationConfiguration} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.AssistantConversationConfiguration} - */ -proto.AssistantConversationConfiguration.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readUint64String()); - msg.setAssistantconversationid(value); - break; - case 2: - var value = new proto.AssistantDefinition; - reader.readMessage(value,proto.AssistantDefinition.deserializeBinaryFromReader); - msg.setAssistant(value); - break; - case 3: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setTime(value); - break; - case 4: - var value = msg.getMetadataMap(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.google.protobuf.Any.deserializeBinaryFromReader, "", new proto.google.protobuf.Any()); - }); - break; - case 5: - var value = msg.getArgsMap(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.google.protobuf.Any.deserializeBinaryFromReader, "", new proto.google.protobuf.Any()); - }); - break; - case 6: - var value = msg.getOptionsMap(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.google.protobuf.Any.deserializeBinaryFromReader, "", new proto.google.protobuf.Any()); - }); - break; - case 7: - var value = new proto.StreamConfig; - reader.readMessage(value,proto.StreamConfig.deserializeBinaryFromReader); - msg.setInputconfig(value); - break; - case 8: - var value = new proto.StreamConfig; - reader.readMessage(value,proto.StreamConfig.deserializeBinaryFromReader); - msg.setOutputconfig(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.AssistantConversationConfiguration.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.AssistantConversationConfiguration.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.AssistantConversationConfiguration} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.AssistantConversationConfiguration.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAssistantconversationid(); - if (parseInt(f, 10) !== 0) { - writer.writeUint64String( - 1, - f - ); - } - f = message.getAssistant(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.AssistantDefinition.serializeBinaryToWriter - ); - } - f = message.getTime(); - if (f != null) { - writer.writeMessage( - 3, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - f = message.getMetadataMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(4, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.google.protobuf.Any.serializeBinaryToWriter); - } - f = message.getArgsMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(5, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.google.protobuf.Any.serializeBinaryToWriter); - } - f = message.getOptionsMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(6, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.google.protobuf.Any.serializeBinaryToWriter); - } - f = message.getInputconfig(); - if (f != null) { - writer.writeMessage( - 7, - f, - proto.StreamConfig.serializeBinaryToWriter - ); - } - f = message.getOutputconfig(); - if (f != null) { - writer.writeMessage( - 8, - f, - proto.StreamConfig.serializeBinaryToWriter - ); - } -}; - - -/** - * optional uint64 assistantConversationId = 1; - * @return {string} - */ -proto.AssistantConversationConfiguration.prototype.getAssistantconversationid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); -}; - - -/** - * @param {string} value - * @return {!proto.AssistantConversationConfiguration} returns this - */ -proto.AssistantConversationConfiguration.prototype.setAssistantconversationid = function(value) { - return jspb.Message.setProto3StringIntField(this, 1, value); -}; - - -/** - * optional AssistantDefinition assistant = 2; - * @return {?proto.AssistantDefinition} - */ -proto.AssistantConversationConfiguration.prototype.getAssistant = function() { - return /** @type{?proto.AssistantDefinition} */ ( - jspb.Message.getWrapperField(this, proto.AssistantDefinition, 2)); -}; - - -/** - * @param {?proto.AssistantDefinition|undefined} value - * @return {!proto.AssistantConversationConfiguration} returns this -*/ -proto.AssistantConversationConfiguration.prototype.setAssistant = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.AssistantConversationConfiguration} returns this - */ -proto.AssistantConversationConfiguration.prototype.clearAssistant = function() { - return this.setAssistant(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.AssistantConversationConfiguration.prototype.hasAssistant = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional google.protobuf.Timestamp time = 3; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.AssistantConversationConfiguration.prototype.getTime = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3)); -}; - - -/** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.AssistantConversationConfiguration} returns this -*/ -proto.AssistantConversationConfiguration.prototype.setTime = function(value) { - return jspb.Message.setWrapperField(this, 3, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.AssistantConversationConfiguration} returns this - */ -proto.AssistantConversationConfiguration.prototype.clearTime = function() { - return this.setTime(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.AssistantConversationConfiguration.prototype.hasTime = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * map metadata = 4; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} - */ -proto.AssistantConversationConfiguration.prototype.getMetadataMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 4, opt_noLazyCreate, - proto.google.protobuf.Any)); -}; - - -/** - * Clears values from the map. The map will be non-null. - * @return {!proto.AssistantConversationConfiguration} returns this - */ -proto.AssistantConversationConfiguration.prototype.clearMetadataMap = function() { - this.getMetadataMap().clear(); - return this;}; - - -/** - * map args = 5; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} - */ -proto.AssistantConversationConfiguration.prototype.getArgsMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 5, opt_noLazyCreate, - proto.google.protobuf.Any)); -}; - - -/** - * Clears values from the map. The map will be non-null. - * @return {!proto.AssistantConversationConfiguration} returns this - */ -proto.AssistantConversationConfiguration.prototype.clearArgsMap = function() { - this.getArgsMap().clear(); - return this;}; - - -/** - * map options = 6; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} - */ -proto.AssistantConversationConfiguration.prototype.getOptionsMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 6, opt_noLazyCreate, - proto.google.protobuf.Any)); -}; - - -/** - * Clears values from the map. The map will be non-null. - * @return {!proto.AssistantConversationConfiguration} returns this - */ -proto.AssistantConversationConfiguration.prototype.clearOptionsMap = function() { - this.getOptionsMap().clear(); - return this;}; - - -/** - * optional StreamConfig inputConfig = 7; - * @return {?proto.StreamConfig} - */ -proto.AssistantConversationConfiguration.prototype.getInputconfig = function() { - return /** @type{?proto.StreamConfig} */ ( - jspb.Message.getWrapperField(this, proto.StreamConfig, 7)); -}; - - -/** - * @param {?proto.StreamConfig|undefined} value - * @return {!proto.AssistantConversationConfiguration} returns this -*/ -proto.AssistantConversationConfiguration.prototype.setInputconfig = function(value) { - return jspb.Message.setWrapperField(this, 7, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.AssistantConversationConfiguration} returns this - */ -proto.AssistantConversationConfiguration.prototype.clearInputconfig = function() { - return this.setInputconfig(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.AssistantConversationConfiguration.prototype.hasInputconfig = function() { - return jspb.Message.getField(this, 7) != null; -}; - - -/** - * optional StreamConfig outputConfig = 8; - * @return {?proto.StreamConfig} - */ -proto.AssistantConversationConfiguration.prototype.getOutputconfig = function() { - return /** @type{?proto.StreamConfig} */ ( - jspb.Message.getWrapperField(this, proto.StreamConfig, 8)); -}; - - -/** - * @param {?proto.StreamConfig|undefined} value - * @return {!proto.AssistantConversationConfiguration} returns this -*/ -proto.AssistantConversationConfiguration.prototype.setOutputconfig = function(value) { - return jspb.Message.setWrapperField(this, 8, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.AssistantConversationConfiguration} returns this - */ -proto.AssistantConversationConfiguration.prototype.clearOutputconfig = function() { - return this.setOutputconfig(undefined); +proto.AssistantConversation.prototype.getAssistantid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "0")); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {string} value + * @return {!proto.AssistantConversation} returns this */ -proto.AssistantConversationConfiguration.prototype.hasOutputconfig = function() { - return jspb.Message.getField(this, 8) != null; +proto.AssistantConversation.prototype.setAssistantid = function(value) { + return jspb.Message.setProto3StringIntField(this, 3, value); }; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} + * optional string name = 4; + * @return {string} */ -proto.AssistantConversationError.prototype.toObject = function(opt_includeInstance) { - return proto.AssistantConversationError.toObject(opt_includeInstance, this); +proto.AssistantConversation.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); }; /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.AssistantConversationError} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages + * @param {string} value + * @return {!proto.AssistantConversation} returns this */ -proto.AssistantConversationError.toObject = function(includeInstance, msg) { - var f, obj = { - error: (f = msg.getError()) && proto.Error.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; +proto.AssistantConversation.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.AssistantConversationError} + * optional uint64 projectId = 5; + * @return {string} */ -proto.AssistantConversationError.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.AssistantConversationError; - return proto.AssistantConversationError.deserializeBinaryFromReader(msg, reader); +proto.AssistantConversation.prototype.getProjectid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "0")); }; /** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.AssistantConversationError} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.AssistantConversationError} + * @param {string} value + * @return {!proto.AssistantConversation} returns this */ -proto.AssistantConversationError.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.Error; - reader.readMessage(value,proto.Error.deserializeBinaryFromReader); - msg.setError(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; +proto.AssistantConversation.prototype.setProjectid = function(value) { + return jspb.Message.setProto3StringIntField(this, 5, value); }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * optional uint64 organizationId = 6; + * @return {string} */ -proto.AssistantConversationError.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.AssistantConversationError.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.AssistantConversation.prototype.getOrganizationid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "0")); }; /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.AssistantConversationError} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages + * @param {string} value + * @return {!proto.AssistantConversation} returns this */ -proto.AssistantConversationError.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getError(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.Error.serializeBinaryToWriter - ); - } +proto.AssistantConversation.prototype.setOrganizationid = function(value) { + return jspb.Message.setProto3StringIntField(this, 6, value); }; /** - * optional Error error = 1; - * @return {?proto.Error} + * optional string source = 7; + * @return {string} */ -proto.AssistantConversationError.prototype.getError = function() { - return /** @type{?proto.Error} */ ( - jspb.Message.getWrapperField(this, proto.Error, 1)); +proto.AssistantConversation.prototype.getSource = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); }; /** - * @param {?proto.Error|undefined} value - * @return {!proto.AssistantConversationError} returns this -*/ -proto.AssistantConversationError.prototype.setError = function(value) { - return jspb.Message.setWrapperField(this, 1, value); + * @param {string} value + * @return {!proto.AssistantConversation} returns this + */ +proto.AssistantConversation.prototype.setSource = function(value) { + return jspb.Message.setProto3StringField(this, 7, value); }; /** - * Clears the message field making it undefined. - * @return {!proto.AssistantConversationError} returns this + * optional uint64 createdBy = 8; + * @return {string} */ -proto.AssistantConversationError.prototype.clearError = function() { - return this.setError(undefined); +proto.AssistantConversation.prototype.getCreatedby = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "0")); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {string} value + * @return {!proto.AssistantConversation} returns this */ -proto.AssistantConversationError.prototype.hasError = function() { - return jspb.Message.getField(this, 1) != null; +proto.AssistantConversation.prototype.setCreatedby = function(value) { + return jspb.Message.setProto3StringIntField(this, 8, value); }; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} + * optional uint64 updatedBy = 9; + * @return {string} */ -proto.StreamConfig.prototype.toObject = function(opt_includeInstance) { - return proto.StreamConfig.toObject(opt_includeInstance, this); +proto.AssistantConversation.prototype.getUpdatedby = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "0")); }; /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.StreamConfig} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages + * @param {string} value + * @return {!proto.AssistantConversation} returns this */ -proto.StreamConfig.toObject = function(includeInstance, msg) { - var f, obj = { - audio: (f = msg.getAudio()) && proto.AudioConfig.toObject(includeInstance, f), - text: (f = msg.getText()) && proto.TextConfig.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; +proto.AssistantConversation.prototype.setUpdatedby = function(value) { + return jspb.Message.setProto3StringIntField(this, 9, value); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.StreamConfig} + * optional User user = 10; + * @return {?proto.User} */ -proto.StreamConfig.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.StreamConfig; - return proto.StreamConfig.deserializeBinaryFromReader(msg, reader); +proto.AssistantConversation.prototype.getUser = function() { + return /** @type{?proto.User} */ ( + jspb.Message.getWrapperField(this, proto.User, 10)); }; /** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.StreamConfig} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.StreamConfig} - */ -proto.StreamConfig.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.AudioConfig; - reader.readMessage(value,proto.AudioConfig.deserializeBinaryFromReader); - msg.setAudio(value); - break; - case 2: - var value = new proto.TextConfig; - reader.readMessage(value,proto.TextConfig.deserializeBinaryFromReader); - msg.setText(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; + * @param {?proto.User|undefined} value + * @return {!proto.AssistantConversation} returns this +*/ +proto.AssistantConversation.prototype.setUser = function(value) { + return jspb.Message.setWrapperField(this, 10, value); }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * Clears the message field making it undefined. + * @return {!proto.AssistantConversation} returns this */ -proto.StreamConfig.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.StreamConfig.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.AssistantConversation.prototype.clearUser = function() { + return this.setUser(undefined); }; /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.StreamConfig} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages + * Returns whether this field is set. + * @return {boolean} */ -proto.StreamConfig.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAudio(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.AudioConfig.serializeBinaryToWriter - ); - } - f = message.getText(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.TextConfig.serializeBinaryToWriter - ); - } +proto.AssistantConversation.prototype.hasUser = function() { + return jspb.Message.getField(this, 10) != null; }; /** - * optional AudioConfig audio = 1; - * @return {?proto.AudioConfig} + * optional uint64 assistantProviderModelId = 12; + * @return {string} */ -proto.StreamConfig.prototype.getAudio = function() { - return /** @type{?proto.AudioConfig} */ ( - jspb.Message.getWrapperField(this, proto.AudioConfig, 1)); +proto.AssistantConversation.prototype.getAssistantprovidermodelid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 12, "0")); }; /** - * @param {?proto.AudioConfig|undefined} value - * @return {!proto.StreamConfig} returns this -*/ -proto.StreamConfig.prototype.setAudio = function(value) { - return jspb.Message.setWrapperField(this, 1, value); + * @param {string} value + * @return {!proto.AssistantConversation} returns this + */ +proto.AssistantConversation.prototype.setAssistantprovidermodelid = function(value) { + return jspb.Message.setProto3StringIntField(this, 12, value); }; /** - * Clears the message field making it undefined. - * @return {!proto.StreamConfig} returns this + * repeated AssistantConversationMessage assistantConversationMessage = 13; + * @return {!Array} */ -proto.StreamConfig.prototype.clearAudio = function() { - return this.setAudio(undefined); +proto.AssistantConversation.prototype.getAssistantconversationmessageList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.AssistantConversationMessage, 13)); }; /** - * Returns whether this field is set. - * @return {boolean} - */ -proto.StreamConfig.prototype.hasAudio = function() { - return jspb.Message.getField(this, 1) != null; + * @param {!Array} value + * @return {!proto.AssistantConversation} returns this +*/ +proto.AssistantConversation.prototype.setAssistantconversationmessageList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 13, value); }; /** - * optional TextConfig text = 2; - * @return {?proto.TextConfig} + * @param {!proto.AssistantConversationMessage=} opt_value + * @param {number=} opt_index + * @return {!proto.AssistantConversationMessage} */ -proto.StreamConfig.prototype.getText = function() { - return /** @type{?proto.TextConfig} */ ( - jspb.Message.getWrapperField(this, proto.TextConfig, 2)); +proto.AssistantConversation.prototype.addAssistantconversationmessage = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 13, opt_value, proto.AssistantConversationMessage, opt_index); }; /** - * @param {?proto.TextConfig|undefined} value - * @return {!proto.StreamConfig} returns this -*/ -proto.StreamConfig.prototype.setText = function(value) { - return jspb.Message.setWrapperField(this, 2, value); + * Clears the list making it empty but non-null. + * @return {!proto.AssistantConversation} returns this + */ +proto.AssistantConversation.prototype.clearAssistantconversationmessageList = function() { + return this.setAssistantconversationmessageList([]); }; /** - * Clears the message field making it undefined. - * @return {!proto.StreamConfig} returns this + * optional string identifier = 14; + * @return {string} */ -proto.StreamConfig.prototype.clearText = function() { - return this.setText(undefined); +proto.AssistantConversation.prototype.getIdentifier = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 14, "")); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {string} value + * @return {!proto.AssistantConversation} returns this */ -proto.StreamConfig.prototype.hasText = function() { - return jspb.Message.getField(this, 2) != null; +proto.AssistantConversation.prototype.setIdentifier = function(value) { + return jspb.Message.setProto3StringField(this, 14, value); }; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} + * optional string status = 15; + * @return {string} */ -proto.AudioConfig.prototype.toObject = function(opt_includeInstance) { - return proto.AudioConfig.toObject(opt_includeInstance, this); +proto.AssistantConversation.prototype.getStatus = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 15, "")); }; /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.AudioConfig} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages + * @param {string} value + * @return {!proto.AssistantConversation} returns this */ -proto.AudioConfig.toObject = function(includeInstance, msg) { - var f, obj = { - samplerate: jspb.Message.getFieldWithDefault(msg, 1, 0), - audioformat: jspb.Message.getFieldWithDefault(msg, 2, 0), - channels: jspb.Message.getFieldWithDefault(msg, 3, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; +proto.AssistantConversation.prototype.setStatus = function(value) { + return jspb.Message.setProto3StringField(this, 15, value); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.AudioConfig} + * optional google.protobuf.Timestamp createdDate = 26; + * @return {?proto.google.protobuf.Timestamp} */ -proto.AudioConfig.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.AudioConfig; - return proto.AudioConfig.deserializeBinaryFromReader(msg, reader); +proto.AssistantConversation.prototype.getCreateddate = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 26)); }; /** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.AudioConfig} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.AudioConfig} - */ -proto.AudioConfig.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint32()); - msg.setSamplerate(value); - break; - case 2: - var value = /** @type {!proto.AudioConfig.AudioFormat} */ (reader.readEnum()); - msg.setAudioformat(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint32()); - msg.setChannels(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.AssistantConversation} returns this +*/ +proto.AssistantConversation.prototype.setCreateddate = function(value) { + return jspb.Message.setWrapperField(this, 26, value); }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * Clears the message field making it undefined. + * @return {!proto.AssistantConversation} returns this */ -proto.AudioConfig.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.AudioConfig.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.AssistantConversation.prototype.clearCreateddate = function() { + return this.setCreateddate(undefined); }; /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.AudioConfig} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages + * Returns whether this field is set. + * @return {boolean} */ -proto.AudioConfig.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getSamplerate(); - if (f !== 0) { - writer.writeUint32( - 1, - f - ); - } - f = message.getAudioformat(); - if (f !== 0.0) { - writer.writeEnum( - 2, - f - ); - } - f = message.getChannels(); - if (f !== 0) { - writer.writeUint32( - 3, - f - ); - } +proto.AssistantConversation.prototype.hasCreateddate = function() { + return jspb.Message.getField(this, 26) != null; }; /** - * @enum {number} + * optional google.protobuf.Timestamp updatedDate = 27; + * @return {?proto.google.protobuf.Timestamp} */ -proto.AudioConfig.AudioFormat = { - LINEAR16: 0, - MULAW8: 1 +proto.AssistantConversation.prototype.getUpdateddate = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 27)); }; + /** - * optional uint32 sampleRate = 1; - * @return {number} - */ -proto.AudioConfig.prototype.getSamplerate = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.AssistantConversation} returns this +*/ +proto.AssistantConversation.prototype.setUpdateddate = function(value) { + return jspb.Message.setWrapperField(this, 27, value); }; /** - * @param {number} value - * @return {!proto.AudioConfig} returns this + * Clears the message field making it undefined. + * @return {!proto.AssistantConversation} returns this */ -proto.AudioConfig.prototype.setSamplerate = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); +proto.AssistantConversation.prototype.clearUpdateddate = function() { + return this.setUpdateddate(undefined); }; /** - * optional AudioFormat audioFormat = 2; - * @return {!proto.AudioConfig.AudioFormat} + * Returns whether this field is set. + * @return {boolean} */ -proto.AudioConfig.prototype.getAudioformat = function() { - return /** @type {!proto.AudioConfig.AudioFormat} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.AssistantConversation.prototype.hasUpdateddate = function() { + return jspb.Message.getField(this, 27) != null; }; /** - * @param {!proto.AudioConfig.AudioFormat} value - * @return {!proto.AudioConfig} returns this + * repeated AssistantConversationContext contexts = 28; + * @return {!Array} */ -proto.AudioConfig.prototype.setAudioformat = function(value) { - return jspb.Message.setProto3EnumField(this, 2, value); +proto.AssistantConversation.prototype.getContextsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.AssistantConversationContext, 28)); }; /** - * optional uint32 channels = 3; - * @return {number} - */ -proto.AudioConfig.prototype.getChannels = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); + * @param {!Array} value + * @return {!proto.AssistantConversation} returns this +*/ +proto.AssistantConversation.prototype.setContextsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 28, value); }; /** - * @param {number} value - * @return {!proto.AudioConfig} returns this + * @param {!proto.AssistantConversationContext=} opt_value + * @param {number=} opt_index + * @return {!proto.AssistantConversationContext} */ -proto.AudioConfig.prototype.setChannels = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); +proto.AssistantConversation.prototype.addContexts = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 28, opt_value, proto.AssistantConversationContext, opt_index); }; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} + * Clears the list making it empty but non-null. + * @return {!proto.AssistantConversation} returns this */ -proto.TextConfig.prototype.toObject = function(opt_includeInstance) { - return proto.TextConfig.toObject(opt_includeInstance, this); +proto.AssistantConversation.prototype.clearContextsList = function() { + return this.setContextsList([]); }; /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.TextConfig} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages + * repeated Metric metrics = 30; + * @return {!Array} */ -proto.TextConfig.toObject = function(includeInstance, msg) { - var f, obj = { - charset: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; +proto.AssistantConversation.prototype.getMetricsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.Metric, 30)); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.TextConfig} - */ -proto.TextConfig.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.TextConfig; - return proto.TextConfig.deserializeBinaryFromReader(msg, reader); + * @param {!Array} value + * @return {!proto.AssistantConversation} returns this +*/ +proto.AssistantConversation.prototype.setMetricsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 30, value); }; /** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.TextConfig} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.TextConfig} + * @param {!proto.Metric=} opt_value + * @param {number=} opt_index + * @return {!proto.Metric} */ -proto.TextConfig.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setCharset(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; +proto.AssistantConversation.prototype.addMetrics = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 30, opt_value, proto.Metric, opt_index); }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * Clears the list making it empty but non-null. + * @return {!proto.AssistantConversation} returns this */ -proto.TextConfig.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.TextConfig.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.AssistantConversation.prototype.clearMetricsList = function() { + return this.setMetricsList([]); }; /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.TextConfig} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.TextConfig.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getCharset(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } + * repeated Metadata metadata = 32; + * @return {!Array} + */ +proto.AssistantConversation.prototype.getMetadataList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.Metadata, 32)); }; /** - * optional string charset = 1; - * @return {string} - */ -proto.TextConfig.prototype.getCharset = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); + * @param {!Array} value + * @return {!proto.AssistantConversation} returns this +*/ +proto.AssistantConversation.prototype.setMetadataList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 32, value); }; /** - * @param {string} value - * @return {!proto.TextConfig} returns this + * @param {!proto.Metadata=} opt_value + * @param {number=} opt_index + * @return {!proto.Metadata} */ -proto.TextConfig.prototype.setCharset = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); +proto.AssistantConversation.prototype.addMetadata = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 32, opt_value, proto.Metadata, opt_index); }; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} + * Clears the list making it empty but non-null. + * @return {!proto.AssistantConversation} returns this */ -proto.AssistantConversationAction.prototype.toObject = function(opt_includeInstance) { - return proto.AssistantConversationAction.toObject(opt_includeInstance, this); +proto.AssistantConversation.prototype.clearMetadataList = function() { + return this.setMetadataList([]); }; /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.AssistantConversationAction} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages + * repeated Argument arguments = 31; + * @return {!Array} */ -proto.AssistantConversationAction.toObject = function(includeInstance, msg) { - var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, ""), - name: jspb.Message.getFieldWithDefault(msg, 2, ""), - action: jspb.Message.getFieldWithDefault(msg, 3, 0), - argsMap: (f = msg.getArgsMap()) ? f.toObject(includeInstance, proto.google.protobuf.Any.toObject) : [], - time: (f = msg.getTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; +proto.AssistantConversation.prototype.getArgumentsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.Argument, 31)); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.AssistantConversationAction} - */ -proto.AssistantConversationAction.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.AssistantConversationAction; - return proto.AssistantConversationAction.deserializeBinaryFromReader(msg, reader); + * @param {!Array} value + * @return {!proto.AssistantConversation} returns this +*/ +proto.AssistantConversation.prototype.setArgumentsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 31, value); }; /** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.AssistantConversationAction} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.AssistantConversationAction} + * @param {!proto.Argument=} opt_value + * @param {number=} opt_index + * @return {!proto.Argument} */ -proto.AssistantConversationAction.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setId(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setName(value); - break; - case 3: - var value = /** @type {!proto.AssistantConversationAction.ActionType} */ (reader.readEnum()); - msg.setAction(value); - break; - case 4: - var value = msg.getArgsMap(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.google.protobuf.Any.deserializeBinaryFromReader, "", new proto.google.protobuf.Any()); - }); - break; - case 5: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setTime(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; +proto.AssistantConversation.prototype.addArguments = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 31, opt_value, proto.Argument, opt_index); }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * Clears the list making it empty but non-null. + * @return {!proto.AssistantConversation} returns this */ -proto.AssistantConversationAction.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.AssistantConversationAction.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.AssistantConversation.prototype.clearArgumentsList = function() { + return this.setArgumentsList([]); }; /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.AssistantConversationAction} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages + * repeated Metadata options = 33; + * @return {!Array} */ -proto.AssistantConversationAction.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getName(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getAction(); - if (f !== 0.0) { - writer.writeEnum( - 3, - f - ); - } - f = message.getArgsMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(4, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.google.protobuf.Any.serializeBinaryToWriter); - } - f = message.getTime(); - if (f != null) { - writer.writeMessage( - 5, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } +proto.AssistantConversation.prototype.getOptionsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.Metadata, 33)); }; /** - * @enum {number} - */ -proto.AssistantConversationAction.ActionType = { - ACTION_UNSPECIFIED: 0, - KNOWLEDGE_RETRIEVAL: 1, - API_REQUEST: 2, - ENDPOINT_REQUEST: 3, - END_CONVERSATION: 5, - TRANSFER_CONVERSATION: 6 + * @param {!Array} value + * @return {!proto.AssistantConversation} returns this +*/ +proto.AssistantConversation.prototype.setOptionsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 33, value); }; + /** - * optional string id = 1; - * @return {string} + * @param {!proto.Metadata=} opt_value + * @param {number=} opt_index + * @return {!proto.Metadata} */ -proto.AssistantConversationAction.prototype.getId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.AssistantConversation.prototype.addOptions = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 33, opt_value, proto.Metadata, opt_index); }; /** - * @param {string} value - * @return {!proto.AssistantConversationAction} returns this + * Clears the list making it empty but non-null. + * @return {!proto.AssistantConversation} returns this */ -proto.AssistantConversationAction.prototype.setId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); +proto.AssistantConversation.prototype.clearOptionsList = function() { + return this.setOptionsList([]); }; /** - * optional string name = 2; + * optional string direction = 34; * @return {string} */ -proto.AssistantConversationAction.prototype.getName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.AssistantConversation.prototype.getDirection = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 34, "")); }; /** * @param {string} value - * @return {!proto.AssistantConversationAction} returns this + * @return {!proto.AssistantConversation} returns this */ -proto.AssistantConversationAction.prototype.setName = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); +proto.AssistantConversation.prototype.setDirection = function(value) { + return jspb.Message.setProto3StringField(this, 34, value); }; /** - * optional ActionType action = 3; - * @return {!proto.AssistantConversationAction.ActionType} + * repeated AssistantConversationRecording recordings = 35; + * @return {!Array} */ -proto.AssistantConversationAction.prototype.getAction = function() { - return /** @type {!proto.AssistantConversationAction.ActionType} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +proto.AssistantConversation.prototype.getRecordingsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.AssistantConversationRecording, 35)); }; /** - * @param {!proto.AssistantConversationAction.ActionType} value - * @return {!proto.AssistantConversationAction} returns this - */ -proto.AssistantConversationAction.prototype.setAction = function(value) { - return jspb.Message.setProto3EnumField(this, 3, value); + * @param {!Array} value + * @return {!proto.AssistantConversation} returns this +*/ +proto.AssistantConversation.prototype.setRecordingsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 35, value); }; /** - * map args = 4; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} + * @param {!proto.AssistantConversationRecording=} opt_value + * @param {number=} opt_index + * @return {!proto.AssistantConversationRecording} */ -proto.AssistantConversationAction.prototype.getArgsMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 4, opt_noLazyCreate, - proto.google.protobuf.Any)); +proto.AssistantConversation.prototype.addRecordings = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 35, opt_value, proto.AssistantConversationRecording, opt_index); }; /** - * Clears values from the map. The map will be non-null. - * @return {!proto.AssistantConversationAction} returns this + * Clears the list making it empty but non-null. + * @return {!proto.AssistantConversation} returns this */ -proto.AssistantConversationAction.prototype.clearArgsMap = function() { - this.getArgsMap().clear(); - return this;}; +proto.AssistantConversation.prototype.clearRecordingsList = function() { + return this.setRecordingsList([]); +}; /** - * optional google.protobuf.Timestamp time = 5; - * @return {?proto.google.protobuf.Timestamp} + * repeated AssistantConversationTelephonyEvent telephonyEvents = 36; + * @return {!Array} */ -proto.AssistantConversationAction.prototype.getTime = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 5)); +proto.AssistantConversation.prototype.getTelephonyeventsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.AssistantConversationTelephonyEvent, 36)); }; /** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.AssistantConversationAction} returns this + * @param {!Array} value + * @return {!proto.AssistantConversation} returns this */ -proto.AssistantConversationAction.prototype.setTime = function(value) { - return jspb.Message.setWrapperField(this, 5, value); +proto.AssistantConversation.prototype.setTelephonyeventsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 36, value); }; /** - * Clears the message field making it undefined. - * @return {!proto.AssistantConversationAction} returns this + * @param {!proto.AssistantConversationTelephonyEvent=} opt_value + * @param {number=} opt_index + * @return {!proto.AssistantConversationTelephonyEvent} */ -proto.AssistantConversationAction.prototype.clearTime = function() { - return this.setTime(undefined); +proto.AssistantConversation.prototype.addTelephonyevents = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 36, opt_value, proto.AssistantConversationTelephonyEvent, opt_index); }; /** - * Returns whether this field is set. - * @return {boolean} + * Clears the list making it empty but non-null. + * @return {!proto.AssistantConversation} returns this */ -proto.AssistantConversationAction.prototype.hasTime = function() { - return jspb.Message.getField(this, 5) != null; +proto.AssistantConversation.prototype.clearTelephonyeventsList = function() { + return this.setTelephonyeventsList([]); }; +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.GetAllAssistantConversationRequest.repeatedFields_ = [3]; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -11683,8 +9506,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.AssistantConversationInterruption.prototype.toObject = function(opt_includeInstance) { - return proto.AssistantConversationInterruption.toObject(opt_includeInstance, this); +proto.GetAllAssistantConversationRequest.prototype.toObject = function(opt_includeInstance) { + return proto.GetAllAssistantConversationRequest.toObject(opt_includeInstance, this); }; @@ -11693,15 +9516,17 @@ proto.AssistantConversationInterruption.prototype.toObject = function(opt_includ * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.AssistantConversationInterruption} msg The msg instance to transform. + * @param {!proto.GetAllAssistantConversationRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.AssistantConversationInterruption.toObject = function(includeInstance, msg) { +proto.GetAllAssistantConversationRequest.toObject = function(includeInstance, msg) { var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, ""), - type: jspb.Message.getFieldWithDefault(msg, 2, 0), - time: (f = msg.getTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) + assistantid: jspb.Message.getFieldWithDefault(msg, 1, "0"), + paginate: (f = msg.getPaginate()) && proto.Paginate.toObject(includeInstance, f), + criteriasList: jspb.Message.toObjectList(msg.getCriteriasList(), + proto.Criteria.toObject, includeInstance), + source: jspb.Message.getFieldWithDefault(msg, 7, 0) }; if (includeInstance) { @@ -11715,23 +9540,23 @@ proto.AssistantConversationInterruption.toObject = function(includeInstance, msg /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.AssistantConversationInterruption} + * @return {!proto.GetAllAssistantConversationRequest} */ -proto.AssistantConversationInterruption.deserializeBinary = function(bytes) { +proto.GetAllAssistantConversationRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.AssistantConversationInterruption; - return proto.AssistantConversationInterruption.deserializeBinaryFromReader(msg, reader); + var msg = new proto.GetAllAssistantConversationRequest; + return proto.GetAllAssistantConversationRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.AssistantConversationInterruption} msg The message object to deserialize into. + * @param {!proto.GetAllAssistantConversationRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.AssistantConversationInterruption} + * @return {!proto.GetAllAssistantConversationRequest} */ -proto.AssistantConversationInterruption.deserializeBinaryFromReader = function(msg, reader) { +proto.GetAllAssistantConversationRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -11739,17 +9564,22 @@ proto.AssistantConversationInterruption.deserializeBinaryFromReader = function(m var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setId(value); + var value = /** @type {string} */ (reader.readUint64String()); + msg.setAssistantid(value); break; case 2: - var value = /** @type {!proto.AssistantConversationInterruption.InterruptionType} */ (reader.readEnum()); - msg.setType(value); + var value = new proto.Paginate; + reader.readMessage(value,proto.Paginate.deserializeBinaryFromReader); + msg.setPaginate(value); break; case 3: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setTime(value); + var value = new proto.Criteria; + reader.readMessage(value,proto.Criteria.deserializeBinaryFromReader); + msg.addCriterias(value); + break; + case 7: + var value = /** @type {!proto.Source} */ (reader.readEnum()); + msg.setSource(value); break; default: reader.skipField(); @@ -11764,9 +9594,9 @@ proto.AssistantConversationInterruption.deserializeBinaryFromReader = function(m * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.AssistantConversationInterruption.prototype.serializeBinary = function() { +proto.GetAllAssistantConversationRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.AssistantConversationInterruption.serializeBinaryToWriter(this, writer); + proto.GetAllAssistantConversationRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -11774,120 +9604,164 @@ proto.AssistantConversationInterruption.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.AssistantConversationInterruption} message + * @param {!proto.GetAllAssistantConversationRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.AssistantConversationInterruption.serializeBinaryToWriter = function(message, writer) { +proto.GetAllAssistantConversationRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getId(); - if (f.length > 0) { - writer.writeString( + f = message.getAssistantid(); + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 1, f ); } - f = message.getType(); - if (f !== 0.0) { - writer.writeEnum( + f = message.getPaginate(); + if (f != null) { + writer.writeMessage( 2, - f + f, + proto.Paginate.serializeBinaryToWriter ); } - f = message.getTime(); - if (f != null) { - writer.writeMessage( + f = message.getCriteriasList(); + if (f.length > 0) { + writer.writeRepeatedMessage( 3, f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + proto.Criteria.serializeBinaryToWriter + ); + } + f = message.getSource(); + if (f !== 0.0) { + writer.writeEnum( + 7, + f ); } }; /** - * @enum {number} + * optional uint64 assistantId = 1; + * @return {string} */ -proto.AssistantConversationInterruption.InterruptionType = { - INTERRUPTION_TYPE_UNSPECIFIED: 0, - INTERRUPTION_TYPE_VAD: 1, - INTERRUPTION_TYPE_WORD: 2 +proto.GetAllAssistantConversationRequest.prototype.getAssistantid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); }; + /** - * optional string id = 1; - * @return {string} + * @param {string} value + * @return {!proto.GetAllAssistantConversationRequest} returns this */ -proto.AssistantConversationInterruption.prototype.getId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.GetAllAssistantConversationRequest.prototype.setAssistantid = function(value) { + return jspb.Message.setProto3StringIntField(this, 1, value); }; /** - * @param {string} value - * @return {!proto.AssistantConversationInterruption} returns this + * optional Paginate paginate = 2; + * @return {?proto.Paginate} */ -proto.AssistantConversationInterruption.prototype.setId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); +proto.GetAllAssistantConversationRequest.prototype.getPaginate = function() { + return /** @type{?proto.Paginate} */ ( + jspb.Message.getWrapperField(this, proto.Paginate, 2)); +}; + + +/** + * @param {?proto.Paginate|undefined} value + * @return {!proto.GetAllAssistantConversationRequest} returns this +*/ +proto.GetAllAssistantConversationRequest.prototype.setPaginate = function(value) { + return jspb.Message.setWrapperField(this, 2, value); }; /** - * optional InterruptionType type = 2; - * @return {!proto.AssistantConversationInterruption.InterruptionType} + * Clears the message field making it undefined. + * @return {!proto.GetAllAssistantConversationRequest} returns this */ -proto.AssistantConversationInterruption.prototype.getType = function() { - return /** @type {!proto.AssistantConversationInterruption.InterruptionType} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.GetAllAssistantConversationRequest.prototype.clearPaginate = function() { + return this.setPaginate(undefined); }; /** - * @param {!proto.AssistantConversationInterruption.InterruptionType} value - * @return {!proto.AssistantConversationInterruption} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.AssistantConversationInterruption.prototype.setType = function(value) { - return jspb.Message.setProto3EnumField(this, 2, value); +proto.GetAllAssistantConversationRequest.prototype.hasPaginate = function() { + return jspb.Message.getField(this, 2) != null; }; /** - * optional google.protobuf.Timestamp time = 3; - * @return {?proto.google.protobuf.Timestamp} + * repeated Criteria criterias = 3; + * @return {!Array} */ -proto.AssistantConversationInterruption.prototype.getTime = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3)); +proto.GetAllAssistantConversationRequest.prototype.getCriteriasList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.Criteria, 3)); }; /** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.AssistantConversationInterruption} returns this + * @param {!Array} value + * @return {!proto.GetAllAssistantConversationRequest} returns this */ -proto.AssistantConversationInterruption.prototype.setTime = function(value) { - return jspb.Message.setWrapperField(this, 3, value); +proto.GetAllAssistantConversationRequest.prototype.setCriteriasList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); }; /** - * Clears the message field making it undefined. - * @return {!proto.AssistantConversationInterruption} returns this + * @param {!proto.Criteria=} opt_value + * @param {number=} opt_index + * @return {!proto.Criteria} */ -proto.AssistantConversationInterruption.prototype.clearTime = function() { - return this.setTime(undefined); +proto.GetAllAssistantConversationRequest.prototype.addCriterias = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.Criteria, opt_index); }; /** - * Returns whether this field is set. - * @return {boolean} + * Clears the list making it empty but non-null. + * @return {!proto.GetAllAssistantConversationRequest} returns this */ -proto.AssistantConversationInterruption.prototype.hasTime = function() { - return jspb.Message.getField(this, 3) != null; +proto.GetAllAssistantConversationRequest.prototype.clearCriteriasList = function() { + return this.setCriteriasList([]); +}; + + +/** + * optional Source source = 7; + * @return {!proto.Source} + */ +proto.GetAllAssistantConversationRequest.prototype.getSource = function() { + return /** @type {!proto.Source} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** + * @param {!proto.Source} value + * @return {!proto.GetAllAssistantConversationRequest} returns this + */ +proto.GetAllAssistantConversationRequest.prototype.setSource = function(value) { + return jspb.Message.setProto3EnumField(this, 7, value); }; +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.GetAllAssistantConversationResponse.repeatedFields_ = [3]; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -11903,8 +9777,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.AssistantConversationMessageTextContent.prototype.toObject = function(opt_includeInstance) { - return proto.AssistantConversationMessageTextContent.toObject(opt_includeInstance, this); +proto.GetAllAssistantConversationResponse.prototype.toObject = function(opt_includeInstance) { + return proto.GetAllAssistantConversationResponse.toObject(opt_includeInstance, this); }; @@ -11913,13 +9787,18 @@ proto.AssistantConversationMessageTextContent.prototype.toObject = function(opt_ * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.AssistantConversationMessageTextContent} msg The msg instance to transform. + * @param {!proto.GetAllAssistantConversationResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.AssistantConversationMessageTextContent.toObject = function(includeInstance, msg) { +proto.GetAllAssistantConversationResponse.toObject = function(includeInstance, msg) { var f, obj = { - content: jspb.Message.getFieldWithDefault(msg, 1, "") + code: jspb.Message.getFieldWithDefault(msg, 1, 0), + success: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), + dataList: jspb.Message.toObjectList(msg.getDataList(), + proto.AssistantConversation.toObject, includeInstance), + error: (f = msg.getError()) && proto.Error.toObject(includeInstance, f), + paginated: (f = msg.getPaginated()) && proto.Paginated.toObject(includeInstance, f) }; if (includeInstance) { @@ -11933,23 +9812,23 @@ proto.AssistantConversationMessageTextContent.toObject = function(includeInstanc /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.AssistantConversationMessageTextContent} + * @return {!proto.GetAllAssistantConversationResponse} */ -proto.AssistantConversationMessageTextContent.deserializeBinary = function(bytes) { +proto.GetAllAssistantConversationResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.AssistantConversationMessageTextContent; - return proto.AssistantConversationMessageTextContent.deserializeBinaryFromReader(msg, reader); + var msg = new proto.GetAllAssistantConversationResponse; + return proto.GetAllAssistantConversationResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.AssistantConversationMessageTextContent} msg The message object to deserialize into. + * @param {!proto.GetAllAssistantConversationResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.AssistantConversationMessageTextContent} + * @return {!proto.GetAllAssistantConversationResponse} */ -proto.AssistantConversationMessageTextContent.deserializeBinaryFromReader = function(msg, reader) { +proto.GetAllAssistantConversationResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -11957,8 +9836,27 @@ proto.AssistantConversationMessageTextContent.deserializeBinaryFromReader = func var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setContent(value); + var value = /** @type {number} */ (reader.readInt32()); + msg.setCode(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setSuccess(value); + break; + case 3: + var value = new proto.AssistantConversation; + reader.readMessage(value,proto.AssistantConversation.deserializeBinaryFromReader); + msg.addData(value); + break; + case 4: + var value = new proto.Error; + reader.readMessage(value,proto.Error.deserializeBinaryFromReader); + msg.setError(value); + break; + case 5: + var value = new proto.Paginated; + reader.readMessage(value,proto.Paginated.deserializeBinaryFromReader); + msg.setPaginated(value); break; default: reader.skipField(); @@ -11973,9 +9871,9 @@ proto.AssistantConversationMessageTextContent.deserializeBinaryFromReader = func * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.AssistantConversationMessageTextContent.prototype.serializeBinary = function() { +proto.GetAllAssistantConversationResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.AssistantConversationMessageTextContent.serializeBinaryToWriter(this, writer); + proto.GetAllAssistantConversationResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -11983,220 +9881,208 @@ proto.AssistantConversationMessageTextContent.prototype.serializeBinary = functi /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.AssistantConversationMessageTextContent} message + * @param {!proto.GetAllAssistantConversationResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.AssistantConversationMessageTextContent.serializeBinaryToWriter = function(message, writer) { +proto.GetAllAssistantConversationResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getContent(); - if (f.length > 0) { - writer.writeString( + f = message.getCode(); + if (f !== 0) { + writer.writeInt32( 1, f ); } + f = message.getSuccess(); + if (f) { + writer.writeBool( + 2, + f + ); + } + f = message.getDataList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + proto.AssistantConversation.serializeBinaryToWriter + ); + } + f = message.getError(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.Error.serializeBinaryToWriter + ); + } + f = message.getPaginated(); + if (f != null) { + writer.writeMessage( + 5, + f, + proto.Paginated.serializeBinaryToWriter + ); + } }; /** - * optional string content = 1; - * @return {string} + * optional int32 code = 1; + * @return {number} */ -proto.AssistantConversationMessageTextContent.prototype.getContent = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.GetAllAssistantConversationResponse.prototype.getCode = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** - * @param {string} value - * @return {!proto.AssistantConversationMessageTextContent} returns this + * @param {number} value + * @return {!proto.GetAllAssistantConversationResponse} returns this */ -proto.AssistantConversationMessageTextContent.prototype.setContent = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); +proto.GetAllAssistantConversationResponse.prototype.setCode = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); }; +/** + * optional bool success = 2; + * @return {boolean} + */ +proto.GetAllAssistantConversationResponse.prototype.getSuccess = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; - -if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} + * @param {boolean} value + * @return {!proto.GetAllAssistantConversationResponse} returns this */ -proto.AssistantConversationMessageAudioContent.prototype.toObject = function(opt_includeInstance) { - return proto.AssistantConversationMessageAudioContent.toObject(opt_includeInstance, this); +proto.GetAllAssistantConversationResponse.prototype.setSuccess = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); }; /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.AssistantConversationMessageAudioContent} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages + * repeated AssistantConversation data = 3; + * @return {!Array} */ -proto.AssistantConversationMessageAudioContent.toObject = function(includeInstance, msg) { - var f, obj = { - content: msg.getContent_asB64() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; +proto.GetAllAssistantConversationResponse.prototype.getDataList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.AssistantConversation, 3)); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.AssistantConversationMessageAudioContent} - */ -proto.AssistantConversationMessageAudioContent.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.AssistantConversationMessageAudioContent; - return proto.AssistantConversationMessageAudioContent.deserializeBinaryFromReader(msg, reader); + * @param {!Array} value + * @return {!proto.GetAllAssistantConversationResponse} returns this +*/ +proto.GetAllAssistantConversationResponse.prototype.setDataList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); }; /** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.AssistantConversationMessageAudioContent} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.AssistantConversationMessageAudioContent} + * @param {!proto.AssistantConversation=} opt_value + * @param {number=} opt_index + * @return {!proto.AssistantConversation} */ -proto.AssistantConversationMessageAudioContent.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setContent(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; +proto.GetAllAssistantConversationResponse.prototype.addData = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.AssistantConversation, opt_index); }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * Clears the list making it empty but non-null. + * @return {!proto.GetAllAssistantConversationResponse} returns this */ -proto.AssistantConversationMessageAudioContent.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.AssistantConversationMessageAudioContent.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.GetAllAssistantConversationResponse.prototype.clearDataList = function() { + return this.setDataList([]); }; /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.AssistantConversationMessageAudioContent} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages + * optional Error error = 4; + * @return {?proto.Error} */ -proto.AssistantConversationMessageAudioContent.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getContent_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } +proto.GetAllAssistantConversationResponse.prototype.getError = function() { + return /** @type{?proto.Error} */ ( + jspb.Message.getWrapperField(this, proto.Error, 4)); }; /** - * optional bytes content = 1; - * @return {!(string|Uint8Array)} - */ -proto.AssistantConversationMessageAudioContent.prototype.getContent = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); + * @param {?proto.Error|undefined} value + * @return {!proto.GetAllAssistantConversationResponse} returns this +*/ +proto.GetAllAssistantConversationResponse.prototype.setError = function(value) { + return jspb.Message.setWrapperField(this, 4, value); }; /** - * optional bytes content = 1; - * This is a type-conversion wrapper around `getContent()` - * @return {string} + * Clears the message field making it undefined. + * @return {!proto.GetAllAssistantConversationResponse} returns this */ -proto.AssistantConversationMessageAudioContent.prototype.getContent_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getContent())); +proto.GetAllAssistantConversationResponse.prototype.clearError = function() { + return this.setError(undefined); }; /** - * optional bytes content = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getContent()` - * @return {!Uint8Array} + * Returns whether this field is set. + * @return {boolean} */ -proto.AssistantConversationMessageAudioContent.prototype.getContent_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getContent())); +proto.GetAllAssistantConversationResponse.prototype.hasError = function() { + return jspb.Message.getField(this, 4) != null; }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.AssistantConversationMessageAudioContent} returns this + * optional Paginated paginated = 5; + * @return {?proto.Paginated} */ -proto.AssistantConversationMessageAudioContent.prototype.setContent = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); +proto.GetAllAssistantConversationResponse.prototype.getPaginated = function() { + return /** @type{?proto.Paginated} */ ( + jspb.Message.getWrapperField(this, proto.Paginated, 5)); }; +/** + * @param {?proto.Paginated|undefined} value + * @return {!proto.GetAllAssistantConversationResponse} returns this +*/ +proto.GetAllAssistantConversationResponse.prototype.setPaginated = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + /** - * Oneof group definitions for this message. Each group defines the field - * numbers belonging to that group. When of these fields' value is set, all - * other fields in the group are cleared. During deserialization, if multiple - * fields are encountered for a group, only the last value seen will be kept. - * @private {!Array>} - * @const + * Clears the message field making it undefined. + * @return {!proto.GetAllAssistantConversationResponse} returns this */ -proto.AssistantConversationUserMessage.oneofGroups_ = [[10,11]]; +proto.GetAllAssistantConversationResponse.prototype.clearPaginated = function() { + return this.setPaginated(undefined); +}; + /** - * @enum {number} + * Returns whether this field is set. + * @return {boolean} */ -proto.AssistantConversationUserMessage.MessageCase = { - MESSAGE_NOT_SET: 0, - AUDIO: 10, - TEXT: 11 +proto.GetAllAssistantConversationResponse.prototype.hasPaginated = function() { + return jspb.Message.getField(this, 5) != null; }; + + /** - * @return {proto.AssistantConversationUserMessage.MessageCase} + * List of repeated fields within this message type. + * @private {!Array} + * @const */ -proto.AssistantConversationUserMessage.prototype.getMessageCase = function() { - return /** @type {proto.AssistantConversationUserMessage.MessageCase} */(jspb.Message.computeOneofCase(this, proto.AssistantConversationUserMessage.oneofGroups_[0])); -}; +proto.GetAllConversationMessageRequest.repeatedFields_ = [4]; @@ -12213,8 +10099,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.AssistantConversationUserMessage.prototype.toObject = function(opt_includeInstance) { - return proto.AssistantConversationUserMessage.toObject(opt_includeInstance, this); +proto.GetAllConversationMessageRequest.prototype.toObject = function(opt_includeInstance) { + return proto.GetAllConversationMessageRequest.toObject(opt_includeInstance, this); }; @@ -12223,17 +10109,19 @@ proto.AssistantConversationUserMessage.prototype.toObject = function(opt_include * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.AssistantConversationUserMessage} msg The msg instance to transform. + * @param {!proto.GetAllConversationMessageRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.AssistantConversationUserMessage.toObject = function(includeInstance, msg) { +proto.GetAllConversationMessageRequest.toObject = function(includeInstance, msg) { var f, obj = { - audio: (f = msg.getAudio()) && proto.AssistantConversationMessageAudioContent.toObject(includeInstance, f), - text: (f = msg.getText()) && proto.AssistantConversationMessageTextContent.toObject(includeInstance, f), - id: jspb.Message.getFieldWithDefault(msg, 2, ""), - completed: jspb.Message.getBooleanFieldWithDefault(msg, 3, false), - time: (f = msg.getTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) + assistantid: jspb.Message.getFieldWithDefault(msg, 1, "0"), + assistantconversationid: jspb.Message.getFieldWithDefault(msg, 2, "0"), + paginate: (f = msg.getPaginate()) && proto.Paginate.toObject(includeInstance, f), + criteriasList: jspb.Message.toObjectList(msg.getCriteriasList(), + proto.Criteria.toObject, includeInstance), + order: (f = msg.getOrder()) && proto.Ordering.toObject(includeInstance, f), + source: jspb.Message.getFieldWithDefault(msg, 7, 0) }; if (includeInstance) { @@ -12247,51 +10135,55 @@ proto.AssistantConversationUserMessage.toObject = function(includeInstance, msg) /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.AssistantConversationUserMessage} + * @return {!proto.GetAllConversationMessageRequest} */ -proto.AssistantConversationUserMessage.deserializeBinary = function(bytes) { +proto.GetAllConversationMessageRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.AssistantConversationUserMessage; - return proto.AssistantConversationUserMessage.deserializeBinaryFromReader(msg, reader); + var msg = new proto.GetAllConversationMessageRequest; + return proto.GetAllConversationMessageRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.AssistantConversationUserMessage} msg The message object to deserialize into. + * @param {!proto.GetAllConversationMessageRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.AssistantConversationUserMessage} + * @return {!proto.GetAllConversationMessageRequest} */ -proto.AssistantConversationUserMessage.deserializeBinaryFromReader = function(msg, reader) { +proto.GetAllConversationMessageRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { - case 10: - var value = new proto.AssistantConversationMessageAudioContent; - reader.readMessage(value,proto.AssistantConversationMessageAudioContent.deserializeBinaryFromReader); - msg.setAudio(value); - break; - case 11: - var value = new proto.AssistantConversationMessageTextContent; - reader.readMessage(value,proto.AssistantConversationMessageTextContent.deserializeBinaryFromReader); - msg.setText(value); + case 1: + var value = /** @type {string} */ (reader.readUint64String()); + msg.setAssistantid(value); break; case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setId(value); + var value = /** @type {string} */ (reader.readUint64String()); + msg.setAssistantconversationid(value); break; case 3: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setCompleted(value); + var value = new proto.Paginate; + reader.readMessage(value,proto.Paginate.deserializeBinaryFromReader); + msg.setPaginate(value); break; case 4: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setTime(value); + var value = new proto.Criteria; + reader.readMessage(value,proto.Criteria.deserializeBinaryFromReader); + msg.addCriterias(value); + break; + case 5: + var value = new proto.Ordering; + reader.readMessage(value,proto.Ordering.deserializeBinaryFromReader); + msg.setOrder(value); + break; + case 7: + var value = /** @type {!proto.Source} */ (reader.readEnum()); + msg.setSource(value); break; default: reader.skipField(); @@ -12306,9 +10198,9 @@ proto.AssistantConversationUserMessage.deserializeBinaryFromReader = function(ms * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.AssistantConversationUserMessage.prototype.serializeBinary = function() { +proto.GetAllConversationMessageRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.AssistantConversationUserMessage.serializeBinaryToWriter(this, writer); + proto.GetAllConversationMessageRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -12316,115 +10208,121 @@ proto.AssistantConversationUserMessage.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.AssistantConversationUserMessage} message + * @param {!proto.GetAllConversationMessageRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.AssistantConversationUserMessage.serializeBinaryToWriter = function(message, writer) { +proto.GetAllConversationMessageRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getAudio(); - if (f != null) { - writer.writeMessage( - 10, - f, - proto.AssistantConversationMessageAudioContent.serializeBinaryToWriter + f = message.getAssistantid(); + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( + 1, + f + ); + } + f = message.getAssistantconversationid(); + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( + 2, + f ); } - f = message.getText(); + f = message.getPaginate(); if (f != null) { writer.writeMessage( - 11, + 3, f, - proto.AssistantConversationMessageTextContent.serializeBinaryToWriter + proto.Paginate.serializeBinaryToWriter ); } - f = message.getId(); + f = message.getCriteriasList(); if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getCompleted(); - if (f) { - writer.writeBool( - 3, - f + writer.writeRepeatedMessage( + 4, + f, + proto.Criteria.serializeBinaryToWriter ); } - f = message.getTime(); + f = message.getOrder(); if (f != null) { writer.writeMessage( - 4, + 5, f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + proto.Ordering.serializeBinaryToWriter + ); + } + f = message.getSource(); + if (f !== 0.0) { + writer.writeEnum( + 7, + f ); } }; /** - * optional AssistantConversationMessageAudioContent audio = 10; - * @return {?proto.AssistantConversationMessageAudioContent} + * optional uint64 assistantId = 1; + * @return {string} */ -proto.AssistantConversationUserMessage.prototype.getAudio = function() { - return /** @type{?proto.AssistantConversationMessageAudioContent} */ ( - jspb.Message.getWrapperField(this, proto.AssistantConversationMessageAudioContent, 10)); +proto.GetAllConversationMessageRequest.prototype.getAssistantid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); }; /** - * @param {?proto.AssistantConversationMessageAudioContent|undefined} value - * @return {!proto.AssistantConversationUserMessage} returns this -*/ -proto.AssistantConversationUserMessage.prototype.setAudio = function(value) { - return jspb.Message.setOneofWrapperField(this, 10, proto.AssistantConversationUserMessage.oneofGroups_[0], value); + * @param {string} value + * @return {!proto.GetAllConversationMessageRequest} returns this + */ +proto.GetAllConversationMessageRequest.prototype.setAssistantid = function(value) { + return jspb.Message.setProto3StringIntField(this, 1, value); }; /** - * Clears the message field making it undefined. - * @return {!proto.AssistantConversationUserMessage} returns this + * optional uint64 assistantConversationId = 2; + * @return {string} */ -proto.AssistantConversationUserMessage.prototype.clearAudio = function() { - return this.setAudio(undefined); +proto.GetAllConversationMessageRequest.prototype.getAssistantconversationid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "0")); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {string} value + * @return {!proto.GetAllConversationMessageRequest} returns this */ -proto.AssistantConversationUserMessage.prototype.hasAudio = function() { - return jspb.Message.getField(this, 10) != null; +proto.GetAllConversationMessageRequest.prototype.setAssistantconversationid = function(value) { + return jspb.Message.setProto3StringIntField(this, 2, value); }; /** - * optional AssistantConversationMessageTextContent text = 11; - * @return {?proto.AssistantConversationMessageTextContent} + * optional Paginate paginate = 3; + * @return {?proto.Paginate} */ -proto.AssistantConversationUserMessage.prototype.getText = function() { - return /** @type{?proto.AssistantConversationMessageTextContent} */ ( - jspb.Message.getWrapperField(this, proto.AssistantConversationMessageTextContent, 11)); +proto.GetAllConversationMessageRequest.prototype.getPaginate = function() { + return /** @type{?proto.Paginate} */ ( + jspb.Message.getWrapperField(this, proto.Paginate, 3)); }; /** - * @param {?proto.AssistantConversationMessageTextContent|undefined} value - * @return {!proto.AssistantConversationUserMessage} returns this + * @param {?proto.Paginate|undefined} value + * @return {!proto.GetAllConversationMessageRequest} returns this */ -proto.AssistantConversationUserMessage.prototype.setText = function(value) { - return jspb.Message.setOneofWrapperField(this, 11, proto.AssistantConversationUserMessage.oneofGroups_[0], value); +proto.GetAllConversationMessageRequest.prototype.setPaginate = function(value) { + return jspb.Message.setWrapperField(this, 3, value); }; /** * Clears the message field making it undefined. - * @return {!proto.AssistantConversationUserMessage} returns this + * @return {!proto.GetAllConversationMessageRequest} returns this */ -proto.AssistantConversationUserMessage.prototype.clearText = function() { - return this.setText(undefined); +proto.GetAllConversationMessageRequest.prototype.clearPaginate = function() { + return this.setPaginate(undefined); }; @@ -12432,72 +10330,74 @@ proto.AssistantConversationUserMessage.prototype.clearText = function() { * Returns whether this field is set. * @return {boolean} */ -proto.AssistantConversationUserMessage.prototype.hasText = function() { - return jspb.Message.getField(this, 11) != null; +proto.GetAllConversationMessageRequest.prototype.hasPaginate = function() { + return jspb.Message.getField(this, 3) != null; }; /** - * optional string id = 2; - * @return {string} + * repeated Criteria criterias = 4; + * @return {!Array} */ -proto.AssistantConversationUserMessage.prototype.getId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.GetAllConversationMessageRequest.prototype.getCriteriasList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.Criteria, 4)); }; /** - * @param {string} value - * @return {!proto.AssistantConversationUserMessage} returns this - */ -proto.AssistantConversationUserMessage.prototype.setId = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); + * @param {!Array} value + * @return {!proto.GetAllConversationMessageRequest} returns this +*/ +proto.GetAllConversationMessageRequest.prototype.setCriteriasList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 4, value); }; /** - * optional bool completed = 3; - * @return {boolean} + * @param {!proto.Criteria=} opt_value + * @param {number=} opt_index + * @return {!proto.Criteria} */ -proto.AssistantConversationUserMessage.prototype.getCompleted = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); +proto.GetAllConversationMessageRequest.prototype.addCriterias = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.Criteria, opt_index); }; /** - * @param {boolean} value - * @return {!proto.AssistantConversationUserMessage} returns this + * Clears the list making it empty but non-null. + * @return {!proto.GetAllConversationMessageRequest} returns this */ -proto.AssistantConversationUserMessage.prototype.setCompleted = function(value) { - return jspb.Message.setProto3BooleanField(this, 3, value); +proto.GetAllConversationMessageRequest.prototype.clearCriteriasList = function() { + return this.setCriteriasList([]); }; /** - * optional google.protobuf.Timestamp time = 4; - * @return {?proto.google.protobuf.Timestamp} + * optional Ordering order = 5; + * @return {?proto.Ordering} */ -proto.AssistantConversationUserMessage.prototype.getTime = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 4)); +proto.GetAllConversationMessageRequest.prototype.getOrder = function() { + return /** @type{?proto.Ordering} */ ( + jspb.Message.getWrapperField(this, proto.Ordering, 5)); }; /** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.AssistantConversationUserMessage} returns this + * @param {?proto.Ordering|undefined} value + * @return {!proto.GetAllConversationMessageRequest} returns this */ -proto.AssistantConversationUserMessage.prototype.setTime = function(value) { - return jspb.Message.setWrapperField(this, 4, value); +proto.GetAllConversationMessageRequest.prototype.setOrder = function(value) { + return jspb.Message.setWrapperField(this, 5, value); }; /** * Clears the message field making it undefined. - * @return {!proto.AssistantConversationUserMessage} returns this + * @return {!proto.GetAllConversationMessageRequest} returns this */ -proto.AssistantConversationUserMessage.prototype.clearTime = function() { - return this.setTime(undefined); +proto.GetAllConversationMessageRequest.prototype.clearOrder = function() { + return this.setOrder(undefined); }; @@ -12505,37 +10405,36 @@ proto.AssistantConversationUserMessage.prototype.clearTime = function() { * Returns whether this field is set. * @return {boolean} */ -proto.AssistantConversationUserMessage.prototype.hasTime = function() { - return jspb.Message.getField(this, 4) != null; +proto.GetAllConversationMessageRequest.prototype.hasOrder = function() { + return jspb.Message.getField(this, 5) != null; }; - /** - * Oneof group definitions for this message. Each group defines the field - * numbers belonging to that group. When of these fields' value is set, all - * other fields in the group are cleared. During deserialization, if multiple - * fields are encountered for a group, only the last value seen will be kept. - * @private {!Array>} - * @const + * optional Source source = 7; + * @return {!proto.Source} */ -proto.AssistantConversationAssistantMessage.oneofGroups_ = [[10,11]]; +proto.GetAllConversationMessageRequest.prototype.getSource = function() { + return /** @type {!proto.Source} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + /** - * @enum {number} + * @param {!proto.Source} value + * @return {!proto.GetAllConversationMessageRequest} returns this */ -proto.AssistantConversationAssistantMessage.MessageCase = { - MESSAGE_NOT_SET: 0, - AUDIO: 10, - TEXT: 11 +proto.GetAllConversationMessageRequest.prototype.setSource = function(value) { + return jspb.Message.setProto3EnumField(this, 7, value); }; + + /** - * @return {proto.AssistantConversationAssistantMessage.MessageCase} + * List of repeated fields within this message type. + * @private {!Array} + * @const */ -proto.AssistantConversationAssistantMessage.prototype.getMessageCase = function() { - return /** @type {proto.AssistantConversationAssistantMessage.MessageCase} */(jspb.Message.computeOneofCase(this, proto.AssistantConversationAssistantMessage.oneofGroups_[0])); -}; +proto.GetAllConversationMessageResponse.repeatedFields_ = [3]; @@ -12552,8 +10451,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.AssistantConversationAssistantMessage.prototype.toObject = function(opt_includeInstance) { - return proto.AssistantConversationAssistantMessage.toObject(opt_includeInstance, this); +proto.GetAllConversationMessageResponse.prototype.toObject = function(opt_includeInstance) { + return proto.GetAllConversationMessageResponse.toObject(opt_includeInstance, this); }; @@ -12562,17 +10461,18 @@ proto.AssistantConversationAssistantMessage.prototype.toObject = function(opt_in * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.AssistantConversationAssistantMessage} msg The msg instance to transform. + * @param {!proto.GetAllConversationMessageResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.AssistantConversationAssistantMessage.toObject = function(includeInstance, msg) { +proto.GetAllConversationMessageResponse.toObject = function(includeInstance, msg) { var f, obj = { - audio: (f = msg.getAudio()) && proto.AssistantConversationMessageAudioContent.toObject(includeInstance, f), - text: (f = msg.getText()) && proto.AssistantConversationMessageTextContent.toObject(includeInstance, f), - id: jspb.Message.getFieldWithDefault(msg, 2, ""), - completed: jspb.Message.getBooleanFieldWithDefault(msg, 3, false), - time: (f = msg.getTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) + code: jspb.Message.getFieldWithDefault(msg, 1, 0), + success: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), + dataList: jspb.Message.toObjectList(msg.getDataList(), + proto.AssistantConversationMessage.toObject, includeInstance), + error: (f = msg.getError()) && proto.Error.toObject(includeInstance, f), + paginated: (f = msg.getPaginated()) && proto.Paginated.toObject(includeInstance, f) }; if (includeInstance) { @@ -12586,51 +10486,51 @@ proto.AssistantConversationAssistantMessage.toObject = function(includeInstance, /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.AssistantConversationAssistantMessage} + * @return {!proto.GetAllConversationMessageResponse} */ -proto.AssistantConversationAssistantMessage.deserializeBinary = function(bytes) { +proto.GetAllConversationMessageResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.AssistantConversationAssistantMessage; - return proto.AssistantConversationAssistantMessage.deserializeBinaryFromReader(msg, reader); + var msg = new proto.GetAllConversationMessageResponse; + return proto.GetAllConversationMessageResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.AssistantConversationAssistantMessage} msg The message object to deserialize into. + * @param {!proto.GetAllConversationMessageResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.AssistantConversationAssistantMessage} + * @return {!proto.GetAllConversationMessageResponse} */ -proto.AssistantConversationAssistantMessage.deserializeBinaryFromReader = function(msg, reader) { +proto.GetAllConversationMessageResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { - case 10: - var value = new proto.AssistantConversationMessageAudioContent; - reader.readMessage(value,proto.AssistantConversationMessageAudioContent.deserializeBinaryFromReader); - msg.setAudio(value); - break; - case 11: - var value = new proto.AssistantConversationMessageTextContent; - reader.readMessage(value,proto.AssistantConversationMessageTextContent.deserializeBinaryFromReader); - msg.setText(value); + case 1: + var value = /** @type {number} */ (reader.readInt32()); + msg.setCode(value); break; case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setId(value); + var value = /** @type {boolean} */ (reader.readBool()); + msg.setSuccess(value); break; case 3: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setCompleted(value); + var value = new proto.AssistantConversationMessage; + reader.readMessage(value,proto.AssistantConversationMessage.deserializeBinaryFromReader); + msg.addData(value); break; case 4: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setTime(value); + var value = new proto.Error; + reader.readMessage(value,proto.Error.deserializeBinaryFromReader); + msg.setError(value); + break; + case 5: + var value = new proto.Paginated; + reader.readMessage(value,proto.Paginated.deserializeBinaryFromReader); + msg.setPaginated(value); break; default: reader.skipField(); @@ -12645,9 +10545,9 @@ proto.AssistantConversationAssistantMessage.deserializeBinaryFromReader = functi * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.AssistantConversationAssistantMessage.prototype.serializeBinary = function() { +proto.GetAllConversationMessageResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.AssistantConversationAssistantMessage.serializeBinaryToWriter(this, writer); + proto.GetAllConversationMessageResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -12655,188 +10555,189 @@ proto.AssistantConversationAssistantMessage.prototype.serializeBinary = function /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.AssistantConversationAssistantMessage} message + * @param {!proto.GetAllConversationMessageResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.AssistantConversationAssistantMessage.serializeBinaryToWriter = function(message, writer) { +proto.GetAllConversationMessageResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getAudio(); - if (f != null) { - writer.writeMessage( - 10, - f, - proto.AssistantConversationMessageAudioContent.serializeBinaryToWriter - ); - } - f = message.getText(); - if (f != null) { - writer.writeMessage( - 11, - f, - proto.AssistantConversationMessageTextContent.serializeBinaryToWriter + f = message.getCode(); + if (f !== 0) { + writer.writeInt32( + 1, + f ); } - f = message.getId(); - if (f.length > 0) { - writer.writeString( + f = message.getSuccess(); + if (f) { + writer.writeBool( 2, f ); } - f = message.getCompleted(); - if (f) { - writer.writeBool( + f = message.getDataList(); + if (f.length > 0) { + writer.writeRepeatedMessage( 3, - f + f, + proto.AssistantConversationMessage.serializeBinaryToWriter ); } - f = message.getTime(); + f = message.getError(); if (f != null) { writer.writeMessage( 4, f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + proto.Error.serializeBinaryToWriter + ); + } + f = message.getPaginated(); + if (f != null) { + writer.writeMessage( + 5, + f, + proto.Paginated.serializeBinaryToWriter ); } }; /** - * optional AssistantConversationMessageAudioContent audio = 10; - * @return {?proto.AssistantConversationMessageAudioContent} + * optional int32 code = 1; + * @return {number} */ -proto.AssistantConversationAssistantMessage.prototype.getAudio = function() { - return /** @type{?proto.AssistantConversationMessageAudioContent} */ ( - jspb.Message.getWrapperField(this, proto.AssistantConversationMessageAudioContent, 10)); +proto.GetAllConversationMessageResponse.prototype.getCode = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** - * @param {?proto.AssistantConversationMessageAudioContent|undefined} value - * @return {!proto.AssistantConversationAssistantMessage} returns this -*/ -proto.AssistantConversationAssistantMessage.prototype.setAudio = function(value) { - return jspb.Message.setOneofWrapperField(this, 10, proto.AssistantConversationAssistantMessage.oneofGroups_[0], value); + * @param {number} value + * @return {!proto.GetAllConversationMessageResponse} returns this + */ +proto.GetAllConversationMessageResponse.prototype.setCode = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); }; /** - * Clears the message field making it undefined. - * @return {!proto.AssistantConversationAssistantMessage} returns this + * optional bool success = 2; + * @return {boolean} */ -proto.AssistantConversationAssistantMessage.prototype.clearAudio = function() { - return this.setAudio(undefined); +proto.GetAllConversationMessageResponse.prototype.getSuccess = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {boolean} value + * @return {!proto.GetAllConversationMessageResponse} returns this */ -proto.AssistantConversationAssistantMessage.prototype.hasAudio = function() { - return jspb.Message.getField(this, 10) != null; +proto.GetAllConversationMessageResponse.prototype.setSuccess = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); }; /** - * optional AssistantConversationMessageTextContent text = 11; - * @return {?proto.AssistantConversationMessageTextContent} + * repeated AssistantConversationMessage data = 3; + * @return {!Array} */ -proto.AssistantConversationAssistantMessage.prototype.getText = function() { - return /** @type{?proto.AssistantConversationMessageTextContent} */ ( - jspb.Message.getWrapperField(this, proto.AssistantConversationMessageTextContent, 11)); +proto.GetAllConversationMessageResponse.prototype.getDataList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.AssistantConversationMessage, 3)); }; /** - * @param {?proto.AssistantConversationMessageTextContent|undefined} value - * @return {!proto.AssistantConversationAssistantMessage} returns this + * @param {!Array} value + * @return {!proto.GetAllConversationMessageResponse} returns this */ -proto.AssistantConversationAssistantMessage.prototype.setText = function(value) { - return jspb.Message.setOneofWrapperField(this, 11, proto.AssistantConversationAssistantMessage.oneofGroups_[0], value); +proto.GetAllConversationMessageResponse.prototype.setDataList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); }; /** - * Clears the message field making it undefined. - * @return {!proto.AssistantConversationAssistantMessage} returns this + * @param {!proto.AssistantConversationMessage=} opt_value + * @param {number=} opt_index + * @return {!proto.AssistantConversationMessage} */ -proto.AssistantConversationAssistantMessage.prototype.clearText = function() { - return this.setText(undefined); +proto.GetAllConversationMessageResponse.prototype.addData = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.AssistantConversationMessage, opt_index); }; /** - * Returns whether this field is set. - * @return {boolean} + * Clears the list making it empty but non-null. + * @return {!proto.GetAllConversationMessageResponse} returns this */ -proto.AssistantConversationAssistantMessage.prototype.hasText = function() { - return jspb.Message.getField(this, 11) != null; +proto.GetAllConversationMessageResponse.prototype.clearDataList = function() { + return this.setDataList([]); }; /** - * optional string id = 2; - * @return {string} + * optional Error error = 4; + * @return {?proto.Error} */ -proto.AssistantConversationAssistantMessage.prototype.getId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.GetAllConversationMessageResponse.prototype.getError = function() { + return /** @type{?proto.Error} */ ( + jspb.Message.getWrapperField(this, proto.Error, 4)); }; /** - * @param {string} value - * @return {!proto.AssistantConversationAssistantMessage} returns this - */ -proto.AssistantConversationAssistantMessage.prototype.setId = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); + * @param {?proto.Error|undefined} value + * @return {!proto.GetAllConversationMessageResponse} returns this +*/ +proto.GetAllConversationMessageResponse.prototype.setError = function(value) { + return jspb.Message.setWrapperField(this, 4, value); }; /** - * optional bool completed = 3; - * @return {boolean} + * Clears the message field making it undefined. + * @return {!proto.GetAllConversationMessageResponse} returns this */ -proto.AssistantConversationAssistantMessage.prototype.getCompleted = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); +proto.GetAllConversationMessageResponse.prototype.clearError = function() { + return this.setError(undefined); }; /** - * @param {boolean} value - * @return {!proto.AssistantConversationAssistantMessage} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.AssistantConversationAssistantMessage.prototype.setCompleted = function(value) { - return jspb.Message.setProto3BooleanField(this, 3, value); +proto.GetAllConversationMessageResponse.prototype.hasError = function() { + return jspb.Message.getField(this, 4) != null; }; /** - * optional google.protobuf.Timestamp time = 4; - * @return {?proto.google.protobuf.Timestamp} + * optional Paginated paginated = 5; + * @return {?proto.Paginated} */ -proto.AssistantConversationAssistantMessage.prototype.getTime = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 4)); +proto.GetAllConversationMessageResponse.prototype.getPaginated = function() { + return /** @type{?proto.Paginated} */ ( + jspb.Message.getWrapperField(this, proto.Paginated, 5)); }; /** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.AssistantConversationAssistantMessage} returns this + * @param {?proto.Paginated|undefined} value + * @return {!proto.GetAllConversationMessageResponse} returns this */ -proto.AssistantConversationAssistantMessage.prototype.setTime = function(value) { - return jspb.Message.setWrapperField(this, 4, value); +proto.GetAllConversationMessageResponse.prototype.setPaginated = function(value) { + return jspb.Message.setWrapperField(this, 5, value); }; /** * Clears the message field making it undefined. - * @return {!proto.AssistantConversationAssistantMessage} returns this + * @return {!proto.GetAllConversationMessageResponse} returns this */ -proto.AssistantConversationAssistantMessage.prototype.clearTime = function() { - return this.setTime(undefined); +proto.GetAllConversationMessageResponse.prototype.clearPaginated = function() { + return this.setPaginated(undefined); }; @@ -12844,8 +10745,8 @@ proto.AssistantConversationAssistantMessage.prototype.clearTime = function() { * Returns whether this field is set. * @return {boolean} */ -proto.AssistantConversationAssistantMessage.prototype.hasTime = function() { - return jspb.Message.getField(this, 4) != null; +proto.GetAllConversationMessageResponse.prototype.hasPaginated = function() { + return jspb.Message.getField(this, 5) != null; }; diff --git a/src/clients/protos/integration-api_pb.d.ts b/src/clients/protos/integration-api_pb.d.ts index d55f1eb..e19fcc2 100644 --- a/src/clients/protos/integration-api_pb.d.ts +++ b/src/clients/protos/integration-api_pb.d.ts @@ -264,10 +264,8 @@ export class Reranking extends jspb.Message { getIndex(): number; setIndex(value: number): void; - hasContent(): boolean; - clearContent(): void; - getContent(): common_pb.Content | undefined; - setContent(value?: common_pb.Content): void; + getContent(): string; + setContent(value: string): void; getRelevancescore(): number; setRelevancescore(value: number): void; @@ -285,7 +283,7 @@ export class Reranking extends jspb.Message { export namespace Reranking { export type AsObject = { index: number, - content?: common_pb.Content.AsObject, + content: string, relevancescore: number, } } @@ -299,7 +297,7 @@ export class RerankingRequest extends jspb.Message { getQuery(): string; setQuery(value: string): void; - getContentMap(): jspb.Map; + getContentMap(): jspb.Map; clearContentMap(): void; getModelparametersMap(): jspb.Map; clearModelparametersMap(): void; @@ -319,7 +317,7 @@ export namespace RerankingRequest { export type AsObject = { credential?: Credential.AsObject, query: string, - contentMap: Array<[number, common_pb.Content.AsObject]>, + contentMap: Array<[number, string]>, modelparametersMap: Array<[string, google_protobuf_any_pb.Any.AsObject]>, additionaldataMap: Array<[string, string]>, } @@ -557,10 +555,8 @@ export class GetModerationRequest extends jspb.Message { getVersion(): string; setVersion(value: string): void; - hasContent(): boolean; - clearContent(): void; - getContent(): common_pb.Content | undefined; - setContent(value?: common_pb.Content): void; + getContent(): string; + setContent(value: string): void; getAdditionaldataMap(): jspb.Map; clearAdditionaldataMap(): void; @@ -581,7 +577,7 @@ export namespace GetModerationRequest { credential?: Credential.AsObject, model: string, version: string, - content?: common_pb.Content.AsObject, + content: string, additionaldataMap: Array<[string, string]>, modelparametersMap: Array<[string, google_protobuf_any_pb.Any.AsObject]>, } diff --git a/src/clients/protos/integration-api_pb.js b/src/clients/protos/integration-api_pb.js index 4381358..ee1303a 100644 --- a/src/clients/protos/integration-api_pb.js +++ b/src/clients/protos/integration-api_pb.js @@ -2331,7 +2331,7 @@ proto.integration_api.Reranking.prototype.toObject = function(opt_includeInstanc proto.integration_api.Reranking.toObject = function(includeInstance, msg) { var f, obj = { index: jspb.Message.getFieldWithDefault(msg, 1, 0), - content: (f = msg.getContent()) && common_pb.Content.toObject(includeInstance, f), + content: jspb.Message.getFieldWithDefault(msg, 2, ""), relevancescore: jspb.Message.getFloatingPointFieldWithDefault(msg, 3, 0.0) }; @@ -2374,8 +2374,7 @@ proto.integration_api.Reranking.deserializeBinaryFromReader = function(msg, read msg.setIndex(value); break; case 2: - var value = new common_pb.Content; - reader.readMessage(value,common_pb.Content.deserializeBinaryFromReader); + var value = /** @type {string} */ (reader.readString()); msg.setContent(value); break; case 3: @@ -2419,11 +2418,10 @@ proto.integration_api.Reranking.serializeBinaryToWriter = function(message, writ ); } f = message.getContent(); - if (f != null) { - writer.writeMessage( + if (f.length > 0) { + writer.writeString( 2, - f, - common_pb.Content.serializeBinaryToWriter + f ); } f = message.getRelevancescore(); @@ -2455,44 +2453,25 @@ proto.integration_api.Reranking.prototype.setIndex = function(value) { /** - * optional Content content = 2; - * @return {?proto.Content} + * optional string content = 2; + * @return {string} */ proto.integration_api.Reranking.prototype.getContent = function() { - return /** @type{?proto.Content} */ ( - jspb.Message.getWrapperField(this, common_pb.Content, 2)); -}; - - -/** - * @param {?proto.Content|undefined} value - * @return {!proto.integration_api.Reranking} returns this -*/ -proto.integration_api.Reranking.prototype.setContent = function(value) { - return jspb.Message.setWrapperField(this, 2, value); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * Clears the message field making it undefined. + * @param {string} value * @return {!proto.integration_api.Reranking} returns this */ -proto.integration_api.Reranking.prototype.clearContent = function() { - return this.setContent(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.integration_api.Reranking.prototype.hasContent = function() { - return jspb.Message.getField(this, 2) != null; +proto.integration_api.Reranking.prototype.setContent = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); }; /** - * optional double RelevanceScore = 3; + * optional double relevanceScore = 3; * @return {number} */ proto.integration_api.Reranking.prototype.getRelevancescore = function() { @@ -2543,7 +2522,7 @@ proto.integration_api.RerankingRequest.toObject = function(includeInstance, msg) var f, obj = { credential: (f = msg.getCredential()) && proto.integration_api.Credential.toObject(includeInstance, f), query: jspb.Message.getFieldWithDefault(msg, 4, ""), - contentMap: (f = msg.getContentMap()) ? f.toObject(includeInstance, proto.Content.toObject) : [], + contentMap: (f = msg.getContentMap()) ? f.toObject(includeInstance, undefined) : [], modelparametersMap: (f = msg.getModelparametersMap()) ? f.toObject(includeInstance, proto.google.protobuf.Any.toObject) : [], additionaldataMap: (f = msg.getAdditionaldataMap()) ? f.toObject(includeInstance, undefined) : [] }; @@ -2594,7 +2573,7 @@ proto.integration_api.RerankingRequest.deserializeBinaryFromReader = function(ms case 5: var value = msg.getContentMap(); reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readInt32, jspb.BinaryReader.prototype.readMessage, proto.Content.deserializeBinaryFromReader, 0, new proto.Content()); + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readInt32, jspb.BinaryReader.prototype.readString, null, 0, ""); }); break; case 6: @@ -2655,7 +2634,7 @@ proto.integration_api.RerankingRequest.serializeBinaryToWriter = function(messag } f = message.getContentMap(true); if (f && f.getLength() > 0) { - f.serializeBinary(5, writer, jspb.BinaryWriter.prototype.writeInt32, jspb.BinaryWriter.prototype.writeMessage, proto.Content.serializeBinaryToWriter); + f.serializeBinary(5, writer, jspb.BinaryWriter.prototype.writeInt32, jspb.BinaryWriter.prototype.writeString); } f = message.getModelparametersMap(true); if (f && f.getLength() > 0) { @@ -2724,15 +2703,15 @@ proto.integration_api.RerankingRequest.prototype.setQuery = function(value) { /** - * map content = 5; + * map content = 5; * @param {boolean=} opt_noLazyCreate Do not create the map if * empty, instead returning `undefined` - * @return {!jspb.Map} + * @return {!jspb.Map} */ proto.integration_api.RerankingRequest.prototype.getContentMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( + return /** @type {!jspb.Map} */ ( jspb.Message.getMapField(this, 5, opt_noLazyCreate, - proto.Content)); + null)); }; @@ -4469,7 +4448,7 @@ proto.integration_api.GetModerationRequest.toObject = function(includeInstance, credential: (f = msg.getCredential()) && proto.integration_api.Credential.toObject(includeInstance, f), model: jspb.Message.getFieldWithDefault(msg, 2, ""), version: jspb.Message.getFieldWithDefault(msg, 3, ""), - content: (f = msg.getContent()) && common_pb.Content.toObject(includeInstance, f), + content: jspb.Message.getFieldWithDefault(msg, 4, ""), additionaldataMap: (f = msg.getAdditionaldataMap()) ? f.toObject(includeInstance, undefined) : [], modelparametersMap: (f = msg.getModelparametersMap()) ? f.toObject(includeInstance, proto.google.protobuf.Any.toObject) : [] }; @@ -4522,8 +4501,7 @@ proto.integration_api.GetModerationRequest.deserializeBinaryFromReader = functio msg.setVersion(value); break; case 4: - var value = new common_pb.Content; - reader.readMessage(value,common_pb.Content.deserializeBinaryFromReader); + var value = /** @type {string} */ (reader.readString()); msg.setContent(value); break; case 5: @@ -4590,11 +4568,10 @@ proto.integration_api.GetModerationRequest.serializeBinaryToWriter = function(me ); } f = message.getContent(); - if (f != null) { - writer.writeMessage( + if (f.length > 0) { + writer.writeString( 4, - f, - common_pb.Content.serializeBinaryToWriter + f ); } f = message.getAdditionaldataMap(true); @@ -4682,39 +4659,20 @@ proto.integration_api.GetModerationRequest.prototype.setVersion = function(value /** - * optional Content content = 4; - * @return {?proto.Content} + * optional string content = 4; + * @return {string} */ proto.integration_api.GetModerationRequest.prototype.getContent = function() { - return /** @type{?proto.Content} */ ( - jspb.Message.getWrapperField(this, common_pb.Content, 4)); -}; - - -/** - * @param {?proto.Content|undefined} value - * @return {!proto.integration_api.GetModerationRequest} returns this -*/ -proto.integration_api.GetModerationRequest.prototype.setContent = function(value) { - return jspb.Message.setWrapperField(this, 4, value); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); }; /** - * Clears the message field making it undefined. + * @param {string} value * @return {!proto.integration_api.GetModerationRequest} returns this */ -proto.integration_api.GetModerationRequest.prototype.clearContent = function() { - return this.setContent(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.integration_api.GetModerationRequest.prototype.hasContent = function() { - return jspb.Message.getField(this, 4) != null; +proto.integration_api.GetModerationRequest.prototype.setContent = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); }; diff --git a/src/clients/protos/invoker-api_pb.d.ts b/src/clients/protos/invoker-api_pb.d.ts index d2c7b2e..47bfae1 100644 --- a/src/clients/protos/invoker-api_pb.d.ts +++ b/src/clients/protos/invoker-api_pb.d.ts @@ -69,9 +69,9 @@ export class InvokeResponse extends jspb.Message { setSuccess(value: boolean): void; clearDataList(): void; - getDataList(): Array; - setDataList(value: Array): void; - addData(value?: common_pb.Content, index?: number): common_pb.Content; + getDataList(): Array; + setDataList(value: Array): void; + addData(value: string, index?: number): string; hasError(): boolean; clearError(): void; @@ -108,7 +108,7 @@ export namespace InvokeResponse { export type AsObject = { code: number, success: boolean, - dataList: Array, + dataList: Array, error?: common_pb.Error.AsObject, requestid: number, timetaken: number, diff --git a/src/clients/protos/invoker-api_pb.js b/src/clients/protos/invoker-api_pb.js index 60a9cac..82ad717 100644 --- a/src/clients/protos/invoker-api_pb.js +++ b/src/clients/protos/invoker-api_pb.js @@ -626,8 +626,7 @@ proto.endpoint_api.InvokeResponse.toObject = function(includeInstance, msg) { var f, obj = { code: jspb.Message.getFieldWithDefault(msg, 1, 0), success: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), - dataList: jspb.Message.toObjectList(msg.getDataList(), - common_pb.Content.toObject, includeInstance), + dataList: (f = jspb.Message.getRepeatedField(msg, 3)) == null ? undefined : f, error: (f = msg.getError()) && common_pb.Error.toObject(includeInstance, f), requestid: jspb.Message.getFieldWithDefault(msg, 5, 0), timetaken: jspb.Message.getFieldWithDefault(msg, 6, 0), @@ -679,8 +678,7 @@ proto.endpoint_api.InvokeResponse.deserializeBinaryFromReader = function(msg, re msg.setSuccess(value); break; case 3: - var value = new common_pb.Content; - reader.readMessage(value,common_pb.Content.deserializeBinaryFromReader); + var value = /** @type {string} */ (reader.readString()); msg.addData(value); break; case 4: @@ -751,10 +749,9 @@ proto.endpoint_api.InvokeResponse.serializeBinaryToWriter = function(message, wr } f = message.getDataList(); if (f.length > 0) { - writer.writeRepeatedMessage( + writer.writeRepeatedString( 3, - f, - common_pb.Content.serializeBinaryToWriter + f ); } f = message.getError(); @@ -835,31 +832,30 @@ proto.endpoint_api.InvokeResponse.prototype.setSuccess = function(value) { /** - * repeated Content data = 3; - * @return {!Array} + * repeated string data = 3; + * @return {!Array} */ proto.endpoint_api.InvokeResponse.prototype.getDataList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, common_pb.Content, 3)); + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 3)); }; /** - * @param {!Array} value + * @param {!Array} value * @return {!proto.endpoint_api.InvokeResponse} returns this -*/ + */ proto.endpoint_api.InvokeResponse.prototype.setDataList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 3, value); + return jspb.Message.setField(this, 3, value || []); }; /** - * @param {!proto.Content=} opt_value + * @param {string} value * @param {number=} opt_index - * @return {!proto.Content} + * @return {!proto.endpoint_api.InvokeResponse} returns this */ -proto.endpoint_api.InvokeResponse.prototype.addData = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.Content, opt_index); +proto.endpoint_api.InvokeResponse.prototype.addData = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 3, value, opt_index); }; diff --git a/src/clients/protos/knowledge-api_pb.d.ts b/src/clients/protos/knowledge-api_pb.d.ts index 875e51d..658fdd5 100644 --- a/src/clients/protos/knowledge-api_pb.d.ts +++ b/src/clients/protos/knowledge-api_pb.d.ts @@ -422,6 +422,46 @@ export namespace GetAllKnowledgeDocumentResponse { } } +export class DocumentContent extends jspb.Message { + getName(): string; + setName(value: string): void; + + getContenttype(): string; + setContenttype(value: string): void; + + getContentformat(): string; + setContentformat(value: string): void; + + getContent(): Uint8Array | string; + getContent_asU8(): Uint8Array; + getContent_asB64(): string; + setContent(value: Uint8Array | string): void; + + hasMeta(): boolean; + clearMeta(): void; + getMeta(): google_protobuf_struct_pb.Struct | undefined; + setMeta(value?: google_protobuf_struct_pb.Struct): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DocumentContent.AsObject; + static toObject(includeInstance: boolean, msg: DocumentContent): DocumentContent.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: DocumentContent, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): DocumentContent; + static deserializeBinaryFromReader(message: DocumentContent, reader: jspb.BinaryReader): DocumentContent; +} + +export namespace DocumentContent { + export type AsObject = { + name: string, + contenttype: string, + contentformat: string, + content: Uint8Array | string, + meta?: google_protobuf_struct_pb.Struct.AsObject, + } +} + export class CreateKnowledgeDocumentRequest extends jspb.Message { getKnowledgeid(): string; setKnowledgeid(value: string): void; @@ -433,9 +473,9 @@ export class CreateKnowledgeDocumentRequest extends jspb.Message { setDatasource(value: string): void; clearContentsList(): void; - getContentsList(): Array; - setContentsList(value: Array): void; - addContents(value?: common_pb.Content, index?: number): common_pb.Content; + getContentsList(): Array; + setContentsList(value: Array): void; + addContents(value?: DocumentContent, index?: number): DocumentContent; getPreprocess(): CreateKnowledgeDocumentRequest.PRE_PROCESSMap[keyof CreateKnowledgeDocumentRequest.PRE_PROCESSMap]; setPreprocess(value: CreateKnowledgeDocumentRequest.PRE_PROCESSMap[keyof CreateKnowledgeDocumentRequest.PRE_PROCESSMap]): void; @@ -473,7 +513,7 @@ export namespace CreateKnowledgeDocumentRequest { knowledgeid: string, documentsource: CreateKnowledgeDocumentRequest.DOCUMENT_SOURCEMap[keyof CreateKnowledgeDocumentRequest.DOCUMENT_SOURCEMap], datasource: string, - contentsList: Array, + contentsList: Array, preprocess: CreateKnowledgeDocumentRequest.PRE_PROCESSMap[keyof CreateKnowledgeDocumentRequest.PRE_PROCESSMap], separator: string, maxchunksize: number, diff --git a/src/clients/protos/knowledge-api_pb.js b/src/clients/protos/knowledge-api_pb.js index a975c97..b15f482 100644 --- a/src/clients/protos/knowledge-api_pb.js +++ b/src/clients/protos/knowledge-api_pb.js @@ -29,6 +29,7 @@ goog.exportSymbol('proto.knowledge_api.CreateKnowledgeRequest', null, global); goog.exportSymbol('proto.knowledge_api.CreateKnowledgeResponse', null, global); goog.exportSymbol('proto.knowledge_api.CreateKnowledgeTagRequest', null, global); goog.exportSymbol('proto.knowledge_api.DeleteKnowledgeDocumentSegmentRequest', null, global); +goog.exportSymbol('proto.knowledge_api.DocumentContent', null, global); goog.exportSymbol('proto.knowledge_api.GetAllKnowledgeDocumentRequest', null, global); goog.exportSymbol('proto.knowledge_api.GetAllKnowledgeDocumentResponse', null, global); goog.exportSymbol('proto.knowledge_api.GetAllKnowledgeDocumentSegmentRequest', null, global); @@ -258,6 +259,27 @@ if (goog.DEBUG && !COMPILED) { */ proto.knowledge_api.GetAllKnowledgeDocumentResponse.displayName = 'proto.knowledge_api.GetAllKnowledgeDocumentResponse'; } +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.knowledge_api.DocumentContent = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.knowledge_api.DocumentContent, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.knowledge_api.DocumentContent.displayName = 'proto.knowledge_api.DocumentContent'; +} /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -3674,6 +3696,301 @@ proto.knowledge_api.GetAllKnowledgeDocumentResponse.prototype.hasPaginated = fun + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.knowledge_api.DocumentContent.prototype.toObject = function(opt_includeInstance) { + return proto.knowledge_api.DocumentContent.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.knowledge_api.DocumentContent} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.knowledge_api.DocumentContent.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + contenttype: jspb.Message.getFieldWithDefault(msg, 2, ""), + contentformat: jspb.Message.getFieldWithDefault(msg, 3, ""), + content: msg.getContent_asB64(), + meta: (f = msg.getMeta()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.knowledge_api.DocumentContent} + */ +proto.knowledge_api.DocumentContent.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.knowledge_api.DocumentContent; + return proto.knowledge_api.DocumentContent.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.knowledge_api.DocumentContent} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.knowledge_api.DocumentContent} + */ +proto.knowledge_api.DocumentContent.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setContenttype(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setContentformat(value); + break; + case 4: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setContent(value); + break; + case 5: + var value = new google_protobuf_struct_pb.Struct; + reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader); + msg.setMeta(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.knowledge_api.DocumentContent.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.knowledge_api.DocumentContent.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.knowledge_api.DocumentContent} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.knowledge_api.DocumentContent.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getContenttype(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getContentformat(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getContent_asU8(); + if (f.length > 0) { + writer.writeBytes( + 4, + f + ); + } + f = message.getMeta(); + if (f != null) { + writer.writeMessage( + 5, + f, + google_protobuf_struct_pb.Struct.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.knowledge_api.DocumentContent.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.knowledge_api.DocumentContent} returns this + */ +proto.knowledge_api.DocumentContent.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string contentType = 2; + * @return {string} + */ +proto.knowledge_api.DocumentContent.prototype.getContenttype = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.knowledge_api.DocumentContent} returns this + */ +proto.knowledge_api.DocumentContent.prototype.setContenttype = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string contentFormat = 3; + * @return {string} + */ +proto.knowledge_api.DocumentContent.prototype.getContentformat = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.knowledge_api.DocumentContent} returns this + */ +proto.knowledge_api.DocumentContent.prototype.setContentformat = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional bytes content = 4; + * @return {!(string|Uint8Array)} + */ +proto.knowledge_api.DocumentContent.prototype.getContent = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * optional bytes content = 4; + * This is a type-conversion wrapper around `getContent()` + * @return {string} + */ +proto.knowledge_api.DocumentContent.prototype.getContent_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getContent())); +}; + + +/** + * optional bytes content = 4; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getContent()` + * @return {!Uint8Array} + */ +proto.knowledge_api.DocumentContent.prototype.getContent_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getContent())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.knowledge_api.DocumentContent} returns this + */ +proto.knowledge_api.DocumentContent.prototype.setContent = function(value) { + return jspb.Message.setProto3BytesField(this, 4, value); +}; + + +/** + * optional google.protobuf.Struct meta = 5; + * @return {?proto.google.protobuf.Struct} + */ +proto.knowledge_api.DocumentContent.prototype.getMeta = function() { + return /** @type{?proto.google.protobuf.Struct} */ ( + jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 5)); +}; + + +/** + * @param {?proto.google.protobuf.Struct|undefined} value + * @return {!proto.knowledge_api.DocumentContent} returns this +*/ +proto.knowledge_api.DocumentContent.prototype.setMeta = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.knowledge_api.DocumentContent} returns this + */ +proto.knowledge_api.DocumentContent.prototype.clearMeta = function() { + return this.setMeta(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.knowledge_api.DocumentContent.prototype.hasMeta = function() { + return jspb.Message.getField(this, 5) != null; +}; + + + /** * List of repeated fields within this message type. * @private {!Array} @@ -3716,7 +4033,7 @@ proto.knowledge_api.CreateKnowledgeDocumentRequest.toObject = function(includeIn documentsource: jspb.Message.getFieldWithDefault(msg, 2, 0), datasource: jspb.Message.getFieldWithDefault(msg, 3, ""), contentsList: jspb.Message.toObjectList(msg.getContentsList(), - common_pb.Content.toObject, includeInstance), + proto.knowledge_api.DocumentContent.toObject, includeInstance), preprocess: jspb.Message.getFieldWithDefault(msg, 6, 0), separator: jspb.Message.getFieldWithDefault(msg, 7, ""), maxchunksize: jspb.Message.getFieldWithDefault(msg, 8, 0), @@ -3773,8 +4090,8 @@ proto.knowledge_api.CreateKnowledgeDocumentRequest.deserializeBinaryFromReader = msg.setDatasource(value); break; case 5: - var value = new common_pb.Content; - reader.readMessage(value,common_pb.Content.deserializeBinaryFromReader); + var value = new proto.knowledge_api.DocumentContent; + reader.readMessage(value,proto.knowledge_api.DocumentContent.deserializeBinaryFromReader); msg.addContents(value); break; case 6: @@ -3860,7 +4177,7 @@ proto.knowledge_api.CreateKnowledgeDocumentRequest.serializeBinaryToWriter = fun writer.writeRepeatedMessage( 5, f, - common_pb.Content.serializeBinaryToWriter + proto.knowledge_api.DocumentContent.serializeBinaryToWriter ); } f = message.getPreprocess(); @@ -3986,17 +4303,17 @@ proto.knowledge_api.CreateKnowledgeDocumentRequest.prototype.setDatasource = fun /** - * repeated Content contents = 5; - * @return {!Array} + * repeated DocumentContent contents = 5; + * @return {!Array} */ proto.knowledge_api.CreateKnowledgeDocumentRequest.prototype.getContentsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, common_pb.Content, 5)); + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.knowledge_api.DocumentContent, 5)); }; /** - * @param {!Array} value + * @param {!Array} value * @return {!proto.knowledge_api.CreateKnowledgeDocumentRequest} returns this */ proto.knowledge_api.CreateKnowledgeDocumentRequest.prototype.setContentsList = function(value) { @@ -4005,12 +4322,12 @@ proto.knowledge_api.CreateKnowledgeDocumentRequest.prototype.setContentsList = f /** - * @param {!proto.Content=} opt_value + * @param {!proto.knowledge_api.DocumentContent=} opt_value * @param {number=} opt_index - * @return {!proto.Content} + * @return {!proto.knowledge_api.DocumentContent} */ proto.knowledge_api.CreateKnowledgeDocumentRequest.prototype.addContents = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.Content, opt_index); + return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.knowledge_api.DocumentContent, opt_index); }; diff --git a/src/clients/protos/talk-api_pb.d.ts b/src/clients/protos/talk-api_pb.d.ts index d07c00c..5384fb1 100644 --- a/src/clients/protos/talk-api_pb.d.ts +++ b/src/clients/protos/talk-api_pb.d.ts @@ -4,33 +4,432 @@ import * as jspb from "google-protobuf"; import * as google_protobuf_any_pb from "google-protobuf/google/protobuf/any_pb"; import * as common_pb from "./common_pb"; +import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/timestamp_pb"; -export class AssistantMessagingRequest extends jspb.Message { +export class ConversationToolCall extends jspb.Message { + getId(): string; + setId(value: string): void; + + getToolid(): string; + setToolid(value: string): void; + + getName(): string; + setName(value: string): void; + + getArgsMap(): jspb.Map; + clearArgsMap(): void; + hasTime(): boolean; + clearTime(): void; + getTime(): google_protobuf_timestamp_pb.Timestamp | undefined; + setTime(value?: google_protobuf_timestamp_pb.Timestamp): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ConversationToolCall.AsObject; + static toObject(includeInstance: boolean, msg: ConversationToolCall): ConversationToolCall.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ConversationToolCall, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ConversationToolCall; + static deserializeBinaryFromReader(message: ConversationToolCall, reader: jspb.BinaryReader): ConversationToolCall; +} + +export namespace ConversationToolCall { + export type AsObject = { + id: string, + toolid: string, + name: string, + argsMap: Array<[string, google_protobuf_any_pb.Any.AsObject]>, + time?: google_protobuf_timestamp_pb.Timestamp.AsObject, + } +} + +export class ConversationToolResult extends jspb.Message { + getId(): string; + setId(value: string): void; + + getToolid(): string; + setToolid(value: string): void; + + getName(): string; + setName(value: string): void; + + getArgsMap(): jspb.Map; + clearArgsMap(): void; + getSuccess(): boolean; + setSuccess(value: boolean): void; + + hasTime(): boolean; + clearTime(): void; + getTime(): google_protobuf_timestamp_pb.Timestamp | undefined; + setTime(value?: google_protobuf_timestamp_pb.Timestamp): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ConversationToolResult.AsObject; + static toObject(includeInstance: boolean, msg: ConversationToolResult): ConversationToolResult.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ConversationToolResult, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ConversationToolResult; + static deserializeBinaryFromReader(message: ConversationToolResult, reader: jspb.BinaryReader): ConversationToolResult; +} + +export namespace ConversationToolResult { + export type AsObject = { + id: string, + toolid: string, + name: string, + argsMap: Array<[string, google_protobuf_any_pb.Any.AsObject]>, + success: boolean, + time?: google_protobuf_timestamp_pb.Timestamp.AsObject, + } +} + +export class ConversationDirective extends jspb.Message { + getId(): string; + setId(value: string): void; + + getType(): ConversationDirective.DirectiveTypeMap[keyof ConversationDirective.DirectiveTypeMap]; + setType(value: ConversationDirective.DirectiveTypeMap[keyof ConversationDirective.DirectiveTypeMap]): void; + + getArgsMap(): jspb.Map; + clearArgsMap(): void; + hasTime(): boolean; + clearTime(): void; + getTime(): google_protobuf_timestamp_pb.Timestamp | undefined; + setTime(value?: google_protobuf_timestamp_pb.Timestamp): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ConversationDirective.AsObject; + static toObject(includeInstance: boolean, msg: ConversationDirective): ConversationDirective.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ConversationDirective, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ConversationDirective; + static deserializeBinaryFromReader(message: ConversationDirective, reader: jspb.BinaryReader): ConversationDirective; +} + +export namespace ConversationDirective { + export type AsObject = { + id: string, + type: ConversationDirective.DirectiveTypeMap[keyof ConversationDirective.DirectiveTypeMap], + argsMap: Array<[string, google_protobuf_any_pb.Any.AsObject]>, + time?: google_protobuf_timestamp_pb.Timestamp.AsObject, + } + + export interface DirectiveTypeMap { + DIRECTIVE_TYPE_UNSPECIFIED: 0; + END_CONVERSATION: 1; + TRANSFER_CONVERSATION: 2; + PAUSE_CONVERSATION: 3; + MUTE_CALLER: 10; + UNMUTE_CALLER: 11; + } + + export const DirectiveType: DirectiveTypeMap; +} + +export class ConversationConfiguration extends jspb.Message { + getAssistantconversationid(): string; + setAssistantconversationid(value: string): void; + + hasAssistant(): boolean; + clearAssistant(): void; + getAssistant(): common_pb.AssistantDefinition | undefined; + setAssistant(value?: common_pb.AssistantDefinition): void; + + hasTime(): boolean; + clearTime(): void; + getTime(): google_protobuf_timestamp_pb.Timestamp | undefined; + setTime(value?: google_protobuf_timestamp_pb.Timestamp): void; + + getMetadataMap(): jspb.Map; + clearMetadataMap(): void; + getArgsMap(): jspb.Map; + clearArgsMap(): void; + getOptionsMap(): jspb.Map; + clearOptionsMap(): void; + hasInputconfig(): boolean; + clearInputconfig(): void; + getInputconfig(): StreamConfig | undefined; + setInputconfig(value?: StreamConfig): void; + + hasOutputconfig(): boolean; + clearOutputconfig(): void; + getOutputconfig(): StreamConfig | undefined; + setOutputconfig(value?: StreamConfig): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ConversationConfiguration.AsObject; + static toObject(includeInstance: boolean, msg: ConversationConfiguration): ConversationConfiguration.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ConversationConfiguration, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ConversationConfiguration; + static deserializeBinaryFromReader(message: ConversationConfiguration, reader: jspb.BinaryReader): ConversationConfiguration; +} + +export namespace ConversationConfiguration { + export type AsObject = { + assistantconversationid: string, + assistant?: common_pb.AssistantDefinition.AsObject, + time?: google_protobuf_timestamp_pb.Timestamp.AsObject, + metadataMap: Array<[string, google_protobuf_any_pb.Any.AsObject]>, + argsMap: Array<[string, google_protobuf_any_pb.Any.AsObject]>, + optionsMap: Array<[string, google_protobuf_any_pb.Any.AsObject]>, + inputconfig?: StreamConfig.AsObject, + outputconfig?: StreamConfig.AsObject, + } +} + +export class StreamConfig extends jspb.Message { + hasAudio(): boolean; + clearAudio(): void; + getAudio(): AudioConfig | undefined; + setAudio(value?: AudioConfig): void; + + hasText(): boolean; + clearText(): void; + getText(): TextConfig | undefined; + setText(value?: TextConfig): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): StreamConfig.AsObject; + static toObject(includeInstance: boolean, msg: StreamConfig): StreamConfig.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: StreamConfig, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): StreamConfig; + static deserializeBinaryFromReader(message: StreamConfig, reader: jspb.BinaryReader): StreamConfig; +} + +export namespace StreamConfig { + export type AsObject = { + audio?: AudioConfig.AsObject, + text?: TextConfig.AsObject, + } +} + +export class AudioConfig extends jspb.Message { + getSamplerate(): number; + setSamplerate(value: number): void; + + getAudioformat(): AudioConfig.AudioFormatMap[keyof AudioConfig.AudioFormatMap]; + setAudioformat(value: AudioConfig.AudioFormatMap[keyof AudioConfig.AudioFormatMap]): void; + + getChannels(): number; + setChannels(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): AudioConfig.AsObject; + static toObject(includeInstance: boolean, msg: AudioConfig): AudioConfig.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: AudioConfig, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): AudioConfig; + static deserializeBinaryFromReader(message: AudioConfig, reader: jspb.BinaryReader): AudioConfig; +} + +export namespace AudioConfig { + export type AsObject = { + samplerate: number, + audioformat: AudioConfig.AudioFormatMap[keyof AudioConfig.AudioFormatMap], + channels: number, + } + + export interface AudioFormatMap { + LINEAR16: 0; + MULAW8: 1; + } + + export const AudioFormat: AudioFormatMap; +} + +export class TextConfig extends jspb.Message { + getCharset(): string; + setCharset(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TextConfig.AsObject; + static toObject(includeInstance: boolean, msg: TextConfig): TextConfig.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TextConfig, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TextConfig; + static deserializeBinaryFromReader(message: TextConfig, reader: jspb.BinaryReader): TextConfig; +} + +export namespace TextConfig { + export type AsObject = { + charset: string, + } +} + +export class ConversationInterruption extends jspb.Message { + getId(): string; + setId(value: string): void; + + getType(): ConversationInterruption.InterruptionTypeMap[keyof ConversationInterruption.InterruptionTypeMap]; + setType(value: ConversationInterruption.InterruptionTypeMap[keyof ConversationInterruption.InterruptionTypeMap]): void; + + hasTime(): boolean; + clearTime(): void; + getTime(): google_protobuf_timestamp_pb.Timestamp | undefined; + setTime(value?: google_protobuf_timestamp_pb.Timestamp): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ConversationInterruption.AsObject; + static toObject(includeInstance: boolean, msg: ConversationInterruption): ConversationInterruption.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ConversationInterruption, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ConversationInterruption; + static deserializeBinaryFromReader(message: ConversationInterruption, reader: jspb.BinaryReader): ConversationInterruption; +} + +export namespace ConversationInterruption { + export type AsObject = { + id: string, + type: ConversationInterruption.InterruptionTypeMap[keyof ConversationInterruption.InterruptionTypeMap], + time?: google_protobuf_timestamp_pb.Timestamp.AsObject, + } + + export interface InterruptionTypeMap { + INTERRUPTION_TYPE_UNSPECIFIED: 0; + INTERRUPTION_TYPE_VAD: 1; + INTERRUPTION_TYPE_WORD: 2; + } + + export const InterruptionType: InterruptionTypeMap; +} + +export class ConversationAssistantMessage extends jspb.Message { + hasAudio(): boolean; + clearAudio(): void; + getAudio(): Uint8Array | string; + getAudio_asU8(): Uint8Array; + getAudio_asB64(): string; + setAudio(value: Uint8Array | string): void; + + hasText(): boolean; + clearText(): void; + getText(): string; + setText(value: string): void; + + getId(): string; + setId(value: string): void; + + getCompleted(): boolean; + setCompleted(value: boolean): void; + + hasTime(): boolean; + clearTime(): void; + getTime(): google_protobuf_timestamp_pb.Timestamp | undefined; + setTime(value?: google_protobuf_timestamp_pb.Timestamp): void; + + getMessageCase(): ConversationAssistantMessage.MessageCase; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ConversationAssistantMessage.AsObject; + static toObject(includeInstance: boolean, msg: ConversationAssistantMessage): ConversationAssistantMessage.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ConversationAssistantMessage, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ConversationAssistantMessage; + static deserializeBinaryFromReader(message: ConversationAssistantMessage, reader: jspb.BinaryReader): ConversationAssistantMessage; +} + +export namespace ConversationAssistantMessage { + export type AsObject = { + audio: Uint8Array | string, + text: string, + id: string, + completed: boolean, + time?: google_protobuf_timestamp_pb.Timestamp.AsObject, + } + + export enum MessageCase { + MESSAGE_NOT_SET = 0, + AUDIO = 10, + TEXT = 11, + } +} + +export class ConversationUserMessage extends jspb.Message { + hasAudio(): boolean; + clearAudio(): void; + getAudio(): Uint8Array | string; + getAudio_asU8(): Uint8Array; + getAudio_asB64(): string; + setAudio(value: Uint8Array | string): void; + + hasText(): boolean; + clearText(): void; + getText(): string; + setText(value: string): void; + + getId(): string; + setId(value: string): void; + + getCompleted(): boolean; + setCompleted(value: boolean): void; + + hasTime(): boolean; + clearTime(): void; + getTime(): google_protobuf_timestamp_pb.Timestamp | undefined; + setTime(value?: google_protobuf_timestamp_pb.Timestamp): void; + + getMessageCase(): ConversationUserMessage.MessageCase; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ConversationUserMessage.AsObject; + static toObject(includeInstance: boolean, msg: ConversationUserMessage): ConversationUserMessage.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ConversationUserMessage, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ConversationUserMessage; + static deserializeBinaryFromReader(message: ConversationUserMessage, reader: jspb.BinaryReader): ConversationUserMessage; +} + +export namespace ConversationUserMessage { + export type AsObject = { + audio: Uint8Array | string, + text: string, + id: string, + completed: boolean, + time?: google_protobuf_timestamp_pb.Timestamp.AsObject, + } + + export enum MessageCase { + MESSAGE_NOT_SET = 0, + AUDIO = 10, + TEXT = 11, + } +} + +export class AssistantTalkInput extends jspb.Message { hasConfiguration(): boolean; clearConfiguration(): void; - getConfiguration(): common_pb.AssistantConversationConfiguration | undefined; - setConfiguration(value?: common_pb.AssistantConversationConfiguration): void; + getConfiguration(): ConversationConfiguration | undefined; + setConfiguration(value?: ConversationConfiguration): void; hasMessage(): boolean; clearMessage(): void; - getMessage(): common_pb.AssistantConversationUserMessage | undefined; - setMessage(value?: common_pb.AssistantConversationUserMessage): void; + getMessage(): ConversationUserMessage | undefined; + setMessage(value?: ConversationUserMessage): void; - getRequestCase(): AssistantMessagingRequest.RequestCase; + getRequestCase(): AssistantTalkInput.RequestCase; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AssistantMessagingRequest.AsObject; - static toObject(includeInstance: boolean, msg: AssistantMessagingRequest): AssistantMessagingRequest.AsObject; + toObject(includeInstance?: boolean): AssistantTalkInput.AsObject; + static toObject(includeInstance: boolean, msg: AssistantTalkInput): AssistantTalkInput.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: AssistantMessagingRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): AssistantMessagingRequest; - static deserializeBinaryFromReader(message: AssistantMessagingRequest, reader: jspb.BinaryReader): AssistantMessagingRequest; + static serializeBinaryToWriter(message: AssistantTalkInput, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): AssistantTalkInput; + static deserializeBinaryFromReader(message: AssistantTalkInput, reader: jspb.BinaryReader): AssistantTalkInput; } -export namespace AssistantMessagingRequest { +export namespace AssistantTalkInput { export type AsObject = { - configuration?: common_pb.AssistantConversationConfiguration.AsObject, - message?: common_pb.AssistantConversationUserMessage.AsObject, + configuration?: ConversationConfiguration.AsObject, + message?: ConversationUserMessage.AsObject, } export enum RequestCase { @@ -40,7 +439,7 @@ export namespace AssistantMessagingRequest { } } -export class AssistantMessagingResponse extends jspb.Message { +export class AssistantTalkOutput extends jspb.Message { getCode(): number; setCode(value: number): void; @@ -49,54 +448,66 @@ export class AssistantMessagingResponse extends jspb.Message { hasConfiguration(): boolean; clearConfiguration(): void; - getConfiguration(): common_pb.AssistantConversationConfiguration | undefined; - setConfiguration(value?: common_pb.AssistantConversationConfiguration): void; + getConfiguration(): ConversationConfiguration | undefined; + setConfiguration(value?: ConversationConfiguration): void; hasInterruption(): boolean; clearInterruption(): void; - getInterruption(): common_pb.AssistantConversationInterruption | undefined; - setInterruption(value?: common_pb.AssistantConversationInterruption): void; + getInterruption(): ConversationInterruption | undefined; + setInterruption(value?: ConversationInterruption): void; hasUser(): boolean; clearUser(): void; - getUser(): common_pb.AssistantConversationUserMessage | undefined; - setUser(value?: common_pb.AssistantConversationUserMessage): void; + getUser(): ConversationUserMessage | undefined; + setUser(value?: ConversationUserMessage): void; hasAssistant(): boolean; clearAssistant(): void; - getAssistant(): common_pb.AssistantConversationAssistantMessage | undefined; - setAssistant(value?: common_pb.AssistantConversationAssistantMessage): void; + getAssistant(): ConversationAssistantMessage | undefined; + setAssistant(value?: ConversationAssistantMessage): void; - hasAction(): boolean; - clearAction(): void; - getAction(): common_pb.AssistantConversationAction | undefined; - setAction(value?: common_pb.AssistantConversationAction): void; + hasTool(): boolean; + clearTool(): void; + getTool(): ConversationToolCall | undefined; + setTool(value?: ConversationToolCall): void; + + hasToolresult(): boolean; + clearToolresult(): void; + getToolresult(): ConversationToolResult | undefined; + setToolresult(value?: ConversationToolResult): void; + + hasDirective(): boolean; + clearDirective(): void; + getDirective(): ConversationDirective | undefined; + setDirective(value?: ConversationDirective): void; hasError(): boolean; clearError(): void; getError(): common_pb.Error | undefined; setError(value?: common_pb.Error): void; - getDataCase(): AssistantMessagingResponse.DataCase; + getDataCase(): AssistantTalkOutput.DataCase; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AssistantMessagingResponse.AsObject; - static toObject(includeInstance: boolean, msg: AssistantMessagingResponse): AssistantMessagingResponse.AsObject; + toObject(includeInstance?: boolean): AssistantTalkOutput.AsObject; + static toObject(includeInstance: boolean, msg: AssistantTalkOutput): AssistantTalkOutput.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: AssistantMessagingResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): AssistantMessagingResponse; - static deserializeBinaryFromReader(message: AssistantMessagingResponse, reader: jspb.BinaryReader): AssistantMessagingResponse; + static serializeBinaryToWriter(message: AssistantTalkOutput, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): AssistantTalkOutput; + static deserializeBinaryFromReader(message: AssistantTalkOutput, reader: jspb.BinaryReader): AssistantTalkOutput; } -export namespace AssistantMessagingResponse { +export namespace AssistantTalkOutput { export type AsObject = { code: number, success: boolean, - configuration?: common_pb.AssistantConversationConfiguration.AsObject, - interruption?: common_pb.AssistantConversationInterruption.AsObject, - user?: common_pb.AssistantConversationUserMessage.AsObject, - assistant?: common_pb.AssistantConversationAssistantMessage.AsObject, - action?: common_pb.AssistantConversationAction.AsObject, + configuration?: ConversationConfiguration.AsObject, + interruption?: ConversationInterruption.AsObject, + user?: ConversationUserMessage.AsObject, + assistant?: ConversationAssistantMessage.AsObject, + tool?: ConversationToolCall.AsObject, + toolresult?: ConversationToolResult.AsObject, + directive?: ConversationDirective.AsObject, error?: common_pb.Error.AsObject, } @@ -106,7 +517,9 @@ export namespace AssistantMessagingResponse { INTERRUPTION = 10, USER = 11, ASSISTANT = 12, - ACTION = 14, + TOOL = 13, + TOOLRESULT = 14, + DIRECTIVE = 16, ERROR = 15, } } @@ -380,3 +793,116 @@ export namespace CreateBulkPhoneCallResponse { } } +export class TalkInput extends jspb.Message { + hasConfiguration(): boolean; + clearConfiguration(): void; + getConfiguration(): ConversationConfiguration | undefined; + setConfiguration(value?: ConversationConfiguration): void; + + hasMessage(): boolean; + clearMessage(): void; + getMessage(): ConversationUserMessage | undefined; + setMessage(value?: ConversationUserMessage): void; + + hasInterruption(): boolean; + clearInterruption(): void; + getInterruption(): ConversationInterruption | undefined; + setInterruption(value?: ConversationInterruption): void; + + getRequestCase(): TalkInput.RequestCase; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TalkInput.AsObject; + static toObject(includeInstance: boolean, msg: TalkInput): TalkInput.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TalkInput, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TalkInput; + static deserializeBinaryFromReader(message: TalkInput, reader: jspb.BinaryReader): TalkInput; +} + +export namespace TalkInput { + export type AsObject = { + configuration?: ConversationConfiguration.AsObject, + message?: ConversationUserMessage.AsObject, + interruption?: ConversationInterruption.AsObject, + } + + export enum RequestCase { + REQUEST_NOT_SET = 0, + CONFIGURATION = 2, + MESSAGE = 3, + INTERRUPTION = 4, + } +} + +export class TalkOutput extends jspb.Message { + getCode(): number; + setCode(value: number): void; + + getSuccess(): boolean; + setSuccess(value: boolean): void; + + hasInterruption(): boolean; + clearInterruption(): void; + getInterruption(): ConversationInterruption | undefined; + setInterruption(value?: ConversationInterruption): void; + + hasAssistant(): boolean; + clearAssistant(): void; + getAssistant(): ConversationAssistantMessage | undefined; + setAssistant(value?: ConversationAssistantMessage): void; + + hasTool(): boolean; + clearTool(): void; + getTool(): ConversationToolCall | undefined; + setTool(value?: ConversationToolCall): void; + + hasToolresult(): boolean; + clearToolresult(): void; + getToolresult(): ConversationToolResult | undefined; + setToolresult(value?: ConversationToolResult): void; + + hasDirective(): boolean; + clearDirective(): void; + getDirective(): ConversationDirective | undefined; + setDirective(value?: ConversationDirective): void; + + hasError(): boolean; + clearError(): void; + getError(): common_pb.Error | undefined; + setError(value?: common_pb.Error): void; + + getDataCase(): TalkOutput.DataCase; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TalkOutput.AsObject; + static toObject(includeInstance: boolean, msg: TalkOutput): TalkOutput.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TalkOutput, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TalkOutput; + static deserializeBinaryFromReader(message: TalkOutput, reader: jspb.BinaryReader): TalkOutput; +} + +export namespace TalkOutput { + export type AsObject = { + code: number, + success: boolean, + interruption?: ConversationInterruption.AsObject, + assistant?: ConversationAssistantMessage.AsObject, + tool?: ConversationToolCall.AsObject, + toolresult?: ConversationToolResult.AsObject, + directive?: ConversationDirective.AsObject, + error?: common_pb.Error.AsObject, + } + + export enum DataCase { + DATA_NOT_SET = 0, + INTERRUPTION = 10, + ASSISTANT = 12, + TOOL = 13, + TOOLRESULT = 14, + DIRECTIVE = 16, + ERROR = 15, + } +} + diff --git a/src/clients/protos/talk-api_pb.js b/src/clients/protos/talk-api_pb.js index d07ce20..8f71999 100644 --- a/src/clients/protos/talk-api_pb.js +++ b/src/clients/protos/talk-api_pb.js @@ -19,10 +19,25 @@ var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js' goog.object.extend(proto, google_protobuf_any_pb); var common_pb = require('./common_pb.js'); goog.object.extend(proto, common_pb); -goog.exportSymbol('proto.talk_api.AssistantMessagingRequest', null, global); -goog.exportSymbol('proto.talk_api.AssistantMessagingRequest.RequestCase', null, global); -goog.exportSymbol('proto.talk_api.AssistantMessagingResponse', null, global); -goog.exportSymbol('proto.talk_api.AssistantMessagingResponse.DataCase', null, global); +var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); +goog.object.extend(proto, google_protobuf_timestamp_pb); +goog.exportSymbol('proto.talk_api.AssistantTalkInput', null, global); +goog.exportSymbol('proto.talk_api.AssistantTalkInput.RequestCase', null, global); +goog.exportSymbol('proto.talk_api.AssistantTalkOutput', null, global); +goog.exportSymbol('proto.talk_api.AssistantTalkOutput.DataCase', null, global); +goog.exportSymbol('proto.talk_api.AudioConfig', null, global); +goog.exportSymbol('proto.talk_api.AudioConfig.AudioFormat', null, global); +goog.exportSymbol('proto.talk_api.ConversationAssistantMessage', null, global); +goog.exportSymbol('proto.talk_api.ConversationAssistantMessage.MessageCase', null, global); +goog.exportSymbol('proto.talk_api.ConversationConfiguration', null, global); +goog.exportSymbol('proto.talk_api.ConversationDirective', null, global); +goog.exportSymbol('proto.talk_api.ConversationDirective.DirectiveType', null, global); +goog.exportSymbol('proto.talk_api.ConversationInterruption', null, global); +goog.exportSymbol('proto.talk_api.ConversationInterruption.InterruptionType', null, global); +goog.exportSymbol('proto.talk_api.ConversationToolCall', null, global); +goog.exportSymbol('proto.talk_api.ConversationToolResult', null, global); +goog.exportSymbol('proto.talk_api.ConversationUserMessage', null, global); +goog.exportSymbol('proto.talk_api.ConversationUserMessage.MessageCase', null, global); goog.exportSymbol('proto.talk_api.CreateBulkPhoneCallRequest', null, global); goog.exportSymbol('proto.talk_api.CreateBulkPhoneCallResponse', null, global); goog.exportSymbol('proto.talk_api.CreateConversationMetricRequest', null, global); @@ -31,6 +46,12 @@ goog.exportSymbol('proto.talk_api.CreateMessageMetricRequest', null, global); goog.exportSymbol('proto.talk_api.CreateMessageMetricResponse', null, global); goog.exportSymbol('proto.talk_api.CreatePhoneCallRequest', null, global); goog.exportSymbol('proto.talk_api.CreatePhoneCallResponse', null, global); +goog.exportSymbol('proto.talk_api.StreamConfig', null, global); +goog.exportSymbol('proto.talk_api.TalkInput', null, global); +goog.exportSymbol('proto.talk_api.TalkInput.RequestCase', null, global); +goog.exportSymbol('proto.talk_api.TalkOutput', null, global); +goog.exportSymbol('proto.talk_api.TalkOutput.DataCase', null, global); +goog.exportSymbol('proto.talk_api.TextConfig', null, global); /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -41,16 +62,226 @@ goog.exportSymbol('proto.talk_api.CreatePhoneCallResponse', null, global); * @extends {jspb.Message} * @constructor */ -proto.talk_api.AssistantMessagingRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.talk_api.AssistantMessagingRequest.oneofGroups_); +proto.talk_api.ConversationToolCall = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.talk_api.ConversationToolCall, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.talk_api.ConversationToolCall.displayName = 'proto.talk_api.ConversationToolCall'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.talk_api.ConversationToolResult = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.talk_api.ConversationToolResult, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.talk_api.ConversationToolResult.displayName = 'proto.talk_api.ConversationToolResult'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.talk_api.ConversationDirective = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.talk_api.ConversationDirective, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.talk_api.ConversationDirective.displayName = 'proto.talk_api.ConversationDirective'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.talk_api.ConversationConfiguration = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.talk_api.ConversationConfiguration, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.talk_api.ConversationConfiguration.displayName = 'proto.talk_api.ConversationConfiguration'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.talk_api.StreamConfig = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.talk_api.StreamConfig, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.talk_api.StreamConfig.displayName = 'proto.talk_api.StreamConfig'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.talk_api.AudioConfig = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.talk_api.AudioConfig, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.talk_api.AudioConfig.displayName = 'proto.talk_api.AudioConfig'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.talk_api.TextConfig = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.talk_api.TextConfig, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.talk_api.TextConfig.displayName = 'proto.talk_api.TextConfig'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.talk_api.ConversationInterruption = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.talk_api.ConversationInterruption, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.talk_api.ConversationInterruption.displayName = 'proto.talk_api.ConversationInterruption'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.talk_api.ConversationAssistantMessage = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.talk_api.ConversationAssistantMessage.oneofGroups_); +}; +goog.inherits(proto.talk_api.ConversationAssistantMessage, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.talk_api.ConversationAssistantMessage.displayName = 'proto.talk_api.ConversationAssistantMessage'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.talk_api.ConversationUserMessage = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.talk_api.ConversationUserMessage.oneofGroups_); +}; +goog.inherits(proto.talk_api.ConversationUserMessage, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.talk_api.ConversationUserMessage.displayName = 'proto.talk_api.ConversationUserMessage'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.talk_api.AssistantTalkInput = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.talk_api.AssistantTalkInput.oneofGroups_); }; -goog.inherits(proto.talk_api.AssistantMessagingRequest, jspb.Message); +goog.inherits(proto.talk_api.AssistantTalkInput, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.talk_api.AssistantMessagingRequest.displayName = 'proto.talk_api.AssistantMessagingRequest'; + proto.talk_api.AssistantTalkInput.displayName = 'proto.talk_api.AssistantTalkInput'; } /** * Generated by JsPbCodeGenerator. @@ -62,16 +293,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.talk_api.AssistantMessagingResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.talk_api.AssistantMessagingResponse.oneofGroups_); +proto.talk_api.AssistantTalkOutput = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.talk_api.AssistantTalkOutput.oneofGroups_); }; -goog.inherits(proto.talk_api.AssistantMessagingResponse, jspb.Message); +goog.inherits(proto.talk_api.AssistantTalkOutput, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.talk_api.AssistantMessagingResponse.displayName = 'proto.talk_api.AssistantMessagingResponse'; + proto.talk_api.AssistantTalkOutput.displayName = 'proto.talk_api.AssistantTalkOutput'; } /** * Generated by JsPbCodeGenerator. @@ -241,32 +472,48 @@ if (goog.DEBUG && !COMPILED) { */ proto.talk_api.CreateBulkPhoneCallResponse.displayName = 'proto.talk_api.CreateBulkPhoneCallResponse'; } - -/** - * Oneof group definitions for this message. Each group defines the field - * numbers belonging to that group. When of these fields' value is set, all - * other fields in the group are cleared. During deserialization, if multiple - * fields are encountered for a group, only the last value seen will be kept. - * @private {!Array>} - * @const - */ -proto.talk_api.AssistantMessagingRequest.oneofGroups_ = [[2,3]]; - /** - * @enum {number} + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor */ -proto.talk_api.AssistantMessagingRequest.RequestCase = { - REQUEST_NOT_SET: 0, - CONFIGURATION: 2, - MESSAGE: 3 +proto.talk_api.TalkInput = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.talk_api.TalkInput.oneofGroups_); }; - +goog.inherits(proto.talk_api.TalkInput, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.talk_api.TalkInput.displayName = 'proto.talk_api.TalkInput'; +} /** - * @return {proto.talk_api.AssistantMessagingRequest.RequestCase} + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor */ -proto.talk_api.AssistantMessagingRequest.prototype.getRequestCase = function() { - return /** @type {proto.talk_api.AssistantMessagingRequest.RequestCase} */(jspb.Message.computeOneofCase(this, proto.talk_api.AssistantMessagingRequest.oneofGroups_[0])); +proto.talk_api.TalkOutput = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.talk_api.TalkOutput.oneofGroups_); }; +goog.inherits(proto.talk_api.TalkOutput, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.talk_api.TalkOutput.displayName = 'proto.talk_api.TalkOutput'; +} @@ -283,8 +530,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.talk_api.AssistantMessagingRequest.prototype.toObject = function(opt_includeInstance) { - return proto.talk_api.AssistantMessagingRequest.toObject(opt_includeInstance, this); +proto.talk_api.ConversationToolCall.prototype.toObject = function(opt_includeInstance) { + return proto.talk_api.ConversationToolCall.toObject(opt_includeInstance, this); }; @@ -293,14 +540,17 @@ proto.talk_api.AssistantMessagingRequest.prototype.toObject = function(opt_inclu * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.talk_api.AssistantMessagingRequest} msg The msg instance to transform. + * @param {!proto.talk_api.ConversationToolCall} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.talk_api.AssistantMessagingRequest.toObject = function(includeInstance, msg) { +proto.talk_api.ConversationToolCall.toObject = function(includeInstance, msg) { var f, obj = { - configuration: (f = msg.getConfiguration()) && common_pb.AssistantConversationConfiguration.toObject(includeInstance, f), - message: (f = msg.getMessage()) && common_pb.AssistantConversationUserMessage.toObject(includeInstance, f) + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + toolid: jspb.Message.getFieldWithDefault(msg, 2, ""), + name: jspb.Message.getFieldWithDefault(msg, 3, ""), + argsMap: (f = msg.getArgsMap()) ? f.toObject(includeInstance, proto.google.protobuf.Any.toObject) : [], + time: (f = msg.getTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) }; if (includeInstance) { @@ -314,38 +564,51 @@ proto.talk_api.AssistantMessagingRequest.toObject = function(includeInstance, ms /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.talk_api.AssistantMessagingRequest} + * @return {!proto.talk_api.ConversationToolCall} */ -proto.talk_api.AssistantMessagingRequest.deserializeBinary = function(bytes) { +proto.talk_api.ConversationToolCall.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.talk_api.AssistantMessagingRequest; - return proto.talk_api.AssistantMessagingRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.talk_api.ConversationToolCall; + return proto.talk_api.ConversationToolCall.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.talk_api.AssistantMessagingRequest} msg The message object to deserialize into. + * @param {!proto.talk_api.ConversationToolCall} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.talk_api.AssistantMessagingRequest} + * @return {!proto.talk_api.ConversationToolCall} */ -proto.talk_api.AssistantMessagingRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.talk_api.ConversationToolCall.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; case 2: - var value = new common_pb.AssistantConversationConfiguration; - reader.readMessage(value,common_pb.AssistantConversationConfiguration.deserializeBinaryFromReader); - msg.setConfiguration(value); + var value = /** @type {string} */ (reader.readString()); + msg.setToolid(value); break; case 3: - var value = new common_pb.AssistantConversationUserMessage; - reader.readMessage(value,common_pb.AssistantConversationUserMessage.deserializeBinaryFromReader); - msg.setMessage(value); + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 4: + var value = msg.getArgsMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.google.protobuf.Any.deserializeBinaryFromReader, "", new proto.google.protobuf.Any()); + }); + break; + case 5: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setTime(value); break; default: reader.skipField(); @@ -360,9 +623,9 @@ proto.talk_api.AssistantMessagingRequest.deserializeBinaryFromReader = function( * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.talk_api.AssistantMessagingRequest.prototype.serializeBinary = function() { +proto.talk_api.ConversationToolCall.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.talk_api.AssistantMessagingRequest.serializeBinaryToWriter(this, writer); + proto.talk_api.ConversationToolCall.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -370,138 +633,164 @@ proto.talk_api.AssistantMessagingRequest.prototype.serializeBinary = function() /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.talk_api.AssistantMessagingRequest} message + * @param {!proto.talk_api.ConversationToolCall} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.talk_api.AssistantMessagingRequest.serializeBinaryToWriter = function(message, writer) { +proto.talk_api.ConversationToolCall.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getConfiguration(); - if (f != null) { - writer.writeMessage( - 2, - f, - common_pb.AssistantConversationConfiguration.serializeBinaryToWriter + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f ); } - f = message.getMessage(); - if (f != null) { - writer.writeMessage( - 3, - f, - common_pb.AssistantConversationUserMessage.serializeBinaryToWriter + f = message.getToolid(); + if (f.length > 0) { + writer.writeString( + 2, + f ); } -}; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getArgsMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(4, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.google.protobuf.Any.serializeBinaryToWriter); + } + f = message.getTime(); + if (f != null) { + writer.writeMessage( + 5, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } +}; /** - * optional AssistantConversationConfiguration configuration = 2; - * @return {?proto.AssistantConversationConfiguration} + * optional string id = 1; + * @return {string} */ -proto.talk_api.AssistantMessagingRequest.prototype.getConfiguration = function() { - return /** @type{?proto.AssistantConversationConfiguration} */ ( - jspb.Message.getWrapperField(this, common_pb.AssistantConversationConfiguration, 2)); +proto.talk_api.ConversationToolCall.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * @param {?proto.AssistantConversationConfiguration|undefined} value - * @return {!proto.talk_api.AssistantMessagingRequest} returns this -*/ -proto.talk_api.AssistantMessagingRequest.prototype.setConfiguration = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.talk_api.AssistantMessagingRequest.oneofGroups_[0], value); + * @param {string} value + * @return {!proto.talk_api.ConversationToolCall} returns this + */ +proto.talk_api.ConversationToolCall.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; /** - * Clears the message field making it undefined. - * @return {!proto.talk_api.AssistantMessagingRequest} returns this + * optional string toolId = 2; + * @return {string} */ -proto.talk_api.AssistantMessagingRequest.prototype.clearConfiguration = function() { - return this.setConfiguration(undefined); +proto.talk_api.ConversationToolCall.prototype.getToolid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {string} value + * @return {!proto.talk_api.ConversationToolCall} returns this */ -proto.talk_api.AssistantMessagingRequest.prototype.hasConfiguration = function() { - return jspb.Message.getField(this, 2) != null; +proto.talk_api.ConversationToolCall.prototype.setToolid = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); }; /** - * optional AssistantConversationUserMessage message = 3; - * @return {?proto.AssistantConversationUserMessage} + * optional string name = 3; + * @return {string} */ -proto.talk_api.AssistantMessagingRequest.prototype.getMessage = function() { - return /** @type{?proto.AssistantConversationUserMessage} */ ( - jspb.Message.getWrapperField(this, common_pb.AssistantConversationUserMessage, 3)); +proto.talk_api.ConversationToolCall.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** - * @param {?proto.AssistantConversationUserMessage|undefined} value - * @return {!proto.talk_api.AssistantMessagingRequest} returns this -*/ -proto.talk_api.AssistantMessagingRequest.prototype.setMessage = function(value) { - return jspb.Message.setOneofWrapperField(this, 3, proto.talk_api.AssistantMessagingRequest.oneofGroups_[0], value); + * @param {string} value + * @return {!proto.talk_api.ConversationToolCall} returns this + */ +proto.talk_api.ConversationToolCall.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); }; /** - * Clears the message field making it undefined. - * @return {!proto.talk_api.AssistantMessagingRequest} returns this + * map args = 4; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} */ -proto.talk_api.AssistantMessagingRequest.prototype.clearMessage = function() { - return this.setMessage(undefined); +proto.talk_api.ConversationToolCall.prototype.getArgsMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 4, opt_noLazyCreate, + proto.google.protobuf.Any)); }; /** - * Returns whether this field is set. - * @return {boolean} + * Clears values from the map. The map will be non-null. + * @return {!proto.talk_api.ConversationToolCall} returns this */ -proto.talk_api.AssistantMessagingRequest.prototype.hasMessage = function() { - return jspb.Message.getField(this, 3) != null; -}; - +proto.talk_api.ConversationToolCall.prototype.clearArgsMap = function() { + this.getArgsMap().clear(); + return this;}; /** - * Oneof group definitions for this message. Each group defines the field - * numbers belonging to that group. When of these fields' value is set, all - * other fields in the group are cleared. During deserialization, if multiple - * fields are encountered for a group, only the last value seen will be kept. - * @private {!Array>} - * @const + * optional google.protobuf.Timestamp time = 5; + * @return {?proto.google.protobuf.Timestamp} */ -proto.talk_api.AssistantMessagingResponse.oneofGroups_ = [[9,10,11,12,14,15]]; +proto.talk_api.ConversationToolCall.prototype.getTime = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 5)); +}; + /** - * @enum {number} + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.talk_api.ConversationToolCall} returns this +*/ +proto.talk_api.ConversationToolCall.prototype.setTime = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.talk_api.ConversationToolCall} returns this */ -proto.talk_api.AssistantMessagingResponse.DataCase = { - DATA_NOT_SET: 0, - CONFIGURATION: 9, - INTERRUPTION: 10, - USER: 11, - ASSISTANT: 12, - ACTION: 14, - ERROR: 15 +proto.talk_api.ConversationToolCall.prototype.clearTime = function() { + return this.setTime(undefined); }; + /** - * @return {proto.talk_api.AssistantMessagingResponse.DataCase} + * Returns whether this field is set. + * @return {boolean} */ -proto.talk_api.AssistantMessagingResponse.prototype.getDataCase = function() { - return /** @type {proto.talk_api.AssistantMessagingResponse.DataCase} */(jspb.Message.computeOneofCase(this, proto.talk_api.AssistantMessagingResponse.oneofGroups_[0])); +proto.talk_api.ConversationToolCall.prototype.hasTime = function() { + return jspb.Message.getField(this, 5) != null; }; + + if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. @@ -515,8 +804,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.talk_api.AssistantMessagingResponse.prototype.toObject = function(opt_includeInstance) { - return proto.talk_api.AssistantMessagingResponse.toObject(opt_includeInstance, this); +proto.talk_api.ConversationToolResult.prototype.toObject = function(opt_includeInstance) { + return proto.talk_api.ConversationToolResult.toObject(opt_includeInstance, this); }; @@ -525,20 +814,18 @@ proto.talk_api.AssistantMessagingResponse.prototype.toObject = function(opt_incl * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.talk_api.AssistantMessagingResponse} msg The msg instance to transform. + * @param {!proto.talk_api.ConversationToolResult} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.talk_api.AssistantMessagingResponse.toObject = function(includeInstance, msg) { +proto.talk_api.ConversationToolResult.toObject = function(includeInstance, msg) { var f, obj = { - code: jspb.Message.getFieldWithDefault(msg, 1, 0), - success: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), - configuration: (f = msg.getConfiguration()) && common_pb.AssistantConversationConfiguration.toObject(includeInstance, f), - interruption: (f = msg.getInterruption()) && common_pb.AssistantConversationInterruption.toObject(includeInstance, f), - user: (f = msg.getUser()) && common_pb.AssistantConversationUserMessage.toObject(includeInstance, f), - assistant: (f = msg.getAssistant()) && common_pb.AssistantConversationAssistantMessage.toObject(includeInstance, f), - action: (f = msg.getAction()) && common_pb.AssistantConversationAction.toObject(includeInstance, f), - error: (f = msg.getError()) && common_pb.Error.toObject(includeInstance, f) + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + toolid: jspb.Message.getFieldWithDefault(msg, 2, ""), + name: jspb.Message.getFieldWithDefault(msg, 3, ""), + argsMap: (f = msg.getArgsMap()) ? f.toObject(includeInstance, proto.google.protobuf.Any.toObject) : [], + success: jspb.Message.getBooleanFieldWithDefault(msg, 5, false), + time: (f = msg.getTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) }; if (includeInstance) { @@ -552,23 +839,23 @@ proto.talk_api.AssistantMessagingResponse.toObject = function(includeInstance, m /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.talk_api.AssistantMessagingResponse} + * @return {!proto.talk_api.ConversationToolResult} */ -proto.talk_api.AssistantMessagingResponse.deserializeBinary = function(bytes) { +proto.talk_api.ConversationToolResult.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.talk_api.AssistantMessagingResponse; - return proto.talk_api.AssistantMessagingResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.talk_api.ConversationToolResult; + return proto.talk_api.ConversationToolResult.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.talk_api.AssistantMessagingResponse} msg The message object to deserialize into. + * @param {!proto.talk_api.ConversationToolResult} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.talk_api.AssistantMessagingResponse} + * @return {!proto.talk_api.ConversationToolResult} */ -proto.talk_api.AssistantMessagingResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.talk_api.ConversationToolResult.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -576,42 +863,31 @@ proto.talk_api.AssistantMessagingResponse.deserializeBinaryFromReader = function var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readInt32()); - msg.setCode(value); + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); break; case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setSuccess(value); - break; - case 9: - var value = new common_pb.AssistantConversationConfiguration; - reader.readMessage(value,common_pb.AssistantConversationConfiguration.deserializeBinaryFromReader); - msg.setConfiguration(value); - break; - case 10: - var value = new common_pb.AssistantConversationInterruption; - reader.readMessage(value,common_pb.AssistantConversationInterruption.deserializeBinaryFromReader); - msg.setInterruption(value); + var value = /** @type {string} */ (reader.readString()); + msg.setToolid(value); break; - case 11: - var value = new common_pb.AssistantConversationUserMessage; - reader.readMessage(value,common_pb.AssistantConversationUserMessage.deserializeBinaryFromReader); - msg.setUser(value); + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); break; - case 12: - var value = new common_pb.AssistantConversationAssistantMessage; - reader.readMessage(value,common_pb.AssistantConversationAssistantMessage.deserializeBinaryFromReader); - msg.setAssistant(value); + case 4: + var value = msg.getArgsMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.google.protobuf.Any.deserializeBinaryFromReader, "", new proto.google.protobuf.Any()); + }); break; - case 14: - var value = new common_pb.AssistantConversationAction; - reader.readMessage(value,common_pb.AssistantConversationAction.deserializeBinaryFromReader); - msg.setAction(value); + case 5: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setSuccess(value); break; - case 15: - var value = new common_pb.Error; - reader.readMessage(value,common_pb.Error.deserializeBinaryFromReader); - msg.setError(value); + case 6: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setTime(value); break; default: reader.skipField(); @@ -626,9 +902,9 @@ proto.talk_api.AssistantMessagingResponse.deserializeBinaryFromReader = function * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.talk_api.AssistantMessagingResponse.prototype.serializeBinary = function() { +proto.talk_api.ConversationToolResult.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.talk_api.AssistantMessagingResponse.serializeBinaryToWriter(this, writer); + proto.talk_api.ConversationToolResult.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -636,212 +912,174 @@ proto.talk_api.AssistantMessagingResponse.prototype.serializeBinary = function() /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.talk_api.AssistantMessagingResponse} message + * @param {!proto.talk_api.ConversationToolResult} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.talk_api.AssistantMessagingResponse.serializeBinaryToWriter = function(message, writer) { +proto.talk_api.ConversationToolResult.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getCode(); - if (f !== 0) { - writer.writeInt32( + f = message.getId(); + if (f.length > 0) { + writer.writeString( 1, f ); } - f = message.getSuccess(); - if (f) { - writer.writeBool( + f = message.getToolid(); + if (f.length > 0) { + writer.writeString( 2, f ); } - f = message.getConfiguration(); - if (f != null) { - writer.writeMessage( - 9, - f, - common_pb.AssistantConversationConfiguration.serializeBinaryToWriter - ); - } - f = message.getInterruption(); - if (f != null) { - writer.writeMessage( - 10, - f, - common_pb.AssistantConversationInterruption.serializeBinaryToWriter - ); - } - f = message.getUser(); - if (f != null) { - writer.writeMessage( - 11, - f, - common_pb.AssistantConversationUserMessage.serializeBinaryToWriter + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 3, + f ); } - f = message.getAssistant(); - if (f != null) { - writer.writeMessage( - 12, - f, - common_pb.AssistantConversationAssistantMessage.serializeBinaryToWriter - ); + f = message.getArgsMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(4, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.google.protobuf.Any.serializeBinaryToWriter); } - f = message.getAction(); - if (f != null) { - writer.writeMessage( - 14, - f, - common_pb.AssistantConversationAction.serializeBinaryToWriter + f = message.getSuccess(); + if (f) { + writer.writeBool( + 5, + f ); } - f = message.getError(); + f = message.getTime(); if (f != null) { writer.writeMessage( - 15, + 6, f, - common_pb.Error.serializeBinaryToWriter + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter ); } }; /** - * optional int32 code = 1; - * @return {number} + * optional string id = 1; + * @return {string} */ -proto.talk_api.AssistantMessagingResponse.prototype.getCode = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.talk_api.ConversationToolResult.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * @param {number} value - * @return {!proto.talk_api.AssistantMessagingResponse} returns this + * @param {string} value + * @return {!proto.talk_api.ConversationToolResult} returns this */ -proto.talk_api.AssistantMessagingResponse.prototype.setCode = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); +proto.talk_api.ConversationToolResult.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; /** - * optional bool success = 2; - * @return {boolean} + * optional string toolId = 2; + * @return {string} */ -proto.talk_api.AssistantMessagingResponse.prototype.getSuccess = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +proto.talk_api.ConversationToolResult.prototype.getToolid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * @param {boolean} value - * @return {!proto.talk_api.AssistantMessagingResponse} returns this + * @param {string} value + * @return {!proto.talk_api.ConversationToolResult} returns this */ -proto.talk_api.AssistantMessagingResponse.prototype.setSuccess = function(value) { - return jspb.Message.setProto3BooleanField(this, 2, value); +proto.talk_api.ConversationToolResult.prototype.setToolid = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); }; /** - * optional AssistantConversationConfiguration configuration = 9; - * @return {?proto.AssistantConversationConfiguration} + * optional string name = 3; + * @return {string} */ -proto.talk_api.AssistantMessagingResponse.prototype.getConfiguration = function() { - return /** @type{?proto.AssistantConversationConfiguration} */ ( - jspb.Message.getWrapperField(this, common_pb.AssistantConversationConfiguration, 9)); -}; - - -/** - * @param {?proto.AssistantConversationConfiguration|undefined} value - * @return {!proto.talk_api.AssistantMessagingResponse} returns this -*/ -proto.talk_api.AssistantMessagingResponse.prototype.setConfiguration = function(value) { - return jspb.Message.setOneofWrapperField(this, 9, proto.talk_api.AssistantMessagingResponse.oneofGroups_[0], value); +proto.talk_api.ConversationToolResult.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** - * Clears the message field making it undefined. - * @return {!proto.talk_api.AssistantMessagingResponse} returns this + * @param {string} value + * @return {!proto.talk_api.ConversationToolResult} returns this */ -proto.talk_api.AssistantMessagingResponse.prototype.clearConfiguration = function() { - return this.setConfiguration(undefined); +proto.talk_api.ConversationToolResult.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); }; /** - * Returns whether this field is set. - * @return {boolean} + * map args = 4; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} */ -proto.talk_api.AssistantMessagingResponse.prototype.hasConfiguration = function() { - return jspb.Message.getField(this, 9) != null; +proto.talk_api.ConversationToolResult.prototype.getArgsMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 4, opt_noLazyCreate, + proto.google.protobuf.Any)); }; /** - * optional AssistantConversationInterruption interruption = 10; - * @return {?proto.AssistantConversationInterruption} + * Clears values from the map. The map will be non-null. + * @return {!proto.talk_api.ConversationToolResult} returns this */ -proto.talk_api.AssistantMessagingResponse.prototype.getInterruption = function() { - return /** @type{?proto.AssistantConversationInterruption} */ ( - jspb.Message.getWrapperField(this, common_pb.AssistantConversationInterruption, 10)); -}; - - -/** - * @param {?proto.AssistantConversationInterruption|undefined} value - * @return {!proto.talk_api.AssistantMessagingResponse} returns this -*/ -proto.talk_api.AssistantMessagingResponse.prototype.setInterruption = function(value) { - return jspb.Message.setOneofWrapperField(this, 10, proto.talk_api.AssistantMessagingResponse.oneofGroups_[0], value); -}; +proto.talk_api.ConversationToolResult.prototype.clearArgsMap = function() { + this.getArgsMap().clear(); + return this;}; /** - * Clears the message field making it undefined. - * @return {!proto.talk_api.AssistantMessagingResponse} returns this + * optional bool success = 5; + * @return {boolean} */ -proto.talk_api.AssistantMessagingResponse.prototype.clearInterruption = function() { - return this.setInterruption(undefined); +proto.talk_api.ConversationToolResult.prototype.getSuccess = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {boolean} value + * @return {!proto.talk_api.ConversationToolResult} returns this */ -proto.talk_api.AssistantMessagingResponse.prototype.hasInterruption = function() { - return jspb.Message.getField(this, 10) != null; +proto.talk_api.ConversationToolResult.prototype.setSuccess = function(value) { + return jspb.Message.setProto3BooleanField(this, 5, value); }; /** - * optional AssistantConversationUserMessage user = 11; - * @return {?proto.AssistantConversationUserMessage} + * optional google.protobuf.Timestamp time = 6; + * @return {?proto.google.protobuf.Timestamp} */ -proto.talk_api.AssistantMessagingResponse.prototype.getUser = function() { - return /** @type{?proto.AssistantConversationUserMessage} */ ( - jspb.Message.getWrapperField(this, common_pb.AssistantConversationUserMessage, 11)); +proto.talk_api.ConversationToolResult.prototype.getTime = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 6)); }; /** - * @param {?proto.AssistantConversationUserMessage|undefined} value - * @return {!proto.talk_api.AssistantMessagingResponse} returns this + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.talk_api.ConversationToolResult} returns this */ -proto.talk_api.AssistantMessagingResponse.prototype.setUser = function(value) { - return jspb.Message.setOneofWrapperField(this, 11, proto.talk_api.AssistantMessagingResponse.oneofGroups_[0], value); +proto.talk_api.ConversationToolResult.prototype.setTime = function(value) { + return jspb.Message.setWrapperField(this, 6, value); }; /** * Clears the message field making it undefined. - * @return {!proto.talk_api.AssistantMessagingResponse} returns this + * @return {!proto.talk_api.ConversationToolResult} returns this */ -proto.talk_api.AssistantMessagingResponse.prototype.clearUser = function() { - return this.setUser(undefined); +proto.talk_api.ConversationToolResult.prototype.clearTime = function() { + return this.setTime(undefined); }; @@ -849,110 +1087,255 @@ proto.talk_api.AssistantMessagingResponse.prototype.clearUser = function() { * Returns whether this field is set. * @return {boolean} */ -proto.talk_api.AssistantMessagingResponse.prototype.hasUser = function() { - return jspb.Message.getField(this, 11) != null; +proto.talk_api.ConversationToolResult.prototype.hasTime = function() { + return jspb.Message.getField(this, 6) != null; }; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * optional AssistantConversationAssistantMessage assistant = 12; - * @return {?proto.AssistantConversationAssistantMessage} + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} */ -proto.talk_api.AssistantMessagingResponse.prototype.getAssistant = function() { - return /** @type{?proto.AssistantConversationAssistantMessage} */ ( - jspb.Message.getWrapperField(this, common_pb.AssistantConversationAssistantMessage, 12)); +proto.talk_api.ConversationDirective.prototype.toObject = function(opt_includeInstance) { + return proto.talk_api.ConversationDirective.toObject(opt_includeInstance, this); }; /** - * @param {?proto.AssistantConversationAssistantMessage|undefined} value - * @return {!proto.talk_api.AssistantMessagingResponse} returns this -*/ -proto.talk_api.AssistantMessagingResponse.prototype.setAssistant = function(value) { - return jspb.Message.setOneofWrapperField(this, 12, proto.talk_api.AssistantMessagingResponse.oneofGroups_[0], value); + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.talk_api.ConversationDirective} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.talk_api.ConversationDirective.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + type: jspb.Message.getFieldWithDefault(msg, 2, 0), + argsMap: (f = msg.getArgsMap()) ? f.toObject(includeInstance, proto.google.protobuf.Any.toObject) : [], + time: (f = msg.getTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * Clears the message field making it undefined. - * @return {!proto.talk_api.AssistantMessagingResponse} returns this + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.talk_api.ConversationDirective} */ -proto.talk_api.AssistantMessagingResponse.prototype.clearAssistant = function() { - return this.setAssistant(undefined); +proto.talk_api.ConversationDirective.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.talk_api.ConversationDirective; + return proto.talk_api.ConversationDirective.deserializeBinaryFromReader(msg, reader); }; /** - * Returns whether this field is set. - * @return {boolean} + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.talk_api.ConversationDirective} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.talk_api.ConversationDirective} */ -proto.talk_api.AssistantMessagingResponse.prototype.hasAssistant = function() { - return jspb.Message.getField(this, 12) != null; +proto.talk_api.ConversationDirective.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; + case 2: + var value = /** @type {!proto.talk_api.ConversationDirective.DirectiveType} */ (reader.readEnum()); + msg.setType(value); + break; + case 4: + var value = msg.getArgsMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.google.protobuf.Any.deserializeBinaryFromReader, "", new proto.google.protobuf.Any()); + }); + break; + case 5: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setTime(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * optional AssistantConversationAction action = 14; - * @return {?proto.AssistantConversationAction} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.talk_api.AssistantMessagingResponse.prototype.getAction = function() { - return /** @type{?proto.AssistantConversationAction} */ ( - jspb.Message.getWrapperField(this, common_pb.AssistantConversationAction, 14)); +proto.talk_api.ConversationDirective.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.talk_api.ConversationDirective.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * @param {?proto.AssistantConversationAction|undefined} value - * @return {!proto.talk_api.AssistantMessagingResponse} returns this -*/ -proto.talk_api.AssistantMessagingResponse.prototype.setAction = function(value) { - return jspb.Message.setOneofWrapperField(this, 14, proto.talk_api.AssistantMessagingResponse.oneofGroups_[0], value); + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.talk_api.ConversationDirective} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.talk_api.ConversationDirective.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getType(); + if (f !== 0.0) { + writer.writeEnum( + 2, + f + ); + } + f = message.getArgsMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(4, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.google.protobuf.Any.serializeBinaryToWriter); + } + f = message.getTime(); + if (f != null) { + writer.writeMessage( + 5, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } }; /** - * Clears the message field making it undefined. - * @return {!proto.talk_api.AssistantMessagingResponse} returns this + * @enum {number} + */ +proto.talk_api.ConversationDirective.DirectiveType = { + DIRECTIVE_TYPE_UNSPECIFIED: 0, + END_CONVERSATION: 1, + TRANSFER_CONVERSATION: 2, + PAUSE_CONVERSATION: 3, + MUTE_CALLER: 10, + UNMUTE_CALLER: 11 +}; + +/** + * optional string id = 1; + * @return {string} */ -proto.talk_api.AssistantMessagingResponse.prototype.clearAction = function() { - return this.setAction(undefined); +proto.talk_api.ConversationDirective.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {string} value + * @return {!proto.talk_api.ConversationDirective} returns this */ -proto.talk_api.AssistantMessagingResponse.prototype.hasAction = function() { - return jspb.Message.getField(this, 14) != null; +proto.talk_api.ConversationDirective.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; /** - * optional Error error = 15; - * @return {?proto.Error} + * optional DirectiveType type = 2; + * @return {!proto.talk_api.ConversationDirective.DirectiveType} */ -proto.talk_api.AssistantMessagingResponse.prototype.getError = function() { - return /** @type{?proto.Error} */ ( - jspb.Message.getWrapperField(this, common_pb.Error, 15)); +proto.talk_api.ConversationDirective.prototype.getType = function() { + return /** @type {!proto.talk_api.ConversationDirective.DirectiveType} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** - * @param {?proto.Error|undefined} value - * @return {!proto.talk_api.AssistantMessagingResponse} returns this + * @param {!proto.talk_api.ConversationDirective.DirectiveType} value + * @return {!proto.talk_api.ConversationDirective} returns this + */ +proto.talk_api.ConversationDirective.prototype.setType = function(value) { + return jspb.Message.setProto3EnumField(this, 2, value); +}; + + +/** + * map args = 4; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.talk_api.ConversationDirective.prototype.getArgsMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 4, opt_noLazyCreate, + proto.google.protobuf.Any)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.talk_api.ConversationDirective} returns this + */ +proto.talk_api.ConversationDirective.prototype.clearArgsMap = function() { + this.getArgsMap().clear(); + return this;}; + + +/** + * optional google.protobuf.Timestamp time = 5; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.talk_api.ConversationDirective.prototype.getTime = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 5)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.talk_api.ConversationDirective} returns this */ -proto.talk_api.AssistantMessagingResponse.prototype.setError = function(value) { - return jspb.Message.setOneofWrapperField(this, 15, proto.talk_api.AssistantMessagingResponse.oneofGroups_[0], value); +proto.talk_api.ConversationDirective.prototype.setTime = function(value) { + return jspb.Message.setWrapperField(this, 5, value); }; /** * Clears the message field making it undefined. - * @return {!proto.talk_api.AssistantMessagingResponse} returns this + * @return {!proto.talk_api.ConversationDirective} returns this */ -proto.talk_api.AssistantMessagingResponse.prototype.clearError = function() { - return this.setError(undefined); +proto.talk_api.ConversationDirective.prototype.clearTime = function() { + return this.setTime(undefined); }; @@ -960,19 +1343,12 @@ proto.talk_api.AssistantMessagingResponse.prototype.clearError = function() { * Returns whether this field is set. * @return {boolean} */ -proto.talk_api.AssistantMessagingResponse.prototype.hasError = function() { - return jspb.Message.getField(this, 15) != null; +proto.talk_api.ConversationDirective.prototype.hasTime = function() { + return jspb.Message.getField(this, 5) != null; }; -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.talk_api.CreateMessageMetricRequest.repeatedFields_ = [4]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -988,8 +1364,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.talk_api.CreateMessageMetricRequest.prototype.toObject = function(opt_includeInstance) { - return proto.talk_api.CreateMessageMetricRequest.toObject(opt_includeInstance, this); +proto.talk_api.ConversationConfiguration.prototype.toObject = function(opt_includeInstance) { + return proto.talk_api.ConversationConfiguration.toObject(opt_includeInstance, this); }; @@ -998,17 +1374,20 @@ proto.talk_api.CreateMessageMetricRequest.prototype.toObject = function(opt_incl * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.talk_api.CreateMessageMetricRequest} msg The msg instance to transform. + * @param {!proto.talk_api.ConversationConfiguration} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.talk_api.CreateMessageMetricRequest.toObject = function(includeInstance, msg) { +proto.talk_api.ConversationConfiguration.toObject = function(includeInstance, msg) { var f, obj = { - assistantid: jspb.Message.getFieldWithDefault(msg, 1, "0"), - assistantconversationid: jspb.Message.getFieldWithDefault(msg, 2, "0"), - messageid: jspb.Message.getFieldWithDefault(msg, 3, ""), - metricsList: jspb.Message.toObjectList(msg.getMetricsList(), - common_pb.Metric.toObject, includeInstance) + assistantconversationid: jspb.Message.getFieldWithDefault(msg, 1, "0"), + assistant: (f = msg.getAssistant()) && common_pb.AssistantDefinition.toObject(includeInstance, f), + time: (f = msg.getTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + metadataMap: (f = msg.getMetadataMap()) ? f.toObject(includeInstance, proto.google.protobuf.Any.toObject) : [], + argsMap: (f = msg.getArgsMap()) ? f.toObject(includeInstance, proto.google.protobuf.Any.toObject) : [], + optionsMap: (f = msg.getOptionsMap()) ? f.toObject(includeInstance, proto.google.protobuf.Any.toObject) : [], + inputconfig: (f = msg.getInputconfig()) && proto.talk_api.StreamConfig.toObject(includeInstance, f), + outputconfig: (f = msg.getOutputconfig()) && proto.talk_api.StreamConfig.toObject(includeInstance, f) }; if (includeInstance) { @@ -1022,23 +1401,23 @@ proto.talk_api.CreateMessageMetricRequest.toObject = function(includeInstance, m /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.talk_api.CreateMessageMetricRequest} + * @return {!proto.talk_api.ConversationConfiguration} */ -proto.talk_api.CreateMessageMetricRequest.deserializeBinary = function(bytes) { +proto.talk_api.ConversationConfiguration.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.talk_api.CreateMessageMetricRequest; - return proto.talk_api.CreateMessageMetricRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.talk_api.ConversationConfiguration; + return proto.talk_api.ConversationConfiguration.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.talk_api.CreateMessageMetricRequest} msg The message object to deserialize into. + * @param {!proto.talk_api.ConversationConfiguration} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.talk_api.CreateMessageMetricRequest} + * @return {!proto.talk_api.ConversationConfiguration} */ -proto.talk_api.CreateMessageMetricRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.talk_api.ConversationConfiguration.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1047,20 +1426,45 @@ proto.talk_api.CreateMessageMetricRequest.deserializeBinaryFromReader = function switch (field) { case 1: var value = /** @type {string} */ (reader.readUint64String()); - msg.setAssistantid(value); + msg.setAssistantconversationid(value); break; case 2: - var value = /** @type {string} */ (reader.readUint64String()); - msg.setAssistantconversationid(value); + var value = new common_pb.AssistantDefinition; + reader.readMessage(value,common_pb.AssistantDefinition.deserializeBinaryFromReader); + msg.setAssistant(value); break; case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setMessageid(value); + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setTime(value); break; case 4: - var value = new common_pb.Metric; - reader.readMessage(value,common_pb.Metric.deserializeBinaryFromReader); - msg.addMetrics(value); + var value = msg.getMetadataMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.google.protobuf.Any.deserializeBinaryFromReader, "", new proto.google.protobuf.Any()); + }); + break; + case 5: + var value = msg.getArgsMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.google.protobuf.Any.deserializeBinaryFromReader, "", new proto.google.protobuf.Any()); + }); + break; + case 6: + var value = msg.getOptionsMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.google.protobuf.Any.deserializeBinaryFromReader, "", new proto.google.protobuf.Any()); + }); + break; + case 7: + var value = new proto.talk_api.StreamConfig; + reader.readMessage(value,proto.talk_api.StreamConfig.deserializeBinaryFromReader); + msg.setInputconfig(value); + break; + case 8: + var value = new proto.talk_api.StreamConfig; + reader.readMessage(value,proto.talk_api.StreamConfig.deserializeBinaryFromReader); + msg.setOutputconfig(value); break; default: reader.skipField(); @@ -1075,9 +1479,9 @@ proto.talk_api.CreateMessageMetricRequest.deserializeBinaryFromReader = function * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.talk_api.CreateMessageMetricRequest.prototype.serializeBinary = function() { +proto.talk_api.ConversationConfiguration.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.talk_api.CreateMessageMetricRequest.serializeBinaryToWriter(this, writer); + proto.talk_api.ConversationConfiguration.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -1085,143 +1489,298 @@ proto.talk_api.CreateMessageMetricRequest.prototype.serializeBinary = function() /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.talk_api.CreateMessageMetricRequest} message + * @param {!proto.talk_api.ConversationConfiguration} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.talk_api.CreateMessageMetricRequest.serializeBinaryToWriter = function(message, writer) { +proto.talk_api.ConversationConfiguration.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getAssistantid(); + f = message.getAssistantconversationid(); if (parseInt(f, 10) !== 0) { writer.writeUint64String( 1, f ); } - f = message.getAssistantconversationid(); - if (parseInt(f, 10) !== 0) { - writer.writeUint64String( + f = message.getAssistant(); + if (f != null) { + writer.writeMessage( 2, - f + f, + common_pb.AssistantDefinition.serializeBinaryToWriter ); } - f = message.getMessageid(); - if (f.length > 0) { - writer.writeString( + f = message.getTime(); + if (f != null) { + writer.writeMessage( 3, - f + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter ); } - f = message.getMetricsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 4, + f = message.getMetadataMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(4, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.google.protobuf.Any.serializeBinaryToWriter); + } + f = message.getArgsMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(5, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.google.protobuf.Any.serializeBinaryToWriter); + } + f = message.getOptionsMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(6, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.google.protobuf.Any.serializeBinaryToWriter); + } + f = message.getInputconfig(); + if (f != null) { + writer.writeMessage( + 7, f, - common_pb.Metric.serializeBinaryToWriter + proto.talk_api.StreamConfig.serializeBinaryToWriter + ); + } + f = message.getOutputconfig(); + if (f != null) { + writer.writeMessage( + 8, + f, + proto.talk_api.StreamConfig.serializeBinaryToWriter ); } }; /** - * optional uint64 assistantId = 1; + * optional uint64 assistantConversationId = 1; * @return {string} */ -proto.talk_api.CreateMessageMetricRequest.prototype.getAssistantid = function() { +proto.talk_api.ConversationConfiguration.prototype.getAssistantconversationid = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); }; /** * @param {string} value - * @return {!proto.talk_api.CreateMessageMetricRequest} returns this + * @return {!proto.talk_api.ConversationConfiguration} returns this */ -proto.talk_api.CreateMessageMetricRequest.prototype.setAssistantid = function(value) { +proto.talk_api.ConversationConfiguration.prototype.setAssistantconversationid = function(value) { return jspb.Message.setProto3StringIntField(this, 1, value); }; /** - * optional uint64 assistantConversationId = 2; - * @return {string} + * optional AssistantDefinition assistant = 2; + * @return {?proto.AssistantDefinition} */ -proto.talk_api.CreateMessageMetricRequest.prototype.getAssistantconversationid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "0")); +proto.talk_api.ConversationConfiguration.prototype.getAssistant = function() { + return /** @type{?proto.AssistantDefinition} */ ( + jspb.Message.getWrapperField(this, common_pb.AssistantDefinition, 2)); }; /** - * @param {string} value - * @return {!proto.talk_api.CreateMessageMetricRequest} returns this - */ -proto.talk_api.CreateMessageMetricRequest.prototype.setAssistantconversationid = function(value) { - return jspb.Message.setProto3StringIntField(this, 2, value); + * @param {?proto.AssistantDefinition|undefined} value + * @return {!proto.talk_api.ConversationConfiguration} returns this +*/ +proto.talk_api.ConversationConfiguration.prototype.setAssistant = function(value) { + return jspb.Message.setWrapperField(this, 2, value); }; /** - * optional string messageId = 3; - * @return {string} + * Clears the message field making it undefined. + * @return {!proto.talk_api.ConversationConfiguration} returns this */ -proto.talk_api.CreateMessageMetricRequest.prototype.getMessageid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +proto.talk_api.ConversationConfiguration.prototype.clearAssistant = function() { + return this.setAssistant(undefined); }; /** - * @param {string} value - * @return {!proto.talk_api.CreateMessageMetricRequest} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.talk_api.CreateMessageMetricRequest.prototype.setMessageid = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); +proto.talk_api.ConversationConfiguration.prototype.hasAssistant = function() { + return jspb.Message.getField(this, 2) != null; }; /** - * repeated Metric metrics = 4; - * @return {!Array} + * optional google.protobuf.Timestamp time = 3; + * @return {?proto.google.protobuf.Timestamp} */ -proto.talk_api.CreateMessageMetricRequest.prototype.getMetricsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, common_pb.Metric, 4)); +proto.talk_api.ConversationConfiguration.prototype.getTime = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3)); }; /** - * @param {!Array} value - * @return {!proto.talk_api.CreateMessageMetricRequest} returns this + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.talk_api.ConversationConfiguration} returns this */ -proto.talk_api.CreateMessageMetricRequest.prototype.setMetricsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 4, value); +proto.talk_api.ConversationConfiguration.prototype.setTime = function(value) { + return jspb.Message.setWrapperField(this, 3, value); }; /** - * @param {!proto.Metric=} opt_value - * @param {number=} opt_index - * @return {!proto.Metric} + * Clears the message field making it undefined. + * @return {!proto.talk_api.ConversationConfiguration} returns this */ -proto.talk_api.CreateMessageMetricRequest.prototype.addMetrics = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.Metric, opt_index); +proto.talk_api.ConversationConfiguration.prototype.clearTime = function() { + return this.setTime(undefined); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.talk_api.CreateMessageMetricRequest} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.talk_api.CreateMessageMetricRequest.prototype.clearMetricsList = function() { - return this.setMetricsList([]); +proto.talk_api.ConversationConfiguration.prototype.hasTime = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * map metadata = 4; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.talk_api.ConversationConfiguration.prototype.getMetadataMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 4, opt_noLazyCreate, + proto.google.protobuf.Any)); }; +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.talk_api.ConversationConfiguration} returns this + */ +proto.talk_api.ConversationConfiguration.prototype.clearMetadataMap = function() { + this.getMetadataMap().clear(); + return this;}; + /** - * List of repeated fields within this message type. - * @private {!Array} - * @const + * map args = 5; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} */ -proto.talk_api.CreateMessageMetricResponse.repeatedFields_ = [3]; +proto.talk_api.ConversationConfiguration.prototype.getArgsMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 5, opt_noLazyCreate, + proto.google.protobuf.Any)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.talk_api.ConversationConfiguration} returns this + */ +proto.talk_api.ConversationConfiguration.prototype.clearArgsMap = function() { + this.getArgsMap().clear(); + return this;}; + + +/** + * map options = 6; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.talk_api.ConversationConfiguration.prototype.getOptionsMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 6, opt_noLazyCreate, + proto.google.protobuf.Any)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.talk_api.ConversationConfiguration} returns this + */ +proto.talk_api.ConversationConfiguration.prototype.clearOptionsMap = function() { + this.getOptionsMap().clear(); + return this;}; + + +/** + * optional StreamConfig inputConfig = 7; + * @return {?proto.talk_api.StreamConfig} + */ +proto.talk_api.ConversationConfiguration.prototype.getInputconfig = function() { + return /** @type{?proto.talk_api.StreamConfig} */ ( + jspb.Message.getWrapperField(this, proto.talk_api.StreamConfig, 7)); +}; + + +/** + * @param {?proto.talk_api.StreamConfig|undefined} value + * @return {!proto.talk_api.ConversationConfiguration} returns this +*/ +proto.talk_api.ConversationConfiguration.prototype.setInputconfig = function(value) { + return jspb.Message.setWrapperField(this, 7, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.talk_api.ConversationConfiguration} returns this + */ +proto.talk_api.ConversationConfiguration.prototype.clearInputconfig = function() { + return this.setInputconfig(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.talk_api.ConversationConfiguration.prototype.hasInputconfig = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * optional StreamConfig outputConfig = 8; + * @return {?proto.talk_api.StreamConfig} + */ +proto.talk_api.ConversationConfiguration.prototype.getOutputconfig = function() { + return /** @type{?proto.talk_api.StreamConfig} */ ( + jspb.Message.getWrapperField(this, proto.talk_api.StreamConfig, 8)); +}; + + +/** + * @param {?proto.talk_api.StreamConfig|undefined} value + * @return {!proto.talk_api.ConversationConfiguration} returns this +*/ +proto.talk_api.ConversationConfiguration.prototype.setOutputconfig = function(value) { + return jspb.Message.setWrapperField(this, 8, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.talk_api.ConversationConfiguration} returns this + */ +proto.talk_api.ConversationConfiguration.prototype.clearOutputconfig = function() { + return this.setOutputconfig(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.talk_api.ConversationConfiguration.prototype.hasOutputconfig = function() { + return jspb.Message.getField(this, 8) != null; +}; + + @@ -1238,8 +1797,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.talk_api.CreateMessageMetricResponse.prototype.toObject = function(opt_includeInstance) { - return proto.talk_api.CreateMessageMetricResponse.toObject(opt_includeInstance, this); +proto.talk_api.StreamConfig.prototype.toObject = function(opt_includeInstance) { + return proto.talk_api.StreamConfig.toObject(opt_includeInstance, this); }; @@ -1248,17 +1807,14 @@ proto.talk_api.CreateMessageMetricResponse.prototype.toObject = function(opt_inc * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.talk_api.CreateMessageMetricResponse} msg The msg instance to transform. + * @param {!proto.talk_api.StreamConfig} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.talk_api.CreateMessageMetricResponse.toObject = function(includeInstance, msg) { +proto.talk_api.StreamConfig.toObject = function(includeInstance, msg) { var f, obj = { - code: jspb.Message.getFieldWithDefault(msg, 1, 0), - success: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), - dataList: jspb.Message.toObjectList(msg.getDataList(), - common_pb.Metric.toObject, includeInstance), - error: (f = msg.getError()) && common_pb.Error.toObject(includeInstance, f) + audio: (f = msg.getAudio()) && proto.talk_api.AudioConfig.toObject(includeInstance, f), + text: (f = msg.getText()) && proto.talk_api.TextConfig.toObject(includeInstance, f) }; if (includeInstance) { @@ -1272,23 +1828,23 @@ proto.talk_api.CreateMessageMetricResponse.toObject = function(includeInstance, /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.talk_api.CreateMessageMetricResponse} + * @return {!proto.talk_api.StreamConfig} */ -proto.talk_api.CreateMessageMetricResponse.deserializeBinary = function(bytes) { +proto.talk_api.StreamConfig.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.talk_api.CreateMessageMetricResponse; - return proto.talk_api.CreateMessageMetricResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.talk_api.StreamConfig; + return proto.talk_api.StreamConfig.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.talk_api.CreateMessageMetricResponse} msg The message object to deserialize into. + * @param {!proto.talk_api.StreamConfig} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.talk_api.CreateMessageMetricResponse} + * @return {!proto.talk_api.StreamConfig} */ -proto.talk_api.CreateMessageMetricResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.talk_api.StreamConfig.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1296,22 +1852,14 @@ proto.talk_api.CreateMessageMetricResponse.deserializeBinaryFromReader = functio var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readInt32()); - msg.setCode(value); + var value = new proto.talk_api.AudioConfig; + reader.readMessage(value,proto.talk_api.AudioConfig.deserializeBinaryFromReader); + msg.setAudio(value); break; case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setSuccess(value); - break; - case 3: - var value = new common_pb.Metric; - reader.readMessage(value,common_pb.Metric.deserializeBinaryFromReader); - msg.addData(value); - break; - case 4: - var value = new common_pb.Error; - reader.readMessage(value,common_pb.Error.deserializeBinaryFromReader); - msg.setError(value); + var value = new proto.talk_api.TextConfig; + reader.readMessage(value,proto.talk_api.TextConfig.deserializeBinaryFromReader); + msg.setText(value); break; default: reader.skipField(); @@ -1326,9 +1874,9 @@ proto.talk_api.CreateMessageMetricResponse.deserializeBinaryFromReader = functio * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.talk_api.CreateMessageMetricResponse.prototype.serializeBinary = function() { +proto.talk_api.StreamConfig.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.talk_api.CreateMessageMetricResponse.serializeBinaryToWriter(this, writer); + proto.talk_api.StreamConfig.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -1336,144 +1884,93 @@ proto.talk_api.CreateMessageMetricResponse.prototype.serializeBinary = function( /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.talk_api.CreateMessageMetricResponse} message + * @param {!proto.talk_api.StreamConfig} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.talk_api.CreateMessageMetricResponse.serializeBinaryToWriter = function(message, writer) { +proto.talk_api.StreamConfig.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getCode(); - if (f !== 0) { - writer.writeInt32( + f = message.getAudio(); + if (f != null) { + writer.writeMessage( 1, - f - ); - } - f = message.getSuccess(); - if (f) { - writer.writeBool( - 2, - f - ); - } - f = message.getDataList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 3, f, - common_pb.Metric.serializeBinaryToWriter + proto.talk_api.AudioConfig.serializeBinaryToWriter ); } - f = message.getError(); + f = message.getText(); if (f != null) { writer.writeMessage( - 4, + 2, f, - common_pb.Error.serializeBinaryToWriter + proto.talk_api.TextConfig.serializeBinaryToWriter ); } }; /** - * optional int32 code = 1; - * @return {number} - */ -proto.talk_api.CreateMessageMetricResponse.prototype.getCode = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.talk_api.CreateMessageMetricResponse} returns this - */ -proto.talk_api.CreateMessageMetricResponse.prototype.setCode = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional bool success = 2; - * @return {boolean} - */ -proto.talk_api.CreateMessageMetricResponse.prototype.getSuccess = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.talk_api.CreateMessageMetricResponse} returns this - */ -proto.talk_api.CreateMessageMetricResponse.prototype.setSuccess = function(value) { - return jspb.Message.setProto3BooleanField(this, 2, value); -}; - - -/** - * repeated Metric data = 3; - * @return {!Array} + * optional AudioConfig audio = 1; + * @return {?proto.talk_api.AudioConfig} */ -proto.talk_api.CreateMessageMetricResponse.prototype.getDataList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, common_pb.Metric, 3)); +proto.talk_api.StreamConfig.prototype.getAudio = function() { + return /** @type{?proto.talk_api.AudioConfig} */ ( + jspb.Message.getWrapperField(this, proto.talk_api.AudioConfig, 1)); }; /** - * @param {!Array} value - * @return {!proto.talk_api.CreateMessageMetricResponse} returns this + * @param {?proto.talk_api.AudioConfig|undefined} value + * @return {!proto.talk_api.StreamConfig} returns this */ -proto.talk_api.CreateMessageMetricResponse.prototype.setDataList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 3, value); +proto.talk_api.StreamConfig.prototype.setAudio = function(value) { + return jspb.Message.setWrapperField(this, 1, value); }; /** - * @param {!proto.Metric=} opt_value - * @param {number=} opt_index - * @return {!proto.Metric} + * Clears the message field making it undefined. + * @return {!proto.talk_api.StreamConfig} returns this */ -proto.talk_api.CreateMessageMetricResponse.prototype.addData = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.Metric, opt_index); +proto.talk_api.StreamConfig.prototype.clearAudio = function() { + return this.setAudio(undefined); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.talk_api.CreateMessageMetricResponse} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.talk_api.CreateMessageMetricResponse.prototype.clearDataList = function() { - return this.setDataList([]); +proto.talk_api.StreamConfig.prototype.hasAudio = function() { + return jspb.Message.getField(this, 1) != null; }; /** - * optional Error error = 4; - * @return {?proto.Error} + * optional TextConfig text = 2; + * @return {?proto.talk_api.TextConfig} */ -proto.talk_api.CreateMessageMetricResponse.prototype.getError = function() { - return /** @type{?proto.Error} */ ( - jspb.Message.getWrapperField(this, common_pb.Error, 4)); +proto.talk_api.StreamConfig.prototype.getText = function() { + return /** @type{?proto.talk_api.TextConfig} */ ( + jspb.Message.getWrapperField(this, proto.talk_api.TextConfig, 2)); }; /** - * @param {?proto.Error|undefined} value - * @return {!proto.talk_api.CreateMessageMetricResponse} returns this + * @param {?proto.talk_api.TextConfig|undefined} value + * @return {!proto.talk_api.StreamConfig} returns this */ -proto.talk_api.CreateMessageMetricResponse.prototype.setError = function(value) { - return jspb.Message.setWrapperField(this, 4, value); +proto.talk_api.StreamConfig.prototype.setText = function(value) { + return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. - * @return {!proto.talk_api.CreateMessageMetricResponse} returns this + * @return {!proto.talk_api.StreamConfig} returns this */ -proto.talk_api.CreateMessageMetricResponse.prototype.clearError = function() { - return this.setError(undefined); +proto.talk_api.StreamConfig.prototype.clearText = function() { + return this.setText(undefined); }; @@ -1481,19 +1978,12 @@ proto.talk_api.CreateMessageMetricResponse.prototype.clearError = function() { * Returns whether this field is set. * @return {boolean} */ -proto.talk_api.CreateMessageMetricResponse.prototype.hasError = function() { - return jspb.Message.getField(this, 4) != null; +proto.talk_api.StreamConfig.prototype.hasText = function() { + return jspb.Message.getField(this, 2) != null; }; -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.talk_api.CreateConversationMetricRequest.repeatedFields_ = [3]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -1509,8 +1999,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.talk_api.CreateConversationMetricRequest.prototype.toObject = function(opt_includeInstance) { - return proto.talk_api.CreateConversationMetricRequest.toObject(opt_includeInstance, this); +proto.talk_api.AudioConfig.prototype.toObject = function(opt_includeInstance) { + return proto.talk_api.AudioConfig.toObject(opt_includeInstance, this); }; @@ -1519,16 +2009,15 @@ proto.talk_api.CreateConversationMetricRequest.prototype.toObject = function(opt * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.talk_api.CreateConversationMetricRequest} msg The msg instance to transform. + * @param {!proto.talk_api.AudioConfig} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.talk_api.CreateConversationMetricRequest.toObject = function(includeInstance, msg) { +proto.talk_api.AudioConfig.toObject = function(includeInstance, msg) { var f, obj = { - assistantid: jspb.Message.getFieldWithDefault(msg, 1, "0"), - assistantconversationid: jspb.Message.getFieldWithDefault(msg, 2, "0"), - metricsList: jspb.Message.toObjectList(msg.getMetricsList(), - common_pb.Metric.toObject, includeInstance) + samplerate: jspb.Message.getFieldWithDefault(msg, 1, 0), + audioformat: jspb.Message.getFieldWithDefault(msg, 2, 0), + channels: jspb.Message.getFieldWithDefault(msg, 3, 0) }; if (includeInstance) { @@ -1542,23 +2031,23 @@ proto.talk_api.CreateConversationMetricRequest.toObject = function(includeInstan /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.talk_api.CreateConversationMetricRequest} + * @return {!proto.talk_api.AudioConfig} */ -proto.talk_api.CreateConversationMetricRequest.deserializeBinary = function(bytes) { +proto.talk_api.AudioConfig.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.talk_api.CreateConversationMetricRequest; - return proto.talk_api.CreateConversationMetricRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.talk_api.AudioConfig; + return proto.talk_api.AudioConfig.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.talk_api.CreateConversationMetricRequest} msg The message object to deserialize into. + * @param {!proto.talk_api.AudioConfig} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.talk_api.CreateConversationMetricRequest} + * @return {!proto.talk_api.AudioConfig} */ -proto.talk_api.CreateConversationMetricRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.talk_api.AudioConfig.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1566,17 +2055,16 @@ proto.talk_api.CreateConversationMetricRequest.deserializeBinaryFromReader = fun var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {string} */ (reader.readUint64String()); - msg.setAssistantid(value); + var value = /** @type {number} */ (reader.readUint32()); + msg.setSamplerate(value); break; case 2: - var value = /** @type {string} */ (reader.readUint64String()); - msg.setAssistantconversationid(value); + var value = /** @type {!proto.talk_api.AudioConfig.AudioFormat} */ (reader.readEnum()); + msg.setAudioformat(value); break; case 3: - var value = new common_pb.Metric; - reader.readMessage(value,common_pb.Metric.deserializeBinaryFromReader); - msg.addMetrics(value); + var value = /** @type {number} */ (reader.readUint32()); + msg.setChannels(value); break; default: reader.skipField(); @@ -1591,9 +2079,9 @@ proto.talk_api.CreateConversationMetricRequest.deserializeBinaryFromReader = fun * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.talk_api.CreateConversationMetricRequest.prototype.serializeBinary = function() { +proto.talk_api.AudioConfig.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.talk_api.CreateConversationMetricRequest.serializeBinaryToWriter(this, writer); + proto.talk_api.AudioConfig.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -1601,118 +2089,228 @@ proto.talk_api.CreateConversationMetricRequest.prototype.serializeBinary = funct /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.talk_api.CreateConversationMetricRequest} message + * @param {!proto.talk_api.AudioConfig} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.talk_api.CreateConversationMetricRequest.serializeBinaryToWriter = function(message, writer) { +proto.talk_api.AudioConfig.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getAssistantid(); - if (parseInt(f, 10) !== 0) { - writer.writeUint64String( + f = message.getSamplerate(); + if (f !== 0) { + writer.writeUint32( 1, f ); } - f = message.getAssistantconversationid(); - if (parseInt(f, 10) !== 0) { - writer.writeUint64String( + f = message.getAudioformat(); + if (f !== 0.0) { + writer.writeEnum( 2, f ); } - f = message.getMetricsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( + f = message.getChannels(); + if (f !== 0) { + writer.writeUint32( 3, - f, - common_pb.Metric.serializeBinaryToWriter + f ); } }; /** - * optional uint64 assistantId = 1; - * @return {string} + * @enum {number} */ -proto.talk_api.CreateConversationMetricRequest.prototype.getAssistantid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); +proto.talk_api.AudioConfig.AudioFormat = { + LINEAR16: 0, + MULAW8: 1 +}; + +/** + * optional uint32 sampleRate = 1; + * @return {number} + */ +proto.talk_api.AudioConfig.prototype.getSamplerate = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** - * @param {string} value - * @return {!proto.talk_api.CreateConversationMetricRequest} returns this + * @param {number} value + * @return {!proto.talk_api.AudioConfig} returns this */ -proto.talk_api.CreateConversationMetricRequest.prototype.setAssistantid = function(value) { - return jspb.Message.setProto3StringIntField(this, 1, value); +proto.talk_api.AudioConfig.prototype.setSamplerate = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); }; /** - * optional uint64 assistantConversationId = 2; - * @return {string} + * optional AudioFormat audioFormat = 2; + * @return {!proto.talk_api.AudioConfig.AudioFormat} */ -proto.talk_api.CreateConversationMetricRequest.prototype.getAssistantconversationid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "0")); +proto.talk_api.AudioConfig.prototype.getAudioformat = function() { + return /** @type {!proto.talk_api.AudioConfig.AudioFormat} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** - * @param {string} value - * @return {!proto.talk_api.CreateConversationMetricRequest} returns this + * @param {!proto.talk_api.AudioConfig.AudioFormat} value + * @return {!proto.talk_api.AudioConfig} returns this */ -proto.talk_api.CreateConversationMetricRequest.prototype.setAssistantconversationid = function(value) { - return jspb.Message.setProto3StringIntField(this, 2, value); +proto.talk_api.AudioConfig.prototype.setAudioformat = function(value) { + return jspb.Message.setProto3EnumField(this, 2, value); }; /** - * repeated Metric metrics = 3; - * @return {!Array} + * optional uint32 channels = 3; + * @return {number} */ -proto.talk_api.CreateConversationMetricRequest.prototype.getMetricsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, common_pb.Metric, 3)); +proto.talk_api.AudioConfig.prototype.getChannels = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** - * @param {!Array} value - * @return {!proto.talk_api.CreateConversationMetricRequest} returns this -*/ -proto.talk_api.CreateConversationMetricRequest.prototype.setMetricsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 3, value); + * @param {number} value + * @return {!proto.talk_api.AudioConfig} returns this + */ +proto.talk_api.AudioConfig.prototype.setChannels = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); }; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * @param {!proto.Metric=} opt_value - * @param {number=} opt_index - * @return {!proto.Metric} + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} */ -proto.talk_api.CreateConversationMetricRequest.prototype.addMetrics = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.Metric, opt_index); +proto.talk_api.TextConfig.prototype.toObject = function(opt_includeInstance) { + return proto.talk_api.TextConfig.toObject(opt_includeInstance, this); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.talk_api.CreateConversationMetricRequest} returns this + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.talk_api.TextConfig} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.talk_api.CreateConversationMetricRequest.prototype.clearMetricsList = function() { - return this.setMetricsList([]); +proto.talk_api.TextConfig.toObject = function(includeInstance, msg) { + var f, obj = { + charset: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.talk_api.TextConfig} + */ +proto.talk_api.TextConfig.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.talk_api.TextConfig; + return proto.talk_api.TextConfig.deserializeBinaryFromReader(msg, reader); +}; + /** - * List of repeated fields within this message type. - * @private {!Array} - * @const + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.talk_api.TextConfig} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.talk_api.TextConfig} */ -proto.talk_api.CreateConversationMetricResponse.repeatedFields_ = [3]; +proto.talk_api.TextConfig.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setCharset(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.talk_api.TextConfig.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.talk_api.TextConfig.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.talk_api.TextConfig} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.talk_api.TextConfig.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCharset(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string charset = 1; + * @return {string} + */ +proto.talk_api.TextConfig.prototype.getCharset = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.talk_api.TextConfig} returns this + */ +proto.talk_api.TextConfig.prototype.setCharset = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + @@ -1729,8 +2327,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.talk_api.CreateConversationMetricResponse.prototype.toObject = function(opt_includeInstance) { - return proto.talk_api.CreateConversationMetricResponse.toObject(opt_includeInstance, this); +proto.talk_api.ConversationInterruption.prototype.toObject = function(opt_includeInstance) { + return proto.talk_api.ConversationInterruption.toObject(opt_includeInstance, this); }; @@ -1739,17 +2337,15 @@ proto.talk_api.CreateConversationMetricResponse.prototype.toObject = function(op * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.talk_api.CreateConversationMetricResponse} msg The msg instance to transform. + * @param {!proto.talk_api.ConversationInterruption} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.talk_api.CreateConversationMetricResponse.toObject = function(includeInstance, msg) { +proto.talk_api.ConversationInterruption.toObject = function(includeInstance, msg) { var f, obj = { - code: jspb.Message.getFieldWithDefault(msg, 1, 0), - success: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), - dataList: jspb.Message.toObjectList(msg.getDataList(), - common_pb.Metric.toObject, includeInstance), - error: (f = msg.getError()) && common_pb.Error.toObject(includeInstance, f) + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + type: jspb.Message.getFieldWithDefault(msg, 2, 0), + time: (f = msg.getTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) }; if (includeInstance) { @@ -1763,23 +2359,23 @@ proto.talk_api.CreateConversationMetricResponse.toObject = function(includeInsta /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.talk_api.CreateConversationMetricResponse} + * @return {!proto.talk_api.ConversationInterruption} */ -proto.talk_api.CreateConversationMetricResponse.deserializeBinary = function(bytes) { +proto.talk_api.ConversationInterruption.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.talk_api.CreateConversationMetricResponse; - return proto.talk_api.CreateConversationMetricResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.talk_api.ConversationInterruption; + return proto.talk_api.ConversationInterruption.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.talk_api.CreateConversationMetricResponse} msg The message object to deserialize into. + * @param {!proto.talk_api.ConversationInterruption} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.talk_api.CreateConversationMetricResponse} + * @return {!proto.talk_api.ConversationInterruption} */ -proto.talk_api.CreateConversationMetricResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.talk_api.ConversationInterruption.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1787,22 +2383,17 @@ proto.talk_api.CreateConversationMetricResponse.deserializeBinaryFromReader = fu var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readInt32()); - msg.setCode(value); + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); break; case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setSuccess(value); + var value = /** @type {!proto.talk_api.ConversationInterruption.InterruptionType} */ (reader.readEnum()); + msg.setType(value); break; case 3: - var value = new common_pb.Metric; - reader.readMessage(value,common_pb.Metric.deserializeBinaryFromReader); - msg.addData(value); - break; - case 4: - var value = new common_pb.Error; - reader.readMessage(value,common_pb.Error.deserializeBinaryFromReader); - msg.setError(value); + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setTime(value); break; default: reader.skipField(); @@ -1817,9 +2408,9 @@ proto.talk_api.CreateConversationMetricResponse.deserializeBinaryFromReader = fu * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.talk_api.CreateConversationMetricResponse.prototype.serializeBinary = function() { +proto.talk_api.ConversationInterruption.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.talk_api.CreateConversationMetricResponse.serializeBinaryToWriter(this, writer); + proto.talk_api.ConversationInterruption.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -1827,159 +2418,148 @@ proto.talk_api.CreateConversationMetricResponse.prototype.serializeBinary = func /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.talk_api.CreateConversationMetricResponse} message + * @param {!proto.talk_api.ConversationInterruption} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.talk_api.CreateConversationMetricResponse.serializeBinaryToWriter = function(message, writer) { +proto.talk_api.ConversationInterruption.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getCode(); - if (f !== 0) { - writer.writeInt32( + f = message.getId(); + if (f.length > 0) { + writer.writeString( 1, f ); } - f = message.getSuccess(); - if (f) { - writer.writeBool( + f = message.getType(); + if (f !== 0.0) { + writer.writeEnum( 2, f ); } - f = message.getDataList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 3, - f, - common_pb.Metric.serializeBinaryToWriter - ); - } - f = message.getError(); + f = message.getTime(); if (f != null) { writer.writeMessage( - 4, + 3, f, - common_pb.Error.serializeBinaryToWriter + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter ); } }; /** - * optional int32 code = 1; - * @return {number} + * @enum {number} */ -proto.talk_api.CreateConversationMetricResponse.prototype.getCode = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.talk_api.ConversationInterruption.InterruptionType = { + INTERRUPTION_TYPE_UNSPECIFIED: 0, + INTERRUPTION_TYPE_VAD: 1, + INTERRUPTION_TYPE_WORD: 2 +}; + +/** + * optional string id = 1; + * @return {string} + */ +proto.talk_api.ConversationInterruption.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * @param {number} value - * @return {!proto.talk_api.CreateConversationMetricResponse} returns this + * @param {string} value + * @return {!proto.talk_api.ConversationInterruption} returns this */ -proto.talk_api.CreateConversationMetricResponse.prototype.setCode = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); +proto.talk_api.ConversationInterruption.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; /** - * optional bool success = 2; - * @return {boolean} + * optional InterruptionType type = 2; + * @return {!proto.talk_api.ConversationInterruption.InterruptionType} */ -proto.talk_api.CreateConversationMetricResponse.prototype.getSuccess = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +proto.talk_api.ConversationInterruption.prototype.getType = function() { + return /** @type {!proto.talk_api.ConversationInterruption.InterruptionType} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** - * @param {boolean} value - * @return {!proto.talk_api.CreateConversationMetricResponse} returns this + * @param {!proto.talk_api.ConversationInterruption.InterruptionType} value + * @return {!proto.talk_api.ConversationInterruption} returns this */ -proto.talk_api.CreateConversationMetricResponse.prototype.setSuccess = function(value) { - return jspb.Message.setProto3BooleanField(this, 2, value); +proto.talk_api.ConversationInterruption.prototype.setType = function(value) { + return jspb.Message.setProto3EnumField(this, 2, value); }; /** - * repeated Metric data = 3; - * @return {!Array} + * optional google.protobuf.Timestamp time = 3; + * @return {?proto.google.protobuf.Timestamp} */ -proto.talk_api.CreateConversationMetricResponse.prototype.getDataList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, common_pb.Metric, 3)); +proto.talk_api.ConversationInterruption.prototype.getTime = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3)); }; /** - * @param {!Array} value - * @return {!proto.talk_api.CreateConversationMetricResponse} returns this + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.talk_api.ConversationInterruption} returns this */ -proto.talk_api.CreateConversationMetricResponse.prototype.setDataList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 3, value); +proto.talk_api.ConversationInterruption.prototype.setTime = function(value) { + return jspb.Message.setWrapperField(this, 3, value); }; /** - * @param {!proto.Metric=} opt_value - * @param {number=} opt_index - * @return {!proto.Metric} + * Clears the message field making it undefined. + * @return {!proto.talk_api.ConversationInterruption} returns this */ -proto.talk_api.CreateConversationMetricResponse.prototype.addData = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.Metric, opt_index); +proto.talk_api.ConversationInterruption.prototype.clearTime = function() { + return this.setTime(undefined); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.talk_api.CreateConversationMetricResponse} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.talk_api.CreateConversationMetricResponse.prototype.clearDataList = function() { - return this.setDataList([]); +proto.talk_api.ConversationInterruption.prototype.hasTime = function() { + return jspb.Message.getField(this, 3) != null; }; -/** - * optional Error error = 4; - * @return {?proto.Error} - */ -proto.talk_api.CreateConversationMetricResponse.prototype.getError = function() { - return /** @type{?proto.Error} */ ( - jspb.Message.getWrapperField(this, common_pb.Error, 4)); -}; - /** - * @param {?proto.Error|undefined} value - * @return {!proto.talk_api.CreateConversationMetricResponse} returns this -*/ -proto.talk_api.CreateConversationMetricResponse.prototype.setError = function(value) { - return jspb.Message.setWrapperField(this, 4, value); -}; - + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.talk_api.ConversationAssistantMessage.oneofGroups_ = [[10,11]]; /** - * Clears the message field making it undefined. - * @return {!proto.talk_api.CreateConversationMetricResponse} returns this + * @enum {number} */ -proto.talk_api.CreateConversationMetricResponse.prototype.clearError = function() { - return this.setError(undefined); +proto.talk_api.ConversationAssistantMessage.MessageCase = { + MESSAGE_NOT_SET: 0, + AUDIO: 10, + TEXT: 11 }; - /** - * Returns whether this field is set. - * @return {boolean} + * @return {proto.talk_api.ConversationAssistantMessage.MessageCase} */ -proto.talk_api.CreateConversationMetricResponse.prototype.hasError = function() { - return jspb.Message.getField(this, 4) != null; +proto.talk_api.ConversationAssistantMessage.prototype.getMessageCase = function() { + return /** @type {proto.talk_api.ConversationAssistantMessage.MessageCase} */(jspb.Message.computeOneofCase(this, proto.talk_api.ConversationAssistantMessage.oneofGroups_[0])); }; - - if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. @@ -1993,8 +2573,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.talk_api.CreatePhoneCallRequest.prototype.toObject = function(opt_includeInstance) { - return proto.talk_api.CreatePhoneCallRequest.toObject(opt_includeInstance, this); +proto.talk_api.ConversationAssistantMessage.prototype.toObject = function(opt_includeInstance) { + return proto.talk_api.ConversationAssistantMessage.toObject(opt_includeInstance, this); }; @@ -2003,18 +2583,17 @@ proto.talk_api.CreatePhoneCallRequest.prototype.toObject = function(opt_includeI * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.talk_api.CreatePhoneCallRequest} msg The msg instance to transform. + * @param {!proto.talk_api.ConversationAssistantMessage} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.talk_api.CreatePhoneCallRequest.toObject = function(includeInstance, msg) { +proto.talk_api.ConversationAssistantMessage.toObject = function(includeInstance, msg) { var f, obj = { - assistant: (f = msg.getAssistant()) && common_pb.AssistantDefinition.toObject(includeInstance, f), - metadataMap: (f = msg.getMetadataMap()) ? f.toObject(includeInstance, proto.google.protobuf.Any.toObject) : [], - argsMap: (f = msg.getArgsMap()) ? f.toObject(includeInstance, proto.google.protobuf.Any.toObject) : [], - optionsMap: (f = msg.getOptionsMap()) ? f.toObject(includeInstance, proto.google.protobuf.Any.toObject) : [], - fromnumber: jspb.Message.getFieldWithDefault(msg, 6, ""), - tonumber: jspb.Message.getFieldWithDefault(msg, 7, "") + audio: msg.getAudio_asB64(), + text: jspb.Message.getFieldWithDefault(msg, 11, ""), + id: jspb.Message.getFieldWithDefault(msg, 2, ""), + completed: jspb.Message.getBooleanFieldWithDefault(msg, 3, false), + time: (f = msg.getTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) }; if (includeInstance) { @@ -2028,59 +2607,49 @@ proto.talk_api.CreatePhoneCallRequest.toObject = function(includeInstance, msg) /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.talk_api.CreatePhoneCallRequest} + * @return {!proto.talk_api.ConversationAssistantMessage} */ -proto.talk_api.CreatePhoneCallRequest.deserializeBinary = function(bytes) { +proto.talk_api.ConversationAssistantMessage.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.talk_api.CreatePhoneCallRequest; - return proto.talk_api.CreatePhoneCallRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.talk_api.ConversationAssistantMessage; + return proto.talk_api.ConversationAssistantMessage.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.talk_api.CreatePhoneCallRequest} msg The message object to deserialize into. + * @param {!proto.talk_api.ConversationAssistantMessage} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.talk_api.CreatePhoneCallRequest} + * @return {!proto.talk_api.ConversationAssistantMessage} */ -proto.talk_api.CreatePhoneCallRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.talk_api.ConversationAssistantMessage.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { - case 1: - var value = new common_pb.AssistantDefinition; - reader.readMessage(value,common_pb.AssistantDefinition.deserializeBinaryFromReader); - msg.setAssistant(value); - break; - case 3: - var value = msg.getMetadataMap(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.google.protobuf.Any.deserializeBinaryFromReader, "", new proto.google.protobuf.Any()); - }); - break; - case 4: - var value = msg.getArgsMap(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.google.protobuf.Any.deserializeBinaryFromReader, "", new proto.google.protobuf.Any()); - }); - break; - case 5: - var value = msg.getOptionsMap(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.google.protobuf.Any.deserializeBinaryFromReader, "", new proto.google.protobuf.Any()); - }); + case 10: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setAudio(value); break; - case 6: + case 11: var value = /** @type {string} */ (reader.readString()); - msg.setFromnumber(value); + msg.setText(value); break; - case 7: + case 2: var value = /** @type {string} */ (reader.readString()); - msg.setTonumber(value); + msg.setId(value); + break; + case 3: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setCompleted(value); + break; + case 4: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setTime(value); break; default: reader.skipField(); @@ -2095,9 +2664,9 @@ proto.talk_api.CreatePhoneCallRequest.deserializeBinaryFromReader = function(msg * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.talk_api.CreatePhoneCallRequest.prototype.serializeBinary = function() { +proto.talk_api.ConversationAssistantMessage.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.talk_api.CreatePhoneCallRequest.serializeBinaryToWriter(this, writer); + proto.talk_api.ConversationAssistantMessage.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -2105,74 +2674,99 @@ proto.talk_api.CreatePhoneCallRequest.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.talk_api.CreatePhoneCallRequest} message + * @param {!proto.talk_api.ConversationAssistantMessage} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.talk_api.CreatePhoneCallRequest.serializeBinaryToWriter = function(message, writer) { +proto.talk_api.ConversationAssistantMessage.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getAssistant(); + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 10)); if (f != null) { - writer.writeMessage( - 1, - f, - common_pb.AssistantDefinition.serializeBinaryToWriter + writer.writeBytes( + 10, + f ); } - f = message.getMetadataMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(3, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.google.protobuf.Any.serializeBinaryToWriter); - } - f = message.getArgsMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(4, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.google.protobuf.Any.serializeBinaryToWriter); - } - f = message.getOptionsMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(5, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.google.protobuf.Any.serializeBinaryToWriter); - } - f = message.getFromnumber(); - if (f.length > 0) { + f = /** @type {string} */ (jspb.Message.getField(message, 11)); + if (f != null) { writer.writeString( - 6, + 11, f ); } - f = message.getTonumber(); + f = message.getId(); if (f.length > 0) { writer.writeString( - 7, + 2, + f + ); + } + f = message.getCompleted(); + if (f) { + writer.writeBool( + 3, f ); } + f = message.getTime(); + if (f != null) { + writer.writeMessage( + 4, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } }; /** - * optional AssistantDefinition assistant = 1; - * @return {?proto.AssistantDefinition} + * optional bytes audio = 10; + * @return {!(string|Uint8Array)} */ -proto.talk_api.CreatePhoneCallRequest.prototype.getAssistant = function() { - return /** @type{?proto.AssistantDefinition} */ ( - jspb.Message.getWrapperField(this, common_pb.AssistantDefinition, 1)); +proto.talk_api.ConversationAssistantMessage.prototype.getAudio = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 10, "")); }; /** - * @param {?proto.AssistantDefinition|undefined} value - * @return {!proto.talk_api.CreatePhoneCallRequest} returns this -*/ -proto.talk_api.CreatePhoneCallRequest.prototype.setAssistant = function(value) { - return jspb.Message.setWrapperField(this, 1, value); + * optional bytes audio = 10; + * This is a type-conversion wrapper around `getAudio()` + * @return {string} + */ +proto.talk_api.ConversationAssistantMessage.prototype.getAudio_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getAudio())); }; /** - * Clears the message field making it undefined. - * @return {!proto.talk_api.CreatePhoneCallRequest} returns this + * optional bytes audio = 10; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getAudio()` + * @return {!Uint8Array} */ -proto.talk_api.CreatePhoneCallRequest.prototype.clearAssistant = function() { - return this.setAssistant(undefined); +proto.talk_api.ConversationAssistantMessage.prototype.getAudio_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getAudio())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.talk_api.ConversationAssistantMessage} returns this + */ +proto.talk_api.ConversationAssistantMessage.prototype.setAudio = function(value) { + return jspb.Message.setOneofField(this, 10, proto.talk_api.ConversationAssistantMessage.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.talk_api.ConversationAssistantMessage} returns this + */ +proto.talk_api.ConversationAssistantMessage.prototype.clearAudio = function() { + return jspb.Message.setOneofField(this, 10, proto.talk_api.ConversationAssistantMessage.oneofGroups_[0], undefined); }; @@ -2180,114 +2774,3057 @@ proto.talk_api.CreatePhoneCallRequest.prototype.clearAssistant = function() { * Returns whether this field is set. * @return {boolean} */ -proto.talk_api.CreatePhoneCallRequest.prototype.hasAssistant = function() { - return jspb.Message.getField(this, 1) != null; +proto.talk_api.ConversationAssistantMessage.prototype.hasAudio = function() { + return jspb.Message.getField(this, 10) != null; }; /** - * map metadata = 3; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} + * optional string text = 11; + * @return {string} */ -proto.talk_api.CreatePhoneCallRequest.prototype.getMetadataMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 3, opt_noLazyCreate, - proto.google.protobuf.Any)); +proto.talk_api.ConversationAssistantMessage.prototype.getText = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 11, "")); }; /** - * Clears values from the map. The map will be non-null. - * @return {!proto.talk_api.CreatePhoneCallRequest} returns this + * @param {string} value + * @return {!proto.talk_api.ConversationAssistantMessage} returns this */ -proto.talk_api.CreatePhoneCallRequest.prototype.clearMetadataMap = function() { - this.getMetadataMap().clear(); - return this;}; +proto.talk_api.ConversationAssistantMessage.prototype.setText = function(value) { + return jspb.Message.setOneofField(this, 11, proto.talk_api.ConversationAssistantMessage.oneofGroups_[0], value); +}; /** - * map args = 4; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} + * Clears the field making it undefined. + * @return {!proto.talk_api.ConversationAssistantMessage} returns this */ -proto.talk_api.CreatePhoneCallRequest.prototype.getArgsMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 4, opt_noLazyCreate, - proto.google.protobuf.Any)); +proto.talk_api.ConversationAssistantMessage.prototype.clearText = function() { + return jspb.Message.setOneofField(this, 11, proto.talk_api.ConversationAssistantMessage.oneofGroups_[0], undefined); }; /** - * Clears values from the map. The map will be non-null. - * @return {!proto.talk_api.CreatePhoneCallRequest} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.talk_api.CreatePhoneCallRequest.prototype.clearArgsMap = function() { - this.getArgsMap().clear(); - return this;}; +proto.talk_api.ConversationAssistantMessage.prototype.hasText = function() { + return jspb.Message.getField(this, 11) != null; +}; /** - * map options = 5; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} + * optional string id = 2; + * @return {string} */ -proto.talk_api.CreatePhoneCallRequest.prototype.getOptionsMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 5, opt_noLazyCreate, - proto.google.protobuf.Any)); +proto.talk_api.ConversationAssistantMessage.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * Clears values from the map. The map will be non-null. - * @return {!proto.talk_api.CreatePhoneCallRequest} returns this + * @param {string} value + * @return {!proto.talk_api.ConversationAssistantMessage} returns this */ -proto.talk_api.CreatePhoneCallRequest.prototype.clearOptionsMap = function() { - this.getOptionsMap().clear(); - return this;}; +proto.talk_api.ConversationAssistantMessage.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional bool completed = 3; + * @return {boolean} + */ +proto.talk_api.ConversationAssistantMessage.prototype.getCompleted = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.talk_api.ConversationAssistantMessage} returns this + */ +proto.talk_api.ConversationAssistantMessage.prototype.setCompleted = function(value) { + return jspb.Message.setProto3BooleanField(this, 3, value); +}; + + +/** + * optional google.protobuf.Timestamp time = 4; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.talk_api.ConversationAssistantMessage.prototype.getTime = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 4)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.talk_api.ConversationAssistantMessage} returns this +*/ +proto.talk_api.ConversationAssistantMessage.prototype.setTime = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.talk_api.ConversationAssistantMessage} returns this + */ +proto.talk_api.ConversationAssistantMessage.prototype.clearTime = function() { + return this.setTime(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.talk_api.ConversationAssistantMessage.prototype.hasTime = function() { + return jspb.Message.getField(this, 4) != null; +}; + + + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.talk_api.ConversationUserMessage.oneofGroups_ = [[10,11]]; + +/** + * @enum {number} + */ +proto.talk_api.ConversationUserMessage.MessageCase = { + MESSAGE_NOT_SET: 0, + AUDIO: 10, + TEXT: 11 +}; + +/** + * @return {proto.talk_api.ConversationUserMessage.MessageCase} + */ +proto.talk_api.ConversationUserMessage.prototype.getMessageCase = function() { + return /** @type {proto.talk_api.ConversationUserMessage.MessageCase} */(jspb.Message.computeOneofCase(this, proto.talk_api.ConversationUserMessage.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.talk_api.ConversationUserMessage.prototype.toObject = function(opt_includeInstance) { + return proto.talk_api.ConversationUserMessage.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.talk_api.ConversationUserMessage} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.talk_api.ConversationUserMessage.toObject = function(includeInstance, msg) { + var f, obj = { + audio: msg.getAudio_asB64(), + text: jspb.Message.getFieldWithDefault(msg, 11, ""), + id: jspb.Message.getFieldWithDefault(msg, 2, ""), + completed: jspb.Message.getBooleanFieldWithDefault(msg, 3, false), + time: (f = msg.getTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.talk_api.ConversationUserMessage} + */ +proto.talk_api.ConversationUserMessage.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.talk_api.ConversationUserMessage; + return proto.talk_api.ConversationUserMessage.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.talk_api.ConversationUserMessage} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.talk_api.ConversationUserMessage} + */ +proto.talk_api.ConversationUserMessage.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 10: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setAudio(value); + break; + case 11: + var value = /** @type {string} */ (reader.readString()); + msg.setText(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; + case 3: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setCompleted(value); + break; + case 4: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setTime(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.talk_api.ConversationUserMessage.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.talk_api.ConversationUserMessage.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.talk_api.ConversationUserMessage} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.talk_api.ConversationUserMessage.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 10)); + if (f != null) { + writer.writeBytes( + 10, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 11)); + if (f != null) { + writer.writeString( + 11, + f + ); + } + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getCompleted(); + if (f) { + writer.writeBool( + 3, + f + ); + } + f = message.getTime(); + if (f != null) { + writer.writeMessage( + 4, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } +}; + + +/** + * optional bytes audio = 10; + * @return {!(string|Uint8Array)} + */ +proto.talk_api.ConversationUserMessage.prototype.getAudio = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 10, "")); +}; + + +/** + * optional bytes audio = 10; + * This is a type-conversion wrapper around `getAudio()` + * @return {string} + */ +proto.talk_api.ConversationUserMessage.prototype.getAudio_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getAudio())); +}; + + +/** + * optional bytes audio = 10; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getAudio()` + * @return {!Uint8Array} + */ +proto.talk_api.ConversationUserMessage.prototype.getAudio_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getAudio())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.talk_api.ConversationUserMessage} returns this + */ +proto.talk_api.ConversationUserMessage.prototype.setAudio = function(value) { + return jspb.Message.setOneofField(this, 10, proto.talk_api.ConversationUserMessage.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.talk_api.ConversationUserMessage} returns this + */ +proto.talk_api.ConversationUserMessage.prototype.clearAudio = function() { + return jspb.Message.setOneofField(this, 10, proto.talk_api.ConversationUserMessage.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.talk_api.ConversationUserMessage.prototype.hasAudio = function() { + return jspb.Message.getField(this, 10) != null; +}; + + +/** + * optional string text = 11; + * @return {string} + */ +proto.talk_api.ConversationUserMessage.prototype.getText = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 11, "")); +}; + + +/** + * @param {string} value + * @return {!proto.talk_api.ConversationUserMessage} returns this + */ +proto.talk_api.ConversationUserMessage.prototype.setText = function(value) { + return jspb.Message.setOneofField(this, 11, proto.talk_api.ConversationUserMessage.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.talk_api.ConversationUserMessage} returns this + */ +proto.talk_api.ConversationUserMessage.prototype.clearText = function() { + return jspb.Message.setOneofField(this, 11, proto.talk_api.ConversationUserMessage.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.talk_api.ConversationUserMessage.prototype.hasText = function() { + return jspb.Message.getField(this, 11) != null; +}; + + +/** + * optional string id = 2; + * @return {string} + */ +proto.talk_api.ConversationUserMessage.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.talk_api.ConversationUserMessage} returns this + */ +proto.talk_api.ConversationUserMessage.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional bool completed = 3; + * @return {boolean} + */ +proto.talk_api.ConversationUserMessage.prototype.getCompleted = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.talk_api.ConversationUserMessage} returns this + */ +proto.talk_api.ConversationUserMessage.prototype.setCompleted = function(value) { + return jspb.Message.setProto3BooleanField(this, 3, value); +}; + + +/** + * optional google.protobuf.Timestamp time = 4; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.talk_api.ConversationUserMessage.prototype.getTime = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 4)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.talk_api.ConversationUserMessage} returns this +*/ +proto.talk_api.ConversationUserMessage.prototype.setTime = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.talk_api.ConversationUserMessage} returns this + */ +proto.talk_api.ConversationUserMessage.prototype.clearTime = function() { + return this.setTime(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.talk_api.ConversationUserMessage.prototype.hasTime = function() { + return jspb.Message.getField(this, 4) != null; +}; + + + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.talk_api.AssistantTalkInput.oneofGroups_ = [[2,3]]; + +/** + * @enum {number} + */ +proto.talk_api.AssistantTalkInput.RequestCase = { + REQUEST_NOT_SET: 0, + CONFIGURATION: 2, + MESSAGE: 3 +}; + +/** + * @return {proto.talk_api.AssistantTalkInput.RequestCase} + */ +proto.talk_api.AssistantTalkInput.prototype.getRequestCase = function() { + return /** @type {proto.talk_api.AssistantTalkInput.RequestCase} */(jspb.Message.computeOneofCase(this, proto.talk_api.AssistantTalkInput.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.talk_api.AssistantTalkInput.prototype.toObject = function(opt_includeInstance) { + return proto.talk_api.AssistantTalkInput.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.talk_api.AssistantTalkInput} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.talk_api.AssistantTalkInput.toObject = function(includeInstance, msg) { + var f, obj = { + configuration: (f = msg.getConfiguration()) && proto.talk_api.ConversationConfiguration.toObject(includeInstance, f), + message: (f = msg.getMessage()) && proto.talk_api.ConversationUserMessage.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.talk_api.AssistantTalkInput} + */ +proto.talk_api.AssistantTalkInput.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.talk_api.AssistantTalkInput; + return proto.talk_api.AssistantTalkInput.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.talk_api.AssistantTalkInput} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.talk_api.AssistantTalkInput} + */ +proto.talk_api.AssistantTalkInput.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 2: + var value = new proto.talk_api.ConversationConfiguration; + reader.readMessage(value,proto.talk_api.ConversationConfiguration.deserializeBinaryFromReader); + msg.setConfiguration(value); + break; + case 3: + var value = new proto.talk_api.ConversationUserMessage; + reader.readMessage(value,proto.talk_api.ConversationUserMessage.deserializeBinaryFromReader); + msg.setMessage(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.talk_api.AssistantTalkInput.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.talk_api.AssistantTalkInput.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.talk_api.AssistantTalkInput} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.talk_api.AssistantTalkInput.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getConfiguration(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.talk_api.ConversationConfiguration.serializeBinaryToWriter + ); + } + f = message.getMessage(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.talk_api.ConversationUserMessage.serializeBinaryToWriter + ); + } +}; + + +/** + * optional ConversationConfiguration configuration = 2; + * @return {?proto.talk_api.ConversationConfiguration} + */ +proto.talk_api.AssistantTalkInput.prototype.getConfiguration = function() { + return /** @type{?proto.talk_api.ConversationConfiguration} */ ( + jspb.Message.getWrapperField(this, proto.talk_api.ConversationConfiguration, 2)); +}; + + +/** + * @param {?proto.talk_api.ConversationConfiguration|undefined} value + * @return {!proto.talk_api.AssistantTalkInput} returns this +*/ +proto.talk_api.AssistantTalkInput.prototype.setConfiguration = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.talk_api.AssistantTalkInput.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.talk_api.AssistantTalkInput} returns this + */ +proto.talk_api.AssistantTalkInput.prototype.clearConfiguration = function() { + return this.setConfiguration(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.talk_api.AssistantTalkInput.prototype.hasConfiguration = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional ConversationUserMessage message = 3; + * @return {?proto.talk_api.ConversationUserMessage} + */ +proto.talk_api.AssistantTalkInput.prototype.getMessage = function() { + return /** @type{?proto.talk_api.ConversationUserMessage} */ ( + jspb.Message.getWrapperField(this, proto.talk_api.ConversationUserMessage, 3)); +}; + + +/** + * @param {?proto.talk_api.ConversationUserMessage|undefined} value + * @return {!proto.talk_api.AssistantTalkInput} returns this +*/ +proto.talk_api.AssistantTalkInput.prototype.setMessage = function(value) { + return jspb.Message.setOneofWrapperField(this, 3, proto.talk_api.AssistantTalkInput.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.talk_api.AssistantTalkInput} returns this + */ +proto.talk_api.AssistantTalkInput.prototype.clearMessage = function() { + return this.setMessage(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.talk_api.AssistantTalkInput.prototype.hasMessage = function() { + return jspb.Message.getField(this, 3) != null; +}; + + + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.talk_api.AssistantTalkOutput.oneofGroups_ = [[9,10,11,12,13,14,16,15]]; + +/** + * @enum {number} + */ +proto.talk_api.AssistantTalkOutput.DataCase = { + DATA_NOT_SET: 0, + CONFIGURATION: 9, + INTERRUPTION: 10, + USER: 11, + ASSISTANT: 12, + TOOL: 13, + TOOLRESULT: 14, + DIRECTIVE: 16, + ERROR: 15 +}; + +/** + * @return {proto.talk_api.AssistantTalkOutput.DataCase} + */ +proto.talk_api.AssistantTalkOutput.prototype.getDataCase = function() { + return /** @type {proto.talk_api.AssistantTalkOutput.DataCase} */(jspb.Message.computeOneofCase(this, proto.talk_api.AssistantTalkOutput.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.talk_api.AssistantTalkOutput.prototype.toObject = function(opt_includeInstance) { + return proto.talk_api.AssistantTalkOutput.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.talk_api.AssistantTalkOutput} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.talk_api.AssistantTalkOutput.toObject = function(includeInstance, msg) { + var f, obj = { + code: jspb.Message.getFieldWithDefault(msg, 1, 0), + success: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), + configuration: (f = msg.getConfiguration()) && proto.talk_api.ConversationConfiguration.toObject(includeInstance, f), + interruption: (f = msg.getInterruption()) && proto.talk_api.ConversationInterruption.toObject(includeInstance, f), + user: (f = msg.getUser()) && proto.talk_api.ConversationUserMessage.toObject(includeInstance, f), + assistant: (f = msg.getAssistant()) && proto.talk_api.ConversationAssistantMessage.toObject(includeInstance, f), + tool: (f = msg.getTool()) && proto.talk_api.ConversationToolCall.toObject(includeInstance, f), + toolresult: (f = msg.getToolresult()) && proto.talk_api.ConversationToolResult.toObject(includeInstance, f), + directive: (f = msg.getDirective()) && proto.talk_api.ConversationDirective.toObject(includeInstance, f), + error: (f = msg.getError()) && common_pb.Error.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.talk_api.AssistantTalkOutput} + */ +proto.talk_api.AssistantTalkOutput.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.talk_api.AssistantTalkOutput; + return proto.talk_api.AssistantTalkOutput.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.talk_api.AssistantTalkOutput} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.talk_api.AssistantTalkOutput} + */ +proto.talk_api.AssistantTalkOutput.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt32()); + msg.setCode(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setSuccess(value); + break; + case 9: + var value = new proto.talk_api.ConversationConfiguration; + reader.readMessage(value,proto.talk_api.ConversationConfiguration.deserializeBinaryFromReader); + msg.setConfiguration(value); + break; + case 10: + var value = new proto.talk_api.ConversationInterruption; + reader.readMessage(value,proto.talk_api.ConversationInterruption.deserializeBinaryFromReader); + msg.setInterruption(value); + break; + case 11: + var value = new proto.talk_api.ConversationUserMessage; + reader.readMessage(value,proto.talk_api.ConversationUserMessage.deserializeBinaryFromReader); + msg.setUser(value); + break; + case 12: + var value = new proto.talk_api.ConversationAssistantMessage; + reader.readMessage(value,proto.talk_api.ConversationAssistantMessage.deserializeBinaryFromReader); + msg.setAssistant(value); + break; + case 13: + var value = new proto.talk_api.ConversationToolCall; + reader.readMessage(value,proto.talk_api.ConversationToolCall.deserializeBinaryFromReader); + msg.setTool(value); + break; + case 14: + var value = new proto.talk_api.ConversationToolResult; + reader.readMessage(value,proto.talk_api.ConversationToolResult.deserializeBinaryFromReader); + msg.setToolresult(value); + break; + case 16: + var value = new proto.talk_api.ConversationDirective; + reader.readMessage(value,proto.talk_api.ConversationDirective.deserializeBinaryFromReader); + msg.setDirective(value); + break; + case 15: + var value = new common_pb.Error; + reader.readMessage(value,common_pb.Error.deserializeBinaryFromReader); + msg.setError(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.talk_api.AssistantTalkOutput.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.talk_api.AssistantTalkOutput.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.talk_api.AssistantTalkOutput} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.talk_api.AssistantTalkOutput.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCode(); + if (f !== 0) { + writer.writeInt32( + 1, + f + ); + } + f = message.getSuccess(); + if (f) { + writer.writeBool( + 2, + f + ); + } + f = message.getConfiguration(); + if (f != null) { + writer.writeMessage( + 9, + f, + proto.talk_api.ConversationConfiguration.serializeBinaryToWriter + ); + } + f = message.getInterruption(); + if (f != null) { + writer.writeMessage( + 10, + f, + proto.talk_api.ConversationInterruption.serializeBinaryToWriter + ); + } + f = message.getUser(); + if (f != null) { + writer.writeMessage( + 11, + f, + proto.talk_api.ConversationUserMessage.serializeBinaryToWriter + ); + } + f = message.getAssistant(); + if (f != null) { + writer.writeMessage( + 12, + f, + proto.talk_api.ConversationAssistantMessage.serializeBinaryToWriter + ); + } + f = message.getTool(); + if (f != null) { + writer.writeMessage( + 13, + f, + proto.talk_api.ConversationToolCall.serializeBinaryToWriter + ); + } + f = message.getToolresult(); + if (f != null) { + writer.writeMessage( + 14, + f, + proto.talk_api.ConversationToolResult.serializeBinaryToWriter + ); + } + f = message.getDirective(); + if (f != null) { + writer.writeMessage( + 16, + f, + proto.talk_api.ConversationDirective.serializeBinaryToWriter + ); + } + f = message.getError(); + if (f != null) { + writer.writeMessage( + 15, + f, + common_pb.Error.serializeBinaryToWriter + ); + } +}; + + +/** + * optional int32 code = 1; + * @return {number} + */ +proto.talk_api.AssistantTalkOutput.prototype.getCode = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.talk_api.AssistantTalkOutput} returns this + */ +proto.talk_api.AssistantTalkOutput.prototype.setCode = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional bool success = 2; + * @return {boolean} + */ +proto.talk_api.AssistantTalkOutput.prototype.getSuccess = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.talk_api.AssistantTalkOutput} returns this + */ +proto.talk_api.AssistantTalkOutput.prototype.setSuccess = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + +/** + * optional ConversationConfiguration configuration = 9; + * @return {?proto.talk_api.ConversationConfiguration} + */ +proto.talk_api.AssistantTalkOutput.prototype.getConfiguration = function() { + return /** @type{?proto.talk_api.ConversationConfiguration} */ ( + jspb.Message.getWrapperField(this, proto.talk_api.ConversationConfiguration, 9)); +}; + + +/** + * @param {?proto.talk_api.ConversationConfiguration|undefined} value + * @return {!proto.talk_api.AssistantTalkOutput} returns this +*/ +proto.talk_api.AssistantTalkOutput.prototype.setConfiguration = function(value) { + return jspb.Message.setOneofWrapperField(this, 9, proto.talk_api.AssistantTalkOutput.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.talk_api.AssistantTalkOutput} returns this + */ +proto.talk_api.AssistantTalkOutput.prototype.clearConfiguration = function() { + return this.setConfiguration(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.talk_api.AssistantTalkOutput.prototype.hasConfiguration = function() { + return jspb.Message.getField(this, 9) != null; +}; + + +/** + * optional ConversationInterruption interruption = 10; + * @return {?proto.talk_api.ConversationInterruption} + */ +proto.talk_api.AssistantTalkOutput.prototype.getInterruption = function() { + return /** @type{?proto.talk_api.ConversationInterruption} */ ( + jspb.Message.getWrapperField(this, proto.talk_api.ConversationInterruption, 10)); +}; + + +/** + * @param {?proto.talk_api.ConversationInterruption|undefined} value + * @return {!proto.talk_api.AssistantTalkOutput} returns this +*/ +proto.talk_api.AssistantTalkOutput.prototype.setInterruption = function(value) { + return jspb.Message.setOneofWrapperField(this, 10, proto.talk_api.AssistantTalkOutput.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.talk_api.AssistantTalkOutput} returns this + */ +proto.talk_api.AssistantTalkOutput.prototype.clearInterruption = function() { + return this.setInterruption(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.talk_api.AssistantTalkOutput.prototype.hasInterruption = function() { + return jspb.Message.getField(this, 10) != null; +}; + + +/** + * optional ConversationUserMessage user = 11; + * @return {?proto.talk_api.ConversationUserMessage} + */ +proto.talk_api.AssistantTalkOutput.prototype.getUser = function() { + return /** @type{?proto.talk_api.ConversationUserMessage} */ ( + jspb.Message.getWrapperField(this, proto.talk_api.ConversationUserMessage, 11)); +}; + + +/** + * @param {?proto.talk_api.ConversationUserMessage|undefined} value + * @return {!proto.talk_api.AssistantTalkOutput} returns this +*/ +proto.talk_api.AssistantTalkOutput.prototype.setUser = function(value) { + return jspb.Message.setOneofWrapperField(this, 11, proto.talk_api.AssistantTalkOutput.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.talk_api.AssistantTalkOutput} returns this + */ +proto.talk_api.AssistantTalkOutput.prototype.clearUser = function() { + return this.setUser(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.talk_api.AssistantTalkOutput.prototype.hasUser = function() { + return jspb.Message.getField(this, 11) != null; +}; + + +/** + * optional ConversationAssistantMessage assistant = 12; + * @return {?proto.talk_api.ConversationAssistantMessage} + */ +proto.talk_api.AssistantTalkOutput.prototype.getAssistant = function() { + return /** @type{?proto.talk_api.ConversationAssistantMessage} */ ( + jspb.Message.getWrapperField(this, proto.talk_api.ConversationAssistantMessage, 12)); +}; + + +/** + * @param {?proto.talk_api.ConversationAssistantMessage|undefined} value + * @return {!proto.talk_api.AssistantTalkOutput} returns this +*/ +proto.talk_api.AssistantTalkOutput.prototype.setAssistant = function(value) { + return jspb.Message.setOneofWrapperField(this, 12, proto.talk_api.AssistantTalkOutput.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.talk_api.AssistantTalkOutput} returns this + */ +proto.talk_api.AssistantTalkOutput.prototype.clearAssistant = function() { + return this.setAssistant(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.talk_api.AssistantTalkOutput.prototype.hasAssistant = function() { + return jspb.Message.getField(this, 12) != null; +}; + + +/** + * optional ConversationToolCall tool = 13; + * @return {?proto.talk_api.ConversationToolCall} + */ +proto.talk_api.AssistantTalkOutput.prototype.getTool = function() { + return /** @type{?proto.talk_api.ConversationToolCall} */ ( + jspb.Message.getWrapperField(this, proto.talk_api.ConversationToolCall, 13)); +}; + + +/** + * @param {?proto.talk_api.ConversationToolCall|undefined} value + * @return {!proto.talk_api.AssistantTalkOutput} returns this +*/ +proto.talk_api.AssistantTalkOutput.prototype.setTool = function(value) { + return jspb.Message.setOneofWrapperField(this, 13, proto.talk_api.AssistantTalkOutput.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.talk_api.AssistantTalkOutput} returns this + */ +proto.talk_api.AssistantTalkOutput.prototype.clearTool = function() { + return this.setTool(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.talk_api.AssistantTalkOutput.prototype.hasTool = function() { + return jspb.Message.getField(this, 13) != null; +}; + + +/** + * optional ConversationToolResult toolResult = 14; + * @return {?proto.talk_api.ConversationToolResult} + */ +proto.talk_api.AssistantTalkOutput.prototype.getToolresult = function() { + return /** @type{?proto.talk_api.ConversationToolResult} */ ( + jspb.Message.getWrapperField(this, proto.talk_api.ConversationToolResult, 14)); +}; + + +/** + * @param {?proto.talk_api.ConversationToolResult|undefined} value + * @return {!proto.talk_api.AssistantTalkOutput} returns this +*/ +proto.talk_api.AssistantTalkOutput.prototype.setToolresult = function(value) { + return jspb.Message.setOneofWrapperField(this, 14, proto.talk_api.AssistantTalkOutput.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.talk_api.AssistantTalkOutput} returns this + */ +proto.talk_api.AssistantTalkOutput.prototype.clearToolresult = function() { + return this.setToolresult(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.talk_api.AssistantTalkOutput.prototype.hasToolresult = function() { + return jspb.Message.getField(this, 14) != null; +}; + + +/** + * optional ConversationDirective directive = 16; + * @return {?proto.talk_api.ConversationDirective} + */ +proto.talk_api.AssistantTalkOutput.prototype.getDirective = function() { + return /** @type{?proto.talk_api.ConversationDirective} */ ( + jspb.Message.getWrapperField(this, proto.talk_api.ConversationDirective, 16)); +}; + + +/** + * @param {?proto.talk_api.ConversationDirective|undefined} value + * @return {!proto.talk_api.AssistantTalkOutput} returns this +*/ +proto.talk_api.AssistantTalkOutput.prototype.setDirective = function(value) { + return jspb.Message.setOneofWrapperField(this, 16, proto.talk_api.AssistantTalkOutput.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.talk_api.AssistantTalkOutput} returns this + */ +proto.talk_api.AssistantTalkOutput.prototype.clearDirective = function() { + return this.setDirective(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.talk_api.AssistantTalkOutput.prototype.hasDirective = function() { + return jspb.Message.getField(this, 16) != null; +}; + + +/** + * optional Error error = 15; + * @return {?proto.Error} + */ +proto.talk_api.AssistantTalkOutput.prototype.getError = function() { + return /** @type{?proto.Error} */ ( + jspb.Message.getWrapperField(this, common_pb.Error, 15)); +}; + + +/** + * @param {?proto.Error|undefined} value + * @return {!proto.talk_api.AssistantTalkOutput} returns this +*/ +proto.talk_api.AssistantTalkOutput.prototype.setError = function(value) { + return jspb.Message.setOneofWrapperField(this, 15, proto.talk_api.AssistantTalkOutput.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.talk_api.AssistantTalkOutput} returns this + */ +proto.talk_api.AssistantTalkOutput.prototype.clearError = function() { + return this.setError(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.talk_api.AssistantTalkOutput.prototype.hasError = function() { + return jspb.Message.getField(this, 15) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.talk_api.CreateMessageMetricRequest.repeatedFields_ = [4]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.talk_api.CreateMessageMetricRequest.prototype.toObject = function(opt_includeInstance) { + return proto.talk_api.CreateMessageMetricRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.talk_api.CreateMessageMetricRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.talk_api.CreateMessageMetricRequest.toObject = function(includeInstance, msg) { + var f, obj = { + assistantid: jspb.Message.getFieldWithDefault(msg, 1, "0"), + assistantconversationid: jspb.Message.getFieldWithDefault(msg, 2, "0"), + messageid: jspb.Message.getFieldWithDefault(msg, 3, ""), + metricsList: jspb.Message.toObjectList(msg.getMetricsList(), + common_pb.Metric.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.talk_api.CreateMessageMetricRequest} + */ +proto.talk_api.CreateMessageMetricRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.talk_api.CreateMessageMetricRequest; + return proto.talk_api.CreateMessageMetricRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.talk_api.CreateMessageMetricRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.talk_api.CreateMessageMetricRequest} + */ +proto.talk_api.CreateMessageMetricRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readUint64String()); + msg.setAssistantid(value); + break; + case 2: + var value = /** @type {string} */ (reader.readUint64String()); + msg.setAssistantconversationid(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setMessageid(value); + break; + case 4: + var value = new common_pb.Metric; + reader.readMessage(value,common_pb.Metric.deserializeBinaryFromReader); + msg.addMetrics(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.talk_api.CreateMessageMetricRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.talk_api.CreateMessageMetricRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.talk_api.CreateMessageMetricRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.talk_api.CreateMessageMetricRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAssistantid(); + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( + 1, + f + ); + } + f = message.getAssistantconversationid(); + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( + 2, + f + ); + } + f = message.getMessageid(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getMetricsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 4, + f, + common_pb.Metric.serializeBinaryToWriter + ); + } +}; + + +/** + * optional uint64 assistantId = 1; + * @return {string} + */ +proto.talk_api.CreateMessageMetricRequest.prototype.getAssistantid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); +}; + + +/** + * @param {string} value + * @return {!proto.talk_api.CreateMessageMetricRequest} returns this + */ +proto.talk_api.CreateMessageMetricRequest.prototype.setAssistantid = function(value) { + return jspb.Message.setProto3StringIntField(this, 1, value); +}; + + +/** + * optional uint64 assistantConversationId = 2; + * @return {string} + */ +proto.talk_api.CreateMessageMetricRequest.prototype.getAssistantconversationid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "0")); +}; + + +/** + * @param {string} value + * @return {!proto.talk_api.CreateMessageMetricRequest} returns this + */ +proto.talk_api.CreateMessageMetricRequest.prototype.setAssistantconversationid = function(value) { + return jspb.Message.setProto3StringIntField(this, 2, value); +}; + + +/** + * optional string messageId = 3; + * @return {string} + */ +proto.talk_api.CreateMessageMetricRequest.prototype.getMessageid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.talk_api.CreateMessageMetricRequest} returns this + */ +proto.talk_api.CreateMessageMetricRequest.prototype.setMessageid = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * repeated Metric metrics = 4; + * @return {!Array} + */ +proto.talk_api.CreateMessageMetricRequest.prototype.getMetricsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, common_pb.Metric, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.talk_api.CreateMessageMetricRequest} returns this +*/ +proto.talk_api.CreateMessageMetricRequest.prototype.setMetricsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 4, value); +}; + + +/** + * @param {!proto.Metric=} opt_value + * @param {number=} opt_index + * @return {!proto.Metric} + */ +proto.talk_api.CreateMessageMetricRequest.prototype.addMetrics = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.Metric, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.talk_api.CreateMessageMetricRequest} returns this + */ +proto.talk_api.CreateMessageMetricRequest.prototype.clearMetricsList = function() { + return this.setMetricsList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.talk_api.CreateMessageMetricResponse.repeatedFields_ = [3]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.talk_api.CreateMessageMetricResponse.prototype.toObject = function(opt_includeInstance) { + return proto.talk_api.CreateMessageMetricResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.talk_api.CreateMessageMetricResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.talk_api.CreateMessageMetricResponse.toObject = function(includeInstance, msg) { + var f, obj = { + code: jspb.Message.getFieldWithDefault(msg, 1, 0), + success: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), + dataList: jspb.Message.toObjectList(msg.getDataList(), + common_pb.Metric.toObject, includeInstance), + error: (f = msg.getError()) && common_pb.Error.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.talk_api.CreateMessageMetricResponse} + */ +proto.talk_api.CreateMessageMetricResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.talk_api.CreateMessageMetricResponse; + return proto.talk_api.CreateMessageMetricResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.talk_api.CreateMessageMetricResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.talk_api.CreateMessageMetricResponse} + */ +proto.talk_api.CreateMessageMetricResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt32()); + msg.setCode(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setSuccess(value); + break; + case 3: + var value = new common_pb.Metric; + reader.readMessage(value,common_pb.Metric.deserializeBinaryFromReader); + msg.addData(value); + break; + case 4: + var value = new common_pb.Error; + reader.readMessage(value,common_pb.Error.deserializeBinaryFromReader); + msg.setError(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.talk_api.CreateMessageMetricResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.talk_api.CreateMessageMetricResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.talk_api.CreateMessageMetricResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.talk_api.CreateMessageMetricResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCode(); + if (f !== 0) { + writer.writeInt32( + 1, + f + ); + } + f = message.getSuccess(); + if (f) { + writer.writeBool( + 2, + f + ); + } + f = message.getDataList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + common_pb.Metric.serializeBinaryToWriter + ); + } + f = message.getError(); + if (f != null) { + writer.writeMessage( + 4, + f, + common_pb.Error.serializeBinaryToWriter + ); + } +}; + + +/** + * optional int32 code = 1; + * @return {number} + */ +proto.talk_api.CreateMessageMetricResponse.prototype.getCode = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.talk_api.CreateMessageMetricResponse} returns this + */ +proto.talk_api.CreateMessageMetricResponse.prototype.setCode = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional bool success = 2; + * @return {boolean} + */ +proto.talk_api.CreateMessageMetricResponse.prototype.getSuccess = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.talk_api.CreateMessageMetricResponse} returns this + */ +proto.talk_api.CreateMessageMetricResponse.prototype.setSuccess = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + +/** + * repeated Metric data = 3; + * @return {!Array} + */ +proto.talk_api.CreateMessageMetricResponse.prototype.getDataList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, common_pb.Metric, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.talk_api.CreateMessageMetricResponse} returns this +*/ +proto.talk_api.CreateMessageMetricResponse.prototype.setDataList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.Metric=} opt_value + * @param {number=} opt_index + * @return {!proto.Metric} + */ +proto.talk_api.CreateMessageMetricResponse.prototype.addData = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.Metric, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.talk_api.CreateMessageMetricResponse} returns this + */ +proto.talk_api.CreateMessageMetricResponse.prototype.clearDataList = function() { + return this.setDataList([]); +}; + + +/** + * optional Error error = 4; + * @return {?proto.Error} + */ +proto.talk_api.CreateMessageMetricResponse.prototype.getError = function() { + return /** @type{?proto.Error} */ ( + jspb.Message.getWrapperField(this, common_pb.Error, 4)); +}; + + +/** + * @param {?proto.Error|undefined} value + * @return {!proto.talk_api.CreateMessageMetricResponse} returns this +*/ +proto.talk_api.CreateMessageMetricResponse.prototype.setError = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.talk_api.CreateMessageMetricResponse} returns this + */ +proto.talk_api.CreateMessageMetricResponse.prototype.clearError = function() { + return this.setError(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.talk_api.CreateMessageMetricResponse.prototype.hasError = function() { + return jspb.Message.getField(this, 4) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.talk_api.CreateConversationMetricRequest.repeatedFields_ = [3]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.talk_api.CreateConversationMetricRequest.prototype.toObject = function(opt_includeInstance) { + return proto.talk_api.CreateConversationMetricRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.talk_api.CreateConversationMetricRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.talk_api.CreateConversationMetricRequest.toObject = function(includeInstance, msg) { + var f, obj = { + assistantid: jspb.Message.getFieldWithDefault(msg, 1, "0"), + assistantconversationid: jspb.Message.getFieldWithDefault(msg, 2, "0"), + metricsList: jspb.Message.toObjectList(msg.getMetricsList(), + common_pb.Metric.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.talk_api.CreateConversationMetricRequest} + */ +proto.talk_api.CreateConversationMetricRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.talk_api.CreateConversationMetricRequest; + return proto.talk_api.CreateConversationMetricRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.talk_api.CreateConversationMetricRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.talk_api.CreateConversationMetricRequest} + */ +proto.talk_api.CreateConversationMetricRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readUint64String()); + msg.setAssistantid(value); + break; + case 2: + var value = /** @type {string} */ (reader.readUint64String()); + msg.setAssistantconversationid(value); + break; + case 3: + var value = new common_pb.Metric; + reader.readMessage(value,common_pb.Metric.deserializeBinaryFromReader); + msg.addMetrics(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.talk_api.CreateConversationMetricRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.talk_api.CreateConversationMetricRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.talk_api.CreateConversationMetricRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.talk_api.CreateConversationMetricRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAssistantid(); + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( + 1, + f + ); + } + f = message.getAssistantconversationid(); + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( + 2, + f + ); + } + f = message.getMetricsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + common_pb.Metric.serializeBinaryToWriter + ); + } +}; + + +/** + * optional uint64 assistantId = 1; + * @return {string} + */ +proto.talk_api.CreateConversationMetricRequest.prototype.getAssistantid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); +}; + + +/** + * @param {string} value + * @return {!proto.talk_api.CreateConversationMetricRequest} returns this + */ +proto.talk_api.CreateConversationMetricRequest.prototype.setAssistantid = function(value) { + return jspb.Message.setProto3StringIntField(this, 1, value); +}; + + +/** + * optional uint64 assistantConversationId = 2; + * @return {string} + */ +proto.talk_api.CreateConversationMetricRequest.prototype.getAssistantconversationid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "0")); +}; + + +/** + * @param {string} value + * @return {!proto.talk_api.CreateConversationMetricRequest} returns this + */ +proto.talk_api.CreateConversationMetricRequest.prototype.setAssistantconversationid = function(value) { + return jspb.Message.setProto3StringIntField(this, 2, value); +}; + + +/** + * repeated Metric metrics = 3; + * @return {!Array} + */ +proto.talk_api.CreateConversationMetricRequest.prototype.getMetricsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, common_pb.Metric, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.talk_api.CreateConversationMetricRequest} returns this +*/ +proto.talk_api.CreateConversationMetricRequest.prototype.setMetricsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.Metric=} opt_value + * @param {number=} opt_index + * @return {!proto.Metric} + */ +proto.talk_api.CreateConversationMetricRequest.prototype.addMetrics = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.Metric, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.talk_api.CreateConversationMetricRequest} returns this + */ +proto.talk_api.CreateConversationMetricRequest.prototype.clearMetricsList = function() { + return this.setMetricsList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.talk_api.CreateConversationMetricResponse.repeatedFields_ = [3]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.talk_api.CreateConversationMetricResponse.prototype.toObject = function(opt_includeInstance) { + return proto.talk_api.CreateConversationMetricResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.talk_api.CreateConversationMetricResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.talk_api.CreateConversationMetricResponse.toObject = function(includeInstance, msg) { + var f, obj = { + code: jspb.Message.getFieldWithDefault(msg, 1, 0), + success: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), + dataList: jspb.Message.toObjectList(msg.getDataList(), + common_pb.Metric.toObject, includeInstance), + error: (f = msg.getError()) && common_pb.Error.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.talk_api.CreateConversationMetricResponse} + */ +proto.talk_api.CreateConversationMetricResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.talk_api.CreateConversationMetricResponse; + return proto.talk_api.CreateConversationMetricResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.talk_api.CreateConversationMetricResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.talk_api.CreateConversationMetricResponse} + */ +proto.talk_api.CreateConversationMetricResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt32()); + msg.setCode(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setSuccess(value); + break; + case 3: + var value = new common_pb.Metric; + reader.readMessage(value,common_pb.Metric.deserializeBinaryFromReader); + msg.addData(value); + break; + case 4: + var value = new common_pb.Error; + reader.readMessage(value,common_pb.Error.deserializeBinaryFromReader); + msg.setError(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.talk_api.CreateConversationMetricResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.talk_api.CreateConversationMetricResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.talk_api.CreateConversationMetricResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.talk_api.CreateConversationMetricResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCode(); + if (f !== 0) { + writer.writeInt32( + 1, + f + ); + } + f = message.getSuccess(); + if (f) { + writer.writeBool( + 2, + f + ); + } + f = message.getDataList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + common_pb.Metric.serializeBinaryToWriter + ); + } + f = message.getError(); + if (f != null) { + writer.writeMessage( + 4, + f, + common_pb.Error.serializeBinaryToWriter + ); + } +}; + + +/** + * optional int32 code = 1; + * @return {number} + */ +proto.talk_api.CreateConversationMetricResponse.prototype.getCode = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.talk_api.CreateConversationMetricResponse} returns this + */ +proto.talk_api.CreateConversationMetricResponse.prototype.setCode = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional bool success = 2; + * @return {boolean} + */ +proto.talk_api.CreateConversationMetricResponse.prototype.getSuccess = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.talk_api.CreateConversationMetricResponse} returns this + */ +proto.talk_api.CreateConversationMetricResponse.prototype.setSuccess = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + +/** + * repeated Metric data = 3; + * @return {!Array} + */ +proto.talk_api.CreateConversationMetricResponse.prototype.getDataList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, common_pb.Metric, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.talk_api.CreateConversationMetricResponse} returns this +*/ +proto.talk_api.CreateConversationMetricResponse.prototype.setDataList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.Metric=} opt_value + * @param {number=} opt_index + * @return {!proto.Metric} + */ +proto.talk_api.CreateConversationMetricResponse.prototype.addData = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.Metric, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.talk_api.CreateConversationMetricResponse} returns this + */ +proto.talk_api.CreateConversationMetricResponse.prototype.clearDataList = function() { + return this.setDataList([]); +}; + + +/** + * optional Error error = 4; + * @return {?proto.Error} + */ +proto.talk_api.CreateConversationMetricResponse.prototype.getError = function() { + return /** @type{?proto.Error} */ ( + jspb.Message.getWrapperField(this, common_pb.Error, 4)); +}; + + +/** + * @param {?proto.Error|undefined} value + * @return {!proto.talk_api.CreateConversationMetricResponse} returns this +*/ +proto.talk_api.CreateConversationMetricResponse.prototype.setError = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.talk_api.CreateConversationMetricResponse} returns this + */ +proto.talk_api.CreateConversationMetricResponse.prototype.clearError = function() { + return this.setError(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.talk_api.CreateConversationMetricResponse.prototype.hasError = function() { + return jspb.Message.getField(this, 4) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.talk_api.CreatePhoneCallRequest.prototype.toObject = function(opt_includeInstance) { + return proto.talk_api.CreatePhoneCallRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.talk_api.CreatePhoneCallRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.talk_api.CreatePhoneCallRequest.toObject = function(includeInstance, msg) { + var f, obj = { + assistant: (f = msg.getAssistant()) && common_pb.AssistantDefinition.toObject(includeInstance, f), + metadataMap: (f = msg.getMetadataMap()) ? f.toObject(includeInstance, proto.google.protobuf.Any.toObject) : [], + argsMap: (f = msg.getArgsMap()) ? f.toObject(includeInstance, proto.google.protobuf.Any.toObject) : [], + optionsMap: (f = msg.getOptionsMap()) ? f.toObject(includeInstance, proto.google.protobuf.Any.toObject) : [], + fromnumber: jspb.Message.getFieldWithDefault(msg, 6, ""), + tonumber: jspb.Message.getFieldWithDefault(msg, 7, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.talk_api.CreatePhoneCallRequest} + */ +proto.talk_api.CreatePhoneCallRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.talk_api.CreatePhoneCallRequest; + return proto.talk_api.CreatePhoneCallRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.talk_api.CreatePhoneCallRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.talk_api.CreatePhoneCallRequest} + */ +proto.talk_api.CreatePhoneCallRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new common_pb.AssistantDefinition; + reader.readMessage(value,common_pb.AssistantDefinition.deserializeBinaryFromReader); + msg.setAssistant(value); + break; + case 3: + var value = msg.getMetadataMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.google.protobuf.Any.deserializeBinaryFromReader, "", new proto.google.protobuf.Any()); + }); + break; + case 4: + var value = msg.getArgsMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.google.protobuf.Any.deserializeBinaryFromReader, "", new proto.google.protobuf.Any()); + }); + break; + case 5: + var value = msg.getOptionsMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.google.protobuf.Any.deserializeBinaryFromReader, "", new proto.google.protobuf.Any()); + }); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setFromnumber(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setTonumber(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.talk_api.CreatePhoneCallRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.talk_api.CreatePhoneCallRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.talk_api.CreatePhoneCallRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.talk_api.CreatePhoneCallRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAssistant(); + if (f != null) { + writer.writeMessage( + 1, + f, + common_pb.AssistantDefinition.serializeBinaryToWriter + ); + } + f = message.getMetadataMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(3, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.google.protobuf.Any.serializeBinaryToWriter); + } + f = message.getArgsMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(4, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.google.protobuf.Any.serializeBinaryToWriter); + } + f = message.getOptionsMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(5, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.google.protobuf.Any.serializeBinaryToWriter); + } + f = message.getFromnumber(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } + f = message.getTonumber(); + if (f.length > 0) { + writer.writeString( + 7, + f + ); + } +}; + + +/** + * optional AssistantDefinition assistant = 1; + * @return {?proto.AssistantDefinition} + */ +proto.talk_api.CreatePhoneCallRequest.prototype.getAssistant = function() { + return /** @type{?proto.AssistantDefinition} */ ( + jspb.Message.getWrapperField(this, common_pb.AssistantDefinition, 1)); +}; + + +/** + * @param {?proto.AssistantDefinition|undefined} value + * @return {!proto.talk_api.CreatePhoneCallRequest} returns this +*/ +proto.talk_api.CreatePhoneCallRequest.prototype.setAssistant = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.talk_api.CreatePhoneCallRequest} returns this + */ +proto.talk_api.CreatePhoneCallRequest.prototype.clearAssistant = function() { + return this.setAssistant(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.talk_api.CreatePhoneCallRequest.prototype.hasAssistant = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * map metadata = 3; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.talk_api.CreatePhoneCallRequest.prototype.getMetadataMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 3, opt_noLazyCreate, + proto.google.protobuf.Any)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.talk_api.CreatePhoneCallRequest} returns this + */ +proto.talk_api.CreatePhoneCallRequest.prototype.clearMetadataMap = function() { + this.getMetadataMap().clear(); + return this;}; + + +/** + * map args = 4; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.talk_api.CreatePhoneCallRequest.prototype.getArgsMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 4, opt_noLazyCreate, + proto.google.protobuf.Any)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.talk_api.CreatePhoneCallRequest} returns this + */ +proto.talk_api.CreatePhoneCallRequest.prototype.clearArgsMap = function() { + this.getArgsMap().clear(); + return this;}; + + +/** + * map options = 5; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.talk_api.CreatePhoneCallRequest.prototype.getOptionsMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 5, opt_noLazyCreate, + proto.google.protobuf.Any)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.talk_api.CreatePhoneCallRequest} returns this + */ +proto.talk_api.CreatePhoneCallRequest.prototype.clearOptionsMap = function() { + this.getOptionsMap().clear(); + return this;}; + + +/** + * optional string fromNumber = 6; + * @return {string} + */ +proto.talk_api.CreatePhoneCallRequest.prototype.getFromnumber = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.talk_api.CreatePhoneCallRequest} returns this + */ +proto.talk_api.CreatePhoneCallRequest.prototype.setFromnumber = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + +/** + * optional string toNumber = 7; + * @return {string} + */ +proto.talk_api.CreatePhoneCallRequest.prototype.getTonumber = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.talk_api.CreatePhoneCallRequest} returns this + */ +proto.talk_api.CreatePhoneCallRequest.prototype.setTonumber = function(value) { + return jspb.Message.setProto3StringField(this, 7, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.talk_api.CreatePhoneCallResponse.prototype.toObject = function(opt_includeInstance) { + return proto.talk_api.CreatePhoneCallResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.talk_api.CreatePhoneCallResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.talk_api.CreatePhoneCallResponse.toObject = function(includeInstance, msg) { + var f, obj = { + code: jspb.Message.getFieldWithDefault(msg, 1, 0), + success: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), + data: (f = msg.getData()) && common_pb.AssistantConversation.toObject(includeInstance, f), + error: (f = msg.getError()) && common_pb.Error.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.talk_api.CreatePhoneCallResponse} + */ +proto.talk_api.CreatePhoneCallResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.talk_api.CreatePhoneCallResponse; + return proto.talk_api.CreatePhoneCallResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.talk_api.CreatePhoneCallResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.talk_api.CreatePhoneCallResponse} + */ +proto.talk_api.CreatePhoneCallResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt32()); + msg.setCode(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setSuccess(value); + break; + case 3: + var value = new common_pb.AssistantConversation; + reader.readMessage(value,common_pb.AssistantConversation.deserializeBinaryFromReader); + msg.setData(value); + break; + case 4: + var value = new common_pb.Error; + reader.readMessage(value,common_pb.Error.deserializeBinaryFromReader); + msg.setError(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.talk_api.CreatePhoneCallResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.talk_api.CreatePhoneCallResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.talk_api.CreatePhoneCallResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.talk_api.CreatePhoneCallResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCode(); + if (f !== 0) { + writer.writeInt32( + 1, + f + ); + } + f = message.getSuccess(); + if (f) { + writer.writeBool( + 2, + f + ); + } + f = message.getData(); + if (f != null) { + writer.writeMessage( + 3, + f, + common_pb.AssistantConversation.serializeBinaryToWriter + ); + } + f = message.getError(); + if (f != null) { + writer.writeMessage( + 4, + f, + common_pb.Error.serializeBinaryToWriter + ); + } +}; + + +/** + * optional int32 code = 1; + * @return {number} + */ +proto.talk_api.CreatePhoneCallResponse.prototype.getCode = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.talk_api.CreatePhoneCallResponse} returns this + */ +proto.talk_api.CreatePhoneCallResponse.prototype.setCode = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional bool success = 2; + * @return {boolean} + */ +proto.talk_api.CreatePhoneCallResponse.prototype.getSuccess = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.talk_api.CreatePhoneCallResponse} returns this + */ +proto.talk_api.CreatePhoneCallResponse.prototype.setSuccess = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + +/** + * optional AssistantConversation data = 3; + * @return {?proto.AssistantConversation} + */ +proto.talk_api.CreatePhoneCallResponse.prototype.getData = function() { + return /** @type{?proto.AssistantConversation} */ ( + jspb.Message.getWrapperField(this, common_pb.AssistantConversation, 3)); +}; + + +/** + * @param {?proto.AssistantConversation|undefined} value + * @return {!proto.talk_api.CreatePhoneCallResponse} returns this +*/ +proto.talk_api.CreatePhoneCallResponse.prototype.setData = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.talk_api.CreatePhoneCallResponse} returns this + */ +proto.talk_api.CreatePhoneCallResponse.prototype.clearData = function() { + return this.setData(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.talk_api.CreatePhoneCallResponse.prototype.hasData = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional Error error = 4; + * @return {?proto.Error} + */ +proto.talk_api.CreatePhoneCallResponse.prototype.getError = function() { + return /** @type{?proto.Error} */ ( + jspb.Message.getWrapperField(this, common_pb.Error, 4)); +}; + + +/** + * @param {?proto.Error|undefined} value + * @return {!proto.talk_api.CreatePhoneCallResponse} returns this +*/ +proto.talk_api.CreatePhoneCallResponse.prototype.setError = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.talk_api.CreatePhoneCallResponse} returns this + */ +proto.talk_api.CreatePhoneCallResponse.prototype.clearError = function() { + return this.setError(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.talk_api.CreatePhoneCallResponse.prototype.hasError = function() { + return jspb.Message.getField(this, 4) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.talk_api.CreateBulkPhoneCallRequest.repeatedFields_ = [6]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.talk_api.CreateBulkPhoneCallRequest.prototype.toObject = function(opt_includeInstance) { + return proto.talk_api.CreateBulkPhoneCallRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.talk_api.CreateBulkPhoneCallRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.talk_api.CreateBulkPhoneCallRequest.toObject = function(includeInstance, msg) { + var f, obj = { + phonecallsList: jspb.Message.toObjectList(msg.getPhonecallsList(), + proto.talk_api.CreatePhoneCallRequest.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.talk_api.CreateBulkPhoneCallRequest} + */ +proto.talk_api.CreateBulkPhoneCallRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.talk_api.CreateBulkPhoneCallRequest; + return proto.talk_api.CreateBulkPhoneCallRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.talk_api.CreateBulkPhoneCallRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.talk_api.CreateBulkPhoneCallRequest} + */ +proto.talk_api.CreateBulkPhoneCallRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 6: + var value = new proto.talk_api.CreatePhoneCallRequest; + reader.readMessage(value,proto.talk_api.CreatePhoneCallRequest.deserializeBinaryFromReader); + msg.addPhonecalls(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.talk_api.CreateBulkPhoneCallRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.talk_api.CreateBulkPhoneCallRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.talk_api.CreateBulkPhoneCallRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.talk_api.CreateBulkPhoneCallRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPhonecallsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 6, + f, + proto.talk_api.CreatePhoneCallRequest.serializeBinaryToWriter + ); + } +}; /** - * optional string fromNumber = 6; - * @return {string} + * repeated CreatePhoneCallRequest phoneCalls = 6; + * @return {!Array} */ -proto.talk_api.CreatePhoneCallRequest.prototype.getFromnumber = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +proto.talk_api.CreateBulkPhoneCallRequest.prototype.getPhonecallsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.talk_api.CreatePhoneCallRequest, 6)); }; /** - * @param {string} value - * @return {!proto.talk_api.CreatePhoneCallRequest} returns this - */ -proto.talk_api.CreatePhoneCallRequest.prototype.setFromnumber = function(value) { - return jspb.Message.setProto3StringField(this, 6, value); + * @param {!Array} value + * @return {!proto.talk_api.CreateBulkPhoneCallRequest} returns this +*/ +proto.talk_api.CreateBulkPhoneCallRequest.prototype.setPhonecallsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 6, value); }; /** - * optional string toNumber = 7; - * @return {string} + * @param {!proto.talk_api.CreatePhoneCallRequest=} opt_value + * @param {number=} opt_index + * @return {!proto.talk_api.CreatePhoneCallRequest} */ -proto.talk_api.CreatePhoneCallRequest.prototype.getTonumber = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +proto.talk_api.CreateBulkPhoneCallRequest.prototype.addPhonecalls = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 6, opt_value, proto.talk_api.CreatePhoneCallRequest, opt_index); }; /** - * @param {string} value - * @return {!proto.talk_api.CreatePhoneCallRequest} returns this + * Clears the list making it empty but non-null. + * @return {!proto.talk_api.CreateBulkPhoneCallRequest} returns this */ -proto.talk_api.CreatePhoneCallRequest.prototype.setTonumber = function(value) { - return jspb.Message.setProto3StringField(this, 7, value); +proto.talk_api.CreateBulkPhoneCallRequest.prototype.clearPhonecallsList = function() { + return this.setPhonecallsList([]); }; +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.talk_api.CreateBulkPhoneCallResponse.repeatedFields_ = [3]; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -2303,8 +5840,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.talk_api.CreatePhoneCallResponse.prototype.toObject = function(opt_includeInstance) { - return proto.talk_api.CreatePhoneCallResponse.toObject(opt_includeInstance, this); +proto.talk_api.CreateBulkPhoneCallResponse.prototype.toObject = function(opt_includeInstance) { + return proto.talk_api.CreateBulkPhoneCallResponse.toObject(opt_includeInstance, this); }; @@ -2313,15 +5850,16 @@ proto.talk_api.CreatePhoneCallResponse.prototype.toObject = function(opt_include * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.talk_api.CreatePhoneCallResponse} msg The msg instance to transform. + * @param {!proto.talk_api.CreateBulkPhoneCallResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.talk_api.CreatePhoneCallResponse.toObject = function(includeInstance, msg) { +proto.talk_api.CreateBulkPhoneCallResponse.toObject = function(includeInstance, msg) { var f, obj = { code: jspb.Message.getFieldWithDefault(msg, 1, 0), success: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), - data: (f = msg.getData()) && common_pb.AssistantConversation.toObject(includeInstance, f), + dataList: jspb.Message.toObjectList(msg.getDataList(), + common_pb.AssistantConversation.toObject, includeInstance), error: (f = msg.getError()) && common_pb.Error.toObject(includeInstance, f) }; @@ -2336,23 +5874,23 @@ proto.talk_api.CreatePhoneCallResponse.toObject = function(includeInstance, msg) /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.talk_api.CreatePhoneCallResponse} + * @return {!proto.talk_api.CreateBulkPhoneCallResponse} */ -proto.talk_api.CreatePhoneCallResponse.deserializeBinary = function(bytes) { +proto.talk_api.CreateBulkPhoneCallResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.talk_api.CreatePhoneCallResponse; - return proto.talk_api.CreatePhoneCallResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.talk_api.CreateBulkPhoneCallResponse; + return proto.talk_api.CreateBulkPhoneCallResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.talk_api.CreatePhoneCallResponse} msg The message object to deserialize into. + * @param {!proto.talk_api.CreateBulkPhoneCallResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.talk_api.CreatePhoneCallResponse} + * @return {!proto.talk_api.CreateBulkPhoneCallResponse} */ -proto.talk_api.CreatePhoneCallResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.talk_api.CreateBulkPhoneCallResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -2370,7 +5908,7 @@ proto.talk_api.CreatePhoneCallResponse.deserializeBinaryFromReader = function(ms case 3: var value = new common_pb.AssistantConversation; reader.readMessage(value,common_pb.AssistantConversation.deserializeBinaryFromReader); - msg.setData(value); + msg.addData(value); break; case 4: var value = new common_pb.Error; @@ -2390,9 +5928,9 @@ proto.talk_api.CreatePhoneCallResponse.deserializeBinaryFromReader = function(ms * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.talk_api.CreatePhoneCallResponse.prototype.serializeBinary = function() { +proto.talk_api.CreateBulkPhoneCallResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.talk_api.CreatePhoneCallResponse.serializeBinaryToWriter(this, writer); + proto.talk_api.CreateBulkPhoneCallResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -2400,11 +5938,11 @@ proto.talk_api.CreatePhoneCallResponse.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.talk_api.CreatePhoneCallResponse} message + * @param {!proto.talk_api.CreateBulkPhoneCallResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.talk_api.CreatePhoneCallResponse.serializeBinaryToWriter = function(message, writer) { +proto.talk_api.CreateBulkPhoneCallResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getCode(); if (f !== 0) { @@ -2420,9 +5958,9 @@ proto.talk_api.CreatePhoneCallResponse.serializeBinaryToWriter = function(messag f ); } - f = message.getData(); - if (f != null) { - writer.writeMessage( + f = message.getDataList(); + if (f.length > 0) { + writer.writeRepeatedMessage( 3, f, common_pb.AssistantConversation.serializeBinaryToWriter @@ -2443,16 +5981,16 @@ proto.talk_api.CreatePhoneCallResponse.serializeBinaryToWriter = function(messag * optional int32 code = 1; * @return {number} */ -proto.talk_api.CreatePhoneCallResponse.prototype.getCode = function() { +proto.talk_api.CreateBulkPhoneCallResponse.prototype.getCode = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** * @param {number} value - * @return {!proto.talk_api.CreatePhoneCallResponse} returns this + * @return {!proto.talk_api.CreateBulkPhoneCallResponse} returns this */ -proto.talk_api.CreatePhoneCallResponse.prototype.setCode = function(value) { +proto.talk_api.CreateBulkPhoneCallResponse.prototype.setCode = function(value) { return jspb.Message.setProto3IntField(this, 1, value); }; @@ -2461,54 +5999,55 @@ proto.talk_api.CreatePhoneCallResponse.prototype.setCode = function(value) { * optional bool success = 2; * @return {boolean} */ -proto.talk_api.CreatePhoneCallResponse.prototype.getSuccess = function() { +proto.talk_api.CreateBulkPhoneCallResponse.prototype.getSuccess = function() { return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); }; /** * @param {boolean} value - * @return {!proto.talk_api.CreatePhoneCallResponse} returns this + * @return {!proto.talk_api.CreateBulkPhoneCallResponse} returns this */ -proto.talk_api.CreatePhoneCallResponse.prototype.setSuccess = function(value) { +proto.talk_api.CreateBulkPhoneCallResponse.prototype.setSuccess = function(value) { return jspb.Message.setProto3BooleanField(this, 2, value); }; /** - * optional AssistantConversation data = 3; - * @return {?proto.AssistantConversation} + * repeated AssistantConversation data = 3; + * @return {!Array} */ -proto.talk_api.CreatePhoneCallResponse.prototype.getData = function() { - return /** @type{?proto.AssistantConversation} */ ( - jspb.Message.getWrapperField(this, common_pb.AssistantConversation, 3)); +proto.talk_api.CreateBulkPhoneCallResponse.prototype.getDataList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, common_pb.AssistantConversation, 3)); }; /** - * @param {?proto.AssistantConversation|undefined} value - * @return {!proto.talk_api.CreatePhoneCallResponse} returns this + * @param {!Array} value + * @return {!proto.talk_api.CreateBulkPhoneCallResponse} returns this */ -proto.talk_api.CreatePhoneCallResponse.prototype.setData = function(value) { - return jspb.Message.setWrapperField(this, 3, value); +proto.talk_api.CreateBulkPhoneCallResponse.prototype.setDataList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); }; /** - * Clears the message field making it undefined. - * @return {!proto.talk_api.CreatePhoneCallResponse} returns this + * @param {!proto.AssistantConversation=} opt_value + * @param {number=} opt_index + * @return {!proto.AssistantConversation} */ -proto.talk_api.CreatePhoneCallResponse.prototype.clearData = function() { - return this.setData(undefined); +proto.talk_api.CreateBulkPhoneCallResponse.prototype.addData = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.AssistantConversation, opt_index); }; /** - * Returns whether this field is set. - * @return {boolean} + * Clears the list making it empty but non-null. + * @return {!proto.talk_api.CreateBulkPhoneCallResponse} returns this */ -proto.talk_api.CreatePhoneCallResponse.prototype.hasData = function() { - return jspb.Message.getField(this, 3) != null; +proto.talk_api.CreateBulkPhoneCallResponse.prototype.clearDataList = function() { + return this.setDataList([]); }; @@ -2516,7 +6055,7 @@ proto.talk_api.CreatePhoneCallResponse.prototype.hasData = function() { * optional Error error = 4; * @return {?proto.Error} */ -proto.talk_api.CreatePhoneCallResponse.prototype.getError = function() { +proto.talk_api.CreateBulkPhoneCallResponse.prototype.getError = function() { return /** @type{?proto.Error} */ ( jspb.Message.getWrapperField(this, common_pb.Error, 4)); }; @@ -2524,18 +6063,18 @@ proto.talk_api.CreatePhoneCallResponse.prototype.getError = function() { /** * @param {?proto.Error|undefined} value - * @return {!proto.talk_api.CreatePhoneCallResponse} returns this + * @return {!proto.talk_api.CreateBulkPhoneCallResponse} returns this */ -proto.talk_api.CreatePhoneCallResponse.prototype.setError = function(value) { +proto.talk_api.CreateBulkPhoneCallResponse.prototype.setError = function(value) { return jspb.Message.setWrapperField(this, 4, value); }; /** * Clears the message field making it undefined. - * @return {!proto.talk_api.CreatePhoneCallResponse} returns this + * @return {!proto.talk_api.CreateBulkPhoneCallResponse} returns this */ -proto.talk_api.CreatePhoneCallResponse.prototype.clearError = function() { +proto.talk_api.CreateBulkPhoneCallResponse.prototype.clearError = function() { return this.setError(undefined); }; @@ -2544,18 +6083,38 @@ proto.talk_api.CreatePhoneCallResponse.prototype.clearError = function() { * Returns whether this field is set. * @return {boolean} */ -proto.talk_api.CreatePhoneCallResponse.prototype.hasError = function() { +proto.talk_api.CreateBulkPhoneCallResponse.prototype.hasError = function() { return jspb.Message.getField(this, 4) != null; }; /** - * List of repeated fields within this message type. - * @private {!Array} + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} * @const */ -proto.talk_api.CreateBulkPhoneCallRequest.repeatedFields_ = [6]; +proto.talk_api.TalkInput.oneofGroups_ = [[2,3,4]]; + +/** + * @enum {number} + */ +proto.talk_api.TalkInput.RequestCase = { + REQUEST_NOT_SET: 0, + CONFIGURATION: 2, + MESSAGE: 3, + INTERRUPTION: 4 +}; + +/** + * @return {proto.talk_api.TalkInput.RequestCase} + */ +proto.talk_api.TalkInput.prototype.getRequestCase = function() { + return /** @type {proto.talk_api.TalkInput.RequestCase} */(jspb.Message.computeOneofCase(this, proto.talk_api.TalkInput.oneofGroups_[0])); +}; @@ -2572,8 +6131,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.talk_api.CreateBulkPhoneCallRequest.prototype.toObject = function(opt_includeInstance) { - return proto.talk_api.CreateBulkPhoneCallRequest.toObject(opt_includeInstance, this); +proto.talk_api.TalkInput.prototype.toObject = function(opt_includeInstance) { + return proto.talk_api.TalkInput.toObject(opt_includeInstance, this); }; @@ -2582,14 +6141,15 @@ proto.talk_api.CreateBulkPhoneCallRequest.prototype.toObject = function(opt_incl * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.talk_api.CreateBulkPhoneCallRequest} msg The msg instance to transform. + * @param {!proto.talk_api.TalkInput} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.talk_api.CreateBulkPhoneCallRequest.toObject = function(includeInstance, msg) { +proto.talk_api.TalkInput.toObject = function(includeInstance, msg) { var f, obj = { - phonecallsList: jspb.Message.toObjectList(msg.getPhonecallsList(), - proto.talk_api.CreatePhoneCallRequest.toObject, includeInstance) + configuration: (f = msg.getConfiguration()) && proto.talk_api.ConversationConfiguration.toObject(includeInstance, f), + message: (f = msg.getMessage()) && proto.talk_api.ConversationUserMessage.toObject(includeInstance, f), + interruption: (f = msg.getInterruption()) && proto.talk_api.ConversationInterruption.toObject(includeInstance, f) }; if (includeInstance) { @@ -2603,33 +6163,43 @@ proto.talk_api.CreateBulkPhoneCallRequest.toObject = function(includeInstance, m /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.talk_api.CreateBulkPhoneCallRequest} + * @return {!proto.talk_api.TalkInput} */ -proto.talk_api.CreateBulkPhoneCallRequest.deserializeBinary = function(bytes) { +proto.talk_api.TalkInput.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.talk_api.CreateBulkPhoneCallRequest; - return proto.talk_api.CreateBulkPhoneCallRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.talk_api.TalkInput; + return proto.talk_api.TalkInput.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.talk_api.CreateBulkPhoneCallRequest} msg The message object to deserialize into. + * @param {!proto.talk_api.TalkInput} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.talk_api.CreateBulkPhoneCallRequest} + * @return {!proto.talk_api.TalkInput} */ -proto.talk_api.CreateBulkPhoneCallRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.talk_api.TalkInput.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { - case 6: - var value = new proto.talk_api.CreatePhoneCallRequest; - reader.readMessage(value,proto.talk_api.CreatePhoneCallRequest.deserializeBinaryFromReader); - msg.addPhonecalls(value); + case 2: + var value = new proto.talk_api.ConversationConfiguration; + reader.readMessage(value,proto.talk_api.ConversationConfiguration.deserializeBinaryFromReader); + msg.setConfiguration(value); + break; + case 3: + var value = new proto.talk_api.ConversationUserMessage; + reader.readMessage(value,proto.talk_api.ConversationUserMessage.deserializeBinaryFromReader); + msg.setMessage(value); + break; + case 4: + var value = new proto.talk_api.ConversationInterruption; + reader.readMessage(value,proto.talk_api.ConversationInterruption.deserializeBinaryFromReader); + msg.setInterruption(value); break; default: reader.skipField(); @@ -2644,9 +6214,9 @@ proto.talk_api.CreateBulkPhoneCallRequest.deserializeBinaryFromReader = function * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.talk_api.CreateBulkPhoneCallRequest.prototype.serializeBinary = function() { +proto.talk_api.TalkInput.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.talk_api.CreateBulkPhoneCallRequest.serializeBinaryToWriter(this, writer); + proto.talk_api.TalkInput.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -2654,68 +6224,180 @@ proto.talk_api.CreateBulkPhoneCallRequest.prototype.serializeBinary = function() /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.talk_api.CreateBulkPhoneCallRequest} message + * @param {!proto.talk_api.TalkInput} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.talk_api.CreateBulkPhoneCallRequest.serializeBinaryToWriter = function(message, writer) { +proto.talk_api.TalkInput.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getPhonecallsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 6, + f = message.getConfiguration(); + if (f != null) { + writer.writeMessage( + 2, f, - proto.talk_api.CreatePhoneCallRequest.serializeBinaryToWriter + proto.talk_api.ConversationConfiguration.serializeBinaryToWriter + ); + } + f = message.getMessage(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.talk_api.ConversationUserMessage.serializeBinaryToWriter ); } + f = message.getInterruption(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.talk_api.ConversationInterruption.serializeBinaryToWriter + ); + } +}; + + +/** + * optional ConversationConfiguration configuration = 2; + * @return {?proto.talk_api.ConversationConfiguration} + */ +proto.talk_api.TalkInput.prototype.getConfiguration = function() { + return /** @type{?proto.talk_api.ConversationConfiguration} */ ( + jspb.Message.getWrapperField(this, proto.talk_api.ConversationConfiguration, 2)); +}; + + +/** + * @param {?proto.talk_api.ConversationConfiguration|undefined} value + * @return {!proto.talk_api.TalkInput} returns this +*/ +proto.talk_api.TalkInput.prototype.setConfiguration = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.talk_api.TalkInput.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.talk_api.TalkInput} returns this + */ +proto.talk_api.TalkInput.prototype.clearConfiguration = function() { + return this.setConfiguration(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.talk_api.TalkInput.prototype.hasConfiguration = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional ConversationUserMessage message = 3; + * @return {?proto.talk_api.ConversationUserMessage} + */ +proto.talk_api.TalkInput.prototype.getMessage = function() { + return /** @type{?proto.talk_api.ConversationUserMessage} */ ( + jspb.Message.getWrapperField(this, proto.talk_api.ConversationUserMessage, 3)); +}; + + +/** + * @param {?proto.talk_api.ConversationUserMessage|undefined} value + * @return {!proto.talk_api.TalkInput} returns this +*/ +proto.talk_api.TalkInput.prototype.setMessage = function(value) { + return jspb.Message.setOneofWrapperField(this, 3, proto.talk_api.TalkInput.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.talk_api.TalkInput} returns this + */ +proto.talk_api.TalkInput.prototype.clearMessage = function() { + return this.setMessage(undefined); }; /** - * repeated CreatePhoneCallRequest phoneCalls = 6; - * @return {!Array} + * Returns whether this field is set. + * @return {boolean} */ -proto.talk_api.CreateBulkPhoneCallRequest.prototype.getPhonecallsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.talk_api.CreatePhoneCallRequest, 6)); +proto.talk_api.TalkInput.prototype.hasMessage = function() { + return jspb.Message.getField(this, 3) != null; }; /** - * @param {!Array} value - * @return {!proto.talk_api.CreateBulkPhoneCallRequest} returns this + * optional ConversationInterruption interruption = 4; + * @return {?proto.talk_api.ConversationInterruption} + */ +proto.talk_api.TalkInput.prototype.getInterruption = function() { + return /** @type{?proto.talk_api.ConversationInterruption} */ ( + jspb.Message.getWrapperField(this, proto.talk_api.ConversationInterruption, 4)); +}; + + +/** + * @param {?proto.talk_api.ConversationInterruption|undefined} value + * @return {!proto.talk_api.TalkInput} returns this */ -proto.talk_api.CreateBulkPhoneCallRequest.prototype.setPhonecallsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 6, value); +proto.talk_api.TalkInput.prototype.setInterruption = function(value) { + return jspb.Message.setOneofWrapperField(this, 4, proto.talk_api.TalkInput.oneofGroups_[0], value); }; /** - * @param {!proto.talk_api.CreatePhoneCallRequest=} opt_value - * @param {number=} opt_index - * @return {!proto.talk_api.CreatePhoneCallRequest} + * Clears the message field making it undefined. + * @return {!proto.talk_api.TalkInput} returns this */ -proto.talk_api.CreateBulkPhoneCallRequest.prototype.addPhonecalls = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 6, opt_value, proto.talk_api.CreatePhoneCallRequest, opt_index); +proto.talk_api.TalkInput.prototype.clearInterruption = function() { + return this.setInterruption(undefined); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.talk_api.CreateBulkPhoneCallRequest} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.talk_api.CreateBulkPhoneCallRequest.prototype.clearPhonecallsList = function() { - return this.setPhonecallsList([]); +proto.talk_api.TalkInput.prototype.hasInterruption = function() { + return jspb.Message.getField(this, 4) != null; }; /** - * List of repeated fields within this message type. - * @private {!Array} + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} * @const */ -proto.talk_api.CreateBulkPhoneCallResponse.repeatedFields_ = [3]; +proto.talk_api.TalkOutput.oneofGroups_ = [[10,12,13,14,16,15]]; + +/** + * @enum {number} + */ +proto.talk_api.TalkOutput.DataCase = { + DATA_NOT_SET: 0, + INTERRUPTION: 10, + ASSISTANT: 12, + TOOL: 13, + TOOLRESULT: 14, + DIRECTIVE: 16, + ERROR: 15 +}; + +/** + * @return {proto.talk_api.TalkOutput.DataCase} + */ +proto.talk_api.TalkOutput.prototype.getDataCase = function() { + return /** @type {proto.talk_api.TalkOutput.DataCase} */(jspb.Message.computeOneofCase(this, proto.talk_api.TalkOutput.oneofGroups_[0])); +}; @@ -2732,8 +6414,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.talk_api.CreateBulkPhoneCallResponse.prototype.toObject = function(opt_includeInstance) { - return proto.talk_api.CreateBulkPhoneCallResponse.toObject(opt_includeInstance, this); +proto.talk_api.TalkOutput.prototype.toObject = function(opt_includeInstance) { + return proto.talk_api.TalkOutput.toObject(opt_includeInstance, this); }; @@ -2742,16 +6424,19 @@ proto.talk_api.CreateBulkPhoneCallResponse.prototype.toObject = function(opt_inc * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.talk_api.CreateBulkPhoneCallResponse} msg The msg instance to transform. + * @param {!proto.talk_api.TalkOutput} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.talk_api.CreateBulkPhoneCallResponse.toObject = function(includeInstance, msg) { +proto.talk_api.TalkOutput.toObject = function(includeInstance, msg) { var f, obj = { code: jspb.Message.getFieldWithDefault(msg, 1, 0), success: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), - dataList: jspb.Message.toObjectList(msg.getDataList(), - common_pb.AssistantConversation.toObject, includeInstance), + interruption: (f = msg.getInterruption()) && proto.talk_api.ConversationInterruption.toObject(includeInstance, f), + assistant: (f = msg.getAssistant()) && proto.talk_api.ConversationAssistantMessage.toObject(includeInstance, f), + tool: (f = msg.getTool()) && proto.talk_api.ConversationToolCall.toObject(includeInstance, f), + toolresult: (f = msg.getToolresult()) && proto.talk_api.ConversationToolResult.toObject(includeInstance, f), + directive: (f = msg.getDirective()) && proto.talk_api.ConversationDirective.toObject(includeInstance, f), error: (f = msg.getError()) && common_pb.Error.toObject(includeInstance, f) }; @@ -2766,23 +6451,23 @@ proto.talk_api.CreateBulkPhoneCallResponse.toObject = function(includeInstance, /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.talk_api.CreateBulkPhoneCallResponse} + * @return {!proto.talk_api.TalkOutput} */ -proto.talk_api.CreateBulkPhoneCallResponse.deserializeBinary = function(bytes) { +proto.talk_api.TalkOutput.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.talk_api.CreateBulkPhoneCallResponse; - return proto.talk_api.CreateBulkPhoneCallResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.talk_api.TalkOutput; + return proto.talk_api.TalkOutput.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.talk_api.CreateBulkPhoneCallResponse} msg The message object to deserialize into. + * @param {!proto.talk_api.TalkOutput} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.talk_api.CreateBulkPhoneCallResponse} + * @return {!proto.talk_api.TalkOutput} */ -proto.talk_api.CreateBulkPhoneCallResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.talk_api.TalkOutput.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -2797,12 +6482,32 @@ proto.talk_api.CreateBulkPhoneCallResponse.deserializeBinaryFromReader = functio var value = /** @type {boolean} */ (reader.readBool()); msg.setSuccess(value); break; - case 3: - var value = new common_pb.AssistantConversation; - reader.readMessage(value,common_pb.AssistantConversation.deserializeBinaryFromReader); - msg.addData(value); + case 10: + var value = new proto.talk_api.ConversationInterruption; + reader.readMessage(value,proto.talk_api.ConversationInterruption.deserializeBinaryFromReader); + msg.setInterruption(value); break; - case 4: + case 12: + var value = new proto.talk_api.ConversationAssistantMessage; + reader.readMessage(value,proto.talk_api.ConversationAssistantMessage.deserializeBinaryFromReader); + msg.setAssistant(value); + break; + case 13: + var value = new proto.talk_api.ConversationToolCall; + reader.readMessage(value,proto.talk_api.ConversationToolCall.deserializeBinaryFromReader); + msg.setTool(value); + break; + case 14: + var value = new proto.talk_api.ConversationToolResult; + reader.readMessage(value,proto.talk_api.ConversationToolResult.deserializeBinaryFromReader); + msg.setToolresult(value); + break; + case 16: + var value = new proto.talk_api.ConversationDirective; + reader.readMessage(value,proto.talk_api.ConversationDirective.deserializeBinaryFromReader); + msg.setDirective(value); + break; + case 15: var value = new common_pb.Error; reader.readMessage(value,common_pb.Error.deserializeBinaryFromReader); msg.setError(value); @@ -2820,9 +6525,9 @@ proto.talk_api.CreateBulkPhoneCallResponse.deserializeBinaryFromReader = functio * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.talk_api.CreateBulkPhoneCallResponse.prototype.serializeBinary = function() { +proto.talk_api.TalkOutput.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.talk_api.CreateBulkPhoneCallResponse.serializeBinaryToWriter(this, writer); + proto.talk_api.TalkOutput.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -2830,11 +6535,11 @@ proto.talk_api.CreateBulkPhoneCallResponse.prototype.serializeBinary = function( /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.talk_api.CreateBulkPhoneCallResponse} message + * @param {!proto.talk_api.TalkOutput} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.talk_api.CreateBulkPhoneCallResponse.serializeBinaryToWriter = function(message, writer) { +proto.talk_api.TalkOutput.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getCode(); if (f !== 0) { @@ -2850,18 +6555,50 @@ proto.talk_api.CreateBulkPhoneCallResponse.serializeBinaryToWriter = function(me f ); } - f = message.getDataList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 3, + f = message.getInterruption(); + if (f != null) { + writer.writeMessage( + 10, f, - common_pb.AssistantConversation.serializeBinaryToWriter + proto.talk_api.ConversationInterruption.serializeBinaryToWriter + ); + } + f = message.getAssistant(); + if (f != null) { + writer.writeMessage( + 12, + f, + proto.talk_api.ConversationAssistantMessage.serializeBinaryToWriter + ); + } + f = message.getTool(); + if (f != null) { + writer.writeMessage( + 13, + f, + proto.talk_api.ConversationToolCall.serializeBinaryToWriter + ); + } + f = message.getToolresult(); + if (f != null) { + writer.writeMessage( + 14, + f, + proto.talk_api.ConversationToolResult.serializeBinaryToWriter + ); + } + f = message.getDirective(); + if (f != null) { + writer.writeMessage( + 16, + f, + proto.talk_api.ConversationDirective.serializeBinaryToWriter ); } f = message.getError(); if (f != null) { writer.writeMessage( - 4, + 15, f, common_pb.Error.serializeBinaryToWriter ); @@ -2873,16 +6610,16 @@ proto.talk_api.CreateBulkPhoneCallResponse.serializeBinaryToWriter = function(me * optional int32 code = 1; * @return {number} */ -proto.talk_api.CreateBulkPhoneCallResponse.prototype.getCode = function() { +proto.talk_api.TalkOutput.prototype.getCode = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** * @param {number} value - * @return {!proto.talk_api.CreateBulkPhoneCallResponse} returns this + * @return {!proto.talk_api.TalkOutput} returns this */ -proto.talk_api.CreateBulkPhoneCallResponse.prototype.setCode = function(value) { +proto.talk_api.TalkOutput.prototype.setCode = function(value) { return jspb.Message.setProto3IntField(this, 1, value); }; @@ -2891,82 +6628,229 @@ proto.talk_api.CreateBulkPhoneCallResponse.prototype.setCode = function(value) { * optional bool success = 2; * @return {boolean} */ -proto.talk_api.CreateBulkPhoneCallResponse.prototype.getSuccess = function() { +proto.talk_api.TalkOutput.prototype.getSuccess = function() { return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); }; /** * @param {boolean} value - * @return {!proto.talk_api.CreateBulkPhoneCallResponse} returns this + * @return {!proto.talk_api.TalkOutput} returns this */ -proto.talk_api.CreateBulkPhoneCallResponse.prototype.setSuccess = function(value) { +proto.talk_api.TalkOutput.prototype.setSuccess = function(value) { return jspb.Message.setProto3BooleanField(this, 2, value); }; /** - * repeated AssistantConversation data = 3; - * @return {!Array} + * optional ConversationInterruption interruption = 10; + * @return {?proto.talk_api.ConversationInterruption} */ -proto.talk_api.CreateBulkPhoneCallResponse.prototype.getDataList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, common_pb.AssistantConversation, 3)); +proto.talk_api.TalkOutput.prototype.getInterruption = function() { + return /** @type{?proto.talk_api.ConversationInterruption} */ ( + jspb.Message.getWrapperField(this, proto.talk_api.ConversationInterruption, 10)); }; /** - * @param {!Array} value - * @return {!proto.talk_api.CreateBulkPhoneCallResponse} returns this + * @param {?proto.talk_api.ConversationInterruption|undefined} value + * @return {!proto.talk_api.TalkOutput} returns this */ -proto.talk_api.CreateBulkPhoneCallResponse.prototype.setDataList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 3, value); +proto.talk_api.TalkOutput.prototype.setInterruption = function(value) { + return jspb.Message.setOneofWrapperField(this, 10, proto.talk_api.TalkOutput.oneofGroups_[0], value); }; /** - * @param {!proto.AssistantConversation=} opt_value - * @param {number=} opt_index - * @return {!proto.AssistantConversation} + * Clears the message field making it undefined. + * @return {!proto.talk_api.TalkOutput} returns this */ -proto.talk_api.CreateBulkPhoneCallResponse.prototype.addData = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.AssistantConversation, opt_index); +proto.talk_api.TalkOutput.prototype.clearInterruption = function() { + return this.setInterruption(undefined); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.talk_api.CreateBulkPhoneCallResponse} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.talk_api.CreateBulkPhoneCallResponse.prototype.clearDataList = function() { - return this.setDataList([]); +proto.talk_api.TalkOutput.prototype.hasInterruption = function() { + return jspb.Message.getField(this, 10) != null; }; /** - * optional Error error = 4; + * optional ConversationAssistantMessage assistant = 12; + * @return {?proto.talk_api.ConversationAssistantMessage} + */ +proto.talk_api.TalkOutput.prototype.getAssistant = function() { + return /** @type{?proto.talk_api.ConversationAssistantMessage} */ ( + jspb.Message.getWrapperField(this, proto.talk_api.ConversationAssistantMessage, 12)); +}; + + +/** + * @param {?proto.talk_api.ConversationAssistantMessage|undefined} value + * @return {!proto.talk_api.TalkOutput} returns this +*/ +proto.talk_api.TalkOutput.prototype.setAssistant = function(value) { + return jspb.Message.setOneofWrapperField(this, 12, proto.talk_api.TalkOutput.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.talk_api.TalkOutput} returns this + */ +proto.talk_api.TalkOutput.prototype.clearAssistant = function() { + return this.setAssistant(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.talk_api.TalkOutput.prototype.hasAssistant = function() { + return jspb.Message.getField(this, 12) != null; +}; + + +/** + * optional ConversationToolCall tool = 13; + * @return {?proto.talk_api.ConversationToolCall} + */ +proto.talk_api.TalkOutput.prototype.getTool = function() { + return /** @type{?proto.talk_api.ConversationToolCall} */ ( + jspb.Message.getWrapperField(this, proto.talk_api.ConversationToolCall, 13)); +}; + + +/** + * @param {?proto.talk_api.ConversationToolCall|undefined} value + * @return {!proto.talk_api.TalkOutput} returns this +*/ +proto.talk_api.TalkOutput.prototype.setTool = function(value) { + return jspb.Message.setOneofWrapperField(this, 13, proto.talk_api.TalkOutput.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.talk_api.TalkOutput} returns this + */ +proto.talk_api.TalkOutput.prototype.clearTool = function() { + return this.setTool(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.talk_api.TalkOutput.prototype.hasTool = function() { + return jspb.Message.getField(this, 13) != null; +}; + + +/** + * optional ConversationToolResult toolResult = 14; + * @return {?proto.talk_api.ConversationToolResult} + */ +proto.talk_api.TalkOutput.prototype.getToolresult = function() { + return /** @type{?proto.talk_api.ConversationToolResult} */ ( + jspb.Message.getWrapperField(this, proto.talk_api.ConversationToolResult, 14)); +}; + + +/** + * @param {?proto.talk_api.ConversationToolResult|undefined} value + * @return {!proto.talk_api.TalkOutput} returns this +*/ +proto.talk_api.TalkOutput.prototype.setToolresult = function(value) { + return jspb.Message.setOneofWrapperField(this, 14, proto.talk_api.TalkOutput.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.talk_api.TalkOutput} returns this + */ +proto.talk_api.TalkOutput.prototype.clearToolresult = function() { + return this.setToolresult(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.talk_api.TalkOutput.prototype.hasToolresult = function() { + return jspb.Message.getField(this, 14) != null; +}; + + +/** + * optional ConversationDirective directive = 16; + * @return {?proto.talk_api.ConversationDirective} + */ +proto.talk_api.TalkOutput.prototype.getDirective = function() { + return /** @type{?proto.talk_api.ConversationDirective} */ ( + jspb.Message.getWrapperField(this, proto.talk_api.ConversationDirective, 16)); +}; + + +/** + * @param {?proto.talk_api.ConversationDirective|undefined} value + * @return {!proto.talk_api.TalkOutput} returns this +*/ +proto.talk_api.TalkOutput.prototype.setDirective = function(value) { + return jspb.Message.setOneofWrapperField(this, 16, proto.talk_api.TalkOutput.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.talk_api.TalkOutput} returns this + */ +proto.talk_api.TalkOutput.prototype.clearDirective = function() { + return this.setDirective(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.talk_api.TalkOutput.prototype.hasDirective = function() { + return jspb.Message.getField(this, 16) != null; +}; + + +/** + * optional Error error = 15; * @return {?proto.Error} */ -proto.talk_api.CreateBulkPhoneCallResponse.prototype.getError = function() { +proto.talk_api.TalkOutput.prototype.getError = function() { return /** @type{?proto.Error} */ ( - jspb.Message.getWrapperField(this, common_pb.Error, 4)); + jspb.Message.getWrapperField(this, common_pb.Error, 15)); }; /** * @param {?proto.Error|undefined} value - * @return {!proto.talk_api.CreateBulkPhoneCallResponse} returns this + * @return {!proto.talk_api.TalkOutput} returns this */ -proto.talk_api.CreateBulkPhoneCallResponse.prototype.setError = function(value) { - return jspb.Message.setWrapperField(this, 4, value); +proto.talk_api.TalkOutput.prototype.setError = function(value) { + return jspb.Message.setOneofWrapperField(this, 15, proto.talk_api.TalkOutput.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.talk_api.CreateBulkPhoneCallResponse} returns this + * @return {!proto.talk_api.TalkOutput} returns this */ -proto.talk_api.CreateBulkPhoneCallResponse.prototype.clearError = function() { +proto.talk_api.TalkOutput.prototype.clearError = function() { return this.setError(undefined); }; @@ -2975,8 +6859,8 @@ proto.talk_api.CreateBulkPhoneCallResponse.prototype.clearError = function() { * Returns whether this field is set. * @return {boolean} */ -proto.talk_api.CreateBulkPhoneCallResponse.prototype.hasError = function() { - return jspb.Message.getField(this, 4) != null; +proto.talk_api.TalkOutput.prototype.hasError = function() { + return jspb.Message.getField(this, 15) != null; }; diff --git a/src/clients/protos/talk-api_pb_service.d.ts b/src/clients/protos/talk-api_pb_service.d.ts index ee62b48..6195730 100644 --- a/src/clients/protos/talk-api_pb_service.d.ts +++ b/src/clients/protos/talk-api_pb_service.d.ts @@ -10,8 +10,8 @@ type TalkServiceAssistantTalk = { readonly service: typeof TalkService; readonly requestStream: true; readonly responseStream: true; - readonly requestType: typeof talk_api_pb.AssistantMessagingRequest; - readonly responseType: typeof talk_api_pb.AssistantMessagingResponse; + readonly requestType: typeof talk_api_pb.AssistantTalkInput; + readonly responseType: typeof talk_api_pb.AssistantTalkOutput; }; type TalkServiceGetAllAssistantConversation = { @@ -84,8 +84,8 @@ type AgentKitTalk = { readonly service: typeof AgentKit; readonly requestStream: true; readonly responseStream: true; - readonly requestType: typeof talk_api_pb.AssistantMessagingRequest; - readonly responseType: typeof talk_api_pb.AssistantMessagingResponse; + readonly requestType: typeof talk_api_pb.TalkInput; + readonly responseType: typeof talk_api_pb.TalkOutput; }; export class AgentKit { @@ -125,7 +125,7 @@ export class TalkServiceClient { readonly serviceHost: string; constructor(serviceHost: string, options?: grpc.RpcOptions); - assistantTalk(metadata?: grpc.Metadata): BidirectionalStream; + assistantTalk(metadata?: grpc.Metadata): BidirectionalStream; getAllAssistantConversation( requestMessage: common_pb.GetAllAssistantConversationRequest, metadata: grpc.Metadata, @@ -186,6 +186,6 @@ export class AgentKitClient { readonly serviceHost: string; constructor(serviceHost: string, options?: grpc.RpcOptions); - talk(metadata?: grpc.Metadata): BidirectionalStream; + talk(metadata?: grpc.Metadata): BidirectionalStream; } diff --git a/src/clients/protos/talk-api_pb_service.js b/src/clients/protos/talk-api_pb_service.js index f1a1d26..7186617 100644 --- a/src/clients/protos/talk-api_pb_service.js +++ b/src/clients/protos/talk-api_pb_service.js @@ -16,8 +16,8 @@ TalkService.AssistantTalk = { service: TalkService, requestStream: true, responseStream: true, - requestType: talk_api_pb.AssistantMessagingRequest, - responseType: talk_api_pb.AssistantMessagingResponse + requestType: talk_api_pb.AssistantTalkInput, + responseType: talk_api_pb.AssistantTalkOutput }; TalkService.GetAllAssistantConversation = { @@ -325,8 +325,8 @@ AgentKit.Talk = { service: AgentKit, requestStream: true, responseStream: true, - requestType: talk_api_pb.AssistantMessagingRequest, - responseType: talk_api_pb.AssistantMessagingResponse + requestType: talk_api_pb.TalkInput, + responseType: talk_api_pb.TalkOutput }; exports.AgentKit = AgentKit; diff --git a/src/clients/talk.ts b/src/clients/talk.ts index 20ea9b9..556e895 100644 --- a/src/clients/talk.ts +++ b/src/clients/talk.ts @@ -41,8 +41,8 @@ import { TalkServiceClient } from "@/rapida/clients/protos/talk-api_pb_service"; import { CreateConversationMetricResponse, CreateConversationMetricRequest, - AssistantMessagingRequest, - AssistantMessagingResponse, + AssistantTalkInput, + AssistantTalkOutput, } from "./protos/talk-api_pb"; import { CreateMessageMetricResponse, @@ -59,7 +59,7 @@ import { ConnectionConfig } from "@/rapida/types/connection-config"; export function AssistantTalk( connectionConfig: ConnectionConfig, authHeader?: UserAuthInfo | ClientAuthInfo -): BidirectionalStream { +): BidirectionalStream { return connectionConfig.streamClient.assistantTalk( WithAuthContext(connectionConfig.auth || authHeader) ); diff --git a/src/hooks/observables/voice-agent.ts b/src/hooks/observables/voice-agent.ts index 9e4d0d7..b35cd1b 100644 --- a/src/hooks/observables/voice-agent.ts +++ b/src/hooks/observables/voice-agent.ts @@ -26,13 +26,12 @@ import { Subject, map, Observable, startWith, finalize, concat } from "rxjs"; import { VoiceAgent } from "@/rapida/agents/voice-agent"; import { AgentEvent } from "@/rapida/types/agent-event"; import { ConnectionState } from "@/rapida/types/connection-state"; -import { AssistantMessagingResponse } from "@/rapida/clients/protos/talk-api_pb"; import { - AssistantConversationConfiguration, - AssistantConversationInterruption, - AssistantConversationUserMessage, - AssistantConversationAssistantMessage, -} from "@/rapida/clients/protos/common_pb"; + AssistantTalkOutput, ConversationConfiguration, + ConversationInterruption, + ConversationUserMessage, + ConversationAssistantMessage, +} from "@/rapida/clients/protos/talk-api_pb"; /** * Utility function to observe a specific agent event. * @param agent The voice agent instance. @@ -84,12 +83,12 @@ export function observeAgentConnectionState( * Observes server events from the agent. */ export function observeAgentServerEvents(agent: VoiceAgent): Observable<{ - eventType?: AssistantMessagingResponse.DataCase; + eventType?: AssistantTalkOutput.DataCase; argument?: - | AssistantConversationConfiguration - | AssistantConversationInterruption - | AssistantConversationUserMessage - | AssistantConversationAssistantMessage; + | ConversationConfiguration + | ConversationInterruption + | ConversationUserMessage + | ConversationAssistantMessage; }> { return agentEventSelector(agent, AgentEvent.ConversationEvent).pipe( map(([eventType, event]) => ({ diff --git a/src/index.ts b/src/index.ts index b5ade51..c2475fa 100644 --- a/src/index.ts +++ b/src/index.ts @@ -23,11 +23,11 @@ * */ export { VoiceAgent } from "@/rapida/agents/voice-agent"; -export { - toTextContent, - toContentText, - toStreamAudioContent, -} from "@/rapida/utils/rapida_content"; +// export { +// // toTextContent, +// // toContentText, +// toStreamAudioContent, +// } from "@/rapida/utils/rapida_content"; export { useMessageFeedback } from "@/rapida/hooks/use-message-feedback"; export { useConversationFeedback } from "@/rapida/hooks/use-conversation-feedback"; export { useConnectAgent } from "@/rapida/hooks/use-connect-agent"; @@ -287,8 +287,8 @@ export { GetCredentialResponse, } from "@/rapida/clients/protos/vault-api_pb"; export { - AssistantMessagingRequest, - AssistantMessagingResponse, + AssistantTalkInput, + AssistantTalkOutput, CreateMessageMetricRequest, CreateMessageMetricResponse, CreateConversationMetricRequest, @@ -383,7 +383,6 @@ export { Tag, Organization, Metric, - Content, Message as ProtoMessage, ToolCall, FunctionCall, @@ -400,10 +399,6 @@ export { AssistantConversationRecording, AssistantDefinition, Telemetry, - AssistantConversationConfiguration, - AssistantConversationInterruption, - AssistantConversationUserMessage, - AssistantConversationAssistantMessage, AssistantConversationTelephonyEvent, } from "@/rapida/clients/protos/common_pb"; export { @@ -630,3 +625,14 @@ export { GetNotificationSetting, UpdateNotificationSetting, } from "./clients/notification"; + + +export { + ConversationConfiguration, + ConversationInterruption, + ConversationAssistantMessage, + ConversationUserMessage, + ConversationToolCall, + ConversationToolResult, + ConversationDirective, +} from "@/rapida/clients/protos/talk-api_pb"; \ No newline at end of file diff --git a/src/types/agent-callback.ts b/src/types/agent-callback.ts index c9b5517..12f06e5 100644 --- a/src/types/agent-callback.ts +++ b/src/types/agent-callback.ts @@ -23,49 +23,48 @@ * */ import { - AssistantConversationAssistantMessage, - AssistantConversationConfiguration, - AssistantConversationInterruption, - AssistantConversationUserMessage, -} from "@/rapida/clients/protos/common_pb"; + ConversationUserMessage as CUMessage, + ConversationAssistantMessage as CAMessage, + ConversationConfiguration, + ConversationInterruption, + ConversationDirective +} from "@/rapida/clients/protos/talk-api_pb"; import { AssistantConversationMessage } from "@/rapida/clients/protos/common_pb"; -import { toContentText } from "@/rapida/utils/rapida_content"; -import { AssistantConversationAction } from '../clients/protos/common_pb'; export interface ConversationUserMessage - extends AssistantConversationUserMessage.AsObject { + extends CUMessage.AsObject { messageText?: string; } export class ConversationUserMessage { - constructor(config?: AssistantConversationUserMessage) { + constructor(config?: CUMessage) { if (config) { Object.assign(this, config.toObject()); switch (config.getMessageCase()) { - case AssistantConversationUserMessage.MessageCase.MESSAGE_NOT_SET: - case AssistantConversationUserMessage.MessageCase.AUDIO: - case AssistantConversationUserMessage.MessageCase.TEXT: - this.messageText = config.getText()?.getContent(); + case CUMessage.MessageCase.MESSAGE_NOT_SET: + case CUMessage.MessageCase.AUDIO: + case CUMessage.MessageCase.TEXT: + this.messageText = config.getText(); } } } } export interface ConversationAssistantMessage - extends AssistantConversationAssistantMessage.AsObject { + extends CAMessage.AsObject { messageText?: string; } export class ConversationAssistantMessage { - constructor(config?: AssistantConversationAssistantMessage) { + constructor(config?: CAMessage) { if (config) { Object.assign(this, config.toObject()); switch (config.getMessageCase()) { - case AssistantConversationUserMessage.MessageCase.MESSAGE_NOT_SET: - case AssistantConversationUserMessage.MessageCase.AUDIO: - case AssistantConversationUserMessage.MessageCase.TEXT: - this.messageText = config.getText()?.getContent(); + case CAMessage.MessageCase.MESSAGE_NOT_SET: + case CAMessage.MessageCase.AUDIO: + case CAMessage.MessageCase.TEXT: + this.messageText = config.getText(); } } } @@ -89,12 +88,12 @@ export interface ConversationMessage export interface AgentCallback { // this will be called when assistant get changed // also this will be the first call when assistant connection established onConfiguration?: ( - args: AssistantConversationConfiguration.AsObject | undefined + args: ConversationConfiguration.AsObject | undefined ) => void; // interrupted // // vad // word // there might be two kind of interruption onInterrupt?: ( - args: AssistantConversationInterruption.AsObject | undefined + args: ConversationInterruption.AsObject | undefined ) => void; // generation @@ -103,10 +102,12 @@ export interface AgentCallback { // user onUserMessage?: (args: ConversationUserMessage | undefined) => void; - // onAction?: ( arg?: - | AssistantConversationAction.AsObject + | ConversationDirective.AsObject ) => void; + + + } diff --git a/src/types/agent-config.ts b/src/types/agent-config.ts index 3ec7a58..01190e2 100644 --- a/src/types/agent-config.ts +++ b/src/types/agent-config.ts @@ -22,7 +22,8 @@ * Author: Prashant * */ -import { AssistantDefinition, AudioConfig, StreamConfig } from "@/rapida/clients/protos/common_pb"; +import { AssistantDefinition } from "@/rapida/clients/protos/common_pb"; +import { AudioConfig, StreamConfig } from "@/rapida/clients/protos/talk-api_pb"; import * as google_protobuf_any_pb from "google-protobuf/google/protobuf/any_pb"; import { StringArrayToAny, StringToAny } from "@/rapida/utils/rapida_value"; import { Channel } from "@/rapida/types/channel"; diff --git a/src/types/agent-deployment.ts b/src/types/agent-deployment.ts index 52599ec..724eadb 100644 --- a/src/types/agent-deployment.ts +++ b/src/types/agent-deployment.ts @@ -32,23 +32,23 @@ import { export type AgentDeployment = | { - type: "debugger"; - deployment: AssistantDebuggerDeployment; - inAudio: boolean; - outAudio: boolean; - } + type: "debugger"; + deployment: AssistantDebuggerDeployment; + inAudio: boolean; + outAudio: boolean; + } | { - type: "web-plugin"; - deployment: AssistantWebpluginDeployment; - inAudio: boolean; - outAudio: boolean; - } + type: "web-plugin"; + deployment: AssistantWebpluginDeployment; + inAudio: boolean; + outAudio: boolean; + } | { - type: "api"; - deployment: AssistantApiDeployment; - inAudio: boolean; - outAudio: boolean; - }; + type: "api"; + deployment: AssistantApiDeployment; + inAudio: boolean; + outAudio: boolean; + }; export const GetDeployment = ( assistant: Assistant, @@ -59,33 +59,33 @@ export const GetDeployment = ( const deployment = assistant.getDebuggerdeployment(); return deployment ? { - type: "debugger", - deployment: deployment, - inAudio: deployment.getInputaudio() != undefined, - outAudio: deployment.getOutputaudio() != undefined, - } + type: "debugger", + deployment: deployment, + inAudio: deployment.getInputaudio() != undefined, + outAudio: deployment.getOutputaudio() != undefined, + } : undefined; } case "web-plugin": { const deployment = assistant.getWebplugindeployment(); return deployment ? { - type: "web-plugin", - deployment: deployment, - inAudio: deployment.getInputaudio() != undefined, - outAudio: deployment.getOutputaudio() != undefined, - } + type: "web-plugin", + deployment: deployment, + inAudio: deployment.getInputaudio() != undefined, + outAudio: deployment.getOutputaudio() != undefined, + } : undefined; } default: { const deployment = assistant.getApideployment(); return deployment ? { - type: "api", - deployment: deployment, - inAudio: deployment.getInputaudio() != undefined, - outAudio: deployment.getOutputaudio() != undefined, - } + type: "api", + deployment: deployment, + inAudio: deployment.getInputaudio() != undefined, + outAudio: deployment.getOutputaudio() != undefined, + } : undefined; } } diff --git a/src/types/agent-event-callback.ts b/src/types/agent-event-callback.ts index 51176e1..0b8b458 100644 --- a/src/types/agent-event-callback.ts +++ b/src/types/agent-event-callback.ts @@ -26,14 +26,13 @@ import { Feedback } from "@/rapida/types/feedback"; import { Channel } from "@/rapida/types/channel"; import { Assistant } from "@/rapida/clients/protos/assistant-api_pb"; import { - AssistantConversationAssistantMessage, - AssistantConversationConfiguration, - AssistantConversationInterruption, - AssistantConversationUserMessage, -} from "@/rapida/clients/protos/common_pb"; -import { AssistantMessagingResponse } from "@/rapida/clients/protos/talk-api_pb"; + ConversationAssistantMessage, + ConversationConfiguration, + ConversationInterruption, + ConversationUserMessage, + AssistantTalkOutput, +} from "@/rapida/clients/protos/talk-api_pb"; import { ConnectionState } from "@/rapida/types/connection-state"; - /** * Defines the structure for callback functions used in voice agent events. * @@ -63,12 +62,12 @@ export type AgentEventCallback = { // when server sent an event to client onConversationEvent: ( - eventType?: AssistantMessagingResponse.DataCase, + eventType?: AssistantTalkOutput.DataCase, event?: - | AssistantConversationConfiguration - | AssistantConversationUserMessage - | AssistantConversationAssistantMessage - | AssistantConversationInterruption + | ConversationConfiguration + | ConversationUserMessage + | ConversationAssistantMessage + | ConversationInterruption ) => void; // feedback of conversation diff --git a/src/utils/rapida_content.ts b/src/utils/rapida_content.ts index 996d834..45aeadf 100644 --- a/src/utils/rapida_content.ts +++ b/src/utils/rapida_content.ts @@ -22,91 +22,91 @@ * Author: Prashant * */ -import { Content } from "@/rapida/clients/protos/common_pb"; +// import { Content } from "@/rapida/clients/protos/common_pb"; -export enum ResponseContentType { - TEXT_CONTENT = "text", - AUDIO_CONTENT = "audio", - IMAGE_CONTENT = "image", - MULTI_MEDIA_CONTENT = "multi", -} +// export enum ResponseContentType { +// TEXT_CONTENT = "text", +// AUDIO_CONTENT = "audio", +// IMAGE_CONTENT = "image", +// MULTI_MEDIA_CONTENT = "multi", +// } -// Get returns the string value of the RapidaEnvironment -export function getResponseContentType(env: ResponseContentType): string { - return env; -} +// // Get returns the string value of the RapidaEnvironment +// export function getResponseContentType(env: ResponseContentType): string { +// return env; +// } -// FromStr returns the corresponding RapidaEnvironment for a given string, -// or DEVELOPMENT if the string does not match any environment. -export function fromStr(label: string): ResponseContentType { - switch (label.toLowerCase()) { - case ResponseContentType.TEXT_CONTENT: - return ResponseContentType.TEXT_CONTENT; - case ResponseContentType.AUDIO_CONTENT: - return ResponseContentType.AUDIO_CONTENT; - case ResponseContentType.IMAGE_CONTENT: - return ResponseContentType.IMAGE_CONTENT; - case ResponseContentType.MULTI_MEDIA_CONTENT: - return ResponseContentType.MULTI_MEDIA_CONTENT; - default: - console.warn( - "The content type is not supported. Only text, audio, image, multi" - ); - return ResponseContentType.TEXT_CONTENT; - } -} +// // FromStr returns the corresponding RapidaEnvironment for a given string, +// // or DEVELOPMENT if the string does not match any environment. +// export function fromStr(label: string): ResponseContentType { +// switch (label.toLowerCase()) { +// case ResponseContentType.TEXT_CONTENT: +// return ResponseContentType.TEXT_CONTENT; +// case ResponseContentType.AUDIO_CONTENT: +// return ResponseContentType.AUDIO_CONTENT; +// case ResponseContentType.IMAGE_CONTENT: +// return ResponseContentType.IMAGE_CONTENT; +// case ResponseContentType.MULTI_MEDIA_CONTENT: +// return ResponseContentType.MULTI_MEDIA_CONTENT; +// default: +// console.warn( +// "The content type is not supported. Only text, audio, image, multi" +// ); +// return ResponseContentType.TEXT_CONTENT; +// } +// } -type ResponseContentFormat = "raw" | "word" | "url" | "chunk"; +// type ResponseContentFormat = "raw" | "word" | "url" | "chunk"; -export const TEXT_CONTENT_FORMAT_RAW: ResponseContentFormat = "raw"; -export const TEXT_CONTENT_FORMAT_WORD: ResponseContentFormat = "word"; +// export const TEXT_CONTENT_FORMAT_RAW: ResponseContentFormat = "raw"; +// export const TEXT_CONTENT_FORMAT_WORD: ResponseContentFormat = "word"; -export const AUDIO_CONTENT_FORMAT_RAW: ResponseContentFormat = "raw"; -export const AUDIO_CONTENT_FORMAT_CHUNK: ResponseContentFormat = "chunk"; -export const AUDIO_CONTENT_FORMAT_URL: ResponseContentFormat = "url"; +// export const AUDIO_CONTENT_FORMAT_RAW: ResponseContentFormat = "raw"; +// export const AUDIO_CONTENT_FORMAT_CHUNK: ResponseContentFormat = "chunk"; +// export const AUDIO_CONTENT_FORMAT_URL: ResponseContentFormat = "url"; -export const IMAGE_CONTENT_FORMAT_RAW: ResponseContentFormat = "raw"; -export const IMAGE_CONTENT_FORMAT_URL: ResponseContentFormat = "url"; +// export const IMAGE_CONTENT_FORMAT_RAW: ResponseContentFormat = "raw"; +// export const IMAGE_CONTENT_FORMAT_URL: ResponseContentFormat = "url"; -export const MULTI_MEDIA_CONTENT_FORMAT_RAW: ResponseContentFormat = "raw"; -export const MULTI_MEDIA_CONTENT_FORMAT_URL: ResponseContentFormat = "url"; +// export const MULTI_MEDIA_CONTENT_FORMAT_RAW: ResponseContentFormat = "raw"; +// export const MULTI_MEDIA_CONTENT_FORMAT_URL: ResponseContentFormat = "url"; -/** - * - * @param str - * @returns - */ -export const toTextContent = ( - str: string, - format?: ResponseContentFormat -): Content => { - const cnt = new Content(); - if (format) cnt.setContentformat(format); - else cnt.setContentformat(TEXT_CONTENT_FORMAT_RAW); - cnt.setContenttype(ResponseContentType.TEXT_CONTENT); - cnt.setContent(new TextEncoder().encode(str)); - return cnt; -}; +// /** +// * +// * @param str +// * @returns +// */ +// export const toTextContent = ( +// str: string, +// format?: ResponseContentFormat +// ): Content => { +// const cnt = new Content(); +// if (format) cnt.setContentformat(format); +// else cnt.setContentformat(TEXT_CONTENT_FORMAT_RAW); +// cnt.setContenttype(ResponseContentType.TEXT_CONTENT); +// cnt.setContent(new TextEncoder().encode(str)); +// return cnt; +// }; -export const toStreamAudioContent = (raw: Uint8Array | string): Content => { - const cnt = new Content(); - cnt.setContentformat(AUDIO_CONTENT_FORMAT_CHUNK); - cnt.setContenttype(ResponseContentType.AUDIO_CONTENT); - cnt.setContent(raw); - return cnt; -}; +// export const toStreamAudioContent = (raw: Uint8Array | string): Content => { +// const cnt = new Content(); +// cnt.setContentformat(AUDIO_CONTENT_FORMAT_CHUNK); +// cnt.setContenttype(ResponseContentType.AUDIO_CONTENT); +// cnt.setContent(raw); +// return cnt; +// }; -export const toContentText = (cnt?: Content[]): string => { - if (!cnt) return ""; +// export const toContentText = (cnt?: Content[]): string => { +// if (!cnt) return ""; - return cnt - .filter((x) => x.getContenttype() === "text") - .map((x) => { - try { - return new TextDecoder().decode(x.getContent() as Uint8Array); - } catch (error) { - return ""; - } - }) - .join(" "); -}; +// return cnt +// .filter((x) => x.getContenttype() === "text") +// .map((x) => { +// try { +// return new TextDecoder().decode(x.getContent() as Uint8Array); +// } catch (error) { +// return ""; +// } +// }) +// .join(" "); +// }; diff --git a/tests/types/agent-config.test.ts b/tests/types/agent-config.test.ts index 06bae2d..094526f 100644 --- a/tests/types/agent-config.test.ts +++ b/tests/types/agent-config.test.ts @@ -2,7 +2,7 @@ * Tests for AgentConfig and related types */ -import { InputOptions, OutputOptions, RecorderOptions, PlayerOptions } from '@/rapida/types/agent-config'; +import { InputOptions, RecorderOptions, PlayerOptions } from '@/rapida/types/agent-config'; import { Channel } from '@/rapida/types/channel'; describe('RecorderOptions', () => { From 0d5cb9223034a31cf1f6c3774556b49f15d3f291 Mon Sep 17 00:00:00 2001 From: Prashant Srivastav Date: Fri, 30 Jan 2026 15:18:00 +0800 Subject: [PATCH 2/2] feat: handled vad interruption on ui --- package.json | 2 +- src/agents/voice-agent.ts | 3 +++ src/audio/audio-concat-processor.ts | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 9ea9a13..899c520 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@rapidaai/react", - "version": "1.1.53", + "version": "1.1.54", "description": "An easy to use react client for building generative ai application using Rapida platform.", "repository": { "type": "git", diff --git a/src/agents/voice-agent.ts b/src/agents/voice-agent.ts index f806994..4e17c71 100644 --- a/src/agents/voice-agent.ts +++ b/src/agents/voice-agent.ts @@ -242,6 +242,9 @@ export class VoiceAgent extends Agent { private fadeOutAudio = (duration: number = 2) => { if (!this.output) return; + // Reset interrupt flag to prevent VAD from clearing audio due to previous WORD interrupt + this.output.worklet.port.postMessage({ type: "resetInterrupt" }); + const currentTime = this.output.context.currentTime; this.output.gain.gain.exponentialRampToValueAtTime( 0.0001, diff --git a/src/audio/audio-concat-processor.ts b/src/audio/audio-concat-processor.ts index ce11e11..fae2132 100644 --- a/src/audio/audio-concat-processor.ts +++ b/src/audio/audio-concat-processor.ts @@ -51,6 +51,9 @@ class AudioConcatProcessor extends AudioWorkletProcessor { case "interrupt": this.wasInterrupted = true; break; + case "resetInterrupt": + this.wasInterrupted = false; + break; case "clearInterrupted": if (this.wasInterrupted) { this.wasInterrupted = false;